我已经有一个包含NUnit测试的库的解决方案。在使用Visual Studio开发时,我通常会使用我在项目中的tools\nunit
文件夹中包含的nunit.exe二进制文件来运行这些测试。
现在我正在使用monodevelop开发相同的解决方案。我相当确定我记得monodevelop有一个集成的“运行测试”操作,我想使用它来运行测试。根据这篇文章,应该有一个“查看-单元测试”菜单项。然而,我一定做错了/特殊的事情,因为我找不到它。
如何在Monodevelop中运行我的NUnit测试?
我已经有一个包含NUnit测试的库的解决方案。在使用Visual Studio开发时,我通常会使用我在项目中的tools\nunit
文件夹中包含的nunit.exe二进制文件来运行这些测试。
现在我正在使用monodevelop开发相同的解决方案。我相当确定我记得monodevelop有一个集成的“运行测试”操作,我想使用它来运行测试。根据这篇文章,应该有一个“查看-单元测试”菜单项。然而,我一定做错了/特殊的事情,因为我找不到它。
如何在Monodevelop中运行我的NUnit测试?
试一下这个:
sudo apt-get install monodevelop-nunit
NUnit 3的支持在Xamarin Studio 6.0.0.4514中添加。
(来自https://bugzilla.xamarin.com/show_bug.cgi?id=35915)我使用的是Linux Mint,但仍然是Monodevelop 5.x版本。 - maxkoryukov目前为止,答案可以总结如下:
sudo apt-get install monodevelop-nunit
View | Pads | Unit Tests
在干净的 Ubuntu 12.04 和 MonoDevelop 2.8.6.3 的安装中测试过。
我不记得在Mono Develop中有内置的“运行测试”操作。但是你可以使用一个插件。
Enabling the NUnit Add-in
The NUnit addin requires mono 1.1.9+. This is do to some cross-appdomain bug fixes. Debian users currently also have another particular problem in that NUnit packages are separated from Mono, and do not include the proper pkg-config files.
Configure monodevelop with the following command.
./configure --enable-nunit
Debian users only
Install the nunit and libnunit-cil packages (requires unstable at this moment). Due to the separate packaging of nunit, we need to make a symlink so that monodevelop knows where to find the pkg-config file.
ln -s /usr/lib/pkgconfig/nunit.pc /usr/lib/pkgconfig/mono-nunit.pc
编辑:我在这里找到了更多信息:http://www.codeproject.com/KB/tips/NUnit_MonoDevelop.aspx。如果这不起作用,我明天可能会在我的mono开发中尝试,您使用的是哪个平台?