CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-allure-pytest

Allure pytest integration that generates comprehensive test reports with rich metadata and visual test execution tracking

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

command-line.mddocs/

Command Line Interface

Command-line options for controlling Allure reporting behavior, output configuration, and basic test execution settings.

Capabilities

Report Output Configuration

Configure where and how Allure test results are generated, including directory management and output cleanup.

--alluredir DIR
    """
    Generate Allure report in the specified directory.
    
    Parameters:
    - DIR: Path to directory for Allure test results (may not exist)
    
    Usage:
    pytest --alluredir=./allure-results tests/
    """

--clean-alluredir
    """
    Clean alluredir folder if it exists before generating new results.
    
    Usage:
    pytest --alluredir=./results --clean-alluredir tests/
    """

Capture Control

Control what test output and logging information is attached to Allure reports.

--allure-no-capture
    """
    Do not attach pytest captured logging/stdout/stderr to report.
    
    By default, the plugin attaches:
    - pytest captured stdout
    - pytest captured stderr  
    - pytest captured logging
    
    Usage:
    pytest --alluredir=./results --allure-no-capture tests/
    """

Test Plan Integration

Control test execution based on Allure test plans and inversion logic.

--inversion
    """
    Run tests NOT in testplan (inverse selection).
    
    When a testplan is provided, normally only tests in the plan are executed.
    This option runs all tests EXCEPT those in the testplan.
    
    Usage:
    pytest --alluredir=./results --inversion tests/
    """

Link Pattern Configuration

Configure URL patterns for different link types to enable short link references in tests.

--allure-link-pattern LINK_TYPE:LINK_PATTERN
    """
    Define URL pattern for link type to enable short links in tests.
    
    Parameters:
    - LINK_TYPE: Type of link (e.g., 'issue', 'tms', 'test_case')
    - LINK_PATTERN: Python format string with {} placeholder for link value
    
    Usage:
    pytest --allure-link-pattern issue:https://jira.company.com/browse/{} tests/
    
    Then in tests:
    @allure.link("PROJ-123", link_type="issue")  # Expands to full URL
    """

Usage Examples

Basic Report Generation

# Generate Allure results in specific directory
pytest --alluredir=./allure-results tests/

# Clean directory before generating results  
pytest --alluredir=./results --clean-alluredir tests/

# Generate results without captured output
pytest --alluredir=./results --allure-no-capture tests/

Link Pattern Setup

# Configure multiple link patterns
pytest \
  --allure-link-pattern issue:https://jira.company.com/browse/{} \
  --allure-link-pattern tms:https://testmanagement.company.com/test/{} \
  --alluredir=./results tests/

Test Plan Integration

# Run only tests in test plan
ALLURE_TESTPLAN_FILE=testplan.json pytest --alluredir=./results tests/

# Run all tests EXCEPT those in test plan  
ALLURE_TESTPLAN_FILE=testplan.json pytest --alluredir=./results --inversion tests/

Install with Tessl CLI

npx tessl i tessl/pypi-allure-pytest

docs

command-line.md

index.md

steps-attachments.md

test-filtering.md

test-metadata.md

tile.json