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

Research Approach to Frontend Testing #2627

Closed
Tracked by #2499
JoblersTune opened this issue Apr 2, 2024 · 2 comments
Closed
Tracked by #2499

Research Approach to Frontend Testing #2627

JoblersTune opened this issue Apr 2, 2024 · 2 comments
Assignees

Comments

@JoblersTune
Copy link
Collaborator

Context

We want to add some rudimentary end-to-end tests to the admin UI. Need to figure out the best framework and best practices, especially when it comes to

  • Should we mock the backend
  • Can we leverage any of the integration tests setup
  • How best to handle Kratos and auth requirements

Todos

  • [ ]
@JoblersTune JoblersTune self-assigned this Apr 2, 2024
@JoblersTune JoblersTune mentioned this issue Apr 2, 2024
4 tasks
@JoblersTune
Copy link
Collaborator Author

JoblersTune commented Apr 24, 2024

After considering Selenium, Cypress, Playwright, Puppeteer, and TestCafe:
All are open source which is nice.
Selenium and TestCafe look a little more complicated to set up and perhaps harder to integrate with GitHub Actions.
While Cypress offers a free version the paid plan is very useful for accessing parallel testing, dashboard insights, and better support.

Playwright and Puppeteer seem like the strongest contenders. However I’m learning toward Playwright because:

  • Playwright offers native support for multiple browsers: Chromium, Firefox, and WebKit.
  • Playwright provides powerful features for network monitoring, such as intercepting network requests, responses.
  • Has built-in support for running tests in parallel.
  • Designed to handle flakiness in tests more effectively. It automatically waits for UI elements to be ready before performing actions, reducing the need for manual waits and sleep commands in test scripts. Making it a good choice for testing Rafiki Admin that relies on a lot of asynchronous communication.
  • It supports single-page applications (SPAs), shadow DOM, useful for testing React/Remix applications.
  • It seems to have good debugging tools including the ability to capture screenshots, generate a trace file, and logs.
  • DevOps, setting up Playwright in your workflow should be straightforward. Should integrate seamlessly with GitHub Actions.
  • Their docs seem useful

@JoblersTune
Copy link
Collaborator Author

Research phase is moving over to an implementation phase: see issue #2731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant