gitlab-qa 10.4.1 → 10.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -2
- data/docs/running_against_remote_grid.md +39 -2
- data/lib/gitlab/qa/component/gitaly_cluster.rb +0 -1
- data/lib/gitlab/qa/component/selenoid.rb +8 -3
- data/lib/gitlab/qa/runtime/env.rb +21 -1
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +0 -2
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +0 -2
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +0 -1
- data/lib/gitlab/qa/scenario/test/integration/praefect.rb +0 -2
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e892bc0c445fc7981ca1e1d511411818d92b577e041d0cf465813793a05462d
|
4
|
+
data.tar.gz: aeb7f3acdd748d80a47946fb26614f9fe5a9d1462935f2b19dae9269bd55afd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 582219201b2786ebc62d042a7a280c152d4337b941c840d6e56bef371ffab400421c7fe793ac29cddc063441300e0f7a18414eba15a3951e09c21c208530bbb6
|
7
|
+
data.tar.gz: fe82a271991a20a99bbf212241e98ba8821a960d23b72f789d386dd85bd895255c50eaa9a8356ece428c3d32f467b19e8b396c9a719c58039548ab4db33d8e4a
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -96,8 +96,7 @@ of tests.
|
|
96
96
|
## How do we use it
|
97
97
|
|
98
98
|
Currently, we execute the test suite against GitLab Docker images created by
|
99
|
-
Omnibus nightly via a
|
100
|
-
project.
|
99
|
+
Omnibus nightly via a [`gitlab-org/gitlab` nightly schedule pipeline](https://gitlab.com/gitlab-org/gitlab/-/pipeline_schedules).
|
101
100
|
|
102
101
|
We also execute the test suite nightly against our [staging environment](https://staging.gitlab.com)
|
103
102
|
via a pipeline in the [staging project](https://gitlab.com/gitlab-org/quality/staging).
|
@@ -8,19 +8,56 @@ 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" "
|
12
|
-
| QA_BROWSER_VERSION | Version of browser to run against | "
|
11
|
+
| QA_BROWSER | Browser to run against | "chrome" | "chrome" "edge" |
|
12
|
+
| QA_BROWSER_VERSION | Version of browser to run against | "111.0" | "latest" "111.0" "mobile-111.0"|
|
13
13
|
| QA_REMOTE_GRID_PROTOCOL | Protocol to use | "http" | "http" "https" |
|
14
14
|
| QA_REMOTE_GRID | Remote grid to run tests against | | "localhost:3000" "provider:80" "selenoid:4444" |
|
15
15
|
| QA_LAYOUT | Used with Selenoid. Tells test nav to expect collapsed menus. "phone" expects collapsed top and left nav bars, "tablet" expects collapsed left nav bar only. | | "phone", "tablet" |
|
16
16
|
| SELENOID_DIRECTORY | Used with Selenoid. Directory to save videos to | "<host_artifacts_dir>/selenoid" | |
|
17
17
|
| USE_SELENOID | Used with Selenoid. Sets up selenoid containers. | false | false, true |
|
18
18
|
| QA_RECORD_VIDEO | Used with Selenoid. Triggers video recording. | false | false, true |
|
19
|
+
| QA_BROWSER_IMAGE | Used with Selenoid. Sets the browser image to use for video recording. | "selenoid/chrome" | "selenoid/chrome", "registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab" |
|
20
|
+
| QA_VIDEO_RECORDER_IMAGE | Used with Selenoid. Sets the video recorder image to use for video recording. | "presidenten/selenoid-manual-video-recorder" | "presidenten/selenoid-manual-video-recorder" |
|
21
|
+
| QA_VIDEO_RECORDER_VERSION | Used with Selenoid. Sets the video recorder image version to use for video recording. | "latest" | "latest" |
|
22
|
+
| QA_RECORD_VIDEO | Used with Selenoid. Triggers video recording. | false | false, true |
|
19
23
|
| QA_REMOTE_GRID_USERNAME | Used with Sauce Labs. Username to specify in the remote grid. "USERNAME@provider:80" | | "gitlab-sl" |
|
20
24
|
| QA_REMOTE_GRID_ACCESS_KEY | Used with Sauce Labs. Key/Token paired with `QA_REMOTE_GRID_USERNAME` | | |
|
21
25
|
| QA_REMOTE_TUNNEL_ID | Used with Sauce Labs. Name of the remote tunnel to use | "gitlab-sl_tunnel_id" | |
|
22
26
|
| QA_REMOTE_MOBILE_DEVICE_NAME | Used with Sauce Labs. 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" |
|
23
27
|
|
28
|
+
## Testing with Selenoid
|
29
|
+
|
30
|
+
Running directly against an environment like staging is not recommended because test videos can expose credentials. Therefore, it is best practice to not run against live environments.
|
31
|
+
|
32
|
+
Available browsers are defined in [browsers.json](https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/fixtures/selenoid/browsers.json)
|
33
|
+
|
34
|
+
Failure videos are available as job artifacts in the selenoid directory.
|
35
|
+
|
36
|
+
### Add failure video recording to a pipeline for a non-live environment
|
37
|
+
|
38
|
+
Set these environment variables:
|
39
|
+
|
40
|
+
USE_SELENOID=true
|
41
|
+
QA_RECORD_VIDEO=true
|
42
|
+
QA_REMOTE_GRID="selenoid:4444"
|
43
|
+
|
44
|
+
#### To test with an Edge browser instead of Chrome
|
45
|
+
|
46
|
+
Include these environment variables:
|
47
|
+
|
48
|
+
QA_BROWSER="edge"
|
49
|
+
QA_BROWSER_IMAGE="selenoid/edge"
|
50
|
+
|
51
|
+
#### To test with a Chrome mobile device browser
|
52
|
+
|
53
|
+
Include these environment variables:
|
54
|
+
|
55
|
+
QA_LAYOUT="phone"
|
56
|
+
QA_BROWSER_IMAGE="registry.gitlab.com/gitlab-org/gitlab-qa/selenoid-chrome-gitlab"
|
57
|
+
QA_BROWSER_VERSION=mobile-111.0
|
58
|
+
|
59
|
+
For now we only have version 111.0 available for chrome mobile browser testing.
|
60
|
+
|
24
61
|
## Testing with Sauce Labs
|
25
62
|
|
26
63
|
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.
|
@@ -27,7 +27,12 @@ module Gitlab
|
|
27
27
|
|
28
28
|
def start
|
29
29
|
pull_images
|
30
|
-
docker.run(image: image, tag: tag, args:
|
30
|
+
docker.run(image: image, tag: tag, args:
|
31
|
+
['-video-recorder-image',
|
32
|
+
QA::Runtime::Env.video_recorder_image,
|
33
|
+
'-container-network',
|
34
|
+
network]
|
35
|
+
) do |command|
|
31
36
|
set_command_args(command)
|
32
37
|
set_volumes(command)
|
33
38
|
end
|
@@ -55,8 +60,8 @@ module Gitlab
|
|
55
60
|
end
|
56
61
|
|
57
62
|
def pull_images
|
58
|
-
docker.pull(image:
|
59
|
-
docker.pull(image:
|
63
|
+
docker.pull(image: QA::Runtime::Env.browser_image, tag: Runtime::Env.browser_version)
|
64
|
+
docker.pull(image: QA::Runtime::Env.video_recorder_image, tag: QA::Runtime::Env.video_recorder_version)
|
60
65
|
end
|
61
66
|
|
62
67
|
# Set custom run command arguments
|
@@ -25,6 +25,9 @@ module Gitlab
|
|
25
25
|
'QA_BROWSER_VERSION' => :browser_version,
|
26
26
|
'QA_RECORD_VIDEO' => :record_video,
|
27
27
|
'QA_LAYOUT' => :layout,
|
28
|
+
'QA_VIDEO_RECORDER_IMAGE' => :video_recorder_image,
|
29
|
+
'QA_VIDEO_RECORDER_VERSION' => :video_recorder_version,
|
30
|
+
'QA_BROWSER_IMAGE' => :browser_image,
|
28
31
|
'QA_ADDITIONAL_REPOSITORY_STORAGE' => :qa_additional_repository_storage,
|
29
32
|
'QA_PRAEFECT_REPOSITORY_STORAGE' => :qa_praefect_repository_storage,
|
30
33
|
'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
|
@@ -154,7 +157,8 @@ module Gitlab
|
|
154
157
|
'RELEASE_REGISTRY_USERNAME' => :release_registry_username,
|
155
158
|
'RELEASE_REGISTRY_PASSWORD' => :release_registry_password,
|
156
159
|
'SELENOID_DIRECTORY' => :selenoid_directory,
|
157
|
-
'USE_SELENOID' => :use_selenoid
|
160
|
+
'USE_SELENOID' => :use_selenoid,
|
161
|
+
'SCHEDULE_TYPE' => :schedule_type
|
158
162
|
}.freeze
|
159
163
|
|
160
164
|
ENV_VARIABLES.each do |env_name, method_name|
|
@@ -367,6 +371,22 @@ module Gitlab
|
|
367
371
|
env_var_value_if_defined('QA_LAYOUT')&.match?(/tablet|phone/i)
|
368
372
|
end
|
369
373
|
|
374
|
+
def video_recorder_image
|
375
|
+
env_var_value_if_defined('QA_VIDEO_RECORDER_IMAGE') || 'presidenten/selenoid-manual-video-recorder'
|
376
|
+
end
|
377
|
+
|
378
|
+
def video_recorder_version
|
379
|
+
env_var_value_if_defined('QA_VIDEO_RECORDER_VERSION') || 'latest'
|
380
|
+
end
|
381
|
+
|
382
|
+
def browser_image
|
383
|
+
env_var_value_if_defined('QA_BROWSER_IMAGE') || 'selenoid/chrome'
|
384
|
+
end
|
385
|
+
|
386
|
+
def browser_version
|
387
|
+
env_var_value_if_defined('QA_BROWSER_VERSION') || '111.0'
|
388
|
+
end
|
389
|
+
|
370
390
|
def qa_run_type
|
371
391
|
return env_var_value_if_defined('QA_RUN_TYPE') if env_var_value_valid?('QA_RUN_TYPE')
|
372
392
|
|
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: 10.
|
4
|
+
version: 10.5.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: 2023-05-
|
11
|
+
date: 2023-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|