CI Targeted Espresso tests

35 Views Asked by At

Is there a way that we can automatically and selectively run only relevant test cases per PR?

My company has Espresso test integrated in CI/CD pipeline so that each PR needs to go through espresso tests before they are merged. However, the espresso test takes hours to complete, and I think running full test for each PR is too much.

My first thought was to recursively 'grep' references of changed objects to figure out which test cases are relevant, but I am wondering if there is a better way.

1

There are 1 best solutions below

0
Mesut GUNES On BEST ANSWER

UI tests are slow and depending many parts so keeping less test on the UI should be one of the aim. I would suggest to

  • Cover more tests on the lower level of the system and keep less test for the UI
  • If you have a modulurize architecture then you can run the test for only the related moduls
  • You can set priority and run on the high priority tests for PR and run the whole test on the main branch nightly