locked
Why does Microsoft shift from VS Unit Test framework to XUnit? RRS feed

  • Question

  • I don't understand the rational why Microsoft is shifting away from Visual Studio Unit Test framework to XUnit.

    • What's the cause?
    • What's the benefit?
    • Why should I follow?
    • Do I need to follow this transition?
    • Under which circumstances?

    Thank you for enlightening me.


    Still people out there alive using the keyboard?

    Working with SQL Server/Office/Windows and their poor keyboard support they seem extinct...

    Saturday, February 21, 2015 1:59 PM

Answers

All replies

  • Hi BetterToday,

    Glad to see you again:)

    >>why Microsoft is shifting away from Visual Studio Unit Test framework to XUnit?

    To really understanding this issue, could you share us certain documents or official information about this issue?

    As far as I know, there is an extension for XUnit:

    https://visualstudiogallery.msdn.microsoft.com/463c5987-f82b-46c8-a97e-b1cde42b9099

    http://blogs.msdn.com/b/visualstudioalm/archive/2012/11/20/part-2-using-traits-with-different-test-frameworks-in-the-unit-test-explorer.aspx

    But I'm not very sure that where you get the information "Microsoft is shifting away from Visual Studio Unit Test framework to XUnit". Please share us more information, so I could provide a correct path this issue.

    Sincerely,

    Jack


    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.

    Sunday, February 22, 2015 9:32 AM
  • Hi Jack,

    hope you're doing fine? :)

    I read this article about the upcoming Visual Studio 2015 release:

    http://www.visualstudio.com/en-us/news/vs2015-preview-vs.aspx

    It reads: "The ASP.NET 5 web template uses Xunit as test framework if a unit test project is to be created at the same time."

    I'm wondering why Microsoft begins utilizing a Medusa of equivalent frameworks and helpers. It's hard to keep abreast with all new frameworks anyway while still creating valuable projects at the same time, and I tend to believe that Microsoft should not add to this complexity without a good reason.

    Hence - because I couldn't find this information yet - I'm wondering what the good reason is for having me learn a second testing framework while I still got other tasks to follow.

    My question is not a provocative one, but a factual one. Please forgive me if it may sound different. But at this time I can't hide the fact that I'm without understanding due to the additional burdon put on my time schedule.


    Still people out there alive using the keyboard?

    Working with SQL Server/Office/Windows and their poor keyboard support they seem extinct...

    Sunday, February 22, 2015 6:08 PM
  • Hi BetterToday,

    Thanks for your friendly response.

    So it is related to the VS2015 Preview.

    Since the RTM version is not released now, acutally we don't support it now, to make this issue clearly, it will be better if we could discuss this issue with the connect team members, so we could know the real development planning for VS unit tests before the VS2015 RTM version releases.

    To get the issue confirmed and diagnose by product team members, would you please create connect report for it? You will get email notification for update.http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx

    So we could have a more thorough understanding to the VS testing from the connect team members, if you submit it, please share me the link here, so we could also get the latest information about this report, I will help you vote it.

    Best Regards,

    Jack


    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, February 23, 2015 2:21 AM
  • Thank you, Jack, for your valuable reply.

    I've now created a Connect issue here:

    https://connect.microsoft.com/VisualStudio/feedback/details/1143852/too-many-equivalent-frameworks-consolidate-to-only-use-one-of-each

    Looking forward to the answers there then.


    Still people out there alive using the keyboard?

    Working with SQL Server/Office/Windows and their poor keyboard support they seem extinct...

    Monday, February 23, 2015 12:00 PM
  • Xunit is not a "new framework" and currently is one of the most actively developed testing framework in .NET.
    Tuesday, September 8, 2015 7:15 AM
  • I see.

    Well, in regard to Visual Studio, however, it is supposed to be regarded as "new" as it was not - and, AFAIK, still isn't - natively supported by Visual Studio Test Runner.

    I tend to expect a single, straightforward, fully supported solution provided by the development environment, not a plethora of half-backed framework suggestions. Others may think different, but I don't want to learn dozens of different alien framework documentations just for the sake of tweaking my development environment.

    I prefer to focus on my own projects and have one full-fledged solution for each facet of development at the ready after installation of Visual Studio.

    That's why I have been asking.


    Still people out there alive using the keyboard?

    Working with SQL Server/Office/Windows and their poor keyboard support they seem extinct...

    • Edited by BetterToday Tuesday, September 8, 2015 11:15 AM
    Tuesday, September 8, 2015 11:15 AM
  • I don't know why, bu a guess would be that xunit can be extended/developed faster than mstest.

    I think Mstest is still folowing the release cycle of visual studio.

    And just go with the flow, xunit is easy to learn.

    Microsoft projects on github..

    MSbuild is switching to xunit

    Roslyn  using xunit

    .net corefx using xunit

    and on and on...

    Perhaps it's time to retire mstest.

    Just try another test framework.

    Thursday, September 10, 2015 12:58 PM
  • After evaluating xUnit I can conclude:

    I don't see any plausible reason for switching to xUnit. It doesn't provide any advantage compared to MSTest - quite the contrary is the case, in fact.


    Still people out there alive using the keyboard?

    Working with SQL Server/Office/Windows and their poor keyboard support they seem extinct...

    • Edited by BetterToday Sunday, September 20, 2015 11:49 AM
    Sunday, September 20, 2015 11:48 AM
  • I agree with your concern on a silent shift, or possibly even a divided internal direction on mstest vs. xunit. However, with xUnit 2.0 I believe it has a lot to offer.

    https://xunit.github.io/docs/running-tests-in-parallel.html


    Chris Wigley MCPD

    Monday, October 5, 2015 12:46 PM