locked
When will I be able to unit test in Visual Studio 2015 with ASP.NET MVC6? RRS feed

Answers

  • Meanwhile I can work around this, using XUnit:

    As of July 31 2015, with ASP.NET 5 beta 6 current, with Visual Studio 2015 release edition, it does not appear possible to use the standard Microsoft Unit Test framework with ASP.NET 5.

    However, you can get XUnit.net unit testing to work, using a modified version of the instructions at the XUnit github project.

    I have created a working sample and uploaded it to bitbucket:

    https://bitbucket.org/wpostma/aspnet5mvc6xunitdemo


    wp

    • Marked as answer by Tina-Shi Monday, August 3, 2015 3:16 AM
    Friday, July 31, 2015 5:40 PM
  • The product team has now added this feature to Visual Studio 2015!

    https://blogs.msdn.microsoft.com/visualstudioalm/2016/05/30/announcing-mstest-framework-support-for-net-core-rc2-asp-net-core-rc2/

    Hooray!


    wp

    Thursday, June 2, 2016 1:19 PM

All replies

  • My best guess from the roadmap is that I will be able to unit test when Beta 8 ships on or around 21 Sep 2015.

    https://github.com/aspnet/Home/wiki/Roadmap

    You know what? I like the new open and rather transparent Microsoft.     Kudos to everybody who decided to put the roadmaps up on Github with the source. You guys rock.


    wp

    Thursday, July 30, 2015 6:04 PM
  • Hi Warren,

    Thank you for posting in MSDN forum.

    Since I found that the Add unit tests option is grayed out when I select the Web application from this ASP.NET 5 Preview Templates from VS2015.

    And I did some research about this issue, but I did not find any official document about this issue.

    So I suggest you should submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx, Microsoft engineers will evaluate them seriously.

    After you submit the feedback, you can post the link here which will be beneficial for other members with the similar issue.

    Thanks for your understanding.

    Best Regards,


    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.

    Friday, July 31, 2015 10:10 AM
  • Hi Tina,

    ASP.NET 5 is in a "preview" state and is not feature complete.  So I think maybe someone who is familiar with the product roadmap (which is on github) could probably tell me in which beta milestone this feature will reach us.

    If it does not, then I guess November 2015 is when they expect to be feature complete. 

    I don't think this is a bug it's just not "done" yet.

    W


    wp

    Friday, July 31, 2015 5:40 PM
  • Meanwhile I can work around this, using XUnit:

    As of July 31 2015, with ASP.NET 5 beta 6 current, with Visual Studio 2015 release edition, it does not appear possible to use the standard Microsoft Unit Test framework with ASP.NET 5.

    However, you can get XUnit.net unit testing to work, using a modified version of the instructions at the XUnit github project.

    I have created a working sample and uploaded it to bitbucket:

    https://bitbucket.org/wpostma/aspnet5mvc6xunitdemo


    wp

    • Marked as answer by Tina-Shi Monday, August 3, 2015 3:16 AM
    Friday, July 31, 2015 5:40 PM
  • Hi Warren,

    Thanks for your reply.

    I am glad that you have solved this issue and thanks you share the work around for us so that it would be helpful for other member encounter a similar issue.

    Thanks,


    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, August 3, 2015 3:16 AM
  • The product team has now added this feature to Visual Studio 2015!

    https://blogs.msdn.microsoft.com/visualstudioalm/2016/05/30/announcing-mstest-framework-support-for-net-core-rc2-asp-net-core-rc2/

    Hooray!


    wp

    Thursday, June 2, 2016 1:19 PM