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

Get test report results in workflow logs as well #720

Closed
itsankit-google opened this issue Oct 18, 2022 · 8 comments · Fixed by #744
Closed

Get test report results in workflow logs as well #720

itsankit-google opened this issue Oct 18, 2022 · 8 comments · Fixed by #744
Assignees

Comments

@itsankit-google
Copy link

itsankit-google commented Oct 18, 2022

Hi, I recently switched from using https://github.com/ScaCap/action-surefire-report to this action,

Due to this existing issue with GitHub - #40, this feature of including test results in the workflow logs was really helpful in ScaCap/action-surefire-report.

ref -
image

But I cannot find something like this in this action. Is there a flag to enable it??

@itsankit-google
Copy link
Author

Okay, I see it shows the count here -
image

Will it also show the names of failed tests here, if any??

@mikepenz
Copy link
Owner

@itsankit-google while there is currently no flag to display the results as part of the logs one alternative to the reports which may end up in the wrong section, is the new Job summary feature GitHub offers. - https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary

This will build a report with tables highlighting passed and failed tests. Offering also options to have a full result listing or only a simple overview:

Screen Shot 2022-10-18 at 22 32 18

@itsankit-google
Copy link
Author

itsankit-google commented Oct 18, 2022

Hi @mikepenz, If I understand correctly Job Summary will be attached to the correct build summary by the action even though test report might get attached to some wrong build, is that what you intended?

@mikepenz
Copy link
Owner

@itsankit-google the issue outlined in #40 (based on all information available) is something we can't yet fix.

But GitHub introduced Job Summaries which are always attached to the particular job a given action was executed in.
While this won't solve #40 and it's no direct answer to have the result in the logs (there is currently no flag to enable report via logs - as in my experience that should be the last resort for engineers to look into) - Using the job summary would help to get the insight into the results as part of the build.

You can find it in action here for example: https://github.com/mikepenz/action-junit-report/actions/runs/3248491905#summary-8888055040

@mikepenz mikepenz self-assigned this Oct 19, 2022
@itsankit-google
Copy link
Author

@itsankit-google the issue outlined in #40 (based on all information available) is something we can't yet fix.

But GitHub introduced Job Summaries which are always attached to the particular job a given action was executed in. While this won't solve #40 and it's no direct answer to have the result in the logs (there is currently no flag to enable report via logs - as in my experience that should be the last resort for engineers to look into) - Using the job summary would help to get the insight into the results as part of the build.

You can find it in action here for example: https://github.com/mikepenz/action-junit-report/actions/runs/3248491905#summary-8888055040

Thanks @mikepenz for the explanation.

@mikepenz
Copy link
Owner

Would that be a good fit for your requirements, or do you still believe having similar output in the console log itself may be needed?

@itsankit-google
Copy link
Author

It works for me as of now because ultimately I want a way to know which tests failed if the report got lost due to any reason. Thanks!! Really appreciate your effort.

@itsankit-google
Copy link
Author

itsankit-google commented Oct 19, 2022

Sometimes what happens is the tests log output is too verbose but an output like this with the reason in crisp why the tests failed really helps!!

image

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

Successfully merging a pull request may close this issue.

2 participants