Hey, how can I check the body response if it includes a variable?
I want to check if the body includes a certain string, however I want to give the variable to be checked, but haven’t been able to get the postman to work it it.
-the variable is a string, used earlier in the collection and it acts like a title, that should appear on my get request. the below script works if I put the string itself, however I want to put the variable, as I change the variable often and don’t to manually change the string.
pm.test("Body matches string", function () { pm.expect(pm.response.text()).to.include(Variable); });