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

Breaking unit tests in test cases based on module. #74

Open
madelaney opened this issue Dec 3, 2022 · 1 comment
Open

Breaking unit tests in test cases based on module. #74

madelaney opened this issue Dec 3, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@madelaney
Copy link

I was wondering if it would be possible to break the unit tests into testsuite based on the module the tests reside in.

Given the following example of a current file:

 <?xml version="1.0" encoding="utf-8"?>
<testsuites>
  <testsuite id="0" name="darwin" package="darwin" tests="5" errors="0" failures="0" hostname="localhost" timestamp="2022-12-03T21:23:25.627281Z" time="0">
    <testcase name="test_one" time="0" classname="cli::test" />
    <testcase name="test_four" time="0" classname="data::tests" />
    <testcase name="test_two" time="0" classname="data::tests" />
    <testcase name="test_three" time="0" classname="cli::tests" />
  </testsuite>
</testsuites>

The following would be created

 <?xml version="1.0" encoding="utf-8"?>
<testsuites>
  <testsuite id="0" name="cli" package="testsuite/cli" tests="5" errors="0" failures="0" hostname="localhost" timestamp="2022-12-03T21:23:25.627281Z" time="0">
    <testcase name="test_one" time="0" classname="cli::test" />
    <testcase name="test_three" time="0" classname="cli::tests" />
  </testsuite>
  <testsuite id="1" name="data" package="testsuite/data" tests="5" errors="0" failures="0" hostname="localhost" timestamp="2022-12-03T21:23:25.627281Z" time="0">
    <testcase name="test_four" time="0" classname="data::tests" />
    <testcase name="test_two" time="0" classname="data::tests" />
  </testsuite>
</testsuites>

This would help break things in some CI systems, like Jenkins, into more fragmented chunks; imho.

@johnterickson johnterickson added the enhancement New feature or request label Apr 2, 2023
@johnterickson
Copy link
Owner

@madelaney Can you share the JSON output that cargo test emits?

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

No branches or pull requests

2 participants