您的位置:首页 > 其它

Jbehave - Annotation

2014-02-25 12:29 267 查看
1. method step annotations:

@Given
@When
@Then
@Alias
@Aliases(当一个method可以被多个
step 使用时)
@Pending( 当当前还不能确定时)

Each step candidate corresponds to one Java method and to oneStepTyp

Note that each method can supports
aliases and a different step candidate is created for each alias.

2.
method scenario annotations:

@BeforeScenarioa
@AfterScenario

Optionally,theScenarioType
can bespecified to execute only upon that type, e.g. for
scenariosparametrised by examples. In addition, @AfterScenarioallows the setting of an optionalOutcome
value,which specifies whether the method should be executed depending on the outcomeof the scenario:

3. method story annotations:

@BeforeStory
@AfterStory

The @BeforeStory and @AfterStory annotations allow the corresponding methods to be executed before and aftereach story, either aGivenStory ornot:

4. Behave supports the following method stories annotations:

@BeforeStories
@AfterStories

The @BeforeStories and @AfterStories annotations allow the corresponding methods to be executed before and after acollection of stories: (如何选取story?)

5. parameter annotations:

@Named ( 如何使用?)

Parameter annotations are used in
parameterinjection.

6. configuration annotations:( 如何使用?)

@AsParameterConverter
@Configure
@UsingEmbedder
@UsingSteps
@UsingGuice
@UsingNeedle
@NeedleInjectionProvider
@UsingPico
@UsingSpring
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: