我提取了一个包含字符串列表的 JsonArray,并且我想通过正则表达式验证该对象中的每个字符串。问题,我似乎在 Taurus 的网站上找不到任何答案。你知道我该怎么做吗?下面的例子:
# Verification of value inside the JsonArray
extract-jsonpath:
names: $.names
- foreach: name in names
do:
- jsonpath: ${name} # if this JSONPATH is not found, assert will fail
validate: true # validate against an expected value
expected-value: "\\w" # value we're expecting to validate. [default: false]
regexp: true # if the value is regular expression, default: true
expect-null: false # expected value is null
invert: false # invert condition