tag:help.appveyor.com,2012-11-13:/discussions/problems/22862-build-job-keeps-runninganalyzing-testsAppVeyor: Discussion 2019-07-06T11:36:10Ztag:help.appveyor.com,2012-11-13:Comment/471591732019-04-09T20:51:46Z2019-04-09T20:51:46ZBuild job keeps running/analyzing tests<div><p>AppVeyor test auto-detection does not happen, as expected. Does your cake build xunit behind the scenes? In this case when most probably what happened is that xunit detects AppVeyor environment and uploads tests results. But this happens asynchronously and should not affect build time.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/471591732019-04-10T20:25:34Z2019-04-10T20:29:36ZBuild job keeps running/analyzing tests<div><p>I use standard dotnet test command <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test?tabs=netcore21">https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test?tabs...</a> for running the tests - which doesn't upload anything on his own and it is not aware of appveyor. The only pieces which are produced by the tests are the coverage results<br>
<a href="https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/builds/23695173/job/65epoaxndt2h98fy#L231">https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/b...</a> which land in .artifacts directory and the html report of the coverage <a href="https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/builds/23695173/job/65epoaxndt2h98fy#L279">https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/b...</a></p>
<blockquote>
<p>But this happens asynchronously and should not affect build time.</p>
</blockquote>
<p>This seems to be happening during the test run but drastically exceeds the script build time. I can literally see the test counter changing its value long after the script finished running</p></div>tpodolaktag:help.appveyor.com,2012-11-13:Comment/471591732019-04-12T00:10:09Z2019-04-12T00:10:09ZBuild job keeps running/analyzing tests<div><p>Please see the git attached<br>
<img src="tests.gif" alt="gif"></p></div>tpodolaktag:help.appveyor.com,2012-11-13:Comment/471591732019-04-14T05:53:47Z2019-04-14T05:53:47ZBuild job keeps running/analyzing tests<div><p>As @Ilya mentioned, as your cake script is running xunit, it detects AppVeyor environment and uploads test results.</p>
<p>To remedy, try adding <code>.Append(" -- RunConfiguration.NoAutoReporters=true")</code> to <a href="https://github.com/nsubstitute/NSubstitute.Analyzers/blob/2d39f9d0df851c218051030d998d4874356ac86c/build/build.cake#L94">this line</a> of your <code>build.cake</code> file, as i did in <a href="https://ci.appveyor.com/project/OwenMcDonnell/nsubstitute-analyzers/builds/23832643/job/lmq0gohm4jwtaayx">this build</a> which seems to have disabled test reporting.</p></div>Owen McDonnelltag:help.appveyor.com,2012-11-13:Comment/471591732019-05-05T17:10:14Z2019-05-05T17:10:14ZBuild job keeps running/analyzing tests<div><p>Thanks guys, works like a charm</p></div>tpodolak