英文:
Can we append custom text with match in Karate DSL like * match city == 'Pune', 'City Name matching'
问题
可以在Karate DSL中像这样附加自定义文本与匹配吗:
- match city == 'Pune', '与城市名匹配'
在这里,它试图匹配整个文本'Pune City Name matching'。但我想只匹配'Pune'并附加文本'City Name matching'。
类似于以下方式:
Assert.assertEquals(city, "Pune", "城市名检查已完成");
英文:
Can we append custom text with match in Karate DSL like:
- match city == 'Pune', 'City Name matching'
Here, it is trying to match whole text 'Pune City Name matching'. But I want to match only 'Pune' and need to append text like 'City Name matching'
Something like below:
Assert.assertEquals(city, "Pune", "City Name Check Completed");
答案1
得分: 1
这不受支持。您可以查看karate.fail()
以满足非常定制的需求或贡献代码。还可以参考:https://stackoverflow.com/a/54108755/143475
英文:
No this is not supported. You can look at karate.fail()
for very custom needs or contribute code. Also see: https://stackoverflow.com/a/54108755/143475
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论