1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/documentation/docs/steps/testsPublishResults.md

109 lines
2.8 KiB
Markdown
Raw Normal View History

2019-04-03 11:29:57 +02:00
# ${docGenStepName}
2018-04-04 10:52:45 +02:00
2019-04-03 11:29:57 +02:00
## ${docGenDescription}
2018-04-04 10:52:45 +02:00
## Prerequsites
2018-04-04 10:54:23 +02:00
* **test result files** - To use this step, there must be test result files available.
2018-04-04 10:52:45 +02:00
* installed plugins:
* [junit](https://plugins.jenkins.io/junit)
* [jacoco](https://plugins.jenkins.io/jacoco)
* [cobertura](https://plugins.jenkins.io/cobertura)
* [performance](https://plugins.jenkins.io/performance)
## Pipeline configuration
none
## Explanation of pipeline step
Usage of pipeline step:
```groovy
testsPublishResults(
junit: [updateResults: true, archive: true],
jacoco: [archive: true]
)
```
2019-04-03 11:29:57 +02:00
## ${docGenParameters}
2018-04-04 10:52:45 +02:00
### junit
2018-04-04 10:52:45 +02:00
| parameter | mandatory | default | possible values |
| ----------|-----------|---------|-----------------|
| pattern | no | `'**/TEST-*.xml'` | |
2018-04-04 10:52:45 +02:00
| archive | no | `false` | true, false |
| updateResults | no | `false` | true, false |
| allowEmptyResults | no | `true` | true, false |
### jacoco
2018-04-04 10:52:45 +02:00
| parameter | mandatory | default | possible values |
| ----------|-----------|---------|-----------------|
| pattern | no | `'**/target/*.exec'` | |
| include | no | `''` | `'**/*.class'` |
| exclude | no | `''` | `'**/Test*'` |
| archive | no | `false` | true, false |
| allowEmptyResults | no | `true` | true, false |
### cobertura
2018-04-04 10:52:45 +02:00
| parameter | mandatory | default | possible values |
| ----------|-----------|---------|-----------------|
| pattern | no | `'**/target/coverage/cobertura-coverage.xml'` | |
| archive | no | `false` | true, false |
| allowEmptyResults | no | `true` | true, false |
| onlyStableBuilds | no | `true` | true, false |
### jmeter
2018-04-04 10:52:45 +02:00
| parameter | mandatory | default | possible values |
| ----------|-----------|---------|-----------------|
| pattern | no | `'**/*.jtl'` | |
| errorFailedThreshold | no | `20` | |
| errorUnstableThreshold | no | `10` | |
| errorUnstableResponseTimeThreshold | no | `` | |
| relativeFailedThresholdPositive | no | `0` | |
| relativeFailedThresholdNegative | no | `0` | |
| relativeUnstableThresholdPositive | no | `0` | |
| relativeUnstableThresholdNegative | no | `0` | |
| modeOfThreshold | no | `false` | true, false |
| modeThroughput | no | `false` | true, false |
| nthBuildNumber | no | `0` | |
| configType | no | `PRT` | |
| failBuildIfNoResultFile | no | `false` | true, false |
| compareBuildPrevious | no | `true` | true, false |
| archive | no | `false` | true, false |
| allowEmptyResults | no | `true` | true, false |
2019-04-03 11:29:57 +02:00
## ${docGenConfiguration}
2018-04-04 10:52:45 +02:00
## ${docJenkinsPluginDependencies}
2019-05-24 15:41:49 +02:00
2018-04-04 10:52:45 +02:00
## Side effects
2018-04-04 10:52:45 +02:00
none
## Exceptions
2018-04-04 10:52:45 +02:00
none
## Example
2018-04-04 10:52:45 +02:00
```groovy
// publish test results with coverage
testsPublishResults(
junit: [updateResults: true, archive: true],
jacoco: [archive: true]
)
```
```groovy
// publish test results with coverage
testsPublishResults(
junit: [pattern: '**/target/TEST*.xml', archive: true],
cobertura: [pattern: '**/target/coverage/cobertura-coverage.xml']
)
```