Ajay Singh Beniwal
Ajay Singh Beniwal

Reputation: 19037

Setting up Jenkins for Multiple Test Assemblies with Nunit

I have multiple Test Assemblies like Test-A.dll ,Test-B.dll ,Test-C.dll which contains Nunit test case. My question is how to set up these Nunit Test case for these assemblies with wildcard chracter like Test-*.dll

Upvotes: 2

Views: 433

Answers (1)

Nicolas Mommaerts
Nicolas Mommaerts

Reputation: 3263

According to this issue that is a TeamCity feature, not an NUnit one. So unless you write some custom solution you can't with Jenkins.

Edit: I got it working with the following Powershell step:

$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"

Upvotes: 1

Related Questions