Skip to content

Tests: Migrate test runner to jquery-test-runner - #2325

Merged
mgol merged 12 commits into
jquery:mainfrom
timmywil:jtr
Jan 14, 2025
Merged

mgol merged 12 commits into
jquery:mainfrom
timmywil:jtr

Conversation

@timmywil

Copy link
Copy Markdown
Member

Summary

I've moved all the code from test/runner into a package called jquery-test-runner. The changes to this repo are fairly simple. It uses the binary included in that package to run tests in browsers using selenium and browserstack.

Some things to note:

  • I've tested jquery-test-runner with jquery, jquery-migrate, and jquery-ui and all their workflows have full green runs in my forks after migration.
  • The jtr (alias for jquery-test-runner) binary includes several commands. The default command is for test runs (jtr or jtr run). jtr also includes jtr serve, which has a -p (--port) option (rather than an env var). See npx jtr --help for all commands and options.
  • I've migrated yargs to commander in jquery-test-runner.
  • I based the beginning infra of jquery-test-runner on the jquery repo's test/runner folder, which means the recent changes to allow Edge runs in IE-mode have been kept, express is not used for the test server, etc. jquery-migrate and jquery-ui will now be able to take advantage of those changes.
  • jquery-test-runner can take a YAML config file, with support for all of the same options as the command line. I considered JSON and JS, but I liked how terse the YAML was. See jtr-isolate.yml for an example, which is used to create a separate run for each module in BrowserStack runs while still sharing browser instances.
  • Upgraded the Node version used for testing to 22.x from 20.x in all workflows.

Ref jquery/jquery#5604

@timmywil
timmywil requested a review from mgol January 14, 2025 03:44

@mgol mgol left a comment

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.

LGTM

@mgol mgol added this to the 1.14.2 milestone Jan 14, 2025
@mgol mgol changed the title Tests: migrate test runner to jquery-test-runner Tests: Migrate test runner to jquery-test-runner Jan 14, 2025
@mgol
mgol merged commit b685753 into jquery:main Jan 14, 2025
@timmywil
timmywil deleted the jtr branch October 15, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants