https://github.com/allure-examples/guide-pytest-selenium-screenshots
Demo repository for the guide on taking screenshots for Allure Report with Pytest and Selenium
https://github.com/allure-examples/guide-pytest-selenium-screenshots
allure allure-report guide pytest python selenium
Last synced: about 1 month ago
JSON representation
Demo repository for the guide on taking screenshots for Allure Report with Pytest and Selenium
- Host: GitHub
- URL: https://github.com/allure-examples/guide-pytest-selenium-screenshots
- Owner: allure-examples
- Created: 2025-01-30T16:57:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-27T16:02:35.000Z (over 1 year ago)
- Last Synced: 2025-09-10T14:40:05.982Z (10 months ago)
- Topics: allure, allure-report, guide, pytest, python, selenium
- Language: Batchfile
- Homepage: https://allurereport.org/docs/guides/pytest-selenium-screenshots/
- Size: 14.6 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Integrating screenshots in Allure Report with Pytest and Selenium
This repository is a part of Allure Report documentation and contains code examples for integrating screenshots in Allure Report with Pytest and Selenium. You can find the original documentation:
- [English version](https://allurereport.org/docs/guides/pytest-selenium-screenshots/)
- [Spanish version](https://allurereport.org/es/docs/guides/pytest-selenium-screenshots/)
## Preparation
1. Make sure you have installed:
- [Python](https://www.python.org/downloads/) version 3.9 or higher
- [Allure Report](https://allurereport.org/docs/install/)
1. Clone the repository via HTTPS:
```shell
git clone https://github.com/allure-examples/guide-pytest-selenium-screenshots.git
```
or SSH:
```shell
git clone git@github.com:allure-examples/guide-pytest-selenium-screenshots.git
```
1. In the shell of your choice, navigate to the repository directory:
```shell
cd path/to/guide-pytest-selenium-screenshots
```
## Run tests
The repository provides with automatic scripts that install the virtual environment, necessary packages, and run the tests. Run the script correspondind to your operating system. For Linux and MacOS:
```
./run.sh
```
For OS Windows:
```shell
.\run.bat
```
Alternatively:
1. Create a Python virtual environment manually:
```shell
python -m venv venv
```
1. Activate the virtual environment (Linux and MacOS):
```shell
source venv/bin/activate
```
OS Windows:
```powershell
.\venv\Scripts\Activate.ps1
```
1. Install the packages used in the project:
```
pip install -r requirements.txt
```
1. Run Pytest:
```
pytest
```
## Run Allure Report
1. To start a local Allure Report server, in the project root directory run:
```shell
allure serve -p
```
1. Browse Allure Report page on `http://127.0.0.1:`