Skip to content

fix(reporter): log a more descriptive test URL in the reporter #5

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 2 commits into from
Feb 10, 2025

Conversation

timmywil
Copy link
Member

@timmywil timmywil commented Feb 9, 2025

  • Also update all submodules for tests

@timmywil timmywil requested a review from mgol February 9, 2025 17:06
};

const descriptiveUrl = buildTestUrl( urlOptions );
const url = buildTestUrl( {
Copy link
Member Author

@timmywil timmywil Feb 9, 2025

Choose a reason for hiding this comment

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

The moduleId replacement and reportId are the things left out of the descriptive URL.

Example for jQuery when running the basic module:

http://localhost:53730/test/?module=basic

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 changes look good, thanks!

I am not able to test it that easily; I'd have to commit a script that swaps jtr for a version from this PR, push to my fork to a branch, change GA settings to have it run on this branch and then look at GA, since this output only appears on BrowserStack runs. I'll skip that, I assume you tested it somehow.

@timmywil
Copy link
Member Author

timmywil commented Feb 10, 2025

The tests for this repo already do what you're describing. Have a look at the test run for jQuery Migrate in this repo's GA. The "Tests finished" log is the same regardless of success or failure, and the same reporter is used whether running via BrowserStack or when using Selenium. However, the tests in this repo don't isolate modules. I've already tried this, but for posterity, you can simulate exactly what jQuery core does (via the jtr-isolate.yml config used in the browserstack.yml GH workflow) with the --run option:

git submodule update --init
cd test/jquery
npm install
npm run test:unit -- --run module=basic

Which results in

image

@mgol
Copy link
Member

mgol commented Feb 10, 2025

OK, cool! That's enough for me, merge away. 🙂

@timmywil timmywil merged commit 4626b0f into main Feb 10, 2025
4 checks passed
@timmywil timmywil deleted the descriptive_url branch February 10, 2025 23:23
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.

2 participants