Skip to content

Oley96/api-automation-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boilerplate for Python + Pytest + requests + Allure API automation test project

  • Created some tests
  • Created tests configuration
  • Enabled allure reporter
  • Added logging

To integrate PyCharm with PyTest

Preferences -> Tools -> Default test runner -> pytest

How to start?

  • Create .env file in root directory
  • Copy content form .env.example to .env file
  • Add to .env deployed Sock Shop IP-address
  • Add to .env absolute path to src directory

To run marked tests

For example: you have tests @pytest.mark.api that execute them you need to:
pytest -m api

If you wants to execute test with more then one tag:
pytest -m positive, negative

To run tests with allure report

chmod +x run.sh

sh run.sh