How do I print a variable value along with the string in the Test results

Similar topic is discussed here. You can use replaceIn as well like,

pm.test(pm.variables.replaceIn("Response body contains the ID as {{LeadID}}"), function () {
          var jsonData = pm.response.json();
        pm.expect(jsonData.Id).to.eql(pm.environment.get("LeadID"));
    });
2 Likes