Build job keeps running/analyzing tests

tpodolak's Avatar

tpodolak

08 Apr, 2019 11:12 PM

I have following AppVeyor definition https://github.com/nsubstitute/NSubstitute.Analyzers/blob/dev/appve..., where I explicitly disabled test execution. The entire build is enclosed in a custom script, which builds the app and runs the tests. The script execution take around 2-3 minutes per job (Linux and windows) - see results in here https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/b.... However, even though the tests are disabled, AppVeyor seems to be analyzing test results https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/b... and because there are around 11k of them, it significantly increases build time. Is there any way to completely disable all tests related features in the appveyor.yaml file?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 09 Apr, 2019 08:51 PM

    Ilya Finkelshteyn's Avatar

    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.

  2. 2 Posted by tpodolak on 10 Apr, 2019 08:25 PM

    tpodolak's Avatar

    I use standard dotnet test command https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test?tabs... 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
    https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/b... which land in .artifacts directory and the html report of the coverage https://ci.appveyor.com/project/NSubstitute/nsubstitute-analyzers/b...

    But this happens asynchronously and should not affect build time.

    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

  3. 3 Posted by tpodolak on 12 Apr, 2019 12:10 AM

    tpodolak's Avatar

    Please see the git attached
    gif

  4. Support Staff 4 Posted by Owen McDonnell on 14 Apr, 2019 05:53 AM

    Owen McDonnell's Avatar

    As @Ilya mentioned, as your cake script is running xunit, it detects AppVeyor environment and uploads test results.

    To remedy, try adding .Append(" -- RunConfiguration.NoAutoReporters=true") to this line of your build.cake file, as i did in this build which seems to have disabled test reporting.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • tests.jpg 25.2 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac