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

Display rollup stats for workspace on cargo test? #11945

Closed
thomasmost opened this issue Apr 8, 2023 · 4 comments
Closed

Display rollup stats for workspace on cargo test? #11945

thomasmost opened this issue Apr 8, 2023 · 4 comments
Labels
A-workspaces Area: workspaces C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-test S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

Comments

@thomasmost
Copy link

thomasmost commented Apr 8, 2023

Problem

Is there any way to get cargo test to output the total number of tests run, ignored, failed, etc (let alone coverage stats) for an entire workspace after running tests for each member on cargo test -- in a workspace? I have a fairly large workspace project with a dozen modules and it would be helpful to see these numbers aggregated

Proposed Solution

with the --rollup flag passed, cargo test would output workspace stats at the end of the test run

  > Rollup: 243 tests run: 241 succeeded — 2 failed — 7 ignored

In the future this flag could also generate coverage reports, but at present I think this would be a simple ergonomic improvement for workspaces

Notes

No response

@thomasmost thomasmost added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Apr 8, 2023
@weihanglo
Copy link
Member

Not exactly the same but #11532 also proposes to have a flag to output a summary for cargo commands. See #11542 for the discussion around that topic.

@weihanglo
Copy link
Member

Feel like this is also blocked on libtest's JSON output. Cargo needs a reliable way to collect such data. See #11875 (comment) for more. In the meantime, personally I'd recommend nextest, which has a handful of goodies for testing user experience.

@weihanglo weihanglo added the S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix label Apr 20, 2023
@thomasmost
Copy link
Author

Thank you! I'll check out nextest — I appreciate it!

@weihanglo
Copy link
Member

Realized today that this is a duplicate of #8414. I'll close this in favor of that. Thank you for the proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-workspaces Area: workspaces C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-test S-blocked-external Status: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix
Projects
None yet
Development

No branches or pull requests

2 participants