Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果出现给定情况,我有一组测试会使整个测试套件崩溃。此外,这种情况已经是套件的失败。
我宁愿在系列设置期间测试条件是否为真,而不是崩溃,并在失败时快速中止它。
那可能吗?
是的,您可以随时通过以下方式使测试失败:
fail("And here you give the reason for the failure")