【发布时间】:2015-12-29 00:08:02
【问题描述】:
如何从 After 钩子中的 Ruby cucumber 测试中获取当前的 Example?
我可以通过下面的代码获得标题。我的Scenario 有几个Examples。我可以访问当前正在测试的Example 吗?
功能文件
Scenario Outline: Successful login with primary accounts
Given I start on the login page
When I log into Overview page with "<acct>"
Then I am on the Overview page
Examples:
| acct |
| account1 |
| account2 |
挂钩后
After do |scenario|
scenario.scenario_outline.title # will give me the title
如何获得当前的Example?
【问题讨论】:
标签: ruby cucumber calabash-android