Einblicke in Postman
Version 6.0.7crypto.js
pm.sendRequest("https://postman-echo.com/get", function (err, response) {
console.log(response.json());
});
pm.environment.get("variable_key");
pm.variables.set("variable_key");
var hash = CryptoJS.MD5("Message");
console.log(hash.toString())
pm.test("Response time is less than 200ms", function () {
pm.expect(pm.response.responseTime).to.be.below(200);
});
pm.test("Your test name", function () {
var jsonData = pm.response.json();
pm.expect(jsonData.value).to.eql(100);
});
var schema = {
"items": {
"type": "boolean"
}
};
var data1 = [true, false];
var data2 = [true, 123];
pm.test('Schema is valid', function() {
pm.expect(tv4.validate(data1, schema)).to.be.true;
pm.expect(tv4.validate(data2, schema)).to.be.true;
});