Let the children lose it π§πΌ
Let the children use it π§π»
Let all the children boogie π§π½
Star(com)man(d) is "newman" with steriod πͺπΌ
Starman let you do Postman collection with the way the developer love it !! β¨πβοΈ ππΎπ§πΌββοΈπ«
- Prepare your test senario with Postman test API
// test-runner.js
Starman(
[
runner => {
runner('Google should be alive', [ // << This is folder name
new StarmanRequestStep('Just call google.com') // << This is request name
.Get('https://www.{{url}}')
.AddTest(pm => {
pm.test("Google.com must return 200 status", () => { // << Write test here !
pm.response.to.have.status(200)
})
})
])
}
],
{
url: 'google.com'
},
{
outputDir: join(__dirname, './basic-collections'),
collectionName: "Google handshake collections"
}
)
- Run this file and you will get the result from "newman"
API Collections E2E testing
β Google should be alive
β³ Just call google.com
GET https://www.google.com [200 OK, 14.8KB, 317ms]
β Google.com must return 200 status
βββββββββββββββββββββββββββ¬βββββββββββββββββββββ¬ββββββββββββββββββββ
β β executed β failed β
βββββββββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββ€
β iterations β 1 β 0 β
βββββββββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββ€
β requests β 1 β 0 β
βββββββββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββ€
β test-scripts β 1 β 0 β
βββββββββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββ€
β prerequest-scripts β 0 β 0 β
βββββββββββββββββββββββββββΌβββββββββββββββββββββΌββββββββββββββββββββ€
β assertions β 1 β 0 β
βββββββββββββββββββββββββββ΄βββββββββββββββββββββ΄ββββββββββββββββββββ€
β total run duration: 447ms β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β total data received: 14.06KB (approx) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β average response time: 317ms [min: 317ms, max: 317ms, s.d.: 0ns] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
NPM package already has starman package so I should use another package name to publish it π«
$ npm i @rungsikorn/starman
$ yarn add @rungsikorn/starman
See basic usage in /test/basic.test.ts