https://github.com/zapkub/starman
π« Some cat was layin' down some get it on rock 'n' roll, he said
https://github.com/zapkub/starman
apitesting e2e newman postman restfultesting reuse sequence typescript
Last synced: 5 months ago
JSON representation
π« Some cat was layin' down some get it on rock 'n' roll, he said
- Host: GitHub
- URL: https://github.com/zapkub/starman
- Owner: zapkub
- Created: 2019-03-22T09:56:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-22T15:21:46.000Z (almost 3 years ago)
- Last Synced: 2025-04-07T21:45:45.394Z (12 months ago)
- Topics: apitesting, e2e, newman, postman, restfultesting, reuse, sequence, typescript
- Language: TypeScript
- Size: 415 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Starman
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 !! β¨πβοΈ ππΎπ§πΌββοΈπ«
## Considered this example before you decide to use it
1. Prepare your test senario with Postman test API
```js
// 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"
}
)
```
2. 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] β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
3. Enjoy Postman collection after test success



## Installation
> NPM package already has starman package so I should use another package name to publish it π«
```
$ npm i @rungsikorn/starman
$ yarn add @rungsikorn/starman
```
## Usage
See basic usage in `/test/basic.test.ts`