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

test(wpt): mark timed out tests as 'failed' #2644

Merged
merged 5 commits into from
Feb 6, 2024

Conversation

rossilor95
Copy link
Contributor

@rossilor95 rossilor95 commented Jan 26, 2024

This relates to...

#2627

Changes

The WPTRunner class inside runner.mjs has been refactored to provide a more informative test statistics.

Features

  • A distinction between Files and Tests is added for reporting purposes. A File can be marked as "Passed", "Failed" or "Skipped". Test statistics remains unchanged.
  • WPT logs formatting has been improved with this new information
  • Files that time out are marked as "Failed"
Example of File report
report_new
New log appearance
console_new
Log example for a timed out File
timeout_new

Status

Comment on lines 233 to 234
this.#stats.testsFailed += 1
console.log(colors(`[${finishedFiles}/${total}] FAILED - ${test}`, 'red'))
Copy link
Member

Choose a reason for hiding this comment

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

Tests can have expected failures, marking the entire file as failing isn't the correct behavior here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @KhafraDev and thank you for your review! Sorry, I hadn't considered this scenario. I'll try and fix that 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @KhafraDev, I changed the logic for marking a Test File as failed. Now, a Test File fails if one of its tests fails without being an expected failure. Let me know if it is acceptable or if further changes are needed.

Thank you in advance!

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2024

Codecov Report

Attention: 222 lines in your changes are missing coverage. Please review.

Comparison is base (e39a632) 85.54% compared to head (3957a58) 85.28%.
Report is 272 commits behind head on main.

Files Patch % Lines
lib/fetch/util.js 60.41% 57 Missing ⚠️
lib/fetch/index.js 69.36% 53 Missing ⚠️
lib/handler/RetryHandler.js 74.35% 30 Missing ⚠️
lib/cache/cache.js 12.12% 29 Missing ⚠️
lib/fetch/dataURL.js 79.31% 12 Missing ⚠️
lib/api/readable.js 83.92% 9 Missing ⚠️
lib/core/diagnostics.js 84.74% 9 Missing ⚠️
lib/eventsource/eventsource.js 96.09% 5 Missing ⚠️
lib/core/request.js 94.36% 4 Missing ⚠️
lib/client.js 95.83% 3 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2644      +/-   ##
==========================================
- Coverage   85.54%   85.28%   -0.27%     
==========================================
  Files          76       84       +8     
  Lines        6858     7584     +726     
==========================================
+ Hits         5867     6468     +601     
- Misses        991     1116     +125     

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

@metcoder95 metcoder95 merged commit fa28c05 into nodejs:main Feb 6, 2024
17 checks passed
@rossilor95 rossilor95 deleted the wpt-timeout-as-failure branch February 6, 2024 09:39
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.

4 participants