jeudi 9 août 2018

How to set a failed in a PPOSTMAN Collection runner via script

i wanna ask how can i set a "FAILED" via script? I have a IF and in this if i wanna check is X compare to Y. If not i wanna get an "FAILED". For now i get an "FAILED" in my console but the test is "PASS". I already searched other sites but found nothing about this. Hope u now what i mean.

   if(pm.iterationData.get("ProfileSeries") == response.ProfileSeries){
    console.log("expProfileSeries " + pm.iterationData.get("ProfileSeries") + " = "+ response.ProfileSeries);
    }
    else{
         console.log("FAILED");
}

Aucun commentaire:

Enregistrer un commentaire