Add verigraph code base
[parser.git] / verigraph / tester / README.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 In order to run the automatic testing script test.py, you need the
5 following dependencies installed on your python distribution:
6
7 -  "requests" python package ->
8    http://docs.python-requests.org/en/master/
9 -  "jsonschema" python package ->
10    https://pypi.python.org/pypi/jsonschema
11
12 IMPORTANT - If you have multiple versions of Python installed on your
13 machine, check carefully that the version you are actually using when
14 running the script, has the required packages installed. Requested
15 version is Python 3+
16
17 | HINT - to install a package you can raise the following command (Bash
18   on Linux or DOS shell on Windows):
19 | python -m pip install jsonschema
20 | python -m pip install requests
21
22 Tested on PYTHON 3.4.3
23
24 To add a new test, just put a new .json file inside the testcases
25 folder. The corresponding JSON schema is in the testcase\_schema.json
26 file and some examples are already available. Each json file should
27 specify:
28
29 -  id, an integer for the testcase;
30 -  name, the name for the testcase;
31 -  description, an optional description;
32 -  policy\_url\_parameters, the parameters to be appended after the
33    verification URL (including the '?' character);
34 -  result, the expected verification result;
35 -  graph, the graph to be tested (the same object that you usually POST
36    to VeriGraph to create a new graph).
37    The test.py script will test each .json file contained into the
38    testcases folder and will provide a complete output.