FormatPostmanJson.js
This 'Pulse Rule' sample takes raw Postman.json and turns them into a format that the auto-test-logs endpoint will understand. At the end of this action, the rule that uses the action "UpdateqTestWithFormattedResults" will be called.
Pulse Rules v9.1
-
FormatPostmanJson.js QASymphony/Pulse Rules v9.1 repository
-
UpdateqTestAndScenarioWithFormattedResults.js QASymphony/Pulse Rules v9.1 repository.
FormatPostmanJson.js
Set up 'Rules' for your own 'Trigger' (webhook) and use the sample 'Actions' provided below.
Setup Pulse Rule
-
Review the qTest Pulse Quick Start Guide for your version of Pulse for complete instructions on how to add Pulse Triggers, Actions, and Rules.
-
Enter the sample Program Code in the Pulse Actions.
For the most up to date sample program code, view the QASymphony/PulseRules repository linked above.
Constants
None
Variables
Fields with a $ and all caps that look like a variable must be updated.
If you'd like to notify Slack that your Jenkins Build has been triggered, fill out the variable with the Slack Event name. If not, remove the emitEvent line from this action.
Example: In Format PostmanJson.js, please replace
-
$YOUR_UPLOAD_TO_qTest_EVENT_URL
UpdateqTestAndScenarioWithFormattedResults.js
Set up 'Rules' for your own 'Trigger' (webhook) and use the sample 'Actions' provided below.
Setup Pulse Rule
-
Review the qTest Pulse Quick Start Guide for your version of Pulse for complete instructions on how to add Pulse Triggers, Actions, and Rules.
-
Enter the sample Program Code in the Pulse Actions.
For the most up to date sample program code, view the QASymphony/PulseRules repository linked above.
Constants
Anything that uses constants.X will need your own constants value.
-
constants.qTestAPIToken
-
constants.ManagerURL
Variables
Fields with a $ and all caps that look like a variable must be updated.
Example: In UpdateqTestAndScenarioWithFormattedResults.js, please replace $YOUR_SLACK_EVENT_NAME