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

Speed up e2e execution in CI #3480

Closed
bafonins opened this issue Nov 16, 2020 · 3 comments · Fixed by #4264
Closed

Speed up e2e execution in CI #3480

bafonins opened this issue Nov 16, 2020 · 3 comments · Fixed by #4264
Assignees
Labels
tooling Development tooling ui/web This is related to a web interface

Comments

@bafonins
Copy link
Contributor

bafonins commented Nov 16, 2020

Summary

Currently, e2e tests already take ~16minutes to execute (~21mins with several end device e2e tests, see #3065). Taking into account that most of the console/oauth app is still lacking any tests. Later with more e2e tests CI pipeline will take even more time.

Why do we need this?

Make sure we do not end up with long CI execution because of e2e tests.

What is already there? What do you see now?

A bunch of e2e tests and e2e workflow that executes all tests on almost any PR.

What is missing? What do you want to see?

Reduced CI time for e2e tests execution.

How do you propose to implement this?

  • execute e2e tests in parallel
  • split e2e tests into groups and run them in separate jobs (e.g. run console, oauth and smoke tests separately)
  • Only run smoke tests on pull requests and execute all e2e tests on releases
  1. ✅ Cache or/and speed up js:build target Speed up frontend builds #2661
  2. ✅ Optimise cy.loginConsole to avoid going through the whole oauth flow to get the auth token. Fix flaky e2e tests #3978

How do you propose to test this?

CI

Can you do this yourself and submit a Pull Request?

yes

@bafonins bafonins added ui/web This is related to a web interface tooling Development tooling labels Nov 16, 2020
@bafonins bafonins added this to the November 2020 milestone Nov 16, 2020
@bafonins bafonins self-assigned this Nov 16, 2020
@bafonins bafonins added the in progress We're working on it label Nov 16, 2020
@htdvisser htdvisser modified the milestones: November 2020, December 2020 Dec 1, 2020
@kschiffer kschiffer mentioned this issue Dec 21, 2020
65 tasks
@htdvisser htdvisser modified the milestones: January 2021, February 2021 Feb 1, 2021
@bafonins bafonins removed the in progress We're working on it label Feb 9, 2021
@bafonins
Copy link
Contributor Author

Consider using an admin API key to perform api calls. See #3746

@htdvisser htdvisser modified the milestones: February 2021, March 2021 Mar 1, 2021
@johanstokking johanstokking modified the milestones: March 2021, Next Up Mar 1, 2021
@bafonins bafonins mentioned this issue Mar 26, 2021
5 tasks
@kschiffer
Copy link
Contributor

kschiffer commented Jun 4, 2021

I was able to bring the end-to-end tests execution time down to between <5mins (best case) and <10mins (worst case) by activating parallelization (to 4 machines) and by adding more caching to the workflow runs. An example run can be seen in my fork here:
https://github.com/kschiffer/lorawan-stack/actions/runs/906365351

In order to use parallelization in cypress, we need a paid account. However, it seems like there are cheaper plans for open source projects.

@johanstokking @htdvisser please share your thought about whether you think this is worth pursuing.

@htdvisser htdvisser removed this from the Next Up milestone Jun 8, 2021
@johanstokking
Copy link
Member

The paid account has now been setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Development tooling ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants