Details
Description
Annotations-based configuration can be preferable to some users.
Investigate and implement annotation-based alternatives to programmatic configuration, which should always be possible.
Annotations-based configuration can be preferable to some users.
Investigate and implement annotation-based alternatives to programmatic configuration, which should always be possible.
Hi,
I think the first thing that needed to be decided is: where will be started the annotation interpretation process?
I could think in two alternatives:
@StepsSettings(classes={StepsTestClass.class}, monitor="") @JBehaveSettings(type = BehaviorType.USER_STORY, logLevel = LogLevel.DEBUG) @RunWith(TestRunner4JBehave.class) Class Cenario1 extends Scenario { @Inject public Cenario2(StoryConfiguration pConfiguration, Set<CandidateSteps> pCandidateSteps) throws Exception { super(pConfiguration, pCandidateSteps); } }Particularly I prefer the first one, so I can use annotations with DI to configure all my jbehave session.
More ideas?
- To use the junit native way and create a class extending from BlockJUnit4ClassRunner. This way each jbehave class should have a @RunWith to indicate that we wanted to use the annotated mode.
- To use some jbehave initialization method to call the annotation interpretation inside it.
Particularly I prefer the first one, so I can use annotations with DI to configure all my jbehave session. More ideas?@StepsSettings(classes={StepsTestClass.class}, monitor="") @JBehaveSettings(type = BehaviorType.USER_STORY, logLevel = LogLevel.DEBUG) @RunWith(TestRunner4JBehave.class) Class Cenario1 extends Scenario { @Inject public Cenario2(StoryConfiguration pConfiguration, Set<CandidateSteps> pCandidateSteps) throws Exception { super(pConfiguration, pCandidateSteps); } }