Enable selective E2E tests on GitLab merge requests
## Summary This epic tracks the effort to improve the current implementation of [selective test execution](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/#selective-test-execution). ## Motivation Our test intelligence efforts have been evolving for a while now with the motivation to minimize the total executed tests/jobs per pipeline and therefore to reduce pipeline duration. It also impacts the estimated cost per pipeline. Selective execution current implementation has been running in `GDK` pipeline, in merge requests, for some time now. 1. For ~backend merge requests, we use code path mappings generated with the help of [coverband gem](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/coverband.rb) in scheduled master pipelines, to later be used in the merge request pipelines based on the diff files to select relevant E2E specs. 2. For ~frontend merge requests, [a POC was completed](https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/3309). Work is ongoing to enable it in CI. ## Goals * Improve code path mappings accuracy * Enable the same for `test-on-cng` * Enable for frontend MRs. ## DRI & Participants @hmuralidhar (primary) ## Plan <table> <tr> <th align="right">Phase</th> <th>Scope</th> <th>Goal</th> <th>Issue/Description</th> </tr> <tr> <td rowspan="2" align="right">POC</td> <td> `gdk` </td> <td> Research selective test selection strategies for E2E tests and evaluate current predictive test strategy used in lower level tests. **Result:** We decided to go with `coverband`. [More details here](https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/2393#note_1896927802 "Research selective test selection strategies for E2E tests and evaluate current predictive test strategy used in lower level tests") </td> <td> https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/2393 </td> </tr> <tr> <td></td> <td> Perform a PoC using `coverband`, determine dependencies and create implementation plan **Note:** The [POC MR](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149950 "Introduce coverband gem for mapping source code paths") was converted to MVP </td> <td> https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/2393 </td> </tr> <tr> <td rowspan="3" align="right">MVP</td> <td rowspan="3"> `gdk` </td> <td>Resolve dependencies/blockers if any for the implementation of MVP (E.g., training of ML model)</td> <td> https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/2395 </td> </tr> <tr> <td>MVP - Minimally scoped implementation that selectively runs E2E tests on the GDK pipeline in MRs</td> <td> https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/2396 </td> </tr> <tr> <td>Validate MVP impact</td> <td> https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/3154 </td> </tr> <tr> <td align="right">Scale</td> <td> Primary focus - `cng` as this runs in MRs, then `omnibus` </td> <td>Full scoped implementation and roll out of selective E2E test execution on all e2e pipelines</td> <td> https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/2397 </td> </tr> </table> ## <!-- STATUS NOTE START --> ## Status 2025-05-21 :tada: **achievements**: - Not much progress to report this week :issue-blocked: **blockers**: - My gdk blocking issue was resolved: https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues/2567 :arrow_forward: **next**: - Get https://gitlab.com/gitlab-org/gitlab/-/merge_requests/190500 merged _Copied from https://gitlab.com/groups/gitlab-org/quality/quality-engineering/-/epics/47#note_2516340251_ <!-- STATUS NOTE END -->
epic