Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ebazhanov/python-cucumber-junit2html-report
This project utilizes the junit2html plugin to convert test result files from *.xml format to *.html. Additionally, in the case of multiple test reports, the plugin is used to merge them into a single *.html report file.
https://github.com/ebazhanov/python-cucumber-junit2html-report
e2e junit2html python testing testing-library
Last synced: about 1 month ago
JSON representation
This project utilizes the junit2html plugin to convert test result files from *.xml format to *.html. Additionally, in the case of multiple test reports, the plugin is used to merge them into a single *.html report file.
- Host: GitHub
- URL: https://github.com/ebazhanov/python-cucumber-junit2html-report
- Owner: Ebazhanov
- Created: 2023-12-31T14:51:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-18T21:47:05.000Z (12 months ago)
- Last Synced: 2024-10-14T22:43:39.103Z (3 months ago)
- Topics: e2e, junit2html, python, testing, testing-library
- Language: Python
- Homepage:
- Size: 131 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
[![E2E Tests](https://github.com/Ebazhanov/python-cucumber-junit2html-report/actions/workflows/cucumber-tests.yml/badge.svg)](https://github.com/Ebazhanov/python-cucumber-junit2html-report/actions/workflows/cucumber-tests.yml)
[![junit2html](https://img.shields.io/badge/junit2html-plugin-green?labelColor=gray&style=flat&logo=a)](https://github.com/inorton/junit2html)## Automated Testing with "junit2html" Plugin
This project utilizes the [junit2html](https://github.com/inorton/junit2html) plugin to convert test result files from `*.xml` format to `*.html`. Additionally, in the case of multiple test reports, the plugin is used to merge them into a single `*.html` report file.
### How to run E2E tests
- `$ behave **/*.feature --junit`### How to run Unit tests
- `$ python -m unittest tests.test_your_module1`#### Convert Junit to HTML report based on `xml` files
- Install plugin [junit2html](https://github.com/inorton/junit2html)
- `$ behave **/*.feature --junit` //Run tests
- `$ junit2html reports/*.xml --merge=merged_results.xml` // Merge all *.xml files in one
- `$ junit2html merged_results.xml --report-matrix=summary_report.html` // Generate HTML report#### Convert Junit to HTML report based on `json` files
- Can be found in GitHub Actions -> Summary Report![img.png](img.png)
- Report looks like this:
![img_1.png](img_1.png)
#### Project structure
python-cucumber/
|
|-- .github/
| |-- workflows/
| |-- cucumber-test.yml
|
|-- src/
| |-- your_python_module1.py
|
|-- tests/
| |-- e2e/
| | |-- features/
| | | |-- steps/
| | | |-- steps.py
| | | |-- test-01.feature
| | | |-- test-02.feature
| | |-- steps/
| | |-- steps.py
| |
| |-- unit/
| |-- test_your_module1.py