src.asqi.output

Functions

parse_container_json_output(→ Dict[str, Any])

Extract JSON from container output with robust parsing.

create_test_execution_progress(→ rich.progress.Progress)

Create a progress bar for test execution tracking.

format_execution_summary(→ tuple[str, str])

Format execution summary with appropriate styling.

format_failure_summary(→ None)

Display summary of failed tests.

create_workflow_summary(→ Dict[str, Any])

Create standardized workflow summary dictionary.

Module Contents

src.asqi.output.parse_container_json_output(output: str) Dict[str, Any]

Extract JSON from container output with robust parsing.

Args:

output: Raw container output string

Returns:

Parsed JSON dictionary

Raises:

ValueError: If no valid JSON found in output or output is empty

src.asqi.output.create_test_execution_progress(console: rich.console.Console) rich.progress.Progress

Create a progress bar for test execution tracking.

Args:

test_count: Total number of tests to execute console: Rich console instance

Returns:

Configured Progress instance

src.asqi.output.format_execution_summary(total_tests: int, successful_tests: int, failed_tests: int, execution_time: float) tuple[str, str]

Format execution summary with appropriate styling.

Args:

total_tests: Total number of tests executed successful_tests: Number of successful tests failed_tests: Number of failed tests execution_time: Total execution time in seconds

Returns:

Tuple of (status_color, formatted_message)

src.asqi.output.format_failure_summary(failed_results: List, console: rich.console.Console, max_displayed: int = 3) None

Display summary of failed tests.

Args:

failed_results: List of failed test results console: Rich console instance max_displayed: Maximum number of failures to display

src.asqi.output.create_workflow_summary(suite_name: str, workflow_id: str, status: str, total_tests: int, successful_tests: int, failed_tests: int, execution_time: float, **kwargs) Dict[str, Any]

Create standardized workflow summary dictionary.

Args:

suite_name: Name of the test suite workflow_id: DBOS workflow ID status: Execution status total_tests: Total number of tests successful_tests: Number of successful tests failed_tests: Number of failed tests execution_time: Total execution time **kwargs: Additional summary fields

Returns:

Standardized summary dictionary