Test Name:pytest - PO - single test, core output structure
Feature:pytest Analysis
User Role:Product Owner
Traceability:@SHIFT-17
Description:Verifies that a single pytest test file produces valid, complete documentation output for a Product Owner.
This Test Verifies:
Verification Step
What It Checks
Documentation appears in the output panel
The system generates visible output after processing a single test file
JSON output has no unresolved values
All fields in the downloaded output are fully populated with no placeholders or missing data
JSON has 1 or more tests
At least one test entry is produced from the uploaded file
Every test has a non-empty test_name
Each documented test is identifiable by a name
Test Name:pytest - PO - parametrize expands one test per row
Feature:pytest Analysis
User Role:Product Owner
Traceability:@SHIFT-19
Description:Verifies that a data-driven pytest file with multiple parameter sets is expanded into a separate test entry for each row when documented for a Product Owner.
This Test Verifies:
Verification Step
What It Checks
Documentation appears in the output panel
The system generates visible output after processing a data-driven test file
JSON output has no unresolved values
All fields in the downloaded output are fully populated with no placeholders or missing data
JSON has 3 or more tests
Each parameter set results in its own test entry, confirming expansion behavior
Every test has a non-empty test_name
Each expanded test entry is identifiable by a name
Test Name:pytest - QAM - single test, coverage matrix populated
Feature:pytest Analysis
User Role:QA Manager
Traceability:@SHIFT-18
Description:Verifies that a single pytest test file produces documentation including a populated coverage matrix when viewed by a QA Manager.
This Test Verifies:
Verification Step
What It Checks
Documentation appears in the output panel
The system generates visible output after processing a single test file
JSON output has no unresolved values
All fields in the downloaded output are fully populated with no placeholders or missing data
JSON has 1 or more tests
At least one test entry is produced from the uploaded file
Every test has a non-empty test_name
Each documented test is identifiable by a name
First test has a non-empty test_coverage_matrix array
The QA Manager view includes a coverage matrix with at least one entry for the first test
Test Name:pytest - QAM - parametrize collapses
Feature:pytest Analysis
User Role:QA Manager
Traceability:@SHIFT-20
Description:Verifies that a data-driven pytest file is collapsed into a single test entry for a QA Manager, with the coverage matrix reflecting each parameter row using the correct schema.
This Test Verifies:
Verification Step
What It Checks
Documentation appears in the output panel
The system generates visible output after processing a data-driven test file
JSON output has no unresolved values
All fields in the downloaded output are fully populated with no placeholders or missing data
JSON has exactly 1 test
All parameter sets are collapsed into a single test entry rather than expanded
Every test has a non-empty test_name
The collapsed test entry is identifiable by a name
Coverage matrix row count matches the examples
The number of rows in the coverage matrix equals the number of data-driven parameter sets
Coverage matrix rows use the correct schema for generic
Each coverage matrix row conforms to the expected structure for generic test documentation
Test Name:pytest - PO - single test, core output structure
Feature:pytest Analysis
Traceability:@SHIFT-17
Journey:A Product Owner uploads a single pytest fixture and verifies that the analysis produces valid, resolved JSON output containing at least one named test.
Scenario
Given Context
When Action
Then Assertion
Gherkin Type
pytest - PO - single test, core output structure
User is on the Analyze page
Selects format 'pytest' and role 'Product Owner', uploads 'pytest_single_sample.py', and clicks 'Document test cases'
Output panel shows documentation; downloaded JSON is resolved, contains 1 or more tests, each with a non-empty test_name
Positive
Test Name:pytest - PO - parametrize expands one test per row
Feature:pytest Analysis
Traceability:@SHIFT-19
Journey:A Product Owner uploads a data-driven pytest fixture and verifies that parametrize decoration causes the analyser to expand each parameter row into its own distinct test entry.
Scenario
Given Context
When Action
Then Assertion
Gherkin Type
pytest - PO - parametrize expands one test per row
User is on the Analyze page
Selects format 'pytest' and role 'Product Owner', uploads 'pytest_datadriven_sample.py', and clicks 'Document test cases'
Downloaded JSON is resolved, contains 3 or more tests, each with a non-empty test_name — confirming parametrize rows are expanded
Positive
Test Name:pytest - QAM - single test, coverage matrix populated
Feature:pytest Analysis
Traceability:@SHIFT-18
Journey:A QA Manager uploads a single pytest fixture and verifies that the analysis produces valid JSON output where the first test contains a populated coverage matrix.
Scenario
Given Context
When Action
Then Assertion
Gherkin Type
pytest - QAM - single test, coverage matrix populated
User is on the Analyze page
Selects format 'pytest' and role 'QA Manager', uploads 'pytest_single_sample.py', and clicks 'Document test cases'
Downloaded JSON is resolved, contains 1 or more tests each with a non-empty test_name, and the first test has a non-empty test_coverage_matrix array
Positive
Test Name:pytest - QAM - parametrize collapses
Feature:pytest Analysis
Traceability:@SHIFT-20
Journey:A QA Manager uploads a data-driven pytest fixture and verifies that parametrize decoration causes the analyser to collapse all rows into exactly one test entry whose coverage matrix rows match the number of examples and conform to the generic schema.
Scenario
Given Context
When Action
Then Assertion
Gherkin Type
pytest - QAM - parametrize collapses
User is on the Analyze page
Selects format 'pytest' and role 'QA Manager', uploads 'pytest_datadriven_sample.py', and clicks 'Document test cases'
Downloaded JSON is resolved, contains exactly 1 test with a non-empty test_name; coverage matrix row count matches the parametrize examples and rows conform to the generic schema