mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
adapt the NewmanExecuteTest to windows file system
This commit is contained in:
parent
8c4c76dd05
commit
81c0110740
@ -92,7 +92,7 @@ steps:
|
|||||||
newmanCollection: '**/*.postman_collection.json'
|
newmanCollection: '**/*.postman_collection.json'
|
||||||
newmanEnvironment: ''
|
newmanEnvironment: ''
|
||||||
newmanGlobals: ''
|
newmanGlobals: ''
|
||||||
newmanRunCommand: "run ${config.newmanCollection} --environment '${config.newmanEnvironment}' --globals '${config.newmanGlobals}' --reporters junit,html --reporter-junit-export target/newman/TEST-${config.newmanCollection.toString().replaceAll('/','_').tokenize('.').first()}.xml --reporter-html-export target/newman/TEST-${config.newmanCollection.toString().replaceAll('/','_').tokenize('.').first()}.html"
|
newmanRunCommand: "run ${config.newmanCollection} --environment '${config.newmanEnvironment}' --globals '${config.newmanGlobals}' --reporters junit,html --reporter-junit-export target/newman/TEST-${config.newmanCollection.toString().replace(File.separatorChar,(char)'_').tokenize('.').first()}.xml --reporter-html-export target/newman/TEST-${config.newmanCollection.toString().replace(File.separatorChar,(char)'_').tokenize('.').first()}.html"
|
||||||
pipelineStashFilesAfterBuild:
|
pipelineStashFilesAfterBuild:
|
||||||
runOpaTests: false
|
runOpaTests: false
|
||||||
stashIncludes:
|
stashIncludes:
|
||||||
|
@ -86,11 +86,11 @@ class NewmanExecuteTest extends BasePiperTest {
|
|||||||
void testExecuteNewmanWithFolder() throws Exception {
|
void testExecuteNewmanWithFolder() throws Exception {
|
||||||
jsr.step.newmanExecute(
|
jsr.step.newmanExecute(
|
||||||
script: nullScript,
|
script: nullScript,
|
||||||
newmanRunCommand: 'run ${config.newmanCollection} --iteration-data testDataFile --reporters junit,html --reporter-junit-export target/newman/TEST-${config.newmanCollection.toString().replaceAll(\'/\',\'_\').tokenize(\'.\').first()}.xml --reporter-html-export target/newman/TEST-${config.newmanCollection.toString().replaceAll(\'/\',\'_\').tokenize(\'.\').first()}.html'
|
newmanRunCommand: 'run ${config.newmanCollection} --iteration-data testDataFile --reporters junit,html --reporter-junit-export target/newman/TEST-${config.newmanCollection.toString().replace(File.separatorChar,(char)\'_\').tokenize(\'.\').first()}.xml --reporter-html-export target/newman/TEST-${config.newmanCollection.toString().replace(File.separatorChar,(char)\'_\').tokenize(\'.\').first()}.html'
|
||||||
)
|
)
|
||||||
// asserts
|
// asserts
|
||||||
assertThat(jscr.shell, hasItem('newman run testCollectionsFolder/A.postman_collection.json --iteration-data testDataFile --reporters junit,html --reporter-junit-export target/newman/TEST-testCollectionsFolder_A.xml --reporter-html-export target/newman/TEST-testCollectionsFolder_A.html'))
|
assertThat(jscr.shell, hasItem('newman run testCollectionsFolder'+File.separatorChar+'A.postman_collection.json --iteration-data testDataFile --reporters junit,html --reporter-junit-export target/newman/TEST-testCollectionsFolder_A.xml --reporter-html-export target/newman/TEST-testCollectionsFolder_A.html'))
|
||||||
assertThat(jscr.shell, hasItem('newman run testCollectionsFolder/B.postman_collection.json --iteration-data testDataFile --reporters junit,html --reporter-junit-export target/newman/TEST-testCollectionsFolder_B.xml --reporter-html-export target/newman/TEST-testCollectionsFolder_B.html'))
|
assertThat(jscr.shell, hasItem('newman run testCollectionsFolder'+File.separatorChar+'B.postman_collection.json --iteration-data testDataFile --reporters junit,html --reporter-junit-export target/newman/TEST-testCollectionsFolder_B.xml --reporter-html-export target/newman/TEST-testCollectionsFolder_B.html'))
|
||||||
assertJobStatusSuccess()
|
assertJobStatusSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user