Hello, I have a array variable with multiple ids, and I need to verify the ids if all of them exists in request’s response. response is in TEXT.
Ex. I have idsDashboard variable that is array which contains [100,101,102,103]
I have a response in TEXT format. then i want all ids to be check if they are in the response.
pm.test(“includes”, function () {
var ids = JSON.parse(pm.environment.get(“idsSearchDashboard”));
for(var i in ids){
pm.expect(pm.response.text()).to.include(ids[i]);
}
});