您如何将 Cucumber 场景标记为待处理如何将、标记、场景、Cucumber

2023-09-07 23:44:32 作者:有什么熬不过

How do I mark a cucumber scenario as pending so it doesn't get counted as a passed?

Scenario: Guest should not see edit link
# pending implementation

Shouldn't I be able to mark is as pending?

解决方案 Cucumber测试实践

Okay figured this one out.

The Scenarios steps are marked as pending if it's not found in any of the steps files.

Scenario: New product form should have some special field
  Given joe is logged in as an user
  When on the new exercise page
  Then the select field should have some special field

It's even nice enough to stub out the pending step.

When /^on the new exercise page$/ do
  pending # express the regexp above with the code you wish you had
end