项目作者: megaten88

项目描述 :
Python, Selenium, Pytest, Pytest BDD
高级语言: HTML
项目地址: git://github.com/megaten88/automationChallengePython.git
创建时间: 2021-08-14T07:56:40Z
项目社区:https://github.com/megaten88/automationChallengePython

开源协议:

下载


Automation Challenge Python-Selenium

This is an automation challenge, done in August 2021.

Technologies used:

  • python3
  • selenium
  • pytest
  • pytest-BDD
  • pytest-html
  • webDriver-manager
  • faker
  • pipenv

Install PipEnv

To run the project, pipenv is recommended.

  1. pip install pipenv

All dependencies are available in Pipfile, run the command pipenv install on the project directory to install them.

  1. pipenv install

Project Structure

The project structure is design to follow a Page Object Model and BDD.

  1. .
  2. |-- assets
  3. | `-- style.css
  4. |-- tests
  5. | |-- features
  6. | | `-- challenge.feature
  7. | |-- pages
  8. | | |-- accountInfoPage.py
  9. | | |-- basePage.py
  10. | | |-- homePage.py
  11. | | |-- __init__.py
  12. | | |-- locators.py
  13. | | |-- loginPage.py
  14. | | `-- registerPage.py
  15. | |-- step_defs
  16. | | |-- challenge_steps.py
  17. | | `-- __init__.py
  18. | `-- test_challenge.py
  19. |-- Pipfile
  20. |-- Pipfile.lock
  21. |-- README.md
  22. |-- report.html
  23. `-- userData.json

Run Project

To run the project, be sure to have install all dependencies with pipenv.
Once that is done, run:

  1. pipenv shell

and run pytest:

  1. pytest -v tests/test_challenge.py

There’s also the pytest-html module that can generate the report.
To generate the report:

  1. pytest -v tests/test_challenge.py --html=report.html