nunit / nunit3-vs-adapter

NUnit 3.0 Visual Studio test adapter for use under VS 2012 or later
https://nunit.org
MIT License
205 stars 106 forks source link

Test execution sometimes hangs when running in Azure DevOps using dotnet test #1207

Open stevozilik opened 2 months ago

stevozilik commented 2 months ago

Hi,

I've been experiencing NUnit tests getting stuck when running in Azure Devops yml pipeline using the dotnet test ... command

Background:

Observed Behavior (test logs):

It looks like something gets stuck and I'm struggling to figure out where to even begin

similar dotnet test ... command testing the same assembly locally works consistently ok

I'd like to ask for help how to diagnose this to get to the bottom of why it gets stuck

I've tried adding --verbosity diag --logger "console;verbosity=detailed" -- "NUnit.Consoleout=1 NUnit.InternalTraceLevel=Debug NUnit.Verbosity=5" to the dotnet test ... command but nothing jumps out as helpful

dragojs commented 2 weeks ago

Started experiencing exactly this some time ago and couldn't find the problem either. Gonna try to dump the logs in a file next run and see what I find

OsirisTerje commented 2 weeks ago

Sorry for not commenting on this earlier.

This is very hard to give any helpful comment on, there is too little information to go on.

Some questions:

Does the issue remain if you reduce the code to a single test (or just a few)? See the Specflow is involved. Does the same happens without specflow? Does it work locally ? Have you enabled the dumps in the NUnit3TestAdapter (see config options for a runsettings file) Have you checked the different possible timeout values and are you within those limits? Can you produce a repro solution ? Enabling diagnostic logs as you mention is a very good idea.

dragojs commented 2 weeks ago

Thank you for commenting as early as you did. Very good questions all of them, I am going to try and come back with a result.