Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.