Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check result is not reported if no tests are found #499

Open
jtnord opened this issue Mar 2, 2023 · 1 comment
Open

check result is not reported if no tests are found #499

jtnord opened this issue Mar 2, 2023 · 1 comment
Labels

Comments

@jtnord
Copy link
Member

jtnord commented Mar 2, 2023

Jenkins and plugins versions report

Environment
Jenkins 2.3xx
junit xxx

What Operating System are you using (both controller, and any agents involved in the problem)?

linux - but not OS specific

Reproduction steps

setup junit to report checks to github in a pipeline

e.g. junit checksName: "myUnitTests", testResults: "**/target/surefire-reports/TEST-*.xml

run the pipeline with no test results

Expected Results

there is a failing statuc in github for myUnitTests

Actual Results

the build fails

Anything else?

by code inspection - the check for zero tests happens before the check is published

@jtnord jtnord added the bug label Mar 2, 2023
@davidjeddy
Copy link

Having this as well. Running KICS against a Terraform module. Everything is good so no tests are reported in the output. Thus the plugin fails.

XML output by KICS when 100% successful:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="KICS development" time="22.202968066s" failures="0"></testsuites>

Suggestion: Junit plugin should report no failures if the XML report has no tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants