https://github.com/kaizen-inc/postman-gradle-plugin
A Gradle plugin to run postman collections
https://github.com/kaizen-inc/postman-gradle-plugin
gradle gradle-plugin kotlin newman newman-runner postman postman-collection
Last synced: 4 months ago
JSON representation
A Gradle plugin to run postman collections
- Host: GitHub
- URL: https://github.com/kaizen-inc/postman-gradle-plugin
- Owner: kaizen-inc
- License: mit
- Created: 2024-03-28T15:42:12.000Z (about 2 years ago)
- Default Branch: develop
- Last Pushed: 2024-06-13T17:50:39.000Z (about 2 years ago)
- Last Synced: 2024-06-13T20:47:15.405Z (about 2 years ago)
- Topics: gradle, gradle-plugin, kotlin, newman, newman-runner, postman, postman-collection
- Language: Kotlin
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# postman-gradle-plugin
A Gradle plugin to run [postman](https://www.postman.com/) collections
The runner makes use of [newman](https://github.com/postmanlabs/newman) run by [gradle-node-plugin](https://github.com/node-gradle/gradle-node-plugin).
#### Usage
```groovy
plugins {
id "inc.kaizen.postman"
}
```
postman collection file is to be configured in gradle script to run.
```groovy
// postmanrunner configuration
postman {
// specifies collection file pattern
// default: src/test/**/*.postman_collection.json
collection = file("./src/test/resources/sample-collection.json")
}
```
That's all needed to execute the postman task:
`./gradlew runCollection`, you can find the task under postman group
An optional configuration of postman itself is done with the `postman` extension:
```groovy
// postman configuration
postman {
// specifies collection file pattern
// default: src/test/**/*.postman_collection.json
collection = file("./src/test/resources/sample-collection.json")
// specifies the test environment to execute the collections with
// default: no environment
environment = file('src/test/some_environment.postman_environment.json')
// specifies any environment variables to execute the collections with
// will override any values from the environment file above
// default: no environment variables
envVars = [ "myVar" : "myVarValue" ]
// specifies the a global variable file to execute the collections with
// default: no globals
globals = file('./postman_globals.json')
// specifies any global variables to execute the collections with
// will override any values from the globals file above
// default: no global variables
globalsVars = [ "myVar" : "myVarValue" ]
// stops entire execution on first failing test in a collection
// default: false
stopOnError = true
// enables/disables ssl verification checks and allows self-signed certificates
// default: true
secure = false
}
```