refactor(接口测试): 优化正则匹配模块规则 #26797
Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
parent
0fd091c878
commit
6034f27ed1
|
@ -96,7 +96,8 @@ public class MsExtract extends MsTestElement {
|
||||||
if (extractRegex.isMultipleMatching()) {
|
if (extractRegex.isMultipleMatching()) {
|
||||||
extractor.setMatchNumber(-1);
|
extractor.setMatchNumber(-1);
|
||||||
}
|
}
|
||||||
extractor.setTemplate("$1$");
|
// $1$提取 JSON 响应中的第一个匹配项 $0$用于提取整个 JSON 响应
|
||||||
|
extractor.setTemplate("$0$");
|
||||||
extract.add(extractor.getRefName());
|
extract.add(extractor.getRefName());
|
||||||
|
|
||||||
return extractor;
|
return extractor;
|
||||||
|
|
Loading…
Reference in New Issue