This is a sample of po-gen implementation in several public API, which are:
-
Install NodeJS and NPM
Check if node and npm are successfully installed:
node -v npm -v
-
Clone repo
-
Create
.env.dev
file with key-value inside:key example value description MAIN bookstore_url
petstore_urlpetstore API is used to give sample for upload file case and the rest is given by bookstore API USER_ID 99741930-****** user id obtained from registration response in bookstore API USER_NAME automation**** user name valid static for automation purpose PASSWORD Password123! password valid static for automation purpose P.S: for
MAIN
value, you can change the value when you need to run one of the case (which are upload file case or the rest)P.S: for user id, user name, and password value, you can get them from creating new account in bookstore API.
-
Run regression runner with:
npm run test:dev
-
Run runner with mochawesome report:
npm run report:dev
-
Run runner for specific runner, which is
file.js
:npm run test runner/file.js
You can see from:
You can see from:
You can see from:
You can see from:
- ID and token: get user by user id case
- ID and token: delete user by user id case
- ID and token: delete books case
- ID: get books by isbn case
- Token, body: create a book case
- ID, token, body: delete a book case
- ID, token, body: edit isbn book case