Resharper 2017.1: Missing the option to Run tests from: alternate location.

Answered

I am looking at the help and it says there should be an Option that says "Run tests from:" which will allow unit tests to run from a different location than the Bin folder (see help page here: https://www.jetbrains.com/help/resharper/2017.1/Reference__Options__Tools__Unit_Testing.html)

But my options dialog is missing this setting. I need this setting because my build location is not the usual location. I am pretty sure that I used to have this setting, but now I cannot find it anywhere.  Here is what my options looks like:

 

Is there another way to run unit tests from an alternate location? Where did this setting go? 

I have not tried uninstalling and re-installing, but I do have the latest version.

 

Thank you.

 

Shawn

5
10 comments
Official comment

The mentioned setting worked for NUnit framework only. For others, like most flavours of MSTest and the first reincarnation of .netcore-targeted tests, it was impossible to make this work. Of course, it could have been moved to NUnit page, but..

But most importantly it was basically useless. No, it was actually harmful. It created an indirection layer, where we would try to run not the tests we trully found, but some other that happen to be in the directory, just hoping they will be the same. Moreover, other people were often confusing it for a setting specifying where artefacts will get copied to before running tests.

Never in my experience did I need to copy test artefacts using an after-build step. What stops you from setting up the build so that it would put artefacts along with dependencies in a folder specified as output in project properties?

Avatar
Permanently deleted user

I need this setting too to prevent copying files to weird temp folders. Huge PITA.

0
Avatar
Permanently deleted user

I need this setting too. It keeps the one I've set with the previous version but I cannot change it now with the 2017.1.1.

0
Avatar
Permanently deleted user

Hi Eugene!

I understand, but...

But you should not use setting that user could not change any more. I got stuck with the directory set before the update to 2017.1.1.

I had no idea what version have this setting in the GUI so I've exported the .DotSetting, modified the below line and imported.

Snippet

<s:Boolean x:Key="/Default/Environment/UnitTesting/UseCustomStartDirectory/@EntryValue">True</s:Boolean>

It is possible to keep this and change the folder if needed.

Snippet

<s:String x:Key="/Default/Environment/UnitTesting/CustomStartDirectory/@EntryValue">C:\SomeCustomStartDirectory</s:String>

 

 

0
Avatar
Permanently deleted user

No, this feature wasn't useless at all. In fact is one of the reasons why my organization has been using resharper for a while now.

We have a legacy monolithic application with a thousand+ projects , mostly C#. We also have a custom way to build it that among many other things, copies all the assemblies output to a couple of specific folders where it runs. 

We have been using this feature, to be able to run unittest from this common folder where all the assemblies lives, where also a custom IoC will resolve dependencies. As this is a (complex and) legacy investing on changing all the way it get's build is out of question. Therefore the lack of this feature prevent us to run the tests the way we have been doing it for at least the past 5 years. 

Of course we have been investing into breaking out this monolith into micro services, but in the meantime, we won't be able to use resharper to run tests anymore.

 

 

3

We will add this option back. Make it clearer what it does. Now with reworked MSTest runner (still in progress) it will be possible to extend this option to MSTest too.

0
Avatar
Permanently deleted user

Yes, please add it back in. We have to downgrade ReSharper because we can't use its testing frontend with our project layout anymore,

0
Avatar
Permanently deleted user

Yes, I had to downgrade too... :(

Thank you for your help with this JetBrains.

Shawn

0

The issue I have with it's removal is that I just spent over 2 hours trying to find where it is configured as my unit tests are failing with an assembly load failure. I can see that they are probing a (very specific) path I think I configured a while ago. But that doesn't show up in the UI. However I just finally found it in the GlobalSettingsStorage.DotSettings file.

If you're going to deprecate a configuration option, perhaps you should remove it from the config file too.

0

Hello everyone!

 

Thank you for the feedback.

Due to many user requests Unit testing option 'Run tests from' is back in the latest ReSharper version.

Thank you.

0

Please sign in to leave a comment.