Skip to main content

Listener for generating requirement coverage reports for tests performed with Robot Framework

Project description

1. Robot Framework Requirement Coverage

2. Video

Aprenda a usar a biblioteca assistindo ao nosso vídeo no YouTube: // Learn how to use the library by watching our YouTube video:

Cobertura de Requisitos no Robot Framework

🔗 Clique na imagem para assistir ao vídeo.

🔗 Click on the image to watch the video.

3. English

3.1. Introduction

This listening library generates reports on requirements coverage for automated tests in the Robot Framework. The report includes:

3.2. Features

  • Identification of tested requirements through Tags
  • Generation of an HTML report coverage_report.html.
  • Addition of a summary in the console with analysis information
  • Support for light and dark mode (Dark Mode).
  • Visual progress bar indicating test coverage.
  • Test execution failure if the minimum coverage (if informed) is not reached. - Indication of tested and untested requirements and number of tests per requirement

3.3. Installation

With pip:

pip install robotframework-reqcov

With poetry:

poetry add robotframework-reqcov

3.4. How to Use

1 - Create a CSV file with the requirements, as shown in the example below:

Requirement,Description
REQ-001,Requirement 1
REQ-002,Requirement 2
REQ-003,Requirement 3
REQ-004,Requirement 4
REQ-005,Requirement 5

2 - Add tags to the tests to track the requirements

The id of each requirement reported in the csv file should be used as a TAG in the related tests.

  • Example 1:
*** Settings ***
Test Tags  REQ-001

*** Test Cases ***
Scenario: Test Req 1

    Pass Execution    Hello REQ-001
  • Example 2:
*** Test Cases ***
Scenario: Test Req 2
    [Tags]  REQ-002
    Pass Execution    Hello REQ-002 

3 - Run the tests and generate the coverage report

3.1 - Without minimum coverage

robot -d reports --listener RobotRequirementsCovarege:requirements.csv .

3.2 - With minimum coverage

robot -d reports --listener RobotRequirementsCovarege:requirements.csv:60 .  

By default, the report file coverage_report.html will be added in the same directory where the Robot Framework files will be added.

3.5. Compatibility

4. Portugês

4.1. Introdução

Esta biblioteca ouvinte, gera relatórios sobre cobertura de requisitos para testes automatizados no Robot Framework. O relatório inclui:

4.2. Recursos

  • Identificação dos requisitos testados por meio de Tags
  • Geração de um report HTML coverage_report.html.
  • Adição de um sumário no console com informações da análise
  • Suporte a modo claro e escuro (Dark Mode).
  • Barra de progresso visual indicando cobertura de testes.
  • Falha na execução dos testes caso a cobertura mínima (caso informado) não seja atingida.
  • Indicação dos requisitos testados, não testados e quantidade de testes por requisitos

4.3. Instalação

Com pip:

pip install robotframework-reqcov

Com poetry:

poetry add robotframework-reqcov 

4.4. Como Usar

1 - Crie um arquivo CSV com os requisitos, conforme o exemplo abaixo:

Requirement,Description
REQ-001,Requirement 1
REQ-002,Requirement 2
REQ-003,Requirement 3
REQ-004,Requirement 4
REQ-005,Requirement 5

2 - Adicionar tags nos testes para rastrear os requisitos

O id de cada requisito informado no arquivo csv, deverá ser utilizado como TAG nos testes relacionados.

  • Exemplo 1:
*** Settings ***
Test Tags  REQ-001

*** Test Cases ***
Scenario: Test Req 1

    Pass Execution    Hello REQ-001
  • Exemplo 2:
*** Test Cases ***
Scenario: Test Req 2
    [Tags]  REQ-002
    Pass Execution    Hello REQ-002 

3 - Executar os testes e gerar o relatório de cobertura

3.1 - Sem cobertura mínima

robot -d reports --listener RobotRequirementsCovarege:requirements.csv .

3.2 - Com cobertura mínima

robot -d reports --listener RobotRequirementsCovarege:requirements.csv:60 .

Por padrão, o arquivo de report coverage_report.html será adicionado no mesmo diretório onde os arquivos do Robot Framework serão adicionados.

4.5. Compatibilidade

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

robotframework_reqcov-0.1.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

robotframework_reqcov-0.1.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file robotframework_reqcov-0.1.3.tar.gz.

File metadata

  • Download URL: robotframework_reqcov-0.1.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.18 Linux/6.8.0-1021-azure

File hashes

Hashes for robotframework_reqcov-0.1.3.tar.gz
Algorithm Hash digest
SHA256 53893ea94c1743aa27d45bef0dce1710405e59dfbc30ac58d7081abe2ff8edc1
MD5 571fb0778a48d87851e892258deaeeaf
BLAKE2b-256 1f0c69b2a2a9408d3fefc8a8dab070ec034cec6991bbf0cae02740022ce7e6b2

See more details on using hashes here.

File details

Details for the file robotframework_reqcov-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_reqcov-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea4f73412c39e694d00c26f9316802731e8b40460c21cdaf048d1a6bca4b9e7d
MD5 4e60141cbf734a5942c19835d6a4933e
BLAKE2b-256 f3efee4bc81afe604e8aca9e1ba27c40636639cea38d575d2d225062bc74b4f8

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