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
573f3506
Commit
573f3506
authored
Nov 16, 2020
by
Maxime Orefice
Committed by
Marcel Amirault
Nov 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add jest junit documentation
parent
b55994ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
doc/ci/unit_test_reports.md
doc/ci/unit_test_reports.md
+21
-0
No files found.
doc/ci/unit_test_reports.md
View file @
573f3506
...
...
@@ -244,6 +244,27 @@ Test:
-
./**/*test-result.xml
```
### JavaScript example
There are a few tools that can produce JUnit report format XML files in JavaScript.
#### Jest
The
[
jest-junit
](
https://github.com/jest-community/jest-junit
)
npm package can generate test reports for JavaScript applications.
In the following
`.gitlab-ci.yml`
example, the
`javascript`
job uses Jest to generate the test reports:
```
yaml
javascript
:
stage
:
test
script
:
-
'
jest
--ci
--reporters=default
--reporters=jest-junit'
artifacts
:
when
:
always
reports
:
junit
:
-
junit.xml
```
## Viewing Unit test reports on GitLab
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24792) in GitLab 12.5 behind a feature flag (`junit_pipeline_view`), disabled by default.
...
...
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