我正在尝试使用 jmeter 中的响应断言来断言响应的两个字符串是否相同,但它显示错误

I am trying to assert if two strings of a response are same or not using response assertion in jmeter but it's showing an error

在响应断言中,我已将要测试的字段作为文本响应和模式匹配作为包含

要测试的模式是 ${bookmark_ALL}${value}=${value}${other_bookmark_ALL}

我已经使用 json 提取器获取了这些书签值,也为其匹配了 -1,两个书签值都是字符串格式

如果你想比较 2 JMeter Variables using Response Assertion,正确的设置应该是这样的:

您可以使用 Debug Sampler

检查 JMeter 变量值

另外 contains 模式采用正则表达式,很可能您正在寻找 substring

更多信息:How to Use JMeter Assertions in Three Easy Steps