Postman 邮递员或接线员
我将测试结果视为通过字段A为“A”或字段B为“B”。我怎样才能在《邮递员》中做到这一点 我试过了Postman 邮递员或接线员,postman,postman-collection-runner,Postman,Postman Collection Runner,我将测试结果视为通过字段A为“A”或字段B为“B”。我怎样才能在《邮递员》中做到这一点 我试过了 (pm.expect(responseJson.output.generic[0].fieldA).to.eql(pm.iterationData.get("A"))||pm.expect(responseJson.output.generic[0].fieldB).to.eql(pm.iterationData.get("B"))) 你可以试试 pm.ex
(pm.expect(responseJson.output.generic[0].fieldA).to.eql(pm.iterationData.get("A"))||pm.expect(responseJson.output.generic[0].fieldB).to.eql(pm.iterationData.get("B")))
你可以试试
pm.expect(cond1 | | cond2).to.be.true代码>
在你的情况下,我想那应该是
pm.expect(
responseJson.output.generic[0].fieldA === pm.iterationData.get("A") ||
responseJson.output.generic[0].fieldB === pm.iterationData.get("B")
).to.be.true;