Disable syslog in heat-translator for functest integration
[parser.git] / docs / testing / testusage.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4
5 Parser tosca2heat test usage
6 ============================
7 1. run tox in tosca-parser sub project
8
9 .. code-block:: bash
10
11     # change directory to tosca-parser
12     cd parser/tosca2heat/tosca-parser
13
14     # run with pep8
15     tox -epep8
16
17     # run unit test
18     tox -epy27
19
20 or
21
22 .. code-block:: bash
23
24     # change directory to tosca-parser
25     cd parser/tosca2heat/tosca-parser
26
27     # run tox
28     tox
29
30
31 2. run tox in heat-translator sub project
32
33 .. code-block:: bash
34
35     # change directory to heat-translator
36     cd parser/tosca2heat/heat-translator
37
38     # run with pep8
39     tox -epep8
40
41     # run unit test
42     tox -epy27
43     tox -epy34
44
45 or
46
47 .. code-block:: bash
48
49     # change directory to heat-translator
50     cd parser/tosca2heat/heat-translator
51
52     # run tox
53     tox
54
55 Parser VeriGraph test usage
56 ===========================
57
58 VeriGraph is accessible via both a RESTfull API and a gRPC interface.
59
60 **RESTful API**
61
62 1. Run the Python tester
63
64 .. code-block:: bash
65
66       cd parser/verigraph/tester
67       python test.py
68
69 **gRPC API**
70
71 1. Compile the code
72
73 .. code-block:: bash
74
75       cd parser/verigraph
76       ant -f buildVeriGraph_gRPC.xml build
77
78 2. Run both client and server
79
80 .. code-block:: bash
81
82       cd parser/verigraph
83       ant -f buildVeriGraph_gRPC.xml run
84
85 3. Run only the testing client
86
87 .. code-block:: bash
88
89       cd parser/verigraph
90       ant -f buildVeriGraph_gRPC.xml run-client
91
92 4. Run only the gRPC server
93
94 .. code-block:: bash
95
96       cd parser/verigraph
97       ant -f buildVeriGraph_gRPC.xml run-server
98
99 5. Run all tests and print out the partial results and global result
100
101 .. code-block:: bash
102
103       cd parser/verigraph
104       # This target has the needed dependencies to compile the code
105       # and run both client and server
106       ant -f buildVeriGraph_gRPC.xml run-test
107
108 Note that the execution of these tests may take up to 1-2 minutes when successful.