简体   繁体   中英

.NET unit test run without Visual Studio

I have build the unit test DDL on my machine and run on the another place without installing visual studio.

To do this, I install the NUnit command line and call the my unit test DLL, and it does not work.

In my C# code I only add the [TestMethod] attribute on my test method.

The below image shows how I call the NUnit on the command line:

在此处输入图片说明

Is there an issue in here, or is there any other way to do this?

Note: I use the Selenium library in my project.

The NUnit console runner is made to run NUnit tests, that is, tests that use the NUnit framework. Since you are using the [TestMethod] attribute, you are probably using Microsoft's test framework.

NUnit used to be delivered (version 2) as a single package, but with version 3 it is divided into several different packages. You will have to download and reference the NUnit framework and change your tests to use its attributes and assertions.

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