Skip to content

Compile time feature to support test IDs #822

@mitzo-source

Description

@mitzo-source

Problem statement:
Several major projects have test plan comprising unit tests identified by a ID (like JIRA ID). These IDs are important when generating test reports for complete traceability. Current test report only gives test name along with PASS or FAIL with message, which makes it difficult to report generation with test IDs.

Proposal for Unity:
Enable Unity to print test ID along with test name.

Allocate a field to store CurrentTestId along with CurrentTestName
Test runner should clear CurrentTestId post assigning CurrentTestName
Each test should set CurrentTestId from the test function with a unity macro.
UnityTestResultsBegin function to print the ':' and CurrentTestId after test name.

Proposal for overall report generation:
Add a configuration for base URL in report generation plugins
Various report generation plugins can parse this text report from unity and have a tag for test ID, which concatenates base URL to give full link. Such links in HTML could be very helpful.

Planning to keep this entire test ID and report generation as a compile time feature which would be disabled by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions