blob: 7bc9b12f3b5ae115f513a090050cc5da0eeba120 (
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
.. 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**
In order to run the automatic testing script, you need the
following dependencies installed on your python distribution:
- "requests" python package -> http://docs.python-requests.org/en/master/
- "jsonschema" python package -> https://pypi.python.org/pypi/jsonschema
1. Run the Python tester
.. code-block:: bash
cd parser/verigraph/tester
python test.py
2. Run many times (i.e. n-times) each test-case with ant script
.. code-block:: bash
cd parser/verigraph
ant -f build.xml run-test -Diteration=n
2. Run many times (i.e. n-times) each test-case by command line
.. code-block:: bash
cd parser/verigraph
python test.py -iteration n
**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.
|