jaiman
v1.2.3
Published
created for running the postman collection parallelly for time saving purpose
Downloads
134
Maintainers
Readme
npm install -g jaiman
Heads-Up
1] Wrapper around newman and html-extra.
2] Some advantages and some limitations here!
Advantages
1] Parallel Execution
2] Integrated with SMTP
3] Customized Email Subject
4] Customized email receiver. We can specify when to send mail and whom to send mail.
eg : if success automation, send report to these people,
if failed automation, send report to these people.
5] html-extra integrated by default.
6] Quick stat json will be printed at the end [name, total, failed, passed, duration and time]
7] Single collection execution also possbile
- jaiman gmail col-name env-name
- jaiman gmail col-name env-name "[email protected]|[email protected]" "local"
Result
Limitations
1] no seperate json Report - can be possible
2] exported collections/environments should be named with extension json.
3] exported environment's name should have [qa, stg, dev, prod, preprod, na, eu] - because this will be in mail subject.
4] runtime saving key should be unique accross collection. in this parallel execution. if you use same key, that may overwrite in next collection.
Step by Step Installation :
- npm install -g jaiman
- create project directories by
- jaiman generate [project-name] => eg : jaiman generate gmail
- Export your collection in collection folder, export your environment in environment folder as .json file
- That's it.
- jaiman gmail ALL jai-dev = for local execution
- jaiman gmail ALL jai-dev "[email protected]|[email protected]" local = with mail
- Argument structure after jaiman
- arg[1] = project name / folder name
- arg[2] = colection name without .json
- arg[3] = environment name without .json
- arg[4] = [optional] = email Adress = receiptent
- seperated with pipe symbol - examples listed at last
- arg[5] = mandatory when you give email = mail-server-ip
- if you have separate mail server - you can mention ip otherwise simple pass local
- Mail Subject
- Postman_Automation [ stack ] : projectName : ColectionName [ EnvironmentFileName ]
- Postman_Automation [ QA ] : Testing : OverallReport [ jai-env-qa ]
- Incase of single collection execution, you will receive status as well
- Postman_Automation [ QA ] : Testing : OverallReport [ jai-env-qa ] : [ Pass ]
Folder Creation
** jaiman generate projectName **
Execution
jaiman [folder_name-project] all [environment_name] [receiveremail(optional) [passEmail | failEamil]] [mailServerIP / "local"]
eg: jaiman gmail ALL jai-dev "[email protected]|[email protected]"
** jaiman gmail ALL jai-dev "[email protected]|[email protected]" **
Execute all collections :
jaiman [folder_name-project] all [environment_name] [receiveremail(optional) [passEmail | failEamil]] [local | "your mail host ip"]
Mail Properties :
- for mailing argument 4 and 5 is important.
- arg[4] = mail receiptent
- arg[5] = mail server IP or "local"
- if you mention "local", server ip will be set as "127.0.0.1"
- if you mention other than local ["192.1.1.0"], server ip will be set as what you have provided "192.1.1.0"
For pass and fail alert
argument3 should be seperated with | pipe simbol,
before pipe considered as pass emailAdrs
after pipe considered as fail emailArs
Case 1 :
if we provide arg 4 as empty,
email adrs will be taken from the src/resource/config.json
Case 2 :
if we provide arg4 as "[email protected]"
pass / fail - mail will be sent to "[email protected]"
Case 3 :
if we provide arg 4 as "[email protected]|[email protected]"
pass will be send to "[email protected]"
fail will be send to both "[email protected]|[email protected]"