meta { name: Login - Invalid Credentials type: http seq: 4 } post { url: {{baseUrl}}/login } headers { Content-Type: application/json } body:json { { "email": "nonexistent@example.com", "password": "wrongpassword" } } assert { res.status: equals 401 res.body.success: equals false } tests { test("Invalid login returns error envelope", function() { const data = res.getBody(); expect(data).to.have.property("success"); expect(data.success).to.equal(false); expect(data).to.have.property("error"); expect(data.error).to.have.property("message"); }); }