は、私が機能ファイルにcucumber-jvmの別の機能の中で機能を呼び出す方法は?
Feature: Create Profile
Scenario: Create Profile
Given I want to create a profile
When I create a profile
Then I should be navigated to Home Page
Then sign out link should exist
を持っているので、上記はすべて、[OK]を実行し、それが戻っホームページで確かだと看板アウトリンクが存在すると主張しています。
もう1つの機能ファイルがあります。 "When I go to my account page"
ステップを実行する前に
Feature: Go to my account page
Scenario: Go to my account page
Given I want to go to my account page
When I go to my account page
Then I should be navigated to the my account page
、ユーザーが"Create Profile"
必要があります。
だから何私がやったことは、私がWhen I go to my account page
前
When I create a profile
Then I should be navigated to Home Page
Then sign out link should exist
を付加しました。
しかし、「プロファイルの作成」機能/シナリオにある同じコードが重複していることがわかります。
「アカウントに移動」のシナリオで、「プロファイルの作成」機能/シナリオ全体を実行するにはどうすればよいですか?
私はcucumber-jvmをSeleniumとJUnitで使用しています。
'CreateProfile'またはフィーチャー' VerifyProfile'に関連するすべてのメソッドを呼び出す 'createOrVerifyProfile'メソッドを作成する必要があります。 –