Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Support nested suites #19

Closed
Bolodya1997 opened this issue Jan 21, 2021 · 1 comment
Closed

Feature request: Support nested suites #19

Bolodya1997 opened this issue Jan 21, 2021 · 1 comment
Assignees
Labels

Comments

@Bolodya1997
Copy link
Contributor

Issue

Junit 5 supports nested tests so it possibly can result in nested <testsuite> tags in xml output:

<testsuites>
    <testsuite tests="4" failures="0" time="150.0" name="All tests">
        <testsuite tests="2" failures="0" time="30.0" name="TestA">
            <properties></properties>
            <testcase classname="" name="A" time="10.0" cluster_instance="packet-1">
                <failure message="failure"></failure>
            </testcase>
            <testcase classname="" name="B" time="20.0" cluster_instance="packet-1"></testcase>
        </testsuite>
        <testsuite tests="2" failures="1" time="70.0" name="TestB">
            <properties></properties>
            <testcase classname="" name="A" time="30.0" cluster_instance="packet-1"></testcase>
            <testcase classname="" name="B" time="40.0" cluster_instance="packet-1">
                <failure message="failure"></failure>
            </testcase>
        </testsuite>
        <testcase classname="" name="A" time="50.0" cluster_instance="packet-1">
            <failure message="failure"></failure>
        </testcase>
    </testsuite>
</testsuites>

Currently action-junit-report doesn't support nested suites and looks up only for first level depth <testcase> tags in the root test suites.

Solution

  1. Add recursive parsing for the nested test suites.
  2. Add suite_regex parameter, so nested test cases would be reported not as A, B, but as TestA/A, TestA/B.
This was referenced Jan 21, 2021
@mikepenz mikepenz self-assigned this Jan 21, 2021
@mikepenz
Copy link
Owner

Thank you so much for this new feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants