Hi
I’m noticing that my k6 code coverted from Postman by postman-to-k6 behaves exactly like my Postman code.
Despite using pm.response.to.have.status(reason), which is unsupported in postman-to-k6
That’s a bit weird to me.
Typical test looks like (simplified):
postman[Request]({
name: “Get Journal selections (FHIR)”,
method: “GET”,
address:
“{{server}}/DIPS-WebAPI/HL7/FHIRDSTU2/ValueSet?_query=JournalGroupsProfile”,
headers: {
“Auth-ticket”: “{{AuthTicket}}”
},
post(response) {
pm.test(“Status code is 200”, function() {
pm.response.to.have.status(200);
});
},
});