GHAReports released

Small listener project that i never managed to publish properly is now available as “robotframework-ghareports”.

If enabled via --listener GHAReports when running robot in github actions, a job summary based on your testsuites/tests pass fail status will be added to the pull request - something like this: Move to pyproject.toml · rasjani/robotframework-ghareports@9f87669 · GitHub

Final output style is not set in stone so if there’s any suggestions, feel free to open an issue at

3 Likes

Version 0.1.0 released yesterday, example output looks something like this now; robotframework-ghareports/example_step_summary.md at main · rasjani/robotframework-ghareports · GitHub

0.2.0 released.

  • New feature allows to create the summary markdown file even if not running on github.
  • If logging for testcase is multiline, previously this broke the markdown table rendering. This is now fixed.
1 Like

0.3.0 released

2 Likes

0.3.1 released

  • Fix for variables not showing correctly in warnings section
1 Like

0.4.0 releasde

  • Switched to robot framework listener version 3 because ver 2 had issues[0][1]

Issues:

  • when using keyword as test template and keyword had [Setup] and [Teardown] (dunno if related but adding those to examples), listener was not able to fetch the value of the variable. Feels like a scoping bug for variables with RF itself.
  • log_message in V2 listener interface never triggered from Log keyword from project’s resource files but it does for V3 and message is fully evaluated already at that point
2 Likes

So far, GHAReports did not work with Pabot but I made a small script today (that i can integrate into package) that uses ResultVisitor instead of runtime Listener and can generate github summary from just output.xml.

Anyone interest ?

0.5.0 is now in pypi.

Feature is still undocumented because it might not contain bugs and/or breaking your reporting when using standalone ghareports.

But changes are; there’s now a cli tool added to your path called ghareports. You can pass -r output.xml to tell the tool where your robot output is. And if you want additional markdown to be generated beside just the github action summary, -m your_summary.md

-h / --help prints out available options.

And now you can run your tests with pabot and/or re-run failed tests and generate github actions summary afterwards you have up to date output.xml available.

And, here’s still one more example, what ghareports actually does:

3 Likes

0.6.0 now released.

  • Fixes issue where ghareports crashed when processing combined output.xml from pabot/rebot combo where start and stop timestamps where not available for the suite.
  • Passing/Failing & Warning sections are now collapsable to add a bit more readability.
  • and instead of GHAReports cli, you can run it also via python -mGHAReports as in some environments, generated executable wrappers will not work due to, say windows group policies.

0.7.0 released

  • report summary can only be 1024kb. If there is a huge chunk of, say, warnings for example, ghareports will omit any section that triggers the summary to grow over that limit. This applies only to the actual markdown that github shows. If user did provide additional markdown to be generated, size filtering is not applied so that the one can still get a full copy of the report into build artifacts.

PS. not fully tested so any feedback welcome

0.8.0 released

  • List of environment variables can now be added to “Environment” section of summary. This is “useful” when you need to add github action inputs (eg arguments) into a report itself. For example, your action can run against multiple environments like dev, staging, production, these values are now available for the summary.