or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/allure-python-commons@2.15.x
tile.json

tessl/pypi-allure-python-commons

tessl install tessl/pypi-allure-python-commons@2.15.0

Contains the API for end users as well as helper functions and classes to build Allure adapters for Python test frameworks

Agent Success

Agent success rate when using this tile

94%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.27x

Baseline

Agent success rate without this tile

74%

task.mdevals/scenario-9/

Test Report Utility

Build a utility module that assists with generating test execution reports by extracting and formatting test metadata.

Requirements

Report Entry Builder

Create a function create_report_entry(test_func, *args, **kwargs) that:

  • Generates a unique identifier for the test execution
  • Captures the current timestamp
  • Extracts parameters from the test function with its arguments
  • Returns a dictionary containing:
    • id: unique identifier string
    • timestamp: timestamp in milliseconds
    • function_name: name of the test function
    • parameters: extracted parameter information

Parameter Formatter

Create a function format_parameter_value(value) that:

  • Converts any Python object to a readable string representation
  • Handles complex objects (lists, dicts, custom classes)
  • Returns the formatted string

Test Cases

  • Given a simple function def login(username, password): pass called with args ("user1", "pass123"), create_report_entry returns a dict with all required keys, and the id field contains a valid UUID format @test

  • Given a function with keyword args def process(data, timeout=30): pass called as process({"key": "value"}, timeout=60), the returned parameters field contains both positional and keyword arguments @test

  • Given various Python objects (string "test", list [1, 2, 3], dict {"a": 1}, custom object), format_parameter_value returns readable string representations @test

  • Two consecutive calls to create_report_entry with the same function generate different unique IDs @test

Dependencies { .dependencies }

allure-python-commons { .dependency }

Provides test reporting utilities and helper functions.