我的测试用例中有一些验证点。即使验证部分失败,测试用例的执行也不应该停止,它应该记录失败消息并继续执行剩余的脚本
*** Test Cases ***
Validating Dropdown
${sums}= ['1234','455','4689','9837']
${sum2}= ['1234','455','46','9837']
${sum_count}= Get Length ${sums}
FOR ${i} IN RANGE ${sum_count}
${sums}[${i}]==${sum2}[${i}]
END
${sums3}= ['12','455','4689','9837']
${sum4}= ['34','455','46','9837']
${sum_count1}= Get Length ${sums3}
FOR ${i} IN RANGE ${sum_count}
${sums3}[${i}]==${sum4}[${i}]
END
${sums5}= ['1234','455','4689','9837']
${sum6}= ['1234','455','4689','9837']
${sum_count2}= Get Length ${sums5}
FOR ${i} IN RANGE ${sum_count}
${sums5}[${i}]==${sum6}[${i}]
END
整个脚本将在for循环中运行它不应该停止即使特定的验证失败它应该继续执行脚本并记录每个验证的结果无论它是失败还是通过
整个脚本将在for循环中运行,即使特定验证失败,也不应停止执行,应继续执行脚本并记录每次验证的结果,无论其在Robot Framework中是失败还是通过
1条答案
按热度按时间ffscu2ro1#
由于语法错误,您的测试失败。错误如下:
在每个循环中,你并没有调用关键字,它也会失败。
这应该是一个可能的纠正测试用例: