Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4023146
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:33:46+00:00 2026-05-20T10:33:46+00:00

Reading about MSTest and NUnit I couldn’t really decide what to use in my

  • 0

Reading about MSTest and NUnit I couldn’t really decide what to use in my project. We use TFS 2008 and VS2010.

I like MSTest because of its integration into VS2010, Continuous Integration and Code Coverage reports.
I like NUnit because it allows to formulate complex assert statements in a nice, readable fashion.

Stumbling upon http://alsagile.com/archive/2010/03/09/stop-the-war-between-nunit-and-mstest-make-them.aspx I ask the community: is it possible to use both?

I also think about sticking to MSTest and use Fluent Assertions to give me a more flexible way in formulating assert statements. Wouldn’t this be the best option after all?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:33:47+00:00Added an answer on May 20, 2026 at 10:33 am

    I personally don’t like the idea of mixing two frameworks like it’s mentioned in the article you are referring to.

    A possible condition to make your unit test run under both test frameworks could be that you do not want or can not install Visual Studio on your continuous integration server.

    Just for clarification, MSTest is not the Visual Studio Unit Testing Framework defined in the Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll assembly.

    To be able to let your unit test run under both frameworks you would need to define a build constant (here NUNIT) and with the help of preprocessor directives and namespace aliases you would end up with a snippet like this:

    #if !NUNIT
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Category = Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute;
    #else
    using NUnit.Framework;
    using TestInitialize = NUnit.Framework.SetUpAttribute;
    using TestContext = System.Object;
    using TestProperty = NUnit.Framework.PropertyAttribute;
    using TestClass = NUnit.Framework.TestFixtureAttribute;
    using TestMethod = NUnit.Framework.TestAttribute;
    using TestCleanup = NUnit.Framework.TearDownAttribute;
    #endif
    

    I believe I came across this idea first through this MSDN Magazine article. Another worthwhile blog post covering this topic would be:

    • Using nUnit AND Mstest (Visual Studio Unit Testing) together in perfect harmony

    To your last question: The Fluent Assertions project seems to be a good library. I do not see any real reasons why you shouldn’t use it if you like the fluent style of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Reading about Django, I saw this: http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#ref-contrib-admin - the fancy simple to use admin
Was just reading about different algos disassemblers use to identify binary as assembly instructions.
After reading about CCR : http://www.infoq.com/news/2008/12/CCR I get the impression that it does pretty
After reading about salts password hashing Id like to implement a simple version for
Reading about and using the Amazon Web Services, I'm not really able to grasp
Reading about both separatedly, looks like the same, html+xml+javascript. What's the difference between then?
I've been browsing through stackoverflow reading other questions about MSTest and DeploymentItem; I've followed
Reading about TFS' MSF for Agile Software Development v5.0 template ( for example here
After reading about Firefox's Geolocation functionality, which doesn't use GPS , I'm wondering what
Reading about the Dispose pattern , I see the documentation repeatedly refer to cleaning

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.