Generate test documentation from automated tests
Automated tests that describe product behavior in code can also become readable test cases in TestOps. TestOps creates and maintains automated test cases from uploaded results, so the documentation stays in sync with what the tests actually do.
Create test cases from results
Automated test cases are created or updated when results are uploaded to TestOps and the launch is closed.
Use the same ingestion path you use for reporting:
- Generate Allure-compatible test results in your test framework.
- Send the results from CI, an IDE plugin,
allurectl, or the TestOps UI. - Close the launch so TestOps can create missing automated test cases or update existing ones.
For the full creation behavior, see Test cases.
Enrich the generated documentation
Start with the data your tests already emit, then add only the metadata the team will use for search, ownership, structure, and review.
Good candidates are:
- stable test names;
- descriptions that help readers understand the case;
- tags, links, issues, members, layers, and custom fields;
- steps and attachments when they make failures easier to review.
For metadata types and ownership choices, see Tags, labels, layers, and custom fields.
Decide what code should maintain
For automated tests, TestOps can take metadata from two sources:
- from test result — automation keeps the field up to date on every upload;
- from test case — the field stays managed manually in TestOps and is not overwritten by uploads.
Keep fast-changing automation facts code-driven. Keep curated descriptions, expected results from former manual cases, or team-maintained metadata in TestOps when they should not be overwritten.
Configure this with Metadata update settings.
Link automation to test cases with Allure ID
Add the TestOps Allure ID to automated test code so new results update the same test case every time.
Generated identifiers can change when code structure changes, so using an explicit Allure ID prevents history and documentation from splitting into duplicates. See Test keys and Allure IDs for how the link works.
Continue from manual cases
If the test case already exists as a manual case, do not create a duplicate automated case. Add the existing Allure ID to the automated test code so the uploaded result updates the same test case.
Use How to automate a manual test for that handoff.
To start automation from an existing manual case, use Generating code for test case automation to create a code template with the selected test case metadata.
Review workflows and statuses
Generated automated test cases use the automated workflow configured for the project. Manual and automated cases can have different lifecycle statuses, and changing a workflow does not change the test case type.
See Workflow statuses for defaults, custom workflows, and status changes.