Skip to content

Conversation

@AriPerkkio
Copy link
Member

@AriPerkkio AriPerkkio commented Apr 23, 2025

Description

Adds total test run times of each blob in test report of --merge-reports run. The Duration is sum of all blobs. Below it we show Per blob durations.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@AriPerkkio AriPerkkio force-pushed the fix/merge-reports-execution-times branch 3 times, most recently from 6ba3c89 to b996dbf Compare April 24, 2025 12:22
@netlify
Copy link

netlify bot commented Apr 24, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c2044d7
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/681780b3124da8000826fe5f
😎 Deploy Preview https://deploy-preview-7877--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@AriPerkkio AriPerkkio force-pushed the fix/merge-reports-execution-times branch from b996dbf to 67ef233 Compare April 24, 2025 12:38
@AriPerkkio AriPerkkio marked this pull request as ready for review April 24, 2025 12:53
@AriPerkkio AriPerkkio force-pushed the fix/merge-reports-execution-times branch 2 times, most recently from 4f540be to d02dca4 Compare April 29, 2025 06:14
Copy link
Member

@sheremet-va sheremet-va left a comment

Choose a reason for hiding this comment

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

Generally, I dislike executionTimes?: number[] as a public API.

What are these numbers? Why are the optional? Do we just keep adding new arguments to hooks? I think this needs to be standardized somehow

Maybe have something like a SubTestRun? Or ShardTestRun

@AriPerkkio
Copy link
Member Author

Do you have any suggestions what would be better way to pass data from blob reporter's readBlob to other reporters? Should we instead store it in ctx or ctx.state?

@sheremet-va
Copy link
Member

Do you have any suggestions what would be better way to pass data from blob reporter's readBlob to other reporters? Should we instead store it in ctx or ctx.state?

Storing it in ctx.state seems like an interesting idea actually 🤔 Something like ctx.state.blobs?

@AriPerkkio AriPerkkio force-pushed the fix/merge-reports-execution-times branch from d02dca4 to c2044d7 Compare May 4, 2025 14:58
@AriPerkkio
Copy link
Member Author

AriPerkkio commented May 4, 2025

Storing blobs in ctx.state.blobs now. Base reporter is accessing executionTimes from state instead of reporter hooks.

@sheremet-va sheremet-va merged commit d613b81 into vitest-dev:main May 5, 2025
11 of 13 checks passed
@AriPerkkio AriPerkkio deleted the fix/merge-reports-execution-times branch May 5, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Total test duration is wrong in --merge-reports

2 participants