Skip to content

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Sep 29, 2025

This adds a counter to each status line, so that one doesn't have to guess how many tests are remaining when the progress bar is not visible (think in CI):

image

It's been a long requested feature: #526. As a casual observer of test runs with 5000+ tests, this would be nice to have.

As is, it shows the counter unconditionally. In #526 @sunshowers suggested a more complicated heuristic (see #526 (comment)), which I can probably take a stab at next, if it still makes sense.

Copy link

codecov bot commented Sep 29, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.39%. Comparing base (e0336da) to head (b02c4d0).
⚠️ Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
nextest-runner/src/reporter/displayer/imp.rs 66.15% 22 Missing ⚠️
cargo-nextest/src/dispatch.rs 46.66% 8 Missing ⚠️
nextest-runner/src/helpers.rs 91.17% 3 Missing ⚠️
nextest-runner/src/reporter/displayer/progress.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@ ## main #2618 +/- ## ========================================== - Coverage 78.40% 78.39% -0.01%  ========================================== Files 107 107 Lines 24861 24966 +105 ========================================== + Hits 19492 19572 +80  - Misses 5369 5394 +25 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@sunshowers
Copy link
Member

Thanks. I think the more complex heuristic described in #526 (comment) is required here. I hope it's not too much of a burden.

Looking at the output, I'd also put the counter after the time taken.

@bobrik bobrik force-pushed the ivan/counter branch 2 times, most recently from f02ad4c to 16736ab Compare October 4, 2025 06:40
@sunshowers
Copy link
Member

Thanks, hoping to look at this soon (currently dealing with a hard deadline at my workplace)

};

// Print the time taken and the name of the test.
write!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments here:

  1. This looks too similar to stress test counters (try out --stress-count 5 or similar). I think we'll somehow need to make it clear that this isn't the stress test counter. Using parentheses might work:
 PASS [ 1.860s] [1/10] ( 40/300) integration-tests::integration test_relocated_run 
  1. I think the duration should stay where it is, and that the counter should be displayed after that as well as after the stress test counter.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, updated.

Copy link
Member

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I just released cargo-nextest 0.9.106 as an urgent bugfix, but I'll get this in for 0.9.107 within the next few days.

@sunshowers sunshowers merged commit fc8898b into nextest-rs:main Oct 13, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants