Skip to content
Latchkey

GitLab CI artifacts:reports:junit Path Not Found - No Test Report

artifacts:reports:junit uploads JUnit XML so the MR shows a test report. If the path glob matches nothing, GitLab warns that no matching files were found and the MR has no test widget.

What this error means

The job log warns that the junit report path matched no files, and the merge request shows no test summary even though tests ran.

gitlab-ci
WARNING: junit.xml: no matching files. Ensure that the artifact path
is relative to the working directory.
Uploading artifacts as "junit" to coordinator... no files to upload

Common causes

Runner produced no XML

The test command did not emit a JUnit file, so the glob matches nothing.

Wrong path or working directory

The report was written to a subdirectory, but the artifacts path is relative to the job working directory.

Glob does not match the filename

A pattern like **/junit.xml will miss report.xml or a differently named file.

How to fix it

Point the report at the real XML path

Configure the test runner to emit JUnit XML and reference the exact path.

.gitlab-ci.yml
test:
  script:
    - pytest --junitxml=report.xml
  artifacts:
    when: always
    reports:
      junit: report.xml

Use a glob and upload on failure too

  1. Set artifacts:when to always so reports upload even when tests fail.
  2. Use a glob such as **/junit-*.xml if multiple files are produced.
  3. List the working directory in the job to confirm where the XML lands.

How to prevent it

  • Always set artifacts:when: always for test reports.
  • Confirm the runner JUnit output path matches the artifacts path.
  • Verify the MR test widget appears after the first run.

Frequently asked questions

What causes ""junit" report path"?
The test command did not emit a JUnit file, so the glob matches nothing.
How do I fix "junit" report path?
Configure the test runner to emit JUnit XML and reference the exact path.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card