Skip to content

Commit 3a16697

Browse files
committed
Add support for xUnit->nUnit3
1 parent 5045094 commit 3a16697

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/ArchiveXUnitContext.groovy

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ class ArchiveXUnitContext extends AbstractContext {
147147
addResultFile('NUnitJunitHudsonTestType', resultFileClosure)
148148
}
149149

150+
/**
151+
* Adds a NUnit3 report.
152+
*
153+
* @since 1.104
154+
*/
155+
@RequiresPlugin(id = 'xunit', minimumVersion = '1.104')
156+
void nUnit3(@DslContext(ArchiveXUnitResultFileContext) Closure resultFileClosure) {
157+
addResultFile('NUnit3TestType', resultFileClosure)
158+
}
159+
150160
/**
151161
* Adds an PHPUnit report.
152162
*/

job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ class PublisherContextSpec extends Specification {
601601
'msTest' | 'MSTestJunitHudsonTestType'
602602
'mbUnit' | 'MbUnitType'
603603
'nUnit' | 'NUnitJunitHudsonTestType'
604+
'nUnit3' | 'NUnit3TestType'
604605
'phpUnit' | 'PHPUnitJunitHudsonTestType'
605606
'qTestLib' | 'QTestLibType'
606607
'unitTest' | 'UnitTestJunitHudsonTestType'

0 commit comments

Comments
 (0)