NUnit 测试运行器 GUI,可以轻松加载多个 DLL

发布于 2024-07-27 02:21:58 字数 182 浏览 4 评论 0原文

我们有大量带有测试的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

音盲 2024-08-03 02:21:58

我一定错过了一些东西 - 标准 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.

毁梦 2024-08-03 02:21:58

我可能遗漏了你的一些问题,但如果你的方法确实是对特定文件夹中的所有 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.

毁梦 2024-08-03 02:21:58

即使您尚未定义 NUnit 测试项目文件,也可以使用控制台界面在一次运行中运行多个程序集的测试。 以下命令将运行 assembly1.dll、 assembly2.dll 和 assembly3.dll 中包含的一组测试。

nunit-console 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.

nunit-console assembly1.dll assembly2.dll assembly3.dll
滥情稳全场 2024-08-03 02:21:58

您应该看看 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文