-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feature Request - JUnit Report System-Out #182
Comments
Hi @felipefoz This would not require any changes to Caraya. It is already possible to extend the framework in two different ways to achieve this goal, And I'd personally argue against this in the base framework as it is an time-expensive operation that is only suitable for certain CI workflows. To maintain the framework fast and lightweight, I hope one of the approaches below would fit the community's needs! First approach: Second approach: You could use the Test or Assert Properties. While the Test is executing, every time you encounter a failure, you reconstruct the path to the VI (easy, it is still in memory at this point), generate the screenshot and add the path of your PNG file into the properties. This property will be in the report, which you can extract in your CI pipeline. The best thing with the Wrapper is that you can customize for your company`s needs at will. Here is an example (attached code LV2021) with a single Test VI. This is the Wrapper function prototype for "Assert Equal Variant" Interactive window shows the results (same info as in the JUnit file for your Test Suite) All screenshot paths are readily available in the Extended Test Results. Disclaimer: There is no error handling in this Assert Property wrapper example. |
I forgot to reply this one. Sorry about that. Although your solution does the job of inserting a reference to the BD file in the report, it does not satisfy the requirement for the JUnit report as described by Gitlab. the Considering the first approach you mentioned, I can assume it is not possible to do this as part of the Caraya. Regards, |
@felipefoz You could overwrite the JUnit Report class and insert the system-out anywhere you need. Do you think that would work? Ref: https://github.com/JKISoftware/Caraya/wiki/Creating-Custom-Test-Reports |
We might want to support a JUnit.Gitlab ??? |
Hum, good point, why not? I will take a look on how to do it. If I do it, I will make sure to update the post here with a link to this custom report. |
Idea
Hi,
I would like to propose a feature regarding the JUnit Report.
In Gitlab, in case of failure, you can attach something as system out tag.
https://docs.gitlab.com/ee/ci/testing/unit_test_reports.html
My idea is that during the report, in case of a failure we would create a screenshot of the test VI and use the system out tag to point to that file, so we could visually inspect the offending test in the Gitlab Web.
Code for getting the VI BD:
Use Case: CI workflow
When: Test Failure
Example
Gitlab View
JUnit Report Example
To Decide
Anyone finds this useful?
Regards,
The text was updated successfully, but these errors were encountered: