tag:help.appveyor.com,2012-11-13:/discussions/problems/759-too-many-test-results-when-uploading-them-via-the-apiAppVeyor: Discussion 2018-08-25T01:48:13Ztag:help.appveyor.com,2012-11-13:Comment/344967842014-09-08T21:05:41Z2014-09-08T21:05:42ZToo many test results when uploading them via the API<div><p>For performance reasons we use our own NUnit test runner, export
an XML file with test results and upload that to
<code>https://ci.appveyor.com/api/testresults/nunit/jobid</code>.
Recently apparently the parser for those files have changed which
now leads to tests appearing multiple times. Now apparently every
<code>test-case</code> below every <code>test-suite</code> is
counted once for each <code>test-suite</code>. Given the following
test file I reduced to just three test cases in five nested test
suites:</p>
<pre>
<code><?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="D:\Users\Joey\VCS\Pash\Pash.nunit" total="1657" errors="0" failures="0" not-run="28" inconclusive="0" ignored="20" skipped="8" invalid="0" date="2014-09-08" time="22:31:47">
<environment nunit-version="2.6.1.12217" clr-version="2.0.50727.8000" os-version="Microsoft Windows NT 6.2.9200.0" platform="Win32NT" cwd="D:\Users\Joey\VCS\Pash" machine-name="JESSICA" user="Joey" user-domain="JESSICA" />
<culture-info current-culture="de-DE" current-uiculture="en-GB" />
<test-suite type="Project" name="D:\Users\Joey\VCS\Pash\Pash.nunit" executed="True" result="Success" success="True" time="32.681" asserts="0">
<results>
<test-suite type="Assembly" name="D:\Users\Joey\VCS\Pash\Source/TestHost/bin/Debug/TestHost.exe" executed="True" result="Success" success="True" time="15.409" asserts="0">
<results>
<test-suite type="Namespace" name="TestHost" executed="True" result="Success" success="True" time="15.409" asserts="0">
<results>
<test-suite type="TestFixture" name="ArraySubexpressionOperator" executed="True" result="Success" success="True" time="1.909" asserts="0">
<results>
<test-suite type="ParameterizedTest" name="Onedimensional" executed="True" result="Success" success="True" time="1.740" asserts="0">
<results>
<test-case name="TestHost.ArraySubexpressionOperator.Onedimensional(&quot;@($a)\t\t \t\t\t\t# result is the same array of 3&quot;)" executed="True" result="Success" success="True" time="1.675" asserts="1" />
<test-case name="TestHost.ArraySubexpressionOperator.Onedimensional(&quot;@(@($a)) \t\t\t\t# result is the same array of 3&quot;)" executed="True" result="Success" success="True" time="0.029" asserts="1" />
<test-case name="TestHost.ArraySubexpressionOperator.Onedimensional(&quot;$a&quot;)" executed="True" result="Success" success="True" time="0.019" asserts="1" />
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</test-results></code>
</pre>
<p>I get a total of 15 test results in the web interface (<a href=
"https://ci.appveyor.com/project/ygra/pash/build/1.0.59/tests">https://ci.appveyor.com/project/ygra/pash/build/1.0.59/tests</a>).
My guess would be that the change was to enumerate all descendatn
<code>test-case</code> elements below every <code>test-suite</code>
instead of just direct children (perhaps an XPath expression that
was changed to something too greedy here).</p></div>Johannes Rösseltag:help.appveyor.com,2012-11-13:Comment/344967842014-09-08T21:19:04Z2014-09-08T21:19:04ZToo many test results when uploading them via the API<div><p>You're right, there is a problem. We'll fix that shortly and
deploy an update!</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/344967842014-09-12T04:17:36Z2014-09-12T04:17:36ZToo many test results when uploading them via the API<div><p>An update with the fix has been deployed.</p></div>Feodor Fitsner