Show url from response as a link

I have a pm.test that prints a url from the response, in fact, I have 16 of them. Is there a way to make the printed url appear as a link instead of text?

pm.test("payoff: " + pm.globals.get("mechanism_name") + " PostDeposit eng: " + jsonData.url);

gives:

payoff: CallSpread PostDeposit heb: http://10.1.1.10:8080/FPP/reports/41/onDemandReports/Poalim-Internal-Id_912-170-Typ-0044720-QuotDeposit_iw__202008061157.pdf

Hey @maya.moshe

Welcome to the Postman community! :rocket:

Are you able to provide a sample of what the response body looks like please?

You could use the visualizer feature to print out a set of clickable URLs?

As you’re not really testing anything with those statements would that be a better option?

Hi!
thank you for your response.
here is what the test looks like after running it:
payoff: CallSpread PostDeposit heb: http://10.1.1.10:8080/FPP/reports/41/onDemandReports/Poalim-Internal-Id_912-170-Typ-0044720-QuotDeposit_iw__202008061157.pdf

I’ll try the visualizer, but my goal is indeed to build further tests based on those links, so I’d need another way as well. I aim to have selenium open the links and run a series of tests on them.

That’s not really the response output, that’s the ‘pm.test()’ output which will always pass because it’s not testing anything to fail against. :grin:

Does the response body look like this:

{
    "url": "https://example.com"
}

What type of things are you hoping to test for here?

Sorry, my bad, here is the response:
{

"status": {

    "code": "OK",

    "description": "initial status OK",

    "details": null,

    "override": false,

    "ok": true

},

"fppSatusCode": 0,

"url": "http://10.1.1.19:8089/FPP/reports/41/onDemandReports/Internal-Id_988-177-Typ-0044727-QuotDeposit_iw__202008091041.pdf"

}

The pdf is a report, that needs baseline testing for basic structure consistency and a value comparison for the parameters in the report.