An open API service indexing awesome lists of open source software.

https://github.com/lexxx42/testing_framework_selenium_pytest

Testing framework for site https://demoqa.com/ selenium+pytest+allure
https://github.com/lexxx42/testing_framework_selenium_pytest

allure allure-pytest faker pytest python selenium-webdriver webdriver-manager

Last synced: about 2 months ago
JSON representation

Testing framework for site https://demoqa.com/ selenium+pytest+allure

Awesome Lists containing this project

README

          

# testing_framework_selenium_pytest

## Used tools

+ [Python 3.11.3](https://www.python.org/downloads/)
+ [Selenium](https://selenium-python.readthedocs.io/) - API for SeleniumWebDriver
+ [pytest](https://docs.pytest.org/en/7.3.x/) - test runner
+ [webdriver_manager](https://github.com/SergeyPirogov/webdriver_manager) - for webdrivers (no more driver installations
needed)
+ [Faker](https://faker.readthedocs.io/en/master/) - for test data generation
+ [Allure](https://github.com/allure-framework/allure2) - for test run reports

## Allure usage example

**Add allure to PATH environment if using Windows.**

To get Allure reports you should run tests with the following flag

```shell
--alluredir=
```

Example:

```shell
pytest --alluredir=elements_report elements_test.py
```

Where:

+ `elements_report` - is a dir with reports files
+ `elements_test` - is a test files for elements page.

To get Allure report from test results use the following command

```shell
allure serve allure_results
```

allure report

To run specific test you can use the following command

```shell
pytest --alluredir=elements_report .\framework\tests\elements_test.py::TestElements::TestTextBox::test_text_box
```

To run all tests with Allure report:

```shell
pytest --alluredir=allure_results .\framework\tests
```

You can check my last run of all tests from my framework:

```shell
allure serve allure_results
```

## Framework all tests run

final report summary

### One of found defects with a screenshot

final report defect with a screenshot