R#9 Slow unit tests

Just loaded R#9 on WIN& VS2013 this morning and unit tests which took 2 minutes are now taking in excess of 30 minutes.

I'm sitting watching the the unit test session and the red wheel is spinning in the top left corner but no tests are runing. No green wheels next each section of tests

When they do run they seem to run at normal speed but there are pauses of many seconds inbetween bursts of activity

vstest.executionengine.x86.exe is using 25% CPU during these 'idle' periods.

I've restarted VS and rebooted my machine.

Any ideas?

11 comments
Comment actions Permalink

More info

We run the test runner with 1 CPU as we run some integration tests and only want one instance for SQL running. (Fine with an SSD BTW)

I've increased the number of CPU's to 2 and it all seems good now

0
Comment actions Permalink

I seem to be having smilar problems. It's like running the tests just "doesn't work". It seems like if the test window needs to build anything, it really goes haywire and just spins and spins and spins. If i build myself, then run the tests it usually works. However there's also times I need to close all the test sessions and run the tests from the visual studio bubbles again to get them to work.

I also just updated to R#9 today

The R# options have 4 assmeblies in parralel set, but my issues happen when running even 1 code file.

It seems like the shadow copy settings may have something to do with it, disabling shadow copy, I can't reproduce it immediately. Will update further if it happens again with shadow copy disabled.

0
Comment actions Permalink

Since this seemed to be the issue I'm going to open a new thread

0
Comment actions Permalink

In my case the shadow copy option wasn't enabled to begin with. I've tried toggling pretty much every single setting without luck. My tests take forever to run, sometimes they take over a minute to even start!

There appears to be an issue (a resolved one) over in the R# Issue Tracker - https://youtrack.jetbrains.com/issue/RSRP-428749#tab=Comments

I ran Visual Studio with R# logging enabled and noticed that right when the test runner seemed to hang, the following line appeared in the log file (10 times):

> 15:17:47.583 |I| MsTestVSFacade                | System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion.

This seems to indicate some fault in the MsTestVSFacade and how it's cleaning up the AppDomain when running tests. Beyond that, I have no actual fix. Let's just hope JetBrains releases an update soon!


To do this yourself open the Visual Studio Developer Command Prompt and run this command "devenv.exe /ReSharper.LogLevel Verbose".
Then run your unit tests.
To view the log file, goto ReSharper > Help > Show Log

Message was edited by: Mike Sigsworth

0
Comment actions Permalink

Hi Paul,
thanks for your report! This issue is fixed in upcoming 9.0.1 bugfix update which will be released soon.

0
Comment actions Permalink

Thanks guys. I love responsive support :)

0
Comment actions Permalink

victor.kropp wrote:

Hi Paul,
thanks for your report! This issue is fixed in upcoming 9.0.1 bugfix update which will be released soon.

Issue seems to be substantially improved or resolved in 9.0.1

0
Comment actions Permalink

This issue seems to still exist if the tests are part of a coverage session. The first run of the coverage session works fine, subsequent tests spin and spin and spin.

It seems limited to run test, debug starts immediately but not run.

0
Comment actions Permalink

Still same Issue here.
I enabled Resharper logging:

15:09:51.246 |V| MsTestVSFacade                | Run settings for D:\Path\bin\Debug\MyFirstDll.UnitTest.dll, D:\Path\bin\Debug\MySecondDll.UnitTest.dll, D:\Path\bin\Debug\MyThirdDll.UnitTest.dll:
<RunSettings>
  <DataCollectionRunSettings>
    <DataCollectors />
  </DataCollectionRunSettings>
  <RunConfiguration>
    <ResultsDirectory>D:\Path\TestResults</ResultsDirectory>
    <SolutionDirectory>D:\Path</SolutionDirectory>
    <TargetPlatform>X86</TargetPlatform>
    <TargetFrameworkVersion>Framework45</TargetFrameworkVersion>
  </RunConfiguration>
</RunSettings>
15:10:21.233 |V| IPropertyEx                   | [[SWEA]] Boolean::SolutionAnalysisConfiguration.Paused: True -> False.

This step took 30 seconds. (Like Mike Sigsworth already pointed out. Would be nice to know if you still have these problems?!)
But only at the first appearance.
Additionally Visual Studio kind of "freezes" at the start of test run and doesn't react on input.

I have some quite simple mstests + javascript tests (jasmine).
Already updadet Resharper to latest version. (JetBrains ReSharper 9.0 Update 1 Build 9.0.20141219.130142 on 2014-12-19 13:12:31Z)
When i execute the test with visual studio test runner everything works fine....and faster.

Any further suggestions?

0
Comment actions Permalink

I still seem to have the same problem, it seems to occur itermittmently. It also seems to happen most commonly when running the tests from the runner window. If i run them from visual studio circles it regularly works but re-running the same test from the test runner window sometimes it will just spin "forever". As in long enough i kill all the test sessions and start over.

It seems to have something to do with the test sessions that purging test sessions usually fixes it until it happens again.

0
Comment actions Permalink

If i create a new unit test session in test runner window with all my tests, everything runs fast.
If i right click on my test foder in solution explorer -> "Run All Unit Tests" -> same issue as described.

At the moment i can run the tests from the test runner windows without any problems.

0

Please sign in to leave a comment.