第一个场景作为功能文件registration.feature(feature1)的一部分运行,内容如下:
Scenario: User can register as a Free account Given I am on the home page When I navigate to the Register page And set all required fields for "Free" on the page And check that info about successful registration is shown And activate account Then I copy the Free user information in a data file
然后我想在upgrade_accounts.feature(feature2)下运行以下功能
Feature: Upgrade accounts As an QA Engineer I would like to upgrade my accounts to other types So I can make sure upgrade functionality is working properly Scenario: Existing free account is upgraded to premium Given I navigate to the login page When Sign in as free account retrieved from file And I navigate to updgrade accounts And I select premium account and submit Then Verify premium package is active
我担心的是我如何使用适用于 step 的东西来实现这两个功能之间的连接:Then I copy the Free user information in a data file
from feature1 和When Sign in as free account retrieved from file
on feature2。
所以我想问题是:最好使用哪种方法(gem)将数据从网页复制到文件中并读取并再次使用它?
谢谢!