Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# Unit Testing in C# Unit Testing xUnit.net Unit Test Framework

Shawn McCall
Shawn McCall
7,863 Points

Visual Studio 2017 Not Discovering Test Cases

After obtaining xunit through the nugut package explorer and failing to find the option to select it as a Test Framework, I decided to use the MSTestv2 framework. Oddly enough, Visual Studio 2017 can't seem to discover any of the test cases generated by the scaffolding. Any tips? Thanks.

James Churchill
James Churchill
Treehouse Teacher

Shawn,

Were you able to resolve this issue? If not, can you share your VS solution?

Thanks ~James

1 Answer

Radu - Adrian Buha
PLUS
Radu - Adrian Buha
Courses Plus Student 5,535 Points

Had the same issue. But I've discovered that MSTestv2 framework has different test methods from Xunit. Although the name is sometimes similar, you may want to use Xunit if you want to completely follow along this series. For example, I got stuck on the "Isolation Testing" tutorial from this series because I couldn't find the Xunit "Assert.All()" equivalent for MSTestv2 framework.

Also, I my opinion this specific tutorial should be updated.