Skip to main content

Uma biblioteca para gerar relatórios de teste com emojis

Project description

pytest-report

# pytestreport-md

[![PyPI Version](https://img.shields.io/pypi/v/pytestreport-md.svg)](https://pypi.org/project/pytestreport-md/)
[![License](https://img.shields.io/pypi/l/pytestreport-md.svg)](https://opensource.org/licenses/MIT)

Uma biblioteca para gerar relatórios de testes com emojis de maneira simples e estilizada!

## 🚀 Instalação

Você pode instalar o `pytestreport-md` diretamente do PyPI usando o pip:

# bash
pip install pytestreport-md

📄 Descrição

O pytestreport-md é uma biblioteca leve que facilita a geração de relatórios de testes em formato Markdown. Ele transforma os resultados de testes em relatórios estilizados, incluindo emojis para indicar o status de cada teste (✅ para aprovados e ❌ para falhos).

🛠️ Como Usar

Aqui está um exemplo básico de uso:

from pytestreport.reporter import generate_report_pytest

test_results = """
TestExample1 - PASSED | TestExample2 - FAILED | TestExample3 - PASSED
"""

generate_report_pytest(prefix="You test with pytest", test_results=test_results, output_path="report.md")

Resultado

Um arquivo report.md será gerado com um relatório detalhado:

## Test Report - `platform-bs-users`

--------------------------------------------------
### 📝 Test results

**Total Tests**: 3  
**Passed**: 2  
**Failed**: 1  

### Passed Tests ✅
- TestExample1
- TestExample3

### Failed Tests ❌
- TestExample2

--------------------------------------------------
### 📊 Test Summary

- **Passed Tests**: 2 ✅
- **Failed Tests**: 1 ❌

---
_Report styled with ❤️ for `platform-bs-users` on 01-Jan-2025 at 10:00:00_

⚙️ Configuração Adicional

Se necessário, você pode personalizar o comportamento da função generate_report_pytest:

  • test_results: Resultados dos testes no formato <nome do teste> - <status>, separados por |.
  • output_path: Caminho para salvar o relatório Markdown (por padrão, report.md será criado no diretório atual).

🧪 Testes

Para rodar os testes do projeto:

pytest

Certifique-se de estar no ambiente virtual configurado e que as dependências de desenvolvimento estejam instaladas.

📝 Licença

Este projeto está licenciado sob os termos da licença MIT. Veja o arquivo LICENSE para mais detalhes.

📬 Contribuições

Contribuições são bem-vindas! Sinta-se à vontade para abrir issues ou enviar pull requests no repositório do projeto.

📚 Recursos


Feito com ❤️ por Hedris Pereira

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytestreport_md-0.1.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytestreport_md-0.1.4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file pytestreport_md-0.1.4.tar.gz.

File metadata

  • Download URL: pytestreport_md-0.1.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.5

File hashes

Hashes for pytestreport_md-0.1.4.tar.gz
Algorithm Hash digest
SHA256 12f150cb2fcb13d33c41cec5e6afb6ee09f894caa9355bdc78cc4a5ad6029f59
MD5 638080989e906422cbad46201c41868e
BLAKE2b-256 9bc869eb0252a68d1607a28ddba126142961f79cc40cc2ad457525ca2c72155c

See more details on using hashes here.

File details

Details for the file pytestreport_md-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pytestreport_md-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b2d241740de4f0aad1539e779f39f76b4fac4f7f0bfd259269c162103a077bb7
MD5 a68df5035cfa0598d062e3375ef9f80e
BLAKE2b-256 aa9f5e39be96db65f11e1af46601a60edad6921fc9384dbcff82a21a6f12f619

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page