gitlab-qa 7.13.0 → 7.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitlab/ci/rules.gitlab-ci.yml +170 -0
- data/.gitlab-ci.yml +282 -147
- data/docs/running_against_remote_grid.md +39 -10
- data/docs/what_tests_can_be_run.md +1 -1
- data/lib/gitlab/qa/component/staging_ref.rb +1 -1
- data/lib/gitlab/qa/report/gitlab_issue_client.rb +8 -1
- data/lib/gitlab/qa/report/report_as_issue.rb +3 -1
- data/lib/gitlab/qa/runtime/env.rb +2 -0
- data/lib/gitlab/qa/runtime/omnibus_configurations/license_mode.rb +1 -1
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +3 -2
@@ -8,20 +8,49 @@ I.e, if you have a Selenium server set up at http://localhost:4444 or if you hav
|
|
8
8
|
|
9
9
|
| Variable | Description | Default | Example(s) |
|
10
10
|
|---------------------------|----------------------------------------------------------------|----------|--------------------------------|
|
11
|
-
| QA_BROWSER | Browser to run against | "chrome" | "chrome" "firefox"
|
11
|
+
| QA_BROWSER | Browser to run against | "chrome" | "chrome" "firefox" "safari" |
|
12
12
|
| QA_REMOTE_GRID_PROTOCOL | Protocol to use | "http" | "http" "https" |
|
13
13
|
| QA_REMOTE_GRID | Remote grid to run tests against | | "localhost:3000" "provider:80" |
|
14
|
-
| QA_REMOTE_GRID_USERNAME | Username to specify in the remote grid. "USERNAME@provider:80" | |
|
14
|
+
| QA_REMOTE_GRID_USERNAME | Username to specify in the remote grid. "USERNAME@provider:80" | | "gitlab-sl" |
|
15
15
|
| QA_REMOTE_GRID_ACCESS_KEY | Key/Token paired with `QA_REMOTE_GRID_USERNAME` | | |
|
16
|
+
| QA_REMOTE_TUNNEL_ID | Name of the remote tunnel to use | "gitlab-sl_tunnel_id" | |
|
17
|
+
| QA_REMOTE_MOBILE_DEVICE_NAME | Name of mobile device to test against. `QA_BROWSER` must be set to `safari` for iOS devices and `chrome` for Android devices. | | "iPhone 12 Simulator" |
|
16
18
|
|
17
|
-
##
|
19
|
+
## Testing with Sauce Labs
|
18
20
|
|
19
|
-
|
21
|
+
Running directly against an environment like staging is not recommended because test logs expose credentials. Therefore, it is best practice and the default to use a tunnel.
|
20
22
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
To install a tunnel, follow these [instructions](https://docs.saucelabs.com/secure-connections/sauce-connect/installation).
|
24
|
+
|
25
|
+
To start the tunnel, copy the run command in **Sauce Labs > Tunnels** and run it in the terminal. You must be logged in to Sauce Labs. Use the credentials in 1Password to log in.
|
26
|
+
|
27
|
+
It is highly recommended to use `GITLAB_QA_ACCESS_TOKEN` to speed up tests and reduce flakiness.
|
28
|
+
|
29
|
+
|
30
|
+
### Run a test in a desktop browser
|
31
|
+
|
32
|
+
While tunnel is running, to test against a local instance in a desktop browser, run:
|
33
|
+
```shell
|
34
|
+
$ QA_BROWSER="safari" \
|
35
|
+
QA_REMOTE_GRID="ondemand.saucelabs.com:80" \
|
36
|
+
QA_REMOTE_GRID_USERNAME="gitlab-sl" \
|
37
|
+
QA_REMOTE_GRID_ACCESS_KEY="<access key found in Sauce Lab account>" \
|
38
|
+
GITLAB_QA_ACCESS_TOKEN="<token>" \
|
39
|
+
gitlab-qa Test::Instance::Any <CE|EE> http://<local_ip>:3000 -- -- <relative_spec_path>
|
27
40
|
```
|
41
|
+
|
42
|
+
### Run a test in a mobile device browser
|
43
|
+
|
44
|
+
`QA_REMOTE_MOBILE_DEVICE_NAME` can be any device name in the [supported browser devices](https://saucelabs.com/platform/supported-browsers-devices) in the Emulators/simulators list, and the latest versions of Android or iOS. You must set `QA_BROWSER` to `safari` for iOS devices and `chrome` for Android devices.```
|
45
|
+
|
46
|
+
```shell
|
47
|
+
$ QA_BROWSER="safari" \
|
48
|
+
QA_REMOTE_MOBILE_DEVICE_NAME="iPhone 12 Simulator" \
|
49
|
+
QA_REMOTE_GRID="ondemand.saucelabs.com:80" \
|
50
|
+
QA_REMOTE_GRID_USERNAME="gitlab-sl" \
|
51
|
+
QA_REMOTE_GRID_ACCESS_KEY="<found in Sauce Lab account>" \
|
52
|
+
GITLAB_QA_ACCESS_TOKEN="<token>" \
|
53
|
+
gitlab-qa Test::Instance::Any <CE|EE> http://<local_ip>:3000 -- -- <relative_spec_path>
|
54
|
+
```
|
55
|
+
|
56
|
+
Results can be watched in real time in Sauce Labs under AUTOMATED > Test Results
|
@@ -727,7 +727,7 @@ $ gitlab-qa Test::Instance::Staging
|
|
727
727
|
|
728
728
|
### `Test::Instance::StagingRef`
|
729
729
|
|
730
|
-
This scenario tests that the [`Staging Ref`](https://staging-ref.
|
730
|
+
This scenario tests that the [`Staging Ref`](https://staging-ref.gitlab.com)
|
731
731
|
works as expected by running tests against it.
|
732
732
|
|
733
733
|
To run tests against the GitLab instance, a GitLab QA (`gitlab/gitlab-qa`)
|
@@ -107,7 +107,14 @@ module Gitlab
|
|
107
107
|
retry
|
108
108
|
rescue StandardError => e
|
109
109
|
pipeline = QA::Runtime::Env.pipeline_from_project_name
|
110
|
-
channel =
|
110
|
+
channel = case pipeline
|
111
|
+
when "canary"
|
112
|
+
"qa-production"
|
113
|
+
when "staging-canary"
|
114
|
+
"qa-staging"
|
115
|
+
else
|
116
|
+
"qa-#{pipeline}"
|
117
|
+
end
|
111
118
|
error_msg = warn_exception(e)
|
112
119
|
|
113
120
|
return unless QA::Runtime::Env.ci_commit_ref_name == QA::Runtime::Env.default_branch
|
@@ -111,9 +111,11 @@ module Gitlab
|
|
111
111
|
'found:gitlab.com'
|
112
112
|
when 'canary', 'staging'
|
113
113
|
"found:#{pipeline}.gitlab.com"
|
114
|
+
when 'staging-canary'
|
115
|
+
"found:canary.staging.gitlab.com"
|
114
116
|
when 'preprod'
|
115
117
|
'found:pre.gitlab.com'
|
116
|
-
when 'staging-orchestrated', 'nightly', QA::Runtime::Env.default_branch, 'staging-ref'
|
118
|
+
when 'staging-orchestrated', 'nightly', QA::Runtime::Env.default_branch, 'staging-ref', 'release'
|
117
119
|
"found:#{pipeline}"
|
118
120
|
else
|
119
121
|
raise "No `found:*` label for the `#{pipeline}` pipeline!"
|
@@ -15,6 +15,8 @@ module Gitlab
|
|
15
15
|
'QA_REMOTE_GRID_USERNAME' => :remote_grid_username,
|
16
16
|
'QA_REMOTE_GRID_ACCESS_KEY' => :remote_grid_access_key,
|
17
17
|
'QA_REMOTE_GRID_PROTOCOL' => :remote_grid_protocol,
|
18
|
+
'QA_REMOTE_MOBILE_DEVICE_NAME' => :remote_mobile_device_name,
|
19
|
+
'QA_REMOTE_TUNNEL_ID' => :remote_tunnel_id,
|
18
20
|
'QA_BROWSER' => :browser,
|
19
21
|
'QA_ADDITIONAL_REPOSITORY_STORAGE' => :qa_additional_repository_storage,
|
20
22
|
'QA_PRAEFECT_REPOSITORY_STORAGE' => :qa_praefect_repository_storage,
|
@@ -7,7 +7,7 @@ module Gitlab
|
|
7
7
|
class LicenseMode < Default
|
8
8
|
def configuration
|
9
9
|
<<~OMNIBUS
|
10
|
-
gitlab_rails['env'] = { 'GITLAB_LICENSE_MODE' => 'test', 'CUSTOMER_PORTAL_URL' => 'https://customers.
|
10
|
+
gitlab_rails['env'] = { 'GITLAB_LICENSE_MODE' => 'test', 'CUSTOMER_PORTAL_URL' => 'https://customers.staging.gitlab.com' }
|
11
11
|
OMNIBUS
|
12
12
|
end
|
13
13
|
end
|
data/lib/gitlab/qa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-qa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab Quality
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|
@@ -190,6 +190,7 @@ files:
|
|
190
190
|
- ".dockerignore"
|
191
191
|
- ".gitignore"
|
192
192
|
- ".gitlab-ci.yml"
|
193
|
+
- ".gitlab/ci/rules.gitlab-ci.yml"
|
193
194
|
- ".gitlab/merge_request_templates/Release.md"
|
194
195
|
- ".rspec"
|
195
196
|
- ".rubocop.yml"
|