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

Add end2end tests #470

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

camillobruni
Copy link
Contributor

@camillobruni camillobruni commented Jan 7, 2025

  • Move unitests to run-unittests.mjs
  • Move common test driver and server setup to separate helper.mjs module
  • Add SpeedometerReady and SpeedometerDone events for easier testing
  • Add simple end2end tests

Copy link
Contributor

@flashdesignory flashdesignory left a comment

Choose a reason for hiding this comment

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

LGTM

resources/shared/benchmark.mjs Outdated Show resolved Hide resolved
@bgrins bgrins requested a review from julienw January 7, 2025 18:52
Copy link
Contributor

@julienw julienw left a comment

Choose a reason for hiding this comment

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

thanks, this looks good to me
I only have a few nits before landing :) see comments below
thanks for the new tests!

resources/main.mjs Outdated Show resolved Hide resolved
tests/server.mjs Outdated Show resolved Hide resolved
tests/server.mjs Outdated Show resolved Hide resolved
tests/run-end2end.mjs Show resolved Hide resolved
tests/run-end2end.mjs Outdated Show resolved Hide resolved
tests/run-unittests.mjs Outdated Show resolved Hide resolved
tests/run-end2end.mjs Outdated Show resolved Hide resolved
@camillobruni
Copy link
Contributor Author

Updated a few more things

  • updated required selenium version to 4.27 to fix local runs
  • installed better error handlers to catch runner errors in the end2end tests
  • moved benchmark-runner-tests.mjs to tests/unittests

@julienw
Copy link
Contributor

julienw commented Jan 15, 2025

Thanks, I like the fact we call a function better (didn't want to highlight it before :-) )

BTW I wonder if there's a way to run the tests headless too. How does it work on CI, is there a X server or something?

@camillobruni
Copy link
Contributor Author

headless would mostly depend on how the browser is set up.
I know how to run chrome headless e.g. it basically only needs the --headless command line flag, I think firefox has the same flag, no? (We can add that by default or make it customizable in an additional PR?)

Given that we currently only run on macOs it wont matter for the official testing (there is no real headless on macOS I think).

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.

3 participants