Skip to content

la-lev/rest_api_test_automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Slack Meetup: Building automated testing for backend REST APIs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages