简体   繁体   中英

Is there a way to tell cucumber not to skip other tests in a scenario when a test fail?

有一种方法可以告诉黄瓜在测试失败的情况下不要跳过其他测试?

If one part of a scenario messes up, it generally doesn't make sense to continue.

If you want them to keep going, or they logically make sense to be ran (not coupled with other actions), they probably don't belong in the same scenario

Scenario: making a sandwich:
Get bread... Success
Get peanut butter... Success
Get knife... Fail (no knives)
Use knife on peanut butter... errr... what knife?

In my experience continuing the tests doesn't make any sense.

Could you post an example of your Scenario?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM