-
Notifications
You must be signed in to change notification settings - Fork 413
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
Include test summary in build notifications #25
Include test summary in build notifications #25
Conversation
The checkbox is shown along with other options in the build configuration page. If selected, the test summary will be shown in build notifications.
When sending the 'started' notification, no test summary needs to be included.
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
I guess I'll start maintaining this plugin. I don't have any experience developing Jenkins plugins but if I can get my own environment set up and learn to release then I'll do it. This may take about a week. |
Candidate for merge means I will first merge your change locally, compile locally, and test locally in Jenkins before merging. |
@randomsync I can't seem to be able to produce output from the build. I didn't have an issue with the merge conflicts. Can you perhaps explain to me how to publish test results in a Job in order to make this feature execute? So far I've tried |
Never mind haha, I didn't have the checkbox to publish results checked in the job configuration. |
notifications. Converted dos2unix line endings in ActiveNotifier.java. Resolved Conflicts: src/main/java/jenkins/plugins/slack/ActiveNotifier.java src/main/java/jenkins/plugins/slack/SlackNotifier.java
Thanks @samrocketman |
You're welcome. |
I'll be moving include test summary into the advanced section (it will be at the bottom). That's where you'll find your setting in the next release. |
New features: * Advanced settings * Team domain and token can be specified per project; falls back to global config if not specified (#19) * Post a list of commits with the build notification (title and author of commit) (#30, #44, #45) * Include JUnit test summary in build notifications (#25) * Use colors when sending a message using slack (#20, #24). Also, the start notifications use the color of the last build result (#43) * Support for authenticated proxies (#14) * Test Connection button (#46, #28) * Option to disable subsequent notifications on build failures (#46, #15) Improvements: * Report 'return to normal' on transition from unstable to success (#21) * Improved logging. Bug fixes: * When changing the global slack settings the slack config in jobs are updated as well (#26, #12) * Fix NullPointerException and output log message if slack is not configured (#35, JENKINS-26066)
Could you please tell me if Jenkins ver. 1.651.3 is capable of producing a summary for JUnit tests as shown on the screenshot in the first post of this issue? |
I'm using rspec for my Ruby project, so I get a no Test found message. It would be nice if one could choose what kind of tests are beeing done. |
fastsieg, that's more a limitation in Jenkins than this plugin. JUnit-style tests are what Jenkins collects. If you run your tests inside of a container then perhaps you should use docker to retrieve the results (or specify a volume if docker is running on the same machine as the Jenkins agent). |
@fastsieg also, you can add |
Using xcpretty to parse the output from xcodebuild as Junit.The test results analyser plugin works fine since it depends on the junit results but the test summary and custom message for slack is not getting posted. Any thoughts ? |
For the result summary to work, you need to have a compatible xml file, which is then fed into the Post-build action of "Publish JUnit test result report". Once that's working, the jenkins slack bot will have access to the test results to provide a summary. |
Where can I find out about how the "compatible xml file" has to look like and how to generate it? |
Web search |
For my understanding: this manual configuration file is only needed with Jenkins 1.6? The current version of Jenkins automatically outputs test summaries? |
Not sure what you mean. It's just JUnit. As far as I know, without additional plugins the test summary comes from JUnit. That is not specific to a particular version of Jenkins. |
This is shown as an example in the previous comment |
How to publish junit report in jenkins declarative pipeline ? |
or where to find the include test summary checkbox... |
@bitsydarel if xml file is new one, then only it will publish result to Jenkins. If result is not new, and still if you want to publish results, modify last modified datetime for xmls- script { |
Include test summary in build notification. A checkbox is added to build settings page which can be used to specify whether to include test summary or not. If enabled and no tests are found, a "No Tests found" message is appended.