With a recent new project using NET Core 2, my team and I looked at whether we should move to MS Test(Didn't consider MS Test 2 at that time), st...
For further actions, you may consider blocking this person and/or reporting abuse
There is no enough differences between theirs. Finally choose which one, but the better decision is that the team feel confortable using it.
For me xUnit and my team, choose xUnit because its part of .Net Foundations, I like his syntaxis and works like a charm with Test Explorer plugin with VSCode.
That's how we setup unit testing and code coverage. Maybe can help other.
.Net Core Unit Test and Code Coverage with Visual Studio Code
Camilo Martinez ・ Sep 28 '18 ・ 6 min read
My only gripe with Xunit is I can't print out to console from within my sut. The author's explanation on why is based on the purist's way of thinking. However, there are practical reasons why that feature would've been helpful.
All three are pretty much at parity feature wise.
Besides xBehave, I think it's worth mentioning other BDD test frameworks (e.g., Xunit.Gherkin.Quick especially that it was written for Xunit with the same motivations). xBehave keeps both the Gherkin-like text and the code in the same place, which creates coupling. I believe that they are easier to maintain and use for the right purpose when they are separate (which is what Xunit.Gherkin.Quick allows).
Disclaimer - I am the author of the referenced BDD framework. I found this article because I was wondering whether there is a demand for nUnit with BDD too.
Hi Tengiz, thanks for the feedback. I've only included xBehave as an example. I'll update to include Xunit.Gherkin.Quick. Cheers.
Actually MS Tests supports parameterized tests since 2016 (and yes, that was quite surprise for me either).
That's correct, I'll update the post. I have used MSTests with parameterised tests before, but I am not a fan of the implementation. I prefer the xUnit way compared to NUnit and MSTest.
18 months later, how do you feel about your decision? I'll be making a similar one soon for a new project.
Sorry for the late reply. I've moved on to another company, but we were happy with our choice. I am using MSTest, we are not looking into migrating to another framework for now 😅 I miss xUnit!
Given what you know now with the performance benchmarks in the Microsoft blog, would you still make the same choice or would you have stuck with NUnit?
I still stick with xUnit, as I think that the extra seconds that I will gain does not outweigh the benefits of xUnit or significant enough to make me switch from what a framework that will make me write better and cleaner tests. I am also hoping that this gap between the two will be smaller in the future.
Thanks for sharing your experience evaluating unit test frameworks and providing links to useful resources. The insight was helpful as we face a similar decision.
You are welcome :)
I guess you meant nUnit ? :)
Nice article, it answers to my question !
Thanks Raphaël, i've now corrected this :)