summaryrefslogtreecommitdiffstats
path: root/docs/testing/testusage.rst
blob: 36b9c000af01a093a4e045848e2185160f3c90cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0


Parser tosca2heat test usage
============================
1. run tox in tosca-parser sub project

.. code-block:: bash

    # change directory to tosca-parser
    cd parser/tosca2heat/tosca-parser

    # run with pep8
    tox -epep8

    # run unit test
    tox -epy27

or

.. code-block:: bash

    # change directory to tosca-parser
    cd parser/tosca2heat/tosca-parser

    # run tox
    tox


2. run tox in heat-translator sub project

.. code-block:: bash

    # change directory to heat-translator
    cd parser/tosca2heat/heat-translator

    # run with pep8
    tox -epep8

    # run unit test
    tox -epy27
    tox -epy34

or

.. code-block:: bash

    # change directory to heat-translator
    cd parser/tosca2heat/heat-translator

    # run tox
    tox

Parser VeriGraph test usage
===========================

VeriGraph is accessible via both a RESTfull API and a gRPC interface.

**RESTful API**

1. Run the Python tester

.. code-block:: bash

      cd parser/verigraph/tester
      python test.py

**gRPC API**

1. Compile the code

.. code-block:: bash

      cd parser/verigraph
      ant -f buildVeriGraph_gRPC.xml build

2. Run both client and server

.. code-block:: bash

      cd parser/verigraph
      ant -f buildVeriGraph_gRPC.xml run

3. Run only the testing client

.. code-block:: bash

      cd parser/verigraph
      ant -f buildVeriGraph_gRPC.xml run-client

4. Run only the gRPC server

.. code-block:: bash

      cd parser/verigraph
      ant -f buildVeriGraph_gRPC.xml run-server

5. Run all tests and print out the partial results and global result

.. code-block:: bash

      cd parser/verigraph
      # This target has the needed dependencies to compile the code
      # and run both client and server
      ant -f buildVeriGraph_gRPC.xml run-test

Note that the execution of these tests may take up to 1-2 minutes when successful.