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.
我有一个 rspec 测试套件,它们分为不同的文件。每个文件都代表一个带有一些测试步骤的测试场景。现在,在某些特定测试中,可能会发生特定步骤失败,但它太耗时并且不需要在该场景中运行其余步骤。
我知道 rspec 中有一个选项 --fail-fast 但是如果我正在运行如下测试: rspec spec/* 这意味着当任何脚本中的第一步失败时,它将中止完整的执行。我只是在寻找在发生故障时中止执行该特定测试场景(测试脚本)但继续执行其他测试场景的机制。
谢谢你的帮助,巴基尔
使用RSpec-instafail gem。
根据其文档,它:
Show failing specs instantly. Show passing spec as green dots as usual.