- Rembember to Save before exit
- Variable
2. Environment Level: pm.environment.get("variable_key");pm.environment.set("variable_key","value");
3. Global Level: pm.globals.get("variable_key","value");pm.globals.set("variable_key","value");
pm.variables.get(); to get the variable value
- match with soap UI level
Test Suite-> Folder Resources, etc
Test Case-> Folder Endpoint
Test Steps->Request
- Organize tests into folders
Collection
resource
test suite
workflows.
- maintain separate collections for testing and documentation
- Data driven csv file,json file
- Script: Javascript. On each level
Test: Run after getting response. To Validate the result.
- How to chain API requests
Environment Variable
pm.environment.set("key",value)
var jsonData = JSON.parse(responseBody);
pm.environment.set("key", jsonData.key);
output variable on Console
console.log(pm.environment.get("xxx"))
- Run post from command line
1. Check if node.js and npm is already installed"node -v" "npm -v")
2. Install node.js and npm
3. Install NewMan ("npm intall -g newman")
4. Export collection as Json file
5. newman run colllection.json
Go to collection folder
npm run collection.json -e environment.json -r xxx.html
- Run Postman in Jenkins
2.Build -> running bat, or shell script (adding command for running newman)
3.Apply, Save
4.Run the Job
- JSON Schema validation
- reuse code
- Issues:
When I parse this little piece of JSON
{ "value" : 9223372036854775807 }
that's what I get
{ hello: 9223372036854776000 }
Is there any way to parse it properly?
In JavaScript, one has at most 53 bits for integers. This blog post explains how to work with large integers, by encoding them in strings.
1) Use a parsing library that supports bignumbers
2) Treat numbers as strings
No comments:
Post a Comment