OPNFV Parser Danube Overview

Parser tosca2heat test usage

  1. 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
  1. 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:

  1. Run the Python tester
cd parser/verigraph/tester
python test.py
  1. Run many times (i.e. n-times) each test-case with ant script
cd parser/verigraph
ant -f build.xml run-test -Diteration=n
  1. Run many times (i.e. n-times) each test-case by command line
cd parser/verigraph
python test.py -iteration n

gRPC API

  1. Compile the code
cd parser/verigraph
ant -f buildVeriGraph_gRPC.xml build
  1. Run both client and server
cd parser/verigraph
ant -f buildVeriGraph_gRPC.xml run
  1. Run only the testing client
cd parser/verigraph
ant -f buildVeriGraph_gRPC.xml run-client
  1. Run only the gRPC server
cd parser/verigraph
ant -f buildVeriGraph_gRPC.xml run-server
  1. 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.