Specflow, Coded UI tests and resharper unit test runner giving an exception

I have created a specflow test and wired this up with Coded UI tests so we can have BDD UI Automation. The class looks like this


using System.Linq;
using Microsoft.VisualStudio.TestTools.UITesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TechTalk.SpecFlow;

namespace CodedUITests
{
    [Binding]
    public class BanklinkWizardStepDefinitions
    {

        [BeforeScenario()]
        public void PrepareForTest()
        {
            Playback.Initialize();
        }

        [Given(@"I have a some thing")]
        public void GivenIHaveSomeThing(Table table)
        {
            UIMapLoader.Common.CreateSomeThing();
        }

        [AfterScenario()]
        public void CleanupTest()
        {
            Playback.Cleanup();
        }
}




Now this works fine when running the test in Visual Studio's test runner but when i try to run it in Resharper i get this exception


---------------------------
ReSharper
---------------------------
Unit Test Runner failed to load test assembly:
JetBrains.ReSharper.TaskRunnerFramework.TaskException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
---------------------------
OK
---------------------------



It looks like it can't load the coded ui test reference but i'm not sure why, i am using mstest for the specflow tests. Anyone have any idea why its not running in resharper?
10 comments

Which ReSharper version do you use?
CodedUI tests were not supported in ReSharper 5.x. But they are supported in latest ReSharper 6 EAP builds. Please try them.

0

I downloaded the latest version today from the website but that seems to be 5x.

0

Just tried version ReSharperSetup.6.0.2155.183 and I get this exception. When is this feature likely to be resolved?

System.ArgumentNullException was unhandled by user code
  Message=Value cannot be null.
Parameter name: source
  Source=System.Core
  ParamName=source
  StackTrace:
       at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
       at System.Linq.Enumerable.ToLookup[TSource,TKey](IEnumerable`1 source, Func`2 keySelector)
       at JetBrains.ReSharper.UnitTestRunner.MSTest.MsTestTaskRunner.RunTests(MsTestTestAssemblyTask testAssemblyTask) in c:\BuildAgent\work\c4b2ec378d776aaa\src\UnitTestRunner.MSTest10\src\MsTestTaskRunner.cs:line 94
       at JetBrains.ReSharper.UnitTestRunner.MSTest.MsTestTaskRunner.ExecuteRecursive(TaskExecutionNode node) in c:\BuildAgent\work\c4b2ec378d776aaa\src\UnitTestRunner.MSTest10\src\MsTestTaskRunner.cs:line 59
       at JetBrains.ReSharper.TaskRunnerFramework.CurrentAppDomainHost.Execute(TaskExecutionNode node) in c:\BuildAgent\work\c4b2ec378d776aaa\src\TaskRunnerFramework\src\Impl\CurrentAppDomainHost.cs:line 139
  InnerException:


Thanks

David

0

Please, try the recent nightly build.

0

Have tried the latest build 2156 and I no longer get the exception message....but now it does not attempt to run the test. The session screen looks like it is doing something but does not display the method under test.

0

Could you please provide sample solution to reproduce this problem?

0

Please find attached requested project vs2010.

Thanks



Attachment(s):
ResharperCodedUITests.zip
0

Please, try 6.0 RC build. Works fine for me on your sample solution.

0

Please sign in to leave a comment.