1

出撃をJbehaveに提出するとき

@Override
public InjectableStepsFactory stepsFactory() 
{
         return new InstanceStepsFactory(configuration(), 
                 new LoginSteps(), new PreferencesSteps(), new BetterSteps());
}

それらは、BetterSteps、LoginSteps、PreferenceStpes ファションで実行されます。シナリオを持つこれらのクラスを、アルファベット順ではないカスタム順序で実行するにはどうすればよいですか? LoginSteps に続いて PreferenceSteps に続いて BetterSteps などと言うでしょうか。

4

2 に答える 2

1

あなたの問題の回避策があります..

S1_LoginStepsn が 1,2,3..... のように、Sn から始まるストーリー名を作成できます。S2_PreferenceSteps

Jbehave は、S1 から始まり、S2 からアルファベット順にストーリーを実行します。

于 2013-01-14T09:25:38.107 に答える
0

Do I understand you correctly that you have steps with identical or similar patterns in all of these steps classes and want to control which of them are used over others?

If so, have a look at step prioritization here: http://jbehave.org/reference/stable/prioritising-steps.html and apply priorities to your preferred steps.

于 2012-12-06T10:51:59.083 に答える