CodedUITest doesnt work with Resharper 7.1.3

Hi,

I have a problem while running coded ui test with resharper ver 7.1.3. In resharper option of my VisualStudio 2012 I have explicitly set "Run Test from" to path of my application under test.Now when I dynamically try to load my application using "Assembly.GetExecutingAssembly().Location" in AssemblyInitialize method of CodedUITest project & try to run it using Resharper Run Test it doesn't return me path of my actual application but rather returns me path from where my Resharper is executing my test project e.g "C:\Users\xyz\AppData\Local\Temp\TestResults\xyz_machinenumber\Out\abc.Test.dll". The error which I get is "The system cannot find the file specified. Aborting test execution". This is because my application is not present at this path. Also, I have tried unchecking "Shadow Copy assemblies being tested" option in resharper but no success. . This approach correctly works if I run my test using MsTest. Any solution to fix this issue.

Thanks,
Muffadal.

8 comments
Comment actions Permalink

Hello,

Could you please try ReSharper 8.0 EAP from here: http://confluence.jetbrains.com/display/ReSharper/ReSharper+8+EAP
It should contain some fixes for these needs, so let me know the results!

Thank you!

0
Comment actions Permalink

Hi Alex,

I tried with Resharper build    8.0.4.1195 & it works fine now. But, in order to get that fix we will have to buy new version of Resharper 8.0 when it gets released. Personally I feel that this problem should be fixed in 7.1 version itlsef because as you already know that main reason of releasing Resharper 7.1.3 version was to fix MSTest related issues. So, similarly this bug should also be part of the same version as it does't really introduce any new functionality.

Thanks.

0
Comment actions Permalink

Hello and sorry for delayed response - we were investigating the differences between 7.1.3 and 8.0 in terms of this case.

Could you please:
1. Check if you have .testsettings file set for the CodedUI test you use?
2. If yes, could you please remove this file, or create a new project with CodedUI test, but without any specific test settings?
3. If it is still reproducible with 7.1.3 and all tests you're working with, could you please create and attach here a small sample, which will demonstrate this issue?
4. Also, could you please attach screenshots of your "ReSharper | Options | Tools | Unit Testing" and "ReSharper | Options | Tools | Unit Testing | MSTest" settings?

Thank you!

0
Comment actions Permalink

Hi Alex,

We do have .runsettings file for our codeduitest applicable to VisualStudio 2012 which is similar to .testsettings file in VisualStudio2010. I tried running codeduitest by deleting that file but I am facing same problem.
I have attached a sample codedui project for your reference. It is basically coded ui test for calculator addition. After compiling the project you need to copy "calc.exe" from %windir%\System32 to /bin/Debug or /bin/Release folder in order to run the TestMethod correctly.

I have also attached screenshots of "ReSharper | Options | Tools | Unit Testing" and "ReSharper | Options | Tools | Unit Testing | MSTest" settings for your referecnce.

With the attached settings I noticed following difference between Reshaper 7.1.3 & 8.0.4 for "Assembly.GetExecutingAssembly().Location" property in my code. You can check the same with the attached sample project.

1. MsTest (Both Resharper version)

D:\CodedUITestProject1\TestResults\mufsir1_WKSPU00432 2013-05-21 12_10_30\Out\CodedUITestProject1.dll

2. Resharper 7.1.3
C:\Users\mufsir1\AppData\Local\Temp\TestResults\mufsir1_WKSPU00432 2013-05-2112_30_44\Out\CodedUITestProject1.dll

3. Resharper 8
D:\CodedUITestProject1\TestResults\mufsir1_WKSPU00432 2013-05-21 12_25_05\Out\CodedUITestProject1.dll

So, because of above differences it works correctly with reshaper 8 & not with resharper 7.1.3.

Thanks,
Muffadal k.



Attachment(s):
ResharperMstestSettings.png
ResharperUnittestSettings.png
CodedUITestProject1.rar.zip
0
Comment actions Permalink

Hi Muffadal,

there is very simple workaround for the problem you are experiencing with ReSharper 7.1.3. I need to add new Test Settings file (on a solution node in Solution Explorer, Add New Item, select Test settings, don't change anything, press OK)

Then point ReSharper to use this file (ReSharper - Options - MSTest - Use Test Run Configuration)

After this one-time setup ReSharper will run tests from project's output folder.

0
Comment actions Permalink

Hi Victor,

I tried the solution you proposed but it doesnt work. It still points to the "C:\Users\xyz\AppData\Local\Temp" while running using Resharper. Also, as per MSDN we are using .runsettings file instead of .testsettings "http://msdn.microsoft.com/en-us/library/vstudio/ee256991.aspx".

Thanks,
Muffadal.

0
Comment actions Permalink

Sorry, ReSharper doesn't support .runsettings file at the moment, here is related issue in our bug tracker:http://youtrack.jetbrains.com/issue/RSRP-336300


Please make sure, that you have selected correct .testsettings file in ReSharper - Options - Unit Testing - MSTest - Use Test Run Configuration
If this error reproduces, please share a sample solution.

0
Comment actions Permalink

Can be solved, remember to reboot after the above operation VS2012. I've been OK

0

Please sign in to leave a comment.