Skip to content

Add rake task to run RSpec on tests that failed in merge request

Albert requested to merge alberts-mr-pipeline-failures into master

What does this MR do?

Part of #325247 (closed)

Add new rake task to run all the failed RSpec tests in an MR locally:

bin/rake spec:merge_request_rspec_failure

There are a few caveats for this Rake task:

  • You need to be on the same branch on your machine as the source branch of the Merge Request.
  • The pipeline must have been completed.
  • You may need to wait for the test report to be parsed and retry again.

This Rake task depends on the unit test reports feature, which only gets parsed when it is requested for the first time.

Screenshots (strongly suggested)

Example:

  1. When the MR test report is not ready Screenshot_2021-04-06_at_4.46.25_PM

  2. When there is no rspec failure Screenshot_2021-04-06_at_4.47.15_PM

  3. When the MR has rspec failures, it runs rspec with the failed test files (simulated failures). Screenshot_2021-04-06_at_5.53.56_PM

Edited by Albert

Merge request reports

Loading