How can I add to a test, global param value?

How can I add to a test, global param value?

Response:

    "Status": 0,
    "Response_Code": 0,
    "Message": "Successfully done (global_param_value)",

ā€¦

I wrote a test:

pm.test("Status is Success", function () { 

pm.response.to.have.jsonBody("Status", 0);
pm.response.to.have.jsonBody("Response_Code", 0);
 pm.response.to.have.jsonBody("Message", "Successfully done(???)");

});

I need to add a code instead of ā€˜???ā€™
What is the syntax for getting the global variable instead of ā€˜???ā€™

Thanks!

You could try:

pm.response.to.have.jsonBody("Message", `Successfully done(${pm.globals.get('global_var_name')})`)
2 Likes

I am also looking for my project Wellyx which is gym management software.
Thanks @danny-dainton