Acceptance testing with Behave and following the screenplay pattern. The base of framework is built with Python programming language and Gherkin
| Path | Description |
|---|---|
| features | Features is the place where we will keep all our user stories written in Gherkins |
| steps | The step definitions is where we will put all our steps that are written in the Features section |
| data | It is where we will put all the data that we will need to execute the test cases such as payload, headers, etc. |
| models | It is where we model the request bodies |
| facts | It is where we will put all the classes that we will need to initialize the execute of the test cases, we can say that it is associated with Given step. Facts will consist of a series of interactions |
| task | It is where we will put all the classes related with the business goal, i mean, with the action that i will do in the execute of the test case, we can say that it is associated with When step. Tasks will consist of a series of interactions |
| questions | It is where we will put all the classes to check that the task was successful, we can say that it is associated with the Then step. Questions will consist of a series of interactions |
| interactions | It is where we will put all the classes related with the interactions with the SUT, such as navigating to websites, clicking buttons, entering values in form fields, or submitting HTTP requests to a REST API. This series of actions are composite a results in a facts, task or questions |
You’ll need Python installed
To install the framework, you must follow the following steps:
-
git clone https://github.com/squella/SP-API-test.git -
python3 -m venv env -
source env/bin/activate -
pip install -r requirements.txt -
behave
Now, time to run your tests!, to do so, just run:
behave