Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cf8ba527
Commit
cf8ba527
authored
Sep 27, 2017
by
Rémy Coutable
Committed by
Achilleas Pipinellis
Sep 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CI parallelization description and move section about EE-specific tests to its correct place
parent
8585707f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
doc/development/testing.md
doc/development/testing.md
+14
-14
No files found.
doc/development/testing.md
View file @
cf8ba527
...
...
@@ -95,10 +95,6 @@ possible).
[
Poltergeist
]:
https://github.com/teamcapybara/capybara#poltergeist
[
RackTest
]:
https://github.com/teamcapybara/capybara#racktest
### EE-specific tests
EE-specific tests follows the same organization, but under the
`spec/ee`
folder.
#### Best practices
-
Create only the necessary records in the database
...
...
@@ -154,6 +150,10 @@ always in-sync with the codebase.
[
GitLab QA
]:
https://gitlab.com/gitlab-org/gitlab-qa
[
part of GitLab Rails
]:
https://gitlab.com/gitlab-org/gitlab-ce/tree/master/qa
### EE-specific tests
EE-specific tests follows the same organization, but under the
`spec/ee`
folder.
## How to test at the correct level?
As many things in life, deciding what to test at each level of testing is a
...
...
@@ -497,24 +497,24 @@ Here are some things to keep in mind regarding test performance:
Our current CI parallelization setup is as follows:
1.
The
`
knapsack`
job in the prepare stage that is supposed to ensure we have a
`knapsack/${CI_PROJECT_NAME}/rspec_report-master.json`
file:
1.
The
`
retrieve-tests-metadata`
job in the
`prepare`
stage ensures that we have
a
`knapsack/${CI_PROJECT_NAME}/rspec_report-master.json`
file:
-
The
`knapsack/${CI_PROJECT_NAME}/rspec_report-master.json`
file is fetched
from S3, if it's not here we initialize the file with
`{}`
.
1.
Each
`rspec
x y`
job are run with
`knapsack rspec`
and should have an evenly
distributed share of tests:
1.
Each
`rspec
-pg x y`
/
`rspec-mysql x y`
job is run with
`knapsack rspec`
and
should have an evenly
distributed share of tests:
-
It works because the jobs have access to the
`knapsack/${CI_PROJECT_NAME}/rspec_report-master.json`
since the "artifacts
from all previous stages are passed by default". [^1]
-
t
he jobs set their own report path to
-
T
he jobs set their own report path to
`KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${JOB_NAME[0]}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json`
.
-
i
f knapsack is doing its job, test files that are run should be listed under
-
I
f knapsack is doing its job, test files that are run should be listed under
`Report specs`
, not under
`Leftover specs`
.
1.
The
`update-
knapsack
`
job takes all the
1.
The
`update-
tests-metadata
`
job takes all the
`knapsack/${CI_PROJECT_NAME}/${JOB_NAME[0]}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json`
files from the
`rspec
x y`
jobs and merge them all together into a single
`knapsack/${CI_PROJECT_NAME}/rspec_report-master.json`
file that is then
uploaded to S3.
files from the
`rspec
-pg x y`
/
`rspec-mysql x y`
jobs and merge them all together
into a single
`knapsack/${CI_PROJECT_NAME}/rspec_report-master.json`
file that
is then
uploaded to S3.
After that, the next pipeline will use the up-to-date
`knapsack/${CI_PROJECT_NAME}/rspec_report-master.json`
file. The same strategy
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment