I am trying to implement test to use the crypto. Do Postman still support as part of scripting, if not please specify th change


For more trials I have used

pm.test(“Body matches string”, function () {
var cryptoRandomString = require (‘crypto-random-string’);

Response on UI, Test Results
Body matches string | Error: Cannot find module ‘crypto-random-string’

Postman sandbox doesn’t include crypto. Certain cryptographically secure random number generation related algorithms aren’t possible. I’m afraid, you’ll have to impersonate the same using Math.random