Provide API to retrieve test case durations from a pipeline
Problem to solve
As projects grow it can be hard to identify long running tests that slow down build times. (see for example https://gitlab.com/gitlab-org/gitlab-ce/issues/44174, https://gitlab.com/gitlab-org/gitlab-ce/issues/60710). Developers need a way to get data about test runs over time so that they can find and optimize long running tests to keep pipelines running quickly.
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Devon (DevOps Engineer)
- Dana (Data Analyst)
Many testing tools support generating a report with the duration of each test case.
For example running
bin/rspec --format RspecJunitFormatter --out rspec.xml spec/controllers/users_controller_spec.rb
outputs rspec.xml which has a
time attribute for every
As a next iteration, we can build a UI to display the raw values and then on top of that build charts of how tests have developed over time. This gives better insight on how individual changes have influenced the test suite as a whole.
Permissions and Security
Everybody who can access pipeline artifacts should also be able to use this feature.