I need to create tests in Postman for running key values for the AI Conversation app. I have created tests where I have used the logic below, where I can see all of the values after a test run except actual_cpid For all values, I have used https://jsonpathfinder.com/
Postman doesn’t show this value in the result. Could you please help me figure out what I have missed? Thank you!
let jsonData = pm.response.json();
let utterance = jsonData.utterance;
let actual_intent = jsonData.intent.name;
let expected_intent = pm.variables.get("intent");
let actual_grammar = jsonData.grammars.speech_grammar;
let actual_cpid = jsonData.dialog_metadata.outgoing_data.data.CALLPURPOSE_ID;
let actual_dnis = jsonData.dialog_metadata.destination_uri;
tests[" ," + utterance + ", " +
expected_intent + ", " +
actual_intent + ", " +
actual_grammar + ", " +
actual_cpid + ", " +
actual_dnis + ", " +
pm.environment.get("dialog_id")
] = true;
Thanks!