Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 1.3 KB

File metadata and controls

34 lines (21 loc) · 1.3 KB

REST API Test Automation

written in

Python 3, py.test

This is the repo with the final tests and structure demoed during Automated Testing San Francisco Meetup @ Slack.

Installation

  1. Download Python 3.7
  2. Install Python from the downloaded package.
  3. Clone the project, navigate to project directory from your terminal, run: pip3 install -r requirements.txt

Running the tests

To start all the final tests from a terminal, inside the project, run python3 -m pytest --alluredir=test_results/ -m final_tests

Report

To generate the report, run allure serve test_results

More about Allure implementation for pytest is here.

How to add a test:

  1. Create a new .py file under 'tests'. Note: name should be test_*.py or *_test.py (otherwise it will not run!)
  2. Create a test suite, add a class Test* into your .py file
  3. Inside the test class, add tests. Note: every test method should start with 'test_'.
  4. To generate a good report, do not forget to use @allure decorators and mark features and steps.

More about pytest.

Happy testing!