I have a pipeline that builds C# code, posts compiler warnings to Checks API via Warnings NG, runs NUnit and xUnit.net tests, and posts the test results to Checks API via the xUnit plugin. All of that works.
Now, some of the tests examine files in the source tree, e.g. validate an XML file against a schema. If such a test fails, then it knows the file path and line number of the error — not in the source code of the test, but rather in the XML file. What would be a good way to forward that information to Checks API? The xUnit and JUnit plugins do not appear to support checks annotations.
Should I make the tests output a sideband file (possibly in SARIF format) and parse that using Warnings NG? I suppose I could even move these tests from the test suite to a separate executable (not using a test framework) and run that as a build step on Jenkins.
Alternatively, is there some existing convention for embedding file path and line number information to a test results file? (The xUnit plugin transforms results from VSTest or NUnit format to JUnit format using XSLT, and this transformation might have to be altered.)