Run E2E tests in parallel via parallel_tests
What does this MR do?
Adds the --parallel
CLI option that instructs the QA framework to use the parallel_tests
gem to execute tests in multiple processes simultaneously on the same machine.
This is part of: &1276
Details
Tests need access to global state contained in Runtime::Scenario
so when --parallel
is invoked Runtime::Scenario
is serialized to an environment variable, which is passed to parallel_tests, and then deserialized in spec_helper
.
The tests also need access to environment variables passed to the framework (including via gitlab-qa
), so all the environment variables supported by the framework are also passed to parallel_tests. This was done by including the gitlab-qa
gem as a library so that the environment variables only need to be defined there once (accessed via Gitlab::QA::Runtime::Env::ENV_VARIABLES
)
This will allow us to run tests in parallel locally, or in package-and-qa
, and in combination with knapsack.
Related MRs
This MR depends on changes made to gitlab-qa gitlab-qa!250 (merged) (it must be merged and released before the tests in this MR will pass).
There's another MR to turn on the --parallel
option for review app tests: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29873
And there'll be more to turn it on for package-and-qa and nightly and staging tests:
- package-and-qa: gitlab-qa!255 (closed)
But before it gets turned on there's an MR to fix failures caused by running in parallel: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30113
Tasks
-
Add --parallel
to gitlab-qa: gitlab-qa!250 (merged) -
Release a new version of gitlab-qa: gitlab-qa!253 (merged)