NUnit 测试运行器 GUI,可以轻松加载多个 DLL
我们有大量带有测试的 DLL。 我正在寻找一个测试运行程序 (GUI),它要么允许我加载文件夹中的所有 DLL,要么可以从 Visual Studio 解决方案文件加载所有测试。 有想法吗?
(我想用它作为我们夜间构建(运行所有测试)的补充而不是替代)。
We have loads of DLLs with tests. I'm looking for a test runner (GUI) that either allows me to load all DLLs in a folder or that can load all tests from Visual Studio solution files. Ideas?
(I would like to use it as a complement rather than a replacement to our nightly builds (that runs all tests)).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我一定错过了一些东西 - 标准 NUnit GUI runner 允许您加载多个程序集并批量运行它们。
7 月 16 日更新
抱歉,我因没有正确阅读问题而感到内疚。 尽管如此,我还是希望以下内容能够有所帮助。
我假设您有一个(可能很大)测试程序集集合,并且希望避免每次运行测试时都手动加载它们。 NUnit“项目文件”可以提供帮助。
在 NUnit GUI 运行程序中,选择
File|New Project
并在项目目录结构的顶部创建一个新的.nunit
文件。 将每个测试程序集添加到该项目中(不幸的是,这似乎是一项逐一的任务,因为没有搜索,甚至没有多重选择)。 添加所有程序集后,保存项目文件。下次您想要运行测试时,只需加载
.nunit
文件即可,然后所有程序集都会被选取以进行测试。这不像通配符那么方便,并且确实需要一些维护,但确实避免了每次都手动选择一大堆程序集。
I must be missing something - the standard NUnit GUI runner allows you to load multiple assemblies and run them as a batch.
Update 16 July
Apologies, I'm guilty of not reading the question properly. Still, I hope the following will be helpful.
I'm assuming that you have a (possibly large) collection of test assemblies, and want to avoid having to load them all manually each time you run tests. NUnit "project files" can help.
Within the NUnit GUI runner, select
File|New Project
and create a new.nunit
file at the top of your projects directory structure. Add each of your test assemblies to this project (Unfortunately, this seems to be a one-by-one task, as there's no search nor even multiselect). Once you've added all assemblies, save the project file.Next time you want to run your tests, you can just load your
.nunit
file and all of your assemblies will be picked up for testing.This isn't as convenient as a wildcard, and it does require a little maintenance, but does avoid having to manually select a whole bunch of assemblies every time.
我可能遗漏了你的一些问题,但如果你的方法确实是对特定文件夹中的所有 DLL 运行测试,那么编写一个小脚本或工具来放置位于某个文件夹中的所有 DLL 的名称列表似乎是一项简单的任务。特定文件夹到生成的 .nunit 文件中。
这些是简单的 XML 文件,可以很容易地自动组成。
I may be missing something of your problem but if your approach is really to run a test over all DLLs in a specific folder it seems an easy task to write a small script or tool that puts a list of the names of all DLLs located in a specific folder into a generated .nunit file.
These are simple XML files that can be automatically composed quite easily.
即使您尚未定义 NUnit 测试项目文件,也可以使用控制台界面在一次运行中运行多个程序集的测试。 以下命令将运行 assembly1.dll、 assembly2.dll 和 assembly3.dll 中包含的一组测试。
You may run tests from multiple assemblies in one run using the console interface even if you have not defined an NUnit test project file. The following command would run a suite of tests contained in assembly1.dll, assembly2.dll and assembly3.dll.
您应该看看 TestDriven.Net - 它与 Visual Studio 集成,允许您右键单击解决方案、项目、文件或方法并运行所有关联的单元测试。 它对学生和开源开发人员是免费的 - 否则你就必须付费。
You should take a look at TestDriven.Net - it integrates with Visual Studio and allows you to right-click a solution, project, file, or method and run all the associated unit tests. It's free for students and open source developers - otherwise you do have to shell out for it.