0

For Example, if below is my response:

{
    "rule":"1001",
    "fixedResponse":"101JOB0011102JOB0012"
}

Based on fixedResponse field value, can I create a test case like a function within a function for each job validation?

pm.test("Validate Resposne"),function(){
    if(pm.response.json().fixedResponse.inculde("101JOB"))
        pm.test("101 JOB vlaidaiton"),function(){
    }
}
Christian Baumann
  • 3,188
  • 3
  • 20
  • 37
  • I'm not sure what you're trying to do here, what's the purpose of the test case within a test? What are you actually trying to assert against? – Danny Dainton May 11 '20 at 21:49
  • Let say, I have 1st check the presence of String and if the string is present then I would need to split it and check for split value base on a request filed passed. – Vivek Rangaraj May 11 '20 at 22:10
  • 1
    Why do you need a test inside a test to do that? Write a test to check the value is present and then write another one to check the value. – Danny Dainton May 11 '20 at 22:17

0 Answers0