2

我有多个测试程序集,例如 Test-A.dll 、Test-B.dll 、Test-C.dll ,其中包含 Nunit 测试用例。我的问题是如何使用像 Test-*.dll 这样的通配符为这些程序集设置这些 Nunit 测试用例

4

1 回答 1

1

根据这个问题,这是 TeamCity 功能,而不是 NUnit 功能。因此,除非您编写一些自定义解决方案,否则您无法使用 Jenkins。

编辑:我使用以下 Powershell 步骤进行操作:

$tests = ''
Get-ChildItem -path "." -Recurse -Include "Test*.dll" | Where-Object {$_.DirectoryName -Match ".*\\bin\\Debug"} | foreach {$tests += ($_.toString() -ireplace ([regex]::Escape($env:WORKSPACE) + '\\'), ' ')}
$env:COMPLUS_Version='v4.0.30319'
Invoke-Expression "c:\PrivateWS\resources\NUnit-2.6.3\bin\nunit-console.exe $tests /result:nunit-result.xml"
于 2015-01-13T14:51:41.457 回答