OPNFV Parser Danube Overview¶
Parser tosca2heat test usage¶
- run tox in tosca-parser sub project
# change directory to tosca-parser
cd parser/tosca2heat/tosca-parser
# run with pep8
tox -epep8
# run unit test
tox -epy27
or
# change directory to tosca-parser
cd parser/tosca2heat/tosca-parser
# run tox
tox
- run tox in heat-translator sub project
# change directory to heat-translator
cd parser/tosca2heat/heat-translator
# run with pep8
tox -epep8
# run unit test
tox -epy27
tox -epy34
or
# 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
- Run the Python tester
cd parser/verigraph/tester
python test.py
- Run many times (i.e. n-times) each test-case with ant script
cd parser/verigraph
ant -f build.xml run-test -Diteration=n
- Run many times (i.e. n-times) each test-case by command line
cd parser/verigraph
python test.py -iteration n
gRPC API
- Compile the code
cd parser/verigraph
ant -f buildVeriGraph_gRPC.xml build
- Run both client and server
cd parser/verigraph
ant -f buildVeriGraph_gRPC.xml run
- Run only the testing client
cd parser/verigraph
ant -f buildVeriGraph_gRPC.xml run-client
- Run only the gRPC server
cd parser/verigraph
ant -f buildVeriGraph_gRPC.xml run-server
- Run all tests and print out the partial results and global result
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.