Methods annotated with AfterStories are not called if a step is causing a 
RuntimeException
------------------------------------------------------------------------------------------

                 Key: JBEHAVE-465
                 URL: http://jira.codehaus.org/browse/JBEHAVE-465
             Project: JBehave
          Issue Type: Bug
          Components: Core
    Affects Versions: web-3.3
            Reporter: Jan Tietjens


The AfterStory/BeforeStory annotations works in this case, so I would expect 
the same for the AfterStories annotation.

Here is the setup code:

{code}
    StoryPathResolver storyPathResolver = new 
UnderscoredCamelCaseResolver(".story");
    Class storyClass = this.getClass();
    Properties viewProperties = new Properties();
    viewProperties.put("decorateNonHtml", "true");
    URL codeLocation = CodeLocations.codeLocationFromClass(storyClass);
    Configuration configuration = new MostUsefulConfiguration()
            .useStoryControls(new 
StoryControls().doDryRun(false).doSkipScenariosAfterFailure(false))
            .useStoryLoader(new LoadFromClasspath(storyClass.getClassLoader()))
            .useStoryReporterBuilder(new StoryReporterBuilder()
                    .withCodeLocation(codeLocation)
                    .withDefaultFormats()
                    .withViewResources(viewProperties)
                    .withFormats(StoryReporterBuilder.Format.CONSOLE, 
StoryReporterBuilder.Format.TXT,
                            StoryReporterBuilder.Format.HTML, 
StoryReporterBuilder.Format.XML)
                    .withFailureTrace(true))
            .useStoryPathResolver(storyPathResolver)
            .useStepMonitor(new SilentStepMonitor());
    useConfiguration(configuration);
    configuredEmbedder().embedderControls().doGenerateViewAfterStories(true);

    addSteps(new InstanceStepsFactory(configuration, this,
            new CommonSteps(),
            new UserProfileChecks(),
            new CapConnectionWrapper(),
            new SeleniumWrapper()).createCandidateSteps());
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to