gpt4 book ai didi

ruby - cucumber :后台失败仍然以代码 0 退出

转载 作者:数据小太阳 更新时间:2023-10-29 08:28:45 26 4
gpt4 key购买 nike

我想知道一些事情,当后台失败时,cucumber 返回退出代码 0(据我所知,这意味着“确定”)。

现在失败的步骤可能不应该出现在后台(我猜最好是出现在“之前”-hook 中??)。但是有人知道它以什么哲学返回这个退出代码吗?是错误还是功能?

附录:一个更具体的例子:假设此代码通过:

 Feature: Figuring out how Cucumber works

As a developer
I want to find out why cuccies fail, but my build doesnt
In order to have more confidence in my build

Background: logging in into the system
Given I am logged in

Scenario: creating a new test set
When I do something
Then I should see "you've done something"

它以退出代码 0 返回。让我们让它失败:

 Background: logging in into the system
Given I am logged in

Scenario: creating a new test set
Then I should see "there's no way you see this"
When I do something
Then I should see "you've done something"

输出显示失败的步骤并返回退出代码 1当我将失败的步骤移至后台时:

 Background: logging in into the system
Given I am logged in
Then I should see "there's no way you see this"

Scenario: creating a new test set
When I do something
Then I should see "you've done something"

输出仍然显示失败,但返回退出代码 0

最佳答案

我问过 Cucumber 的人(他们的邮件列表),他们同意这是一个错误

http://groups.google.com/group/cukes/browse_thread/thread/e56699f0fabfc75f

关于ruby - cucumber :后台失败仍然以代码 0 退出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8559694/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com