简体   繁体   中英

How Do I Run xUnit.NET Unit Tests in Monodevelop?

How do I run xUnit.net unit tests from Monodevelop? I have version 5.9.6 installed on LMDE and have installed the xUnit.NET testing framework support Add-In. I have a test project that I installed the xUnit.NET NuGet package to and wrote some test in it. AFAIK I have set up everything correctly.

However, the Unit Tests pad is empty and I can't run any tests from Run -> Run Unit Tests. I know a need a test runner, but I can only seem to find the one for Visual Studio. Do I already have the runner and not know it? I've never set up a testing environment before and am at a loss as to what else I need to do.

Edit

I have found the xunit.net console runner and installed it. I can now run my tests from the console runner and can debug my tests from Run -> Debug Application... However, my tests are still not recognized within monodevelop and still do not show up in the unit tests pad.

I run my xUnit-tests under Monodevelop only with the Add-in.

I noticed when you have referenced another unit-test framework in your project, no tests will appear in the pad.

Try to remove nunit.framework reference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM