Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Retrieve API test reports in HTML.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Kermagoret committed Jun 28, 2017
1 parent 1aecbe1 commit f95de98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ try {
],
tools: [[$class: 'JUnitType', pattern: 'xunit-reports/**/*.xml']]
])
archiveArtifacts allowEmptyArchive: true, artifacts: 'acceptance-logs/*.txt, acceptance-logs/*.png'
archiveArtifacts allowEmptyArchive: true, artifacts: 'acceptance-logs/*.txt, acceptance-logs/*.png, acceptance-logs/*.html'
}
},
'centos7': {
Expand All @@ -122,7 +122,7 @@ try {
],
tools: [[$class: 'JUnitType', pattern: 'xunit-reports/**/*.xml']]
])
archiveArtifacts allowEmptyArchive: true, artifacts: 'acceptance-logs/*.txt, acceptance-logs/*.png'
archiveArtifacts allowEmptyArchive: true, artifacts: 'acceptance-logs/*.txt, acceptance-logs/*.png, acceptance-logs/*.html'
}
}
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
Expand Down
6 changes: 3 additions & 3 deletions features/bootstrap/RestApiContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public function restApiAreCalled()
$this->logfile = tempnam('/tmp', 'rest_api_log');
exec(
'newman run' .
' --reporters html --reporter-html-export ' . $this->logfile .
' --environment ' . $this->envfile .
' tests/rest_api/rest_api.postman_collection.json' .
' > ' . $this->logfile,
' tests/rest_api/rest_api.postman_collection.json',
$output,
$retval
);
Expand All @@ -69,7 +69,7 @@ public function theyReplyAsPerSpecifications()
if (!($this->retval == 0)) {
copy(
$this->logfile,
$this->composeFiles['log_directory'] . '/' . basename($this->logfile) . '.txt'
$this->composeFiles['log_directory'] . '/' . basename($this->logfile) . '.html'
);
unlink($this->logfile);
throw new \Exception(
Expand Down

0 comments on commit f95de98

Please sign in to comment.