Alrighty!

Thank you very much for the quick fix Mauro. I'll be waiting for 3.5.1 then.


Ciao,
L.

On Tue, Sep 13, 2011 at 11:16 AM, Mauro Talevi
<[email protected]> wrote:
> Bug fixed:  http://jira.codehaus.org/browse/JBEHAVE-599
>
> Will push out a new bugfix release shortly.
>
> Thanks for feedback.
>
> Cheers
>
> On Tue Sep 13 09:47:49 2011, luis wrote:
>>
>> Hi Mauro,
>>
>> Thanks for the quick reply!
>> :-)
>>
>> The problem is that even though I have ignoreFailureInStories=true
>> *and* the FailingUponPendingStep as the PendingStepStrategy, the build
>> in Maven is still succeeding. It is correctly informing me that  he
>> failed to run a story and it is showing the stacktrace for a
>> org.jbehave.core.failures.PendingStepFound exception -- but in the
>> end, the build still succeeds.
>>
>> Is there any other configuration that could affect this?
>>
>>
>> Thanks,
>> L.
>>
>> On Tue, Sep 13, 2011 at 10:06 AM, Mauro Talevi
>> <[email protected]>  wrote:
>>>
>>> And to have generate the view - regardless of the fail/pass status of
>>> scenarios - you need to set the "ignoreFailureInStories=true" flag.
>>>
>>> See the trader example for how to do that.
>>> On Tue Sep 13 09:02:29 2011, Mauro Talevi wrote:
>>>>
>>>> Hi Luis,
>>>> by default, JBehave is configured not to fail on pending steps. You can
>>>> configure a different pending step strategy to fail on pending:
>>>>
>>>> http://jbehave.org/reference/stable/pending-steps.html
>>>>
>>>> Cheers
>>>>
>>>> On Tue Sep 13 08:50:34 2011, luis wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm trying to configure JBehave to fail when it finds pending steps
>>>>> but I would like to have the failures occur as late as possible, after
>>>>> the generation of the view.
>>>>>
>>>>> I've been messing around with the configuration for a while now but
>>>>> clearly there's something I'm still missing here... So, here's my
>>>>> JBehave Runner class:
>>>>>
>>>>>
>>>>> @RunWith(AnnotatedEmbedderRunner.class)
>>>>> @Configure(
>>>>> storyControls = JBehaveTest.MyStoryControls.class,
>>>>> storyReporterBuilder = JBehaveTest.MyReportBuilder.class)
>>>>>
>>>>> @UsingEmbedder(
>>>>> batch = true,
>>>>> embedder = Embedder.class,
>>>>> generateViewAfterStories = true,
>>>>> ignoreFailureInStories = true,
>>>>> ignoreFailureInView = false)
>>>>>
>>>>> @UsingSteps(instances = {
>>>>> JBehaveCreatingAPlaceSteps.class,
>>>>> JBehaveDetailsForAPlaceSteps.class,
>>>>> JBehaveEnhancePlaceSteps.class,
>>>>> JBehaveUserSessionSteps.class,
>>>>> JBehaveMapSteps.class,
>>>>> JBehaveSearchSteps.class
>>>>> })
>>>>> public class JBehaveTest extends InjectableEmbedder {
>>>>>
>>>>> @Test
>>>>> public void run() {
>>>>>
>>>>> List<String>  storyPaths = new
>>>>>
>>>>>
>>>>> StoryFinder().findPaths(CodeLocations.codeLocationFromClass(this.getClass()),
>>>>> "**/*.story", "");
>>>>> injectedEmbedder().configuration().usePendingStepStrategy(new
>>>>> FailingUponPendingStep());
>>>>> injectedEmbedder().embedderControls().useThreads(6);
>>>>>
>>>>> injectedEmbedder().runStoriesAsPaths(storyPaths);
>>>>> }
>>>>>
>>>>> private static class MyReportBuilder extends StoryReporterBuilder {
>>>>>
>>>>> public MyReportBuilder() {
>>>>>
>>>>> Properties viewResources = new Properties();
>>>>> viewResources.put("decorateNonHtml", "true");
>>>>>
>>>>>
>>>>>
>>>>> this.withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass()))
>>>>> .withPathResolver(new
>>>>> FilePrintStreamFactory.ResolveToPackagedName())
>>>>> .withViewResources(viewResources)
>>>>> .withFailureTrace(true)
>>>>> .withFailureTraceCompression(false)
>>>>> .withFormats(CONSOLE, HTML, STATS);
>>>>> }
>>>>> }
>>>>>
>>>>> private static class MyStoryControls extends StoryControls {
>>>>>
>>>>> public MyStoryControls() {
>>>>>
>>>>> doDryRun(false);
>>>>> }
>>>>> }
>>>>> }
>>>>>
>>>>> And I normally run this from Maven, using the jbehave-maven-plugin. I
>>>>> think configuration there is also pretty simple:
>>>>>
>>>>> <plugin>
>>>>> <groupId>org.jbehave</groupId>
>>>>> <artifactId>jbehave-maven-plugin</artifactId>
>>>>> <version>3.4.5</version>
>>>>>
>>>>> <dependencies>
>>>>> <dependency>
>>>>> <groupId>log4j</groupId>
>>>>> <artifactId>log4j</artifactId>
>>>>> <version>1.2.16</version>
>>>>> </dependency>
>>>>> </dependencies>
>>>>>
>>>>> <executions>
>>>>> <execution>
>>>>> <id>run-stories-as-embeddables</id>
>>>>> <phase>integration-test</phase>
>>>>> <configuration>
>>>>> <includes>
>>>>> <include>**/JBehaveTest.java</include>
>>>>> </includes>
>>>>>
>>>>>
>>>>>
>>>>> <annotatedEmbedderRunnerClass>ovi.maps.JBehaveTest</annotatedEmbedderRunnerClass>
>>>>> <scope>test</scope>
>>>>> </configuration>
>>>>> <goals>
>>>>> <goal>run-stories-with-annotated-embedder</goal>
>>>>> </goals>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>>
>>>>> Now, here's the problem I'm having:
>>>>>
>>>>> If I run this from Maven, the build will succeed even though there are
>>>>> Pending steps.
>>>>>
>>>>> If I change ignoreFailureInStories to false, the build will fail but
>>>>> the view will never be generated.
>>>>>
>>>>>
>>>>> So, is there a way of getting the build to fail when there are Pending
>>>>> steps *and* the view to still be generated? What am I doing wrong
>>>>> here?
>>>>>
>>>>>
>>>>> Thanks in advance,
>>>>> L.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe from this list, please visit:
>>>>>
>>>>> http://xircles.codehaus.org/manage_email
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>   http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

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

    http://xircles.codehaus.org/manage_email


Reply via email to