Experimental stage
Acropolis API is tested using behave BDD testing framework.
Once the platform is up and running (use README-docker.md for instructions on platform Docker build)
/behave-data
|___/data (contains sample data)
/features (contains scenario/feature definitions)
|__environment.py (hooks for further operations before/after each scenario)
|__/steps
|__common.py (high level test implementation)
|__resutils.py (low level RDF internals)
pip install -r requirements.txtDefault configuration for BDD tests is via file: behave.ini
Either override values or delete file to edit test run.
- Run all tests
behave
- Run single feature
behave features/{name}.feature
- Run only test with tag @tag
behave --tags @tag
- Run only test without tag @tag
behave --tags -@tag
- export junit report
behave --junit
To add more test cases follow the steps:
- Add the appropriate sample data under
/data - Add the feature definition under
/features - Extend
/features/steps/common.pywith implementation steps if they are currently undefined. Behave will provide you with a starting code snippet in such case.
A brief description of test features included under /features folder
- partitions
- Test against partition existence and corresponding label
- query.q
- Test against the use of
qquery parameter
- Test against the use of
- query.media
- Test against the use of
mediaquery parameter
- Test against the use of
- query.for
- Test against the use of
forquery parameter
- Test against the use of
- Add newline(
\n) to every print/log statement to get colorful output with debug, even in case of test success https://stackoverflow.com/questions/25150404/how-can-i-see-print-statements-in-behave-bdd