Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks
Overall
score
94%
Build a simple test result tracking system that programmatically creates and manages test execution data.
Implement a test result tracker that can:
Your implementation should support:
@generates
class TestResultTracker:
"""
A tracker for managing test execution lifecycle and results.
"""
def __init__(self):
"""Initialize the tracker with lifecycle management."""
pass
def create_test(self, name: str, uuid: str):
"""
Create and schedule a new test case.
Args:
name: The name of the test
uuid: Unique identifier for the test
"""
pass
def add_step(self, name: str, uuid: str, parent_uuid: str = None):
"""
Add a test step. If parent_uuid is provided, creates a nested step.
Args:
name: The name of the step
uuid: Unique identifier for the step
parent_uuid: UUID of parent step for nesting (optional)
"""
pass
def add_before_fixture(self, name: str, uuid: str, parent_uuid: str):
"""
Add a setup fixture to the test.
Args:
name: The name of the fixture
uuid: Unique identifier for the fixture
parent_uuid: UUID of the parent test
"""
pass
def add_after_fixture(self, name: str, uuid: str, parent_uuid: str):
"""
Add a teardown fixture to the test.
Args:
name: The name of the fixture
uuid: Unique identifier for the fixture
parent_uuid: UUID of the parent test
"""
pass
def set_test_status(self, uuid: str, status: str):
"""
Set the status of a test.
Args:
uuid: The test UUID
status: The status ("PASSED" or "FAILED")
"""
pass
def write_result(self, uuid: str):
"""
Finalize and write the test result.
Args:
uuid: The test UUID to write
"""
passProvides test lifecycle management and reporting capabilities.
Install with Tessl CLI
npx tessl i tessl/pypi-allure-python-commonsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10