如果断言失败,有没有办法停止测试执行,那么其他测试组将不会被执行?
答案 0 :(得分:4)
Nightwatch.js instance has two objects containing the same methods to perform
assertions on elements:
.assert - when an assertion fails, the test ends, skipping all other assertions.
.verify - when an assertion fails, the test logs the failure and continues with
other assertions.
所以我想使用assert
?除非你是,那不适合你?
答案 1 :(得分:1)
使用assert将停止当前测试,但要停止整个套件,您需要设置设置' skip_testcases_on_fail'在你的nightwatch.json配置文件中为true。