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
Include test output in the check #354
Comments
I'm happy to actually implement it if you could give me some pointers where. I tried to dig but wasn't really sure how to approach it. Ideally it should be a configurable flag. |
I agree, the I suspect this would require to add something like <xsl:value-of select="../output"/> <xsl:value-of select="./stack-trace"/> No configuration option needed, as this should always be included if |
On a side note: the message should be included. I would consider that a separate bug. |
👍 I'll do and test it on my project. |
I've tried in https://github.com/timewarpinc/publish-unit-test-result-action/blob/0c67e0e98bc1eb2db461189768537a2b30eb7928/python/publish/xslt/nunit3-to-junit.xslt and executed the transform locally on the nunit test output. Here is relevant part of the transformed xml: <testcase name="OdinValidator" classname="" status="Failed" time="417.005347">
<failure message="UnityEngine.Assertions.AssertionException : Assertion failure. Values are not equal. Expected: 19 == 0">UnityEngine.Assertions.AssertionException : Assertion failure. Values are not equal.
Expected: 19 == 0 at UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) [0x0003c] in /home/bokken/buildslave/unity/build/Runtime/Export/Assertions/Assert/AssertBase.cs:29
at UnityEngine.Assertions.Assert.AreEqual[T] (T expected, T actual, System.String message, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x0004d] in /home/bokken/buildslave/unity/build/Runtime/Export/Assertions/Assert/AssertGeneric.cs:31
at UnityEngine.Assertions.Assert.AreEqual[T] (T expected, T actual, System.String message) [0x00001] in /home/bokken/buildslave/unity/build/Runtime/Export/Assertions/Assert/AssertGeneric.cs:19
at UnityEngine.Assertions.Assert.AreEqual (System.Int32 expected, System.Int32 actual) [0x0000c] in /home/bokken/buildslave/unity/build/Runtime/Export/Assertions/Assert/AssertPrimitiveTypes.cs:176
at MP.Tests.AssetValidatorTest.OdinValidator () [0x000a7] in /github/workspace/Assets/Tests/EditorMode/AssetValidatorTest.cs:56
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <b67d2f60bf2548a58dc569b37fe71c3d>:0 Added AStarManager (Zenject.CompositeMonoInstaller) to Managers (Zenject.SceneContext)
Error: AStar Pathfinder grid does not contain level bounds.
Added AStarManager (Zenject.CompositeMonoInstaller) to SceneContext (Zenject.SceneContext)
Material Sprite-Lit-Default (UnityEngine.Material) not have GLOW_ON keyword
Completed validating 720073 values in 416.8882977 seconds.
</failure>
<system-out>Error: AStar Pathfinder grid does not contain level bounds.
Added AStarManager (Zenject.CompositeMonoInstaller) to SceneContext (Zenject.SceneContext)
Material Sprite-Lit-Default (UnityEngine.Material) not have GLOW_ON keyword
Completed validating 720073 values in 416.8882977 seconds.
</system-out>
</testcase> So the transformation works. But the action is producing the same github check as before. And I've pinned it to the exact commit, so I don't get why it does not work. Likely because it is using different transform. But that got me thinking. It already transforms the |
Ok, it does not work from a fork because the action is set up to use your published docker image. |
You can create a PR in your fork targeting your fork master and make |
Run the action with with:
root_log_level: DEBUG
log_level: DEBUG then you might be able to see the payload that is sent to GitHub API. |
I have added stdout and stderror to the annotations output. I have created a fix, please test the fix as follows (includes fix for #355): uses: EnricoMi/publish-unit-test-result-action/composite@branch-stdout-and-stderr |
I though so too, but the action is configured to run a docker image and not use the repo at all. So none of the code is actually evaluated. Only the composite action works. publish-unit-test-result-action/action.yml Line 111 in 713caf1
|
Thanks! Sorry for the delay. I'll check it and report. I'll check 2.1.0. |
Unity NUnit test runner outputs what was written to the console when the test was running and that is extremely valuable information
Here is a stripped down example of one test run.
It would be awesome if it would be possible to have the contents of the
<output>
tag in the GitHub check. Right now there is just stack trace, without the error message. Which makes it very hard to figure out why it failed and you have to download the xml file and dig by hand anyway.The text was updated successfully, but these errors were encountered: