如何将多个 vsmdi 文件添加到一个 sln

发布于 2024-12-21 12:22:10 字数 599 浏览 3 评论 0原文

是否可以向解决方案添加多个 vsmdi 文件(包含测试元数据的文件)。

我正在使用一个 sln ,其中包含我的所有测试项目。 创建了一个 vsmdi 文件,它是一个解决方案项,因此位于 sln 级别。 每个 vsmdi 文件都引用一个 testsettings 文件。

现在我的目标是拥有多个 vsmdi 文件,每个文件都有自己的测试设置文件。 现在添加测试设置文件没有问题(sln -> 添加 -> 新项目... -> 测试设置)。 但我找不到如何添加额外的 vsmdi 文件。现在我总是需要更改一个 vsmdi 文件中的 testsettings 引用。

这一切的目的... 我正在使用 MsTest.exe(在控制台线路上)执行 vsmdi 文件,该文件适合我的整体系统测试环境。我使用远程执行(使用测试控制器和测试代理)。此远程执行设置位于 testsettings 文件内。我想执行不同的测试组,每个测试组都针对一组特定的测试代理。可以使用角色和属性在 testsettings 文件中指定测试代理过滤器。如果我有多个 vsmdi 文件,这将解决我的问题。 好吧,我总是可以使用多种解决方案,但这相当麻烦,不是我喜欢的解决方案。

我正在使用 VS2010 Premium、SP1 和FP1。

Is it possible to add more than one vsmdi file (file that contains test metadata) to a solution.

I'm using one sln with all my testprojects in them.
One vsmdi file was created and it is a solution item, thus on sln level.
Each vsmdi file refers to a testsettings file.

Now my goal is to have multiple vsmdi files, each with their own testsettings files.
Now adding a testsettings file is no problem (sln -> Add -> New Item... -> Test Settings).
But I can't find how to add a extra vsmdi file. Now I always need to change the testsettings reference inside the one vsmdi file.

The purpose of all of this...
I'm executing vsmdi files using MsTest.exe (on the console line) which fits into my overall system test environment. I use remote execution (with test controller and test agents). This remote execution setting is inside the testsettings file. I want to execute different group of tests, each on a specific group of test agents. The test agents filter can be specified in the testsettings file using roles and attributes. If I would have multiple vsmdi files this would solve my issue.
Ok, I can always use multiple solutions but this rather cumbersome and not my prefered solution.

I'm using VS2010 Premium, SP1 & FP1.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

冷夜 2024-12-28 12:22:10

您需要测试列表:

1) 创建多个 TL

2) 创建多个与测试列表对应的 .testsettings 文件

3) 从命令行运行 MSTest,指定 .testsettings(运行测试的位置)和测试列表(要运行哪个测试)

因此您会得到类似 mstest /testmetadata:file.vsmdi /testlist:TestList1 的内容/testsettings:Agent1.testsettings

Test lists is what you need:

1) create several TLs

2) create several .testsettings files corresponding to test lists

3) run MSTest from command line specifying both .testsettings (where to run tests) and test list (which tests to run)

So you get something like mstest /testmetadata:file.vsmdi /testlist:TestList1 /testsettings:Agent1.testsettings

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