-
Notifications
You must be signed in to change notification settings - Fork 19
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
"No test results found" #315
Comments
I'm having the same problem. I'm using JUnit plugin, but I did have to downgrade to version 1.0 because of another error. I get this job console output:
Jenkin's server logs show this:
(I'm pretty sure the OPT stuff is unrelated) EDIT: My JUnit stuff is working otherwise, as the xml is being parsed correctly and spit into a graph correctly. |
This seems to happen for me as well with Jenkins 1.624 and GitHub Pull Request Builder 1.26.2, not sure if the Jenkins version has anything to do with it. If I manually run a job by passing it a build parameter, it will ignore my custom Commit Status Context but it reports the build number and length of time it took to build (e.g. - default Build #4 succeeded in 2 min 26 sec). When triggered by GitHub, it uses my custom Commit Status Context but I get 'Build finished. No test results found.' instead. |
Same here. |
This looks like a bug to me. Previously the code should have called build.getTestResultAction(), however that is now deprecated. Now the code should call build.getAction(AbstractTestResultAction.class). The problem is that the code calls build.getAction(TestResultAction.class), but this isn't present in the build result in some cases. In my case, only a AggregatedTestResultAction is available. Thus the code for aggregated results works, but the code for the one line summary does not. |
Having the same problem here... @jsight - do you know have a fix? :) |
Just ran into this same issue on Jenkins 1.625 Plugin 1.29.4. Hoping there is a fix soon. @jsight - submit a pull request with the fix you mentioned? |
Version |
Hi @slaunay - thanks. I just tested with the new version but still seeing the issue... |
@jameschao what kind of test report are you using in your job? |
Hm, I didn't explicitly set the report type for the job (maybe that's the problem?). It's just a custom test runner script for the app that I run in one of the Build Steps. Previously, GHPRB would report "Test PASSed" or "Test FAILed" depending on the exit code of the script/Build Step. Is that not sufficient? |
I believe the status code of your script should dictate if the build passes or fails but the test results are only available if you are using a test report facility (e.g. Maven) or at least something that populates an |
OK I'll give that a try. Thanks. |
We are using v1.29.7 and are seeing the same thing even though we are explicitly setting the "Commit status Build result" message. We aren't running tests that can produce JUnit xml files and we aren't using any test reporting facility because we don't need to. The script that performs this check does exit with a non-zero status code when it fails. What, if anything, can we do to avoid having "No test results found" in the notification box? |
I'm using 1.29.8 and I don't see reports. I'm using mocha to run tests:
Given that mocha has a wide array of reporters, is there a way to use any of them for reporting the status in way that's understandable by ghprb? |
Ok, I tried mocha-junit-reporter which produces JUnit style xml but still no luck. |
We are now using other scripts that rely on non-zero exit codes to signal a failure and we are hitting this issue again. The plugin should not force the use of junit to report back the status on the Pull Request. Any workarounds or suggestions to be able to not have that status as "no tests results found" would be great |
Because otherwise it will force users to have a junit file to be able to report on tests run/failed/skipped. This is not always available and it is entirely optional (vs. just handling a non-zero exit status as a failure). Fixes Issue jenkinsci#315
So in order to get test results a Test action has to be present on the build. Without that it will always return the No Tests found text. I just added a PR that would turn off the test result text by default, and allows you to specify if results should be added. jenkinsci#280 |
I use pytest to run some tests in a pipeline stage. There are some passed and failed tests. But |
Hello,
I've been successfully using ghprb and I am pretty happy with it!
One weird think I am getting is the "No test result found".
I found the correct line for where this gets used:
ghprb/src/main/java/org/jenkinsci/plugins/ghprb/manager/impl/GhprbBaseBuildManager.java
Line 178 in 85eec74
This test result seems like a good idea and I'd like to use it. How do I generate the correct test results?
Also, do you know if it would be possible to include the duration of the test in the first part of the message (that I was able to customize with a build-trigger for SUCCESS).
Thanks for that plugin anyway!
Co
The text was updated successfully, but these errors were encountered: