- Home /
Unit Test EditorTestResults
Hi guys,
I search the last week everywhere, but I can't find a solution for that.
I have a workstation ( Win 10, Unity 5.6.0f3 ) and a home-server ( Win Server, Unity 5.6.0f3 ) .
If I test my sources with the " start /WAIT Unity.exe -batchmode -runEditorTests -projectPath "c:\MyProject\" -editorTestsResultFile c:\MyProject\result.xml" directly on my workstation. I get an result XML which looks like a well-formated NUnit-XML-file:
<?xml version="1.0" encoding="utf-8"?>
<test-results name="Unity Tests" total="16" ... >
<environment nunit-version="2.6.4-Unity" ... >
<culture-info current-culture="en-US" ...>
<test-suite name="MyProject" ... >
<results>
<test-case name="UnityTest....">
<failure>
<message>
but if my CI-Server (TeamCity) tries to check out the sources and test it, the first part of the file is missing, it's just like:
<?xml version="1.0" encoding="utf-8"?>
<test-suite name="MyProject" ... >
<results>
<test-case name="UnityTest....">
<failure>
<message>
I tried it out the personal- and my pro-license on both machines.
I checked also the nunit-references in vs.
Setup a new repo (svn), made a "clean" commit, checked it out.
I also run the command directly in the shell on my server.
I tried out a lot of stuff and everytime i got the same result
Does anybody know anything about it? Or have maybe a solution?
Cheers!
Answer by SirNokles · May 16, 2017 at 03:12 PM
Okay I found after a while the solution by myself. On my Workstation I run the tests not with the 5.6 version, instead with the 5.5 version with including the asset "TestTools" from the Store. Don't recognized that the 5.6 is on d: and 5.5 is on c:
the results with 5.5 is:
<?xml version="1.0" encoding="utf-8"?>
<!--This file represents the results of running a test suite-->
<test-results name="Unity Tests" total="19" errors="2" failures="2" not-run="2" inconclusive="4" ignored="1" skipped="1" invalid="0" date="2017-05-16" time="16:51:01">
<environment nunit-version="2.6.4-Unity" clr-version="2.0.50727.1433" os-version="Microsoft Windows NT 10.0.14393.0" platform="Win32NT" cwd="P:\10_OtherProjects\testingTest" machine-name="DESKTOP-3KGC3O3" user="Niclas" user-domain="DESKTOP-3KGC3O3" unity-version="5.5.1f1" unity-platform="WindowsEditor" />
<culture-info current-culture="en-US" current-uiculture="en-US" />
<test-suite name="testingTest" type="Assembly" executed="True" result="Failure" success="False" time="0.227">
<results>
<test-case name="NewEditorTest.EditorTest" executed="True" result="Success" success="True" time="0.007">
</test-case>
<test-case name="UnityTest.SampleTests.CultureSpecificTest" executed="False" result="Skipped">
<reason>
<message>
....
with 5.6 is
<?xml version="1.0" encoding="utf-8"?>
<test-suite type="TestSuite" id="1000" name="testingTest" fullname="testingTest" runstate="Runnable" testcasecount="21" result="Failed" site="Child" start-time="2017-05-16 14:50:19Z" end-time="2017-05-16 14:50:20Z" duration="0.767544" total="21" passed="11" failed="4" inconclusive="4" skipped="2" asserts="5">
<failure>
<message><![CDATA[One or more child tests had errors]]></message>
</failure>
<test-suite type="Assembly" id="1027" name="Assembly-CSharp-Editor.dll" fullname="P:/10_OtherProjects/testingTest/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll" runstate="Runnable" testcasecount="21" result="Failed" site="Child" start-time="2017-05-16 14:50:19Z" end-time="2017-05-16 14:50:20Z" duration="0.732118" total="21" passed="11" failed="4" inconclusive="4" skipped="2" asserts="5">
<properties>
<property name="_PID" value="2332" />
<property name="_APPDOMAIN" value="Unity Child Domain" />
</properties>
<failure>
<message><![CDATA[One or more child tests had errors]]></message>
</failure>
....
Now my new question is: Is it possible to add a flag that I got the same result file like the 5.5 version?
Cheers!