diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2019-05-13 14:51:43 +1000 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2019-06-04 14:28:28 +1000 |
commit | dfab3457ab14a3ef3e5a66dbffbf115d52c78153 (patch) | |
tree | cdfed46576cd86ce57a166bd780aa8289751988d | |
parent | f4c32540d2234c84ea618979f2dfd1dc23cd5643 (diff) | |
download | gitlab-ce-qa-review-knapsack-collect-data.tar.gz |
Generate knapsack report for review-qa-allqa-review-knapsack-collect-data
Add knapsack qa report and use it to run tests in parallel
Use the RSpec runner with knapsack
The way the Knapsack runner uses exec to start rspec seems
incompatible with the way we expect it to work. Plus, it requires
specifying KNAPSACK_TEST_DIR.
Instead, we use knapsacks AllocatorBuilder to select the spec
files to run, and then start rspec as normal, via
RSpec::Core::Runner.run
This also means we can incorporate tags.
Let the job run automatically
Include KNAPSACK_TEST_FILE_PATTERN in vars
Check all defined knapsack env vars before requiring knapsack
-rw-r--r-- | .gitlab/ci/review.gitlab-ci.yml | 11 | ||||
-rw-r--r-- | qa/Gemfile | 1 | ||||
-rw-r--r-- | qa/Gemfile.lock | 3 | ||||
-rw-r--r-- | qa/qa/specs/features/api/3_create/repository/files_spec.rb | 2 |
4 files changed, 14 insertions, 3 deletions
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml index f5ed3e1ad9a..39664834cc0 100644 --- a/.gitlab/ci/review.gitlab-ci.yml +++ b/.gitlab/ci/review.gitlab-ci.yml @@ -143,6 +143,8 @@ review-stop: dependencies: - review-deploy artifacts: + reports: + junit: qa/**/junit_rspec.xml paths: - ./qa/gitlab-qa-run-* expire_in: 7 days @@ -164,12 +166,17 @@ review-qa-smoke: review-qa-all: <<: *review-qa-base allow_failure: true - when: manual parallel: 5 script: - export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/review-qa-all_master_report.json - export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb - - gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" + - gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format json --out tmp/reports/rspec.json --format documentation + +review-qa-all-1: + <<: *review-qa-base + allow_failure: true + script: + - gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format json --out tmp/reports/rspec.json --format documentation .review-performance-base: &review-performance-base <<: *review-qa-base diff --git a/qa/Gemfile b/qa/Gemfile index 12994b85322..3c8486c790b 100644 --- a/qa/Gemfile +++ b/qa/Gemfile @@ -5,6 +5,7 @@ gem 'capybara', '~> 2.16.1' gem 'capybara-screenshot', '~> 1.0.18' gem 'rake', '~> 12.3.0' gem 'rspec', '~> 3.7' +gem "rspec_junit_formatter", "~> 0.4.1" gem 'selenium-webdriver', '~> 3.12' gem 'airborne', '~> 0.2.13' gem 'nokogiri', '~> 1.10.3' diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock index 6b0635ed0e2..bdc9cbd713c 100644 --- a/qa/Gemfile.lock +++ b/qa/Gemfile.lock @@ -83,6 +83,8 @@ GEM rspec-retry (0.6.1) rspec-core (> 3.3) rspec-support (3.7.0) + rspec_junit_formatter (0.4.1) + rspec-core (>= 2, < 4, != 2.12.0) rubyzip (1.2.2) selenium-webdriver (3.141.0) childprocess (~> 0.5) @@ -110,6 +112,7 @@ DEPENDENCIES rake (~> 12.3.0) rspec (~> 3.7) rspec-retry (~> 0.6.1) + rspec_junit_formatter (~> 0.4.1) selenium-webdriver (~> 3.12) BUNDLED WITH diff --git a/qa/qa/specs/features/api/3_create/repository/files_spec.rb b/qa/qa/specs/features/api/3_create/repository/files_spec.rb index f6f020da472..2a4f76f5d86 100644 --- a/qa/qa/specs/features/api/3_create/repository/files_spec.rb +++ b/qa/qa/specs/features/api/3_create/repository/files_spec.rb @@ -3,7 +3,7 @@ require 'securerandom' module QA - describe 'API basics' do + describe 'API basics', :quarantine do before(:context) do @api_client = Runtime::API::Client.new(:gitlab) end |