Skip to content

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

Merged
metcoder95 merged 5 commits into
nodejs:mainfrom
rossilor95:wpt-timeout-as-failure
Feb 6, 2024
Merged

test(wpt): mark timed out tests as 'failed'#2644
metcoder95 merged 5 commits into
nodejs:mainfrom
rossilor95:wpt-timeout-as-failure

Conversation

@rossilor95

@rossilor95 rossilor95 commented Jan 26, 2024

Copy link
Copy Markdown
Contributor

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 thread test/wpt/runner/runner.mjs Outdated
Comment on lines +233 to +234
this.#stats.testsFailed += 1
console.log(colors(`[${finishedFiles}/${total}] FAILED - ${test}`, 'red'))

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

Comment thread test/wpt/runner/runner.mjs Outdated
Comment thread test/wpt/runner/runner.mjs Outdated
@codecov-commenter

codecov-commenter commented Jan 30, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.28%. Comparing base (e39a632) to head (3957a58).
Report is 1143 commits behind head on main.

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@metcoder95 metcoder95 merged commit fa28c05 into nodejs:main Feb 6, 2024
@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