2011-03-02 133 views
0

假设我有一组相关的特征X,Y和Z.每个特征都有一个我已经充实的情景的详细列表。黄瓜是否支持元特征?

有没有办法使用Cucumber声明所有三个功能都已经实现?

喜欢的东西:

Scenario Outline: All gamma features are ready 
    Given feature <f> is part of the gamma release 
    When I try to use feature <f> 
    Then feature <f> should just work 

    Scenarios: 
    | f | 
    | X | 
    | Y | 
    | Z | 

Then /feature (\S*) should just work/ do |f| 
    `cucumber [email protected]#{f}` # except less repetitive and more awesome 
end 

我知道我可以只创建一个伽玛标签和运行针对,但我想以某种方式记录了释伽的全部准备就绪。也许这没有意义,但在我的脑海中也不是很清楚。

回答

1

也许你正在想的相反?

也许你需要的是为未来的版本添加标记的内容。然后运行:

cucumber [email protected],[email protected] 

消除未来delta和epsilon发布功能并运行alpha,beta和gamma功能。

看起来这样会更容易实现未来,因为您将完全消除“未标记”的alpha,beta和gamma特征。

另一种选择是简单地标记正在开发的东西,并在功能准备就绪时删除这些标签。

cucumber -t [email protected]_dev