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
85e42353
Commit
85e42353
authored
Dec 22, 2021
by
Andrejs Cunskis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Add testcase link to exported test metrics
parent
dffaa093
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
qa/qa/support/formatters/test_stats_formatter.rb
qa/qa/support/formatters/test_stats_formatter.rb
+2
-1
qa/spec/support/formatters/test_stats_formatter_spec.rb
qa/spec/support/formatters/test_stats_formatter_spec.rb
+5
-4
No files found.
qa/qa/support/formatters/test_stats_formatter.rb
View file @
85e42353
...
...
@@ -84,7 +84,8 @@ module QA
retry_attempts:
example
.
metadata
[
:retry_attempts
]
||
0
,
job_url:
QA
::
Runtime
::
Env
.
ci_job_url
,
pipeline_url:
env
(
'CI_PIPELINE_URL'
),
pipeline_id:
env
(
'CI_PIPELINE_ID'
)
pipeline_id:
env
(
'CI_PIPELINE_ID'
),
testcase:
example
.
metadata
[
:testcase
]
}
}
rescue
StandardError
=>
e
...
...
qa/spec/support/formatters/test_stats_formatter_spec.rb
View file @
85e42353
...
...
@@ -56,13 +56,14 @@ describe QA::Support::Formatters::TestStatsFormatter do
retry_attempts:
0
,
job_url:
ci_job_url
,
pipeline_url:
ci_pipeline_url
,
pipeline_id:
ci_pipeline_id
pipeline_id:
ci_pipeline_id
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/1234'
}
}
end
def
run_spec
(
&
spec
)
spec
||=
->
{
it
(
'spec'
)
{}
}
spec
||=
->
{
it
(
'spec'
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/1234'
)
{}
}
describe_successfully
(
'stats export'
,
&
spec
).
tap
do
|
example_group
|
example_group
.
examples
.
each
{
|
ex
|
ex
.
metadata
[
:file_path
]
=
file_path
}
...
...
@@ -131,7 +132,7 @@ describe QA::Support::Formatters::TestStatsFormatter do
it
'exports data to influxdb with correct reliable tag'
do
run_spec
do
it
(
'spec'
,
:reliable
)
{}
it
(
'spec'
,
:reliable
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/1234'
)
{}
end
expect
(
influx_write_api
).
to
have_received
(
:write
).
with
(
data:
[
data
])
...
...
@@ -143,7 +144,7 @@ describe QA::Support::Formatters::TestStatsFormatter do
it
'exports data to influxdb with correct quarantine tag'
do
run_spec
do
it
(
'spec'
,
:quarantine
)
{}
it
(
'spec'
,
:quarantine
,
testcase:
'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/1234'
)
{}
end
expect
(
influx_write_api
).
to
have_received
(
:write
).
with
(
data:
[
data
])
...
...
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