what to write in tests, in java script or something else ? I cant find the video where you have told about the syntax on how to write (pm. ), how to write in that syntax and how to validate the id first name last name etc by writing in this way. Please share the links......
Hi. I have a question. I have 2 post requests. Now, i have written pre request script and test such that 1st post request will execute one time and it will go to 2nd post request. When 2nd post request execute, it will again go to 1st request. After 5 iterations, 2nd post request should stop the test. Now my concern is that i am not able to stop the script after 5th iteration. Can you give one example for this? i have used if and else condition. I dont know where to put next request as null
Great video, I have a questions. I am using the csv file and suppose I have 10 rows but one row might have null and I want to skip it and move to the next row. how can approach that. I have tried something like this but it didn't work var resourcetype = pm.iterationData.get("resource_type") if(resourcetype === null) { postman.setNextRequest(null); }
Sir i have a question i have 10 parameters and in first test script i write for positive scenario in which all the parameter will run and register successfully After that 9 more test cases in which one parameter is null respectively ...but in pre request script has more no of lines ...i have use switch case in test script
Hi, is it possible to run an if statement in the Body of postman? If name != null use it...
what to write in tests, in java script or something else ? I cant find the video where you have told about the syntax on how to write (pm. ), how to write in that syntax and how to validate the id first name last name etc by writing in this way. Please share the links......
Check the latest Postman Advance video, i have explained pm object thoroughly
Hi. I have a question. I have 2 post requests. Now, i have written pre request script and test such that 1st post request will execute one time and it will go to 2nd post request. When 2nd post request execute, it will again go to 1st request. After 5 iterations, 2nd post request should stop the test. Now my concern is that i am not able to stop the script after 5th iteration. Can you give one example for this? i have used if and else condition. I dont know where to put next request as null
You need to use logic with condition
i need this code..flow i understand but not able to seen the code,plz reply as soon as possible
Great video, I have a questions. I am using the csv file and suppose I have 10 rows but one row might have null and I want to skip it and move to the next row. how can approach that. I have tried something like this but it didn't work
var resourcetype = pm.iterationData.get("resource_type")
if(resourcetype === null) {
postman.setNextRequest(null); }
I would suggest to sanitise the CSV file first
Hi I need for clarity on this topic with more example
Awesome job! Very well explained.
Very helpful. Thank You!!
Glad it was helpful!
Sir i have a question i have 10 parameters and in first test script i write for positive scenario in which all the parameter will run and register successfully
After that 9 more test cases in which one parameter is null respectively ...but in pre request script has more no of lines ...i have use switch case in test script
Plz rply sir its urgent
let swicthCaseIteration= +pm.environment.get("swicthCaseIteration");
switch(swicthCaseIteration) {
case 0:
pm.environment.set("userMobileNumber", +pm.environment.get("userMobileNumber")+1);
pm.environment.set("i", +pm.environment.get("i")+1);
//pm.environment.set("userName", +pm.environment.get("userName")+1);
pm.variables.set("addressOne", "delhi");
pm.variables.set("addressTwo", "varansi");
pm.variables.set("cityCode", "IN-BR-DH");
pm.variables.set("countryCode", "IN");
pm.variables.set("domainId", 75);
pm.variables.set("emailId", "emailId3{{i}}@gmail.com");
pm.variables.set("firstName", "automate");
pm.variables.set("lastName", "string");
pm.variables.set("mobileCode", "+91");
pm.variables.set("mobileNumber","{{userMobileNumber}}");
pm.variables.set("orgId", 170);
pm.variables.set("roleId", 4);
pm.variables.set("stateCode", "IN-BR");
pm.variables.set("userName", "automation98{{i}}");
pm.variables.set("zipCode", "656689");break;
case 1:
pm.variables.set("addressOne", "");
pm.variables.set("addressTwo", "varansi");
pm.variables.set("cityCode", "IN-BR-DH");
pm.variables.set("countryCode", "IN");
pm.variables.set("domainId", 75);
pm.variables.set("emailId", "emailId3Negativee{{i}}@gmail.com");
pm.variables.set("firstName", "automate");
pm.variables.set("lastName", "string");
pm.variables.set("mobileCode", "+91");
pm.variables.set("mobileNumber","5678907898");
pm.variables.set("orgId", 170);
pm.variables.set("roleId", 4);
pm.variables.set("stateCode", "IN-BR");
pm.variables.set("userName", "automation98Negativee{{i}}");
pm.variables.set("zipCode", "656689");break;
case 2:
I have wrriten like this more 10 cases in pre request and it is of 300 lines how can i reduce this
Create a Javascript object and set in values in Switch (rather all values in env)
@@TheTestingAcademy sir i have created object for positive test cases
Hi, Parmod its very good.thanks.font is very low plz increase so that we easly seen.
easily understandable, thanks :)
Sorry to say but really didn't understand at all what was really explained. Please be very slow
intro so flashy, give me shaking, dis.
Haha, you got this....