Skip to content

Tests: migrate test runner to jquery-test-runner #5604

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

Merged
merged 19 commits into from
Jan 14, 2025
Merged

Conversation

timmywil
Copy link
Member

@timmywil timmywil commented Dec 31, 2024

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.

Once we merge this to jquery, I'll make PRs for jquery-migrate and jquery-ui.

At some point, we can move jquery-test-runner over to the jquery org. moved

Checklist

Sorry, something went wrong.

@timmywil timmywil added the Tests label Dec 31, 2024
@timmywil timmywil requested a review from mgol December 31, 2024 16:22
Copy link
Member

@mgol mgol left a comment

Choose a reason for hiding this comment

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

Code-wise looks good but where is the runner code? https://www.npmjs.com/package/jquery-test-runner points to https://github.com/jquery/jquery-test-runner which is a 404 to me. I should be seeing all the repos in the org with my permissions.

@timmywil
Copy link
Member Author

timmywil commented Jan 2, 2025

@mgol
Copy link
Member

mgol commented Jan 2, 2025

@timmywil Can you move the repo and add me (mgol) and the OpenJSF user (openjsfoundation) as co-owners of the npm package before merging this PR?

Copy link
Member

@mgol mgol left a comment

Choose a reason for hiding this comment

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

Approving to unblock you but please remember about adding the owners to the runner package!

@timmywil timmywil merged commit 733e62d into jquery:main Jan 14, 2025
17 checks passed
@timmywil timmywil deleted the jtr branch January 14, 2025 03:36
@mgol mgol added this to the 4.0.0 milestone Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants