Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Make reportSlowTests operate on tests, not test files #37778

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

Open
Skn0tt wants to merge 2 commits into microsoft:main
base: main
Choose a base branch
Loading
from Skn0tt:reproduce-report-slow-tests-fullparallel-bug

Conversation

Copy link
Member

@Skn0tt Skn0tt commented Oct 9, 2025

Closes #37724.
The current implementation of reportSlowTests, contrary to what the name implies, operates on test files and is from a time when fullyParallel wasn't yet a thing. Today, it does't really work when multiple workers and fullyParallel are used, which makes it useless for pretty much anybody.

To bring the feature in line with its name, this PR replaces the implementation so that it operates on tests. This is technically a breaking change, but it's OK to break broken things.

@Skn0tt Skn0tt self-assigned this Oct 9, 2025
@Skn0tt Skn0tt changed the title (削除) Reproduce report slow tests fullparallel bug (削除ここまで) (追記) feat: Make reportSlowTests operate on tests, not test files (追記ここまで) Oct 9, 2025
@Skn0tt Skn0tt force-pushed the reproduce-report-slow-tests-fullparallel-bug branch from e8277bc to 75cf298 Compare October 9, 2025 11:43
@Skn0tt Skn0tt marked this pull request as ready for review October 9, 2025 11:59

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Oct 9, 2025

Test results for "tests 1"

1 failed
❌ [playwright-test] › reporter-html.spec.ts:724 › created › should warn user when viewing via file:// protocol @macos-latest-node18-2

4 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-page] › page/page-event-request.spec.ts:182 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node18`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:117 › should collapse repeated console messages for test `@ubuntu-latest-node24-1`

46919 passed, 816 skipped


Merge workflow run.

@Skn0tt Skn0tt requested a review from dgozman October 13, 2025 14:15
entry.duration += result.duration;
entry.workers.add(result.workerIndex);
this.fileDurations.set(fileAndProject, entry);
const hasSlowAnnotation = test.annotations.some(a => a.type === 'slow');
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure this check is a good thing. To be entirely honest, I'm not even sure what the purpose of the feature is. Do you have a workflow in mind? Perhaps this should be better as a "sort by duration" feature?

Skn0tt reacted with thumbs up emoji
const hasSlowAnnotation = test.annotations.some(a => a.type === 'slow');
if (!hasSlowAnnotation) {
const testTitle = formatTestTitle(this.screen, this.config, test);
this.testDurations.set(testTitle, result.duration);
Copy link
Contributor

Choose a reason for hiding this comment

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

This one overrides on each retry. I think we should think about the right semantics when retries are present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dgozman dgozman dgozman left review comments

At least 1 approving review is required to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: reportSlowTests setting doesn't have effect

2 participants

AltStyle によって変換されたページ (->オリジナル) /