-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add TestRunResultProcessor for JUnit-style XML output #17
Conversation
3d7d3a1
to
6c91abb
Compare
Smack will be configurable with optional TestRunResultProcessor instances, which will operate on the outcome of the executed tests. This commit adds a processor that generates an XML file that mimics the JUnit-style reporting. When Smack is configured to use the new processor introduced by this commit (`org.igniterealtime.smack.inttest.util.JUnitXmlTestRunResultProcessor`) then a file named `test-results.xml` will be created in the directory identified by the system property `logDir`.
6c91abb
to
c5bbd52
Compare
For brownie points, I added a step in the workflow of this repo that processes the JUnit-style XML output, and generates UI elements from that (there's an additional 'check' in this PR, and the summary of the build shows a table, as shown below). I'd love to be able to group the test outcome per XEP, but I'm not sure if that's possible with this particular tool. I've asked the author in mikepenz/action-junit-report#1080 |
uses: mikepenz/action-junit-report@v4 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: '**/test-results.xml' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
report_paths: '**/test-results.xml' | |
report_paths: '**/test-results.xml' | |
suiteRegex: '*' |
My guess at a workaround for mikepenz/action-junit-report#1080
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected input(s) 'suiteRegex', valid inputs are ['token', 'github_token', 'report_paths', 'test_files_prefix', 'exclude_sources', 'suite_regex', 'annotate_only', 'check_annotations', 'update_check', 'check_name', 'commit', 'fail_on_failure', 'require_tests', 'require_passed_tests', 'include_passed', 'check_title_template', 'summary', 'check_retries', 'transformers', 'job_summary', 'detailed_summary', 'annotate_notice', 'follow_symlink', 'job_name', 'annotations_limit', 'truncate_stack_traces']
Trying again with suite_regex
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Dan Caseley <[email protected]>
Co-authored-by: Dan Caseley <[email protected]>
340b75d
to
30dc7e2
Compare
The regex change to the job has changed the reporting from
to
Which is more information, but unsure if it's actually nicer. |
Merged. We'll change the reporting separately, if we're able. |
Smack will be configurable with optional TestRunResultProcessor instances, which will operate on the outcome of the executed tests. This commit adds a processor that generates an XML file that mimics the JUnit-style reporting.
When Smack is configured to use the new processor introduced by this commit (
org.igniterealtime.smack.inttest.util.JUnitXmlTestRunResultProcessor
) then a file naedtest-results.xml
will be created in the directory identified by the system propertylogDir
.