locked
Cannot get Unit Tests to run for Windows Phone 8.1 RRS feed

  • Question

  • Hello,

    I am simply trying to get ANY unit test to run from a Visual c# > Windows > Windows 8 > Windows Phone > Unit Test App

    In Visual Studio 2015 Version 14.0.25425.01 Update 3, I created a new solution with a Windows 8 > Windows Phone > Blank App (Windows Phone) then I added a Windows 8 > Windows Phone > Unit Test App.

    (I have done this many times in a row, including following this: https://msdn.microsoft.com/en-us/library/windows/apps/dn168930(v=vs.105).aspx )

    inside the test class I add the simplest test I know:

    [TestMethod]
    public void TestMethod1()
    {
        Assert.IsTrue(true);
    }

    Then I simply go to Test Explorer and after a build, no tests show up.

    Resharper "Sees" the tests but if I try to run them with Resharper's test runner, they do not run.

    I've tried this on three different development machines (All Windows 10 - pro and enterprise) and none of them work.

    Help.

    Lee


    C# developer in a C++ world

    Saturday, September 3, 2016 9:59 PM

Answers

  • Hi Lee,

    Besides the Resharper 9.1, do you have used other third part tools and extensions in your Visual Studio 2015? Please remove all the third part tools/extensions to confirm this issue is not caused by the third part tools/extensions.

    Then please check whether the driver where your solution stored is in protected. You need administrator access to read/write to this driver. You could run your Visual Studio as administrator.

    And if your solution is 64 bit, make sure that Test > Test Settings > Default Processor Architecture is set to x64. Sometimes it gets set to x86. Set it to x64, then rebuild.

    In addition, please create a new common Unit Test, not a Windows Unit Test app, to check whether all Unit Test are not shown in Test Explorer.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Weiwei Cai Monday, September 12, 2016 9:38 AM
    • Marked as answer by Weiwei Cai Tuesday, September 13, 2016 8:43 AM
    Friday, September 9, 2016 5:21 AM

All replies

  • Hi Lee,

    According to your description, I tested in my Visual Studio 2015 with Update 3 (the same version with you) on both of my Windows 8.1 and Windows 10 machine. I also don't get the TestMethod in Test Explorer when I first time build it.

    But when I try rebuild my Unit Test app again, the TestMethod shown in Test Explorer and you can run it correctly. Please rebuild your Unit Test App project again to check whether it will be shown.

    In addition, you mentioned you are using Resharper, which is a third part tool in Visual Studio. I suggest you remove these third part extensions/tools of Visual Studio and build your Unit Test app to confirm whether your issue is caused by the third part extensions/tools.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 5, 2016 6:18 AM
  • Thank for the suggestion.  I uninstalled Resharper 9.1.  The project still did not find the Windows Phone Unit tests.  I then created a completely new solution and reproduced the steps I outlined above. 

    Unfortunately this did not work either.

    Any other suggestions?


    C# developer in a C++ world

    Thursday, September 8, 2016 2:09 PM
  • Hi Lee,

    Besides the Resharper 9.1, do you have used other third part tools and extensions in your Visual Studio 2015? Please remove all the third part tools/extensions to confirm this issue is not caused by the third part tools/extensions.

    Then please check whether the driver where your solution stored is in protected. You need administrator access to read/write to this driver. You could run your Visual Studio as administrator.

    And if your solution is 64 bit, make sure that Test > Test Settings > Default Processor Architecture is set to x64. Sometimes it gets set to x86. Set it to x64, then rebuild.

    In addition, please create a new common Unit Test, not a Windows Unit Test app, to check whether all Unit Test are not shown in Test Explorer.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Weiwei Cai Monday, September 12, 2016 9:38 AM
    • Marked as answer by Weiwei Cai Tuesday, September 13, 2016 8:43 AM
    Friday, September 9, 2016 5:21 AM