fix(接口测试): 修复文档断言长度失败的缺陷
--bug=1029411 --user=王孝刚 【接口测试】github#26338,【接口定义】文档结果校验,当校验array长度等于具体值时,出现断言失败,但实际这个数组长度确实是7 https://www.tapd.cn/55049933/s/1410876
This commit is contained in:
parent
7000e965e0
commit
60d6a5d904
|
@ -11,7 +11,6 @@
|
|||
type="number"
|
||||
@change="change"
|
||||
@input="input"
|
||||
:min="1"
|
||||
:placeholder="$t('api_test.request.assertions.response_in_time')"
|
||||
onKeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))" />
|
||||
</el-col>
|
||||
|
|
|
@ -35,7 +35,7 @@ public class DocumentUtils {
|
|||
isTrue = StringUtils.contains(resValue, expectedValue);
|
||||
break;
|
||||
case "length_eq":
|
||||
isTrue = getLength(resValue, decimalFormatter) == numberOf(item.getValue());
|
||||
isTrue = getLength(subj, decimalFormatter) == numberOf(item.getValue());
|
||||
break;
|
||||
case "length_not_eq":
|
||||
isTrue = getLength(subj, decimalFormatter) != numberOf(item.getValue());
|
||||
|
|
Loading…
Reference in New Issue