Thanks Mauro for the quick reply.  I'll try that out.

Laura

On Wed, Jan 21, 2009 at 5:11 AM, Mauro Talevi
<[email protected]> wrote:
> Hi Laura,
>
> both maven and ant scenario runners have flags to enable users to skip tests
> or ignore failures (similarly say to Maven's surefire unit test runner).
>
> By default, these two flags are set to false.
>
> I've updated the wiki page to make these flags explicit:
>
> http://jbehave.org/documentation/scenarios/running-scenarios/
>
> You could set the ignoreFailure flag to false to enable you to run all
> tests.   But I think it's not quite what you are looking for:  you seem to
> want a report that summons up the scenario successes and failures.
>
> That's on our todo list - but contributions are most welcome! :-)
>
> I hope to start looking at reporting stuff soon.
>
> Cheers
>
> Laura Vendramini wrote:
>>
>> Hi,
>> I have been using Maven2 and JBehave trying to work on a simple
>> example  calculator project. I tried to run through 3 scenarios.
>> Everything works fine if all the scenario results matches. However
>> when the results doesn't match, during test phase (mvn test) the
>> scenario runs until it reaches a scenario that fails and the process
>> stops. Say for example I have 3 scenarios, CalculatorSpecs,
>> MultiplyIntegersSpecs, SubtractIntegersSpecs, if MultiplyIntegersSpecs
>> fail it will give me a build error and stops without running
>> SubtractIntegersSpecs. I want to know how to make it run through all
>> of the scenarios and tell me which ones failed.
>>
>> Note: I am trying to set up and pom.xml so that it works as I expect.
>> I am not using an IDE to run the behavioral tests. The multiply
>> scenario has been deliberately made so that it gives an error.
>>
>>>>>> console error<<<<
>>
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [surefire:test]
>> [INFO] No tests to run.
>> [INFO] [jbehave:run-scenarios {execution: run-scenarios-found}]
>> [INFO] Running scenario CalculatorExample.spec.CalculatorSpecs
>> [INFO] Running scenario CalculatorExample.spec.MultiplyIntegersSpecs
>>
>>
>> Scenario: MultiplyIntegersSpec
>>
>> Given I have two integers 5 and 2
>> When I want to multiply 5 and 2 together
>> Then the TOTAL should be 12 (FAILED)
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Failed to run scenario CalculatorExample.spec.MultiplyIntegersSpecs
>>
>> Embedded error:
>> Expected: &lt;12&gt;
>>     got: &lt;10&gt;
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 3 seconds
>> [INFO] Finished at: Tue Jan 20 09:16:11 EST 2009
>> [INFO] Final Memory: 10M/18M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>>>>> Inside pom.xml (plugin for jbehave)<<<<
>>
>> <plugin>
>>      <groupId>org.apache.maven.plugins</groupId>
>>      <artifactId>maven-surefire-plugin</artifactId>
>> </plugin>
>> <plugin>
>>      <groupId>org.jbehave</groupId>
>>      <artifactId>jbehave-maven-plugin</artifactId>
>>      <executions>
>>            <execution>
>>                  <id>run-scenarios-found</id>
>>                  <phase>test</phase>
>>                  <configuration>
>>                        <scenarioIncludes>
>>
>> <scenarioInclude>CalculatorExample/spec/*.java</scenarioInclude>
>>                        </scenarioIncludes>
>>                        <scenarioExcludes>
>>
>>  <scenarioExclude>**/*Steps.java</scenarioExclude>
>>                        </scenarioExcludes>
>>                  </configuration>
>>                  <goals>
>>                        <goal>run-scenarios</goal>
>>                  </goals>
>>            </execution>
>>      </executions>
>> </plugin>
>>
>> File structure:
>> Src ->CalculatorExample -> code (contain the source file)
>> Src ->CalculatorExample -> spec (contain the scenario files)
>>
>> Thanks,
>> Laura
>>
>> ---------------------------------------------------------------------
>> 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