Skip to content

Latest commit

 

History

History
92 lines (70 loc) · 2.3 KB

File metadata and controls

92 lines (70 loc) · 2.3 KB

Acropolis platform - BDD testing Suite

Experimental stage

Table of Contents

  1. Introduction
  2. Folder structure
  3. Run tests
  4. Add test cases
  5. Testing approach
  6. Notes

Introduction

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)

Folder structure

/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)

Run tests

1. Create/Activate virtualenv for python 3.6

2. Install all dependencies via pip

pip install -r requirements.txt

3. Run variations

Default 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

Add test cases

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.py with implementation steps if they are currently undefined. Behave will provide you with a starting code snippet in such case.

Testing approach

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 q query parameter
  • query.media
    • Test against the use of media query parameter
  • query.for
    • Test against the use of for query parameter

Notes