Regex gatling jsonPath部分字符串匹配
我的完整代码如下所示Regex gatling jsonPath部分字符串匹配,regex,scala,performance-testing,gatling,Regex,Scala,Performance Testing,Gatling,我的完整代码如下所示 val TC04 = feed(accountNumberFeeder04).exec(http(testCase04).post(appendPathToUrl).headers(common_header).body(postPayload).asJSON .check(jsonPath("$..errorMessage").is(errorMessage04)) ) 所以我的HTTP响应有一些动态文本 说bla-bla-bla我的信息中的部分每次都会
val TC04 = feed(accountNumberFeeder04).exec(http(testCase04).post(appendPathToUrl).headers(common_header).body(postPayload).asJSON
.check(jsonPath("$..errorMessage").is(errorMessage04))
)
所以我的HTTP响应有一些动态文本
说bla-bla-bla
我的信息中的部分每次都会被更改
那么,如何使用gatlingdsl或一些正则表达式匹配部分字符串呢
.check(jsonPath("My error message is bla bla bla ....").is("My error message"))
如果您可以表达正确的jsonPath,但.is()条件限制太大,您可以尝试使用.exists(),它只检查给定jsonPath中的任何内容是否匹配。请发布更多上下文。这段代码使用什么库?您是否正在使用Play框架进行开发?