Tips And Tricks

Terje Sandstrom edited this page Apr 27, 2014 · 2 revisions

Settings

Changing the default shadow copy setting

By default the adapter now disables the shadow copy feature. Our testing indicates this works fine for all the test cases we have had. However, if this causes an issue for you it can be changed by adding a registry key:

Use RegEdit  
Go to Current user  
Add a key at "Software\nunit.org\VSAdapter" named 
UseShadowCopy

A DWORD value of 1 enables, 0 disables. If the value is not present the default is 0, disabled.

Changing the behaviour of KeepEngineRunning

By default the NUnit adapter will "Kill" the Visual Studio Test Execution engine after each run. If this is running, we have experienced several cases of builds not being able to override the dlls because of this behaviour. Visual Studio 2013 have got a new setting under its top menu, Test/Test Settings/Keep Test Execution Engine Running". This setting, which is on by default in VS, will by default then be ignored. In some cases it can be useful to have the engine running, f.ex. during debugging of the adapter itself. You can then set the adapter to follow this setting by setting a corresponding registry key. The key is added at current user:

Software\nunit.org\VSAdapter  
and is named  
UseVsKeepEngineRunning  

A DWORD value of 1 makes the adapter follow the setting, a value of 0 makes it ignore it, and the adapter will always shut down the execution engine after a run.

Note: This is not fully tested yet, and some instances of VS 2013 doesn't seem to react to this setting. For these cases the test engine will be shut down.

If the value is not present, the default is 0, disabled.

Setting the verbosity level

Versions below 1.1 will output certain exceptions in a short format, others will be with full stack trace and exception information. The latetr has led to some confusion on whether the adapter continues to work or not. From version 1.1 it will always report a short format as default. You can change it to report a verbose format (as earlier) with stack trace and full information, by setting a registry key: The key is added at current user:

Software\nunit.org\VSAdapter
and is named 
Verbosity 

A DWORD value of 0 - which is the default value, means short format, a value of 1 means full verbosity.