01-12-2018 09:49 AM - edited 01-18-2018 03:49 PM
I've previously built a small extension to Unit Test Framework that can export UTF results in Junit format so Jenkins can set build health/fail builds appropriately and track what changes broke which tests.
I'm considering doing the same for VI Analyzer, so a build cannot move forward unless it passes the VI Analyzer style defined for a particular project.
Before I do this, two questions:
Solved! Go to Solution.
01-12-2018 10:01 AM
I wouldn't as I wouldn't treat style as a pass/fail situation. I would probably just look to use the HTML report viewer in jenkins when I get to integrating VI Analyzer.
01-12-2018 10:09 AM - edited 01-12-2018 10:49 AM
To be clear, my intended use case is not to fail build if any VIA check fails. Rather, I’d set the health weighting such that a few missed checks won’t fail the build, but would be visible from a Jenkins dashboard (to know when a tech lead needs to check on things).
If a large quantity of style checks fail, I would want to fail the build to prevent blatantly bad code from getting in.
This assumes I have a sane set of style checks (like checking for cross linking to another repo, no code called Untitled 76.vi, etc), as opposed to trivial cruft.
01-12-2018 10:19 AM
I would be interested, but would prefer the importance level of the check be used for pass/fail criteria. Something like only important VIA can cause a fail, medium and low would not.
01-12-2018 10:56 AM
You may want to consider the Checkstyle format rather than JUnit. In Jenkins, this is consumed by the Warnings plugin.
If this was developed, our teams would definitely use it.
01-12-2018 11:01 AM
Much better! That's closer to what I was looking for. Thanks for the feedback.
01-12-2018 11:02 AM
My use case is as follows: I do run VI Analyzer tests before building, but I don't break a build if tests fail. Instead, I email the reports to the user that triggered the build with his commit.
As you might or might not remember, I work with Gitlab and its CI features.
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
01-13-2018 03:31 AM
Yeah that warnings plugin looks much more like what I would hope for
01-18-2018 03:46 PM - edited 07-03-2018 03:07 PM
Ok, I have a first pass version working well on my test system. It produces an XML file that is compatible with Checkstyle syntax, and is consumable by the Jenkins Checkstyle plugin.
It is aware of VI Analyzer test rankings and sets the Checkstyle severity accordingly.
I'd love to hear your thoughts for improvement on the Github page for this:
https://github.com/LabVIEW-DCAF/VIA-Checkstyle
If I hear good results from you folks, I'll post it to Tools Network as well, otherwise I'll leave it here.
I also plan to integrate this into the DCAF build toolchain:
https://github.com/LabVIEW-DCAF/buildsystem
(1.0.0.2: package edited with a bug fix - bad XML declaration, reported by @chinghwayu)
(1.0.0.3: package edited with another bug fix - failed to escape all special characters)
(1.0.1.4: package edited with another bug fix - result severities were sometimes misclassified)