[jbehave-user] Migration of JBehave JIRA

2015-05-21 Thread Mauro Talevi
The Codehaus JBehave JIRA instance 
(http://jira.codehaus.org/browse/JBEHAVE) has been disactivated.


JBehave JIRA has migrated from Codehaus to Atlassian Cloud:

https://jbehave.atlassian.net/projects/JBEHAVE

The existing user names have been maintained but no user information 
such as passwords and emails has been migrated.


You need to create an account on Atlassian Cloud via the link on the 
login page.


Mauro








-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




[jbehave-user] Migration of JBehave mailing lists

2015-05-17 Thread Mauro Talevi
As Codehaus is closing down, the JBehave mailing lists have been 
migrated to Google Groups.


Unfortunately, Google Groups imposes a limit on the number of members 
that can be manually added each day.


So you should subscribe to the new lists of interest:

https://groups.google.com/forum/#!forum/jbehave-announce
https://groups.google.com/forum/#!forum/jbehave-dev
https://groups.google.com/forum/#!forum/jbehave-scm
https://groups.google.com/forum/#!forum/jbehave-user



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Jbehave4, Spring4, and Java 1.8

2015-05-13 Thread Mauro Talevi

Hi Brian,

the upcoming releases will be JDK 8 compatible.

https://jira.codehaus.org/browse/JBEHAVE-1066

Cheers, M

On 13/05/2015 18:38, Brian Jordan wrote:

Hi,

We have a walking skeleton using Jbehave, Spring4, and Java 1.8.  We 
had to modify the Spring release to 4.1.1.RELEASE in jbehave-spring as 
opposed to Spring 3.1.1.RELEASE in order to compile with Java 1.8. 
 The readme states Jbehave works with 1.7+ so we wanted you to be 
aware of this issue.


Below is the maven dependency tree info:

[INFO] +- org.jbehave:jbehave-spring:jar:4.0-beta-11:compile

[INFO] |  +- org.springframework:spring-context:jar:3.1.1.RELEASE:compile


We get an error from Spring context because of the changes to handling 
casting arrays in Java 1.8.  Below is the stacktrace:


2015-05-13 12:28:22.827:INFO:/:main: Initializing Spring root 
WebApplicationContext


12:28:23 [main] ERROR o.s.w.c.ContextLoader - Context initialization 
failed


java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to 
java.lang.String


at 
org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:91) 
~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]


at 
org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:69) 
~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]


at 
org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:246) 
~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]


at 
org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) 
~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1427) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:174) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:510) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


... 64 common frames omitted

Wrapped by: 
org.springframework.beans.factory.BeanDefinitionStoreException: 
Unexpected exception parsing XML document from URL 
[jar:file:/Users/brianjordan/.m2/repository/org/resthub/resthub-jpa/2.2.0/resthub-jpa-2.2.0.jar!/resthubContext.xml]; 
nested exception is java.lang.ClassCastException: [Ljava.lang.String; 
cannot be cast to java.lang.String


at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187) 
~[spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125) 
~[spring-web-4.1.1.RELEASE.jar:4.1.1.RELEASE]


at 
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94) 

Re: [jbehave-user] Fwd: jbehave localization

2015-05-06 Thread Mauro Talevi

Yes, keyword synonyms are supported:

http://jbehave.org/reference/stable/keyword-synonyms.html

On 06/05/2015 18:03, Attila Franczen wrote:


Hello guys,

Is it possible to assign to one keyword multiple localized variants of 
the translation just like in cucumber? And=LocalizedAnd1|LocalizedAnd2


Currently I see only one to one mapping.

Regards,
Attila





-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Story duration are not calculated correctly in multi-thread execution

2015-04-01 Thread Mauro Talevi
Sure, easy enough to do! 

Can you please raise a JIRA issue for this usecase?

Cheers

 On 1 Apr 2015, at 23:56, tran, phong phong.t...@emc.com wrote:
 
 Hi Mauro,
  Yes we’re running in multi-threading mode with 10 threads for concurrent 
 story execution.
  
 EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=true,verboseFiltering=false,storyTimeoutInSecs=108000,failOnStoryTimeout=false,threads=10]
  
 We’re trying to speed up the test execution (Selenium-based tests) with 
 multiple threads (threads=10) targeting a Selenium Grid with 10 nodes.  
  
 I noticed that the reported duration for each story is also high and that is 
 why the sum of all story durations added up to a high total number. Does this 
 mean the duration at the story level has been affected with multi-threading 
 execution mode? Do we need to de-normalize (divided by 10 in this case) the 
 duration for each story to get its accurate execution time?
  
 It would be great if the de-normalization for story duration can be at 
 addressed at the JBehave framework level to handle the multi-threading 
 execution mode.
  
 Thanks,
 Phong
  
 From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
 Sent: Saturday, March 28, 2015 1:56 AM
 To: user@jbehave.codehaus.org
 Subject: Re: [jbehave-user] Story duration are not calculated correctly in 
 multi-thread execution
  
 Hi Phong,
 
 I would imagine you're running in multi-threading mode.  The total is 
 calculated as simply be the sum of each duration.   If you have a single 
 thread then it will coincide with the build duration (more or less), but you 
 use multiple threads it'll be off by a factor which should correspond to the 
 number of threads.  
 
 Arguably we could use the information of the threads to renormalise the total 
 by the number of threads.   This formula would still work in the case of a 
 single thread. 
 
 Can you confirm that you're using multiple threads? 
 
 Cheers
 
 On 25/03/2015 08:22, tran, phong wrote:
 Hi Mauro,
   Thanks a lot for updating the core example template!  We can access and 
 integrate the durations from storyDurations.props into our custom HTML report 
 now. However, we just notice another issue. The total duration reported in 
 storyDurations.props for all stories is much higher (8 times) that what we 
 usually see in our test run. Basically we have a configuration in TeamCity to 
 run our Selenium-based tests and the test run took 5 hours and 25 minutes as 
 reported by TeamCity. This is the normal time range we expected for our test 
 run.
 
 
 
 Results
 Started
 Changes
 Started
 Duration
  
 #177
 image001.png NGIS #: 6234 Beacon #: 3224 Pass Rate: 83.43949% passed: 262 
 failed: 52 pending: 51
 image002.png View
 Changes (7)
 24 Mar 15 09:55
 5h:25m
 Beacon_Selenium_W2K8R2_13
 None
  
  
 However, the total duration aggregated for all stories as reported by JBehave 
 is unusually high (more than 48 hours). This duration is not correct!
 Reports Overview
 
 Stories
 Scenarios
 Steps
 Download as CSV
 Total
 Excluded
 Total
 Successful
 Pending
 Failed
 Excluded
 Total
 Successful
 Pending
 Failed
 Not Performed
 Ignorable
 Duration (hh:mm:ss.sss)
 279
 0
 345
 210
 82
 53
 0
 9,195
 3,751
 230
 66
 3,699
 1,449
 48:39:21.000
  
 storyDurations.props:
 #org.jbehave.core.embedder.StoryManager
 #Tue Mar 24 15:20:14 PDT 2015
 total=175161000
  
 Do you have any idea what could be causing the much higher story duration 
 reported in storyDurations.props? Is there any JBehave configuration I should 
 check in our setup?
  
 Thanks,
 Phong
  
  
  
 From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
 Sent: Saturday, March 21, 2015 7:00 AM
 To: user@jbehave.codehaus.org
 Subject: Re: [jbehave-user] Story duration are not calculated correctly in 
 multi-thread execution
  
 Hi Phong,
 
 the core example template was out-of-date.  I've pushed the updated one. 
 
 You'll see that the storyDurations are taken from a different template object 
 called storyDurations.   
 
 There is a case for integrating this info into the Report and/or ReportTable 
 objects.   Please raise a JIRA for this against version 4.x. 
 
 FYI,  these objects are instantiated in the TemplateableViewGenerator. 
 
 Cheers
 
 On 20/03/2015 21:50, tran, phong wrote:
 Hi Mauro,
  For example, take a look at the custom report packaged in JBehave core 
 example (/behave-3.9.5/examples/core/src/main/java/ftl/custom-reports.ftl). 
 In this FreeMarker template, a data object reportsTable is accessed and used 
 to populate the content for HTML reports.
  
 #assign reportNames = reportsTable.getReportNames()
  
 Through reportsTable data object, other stats information (including story 
 duration) is also accessed.
  
 #assign stats = report.getStats()
 @renderMillis stats duration/
  
 Questions:
  
 1.   Where is reportsTable data model coming from? How is it created and 
 injected

Re: [jbehave-user] Story duration are not calculated correctly in multi-thread execution

2015-03-28 Thread Mauro Talevi

Hi Phong,

I would imagine you're running in multi-threading mode.  The total is 
calculated as simply be the sum of each duration.   If you have a single 
thread then it will coincide with the build duration (more or less), but 
you use multiple threads it'll be off by a factor which should 
correspond to the number of threads.


Arguably we could use the information of the threads to renormalise the 
total by the number of threads.   This formula would still work in the 
case of a single thread.


Can you confirm that you're using multiple threads?

Cheers

On 25/03/2015 08:22, tran, phong wrote:


Hi Mauro,

  Thanks a lot for updating the core example template!  We can 
access and integrate the durations from storyDurations.props into our 
custom HTML report now. However, we just notice another issue. The 
total duration reported in storyDurations.props for all stories is 
much higher (8 times) that what we usually see in our test run. 
Basically we have a configuration in TeamCity to run our 
Selenium-based tests and the test run took 5 hours and 25 minutes as 
reported by TeamCity. This is the normal time range we expected for 
our test run.


*

*




*Results*



*Started*



*Changes*



*Started*



*Duration*



**





#177



http://10.8.0.92/img/buildStates/buildFailed.pngNGIS #: 6234 Beacon #: 
3224 Pass Rate: 83.43949% passed: 262 failed: 52 pending: 51




View build artifactsView



Changes (7)



24 Mar 15 09:55



5h:25m



Beacon_Selenium_W2K8R2_13



None





However, the total duration aggregated for all stories as reported by 
JBehave is unusually high (more than 48 hours). This duration is not 
correct!


*Reports Overview*

*Stories*



*Scenarios*



*Steps*



*Download as CSV 
http://10.8.0.92/repository/download/QeCf_TestExecution_BeaconNGSeleniumFullRegressionTests/153249:id/JBehaveReports.zip%21/reports.csv*


*Total*



*Excluded*



*Total*



*Successful*



*Pending*



*Failed*



*Excluded*



*Total*



*Successful*



*Pending*



*Failed*



*Not Performed*



*Ignorable*



*Duration (hh:mm:ss.sss)*

*279*



*0*



*345*



*210*



*82***



*53***



*0*



*9,195*



*3,751***



*230***



*66***



*3,699***



*1,449***



*48:39:21.000*

storyDurations.props:

#org.jbehave.core.embedder.StoryManager

#Tue Mar 24 15:20:14 PDT 2015

total=175161000

Do you have any idea what could be causing the much higher story 
duration reported in storyDurations.props? Is there any JBehave 
configuration I should check in our setup?


Thanks,

Phong

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Saturday, March 21, 2015 7:00 AM
*To:* user@jbehave.codehaus.org
*Subject:* Re: [jbehave-user] Story duration are not calculated 
correctly in multi-thread execution


Hi Phong,

the core example template was out-of-date.  I've pushed the updated one.

You'll see that the storyDurations are taken from a different template 
object called storyDurations.


There is a case for integrating this info into the Report and/or 
ReportTable objects.   Please raise a JIRA for this against version 4.x.


FYI,  these objects are instantiated in the TemplateableViewGenerator.

Cheers

On 20/03/2015 21:50, tran, phong wrote:

Hi Mauro,

 For example, take a look at the custom report packaged in
JBehave core example
(/behave-3.9.5/examples/core/src/main/java/ftl/custom-reports.ftl). In
this FreeMarker template, a data object reportsTable is accessed
and used to populate the content for HTML reports.

#assign reportNames = reportsTable.getReportNames()

Through reportsTable data object, other stats information
(including story duration) is also accessed.

#assign stats = report.getStats()

@renderMillis stats duration/

Questions:

1.Where is reportsTable data model coming from? How is it created
and injected into this FreeMarker template file (.ftl)?

2. As the story duration is no longer available in the stats
object (story .stats file) with JBehave 3.9.4+
(https://jira.codehaus.org/browse/JBEHAVE-1041), and if I want to
use and access the story duration available in
storyDurations.props file from the same FreeMarker template file,
how can I do this?

Thanks,

Phong

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Friday, March 20, 2015 2:16 AM
*To:* user@jbehave.codehaus.org mailto:user@jbehave.codehaus.org
*Subject:* Re: [jbehave-user] Story duration are not calculated
correctly in multi-thread execution

Not sure what you mean.   Where do you want to make available

Re: [jbehave-user] Story duration are not calculated correctly in multi-thread execution

2015-03-21 Thread Mauro Talevi

Hi Phong,

the core example template was out-of-date.  I've pushed the updated one.

You'll see that the storyDurations are taken from a different template 
object called storyDurations.


There is a case for integrating this info into the Report and/or 
ReportTable objects.   Please raise a JIRA for this against version 4.x.


FYI,  these objects are instantiated in the TemplateableViewGenerator.

Cheers

On 20/03/2015 21:50, tran, phong wrote:


Hi Mauro,

 For example, take a look at the custom report packaged in JBehave 
core example 
(/behave-3.9.5/examples/core/src/main/java/ftl/custom-reports.ftl). In 
this FreeMarker template, a data object reportsTable is accessed and 
used to populate the content for HTML reports.


#assign reportNames = reportsTable.getReportNames()

Through reportsTable data object, other stats information (including 
story duration) is also accessed.


#assign stats = report.getStats()

@renderMillis stats duration/

Questions:

1.Where is reportsTable data model coming from? How is it created and 
injected into this FreeMarker template file (.ftl)?


2. As the story duration is no longer available in the stats object 
(story .stats file) with JBehave 3.9.4+ 
(https://jira.codehaus.org/browse/JBEHAVE-1041), and if I want to use 
and access the story duration available in storyDurations.props file 
from the same FreeMarker template file, how can I do this?


Thanks,

Phong

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Friday, March 20, 2015 2:16 AM
*To:* user@jbehave.codehaus.org
*Subject:* Re: [jbehave-user] Story duration are not calculated 
correctly in multi-thread execution


Not sure what you mean.   Where do you want to make available the 
story durations?


On 20/03/2015 00:17, tran, phong wrote:

Thanks Mauro and Brent for confirming the fix. It’s actually my
fault. I did not update all other modules in the project with the
latest JBehave 3.9.5. I could see the storyDurations.props file
created with expected story duration time now. My next question is
how I can take the information in storyDurations.props file and
make them available for access in the FreeMarker templates (.ftl)
to produce the HTML views?

Thanks,

Phong

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Thursday, March 19, 2015 3:00 AM
*To:* user@jbehave.codehaus.org mailto:user@jbehave.codehaus.org
*Subject:* Re: [jbehave-user] Story duration are not calculated
correctly in multi-thread execution

Can you provide a sample project reproducting this behaviour.

This problem should be fixed in latest release.

On 17/03/2015 22:39, tran, phong wrote:

When I ran stories with a single thread (serial), the story
duration in reports looked correct. The duration time is in
minutes as expected. See the attached report
(single-thread-reports.png). However, when stories are
executed with multiple threads (currently), the story duration
is not calculated correctly (See Multiple-Thread-Reports.png).
The duration time is in in sub-seconds and is not what
expected. I’m using JBehave 3.9.2 and thought this problem
could be related to
https://jira.codehaus.org/browse/JBEHAVE-1041 but upgrading to
the latest JBehave 3.9.5 does not seem to help with this problem.

Here is the code fragment for building story report.

.useStoryReporterBuilder(new StoryReporterBuilder()

.withDefaultFormats()

.withFormats(CONSOLE, TXT, HTML_WEB)

.withFailureTrace(true)

.withFailureTraceCompression(false)

.withViewResources(viewResources)

.withCrossReference(xref)

);

Does anyone have an idea what’s could be the problem here?

Thanks in advance,

Phong





  


-

To unsubscribe from this list, please visit:

  


 http://xircles.codehaus.org/manage_email





Re: [jbehave-user] Story duration are not calculated correctly in multi-thread execution

2015-03-19 Thread Mauro Talevi

Can you provide a sample project reproducting this behaviour.

This problem should be fixed in latest release.

On 17/03/2015 22:39, tran, phong wrote:


When I ran stories with a single thread (serial), the story duration 
in reports looked correct. The duration time is in minutes as 
expected. See the attached report (single-thread-reports.png). 
However, when stories are executed with multiple threads (currently), 
the story duration is not calculated correctly (See 
Multiple-Thread-Reports.png). The duration time is in in sub-seconds 
and is not what expected. I’m using JBehave 3.9.2 and thought this 
problem could be related to 
https://jira.codehaus.org/browse/JBEHAVE-1041 but upgrading to the 
latest JBehave 3.9.5 does not seem to help with this problem.


Here is the code fragment for building story report.

.useStoryReporterBuilder(new StoryReporterBuilder()

.withDefaultFormats()

.withFormats(CONSOLE, TXT, HTML_WEB)

.withFailureTrace(true)

.withFailureTraceCompression(false)

.withViewResources(viewResources)

.withCrossReference(xref)

);

Does anyone have an idea what’s could be the problem here?

Thanks in advance,

Phong



-
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Problem with parametrized stories

2015-03-12 Thread Mauro Talevi
You can use the parametrisation by name delimiters, as explained in the 
doc page cited by you:


http://jbehave.org/reference/stable/parametrised-scenarios.html

On 12/03/2015 15:37, Teriblus wrote:

Hi everyone,

I posted something on stackoverflow regarding an issue my team is 
having with jBehave. Can someone have a look at it?


http://stackoverflow.com/questions/28971436/jbehave-parametrized-alias-ambiguity

Thank you :)
Tristan



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] License

2015-03-06 Thread Mauro Talevi

Hi Brent,

the license of JBehave is BSD-style license - a rather standard and 
liberal license.


It means that you cannot provide a product or consulting service and 
claim it is on behalf of the JBehave project or its contributors.


It does allow you to build on top of JBehave extension tools or other 
services, provided you give proper credit to the upstream libraries you 
use for your tool or service.


We can discuss it in more detail offline if you want.

Cheers

On 05/03/2015 15:30, Brent Barker wrote:

Hi Everyone,
Who would I contact to talk about the license of JBehave? The license 
specifically states:


|Neither the name of JBehave nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.|


What we are trying to do is offer Selenium Automation consulting 
services to to other companies using different automation framework 
tools, including JBehave.


We simply want to say we will help you get started with automation. We 
have some pre-built examples they can pull from, and let them pick 
from this list of different tools, then we would help them implement 
some tests. JBehave is one of the tools we want to offer help with to 
get started. Is this allowed? Or can we get the written permission to 
use JBehave's name?


Thanks!
-Brent




Re: [jbehave-user] Failed to convert status for Enum ...

2015-02-09 Thread Mauro Talevi

Can you please provide an example reproducing this behaviour?

On 09/02/2015 22:37, Mark Derricutt wrote:


Hi all,

I'm using 4.0-beta-11 in our tests and on one of our developers 
machine we seem to randomly get the following enum conversion error:


|When we update the agreement with: SAME_DATEPERIOD
Then the last update was status (FAILED)
org.jbehave.core.steps.ParameterConverters$ParameterConvertionFailed: Failed to 
convert status for Enum 
specifications.customer.AgreementTest$AgreementUpdateResultType
   at 
org.jbehave.core.steps.ParameterConverters$EnumConverter.convertValue(ParameterConverters.java:573)
   at 
org.jbehave.core.steps.ParameterConverters.convert(ParameterConverters.java:151)
   at 
org.jbehave.core.steps.StepCreator.convertParameterValues(StepCreator.java:305)
   at org.jbehave.core.steps.StepCreator.access$1100(StepCreator.java:37)
   at 
org.jbehave.core.steps.StepCreator$ParametrisedStep.parametriseStep(StepCreator.java:643)
|

This doesn't happen /all/ the time, but seems to happen about 66% of 
the time on this one developers machine. It looks like the text 
|status| is being passed into the converter class. The scenario text 
reads:


|Scenario: Agreement updates
Given an initial customer agreement for INBOUND_SCRUB
When we update the agreement with: updates
Then the last update was status

Examples:
|updates|status|
|SAME_DATEPERIOD|UPDATED|
...more examples
|

has anyone seen something like this before?

Cheers
Mark

--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt





Re: [jbehave-user] Need JBehave Statistics

2015-01-08 Thread Mauro Talevi

Hi,

most people download from Maven Central.You could try getting some 
statistics from there.


The mailing lists and user groups are http://jbehave.org/mailing-lists.html

Cheers

On 07/01/2015 20:10, Senaratne, Niranjala wrote:


Hi, I would like to find our some statistics about JBehave. Whats its 
user base. ( Could be in terms of active downloads) . How many active 
user groups forums. Support for other tools. Can some one help me to 
get this information.


Thanks

  Niranjala





Re: [jbehave-user] Running examples in parallel in JBehave BDD

2015-01-08 Thread Mauro Talevi

Hi,

there is currently no way to parallelise the running of the scenarios 
parametrised in the examples table, because the concurrency is managed 
at story level.


You could break down your 50+ examples in smaller scenarios and run them 
as different stories.


Cheers

On 07/01/2015 08:50, Venkatesh Laguduva wrote:

Hi,
  I have a story file with 50+ examples listed below in the table and 
it takes really a lot of time; is there a way to run these examples in 
parallel? if not, what would be the best approach to reduce the 
execution time?


Thanks
Venkatesh Laguduva




Re: [jbehave-user] Re: Examples table and named parameter values with backslash character

2014-12-20 Thread Mauro Talevi

 I meant to write spot-on :-)

On 20/12/2014 17:36, Mauro Talevi wrote:

Hi,

your contribution was stop-on!   Many thanks for it.

We welcome any more that you'd feel like contributing.

In general,  the affected version is seldom used and only typically 
applies to bugs.


What is more relevant is the fix version as it determines what get 
released in a given version.


Cheers

On 19/12/2014 14:28, Szabolcs Rugina wrote:


Hi,

According to our discussion, I created the 
http://jira.codehaus.org/browse/JBEHAVE-1062 issue.


I hope the issue has all necessary information. I was confused a 
little bit about the affected and fix version, so please review that.


I am also looking forward for more contribution, but I am a beginner 
in contribution for open source projects, so will take some time to 
warm-up.


Regards,

rSzabi

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Wednesday, December 17, 2014 2:19 PM
*To:* user@jbehave.codehaus.org mailto:user@jbehave.codehaus.org
*Subject:* Re: [jbehave-user] Excamples table and named parameter 
values with backslash character


Hi

I don't see any problem with the proposed solution.

Can you please contribute it following: 
http://jbehave.org/how-to-contribute.html 
http://jbehave.org/how-to-contribute.html


Cheers

On 17/12/2014 08:45, RUGINA Szabolcs-Gavril wrote:

Hi guys,

I have a situation where I need to use in an examples table
values containing backslash characters.

Because somehow the backslash(es) are disappearing from the
textual data what arrives to logic, I made a debug and checked
the user mailing list.

Indeed first of all I need the backslashes for simulating newline
character, as other user asked,

but I didn’t found any entry regarding the \ and $ characters as
that would solve my problem.

During the debug I found, that the main cause is the
String.replaceAll(regex, replacement) at
ExamplesTable#replaceNamedParameters(MapString, String row)

used at line 339 at version 3.9.3 as:

replacedValue = replacedValue.replaceAll(namedKey, namedValue);

I don’t know, how widely is used the regex advanced functionality
(grouping) when declaring named parameters and they values (with
or without examples table),

but if is not,  changing the above line to

replacedValue = replacedValue.replaceAll(namedKey,
java.util.regex.Matcher./quoteReplacement/(namedValue));

would help some people.

Thanks in advance for your comments.

Best Regards,

Szabolcs Rugina

Java Developer



--
Rugina Szabolcs
ruginaszabo...@gmail.com mailto:ruginaszabo...@gmail.com
Mobile: 0771483274
Fax: 0378105445





*_
_*






Re: [jbehave-user] GivenStories in the middle of a scenario

2014-12-14 Thread Mauro Talevi

No, GivenStories can only be used at the start of the scenario.

Yes, composite steps is a viable option for your need.

Alternatively, we could envisage defining composite steps in the textual 
scenario where the source is a snippet of steps.


Given file://path/to/some.steps

Just an idea, not quite thought through though ...

Cheers

On 12/12/2014 18:48, Brent Barker wrote:

Is it possible to run a GivenStories in the middle of a scenario?

My use case is, there are parts of the application that has steps that 
need to be performed to get to the correct area, but the test in that 
area is the same. Then, there are some steps afterwards that needs to 
be performed.



It would be easy to do it in two different scenarios, but the tricky 
part is that this needs to be performed for several different users, 
logging in via an examples table.


A thought is I could use composite steps to perform the required 
action, so I don't have to have a ton of duplicate copy/past steps in 
the various story files that need to perform this check. However, it 
is nice to see the actual steps taken in the story file.



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] How to append additional lines to the report

2014-11-18 Thread Mauro Talevi

Hi,

if you are using the Console report format, you can simply write to 
System.out.


Otherwise, if you want a more fine-grained solution that applies to 
multiple reporters, you can decorate any existing reporter extending 
PrintStreamOutput and use the method


protected void print(String text);

Cheers

On 17/11/2014 22:05, Ireneusz Kordal wrote:

Hi,

Is there a way to include in a report some additional lines of text 
passed from inside of step methods ? Most of our test are using some 
dynamic parameters generated by the application during runtime (unique 
case numbers, barcode numbers etc.), and I want to show these values 
in the report, so testers can easily see them directly on the report, 
and don't have to search through log files to find them (actually we 
are loging this information using log4j).
Some kind of functionality that they have in Thucidides: 
http://thucydides.info/docs/thucydides-one-page/thucydides.html#_using_step_methods_to_document_test_cases


For example:
Given A customer send us a request
When I scan a document on the scanner
And .


@Given(A customer send us a request)
public void a_customer_send_request(){
  String requestNumber = generateReuest();
  appendToReport(Request number is  + requestNumber );
  ...
}

@When(I scan a document on the scanner)
public void i_scan_a_document(){
  String barcodeNumber = scanNewDocument();
  appendToReport(Barcode number is  + barcodeNumber );
 ...
}


And a final report might look like this:

Given A customer send us a request
   == Request number is 12345
When I scan a document on the scanner
   == Barcode number is 5554567

-
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




Re: [jbehave-user] Version 3.9.5 Only displays last story duration in report view?

2014-11-10 Thread Mauro Talevi

Hi

can you provide an example project with your configuration that 
reproduces this behaviour?


Cheers

On 10/11/2014 18:30, Simon Kent wrote:


Hi


We were testing out an upgrade to JBehave 3.9.5 and noticed that our 
story reports only showed the duration of the last story run (we run 
all tests in one class).


On examination it looks like the write method in StoryManager always 
created a new durations file (see extract below). This is presumably 
the change for JBEHAVE-1041.


In previous versions (we were using 3.7.5) the report correctly showed 
the durations for all the stories.



[pastedImage.png]


  private void write(Properties p, String name) {
File outputDirectory = 
configuration.storyReporterBuilder().outputDirectory();

try {
Writer output = new FileWriter(new File(outputDirectory, 
name));

p.store(output, this.getClass().getName());
output.close();
} catch (IOException e) {
e.printStackTrace();
}
}


Simon Kent
*QA Manager*
T: 01454 802431
E: sk...@gresham-computing.com
Privileged or confidential information may be contained in this 
message. If you are not the addressee of this message please notify 
the sender by return and thereafter delete the message, and you may 
not use, copy, disclose or rely on the information contained in it. 
Internet e-mail may be susceptible to data corruption, interception 
and unauthorised amendment for which Gresham does not accept 
liability. Whilst we have taken reasonable precautions to ensure that 
this e-mail and any attachments have been swept for viruses, Gresham 
does not accept liability for any damage sustained as a result of 
viruses. Statements in this message that do not relate to the business 
of Gresham are neither given nor endorsed by the company or its 
directors. Gresham Computing plc Registered in England and Wales. 
Company No. 01072032 Registered Office: Aldermary House, 10-15 Queen 
Street, London, EC4N 1TX. Further information about Gresham Computing 
can be found on our website: www.gresham-computing.com 




Re: [jbehave-user] Issue about GivenStories Examples

2014-10-16 Thread Mauro Talevi

Hi

you're trying to employ two different uses of GivenStories anchors which 
are not meant to used together.


If you want to use parametrised GivenStories by examples row, you should 
specify the examples table in the scenario that invokes the given story 
and use the anchor to specify the row:


A.story
Scenario: A - 1

Meta: @id1 scenario1

Given actions with Apara1
When ...

B.story:

Scenario: B - 1
GivenStories: A.story#{0}

Examples:
|Apara1|
|value1|

If you want to filter by scenario anchor then provide the name:value 
pair as the anchor.


B.story:

Scenario: B - 2
GivenStories: A.story#{id2:scenario2}

Combining the two is not possible.

As a side note, it does seem that your setup is particularly complicated 
and perhaps you should consider simplifying it by separating concerns.


Cheers


On 15/10/2014 05:27, Zheng, Ayesha(AWF) wrote:


Hi all,

I have a problem about GivenStories.

Assume A.story has 2 or more scenarios:

Scenario: A - 1

Meta: @id1 scenario1

Given actions with Apara1

When ...

Examples:

|Apara1|

|value1|

Scenario: A-2

Meta: @id2 scenairo2

Given ...

Examples: A2.table

B.story want to run only scenario A-1 for prepare with different data.

B.story:

Scenario: B - 1

GivenStories: A.story#{id1:scenario1}#{0} àProblem here.

Given actions with Bpara1 and Bpara2

When ...

Examples:

|Bpara1|Bpara2|Apara1|

|value1|value2|value3|

My problem is:

How can I use givenStories to match follow requirements:

1.Run only Scenario A-1 in A.story.

2.Pass data in Table Row 0 to givenStories A-1.

3.Run Scenario B-1 with example data.

Thanks very much.

Best Regards,

Ayesha





Re: [jbehave-user] JBehave, maven and slf4j

2014-10-08 Thread Mauro Talevi
This is an odd one, most probably due to the order in which the logging 
jars are found in the classpath provided by Maven to the 
jbehave-maven-plugin.


As a workaround, you can always run your JUnitStory using the 
maven-surefire-plugin or maven-failsafe-plugin.


Just as a side note, could you not explicitly tell your logging 
configuration which logger to lookup, without relying on the discovery 
mechanism, which in turn relies on the order in the classpath?


On 08/10/2014 03:05, Dariusz Lorenc wrote:

Thanks for a quick reply. Really appreciate it.

I didn't know the jbehave is not using any logging framework. Now I'm 
really puzzled. Wonder if any of the jbehave's dependencies could 
cause that issue.


I did try with the logback dependencies at the plugin level, as you 
suggested. Unfortunately it didn't help at all.


I'm attaching a sample project which reproduces the issue. Hope it 
goes trough as an attachment. Just unzip it and run mvn integration-test.


You should see something like this, when it fails:

Then it should be a Logback instance (FAILED)
(org.junit.ComparisonFailure: 
expected:[ch.qos.logback.classic.]Logger but 
was:[org.slf4j.impl.Simple]Logger)


As you would see there is not much in that project. There is a unit 
test (LogTest) which check for the right Logger class name. And that 
seems to always pass.
The LogShouldNotMisbehaveSteps class obtains logger in one step and 
asserts Logger's class name in another step. And that seems to fail 
when run from maven, but passes when run as junit from the IDE.


Give it a go, and please let me know if you find anything interesting.

Cheers,
Dariusz

On Tue, Oct 7, 2014 at 6:14 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


There's nothing dodgy about log-related in JBehave, simply because
there is no logging framework used.

What's usually quite dodgy is the logging frameworks' classloading
and dynamic lookups, which don't play well with Maven's rather
strict classloading.

To overcome classloading issues, it should suffice to declare your
logging framework's dependencies at plugin level, rather than
project level:

http://jbehave.org/reference/stable/maven-goals.html

If it doesn't work then please us send a sample project that
reproduces the issues.

Cheers


On 07/10/2014 03:44, Dariusz Lorenc wrote:

Hi,

I've been trying to get JBehave (3.9.4) to work in one of my
projects, but I'm experiencing some odd behaviour with the slf4j
binding. Hope somebody can help to pinpoint it, and confirm, or
deny, that JBehave, or its maven plugin is a culprit here.

I'm using dropwizard (0.7.1) in my project which in turn uses
logback, and comes with all the logback dependencies as well as
slf4j-api etc. Based on that, Dropwizard seems to assume that
org.slf4j.LoggerFactory.getLogger(...) would always return an
implementation of ch.qos.logback.classic.Logger (they cast the
result to that Logger type).

I have a very simple JBehave test, which tries to start up the
service (dropwizard). When I run it from eclipse, everything
works fine. However when I run it from maven, when dropwizard's
service is starting up, I'm getting an exception like this:

Caused by: java.lang.ClassCastException:
org.slf4j.impl.SimpleLogger cannot be cast to
ch.qos.logback.classic.Logger
at
io.dropwizard.logging.LoggingFactory.bootstrap(LoggingFactory.java:37)
at
io.dropwizard.logging.LoggingFactory.bootstrap(LoggingFactory.java:31)
at io.dropwizard.Application.clinit(Application.java:20)
That is caused by the dropwizard code trying to do that cast. For
some reason, in that scenario only, slf4j's getLogger returns
org.slf4j.impl.SimpleLogger. I checked my classpath/dependencies
to make sure I don't include the slf4j-simple jar anywhere. The
only slf4j bindings I have is the native logback implementation,
which comes with dropwizard. No slf4j-simple jar, no
org.slf4j.impl.SimpleLogger on my classpath. So how come it shows
up in the runtime when running from maven?

I even tried to strip the project down completely. I removed
dropwizard, and just left slf4-api, logback and jbehave. The
JBehave test was modified to just print out the class name of the
logger retrieved by the same getLogger method.
And same result again - SimpleLogger (slf4j-simple) when running
from maven, logback logger when running from the IDE.

To prove it's somehow JBehave related, I created a plain junit
test (no jbehave), which just prints out the logger's class name.
It always returns the right logback Logger, when run from eclipse
or maven.

So it seems to be only maven-JBehave combination which always
results with slf4j-simple binding. That makes me think that
JBehave (or actually its maven plugin) could be doing something
(dodgy

Re: [jbehave-user] JBehave, maven and slf4j

2014-10-07 Thread Mauro Talevi
There's nothing dodgy about log-related in JBehave, simply because there 
is no logging framework used.


What's usually quite dodgy is the logging frameworks' classloading and 
dynamic lookups, which don't play well with Maven's rather strict 
classloading.


To overcome classloading issues, it should suffice to declare your 
logging framework's dependencies at plugin level, rather than project 
level:


http://jbehave.org/reference/stable/maven-goals.html

If it doesn't work then please us send a sample project that reproduces 
the issues.


Cheers

On 07/10/2014 03:44, Dariusz Lorenc wrote:

Hi,

I've been trying to get JBehave (3.9.4) to work in one of my projects, 
but I'm experiencing some odd behaviour with the slf4j binding. Hope 
somebody can help to pinpoint it, and confirm, or deny, that JBehave, 
or its maven plugin is a culprit here.


I'm using dropwizard (0.7.1) in my project which in turn uses logback, 
and comes with all the logback dependencies as well as slf4j-api etc. 
Based on that, Dropwizard seems to assume that 
org.slf4j.LoggerFactory.getLogger(...) would always return an 
implementation of ch.qos.logback.classic.Logger (they cast the result 
to that Logger type).


I have a very simple JBehave test, which tries to start up the service 
(dropwizard). When I run it from eclipse, everything works fine. 
However when I run it from maven, when dropwizard's service is 
starting up, I'm getting an exception like this:


Caused by: java.lang.ClassCastException: org.slf4j.impl.SimpleLogger 
cannot be cast to ch.qos.logback.classic.Logger

at io.dropwizard.logging.LoggingFactory.bootstrap(LoggingFactory.java:37)
at io.dropwizard.logging.LoggingFactory.bootstrap(LoggingFactory.java:31)
at io.dropwizard.Application.clinit(Application.java:20)
That is caused by the dropwizard code trying to do that cast. For some 
reason, in that scenario only, slf4j's getLogger returns 
org.slf4j.impl.SimpleLogger. I checked my classpath/dependencies to 
make sure I don't include the slf4j-simple jar anywhere. The only 
slf4j bindings I have is the native logback implementation, which 
comes with dropwizard. No slf4j-simple jar, no 
org.slf4j.impl.SimpleLogger on my classpath. So how come it shows up 
in the runtime when running from maven?


I even tried to strip the project down completely. I removed 
dropwizard, and just left slf4-api, logback and jbehave. The JBehave 
test was modified to just print out the class name of the logger 
retrieved by the same getLogger method.
And same result again - SimpleLogger (slf4j-simple) when running from 
maven, logback logger when running from the IDE.


To prove it's somehow JBehave related, I created a plain junit test 
(no jbehave), which just prints out the logger's class name. It always 
returns the right logback Logger, when run from eclipse or maven.


So it seems to be only maven-JBehave combination which always results 
with slf4j-simple binding. That makes me think that JBehave (or 
actually its maven plugin) could be doing something (dodgy?) log 
related under the hood. Could somebody confirm that? And if so, does 
anybody know a good workaround? Apart from Cucumber, of course :)


Any help is much appreciated.

Thanks,
Dariusz




Re: [jbehave-user] Parametrised scenario problem

2014-09-22 Thread Mauro Talevi
It is neither a bug nor the intended behaviour.   It's simply the 
behaviour that has satisfied the requirements up to now.


For starters, you can already leverage the delimited names, i.e. you 
don't need to use @Alias and @Named:


|configuration.useParameterControls(||new| 
|ParameterControls().useDelimiterNamedParameters(||true||));|


http://jbehave.org/reference/stable/parametrised-scenarios.html

Secondly, evolving a functionality does not mean necessarily adding an 
alternative notation.   Simply understanding the requirements and seeing 
how they can be satisfied.


At the moment, for each parametrised scenario, there is a well defined 
set of parameters - each identified by their names - and we use the same 
set to match all the steps required.


Implicitly, there is the assumption that each different step can only be 
matched and executed once, for a given set of values.


What we need to investigate is how this assumption can be relaxed.

So, as already set, let's start by collecting the usecases and the 
requirements, with examples to show how it's meant to work.


Cheers

On 19/09/2014 18:37, Anders wrote:


If this is not a bug, then this is the intended behavior (by definition).

Can someone please explain the benefits of this behavior?

If we need to keep the current behavior while evolving this 
functionality, then we would need to add an /alternate notation/ where 
the column name in the examples table does not leak down to the 
parameter name in the step implementation.


Maybe a notation like this would work?

(using Ayesha's example):

Given a user open homepage

Then should see ${message1}

When user do something and go to another page

Then should see ${message2}

*Examples:*

|message1|message2|

|Welcome|Hello|

Also, it would be more consistent if the declaration in the step 
implementation did not have to specify if the value comes from a 
literal or through a reference to the examples table.


Today, if I want to be able to call the same step implementation using 
either a literal or a reference to an examples table, I have to add an 
alias like this:


@Then(should see message)

@Alias(should see $message)

*public**void*shouldSeeMsg(@Named(message)String message)

{

// check text...

}

Instead, I think we should be able to do it this way:

@Then(should see $message)

*public**void*shouldSeeMsg(String message)

{

// check text...

}

And then use the step either way we like:

Given a user open homepage

Then should see Welcome

When user do something and go to another page

Then should see ${message2}

*Examples:*

|message2|

|Hello|

(specifying a literal in the first call (Welcome), and specifying a 
reference to the example table in the second call.)


Cheers

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* den 19 september 2014 17:36
*To:* user@jbehave.codehaus.org
*Subject:* Re: [jbehave-user] Parametrised scenario problem

It's not a bug, it's the current behaviour of the system.   Nothing 
prevents us from evolving this behaviour.


Feel free to raise the JIRA issue, describing how you'd like to see it 
evolve.


Cheers

On 19/09/2014 16:12, Anders wrote:

I would argue that this is a serious bug, a bug that has been
there for a long time.

This strange lock down of parameter names when using example
tables has annoyed me for a long time.

This bug is seriously limiting the reusability of step methods.

Is there an issue for this in Jira that we can vote on?

*From:*Zheng, Ayesha(AWF) [mailto:xuzh...@ebay.com]
*Sent:* den 19 september 2014 11:24
*To:* user@jbehave.codehaus.org mailto:user@jbehave.codehaus.org
*Subject:* [jbehave-user] Parametrised scenario problem

Hi all,

I have a scenario:

Given a user open homepage

Then should see message1

When user do something and go to another page

Then should see message2

*Examples:*

test.table

And test.table with content:

|message1|message2|

|Welcome|Hello|

And step Then should see message1 and Then should see
message2 do the same thing: just check the text.

So I just want to implement it once time.

Code like:

@Then(should see message)

*public**void*shouldSeeMsg(@Named(message)String message)

{

// check text...

}

When running this case, I hope it can match both step message1
and message2.

But the problem is, I found the parameter name in code must be the
same with the name specified in scenario.

These steps always in PENDING status.

Could anyone help to how to solve this?

Thanks very much.

Best Regards,

Ayesha





Re: [jbehave-user] Parametrised scenario problem

2014-09-19 Thread Mauro Talevi
I don't think there is a way to solve it except to have two facade 
methods that use the appropriately names variable that invoke a third 
common method that does the check.


On 19/09/2014 11:23, Zheng, Ayesha(AWF) wrote:


Hi all,

I have a scenario:

Given a user open homepage

Then should see message1

When user do something and go to another page

Then should see message2

*Examples:*

test.table

And test.table with content:

|message1|message2|

|Welcome|Hello|

And step Then should see message1 and Then should see message2 
do the same thing: just check the text.


So I just want to implement it once time.

Code like:

@Then(should see message)

*public**void*shouldSeeMsg(@Named(message)String message)

{

// check text...

}

When running this case, I hope it can match both step message1 and 
message2.


But the problem is, I found the parameter name in code must be the 
same with the name specified in scenario.


These steps always in PENDING status.

Could anyone help to how to solve this?

Thanks very much.

Best Regards,

Ayesha





Re: [jbehave-user] Parametrised scenario problem

2014-09-19 Thread Mauro Talevi
It's not a bug, it's the current behaviour of the system.   Nothing 
prevents us from evolving this behaviour.


Feel free to raise the JIRA issue, describing how you'd like to see it 
evolve.


Cheers

On 19/09/2014 16:12, Anders wrote:


I would argue that this is a serious bug, a bug that has been there 
for a long time.


This strange lock down of parameter names when using example tables 
has annoyed me for a long time.


This bug is seriously limiting the reusability of step methods.

Is there an issue for this in Jira that we can vote on?

*From:*Zheng, Ayesha(AWF) [mailto:xuzh...@ebay.com]
*Sent:* den 19 september 2014 11:24
*To:* user@jbehave.codehaus.org
*Subject:* [jbehave-user] Parametrised scenario problem

Hi all,

I have a scenario:

Given a user open homepage

Then should see message1

When user do something and go to another page

Then should see message2

*Examples:*

test.table

And test.table with content:

|message1|message2|

|Welcome|Hello|

And step Then should see message1 and Then should see message2 
do the same thing: just check the text.


So I just want to implement it once time.

Code like:

@Then(should see message)

*public**void*shouldSeeMsg(@Named(message)String message)

{

// check text...

}

When running this case, I hope it can match both step message1 and 
message2.


But the problem is, I found the parameter name in code must be the 
same with the name specified in scenario.


These steps always in PENDING status.

Could anyone help to how to solve this?

Thanks very much.

Best Regards,

Ayesha





Re: [jbehave-user] When hook

2014-09-16 Thread Mauro Talevi

Hi Chad,

still struggling to understand your use case and your use of mocks.   If 
you have time to create a very simplified sample project that reproduces 
the logic of architecture, thus not infringing any NDA, we'd be 
interested in knowing more and helping you.


The issue with pre-step hooks is that you need to find an effective way 
to execute them only when you need them and not always.


Cheers

On 15/09/2014 16:12, Chad Wilson wrote:
Think 20 or 30 service client dependencies where the mocks are being 
configured in the then steps.  The registration of the mocks is an 
architectural step, and I'd really rather have a hook to do it than to 
tell developers to do it in every when step.  There's no need for them 
to see a single line registration call when the framework convention 
(the framework wrapping jbehave) is that it is occurring.


NDA stops me from providing you with the code here.

Chad

On 9/14/2014 11:57 PM, Mauro Talevi wrote:

I'm not sure I understand how you use mocks.  In any case, it's a BDD
anti-pattern to hide away in some logic that is executed at every step
because you lose the communication aspect.

It'd be much better if you could express that logic in the Given step or
incorporate it directly in the implementation of the When step.

If you want to share an example of what you're trying to do, we can
discuss it further.

On 13/09/2014 11:35, Chad Wilson wrote:

We've got some complex interactions we're mocking.  Part of the Given
statements are going to be mock setup.  Because we don't know ahead of
time which mocks will need to be setup, it would simplify things if we
could just iterate over their builders and register them accordingly
before the when steps.

Chad

On 9/13/2014 1:34 AM, Mauro Talevi wrote:

No, but why would you want to do that?

Can you explain your usecase?

On 13/09/2014 02:46, Chad Wilson wrote:

Is there any way to run something before all When steps?

Chad

-
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





-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] BDD Assistant

2014-09-16 Thread Mauro Talevi
Hi Viktor,

the app looks very interesting, but the  installation curve seems pretty steep.

It would great if you could produce an installer that minimes built-time tools 
and only requires runtime ones.

By the way, can the app be packaged as a stardard java webapp?

An example of how users can configure the app with their steps library would be 
very useful.

I'll provide more feedback as I dig more into it.

Cheers

 On 15 Sep 2014, at 11:29, Viktor Farcic vik...@farcic.com wrote:
 
 I wrote an OSS application for writing, managing and running JBehave stories. 
 I'd be grateful you someone would give me feedback.
 
 Information can be found in the 
 http://technologyconversations.com/2014/09/02/bdd-assistant-its-alive-and-cries-for-help/
 


Re: [jbehave-user] When hook

2014-09-15 Thread Mauro Talevi
I'm not sure I understand how you use mocks.  In any case, it's a BDD 
anti-pattern to hide away in some logic that is executed at every step 
because you lose the communication aspect.


It'd be much better if you could express that logic in the Given step or 
incorporate it directly in the implementation of the When step.


If you want to share an example of what you're trying to do, we can 
discuss it further.


On 13/09/2014 11:35, Chad Wilson wrote:
We've got some complex interactions we're mocking.  Part of the Given 
statements are going to be mock setup.  Because we don't know ahead of 
time which mocks will need to be setup, it would simplify things if we 
could just iterate over their builders and register them accordingly 
before the when steps.


Chad

On 9/13/2014 1:34 AM, Mauro Talevi wrote:

No, but why would you want to do that?

Can you explain your usecase?

On 13/09/2014 02:46, Chad Wilson wrote:

Is there any way to run something before all When steps?

Chad

-
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




Re: [jbehave-user] When hook

2014-09-13 Thread Mauro Talevi

No, but why would you want to do that?

Can you explain your usecase?

On 13/09/2014 02:46, Chad Wilson wrote:

Is there any way to run something before all When steps?

Chad

-
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




Re: [jbehave-user] Stories' Dependency

2014-09-13 Thread Mauro Talevi
We could add an anchor to the given story path that indicates that it 
should only be executed once per run context.


On 12/09/2014 16:06, Mauro Talevi wrote:

There is no such behaviour built-in.

You can nonetheless implement some state logic in your story A so that 
if successful it won't get repeated more than once.


Think about setting up a context object.

On 12 Sep 2014, at 11:50, Zheng, Ayesha(AWF) xuzh...@ebay.com 
mailto:xuzh...@ebay.com wrote:



Thanks for your answer.

Seems “GivenStories” cannot match my requirement.

Actually my requirement is:

B and C depend on A.

If A succeed, then run B and C in parallel. (Run them in serial need 
too long time)


If A failed, then skip B and C.

Does any feature in JBehave can do this?

Thanks.

Best Regards,

Ayesha

*From:*Anders [mailto:codeh...@aek.se]
*Sent:* 2014年9月12日17:39
*To:* user@jbehave.codehaus.org mailto:user@jbehave.codehaus.org
*Subject:* RE: [jbehave-user] Stories' Dependency

Check this description of the “GivenStories” keyword:

http://jbehave.org/reference/stable/given-stories.html

The whole point with the keyword “GivenStories” is to do exactly 
that: run the dependency before each dependent story.


If what you need is just to have the stories run in sequence (A - B 
- C), then the “GivenStories” keyword is not what you want to use.


*From:*Zheng, Ayesha(AWF) [mailto:xuzh...@ebay.com]
*Sent:* den 12 september 2014 03:53
*To:* user@jbehave.codehaus.org mailto:user@jbehave.codehaus.org
*Subject:* [jbehave-user] Stories' Dependency

Hi all,

I have a problem with stories’ dependency.

Example:

I have A,B,C stories, and stories B, C depends on A. (B-A, C-A).

I add “GivenStories: A.story” in both B.story and C.story to do this, 
then run these 3 stories.


I found A.story run for 3 times.

I want to make A,B,C stories run only one time and keep dependency at 
the same time. (Like testng: dependsOnMethods)


Does JBehave support this?

Thanks very much.

Best Regards,

Ayesha





Re: [jbehave-user] Stories' Dependency

2014-09-12 Thread Mauro Talevi
There is no such behaviour built-in.

You can nonetheless implement some state logic in your story A so that if 
successful it won't get repeated more than once.

Think about setting up a context object.

 On 12 Sep 2014, at 11:50, Zheng, Ayesha(AWF) xuzh...@ebay.com wrote:
 
 Thanks for your answer.
 Seems “GivenStories” cannot match my requirement.
  
 Actually my requirement is:
 B and C depend on A.
 If A succeed, then run B and C in parallel. (Run them in serial need too long 
 time)
 If A failed, then skip B and C.
  
 Does any feature in JBehave can do this?
  
 Thanks.
  
 Best Regards,
 Ayesha
  
 From: Anders [mailto:codeh...@aek.se] 
 Sent: 2014年9月12日 17:39
 To: user@jbehave.codehaus.org
 Subject: RE: [jbehave-user] Stories' Dependency
  
 Check this description of the “GivenStories” keyword:
 http://jbehave.org/reference/stable/given-stories.html
  
 The whole point with the keyword “GivenStories” is to do exactly that: run 
 the dependency before each dependent story.
  
 If what you need is just to have the stories run in sequence (A - B - C), 
 then the “GivenStories” keyword is not what you want to use.
  
  
 From: Zheng, Ayesha(AWF) [mailto:xuzh...@ebay.com] 
 Sent: den 12 september 2014 03:53
 To: user@jbehave.codehaus.org
 Subject: [jbehave-user] Stories' Dependency
  
 Hi all,
  
 I have a problem with stories’ dependency.
  
 Example:
 I have A,B,C stories, and stories B, C depends on A. (B-A, C-A).
 I add “GivenStories: A.story” in both B.story and C.story to do this, then 
 run these 3 stories.
 I found A.story run for 3 times.
  
 I want to make A,B,C stories run only one time and keep dependency at the 
 same time. (Like testng: dependsOnMethods)
 Does JBehave support this?
  
 Thanks very much.
  
  
 Best Regards,
 Ayesha
  


Re: [jbehave-user] Where do I register for an account to access JBehave-Jira?

2014-09-01 Thread Mauro Talevi

You need to create a Codehaus account:

http://jbehave.org/how-to-contribute.html

On 01/09/2014 18:10, Anders wrote:

Message Title

I'd like to be able to participate in the JBehave community, so how do 
I gain access to Jira?


/Anders






Re: [jbehave-user] Story writing catalog

2014-09-01 Thread Mauro Talevi
The Web Runner provides a simple web interface to explore existing steps 
by matching the input provided:


http://jbehave.org/reference/web/stable/using-web-runner.html

On 01/09/2014 18:12, Frank Pedroza wrote:
As we write more and more stories, we obviously accumulate a growing 
number of annotated step methods (currently we have ~350).  I'm 
wondering what do people do to more easily catalog the existing step 
methods so they don't duplicate steps as well as ensure they're taking 
advantage of the steps they've already written.  The eclipse plugin 
sort of helps with this, but it's hard to find that one method you're 
after when choosing from 350 options.



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Steps classes question

2014-08-25 Thread Mauro Talevi
Scanning is now supported without a DI container:  
http://jira.codehaus.org/browse/JBEHAVE-1042


On 21/08/2014 00:51, Mauro Talevi wrote:
Typically, you'd use a DI container to achieve this, via the 
corresponding implementation of the InjectableStepsFactory.


On 20/08/2014 22:23, Chad Wilson wrote:

Hello all,

I'm not sure if I'm missing something here.  According to the 
documentation in order to register Step class instances, an 
implementation of InjectableStepsFactory should be used.


Isn't there a way to scan the classpath for classes that are 
annotated with various step annotations?  Cucumber JVM supports this 
OOTB.


Chad

-
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




Re: [jbehave-user] Report times are wrong when running multiple threads

2014-08-25 Thread Mauro Talevi

Try with latest releases: 3.9.4 or 4.0-beta-10.

On 25/08/2014 21:03, Brent Barker wrote:

Thanks for looking into that!

I tried the latest snapshot. However, it still doesn't appear that all 
of the times are correct. The total time on the report is close to the 
entire execution time.


I would think the total time in the report to be significantly greater 
then the actual execution time. It appears the time for each thread 
isn't being fully accounted for. Some stories that take a long time 
still look like they have a 0 second execution time, but running a 
couple of stories the report looks correct.


I'll try to get a example project put together.


On Wed, Aug 20, 2014 at 1:10 AM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


Reproduced and fixed: https://jira.codehaus.org/browse/JBEHAVE-1041

Can you try out latest snapshot?


On 11/08/2014 18:10, Brent Barker wrote:

Hi,
When executing reports in multiple threads, the execution
times are not correct. Instead of varying from 1-10 minutes,
they say the execute in microseconds (which i know is not the
case)

Are other seeing this?
Thanks
-Brent



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email







Re: [jbehave-user] Report times are wrong when running multiple threads

2014-08-20 Thread Mauro Talevi

Reproduced and fixed: https://jira.codehaus.org/browse/JBEHAVE-1041

Can you try out latest snapshot?

On 11/08/2014 18:10, Brent Barker wrote:

Hi,
When executing reports in multiple threads, the execution times are 
not correct. Instead of varying from 1-10 minutes, they say the 
execute in microseconds (which i know is not the case)


Are other seeing this?
Thanks
-Brent



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Steps classes question

2014-08-20 Thread Mauro Talevi
Typically, you'd use a DI container to achieve this, via the 
corresponding implementation of the InjectableStepsFactory.


On 20/08/2014 22:23, Chad Wilson wrote:

Hello all,

I'm not sure if I'm missing something here.  According to the 
documentation in order to register Step class instances, an 
implementation of InjectableStepsFactory should be used.


Isn't there a way to scan the classpath for classes that are annotated 
with various step annotations?  Cucumber JVM supports this OOTB.


Chad

-
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




Re: [jbehave-user] Report times are wrong when running multiple threads

2014-08-11 Thread Mauro Talevi

Could you provide a simple example reproducing this behaviour?

On 11/08/2014 18:10, Brent Barker wrote:

Hi,
When executing reports in multiple threads, the execution times are 
not correct. Instead of varying from 1-10 minutes, they say the 
execute in microseconds (which i know is not the case)


Are other seeing this?
Thanks
-Brent



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Maping stories at the senario level

2014-07-28 Thread Mauro Talevi

Hi Brent,

this feature is not currently supported.It actually does a first 
pass trying to match the story and then a second pass trying to match 
the scenarios.   It may not be the best way to do it so we could rethink 
it trying do match the scenarios directly and inherit from the story tags.


Please raise a JIRA issue with some examples of how you'd like the 
feature to behave.


Cheers

On 21/07/2014 18:33, Brent Barker wrote:

HI again,

I am using the story mapping feature with Maven. I am wondering if it 
is possible to map stories with meta tags at the scenario level, not 
only at the story level.


For example, I have a scenario inside of a story annotated with @bug. 
I'd like the map reports view to show that a scenario in the story has 
that @bug meta tag


Thanks in advance!



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Are there plans to provide a story-specific timeout feature in JBehave?

2014-07-24 Thread Mauro Talevi
Hi,

Currently the timeout is global, not per story.   If the docs suggest 
otherwise, it was not intended.  Correspondingly only a single 
storyTimeoutInSecs parameter is provided. 

Could you please create a JIRA issue detailing your usecase for the improvement 
to make this story specific?  How would you see it behaving and how would you 
configure it?  Please provide a concrete and realistic example of your usage.

Cheers

 On 23 Jul 2014, at 19:24, Dan McLellan dmclel...@copyright.com wrote:
 
 Hi Everyone,
 
 It looks, from issue 1436 of this site, that JBehave's current position is 
 that the StoryTimeouts feature is intended for the execution of all test 
 cases in a job, rather than each individual story being run:
 
 Per Mario Talevi:
 
 excerpt
 As for the expected behaviour, do note that the story timeout is global, 
 i.e. not per effective story execution time, in the sense that it's 
 calculated (in real time) from the moment the execution of all stories 
 starts.   After the elapsed time as reached the timeout, all story execution 
 is cancelled.   We can try to improve on this for 4.0.
 /excerpt
 
 Source: http://comments.gmane.org/gmane.comp.java.jbehave.user/1436
 
 But the JBehave website itself seems to indicate that story-specific timeout 
 control is already available in the current release, although the 
 whereabouts of the class/methods to set those controls are not specified:
 
 excerpt from JBehave.org
 It is important to note that it's the entire story that is executed in one 
 concurrent execution and that scenarios within the same story cannot be run 
 concurrently. For each story execution a timeout in seconds can be set via 
 the same configuration mechanism used to set the number of threads.
 /excerpt from JBehave.org
 
 Source:
 http://jbehave.org/reference/stable/multi-threading.html
 
 But I can't find any methods or variables in Embedder, EmbedderControls, 
 StoryReporter to set timeouts for individual stories, or any watchdog 
 functionality in StoryManager (or elsewhere) to enforce them.
 
 It would be good to know:
 1.  Is story-specific execution timeout currently available, and if so, how 
 can it be set?
 
 2.  If you can't currently set the timeout on individual stories, is any 
 such feature currently being targeted for 4.0 or another future release?
 
 Thank you.
 
 - Dan McLellan
 Developer
 
 
 -
 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




Re: [jbehave-user] Conditionally skip story using meta tag

2014-07-11 Thread Mauro Talevi

The recommended way is to implement your own MetaMatcher.

Currently, you need to extend createMetaMatcher(String) method in 
MetaFilter although we could make it injectable.


Alternatively, use the GroovyMetaMatcher to invoke a groovy script that 
will do you check.


Cheers

On 10/07/2014 19:49, Brent Barker wrote:

Hi everyone!

Is there a easy way to conditionally skip a story using a meta tag? 
For example, I want to annotate my story with @bug BUG- and then 
check if that bug is still open or not. If it is still open, skip the 
scenario/story.


Right now I am extending RegexStoryParser, calling super.ParseStory to 
get the story object, then if the bug meta property exists, I add the 
skip meta property to it.


Is there a better way to do this? I am not sure how to feed a list of 
meta filters to the embedder, since I can not access it from the story 
configuration where I have access to the story object


Thanks
-Brent



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Re: ContextView still works in 4.0-beta-7?

2014-07-01 Thread Mauro Talevi

JBehave Web in 3.x has its own Context class.

I think the Core 4.x is pretty stable now.   We can schedule a release 
soon.


On 30/06/2014 15:41, Hans Schwäbli wrote:
What do you mean with it seems the problem is with web only? There 
is only one Context class: org.jbehave.core.context.Context
Do you mean that jbehave-web somehow causes this issue in the 4.x 
branch because of WIP?

By the way, when do you expect that the 4.x branch will become non-beta?


On Mon, Jun 30, 2014 at 1:21 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


Thanks, started looking at it and it seems the problem is with web
only, core context view works fine.

Because web has its own context which will be removed to use the
core one in 4.x.

WIP ...

On 27 Jun 2014, at 11:28, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:


I created it: https://jira.codehaus.org/browse/JBEHAVE-1030
In the second part of the article I wrote that in 4.x the context
view can be still used like in JBehave 3.9.2. I hope that will be
okay.


On Tue, Jun 24, 2014 at 11:33 AM, Mauro Talevi
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org
wrote:

Can you please raise a JIRA issue for this so it doesn't get
lost in translation? :-)

On 24 Jun 2014, at 08:40, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:


It also occurs with 4.0-beta-8.

Did you have a chance to reproduce this issue with the
information I posted before?



On Mon, Jun 16, 2014 at 11:53 AM, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:


By the way: You can reproduce it with the same example
which I mentioned in another issue:
https://github.com/OttoDiesel/jbehave-selenium-example.git
https://github.com/OttoDiesel/jbehave-selenium-example.git

-- Forwarded message --
From: *Hans Schwäbli* bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com
Date: Mon, Jun 16, 2014 at 8:56 AM
Subject: ContextView still works in 4.0-beta-7?
To: user@jbehave.codehaus.org
mailto:user@jbehave.codehaus.org


I changed a project from JBehave 3.9.2 to 4.0-beta-7.
This made the context view disappear. I use the same
code for applying the context view like I see in the
JBehave examples today
(org.jbehave.examples.core.CoreStories).
Does the ContextView still work in JBehave 4.0-beta-7?










Re: [jbehave-user] Question regarding WebDriverScreenshotOnFailure

2014-06-30 Thread Mauro Talevi
At class level, not method level.

 On 30 Jun 2014, at 15:33, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 I thought there is a way to make annotations to be inherited by subclasses.
  
 But I don't know and thats a bit off-topic currently. Maybe I dig later 
 deepter in that issue.
 
 
 On Mon, Jun 30, 2014 at 1:23 PM, Mauro Talevi mauro.tal...@aquilonia.org 
 wrote:
 Not sure I understand.  That's the nature of Java annotations.
 
  On 30 Jun 2014, at 09:52, Hans Schwäbli bugs.need.love@gmail.com 
  wrote:
 
  I have subclassed WebDriverScreenshotOnFailure and overridden 
  afterScenarioFailure(UUIDExceptionWrapper).
 
  I wondered why my class never was used. Then I discovered that I have to 
  add the same annotation in the overriden method like it is in the 
  superclass:
 
  @AfterScenario(uponOutcome = Outcome.FAILURE)
 
  Do you intend not to inherit this annotation to sub classes when 
  afterScenarioFailure(UUIDExceptionWrapper) is overridden?
 
 -
 To unsubscribe from this list, please visit:
 
 http://xircles.codehaus.org/manage_email
 


Re: [jbehave-user] Re: ContextView still works in 4.0-beta-7?

2014-06-24 Thread Mauro Talevi
Can you please raise a JIRA issue for this so it doesn't get lost in 
translation? :-)

 On 24 Jun 2014, at 08:40, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 It also occurs with 4.0-beta-8.
 Did you have a chance to reproduce this issue with the information I posted 
 before?
 
 
 
 On Mon, Jun 16, 2014 at 11:53 AM, Hans Schwäbli 
 bugs.need.love@gmail.com wrote:
 
 By the way: You can reproduce it with the same example which I mentioned in 
 another issue: https://github.com/OttoDiesel/jbehave-selenium-example.git
 
  
 -- Forwarded message --
 From: Hans Schwäbli bugs.need.love@gmail.com
 Date: Mon, Jun 16, 2014 at 8:56 AM
 Subject: ContextView still works in 4.0-beta-7?
 To: user@jbehave.codehaus.org
 
 
 I changed a project from JBehave 3.9.2 to 4.0-beta-7.
  
 This made the context view disappear. I use the same code for applying the 
 context view like I see in the JBehave examples today 
 (org.jbehave.examples.core.CoreStories).
  
 Does the ContextView still work in JBehave 4.0-beta-7?
 


Re: [jbehave-user] Specifying report path in multi-module project

2014-06-23 Thread Mauro Talevi

Can you share a sample project with the configuration that you're using?

On 23/06/2014 00:56, Jonathan Gray wrote:

Hi,

I have a multi-module project which looks something
like the following (it happens to be Maven based).

project
- pom.xml
- app
+- pom.xml
- app-test
+- pom.xml

If I run clean verify against the project pom (it's not currently using
  inheritance from the parent) when it runs the maven plugin in the
  app-test project I can see the following

[INFO] Generating reports view to 'C:\project\target\jbehave' ...

I would expect it to be generating to C:\project\app-test\target\jbehave

Each of my Java tests are currently JUnitStory and running as embeddables.
The configuration is using LoadFromClasspath(...) which works fine.
The stories run correctly but if they've already failed then at times they
won't succeed because the target (parent) hasn't been cleaned.


-
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




Re: [jbehave-user] Excluding - in meta filters

2014-06-21 Thread Mauro Talevi

You can use -bug JBEHAVE*281.

Or use the Groovy Matcher

http://jbehave.org/reference/stable/meta-filtering.html

On 18/06/2014 00:28, Brent Barker wrote:

I have a meta filter on a story similar to this:

Meta:
@bug JBEHAVE-281

The issue is when I try to filter on that, using

-bug JBEHAVE-281

it does not match, but only matches to similar items when I do

-bug JBEHAVE*


Is there a way to escape the dash in the meta filter so I can filter 
for that specific bug?


Thanks!
-Brent



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] NPE at org.jbehave.core.configuration.Configuration.doDryRun(Boolean)

2014-06-18 Thread Mauro Talevi

Applied with thanks.

On 18/06/2014 08:53, Hans Schwäbli wrote:

I attached a patch for this in this email (for 4.x branch).


On Wed, Jun 11, 2014 at 11:41 AM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


Lazy init may still have some teething issues.  Please provide a
patch.


 On 11 Jun 2014, at 10:46, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:

 Hello Mauro,

 today I had a NullPointerException at
org.jbehave.core.configuration.Configuration.doDryRun(Boolean)
with JBehave beta-6.

 It was because this.storyControls was null.

 Why don't you use storyControls().doDryRun(dryRun) instead of
this.storyControls.doDryRun(dryRun)?

 Because the instance variable storyControls is lazy initialized
in storyControls() method, so a NPE never could occur.

 My workaround now is first to call storyControls() method and
after that doDryRun(...)

-
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




Re: [jbehave-user] Filtering works not as expected with a scenario containing an examples table

2014-06-18 Thread Mauro Talevi

4.0-beta-8 has just been released, with the agreed keywords.

On 18/06/2014 08:55, Hans Schwäbli wrote:

When will there be a beta-8 version of the 4.x branch containing this fix?
I am asking because the examples for the JBehave article will need 
that, and the magazine is published on 2nd of July.



On Wed, May 21, 2014 at 8:50 AM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


Sold! To the German-speaking gentleman at the back of the room :-)


On 20/05/2014 21:00, Mirko Friedenhagen wrote:

Hans,

I stand corrected, in this case JEDES is a better translation
for ANY.
And make FAILURE FEHLER.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
(http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Tue, May 20, 2014 at 10:14 AM, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:

Mirko, I suppose you are a native German speaker like me,
right?

What is your message? That the current German translations
for ANY and
FAILURE are the best?

Lets put it in the context:

* Ergebnis: IRGENDWELCHE
* Ergebnis: BELIEBIGES
* Ergebnis: JEDES

Did you try that feature? You should really try and see
how it behaves I
think.

To me Ergebnis: IRGENDWELCHE it sounds unnatural. One
can understand with
a bit thought what that might mean. But it seems not so
intuitive like the
English word ANY.

Ergebnis: JEDES seems to express the correct meaning and
is easy to
understand. Because whatever the result is, the steps in
that block will be
added before or after the scenario. In German: In *jedem*
Fall werden
Schritte vor oder nach dem Szenario hinzugefügt.

Or concerning BELIEBIGES: Bei einem *beliebigen*
Testergebnis werden
Schritte vor oder nach dem Szenario hinzugefügt. Sound
natural and easy to
understand to me.

But IRGENDWELCHE? Bei *irgendwelchen* Testergebnissen
werden Schritte vor
oder nach dem Szenario hinzugefügt? This sounds very
strange to me.

Concerning ISTQB, this is the definition of a failure:
Deviation of the component or system from its expected
delivery, service or
result.
See: http://www.istqb.org/downloads/viewcategory/20.html

Failures is translated by ISTQB as Fehlerwirkungen.
See:
http://www.software-tester.ch/PDF-Files/CT_Glossar_EN_DE_V22.pdf

So it is not Ausfall. You may say it is also not
Fehler. But
Fehlerwirkung is an artificial word originating from
ISTQB. Noone I ever
met (except ISTQB teachers) ever uses this word but
instead says Fehler.

By the way, defect is translated as Fehlerzustand by
ISTQB. This is also an
artificial word which noone uses except ISTQB teachers. In
Germany we call
them: Bugs or simply Fehler, or much more academically and
very seldom:
Defekt.

Besides that, ISTQB, although helpful to some degree in
its basic teachings,
I consider it to be non-agile in its full extent. I take
only the good from
it.


On Tue, May 20, 2014 at 8:42 AM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org
wrote:

So, what's the consensus then with the keywords?

On 16/05/2014 18:42, Mauro Talevi wrote:

I'll defer to whatever you guys decide is best.  We
can always change it
later.

On 15/05/2014 18:27, Mirko Friedenhagen wrote:

Hans,

I am not sure I agree :-). JEDES would be EVERY IMO.

According to ISTQB FEHLER would be the DEFECT which
causes a FAILURE
(FEHLSCHLAG), which may lead to an AUSFALL (BREAKDOWN)
of a server ;-)

Am 15.05.2014 12:34 schrieb Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com:

I re-tested it and now it works. Thank you!

However I did not use that feature in-depth so
there might be some other
isues.

I wondered a bit about outcome ANY. It seems to be
like the finally-block

Re: [jbehave-user] Story Maping

2014-06-17 Thread Mauro Talevi
Use scopetest/scope

 On 17 Jun 2014, at 20:51, Brent Barker brentbark...@gmail.com wrote:
 
 I am trying to use the Maven plugin for StoryMapping found here: 
 http://jbehave.org/reference/stable/story-mapping.html
 
 However, it appears that the include tag only looks in src/main/java/
 
 This is the exact maven tag I'm using: 
 include**/*.story/include
 
 Our stories are located in src/test/resources/stories. I moved a story to the 
 src/main/java and it was able to locate it.
 
 Is there a way to change the path to find where the files are located at a 
 higher level?
 
 Thanks
 -Brent


Re: [jbehave-user] NPE at org.jbehave.core.configuration.Configuration.doDryRun(Boolean)

2014-06-11 Thread Mauro Talevi
Lazy init may still have some teething issues.  Please provide a patch.


 On 11 Jun 2014, at 10:46, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 Hello Mauro,
  
 today I had a NullPointerException at 
 org.jbehave.core.configuration.Configuration.doDryRun(Boolean) with JBehave 
 beta-6.
  
 It was because this.storyControls was null.
  
 Why don't you use storyControls().doDryRun(dryRun) instead of 
 this.storyControls.doDryRun(dryRun)?
  
 Because the instance variable storyControls is lazy initialized in 
 storyControls() method, so a NPE never could occur.
  
 My workaround now is first to call storyControls() method and after that 
 doDryRun(...)

-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Error when running using Maven plugin

2014-06-10 Thread Mauro Talevi
Try adding the dependency at plugin level: 

http://jbehave.org/reference/stable/maven-goals.html


 On 10 Jun 2014, at 10:53, Jonathan Gray jonny.g...@gmail.com wrote:
 
 Hi,
 
 I'm currently seeing the following error when trying to run JBehave using 
 the maven plugin against a Spring Batch project.
 
 [ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:3.9.2:run-
 stories-as-embeddables (run-stories) on project mrp: Failed to run
 stories as embeddables: Failure in running embeddable: Hierarchy: Error 
 creating bean with name 'hierarchyConfiguration': Invocation of ini
 t method failed; nested exception is java.lang.NoClassDefFoundError: 
 org/codehaus/jettison/mapped/Configuration: org.codehaus.jettison.mappe
 d.Configuration - [Help 1]
 
 I currently only have one story (accompanied by Hierarchy Java class which 
 is a JUnitStory).  This uses the SpringStepsFactory which in turns 
 references an annotated HeirarchyConfiguration class for the context.
 
 The jettison library is a transitive dependency from spring-batch-core and 
 I can see it referenced in the first lines of INFO from the jbehave plugin 
 (see below).  Is this a familiar problem to anyone?
 
 [INFO] --- jbehave-maven-plugin:3.9.2:run-stories-as-embeddables (run-
 stories) @ mrp ---
 [INFO] Running stories as embeddables using embedder Embedder
 [storyMapper=StoryMapper,storyRunner=StoryRunner,embedderMonitor=MavenEmbed
 derM
 onitor,classLoader=EmbedderClassLoader[urls=[/C:/Dev/mrp/mrp/target/test-
 classes/, /C:/Dev/mrp/mrp/target/classes/, jbehave-core-3.9
 .2.jar, junit-4.11.jar, hamcrest-core-1.3.jar, hamcrest-library-1.3.jar, 
 hamcrest-integration-1.3.jar, commons-collections-3.2.1.jar, common
 s-io-2.4.jar, commons-lang-2.6.jar, plexus-utils-3.0.10.jar, freemarker-
 2.3.19.jar, paranamer-2.4.jar, xstream-1.4.5.jar, xmlpull-1.1.3.1.ja
 r, xpp3_min-1.1.4c.jar, jbehave-spring-3.9.2.jar, spring-test-
 4.0.5.RELEASE.jar, spring-context-4.0.5.RELEASE.jar, spring-aop-
 4.0.5.RELEASE.
 jar, aopalliance-1.0.jar, spring-beans-4.0.5.RELEASE.jar, spring-core-
 4.0.5.RELEASE.jar, commons-logging-1.1.3.jar, spring-expression-4.0.5.
 RELEASE.jar, spring-jdbc-4.0.5.RELEASE.jar, spring-tx-4.0.5.RELEASE.jar, 
 ojdbc7-12.1.0.1.0.jar, spring-batch-core-3.0.0.RELEASE.jar, com.ibm
 .jbatch-tck-spi-1.0.jar, javax.batch-api-1.0.jar, jettison-1.2.jar, spring-
 batch-infrastructure-3.0.0.RELEASE.jar, spring-retry-1.1.0.RELEAS
 E.jar, spring-batch-test-3.0.0.RELEASE.jar, hamcrest-all-
 1.3.jar],parent=ClassRealm[pluginorg.jbehave:jbehave-maven-plugin:3.9.2, 
 parent: s
 
 Thanks,
 Jon
 
 
 -
 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




Re: [jbehave-user] Maven Failsafe Plugin and JBehave

2014-06-03 Thread Mauro Talevi
Can you provide a sample project?



 On 3 Jun 2014, at 18:36, Corbin, J.D. jd.cor...@pearson.com wrote:
 
 I am using the maven-failsafe-plugin (as opposed to the jbehave-maven-plugin) 
 to run our JBehave integration tests.  I appears to run the test fine, but 
 when there is an error it goes unreported.  I'm wondering if there are any 
 others out there using the failsafe plugin with JBehave that might have some 
 ideas why the errors are going unreported, or appear to be...
 
 Thanks,
 J.D.

-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Filtering works not as expected with a scenario containing an examples table

2014-05-21 Thread Mauro Talevi

Sold! To the German-speaking gentleman at the back of the room :-)

On 20/05/2014 21:00, Mirko Friedenhagen wrote:

Hans,

I stand corrected, in this case JEDES is a better translation for ANY.
And make FAILURE FEHLER.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Tue, May 20, 2014 at 10:14 AM, Hans Schwäbli
bugs.need.love@gmail.com wrote:

Mirko, I suppose you are a native German speaker like me, right?

What is your message? That the current German translations for ANY and
FAILURE are the best?

Lets put it in the context:

* Ergebnis: IRGENDWELCHE
* Ergebnis: BELIEBIGES
* Ergebnis: JEDES

Did you try that feature? You should really try and see how it behaves I
think.

To me Ergebnis: IRGENDWELCHE it sounds unnatural. One can understand with
a bit thought what that might mean. But it seems not so intuitive like the
English word ANY.

Ergebnis: JEDES seems to express the correct meaning and is easy to
understand. Because whatever the result is, the steps in that block will be
added before or after the scenario. In German: In *jedem* Fall werden
Schritte vor oder nach dem Szenario hinzugefügt.

Or concerning BELIEBIGES: Bei einem *beliebigen* Testergebnis werden
Schritte vor oder nach dem Szenario hinzugefügt. Sound natural and easy to
understand to me.

But IRGENDWELCHE? Bei *irgendwelchen* Testergebnissen werden Schritte vor
oder nach dem Szenario hinzugefügt? This sounds very strange to me.

Concerning ISTQB, this is the definition of a failure:
Deviation of the component or system from its expected delivery, service or
result.
See: http://www.istqb.org/downloads/viewcategory/20.html

Failures is translated by ISTQB as Fehlerwirkungen.
See: http://www.software-tester.ch/PDF-Files/CT_Glossar_EN_DE_V22.pdf

So it is not Ausfall. You may say it is also not Fehler. But
Fehlerwirkung is an artificial word originating from ISTQB. Noone I ever
met (except ISTQB teachers) ever uses this word but instead says Fehler.

By the way, defect is translated as Fehlerzustand by ISTQB. This is also an
artificial word which noone uses except ISTQB teachers. In Germany we call
them: Bugs or simply Fehler, or much more academically and very seldom:
Defekt.

Besides that, ISTQB, although helpful to some degree in its basic teachings,
I consider it to be non-agile in its full extent. I take only the good from
it.


On Tue, May 20, 2014 at 8:42 AM, Mauro Talevi mauro.tal...@aquilonia.org
wrote:

So, what's the consensus then with the keywords?

On 16/05/2014 18:42, Mauro Talevi wrote:

I'll defer to whatever you guys decide is best.  We can always change it
later.

On 15/05/2014 18:27, Mirko Friedenhagen wrote:

Hans,

I am not sure I agree :-). JEDES would be EVERY IMO.

According to ISTQB FEHLER would be the DEFECT which causes a FAILURE
(FEHLSCHLAG), which may lead to an AUSFALL (BREAKDOWN) of a server ;-)

Am 15.05.2014 12:34 schrieb Hans Schwäbli
bugs.need.love@gmail.com:

I re-tested it and now it works. Thank you!

However I did not use that feature in-depth so there might be some other
isues.

I wondered a bit about outcome ANY. It seems to be like the finally-block
in Java. The German translation IRGENDWELCHE is maybe not the best for ANY.
Ergebnis: BELIEBIGES or JEDES seems to be better to me.

And Ergebnis: AUSFALL seems not to be the best translation too. I think
better would be Ergebnis FEHLER.

Maybe some other German speaking guys can share their opinions about a
translation for ANY and FAILURE?


On Thu, May 15, 2014 at 12:08 AM, Mauro Talevi
mauro.tal...@aquilonia.org wrote:

There was an issue with parsing with non-EN locales.   Now fixed, try
again with latest head.


On 14/05/2014 17:35, Hans Schwäbli wrote:

I quickly tested the lifecycle.

Story:

Lebenszyklus:
Vorher:
Gegeben im Lager sind 100 T-Shirts
Nach:
Ergebnis: ERFOLG
Gegeben im Lager sind 200 T-Shirts
Ergebnis: IRGENDWELCHE
Gegeben im Lager sind 300 T-Shirts
Ergebnis: AUSFALL
Gegeben im Lager sind 400 T-Shirts
Szenario: Versandkosten fallen weg
Wenn ein Kunde 20 T-Shirts bestellt
Dann betragen die Versandkosten 7,5 Euro
Result is:

Lebenszyklus:
Vorher:
Gegeben im Lager sind 100 T-Shirts
Nach:
Ergebnis: IRGENDWELCHE
Gegeben im Lager sind 200 T-Shirts
Gegeben im Lager sind 300 T-Shirts
Gegeben im Lager sind 400 T-Shirts

Szenario: Versandkosten fallen weg
Gegeben im Lager sind 100 T-Shirts
Wenn ein Kunde 20 T-Shirts bestellt
Dann betragen die Versandkosten 7,5 Euro
Gegeben im Lager sind 200 T-Shirts
Gegeben im Lager sind 300 T-Shirts
Gegeben im Lager sind 400 T-Shirts

It does not work as I expect it since it executes all three after steps
although it should only execute the one for Ergebnis: ERFOLG (Outcome:
SUCCESS).

On Friday or next week I can test that a bit more thoroughly.


On Tue, May 13, 2014 at 8:00 PM, Mauro Talevi
mauro.tal...@aquilonia.org wrote:

Cool, we'll push out new beta soon.

Can you also

Re: [jbehave-user] Filtering works not as expected with a scenario containing an examples table

2014-05-20 Thread Mauro Talevi

So, what's the consensus then with the keywords?

On 16/05/2014 18:42, Mauro Talevi wrote:
I'll defer to whatever you guys decide is best.  We can always change 
it later.


On 15/05/2014 18:27, Mirko Friedenhagen wrote:


Hans,

I am not sure I agree :-). JEDES would be EVERY IMO.

According to ISTQB FEHLER would be the DEFECT which causes a FAILURE 
(FEHLSCHLAG), which may lead to an AUSFALL (BREAKDOWN) of a server ;-)


Am 15.05.2014 12:34 schrieb Hans Schwäbli 
bugs.need.love@gmail.com mailto:bugs.need.love@gmail.com:


I re-tested it and now it works. Thank you!
However I did not use that feature in-depth so there might be
some other isues.
I wondered a bit about outcome ANY. It seems to be like the
finally-block in Java. The German translation IRGENDWELCHE is
maybe not the best for ANY. Ergebnis: BELIEBIGES or
JEDES seems to be better to me.
And Ergebnis: AUSFALL seems not to be the best translation too.
I think better would be Ergebnis FEHLER.
Maybe some other German speaking guys can share their opinions
about a translation for ANY and FAILURE?


On Thu, May 15, 2014 at 12:08 AM, Mauro Talevi
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org
wrote:

There was an issue with parsing with non-EN locales.   Now
fixed, try again with latest head.


On 14/05/2014 17:35, Hans Schwäbli wrote:

I quickly tested the lifecycle.
Story:
Lebenszyklus:
Vorher:
Gegeben im Lager sind 100 T-Shirts
Nach:
Ergebnis: ERFOLG
Gegeben im Lager sind 200 T-Shirts
Ergebnis: IRGENDWELCHE
Gegeben im Lager sind 300 T-Shirts
Ergebnis: AUSFALL
Gegeben im Lager sind 400 T-Shirts
Szenario: Versandkosten fallen weg
Wenn ein Kunde 20 T-Shirts bestellt
Dann betragen die Versandkosten 7,5 Euro
Result is:
Lebenszyklus:
Vorher:
Gegeben im Lager sind 100 T-Shirts
Nach:
Ergebnis: IRGENDWELCHE
Gegeben im Lager sind 200 T-Shirts
Gegeben im Lager sind 300 T-Shirts
Gegeben im Lager sind 400 T-Shirts

Szenario: Versandkosten fallen weg
Gegeben im Lager sind 100 T-Shirts
Wenn ein Kunde 20 T-Shirts bestellt
Dann betragen die Versandkosten 7,5 Euro
Gegeben im Lager sind 200 T-Shirts
Gegeben im Lager sind 300 T-Shirts
Gegeben im Lager sind 400 T-Shirts
It does not work as I expect it since it executes all three
after steps although it should only execute the one for
Ergebnis: ERFOLG (Outcome: SUCCESS).
On Friday or next week I can test that a bit more thoroughly.


On Tue, May 13, 2014 at 8:00 PM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

Cool, we'll push out new beta soon.

Can you also take the Lifecycle After upon outcome
functionality for a spin while you're at it?

On 13/05/2014 13:42, Hans Schwäbli wrote:

I mixed up snapshot versions with beta-versions, sorry.
I tried now the snapshot version and it works now as
expected concerning the problem with the examples table.
Thank you!
But there is a problem with comments. I will write a
posting just on that.


On Thu, May 8, 2014 at 10:51 AM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

No, a new beta has not been deployed yet.   In the
meantime, you can use the latest 3.9.x or build the
4.0 snapshot from source.

On 8 May 2014, at 08:59, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:


Thank you! Is it also deployed?
I did not find it here:

https://nexus.codehaus.org/content/groups/public/org/jbehave/jbehave-core/4.0-beta-7/
The last snapshot there is from 2nd of May.
The same snapshot date is on:

http://mvnrepository.com/artifact/org.jbehave/jbehave-maven-plugin/4.0-beta-7/


On Wed, May 7, 2014 at 11:25 PM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

This issue is now fixed in head of 4.x
branch.   It did not apply to 3.x.


On 07/05/2014 10:55, Hans Schwäbli wrote:

I created such an example for jbehave-core
now and attached it to this posting. I still
cannot work on a clone the Github
project because of company restrictions (I
haven't yet received an answer why it is not
working

Re: [jbehave-user] JBehave Preferences

2014-05-20 Thread Mauro Talevi
It's a design philosophy ... with its pros and cons.   The risk of 
creating a uber class is that you loose touch of what configuration is 
relevant to what component.


But in fact, the Configuration class allows you access to all the 
different bits, the Controls, the Builders etc ... so that should be 
your starting point.


On 19/05/2014 12:45, Hans Schwäbli wrote:
It seems a bit difficult to me to see which preferences can be set and 
what the defaults are.
For example where is a class EmbedderControls which contains some of 
the preferences and defaults.
There are more preferences like in ParameterControls, 
StoryReporterBuilder and other classes.
What about putting them into a dedicated preferences class(es)? It 
would self document what preferences can be configured and it would be 
easier to find them.

I am thinking about a class similiar like this:
http://download.eclipse.org/technology/swtbot/helios/dev-build/apidocs/org/eclipse/swtbot/swt/finder/utils/SWTBotPreferences.html
Maybe it could be several classes in the same preferences package 
containing all meaningful preferences to be set. The source could be a 
property file (like partly in IBM RFT) where the user could see them 
all in a central place and change them if he wishes.
Maybe it is not a good idea, I don't know. I just have the impression 
that the preferences are a bit hard to find and spread across many places.



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Filtering works not as expected with a scenario containing an examples table

2014-05-16 Thread Mauro Talevi
I'll defer to whatever you guys decide is best.  We can always change it 
later.


On 15/05/2014 18:27, Mirko Friedenhagen wrote:


Hans,

I am not sure I agree :-). JEDES would be EVERY IMO.

According to ISTQB FEHLER would be the DEFECT which causes a FAILURE 
(FEHLSCHLAG), which may lead to an AUSFALL (BREAKDOWN) of a server ;-)


Am 15.05.2014 12:34 schrieb Hans Schwäbli 
bugs.need.love@gmail.com mailto:bugs.need.love@gmail.com:


I re-tested it and now it works. Thank you!
However I did not use that feature in-depth so there might be some
other isues.
I wondered a bit about outcome ANY. It seems to be like the
finally-block in Java. The German translation IRGENDWELCHE is
maybe not the best for ANY. Ergebnis: BELIEBIGES or
JEDES seems to be better to me.
And Ergebnis: AUSFALL seems not to be the best translation too.
I think better would be Ergebnis FEHLER.
Maybe some other German speaking guys can share their opinions
about a translation for ANY and FAILURE?


On Thu, May 15, 2014 at 12:08 AM, Mauro Talevi
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org
wrote:

There was an issue with parsing with non-EN locales.   Now
fixed, try again with latest head.


On 14/05/2014 17:35, Hans Schwäbli wrote:

I quickly tested the lifecycle.
Story:
Lebenszyklus:
Vorher:
Gegeben im Lager sind 100 T-Shirts
Nach:
Ergebnis: ERFOLG
Gegeben im Lager sind 200 T-Shirts
Ergebnis: IRGENDWELCHE
Gegeben im Lager sind 300 T-Shirts
Ergebnis: AUSFALL
Gegeben im Lager sind 400 T-Shirts
Szenario: Versandkosten fallen weg
Wenn ein Kunde 20 T-Shirts bestellt
Dann betragen die Versandkosten 7,5 Euro
Result is:
Lebenszyklus:
Vorher:
Gegeben im Lager sind 100 T-Shirts
Nach:
Ergebnis: IRGENDWELCHE
Gegeben im Lager sind 200 T-Shirts
Gegeben im Lager sind 300 T-Shirts
Gegeben im Lager sind 400 T-Shirts

Szenario: Versandkosten fallen weg
Gegeben im Lager sind 100 T-Shirts
Wenn ein Kunde 20 T-Shirts bestellt
Dann betragen die Versandkosten 7,5 Euro
Gegeben im Lager sind 200 T-Shirts
Gegeben im Lager sind 300 T-Shirts
Gegeben im Lager sind 400 T-Shirts
It does not work as I expect it since it executes all three
after steps although it should only execute the one for
Ergebnis: ERFOLG (Outcome: SUCCESS).
On Friday or next week I can test that a bit more thoroughly.


On Tue, May 13, 2014 at 8:00 PM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

Cool, we'll push out new beta soon.

Can you also take the Lifecycle After upon outcome
functionality for a spin while you're at it?

On 13/05/2014 13:42, Hans Schwäbli wrote:

I mixed up snapshot versions with beta-versions, sorry.
I tried now the snapshot version and it works now as
expected concerning the problem with the examples table.
Thank you!
But there is a problem with comments. I will write a
posting just on that.


On Thu, May 8, 2014 at 10:51 AM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

No, a new beta has not been deployed yet. In the
meantime, you can use the latest 3.9.x or build the
4.0 snapshot from source.

On 8 May 2014, at 08:59, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:


Thank you! Is it also deployed?
I did not find it here:

https://nexus.codehaus.org/content/groups/public/org/jbehave/jbehave-core/4.0-beta-7/
The last snapshot there is from 2nd of May.
The same snapshot date is on:

http://mvnrepository.com/artifact/org.jbehave/jbehave-maven-plugin/4.0-beta-7/


On Wed, May 7, 2014 at 11:25 PM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

This issue is now fixed in head of 4.x
branch.   It did not apply to 3.x.


On 07/05/2014 10:55, Hans Schwäbli wrote:

I created such an example for jbehave-core now
and attached it to this posting. I still
cannot work on a clone the Github
project because of company restrictions (I
haven't yet received an answer why it is not
working inside the company proxy).
In case the mailing list does not support

Re: [jbehave-user] Comment lines are not parsed correctly in 4.x as it seems

2014-05-14 Thread Mauro Talevi

Yes, editor and core use two different parsers.

We can align the two.   We can support no space after the comment.  
Please raise a JIRA for this.


On 14/05/2014 09:10, Hans Schwäbli wrote:

I will do that, thank you.
The story editor displays that line as a comment line, painting it 
green. It does not require a space after !-- for the story editor to 
detect it as a comment line. It is the same with some other keywords 
in the story editor, for example I can start a line with 
Scenario:blabla and the story editor recognizes it as a scenario.
Usually comment keywords don't include a space (XML, SQL, Javadoc 
etc.) So it is contra intuitive in a way.
It is contra intuitive because of that and because the story editor 
recognizes some of the keywords without having to add a space, but the 
execution does not recognize them as such.

Does that make sense?


2014-05-13 19:43 GMT+02:00 Mauro Talevi mauro.tal...@aquilonia.org 
mailto:mauro.tal...@aquilonia.org:


You need a space after the !-- (the comment keyword is treated
like at any other keyword, thus separated by a space from the
comment)


On 13/05/2014 13:51, Hans Schwäbli wrote:

In 4.x branch comments doen't seem to be allowed where they used
to be allowed in version 3.x.
Lets take this example (please ingore German language, it has
nothing to do with the problem):
Szenario: Kleine Menge wird bestellt
Gegeben im Lager sind 300 T-Shirts
Wenn ein Kunde 5 T-Shirts bestellt
!--TODO: Gesamtbestellwert könnte auch noch geprüft werden.
Dann ist die Bestellung auf Lager
Und gilt eine Ermässigung von 0 Prozent
Und kostet ein T-Shirt pro Stück 10 Euro
Und betragen die Versandkosten 7,50 Euro
Und ist der Bestellwert 57,50 Euro
That causes this execution failure:
Szenario: Kleine Menge wird bestellt
Gegeben im Lager sind 300 T-Shirts
Wenn ein Kunde 5 T-Shirts bestellt
!--TODO: Gesamtbestellwert könnte auch noch geprüft werden.
(AUSSTEHEND)
Dann ist die Bestellung auf Lager (NICHT AUSGEFÜHRT)
Und gilt eine Ermässigung von 0 Prozent (NICHT AUSGEFÜHRT)
Und kostet ein T-Shirt pro Stück 10 Euro (NICHT AUSGEFÜHRT)
Und betragen die Versandkosten 7,50 Euro (NICHT AUSGEFÜHRT)
Und ist der Bestellwert 57,50 Euro (NICHT AUSGEFÜHRT)
@When(ein Kunde 5 T-Shirts bestellt\r\n!--TODO:
Gesamtbestellwert k\u00F6nnte auch noch gepr\u00FCft werden.)
@Pending
public void

whenEinKunde5TShirtsBestelltTODOGesamtbestellwertKönnteAuchNochGeprüftWerden()
{
  // AUSSTEHEND
}
You can reproduce that easily if you place a comment line between
steps in a scenario.
I suggest that you pollute your jbehave-core example stories
with comments on all different places (starting with !-- and |--
or even a line including both, be nasty) so that you have a
regression test for the story parser concerning comment lines.







Re: [jbehave-user] Comment lines are not parsed correctly in 4.x as it seems

2014-05-13 Thread Mauro Talevi
You need a space after the !-- (the comment keyword is treated like at 
any other keyword, thus separated by a space from the comment)


On 13/05/2014 13:51, Hans Schwäbli wrote:
In 4.x branch comments doen't seem to be allowed where they used to be 
allowed in version 3.x.
Lets take this example (please ingore German language, it has nothing 
to do with the problem):

Szenario: Kleine Menge wird bestellt
Gegeben im Lager sind 300 T-Shirts
Wenn ein Kunde 5 T-Shirts bestellt
!--TODO: Gesamtbestellwert könnte auch noch geprüft werden.
Dann ist die Bestellung auf Lager
Und gilt eine Ermässigung von 0 Prozent
Und kostet ein T-Shirt pro Stück 10 Euro
Und betragen die Versandkosten 7,50 Euro
Und ist der Bestellwert 57,50 Euro
That causes this execution failure:
Szenario: Kleine Menge wird bestellt
Gegeben im Lager sind 300 T-Shirts
Wenn ein Kunde 5 T-Shirts bestellt
!--TODO: Gesamtbestellwert könnte auch noch geprüft werden. (AUSSTEHEND)
Dann ist die Bestellung auf Lager (NICHT AUSGEFÜHRT)
Und gilt eine Ermässigung von 0 Prozent (NICHT AUSGEFÜHRT)
Und kostet ein T-Shirt pro Stück 10 Euro (NICHT AUSGEFÜHRT)
Und betragen die Versandkosten 7,50 Euro (NICHT AUSGEFÜHRT)
Und ist der Bestellwert 57,50 Euro (NICHT AUSGEFÜHRT)
@When(ein Kunde 5 T-Shirts bestellt\r\n!--TODO: Gesamtbestellwert 
k\u00F6nnte auch noch gepr\u00FCft werden.)

@Pending
public void 
whenEinKunde5TShirtsBestelltTODOGesamtbestellwertKönnteAuchNochGeprüftWerden() 
{

  // AUSSTEHEND
}
You can reproduce that easily if you place a comment line between 
steps in a scenario.
I suggest that you pollute your jbehave-core example stories with 
comments on all different places (starting with !-- and |-- or even a 
line including both, be nasty) so that you have a regression test for 
the story parser concerning comment lines.




Re: [jbehave-user] Filtering works not as expected with a scenario containing an examples table

2014-05-13 Thread Mauro Talevi

Cool, we'll push out new beta soon.

Can you also take the Lifecycle After upon outcome functionality for a 
spin while you're at it?


On 13/05/2014 13:42, Hans Schwäbli wrote:

I mixed up snapshot versions with beta-versions, sorry.
I tried now the snapshot version and it works now as expected 
concerning the problem with the examples table.

Thank you!
But there is a problem with comments. I will write a posting just on that.


On Thu, May 8, 2014 at 10:51 AM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


No, a new beta has not been deployed yet.   In the meantime, you
can use the latest 3.9.x or build the 4.0 snapshot from source.

On 8 May 2014, at 08:59, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:


Thank you! Is it also deployed?
I did not find it here:

https://nexus.codehaus.org/content/groups/public/org/jbehave/jbehave-core/4.0-beta-7/
The last snapshot there is from 2nd of May.
The same snapshot date is on:

http://mvnrepository.com/artifact/org.jbehave/jbehave-maven-plugin/4.0-beta-7/


On Wed, May 7, 2014 at 11:25 PM, Mauro Talevi
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org
wrote:

This issue is now fixed in head of 4.x branch.   It did not
apply to 3.x.


On 07/05/2014 10:55, Hans Schwäbli wrote:

I created such an example for jbehave-core now and attached
it to this posting. I still cannot work on a clone the
Github project because of company restrictions (I haven't
yet received an answer why it is not working inside the
company proxy).
In case the mailing list does not support attachments I have
also sent them directly to Mauro.
To reproduce it you will need this in the Maven pom.xml:

metaFilters

metaFilter*+component order -skip*/metaFilter

/metaFilters



On Wed, May 7, 2014 at 11:03 AM, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:

I committed it here:
https://github.com/OttoDiesel/jbehave-shop-example.git
I will add such a scenario to the core examples. Until
then you could use that other example if you like. It is
the example for the article on JBehave by the way.


On Tue, May 6, 2014 at 3:04 PM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

Yes, it looks likely to be unrelated to given
stories and such.

Could you please add a scenario reproducing the
behaviour to the meta_filtering.story in the core
examples (preferably in English)?

Does it work with 3.x?

On 06/05/2014 11:34, Hans Schwäbli wrote:

I already use
StoryControls.doIgnoreMetaFiltersIfGivenStory(true). And
I removed the given story in the story.
But the result is the same.
Maybe tomorrow I can commit the whole project, so
that you can reproduce it.


On Tue, May 6, 2014 at 11:00 AM, Stephen de Vries
stephe...@gmail.com mailto:stephe...@gmail.com
wrote:


On 6 May 2014, at 10:51, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:


I have the example story, see below. It runs
not as expected when filtering by: +Komponente
Bestellung -Skip
VorgegebeneStories:
shop/stories/Login.story


My guess is that the given story doesn’t have
the same meta-tags.  Fix is to set:
StoryControls.doIgnoreMetaFiltersIfGivenStory(true)

See: http://jira.codehaus.org/browse/JBEHAVE-789








-
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email









Re: [jbehave-user] Filtering works not as expected with a scenario containing an examples table

2014-05-08 Thread Mauro Talevi
No, a new beta has not been deployed yet.   In the meantime, you can use the 
latest 3.9.x or build the 4.0 snapshot from source.

 On 8 May 2014, at 08:59, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 Thank you! Is it also deployed?
 I did not find it here: 
 https://nexus.codehaus.org/content/groups/public/org/jbehave/jbehave-core/4.0-beta-7/
 The last snapshot there is from 2nd of May.
 The same snapshot date is on: 
 http://mvnrepository.com/artifact/org.jbehave/jbehave-maven-plugin/4.0-beta-7/
 
 
 On Wed, May 7, 2014 at 11:25 PM, Mauro Talevi mauro.tal...@aquilonia.org 
 wrote:
 This issue is now fixed in head of 4.x branch.   It did not apply to 3.x.
 
 
 On 07/05/2014 10:55, Hans Schwäbli wrote:
 I created such an example for jbehave-core now and attached it to this 
 posting. I still cannot work on a clone the Github project because of 
 company restrictions (I haven't yet received an answer why it is not 
 working inside the company proxy).
  
 In case the mailing list does not support attachments I have also sent them 
 directly to Mauro.
  
 To reproduce it you will need this in the Maven pom.xml:
  
 metaFilters
 
 metaFilter+component order -skip/metaFilter
 
 /metaFilters
 
 
 
 On Wed, May 7, 2014 at 11:03 AM, Hans Schwäbli 
 bugs.need.love@gmail.com wrote:
 I committed it here: https://github.com/OttoDiesel/jbehave-shop-example.git
  
 I will add such a scenario to the core examples. Until then you could use 
 that other example if you like. It is the example for the article on 
 JBehave by the way.
 
 
 On Tue, May 6, 2014 at 3:04 PM, Mauro Talevi mauro.tal...@aquilonia.org 
 wrote:
 Yes, it looks likely to be unrelated to given stories and such. 
 
 Could you please add a scenario reproducing the behaviour to the 
 meta_filtering.story in the core examples (preferably in English)? 
 
 Does it work with 3.x?  
 
 On 06/05/2014 11:34, Hans Schwäbli wrote:
 I already use StoryControls.doIgnoreMetaFiltersIfGivenStory(true). And I 
 removed the given story in the story.
  
 But the result is the same.
  
 Maybe tomorrow I can commit the whole project, so that you can reproduce 
 it.
 
 
 On Tue, May 6, 2014 at 11:00 AM, Stephen de Vries stephe...@gmail.com 
 wrote:
 
 On 6 May 2014, at 10:51, Hans Schwäbli bugs.need.love@gmail.com 
 wrote:
 
 I have the example story, see below. It runs not as expected when 
 filtering by: +Komponente Bestellung -Skip
  
 VorgegebeneStories:
   shop/stories/Login.story
 
 My guess is that the given story doesn’t have the same meta-tags.  Fix 
 is to set: StoryControls.doIgnoreMetaFiltersIfGivenStory(true)
 
 See: http://jira.codehaus.org/browse/JBEHAVE-789
 
 
 
 -
 To unsubscribe from this list, please visit:
 
 http://xircles.codehaus.org/manage_email
 


Re: [jbehave-user] Filtering works not as expected with a scenario containing an examples table

2014-05-06 Thread Mauro Talevi

Yes, it looks likely to be unrelated to given stories and such.

Could you please add a scenario reproducing the behaviour to the 
meta_filtering.story in the core examples (preferably in English)?


Does it work with 3.x?

On 06/05/2014 11:34, Hans Schwäbli wrote:
I already use StoryControls.doIgnoreMetaFiltersIfGivenStory(true). And 
I removed the given story in the story.

But the result is the same.
Maybe tomorrow I can commit the whole project, so that you can 
reproduce it.



On Tue, May 6, 2014 at 11:00 AM, Stephen de Vries stephe...@gmail.com 
mailto:stephe...@gmail.com wrote:



On 6 May 2014, at 10:51, Hans Schwäbli
bugs.need.love@gmail.com
mailto:bugs.need.love@gmail.com wrote:


I have the example story, see below. It runs not as expected when
filtering by: +Komponente Bestellung -Skip
VorgegebeneStories:
  shop/stories/Login.story


My guess is that the given story doesn’t have the same meta-tags.
 Fix is to set: StoryControls.doIgnoreMetaFiltersIfGivenStory(true)

See: http://jira.codehaus.org/browse/JBEHAVE-789






Re: [jbehave-user] Unexpected behavior of meta filtering concering given stories

2014-05-05 Thread Mauro Talevi
Use StoryControls().doIgnoreMetaFiltersIfGivenStory(true)

 On 5 May 2014, at 15:33, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 I discovered an unexpected behavior when I used meta filtering and a given 
 story.
 
 The meta filter looks like this: +component sales
 
 This runs a story (lets call it sales.story) because it containes the meta 
 information @component sales.
 
 The sales.story uses GivenStories: login.story. That given story does not 
 contain any meta information.
 
 My intuitive expectation is that when I run stories using the meta 
 information filter +component sales that it does not only run sales.story 
 but also its given story since it is a precondition. But it does not run the 
 given story.
 
 I could solve that by adding a meta information to login.story like 
 @component login and using this meta filter: +component sales login. But 
 this is not transparent to me. I would have to analyse what GivenStories are 
 used in the stories I want to run in order to define the right meta 
 filtering. That can be very tricky and error-prone.
 
 My feeling is that it would be logical that given stories (and its transitive 
 given stories) are always executed if their parent story is matching the meta 
 filtering. Or what do you think?


[jbehave-user] Re: Selenium Webdriver+Jbehave+Grid

2014-05-05 Thread Mauro Talevi
Please don't address emails to individuals and only use the mailing lists.

 On 5 May 2014, at 11:33, Kaustubh Joshi kashu.jo...@gmail.com wrote:
 
 Hi Dev/Jbehave users,
 
 Sorry to bother again!
 
 I wanted to incorporate Grid feature in selenium based Jbehave project but 
 currently facing 
 below mentioned problem.Attached is the sample project for further reference.
 
 1)Created own custom driver provider to open browser on local machine
 2) Now,I wanted to expand the capability via grid and don't want to use SAUCE 
 as wanted to run
 on local grid structure.I've set up simple grid structure like 5 chrome,5 
 FF,1 IE instance.
 3) I've done changes in code as mentioned in sample Jbehave git tutorial but 
 the problem
 is when I'm running via command prompt, instead of opening remote browser , 
 code is opening
 local chrome browser instance.
 The code I put in storyDriver.java file is :- 
  if (System.getProperty(SAUCE_USERNAME) != null) {
 driverProvider = new SauceWebDriverProvider();
 
  
   
 } else if (System.getProperty(REMOTE) != null) {
 driverProvider = new RemoteWebDriverProvider(); // replace with 
 RemoteWebDriverProvider


 } else {
 driverProvider = new GoogleWebDriverProvided();
   
  
 }
 
 The maven commands used are:
 For invoking browser on local : mvn test -Dtest.browser=chrome
 
 For invoking remote : mvn test -Dtest.browser=chrome 
 -DREMOTE_WEBDRIVER_URL=http://remote machine IP:/wd/hub.
 
 I've seen code in RemoteWebDriverProvider where it has mentioned about 
 propertly like REMOTE_WEBDRIVER_URL i meant
 
  public URL createRemoteURL() throws MalformedURLException {
 String url = System.getProperty(REMOTE_WEBDRIVER_URL);
 if (url == null) {
 throw new UnsupportedOperationException(REMOTE_WEBDRIVER_URL 
 property not specified);
 }
 return new URL(url);
 }
 
 
 can any Dev/Mauro/Hans help in the code fix so that I can able to run stories 
 in LOCAL GRID set up as well? Please advise.
 I've already attached the sample project.
 Please let me know if anybody got any questions.
 
 Regards,
 K
 Google-Core.rar


Re: [jbehave-user] jbehave-core sources include examples

2014-05-02 Thread Mauro Talevi
The examples form an integral part of the project, ensuring the correct 
behaviour of the releasable modules.   They're not just examples, but 
more akin to acceptance/integration tests.


If you are looking for examples that are not connected to the code, then 
the jbehave-tutorial is place to start.


The jbehave-core examples can nonetheless be used without having to 
import the whole project in the IDE, just the example modules you're 
interested in (including the parent of the examples though).You can 
activate the 'codehaus' profile in the settings.xml and have access to 
the Codehaus snapshots for the latest version of the releasable 
modules.   Or you can configure you corporate Repository Manager (e.g. 
Nexus) to proxy the Codehaus Snapshots.


You do need to clone or download the entire repo though. Honestly, it 
takes a min or two to clone or download the source. Care has been taken 
to separate into different repos complementary aspects, e.g. web, 
eclipse, osgi etc ... but one needs to strike a balance.


On 29/04/2014 11:30, Hans Schwäbli wrote:

Currently I am just interested in the sources for the JBehave examples.
I cannot check them out separetely since they are contained in 
jbehave-core, which are a lot of maven projects, sources and hundreds 
of dependencies. jbehave-core is a very large repository even without 
the examples.
Checking examples out into a IDE and building them is more complicated 
and takes more time than it could be because of this.

What do you think about separating the examples from jbehave-core?



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] GivenStories does not work in my example (4.x branch)

2014-05-02 Thread Mauro Talevi

Hi Hans,

the issue has been noted and fixed.   The given stories were only 
executed at scenario level but not at story level.


A new 4.0-beta-7 is being released.

Cheers

On 02/05/2014 11:36, Hans Schwäbli wrote:
Somehow GivenStories does not work as expected in the 4.x branch. It 
is not executed.

But when I use jbehave-core 3.9, then the GivenStories are executed.
See my example below. It is in German, I changed the story language. 
GivenStories is VorgegebeneStories.
Maybe this information is enough to help me. Otherwise I can commit 
the example somewhere. It is not so easy from within a company in the 
financial industry since prevents any cloud access, including Github.

Story:
Bei Bestellungen muss geprüft werden, ob Rabatte gelten.
Ausserdem werden bei einem hohen Warenwert keine Versandkosten berechnet.

Meta:
@Komponente Bestellung
@Anforderung Y1776
@Verfasser Guybrush Threepwood

Erzählung:
Um Angebote und Rechnungen zu erstellen
Als ein Sachbearbeiter im Verkauf
Möchte ich Rabatte, Versandkosten und Lagerbestand berücksichtigen

VorgegebeneStories: shop/stories/Login.story

Szenario: Kleine Menge wird bestellt
Gegeben im Lager sind 300 T-Shirts




-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Running on Emptiness

2014-05-02 Thread Mauro Talevi

The unbearable emptiness of being :-)

The idea is to try and encourage partial story writing.   E.g. once 
might only write a description and a narrative, but not yet have any 
scenarios to add.


If one write a scenario though, at least one step must be present.

We could add a warning saying that no scenarios are found, but that is 
also implicitly evident in the report.


On 02/05/2014 12:43, Hans Schwäbli wrote:
I discovered that I can run a completely empty story. It contains 
nothing, no narrative, no scenarios and no steps, nothing.

If I run it then no failure is shown.
Why is so much allowed when writing a story? Why is it not required 
that a story has at least one step and that there is no scenario 
containing zero steps?



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] StoryReporter does not contain storyMeta(Meta meta) method

2014-05-02 Thread Mauro Talevi

The meta at story level is always merged with the meta at scenario level.

This is why only the resulting meta is reported.

We could add the reporting of story level meta, but what is your use-case?

On 02/05/2014 14:22, Hans Schwäbli wrote:
org.jbehave.core.reporters.StoryReporter contains a scenarioMeta(Meta 
meta) method.

But it does not contain a method like storyMeta(Meta meta).
I need to access the Meta information for the story in the StoryReporter.
Was it forgotton to add that method into StoryReporter or did I 
overlook something (like last time when I searched for afterStep)?



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] How to get working JBehave sources in Eclipse?

2014-04-29 Thread Mauro Talevi
This is precisely what the ignore functionality does - it updates the 
workspace lifecycle mapping metadata.It is supported in 4.3 - but 
you may have an older version of the m2e plugin.


In any case, I've added it to source control (under ides/eclipse) and 
updated README. Please try reloading this from Preferences  Maven  
Lifecycle Mappings.


On 29/04/2014 11:59, Hans Schwäbli wrote:

Maybe Eclipse 4.4 has this feature, I haven't discovered it in 4.3.
I created a lifecycle mappings metadata which solves this problem 
(such things could be added to a Wiki for instance):

?xml version=1.0 encoding=UTF-8?
lifecycleMappingMetadata
!-- Why this is needed for Eclipe: 
http://wiki.eclipse.org/M2E_plugin_execution_not_covered --

pluginExecutions
pluginExecution
pluginExecutionFilter
groupIdorg.jbehave/groupId
artifactId
jbehave-maven-plugin
/artifactId
versionRange
[4.0-SNAPSHOT,)
/versionRange
goals
goal
unpack-view-resources
/goal
/goals
/pluginExecutionFilter
action
ignore/ignore
/action
/pluginExecution
pluginExecution
pluginExecutionFilter
groupId
org.jvnet.hudson.tools
/groupId
artifactId
maven-hpi-plugin
/artifactId
versionRange
[3.0.1,)
/versionRange
goals
goalinsert-test/goal
goaltest-hpl/goal
goal
resolve-test-dependencies
/goal
/goals
/pluginExecutionFilter
action
ignore/ignore
/action
/pluginExecution
pluginExecution
pluginExecutionFilter
groupIdorg.scala-tools/groupId
artifactId
maven-scala-plugin
/artifactId
versionRange
[2.9.1,)
/versionRange
goals
goaladd-source/goal
goalcompile/goal
goaltestCompile/goal
/goals
/pluginExecutionFilter
action
ignore/ignore
/action
/pluginExecution
pluginExecution
pluginExecutionFilter
groupIdde.saumya.mojo/groupId
artifactId
jruby-maven-plugin
/artifactId
versionRange
[0.29.1,)
/versionRange
goals
goalcompile/goal
/goals
/pluginExecutionFilter
action
ignore/ignore
/action
/pluginExecution
/pluginExecutions
/lifecycleMappingMetadata


On Mon, Apr 28, 2014 at 11:02 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


Yes, the m2e plugin is very annoying in this.   IMO it's one of
the worst design decisions they've made when migrating from the
original m2eclipse plugin.  But with recent versions, Eclipse
allows you to mark as ignored these errors without modifying the
pom.xml.   The feature is marked as experimental but it's stable
and works fine.  It stores the info to be ignored in the workspace
(I'm not sure if it can exported and re-imported easily though).

This is why the source code is not polluted with the pom.xml
modifications - as you say to preserve IDE neutrality.

On 28/04/2014 14:46, Hans Schwäbli wrote:

Thank you.
I forgot about the page which explains the JBehave source
building. So I didn't see that I need to use that settings.xml file.
But I think my biggest mistake was when importing the maven
project into Eclipse. The import wizard shows me the plugins
which can't be found. There I can choose in a little dropdown
that m2e writes into the pom.xml that these plugins are ignored.
It works now with that approach.
However, you could add these settings into the pom.xml parent
file, so it would be no problem to import the maven projects into
Eclipse. But I am afraid that you want to be IDE neutral. In that
case a documentation on how to import JBehave sources into
Eclipse would be nice. I would be willing to contribute if you
provide some Wiki for JBehave (because I cannot commit anything
in Github from the company and it is too much overhead to create
HTML pages for me).


On Fri, Apr 25, 2014 at 4:49 PM, Cristiano Gavião
cvgav...@gmail.com mailto:cvgav...@gmail.com wrote:

first things you must learn before

Re: [jbehave-user] Lifecycle naming

2014-04-28 Thread Mauro Talevi
It's rather debatable whether one sounds more natural or technical than 
the other.   Also, background tends to suggest concurrency - which is 
not the case.


In any case, it's all subjective.   If you prefer, you can configure 
your own custom company locale (akin to a new language) with the name 
you choose.The Eclipse plugin will pick up the locale you've 
configured in your Configuration.


Or you can use the Gherkin syntax directly.

On 28/04/2014 12:31, Hans Schwäbli wrote:

I have a little suggestion concerning lifecycle steps.
This is a cool feature. But the name lifecycle sounds quite 
technical and can intimidate testers and business analysts, unlike the 
other elements of a story.

In Cucumber they call it background which does not sound so technical.
It is not a big issue for me, but I think a natural name like 
background would be more appropriate. Of course I could change the 
keyword names locally (for the Eclipse plugin it would be more 
tricky), but just as a feedback.



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] How to get working JBehave sources in Eclipse?

2014-04-28 Thread Mauro Talevi
Yes, the m2e plugin is very annoying in this.   IMO it's one of the 
worst design decisions they've made when migrating from the original 
m2eclipse plugin.  But with recent versions, Eclipse allows you to mark 
as ignored these errors without modifying the pom.xml.   The feature is 
marked as experimental but it's stable and works fine.  It stores the 
info to be ignored in the workspace (I'm not sure if it can exported and 
re-imported easily though).


This is why the source code is not polluted with the pom.xml 
modifications - as you say to preserve IDE neutrality.


On 28/04/2014 14:46, Hans Schwäbli wrote:

Thank you.
I forgot about the page which explains the JBehave source building. So 
I didn't see that I need to use that settings.xml file.
But I think my biggest mistake was when importing the maven project 
into Eclipse. The import wizard shows me the plugins which can't be 
found. There I can choose in a little dropdown that m2e writes into 
the pom.xml that these plugins are ignored.

It works now with that approach.
However, you could add these settings into the pom.xml parent file, so 
it would be no problem to import the maven projects into Eclipse. But 
I am afraid that you want to be IDE neutral. In that case a 
documentation on how to import JBehave sources into Eclipse would be 
nice. I would be willing to contribute if you provide some Wiki for 
JBehave (because I cannot commit anything in Github from the company 
and it is too much overhead to create HTML pages for me).



On Fri, Apr 25, 2014 at 4:49 PM, Cristiano Gavião cvgav...@gmail.com 
mailto:cvgav...@gmail.com wrote:


first things you must learn before are:

- how works a maven settings.xml and how to set it in your machine;

- how m2e works related to a pure maven outside eclipse...

- how to make m2e ignore unsupported plugins...

here you have tips how to build outside eclipse:
http://jbehave.org/reference/latest/building-source.html

for the rest, I'm sure you will find lot of materials on the net...

Cristiano


On 25-04-2014 10 tel:25-04-2014%2010:34, Hans Schwäbli wrote:

I try to import the projects of jbehave-core (branch 4.x) into
Eclipse Kepler as Maven projects.
It causes a lot of problems: 127 errors (compile and pom
problems).
For example the error in jbehave-core\examples\core\pom.xml is:

Multiple annotations found at this line:

- maven-dependency-plugin (goals copy-dependencies,
unpack) is not supported by m2e.

- Plugin execution not covered by lifecycle configuration:
org.jbehave:jbehave-maven-plugin:4.0-SNAPSHOT:unpack-view-resources
(execution: unpack-view-resources, phase: process-

resources)
And for many other poms:
Could not find artifact
org.jbehave:jbehave-maven-plugin:pom:4.0-SNAPSHOT
And:
Project build error: Unknown packaging: hpi
And if I build jbehave-core with maven (clean install without
tests), then It fails with this error quite early at JBehave
Hudson Plugin:

[ERROR] Failed to execute goal
org.kohsuke:access-modifier-checker:1.4:enforce
(default-enforce) on project jbehave-hudson-plugin: Execution
default-enforce of goal
org.kohsuke:access-modifier-checker:1.4:enforce failed: Plugin
org.kohsuke:access-modifier-checker:1.4 or one of its
dependencies could not be resolved: Could not find artifact
org.jenkins-ci:annotation-indexer:jar:1.4 in Central
(http://repo1.maven.org/maven2) - [Help 1]
What is the problem? Or how do you get working projects of it
in Eclipse after cloning it from Github?



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email







Re: [jbehave-user] What about a Wiki?

2014-04-28 Thread Mauro Talevi
Yes a Codehaus Confluence wiki space exists for JBehave and can be used 
for user contributions.


We'd need to check on permissions and all that for contributors.

On 28/04/2014 17:00, Mirko Friedenhagen wrote:

Hello,

what about http://docs.codehaus.org/display/JBEHAVE/? I do not know
about the permissions but could imagine a Wiki-space named JBEHAVEUSER
for user contributions next to the official one would be a good
place with easy interwiki links :-).
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Mon, Apr 28, 2014 at 4:17 PM, Hans Schwäbli
bugs.need.love@gmail.com wrote:

There are no wiki pages for JBehave as it seems.

What about looking for a free wiki hoster and registrating a offical wiki
place for JBehave?

This would be a place where the community can provide documentation on
JBehave with very little overhead. After all wiki means fast.

If you agree I can look for suitable hosting sites.

-
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




Re: [jbehave-user] Exporting test results into HP Quality Center (or any other test management tool)

2014-04-10 Thread Mauro Talevi
@AfterScenario supports the variable uponOutcome to determine if the 
scenario has failed or not.


Else you can parse the XML of the story and  extract the scenario info.

On 10/04/2014 13:42, Hans Schwäbli wrote:
I achieved to create Java classes which can export test results into 
HP Quality Center by using its REST interface.
But now I wonder how to extract the outcome from the JBehave run so 
that I can export the results. I want to export that in a very basic 
way: test result with an attached XML report.
I identify the tests in Quality Center by using a Meta info per 
scenario: @qc-testcase Root/Test Folder x/Test Set y/My Test

This Meta info I can extract in a method like this:
@AfterScenario
public void afterScenario(@Named(qc-testcase) String qcTestcase) {}
Each scenario shall match a test in Quality Center.
My first idea was to export the outcome while the JBehave tests run. 
That would require to get to the information in a method annotated 
with @AfterScenario. But how can I determine in this method what 
outcome of the scenario is so that I can export that on-the-fly into 
HP QC?
Another idea was to parse the genereated XML file after the run has 
finished. But it has no schema file. So I cannot generate Java classes 
for it by using JAXB in order to parse the result in a good way. 
Furthermore there is no total outcome result printed in the XML, only 
for the step outcome. Besides that I should have an XML file per 
scenario, so that I can attach it to the test result when I export it 
into HP QC, and I don't know if I can achieve that, so that JBehave 
procduces XML files per scenario.

How would you solve that?



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Re: Behavior of org.jbehave.core.ConfigurableEmbedder.configuredEmbedder()

2014-03-31 Thread Mauro Talevi

Could you please raise a JIRA issue for this?

On 28/03/2014 11:59, Hans Schwäbli wrote:
I could cache the embedder myself by using lazy initialization in my 
class which extends JUnitStories.
But that has a side effect: the meta filtering does not work then for 
some unknown reason.



On Wed, Mar 26, 2014 at 8:54 AM, Hans Schwäbli 
bugs.need.love@gmail.com mailto:bugs.need.love@gmail.com 
wrote:


Hello Mauro,
I stumbled upon a beheavior of this method:
org.jbehave.core.ConfigurableEmbedder.configuredEmbedder()
It always calls these methods when being called:

embedder.useConfiguration(configuration());

embedder.useCandidateSteps(candidateSteps());

embedder.useStepsFactory(stepsFactory());

This had some unexpected side effects for me. For example I am
logging which steps are being used. Since I call
configuredEmbeder() multiple times, the method stepsFactory() is
called multiple times. Even if I use just one instance of embedder
it is called many times since the JBehave framework calls
configuredEmbedder() many times.

Maybe it wold be good if there is another method added to
org.jbehave.core.ConfigurableEmbedder called configureEmbedder
which actually configures the embedder every time when it is called.

But the method configuredEmbedder should maybe be implemented
with lazy initialization, so that the calls in its method are just
executed once.

What do you think about it?






Re: [jbehave-user] JBehave learning curve

2014-03-17 Thread Mauro Talevi
There is already a separate project for this: 
https://github.com/jbehave/jbehave-site/tree/master/site-frontend/src/site/content


It is the overall doc front-end published to jbehave.org. There we can 
develop a less-technical and more user-oriented (cross module, 
core/web/etc ...) documentation.


As for the wiki, I'm grown a bit sceptical of its usefulness.  No doubt 
it's immediate and easy to add things, but much less easy to maintain 
when the bulk of the docs grows.I much prefer file-based and 
processed docs that can be published online, but also packaged and 
downloaded as offline static docs.


With the advent of git (and github) the collaboration become just as 
easy, with all the advantages of centralised source control.


So, feel free to provide pull requests to the above project.

On 14/03/2014 16:54, Hans Schwäbli wrote:

Hello Josef,
I think the technical part of JBehave is really intended for software 
developers, so it requires that knowledge.
JBehave is a tool with a lot of features and has its complexity. It is 
well designed, of good quality and free. So there are of course some 
drawbacks like little documentation.

Anyone can participate in creating such documentation, and some people do.
I personally would hope, that an official Wiki is established for 
JBehave. That could help to solve that. It cold be helpful if the 
documentation is clearly separated into a part for story writers with 
no programming skills and for step implementers (developers).
I could establish that official Wiki if the JBehave owners agree, so 
that people can easily participate in creating missing documentation 
and updating it in a central place of knowledge.



2014-03-06 14:36 GMT+01:00 Josef Dietl jo...@dietl.org 
mailto:jo...@dietl.org:


Hi Janusz,

Thanks for taking up this topic. I was having similar problems to
get started, and for organizational reasons, I couldn't approach
the group.

I don't mean to offend anybody. Everybody here is incredibly
helpful, and the software is really great. But the learning curve
is wild. Given the deep questions I saw here while lurking, I
wasn't exactly inspired to step up, despite all the helpful
attitude of Mauro and everybody.

A bit about myself: I'm not a full-time developer, I'm a project
manager with a passion for continuous improvement of our
development practices. I'm good enough to occasionally find
something in a code review, to make a prototype or an automated
test, but my focus is on providing the optimal environment for the
development team so that /they/ can maximize their productivity.
So in order to get them to look at JBehave and [T|AT|B]DD, I had
to learn Maven and set up JBehave on my own in a branch of the
project to demonstrate the value-add.

To cut a long story short, once I was through, adding stories and
tests on top of the existing set-up was cool and convincing, but
the path there could have been smoother.

When I was working for the W3C, we had a saying: make the simple
things simple and the hard things possible. JBehave doesn't
exactly work like that, but once I had reached the hard things,
I also found traction in the documentation and the sample projects.

I don't have the role to suggest anything here, but I did ask
myself repeatedly whether it wouldn't be possible to be more
explicit about the first steps. Back then, I've tried my best here
-
http://digitaler-heimwerker.de/2012/10/26/howto-maven-spring-und-jbehave/
(unfortunately German). If a check with Google Translate suggests
that this is basically useful, I'd translate and tweak this and
its sibling post (below) as needed and contribute it.

Re-reading the post, I find that I struggled most on these topics:

1.What is the /simplest/ possible working configuration of
JBehave? (there's a description on the site, but no full
example... what are the main classes, what is their relationship
to each other? What do I need to import from where?
Reverse-engineering the thinking steps from the example projects
just didn't work for me.)

2.Depending on JBehave configuration and Maven configuration:
Where do I have to put this file, the stories and the step
implementations?

3.And then, specifically for my almost-simplest-possible set-up:
how does all this relate with Spring.

In hindsight, the biggest problem was #2: Which file goes where...
(or, more precisely, as everything is configurable: which
configuration determines what goes where, and what are the defaults?)

For a slightly more advanced topic, there's even a post in
English:

http://digitaler-heimwerker.de/2013/03/04/mocking-file-access-for-testing-with-jbehave-and-easymock/


I hope this helps. JBehave is really great, and I hope this
message is advancing its progress.

Thank you all for your great work!

   

Re: [jbehave-user] Q's on JBehave

2014-03-13 Thread Mauro Talevi
It's possible, but non-trivial, to encode the name of the table in the 
resource string.   It requires some customisation.


I would recommend to start off by having a separate process that takes 
your xls file and converts into separate string-based inputs that you 
invoke in your stories.


For Firefox, you can use the FirefoxWebDriverProvider which gives you 
access to all the Firefox features.


On 13/03/2014 05:11, farheen khan wrote:
But,I'll have multiple tables in a sheet of excel ,if its converted to 
csv,how can story read from a particular table.


Example of my excel sheet table:

Tablename   
Heading1Heading2
data1
data2

data3 data4 Tablename



One more question:

1.How can we create a firefox profile through webdriverprovider.:
Current code: private WebDriverProvider driverProvider = new 
PropertyWebDriverProvider();

2.How can i add capabilities to the driver which is instantiated?
3.How can i instantiate a remote webdriver?
 4. Is there a way to pass the browsername as parameter to driver?


Thanks in advance.


On Wed, Mar 12, 2014 at 1:45 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


You can try implementing a TableTransformer which reads the XLS
input and transforms each sheet to CSV.

You can try using Apache POI.

On 12 Mar 2014, at 05:12, farheen khan
farheenatskyqu...@gmail.com mailto:farheenatskyqu...@gmail.com
wrote:


Hi mauro,

Our application is very complex and reading from multiple csv
files will not be user-friendly. Hence, I wanted to read from a
single excel sheet which contains multiple sheets and each sheet
contains  tables for testcases.


Scenario should run as many times as there are number of rows in
the table of excel sheet.

I'm preferring excel because before I run my testcases , I need
to run macro on excel ,which will fill in the details into excel
from db.

Can this be done using jbehave.


On Tue, Mar 11, 2014 at 5:46 AM, Mauro Talevi
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org
wrote:

http://jbehave.org/reference/stable/parametrised-scenarios.html


On 11/03/2014 01:15, Mauro Talevi wrote:

The parametrised scenario does allow to repeat the scenario
for each row of the Examples table. The table can be read
from an external CSV file.

Was this the question?  If not, can you rephrase it please?

On 10/03/2014 16:35, farheen khan wrote:

Thanks everyone specially Mauro for the reply.Your inputs
helped me,

Yes, I'm planning to host the results as well as store it
in the db.

Few more questions:

For every scenario,can i iterate over the scenario as many
times as number of  rows in  the data table ,which is read 
from excel sheet,like it happens with Examples ? If yes,

how can i accomplish that.

Thanks in advance.




On Mon, Mar 3, 2014 at 2:29 PM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

1.  You can implement your own ViewGenerator to store to DB
2.  It's possible, but you need to pass it to the
ViewGenerator via the ViewProperties, then modify the
ViewGenerator (or the FTL template if writing to file)
3.  WebRunner can run any kind of story
4.  WebRunner is not meant as a replacement for a
Continuous Integration build engine.   It's an on
demand run tool.

As already noted, it would seem that your requirements
would be best met by a CI tool. Is this what you're
trying to do?


On 03/03/2014 06:07, farheen khan wrote:

I recently have implemented JBehave with webdriver for
automation. I have few queries.

1. can JBehave store the results in DB after the suite
is completed?
2. Can we modify the Jbehave report to display the
buildnumber?
3. can we run webdriver tests to run from jbehave web
runber.Example of etsy.com http://etsy.com doesn't
actually run the webdriver stories.
4. Can we integrate the results with web-runner. i.e
instead of opening target/view.index.html , can we
host it on any webserver along with web-runner.

-- 
Thanks and regards

Farheen Khan







-- 
Thanks and regards

Farheen Khan









-- 
Thanks and regards

Farheen Khan






--
Thanks and regards
Farheen Khan






Re: [jbehave-user] Q's on JBehave

2014-03-13 Thread Mauro Talevi

We recommend the Page Object pattern - as demonstated in the tutorial.

On 13/03/2014 18:29, farheen khan wrote:

Thanks Mauro for your reply.

One more doubt I have ..

I'm implementing JBehave with Webdriver . Which framework[Keyword 
driven/Page Object Model] is better in terms of


1.robustness
2.Easy to be automated
3.Scalable[any new manual QA can automate with basic knowledge of Java 
and JBehave]


Etsy.com example is Page Object Model.

Can I use JBehave steps as Keywords to match to Common Steps.

For eg:
@Then(the user clicks on Button: $ButtonName)
@When(the user clicks on Button: $ButtonName)
@Given(the user clicks on Button: $ButtonName)
public void buttonClick(String ButtonName){
findElement(By.xpath(//button[text()='+ButtonName+'])).click();
}


@When(user types in textfield: $username,$textToBeEntered)
public void typein (ObjectIdentifier val,String textToBeEntered){
manage().timeouts().implicitlyWait(35, TimeUnit.SECONDS);
findElement(By.xpath(val.getLocator().toString())).click();
}
@When(user selects from selectlist: $locator,$valueToBeSelected)
public void selects (ObjectIdentifier locator,String textToBeEntered){
manage().timeouts().implicitlyWait(35, TimeUnit.SECONDS);
findElement(By.xpath(locator.getLocator().toString())).click();
}

}



Or Shd i go ahead like etsy.com http://etsy.com example.Please suggest.



On Thu, Mar 13, 2014 at 4:45 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


It's possible, but non-trivial, to encode the name of the table in
the resource string.   It requires some customisation.

I would recommend to start off by having a separate process that
takes your xls file and converts into separate string-based inputs
that you invoke in your stories.

For Firefox, you can use the FirefoxWebDriverProvider which gives
you access to all the Firefox features.

On 13/03/2014 05:11, farheen khan wrote:

But,I'll have multiple tables in a sheet of excel ,if its
converted to csv,how can story read from a particular table.

Example of my excel sheet table:

Tablename   
Heading1Heading2
data1
data2

data3 data4 Tablename



One more question:

1.How can we create a firefox profile through webdriverprovider.:
Current code: private WebDriverProvider driverProvider = new
PropertyWebDriverProvider();
2.How can i add capabilities to the driver which is instantiated?
3.How can i instantiate a remote webdriver?
 4. Is there a way to pass the browsername as parameter to driver?


Thanks in advance.


On Wed, Mar 12, 2014 at 1:45 PM, Mauro Talevi
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org
wrote:

You can try implementing a TableTransformer which reads the
XLS input and transforms each sheet to CSV.

You can try using Apache POI.

On 12 Mar 2014, at 05:12, farheen khan
farheenatskyqu...@gmail.com
mailto:farheenatskyqu...@gmail.com wrote:


Hi mauro,

Our application is very complex and reading from multiple
csv files will not be user-friendly. Hence, I wanted to read
from a single excel sheet which contains multiple sheets and
each sheet contains  tables for testcases.


Scenario should run as many times as there are number of
rows in the table of excel sheet.

I'm preferring excel because before I run my testcases , I
need to run macro on excel ,which will fill in the details
into excel from db.

Can this be done using jbehave.


On Tue, Mar 11, 2014 at 5:46 AM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

http://jbehave.org/reference/stable/parametrised-scenarios.html



On 11/03/2014 01:15, Mauro Talevi wrote:

The parametrised scenario does allow to repeat the
scenario for each row of the Examples table.  The table
can be read from an external CSV file.

Was this the question?  If not, can you rephrase it
please?

On 10/03/2014 16:35, farheen khan wrote:

Thanks everyone specially Mauro for the reply.Your
inputs helped me,

Yes, I'm planning to host the results as well as store
it in the db.

Few more questions:

For every scenario,can i iterate over the scenario as
many times as number of  rows in  the data table
,which is read from excel sheet,like it happens with
Examples ? If yes, how can i accomplish that.

Thanks in advance.




On Mon, Mar 3, 2014 at 2:29 PM, Mauro Talevi
mauro.tal...@aquilonia.org
mailto:mauro.tal...@aquilonia.org wrote:

1.  You can

Re: [jbehave-user] Q's on JBehave

2014-03-12 Thread Mauro Talevi
You can try implementing a TableTransformer which reads the XLS input and 
transforms each sheet to CSV. 

You can try using Apache POI.

 On 12 Mar 2014, at 05:12, farheen khan farheenatskyqu...@gmail.com wrote:
 
 Hi mauro,
 
 Our application is very complex and reading from multiple csv files will not 
 be user-friendly. Hence, I wanted to read from a single excel sheet which 
 contains multiple sheets and each sheet contains  tables for testcases. 
 
 
 Scenario should run as many times as there are number of rows in the table of 
 excel sheet.
 
 I'm preferring excel because before I run my testcases , I need to run macro 
 on excel ,which will fill in the details into excel from db.
 
 Can this be done using jbehave.
 
 
 On Tue, Mar 11, 2014 at 5:46 AM, Mauro Talevi mauro.tal...@aquilonia.org 
 wrote:
 http://jbehave.org/reference/stable/parametrised-scenarios.html
 
 
 On 11/03/2014 01:15, Mauro Talevi wrote:
 The parametrised scenario does allow to repeat the scenario for each row of 
 the Examples table.  The table can be read from an external CSV file.
 
 Was this the question?  If not,  can you rephrase it please?  
 
 On 10/03/2014 16:35, farheen khan wrote:
 Thanks everyone specially Mauro for the reply.Your inputs helped me,
 
 Yes, I'm planning to host the results as well as store it in the db.
 
 Few more questions:
 
 For every scenario,can i iterate over the scenario as many times as number 
 of  rows in  the data table ,which is read  from excel sheet,like it 
 happens with Examples ? If yes, how can i accomplish that.
 
 Thanks in advance.
 
 
 
 
 On Mon, Mar 3, 2014 at 2:29 PM, Mauro Talevi mauro.tal...@aquilonia.org 
 wrote:
 1.  You can implement your own ViewGenerator to store to DB
 2.  It's possible, but you need to pass it to the ViewGenerator via the 
 ViewProperties, then modify the ViewGenerator (or the FTL template if 
 writing to file)
 3.  WebRunner can run any kind of story
 4.  WebRunner is not meant as a replacement for a Continuous Integration 
 build engine.   It's an on demand run tool. 
 
 As already noted, it would seem that your requirements would be best met 
 by a CI tool.   Is this what you're trying to do?
 
 
 On 03/03/2014 06:07, farheen khan wrote:
 I recently have implemented JBehave with webdriver for automation. I 
 have few queries.
 
 1. can JBehave store the results in DB after the suite is completed?
 2. Can we modify the Jbehave report to display the buildnumber? 
 3. can we run webdriver tests to run from jbehave web runber.Example of 
 etsy.com doesn't actually run the webdriver stories.
 4. Can we integrate the results with web-runner. i.e instead of opening 
 target/view.index.html , can we host it on any webserver along with 
 web-runner.
 
 -- 
 Thanks and regards
 Farheen Khan
 
 
 
 -- 
 Thanks and regards
 Farheen Khan
 
 
 
 -- 
 Thanks and regards
 Farheen Khan
 
 


Re: [jbehave-user] Problem with localized story

2014-03-12 Thread Mauro Talevi

Hi Andreas,

it does seem a bug, which needs further investigation.   Please raise a 
JIRA issue and attach project.


If the step is not matched is should provide a pending method stub with 
the real annotation, e.g. @Given.


It's a smell, probably why it's not matching the step.

In the mean time, you can replace Und with Gegeben and it'll work.   You 
just can't have two Und's in a row.


Cheers

On 12/03/2014 22:41, Andreas Rudolf wrote:

Hi,

I tried to use jBehave stories with German locales (See text below and the 
attached example).
But Und steps of the german story aren't fully recognized.
It is working With just one Und-step but not with an additional one.

English version of the story works fine (even with two And based step 
candidates ).

Can anybody explain, where  is my fault?

Regards
   Andreas
   
PS: By the way, jBehave offers an annotation @and in this example report, but there exists no @and annotation in jBehave.

Seems to be a bug

PS: As you see in pom.xml I used stable jBehave version

- Step class 

public class Kreditausfallversicherung {
 
 @Given(sei eine Kreditausfallversicherung mit einer Laufzeit bis zum $enddate)

 public void maturityDateOfCDS(String maturity)  {
 System.out.println(Given: maturityDateOfCDS  + maturity);
 }

 @Given(einer Ausfallpr\u00E4mie von $spread pro Jahr)
 public void spreadAndPaymentFrequency(double spread) {
 System.out.println(Given: spreadAndPaymentFrequency  + 
spread);
 }
 
 @Given(einer Konkursquote von $recoveryRate)

 public void andEinerKonkursquoteVon40(double recoveryRate) {
 System.out.println(Given: andEinerKonkursquoteVon40  + 
recoveryRate);
 }
 
 @When(die Kreditausfallversicherung bewertet wird)

 public void wennDieKreditausfallversicherungBewertetWird() {
 System.out.println(When: 
wennDieKreditausfallversicherungBewertetWird );
 }

 @Then(wird zum $presentDate der aktuelle Wert $presentValue EUR 
erwartet)
 public void erwartet(String presentDate,double presentValue) {
 System.out.println(Then: erwartet  + presentDate +   + 
presentValue);
 }
}
-


   
-- snipp German Version 
   
Erzählung:

Um eine Kreditausfallversicherung
Als Händler zu bewerten
Möchte ich den aktuellen Wert berechnen

!-- Vorher:
!-- Gegeben sei folgende risikolose Zinskurve
!-- |Tage|Zinssatz|
!--
Szenario: Berechnung mit einer Konkursquote von 40%
Given: maturityDateOfCDS 20.1.2009
Gegeben sei eine Kreditausfallversicherung mit einer Laufzeit bis zum 20.1.2009
Given: spreadAndPaymentFrequency 5.0
Und einer Ausfallprämie von 0,05 pro Jahr
Und einer Konkursquote von 40% (AUSSTEHEND)
Wenn die Kreditausfallversicherung bewertet wird (NICHT AUSGEFÜHRT)
Dann wird zum 20.8.2008 der aktuelle Wert -8,347642935784341E-4 EUR erwartet 
(NICHT AUSGEFÜHRT)
@And(einer Konkursquote von 40%)
@Pending
public void andEinerKonkursquoteVon40() {
   // AUSSTEHEND
}
   
-- snipp English Version 

Narrative:
In order to have the present value of a CDS
As a trader
I want to calculate it
Scenario: Calculation with a recovery rate of 40%
STEP: given maturityDateOfCDS 20.1.2009
Given a CreditDefaultSwap with maturity date 20.1.2009
STEP: given spreadPerYear 0.05
And a spread of 0.05 per year
STEP: given recoveryRate 40.0
And a recovery rate of 40%
STEP: when itsCalculated
When its calculated
STEP: then expectValueAtRiskdate 20.8.2008
Then we expect at 20.8.2008 a present value of -8,347642935784341E-4 EUR


-
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email




Re: [jbehave-user] can't get started with running-examples or jbehave-tutorial

2014-03-10 Thread Mauro Talevi
Latest master also builds with mvn 3.1+

Tested on OSX, Linux and Windows.


 On 8 Mar 2014, at 16:08, Mauro Talevi mauro.tal...@aquilonia.org wrote:
 
 I've tested the build starting from an   empty Maven repo with Maven 
 3.0.5 and it works fine. 
 
 On the other hand, it fails with Maven 3.1 and 3.2 for reasons yet to be 
 determined,  linked to missing dependencies. 
 
 I've opened an issue for this http://jira.codehaus.org/browse/JBEHAVE-1001
 
 For the moment, please stay on Maven 3.0.5 if you want to build JBehave Core 
 from source.  
 
 Running tutorials is ok with 3.1 and 3.2 - I've updated the dependencies on 
 the tutorial to the latest releases of core and web. 
  
 On 07/03/2014 20:41, Craig Comstock wrote:
 For jbehave-core I get one failure in JBehave REST.
 
 If I follow the jbehave-core instructions and run mvn install after that I 
 get a similar problem as what I was getting before I switched JDKs.
 
 So a bit better and a bit the same. I imagine that the failure on JBehave 
 REST is not critical in terms of me using JBehave built like this, maybe a 
 regression issue?
 
 Thanks for the quick feedback!
 
 _Craig
 
 
 
 From: Craig Comstock craig_comst...@yahoo.com
 To: user@jbehave.codehaus.org user@jbehave.codehaus.org 
 Sent: Friday, March 7, 2014 1:18 PM
 Subject: Re: [jbehave-user] can't get started with running-examples or 
 jbehave-tutorial 
 
 The jbehave-tutorial site says 1.5 or 1.6 is OK. So maybe that's not quite 
 the problem there. I have attached my java/mvn versions and the build 
 results here it seems to be the same problem regardless of JDK I use.
 
 https://github.com/jbehave/jbehave-tutorial/
 
 For jbehave-core I do make MUCH more progress... it is downloading a bunch 
 of jars now.
 
 RTFM. :)
 
 Thanks,
 Craig
 
 
 From: Mauro Talevi mauro.tal...@aquilonia.org
 To: user@jbehave.codehaus.org user@jbehave.codehaus.org 
 Sent: Friday, March 7, 2014 12:53 PM
 Subject: Re: [jbehave-user] can't get started with running-examples or 
 jbehave-tutorial 
 
 https://github.com/jbehave/jbehave-core/blob/master/README.md
 
 
 On 7 Mar 2014, at 18:49, Mauro Talevi mauro.tal...@aquilonia.org wrote:
 
 As of 3.9 JDK 1.7 is required to build (JBEHAVE-913).
 
 JDK 1.5+ is still supported at runtime. 
 
 Cheers
 
 
 On 7 Mar 2014, at 17:36, Craig Comstock craig_comst...@yahoo.com wrote:
 
 I'm having a hard time figuring out how to get started with jbehave. The 
 two examples of setup I see are:
 
 http://jbehave.org/reference/stable/running-examples.html
 
 and
 
 https://github.com/jbehave/jbehave-tutorial
 
 Neither seem to work as described...
 
 
 Here's my environment... Debian 7.0:
 
 :~/workspace/jbehave-tutorial$ mvn -version
 Apache Maven 3.0.4
 Maven home: /usr/share/maven
 Java version: 1.6.0_41, vendor: Sun Microsystems Inc.
 Java home: /opt/app/jdk1.6.0_41/jre
 Default locale: en_US, platform encoding: UTF-8
 OS name: linux, version: 3.2.35, arch: amd64, family: unix
 
 
 Failure logs are attached. Both seem to be missing dependencies???
 
 Thanks,
 Craig
 jbehave-core-install.log
 jbehave-tutorial-install.log
 
 -
 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
 


Re: [jbehave-user] Q's on JBehave

2014-03-10 Thread Mauro Talevi
The parametrised scenario does allow to repeat the scenario for each row 
of the Examples table.  The table can be read from an external CSV file.


Was this the question?  If not,  can you rephrase it please?

On 10/03/2014 16:35, farheen khan wrote:

Thanks everyone specially Mauro for the reply.Your inputs helped me,

Yes, I'm planning to host the results as well as store it in the db.

Few more questions:

For every scenario,can i iterate over the scenario as many times as 
number of  rows in  the data table ,which is read from excel 
sheet,like it happens with Examples ? If yes, how can i accomplish that.


Thanks in advance.




On Mon, Mar 3, 2014 at 2:29 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


1.  You can implement your own ViewGenerator to store to DB
2.  It's possible, but you need to pass it to the ViewGenerator
via the ViewProperties, then modify the ViewGenerator (or the FTL
template if writing to file)
3.  WebRunner can run any kind of story
4.  WebRunner is not meant as a replacement for a Continuous
Integration build engine.   It's an on demand run tool.

As already noted, it would seem that your requirements would be
best met by a CI tool.   Is this what you're trying to do?


On 03/03/2014 06:07, farheen khan wrote:

I recently have implemented JBehave with webdriver for
automation. I have few queries.

1. can JBehave store the results in DB after the suite is completed?
2. Can we modify the Jbehave report to display the buildnumber?
3. can we run webdriver tests to run from jbehave web
runber.Example of etsy.com http://etsy.com doesn't actually run
the webdriver stories.
4. Can we integrate the results with web-runner. i.e instead of
opening target/view.index.html , can we host it on any webserver
along with web-runner.

-- 
Thanks and regards

Farheen Khan







--
Thanks and regards
Farheen Khan






Re: [jbehave-user] Q's on JBehave

2014-03-10 Thread Mauro Talevi

http://jbehave.org/reference/stable/parametrised-scenarios.html

On 11/03/2014 01:15, Mauro Talevi wrote:
The parametrised scenario does allow to repeat the scenario for each 
row of the Examples table.  The table can be read from an external CSV 
file.


Was this the question?  If not,  can you rephrase it please?

On 10/03/2014 16:35, farheen khan wrote:

Thanks everyone specially Mauro for the reply.Your inputs helped me,

Yes, I'm planning to host the results as well as store it in the db.

Few more questions:

For every scenario,can i iterate over the scenario as many times as 
number of  rows in  the data table ,which is read from excel 
sheet,like it happens with Examples ? If yes, how can i accomplish that.


Thanks in advance.




On Mon, Mar 3, 2014 at 2:29 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


1.  You can implement your own ViewGenerator to store to DB
2.  It's possible, but you need to pass it to the ViewGenerator
via the ViewProperties, then modify the ViewGenerator (or the FTL
template if writing to file)
3.  WebRunner can run any kind of story
4.  WebRunner is not meant as a replacement for a Continuous
Integration build engine.   It's an on demand run tool.

As already noted, it would seem that your requirements would be
best met by a CI tool.   Is this what you're trying to do?


On 03/03/2014 06:07, farheen khan wrote:

I recently have implemented JBehave with webdriver for
automation. I have few queries.

1. can JBehave store the results in DB after the suite is completed?
2. Can we modify the Jbehave report to display the buildnumber?
3. can we run webdriver tests to run from jbehave web
runber.Example of etsy.com http://etsy.com doesn't actually
run the webdriver stories.
4. Can we integrate the results with web-runner. i.e instead of
opening target/view.index.html , can we host it on any webserver
along with web-runner.

-- 
Thanks and regards

Farheen Khan







--
Thanks and regards
Farheen Khan








Re: [jbehave-user] JBehave learning curve

2014-03-08 Thread Mauro Talevi

Hi Josef,

thanks for your exhaustive feedback and suggestions.   Yes, it looks 
like your understanding is pretty spot on.  It'd be great to give the 
docs a good refresh with emphasis on the getting started learning 
curve.   As we were saying fresh eyes - especially from a user 
perspective - could be enormously beneficial.


To create JIRA issues, you need to get yourself a Codehaus account at 
http://xircles.codehaus.org/


Cheers

On 08/03/2014 01:44, Josef Dietl wrote:


Hi Mauro,

Thanks, that was about the answer I had hoped for.

Yes, I've used the archetypes, I've tried to reverse-engineer the 
questions I had and integrate what I wanted into the then-existing 
(pretty complex) Maven+(Jenkins|Eclipse) build process based on that 
insight. Making the archetypes work was indeed reasonably OK, finding 
out how to think about JBehave from the right angle and then 
transferring that into the real project was the hard part. By the 
way, when researching magen, it seemed to me that file locations and 
directory hierarchies are a recurring topic when using maven, even 
independent of JBehave.


What I was mostly missing was the thinking /behind/ all the things 
that are touched upon in today's tutorials and archetypes. The stuff 
that is so obvious to the JBehave pro that you can't even /think/ of 
it explicitly, and therefore it isn't written down anywhere. As you, 
Mauro, put it: Sometimes though it's not so easy to judge this 
steepness when one is too close to the development. I know that 
phenomenon.


I'll give the getting started topic a shot over the next days.

As a first idea, I'm thinking of:

-Prerequisites: maven. Maybe there is a good maven tutorial somewhere 
we can link to, maybe there is a simple (!) way to experiment with 
JBehave without maven. (What is the simplest set-up with JUnitStory in 
Eclipse?)


-Basic JBehave concepts

oEmbedder, Embedding, basic execution: How does JBehave get executed 
in the first place?

(execution as JUnit and execution in maven)

oWhat are the basic phases /within/ JBehave? (I guess: Configuration, 
Story loading, matching against step implementations, reporting) How 
do they relate by default to maven phases?


oConfiguration and loading stories (StoryLoader)

oStep implementations

oReporting basics

o... and how all this relates to each other.

-A minimal step-by-step-documented maven-set-up (what file goes where 
and why, what is the thinking process for the person doing the set-up 
/during/ configuration)


This is my current best candidate for Getting Started. It's pretty 
close to what's there, I'd just like to add some details (e.g. maven 
and directory conventions) and some overview (how do things relate to 
each other).


While writing the above, I started to feel that a lot of this is about 
lifecycles: Outside-in


1.There is a lifecycle of the project as a whole. JBehave may be there 
from the very start, or it may come in later.


2.There is a lifecycle of the JBehave aspect of the project, i.e. 
configuration and story loading


3.There are lifecycles for every story.

4.There are lifecycles for every build run. This has a common part 
(basic phases above) and variation depending on environment: in an 
IDE (Junit-integration), in a local build (Console output) or on a CI 
server (fancy reporting)


Explaining things inside-out (starting from JUnit in Eclipse), then 
adding complexity (local build etc.) and climbing the lifecycle ladder 
from 4-1 might make the whole thing nicely digestible. I'm not yet 
sure what to make out of that, I'd just like to bounce these thoughts 
off the experts early.


What do you think?

Is my understanding of how JBehave works technically correct (even if 
intensely simplified) so far?


Could these approaches be helpful to lower the barrier of entry even more?

Last but not least, Mauro, could you please get me a JIRA user so I 
can raise the JIRA issue according to 
http://jbehave.org/reference/stable/how-to-contribute.html


Thanks, all. Have a great weekend.

Best regards, best wishes,

Josef

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Freitag, 7. März 2014 09:17
*To:* user@jbehave.codehaus.org
*Subject:* Re: [jbehave-user] JBehave learning curve

Hi Josef,

I think it's a fair comment to say that JBehave is development-centric 
(not necessarily developer-centric though) as its main focus has 
always been the ability to support CI.As such it does require some 
knowledge in the team with respect to build and SCM technologies and 
the likes.   It could be qualified as a toolkit - which needs to be 
customised and adapted to the project needs.Once set up it can be 
used by less technical members of the team.


As for your points below, have you ever tried using archetypes: 
http://jbehave.org/reference/stable/archetypes.html


They are meant precisely for the purpose of getting people started 
with a simple but working project.There is a 
jbehave-spring-archetype which

Re: [jbehave-user] can't get started with running-examples or jbehave-tutorial

2014-03-08 Thread Mauro Talevi

Hi Craig,

the rest examples should have been included in the main reactor by 
mistake - it should only be actived by profile - as it requires the wiki 
setup .   This is now  fixed if you do a pull.


On 07/03/2014 20:53, Craig Comstock wrote:

So looking at the Readme.md I see I am missing a manual dependency?

The REST example requires an XWiki instance.
Download it from http://xwiki.org http://xwiki.org/ and setup:

  * User with username/password: jbehave/jbehave

REST Root URI available in Main space: 
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages

To use Maven plugin, see script rest.sh.

I might try that but really I'm just trying to get to the point I can 
play around with simple Java examples...


-Craig





*From:* Craig Comstock craig_comst...@yahoo.com
*To:* user@jbehave.codehaus.org user@jbehave.codehaus.org
*Sent:* Friday, March 7, 2014 1:41 PM
*Subject:* Re: [jbehave-user] can't get started with running-examples 
or jbehave-tutorial


For jbehave-core I get one failure in JBehave REST.

If I follow the jbehave-core instructions and run mvn install after 
that I get a similar problem as what I was getting before I switched JDKs.


So a bit better and a bit the same. I imagine that the failure on 
JBehave REST is not critical in terms of me using JBehave built like 
this, maybe a regression issue?


Thanks for the quick feedback!

_Craig




*From:* Craig Comstock craig_comst...@yahoo.com
*To:* user@jbehave.codehaus.org user@jbehave.codehaus.org
*Sent:* Friday, March 7, 2014 1:18 PM
*Subject:* Re: [jbehave-user] can't get started with running-examples 
or jbehave-tutorial


The jbehave-tutorial site says 1.5 or 1.6 is OK. So maybe that's not 
quite the problem there. I have attached my java/mvn versions and the 
build results here it seems to be the same problem regardless of JDK I 
use.


https://github.com/jbehave/jbehave-tutorial/

For jbehave-core I do make MUCH more progress... it is downloading a 
bunch of jars now.


RTFM. :)

Thanks,
Craig



*From:* Mauro Talevi mauro.tal...@aquilonia.org
*To:* user@jbehave.codehaus.org user@jbehave.codehaus.org
*Sent:* Friday, March 7, 2014 12:53 PM
*Subject:* Re: [jbehave-user] can't get started with running-examples 
or jbehave-tutorial


https://github.com/jbehave/jbehave-core/blob/master/README.md


On 7 Mar 2014, at 18:49, Mauro Talevi mauro.tal...@aquilonia.org 
mailto:mauro.tal...@aquilonia.org wrote:


As of 3.9 JDK 1.7 is required to build (JBEHAVE-913).

JDK 1.5+ is still supported at runtime.

Cheers


On 7 Mar 2014, at 17:36, Craig Comstock craig_comst...@yahoo.com 
mailto:craig_comst...@yahoo.com wrote:


I'm having a hard time figuring out how to get started with jbehave. 
The two examples of setup I see are:


http://jbehave.org/reference/stable/running-examples.html 
https://webclient.arrisi.com/owa/redir.aspx?C=HDwVn7PxcEmX-c4mUufmCIqhFzSqDdEIht0fo9fLFqgcXxLaEsMe2VTrU2SBHHW-HBfOQSVWUSY.URL=http%3a%2f%2fjbehave.org%2freference%2fstable%2frunning-examples.html


and

https://github.com/jbehave/jbehave-tutorial 
https://webclient.arrisi.com/owa/redir.aspx?C=HDwVn7PxcEmX-c4mUufmCIqhFzSqDdEIht0fo9fLFqgcXxLaEsMe2VTrU2SBHHW-HBfOQSVWUSY.URL=https%3a%2f%2fgithub.com%2fjbehave%2fjbehave-tutorial


Neither seem to work as described...


Here's my environment... Debian 7.0:

:~/workspace/jbehave-tutorial$ mvn -version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_41, vendor: Sun Microsystems Inc.
Java home: /opt/app/jdk1.6.0_41/jre
Default locale: en_US, platform encoding: UTF-8
OS name: linux, version: 3.2.35, arch: amd64, family: unix


Failure logs are attached. Both seem to be missing dependencies???

Thanks,
Craig
jbehave-core-install.log
jbehave-tutorial-install.log

-
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






Re: [jbehave-user] can't get started with running-examples or jbehave-tutorial

2014-03-07 Thread Mauro Talevi
As of 3.9 JDK 1.7 is required to build (JBEHAVE-913).

JDK 1.5+ is still supported at runtime. 

Cheers


 On 7 Mar 2014, at 17:36, Craig Comstock craig_comst...@yahoo.com wrote:
 
 I'm having a hard time figuring out how to get started with jbehave. The two 
 examples of setup I see are:
 
 http://jbehave.org/reference/stable/running-examples.html
 
 and
 
 https://github.com/jbehave/jbehave-tutorial
 
 Neither seem to work as described...
 
 
 Here's my environment... Debian 7.0:
 
 :~/workspace/jbehave-tutorial$ mvn -version
 Apache Maven 3.0.4
 Maven home: /usr/share/maven
 Java version: 1.6.0_41, vendor: Sun Microsystems Inc.
 Java home: /opt/app/jdk1.6.0_41/jre
 Default locale: en_US, platform encoding: UTF-8
 OS name: linux, version: 3.2.35, arch: amd64, family: unix
 
 
 Failure logs are attached. Both seem to be missing dependencies???
 
 Thanks,
 Craig
 jbehave-core-install.log
 jbehave-tutorial-install.log
 
 -
 To unsubscribe from this list, please visit:
 
http://xircles.codehaus.org/manage_email


Re: [jbehave-user] Why JBehave repo examples and website are the worst example of work ever created by the any of the open source communitties?

2014-03-07 Thread Mauro Talevi
 [1.478s]
 [INFO] JBehave Gherkin Example ... SUCCESS [0.726s]
 [INFO] JBehave Groovy Example  SUCCESS [1.773s]
 [INFO] JBehave JRuby Example . SUCCESS 
 [1:51.529s]
 [INFO] JBehave Scala Example . FAILURE [2.610s]
 [INFO] JBehave Performance Example ... FAILURE [0.792s]
 [INFO] JBehave REST Example .. FAILURE [0.881s]
 [INFO] JBehave Threads Example ... FAILURE [0.578s]
 [INFO] JBehave URLs Example .. FAILURE [0.572s]
 [INFO] JBehave Maps Example .. FAILURE [0.793s]
 [INFO] JBehave Stepdocs Example .. FAILURE [0.695s]
 [INFO] JBehave TestNG Example  FAILURE [0.800s]
 [INFO] JBehave I18n Example .. FAILURE [0.939s]
 [INFO] JBehave Guice Example . FAILURE [0.934s]
 [INFO] JBehave Needle Example  FAILURE [0.852s]
 [INFO] JBehave Pico Example .. FAILURE [0.818s]
 [INFO] JBehave Spring Example  FAILURE [0.853s]
 [INFO] JBehave Spring Security Example ... FAILURE 
 [1:38.787s]
 [INFO] JBehave Weld Example .. FAILURE [0.822s]
 
 
 Cheers,
 J
 
 
 
 
 On 7 March 2014 08:20, Mauro Talevi mauro.tal...@aquilonia.org wrote:
 Please refrain from this unpleasant abusive rant.   
 
 Learn some netiquette and you'll find that providing some polite feedback 
 will be much more effective. 
 
 On 06/03/2014 12:57, Janusz Kowalczyk wrote:
 It's truly remarkable that I haven't gave up yet in my attempts to use 
 JBehave many after days wasted on trying to figure out how to run 
 examples give on the jbehave.org or the ones available in the project's 
 repo.  
 
 Does any of the project members heard of Developer Experience?
 Are there any chances that this will change in near future or this 
 project will keep to scare off more people?
 
 
 Cheers
 J
 
 
 
 -- 
 Zapraszam na swojego foto-bloga: http://na100procentchyba.wordpress.com/
 Autopodpis: Staraj się używać pola Ukryty do Wiadomości (UDW) przy 
 wysyłaniu wiadomości do wielu odbiorców, ograniczysz przez to 
 rozprzestrzenianie się spamu!
 Autosignature: Try to use field BCC (blind carbon copy) when sending 
 message to many recepients, it will restrain spread of spam!
 
 
 
 -- 
 Zapraszam na swojego foto-bloga: http://na100procentchyba.wordpress.com/
 Autopodpis: Staraj się używać pola Ukryty do Wiadomości (UDW) przy wysyłaniu 
 wiadomości do wielu odbiorców, ograniczysz przez to rozprzestrzenianie się 
 spamu!
 Autosignature: Try to use field BCC (blind carbon copy) when sending message 
 to many recepients, it will restrain spread of spam!
 
 
 
 -- 
 Zapraszam na swojego foto-bloga: http://na100procentchyba.wordpress.com/
 Autopodpis: Staraj się używać pola Ukryty do Wiadomości (UDW) przy wysyłaniu 
 wiadomości do wielu odbiorców, ograniczysz przez to rozprzestrzenianie się 
 spamu!
 Autosignature: Try to use field BCC (blind carbon copy) when sending message 
 to many recepients, it will restrain spread of spam!


Re: [jbehave-user] Using Weld with a Selenium PageObject

2014-03-06 Thread Mauro Talevi
I would recommend not managing page objects directly in your DI 
container.   Rather having a PageObjectFactory that you inject in all 
your steps classes.


Have a look at the tutorial for an example:

https://github.com/jbehave/jbehave-tutorial/tree/master/etsy-selenium/java-spring

It uses Spring as DI but you  can easily adapt it to Weld.

On 05/03/2014 23:58, Brent Barker wrote:

Hi
We are trying to use Weld in our jbehave selenium project. I am 
wondering if anyone has a working example of this.


The problem we are running into is allowing the PageObjects to have a 
reference to other page objects. I know it is hard to describe this 
without some code to show. I just want to make sure there isn't 
already something out there that i'm not seeing.


Thanks in advance!
-Brent Barker



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Using steps from another WebDriverStep class

2014-03-03 Thread Mauro Talevi

Yes, it should be possible provided the candidate steps are collected before 
the composite steps.

You need to ensure this in your steps factory.  Try putting the composite step 
in a separate steps class.

Else please attach a sample project reproducing the issue to a new JIRA.


 On 3 Mar 2014, at 13:30, Johnny Wong johnny.w...@mercadolibre.com wrote:
 
 Hi -- I'd like to build composite steps, where sub-steps may be specified in 
 another class. Is this possible? When I tried it, it did not seem to find the 
 outside-of-this-class steps.
 
 To be clearer:
 
 StepClass1 - extends WebDriverStep
 - StepA
 - StepB
 
 StepClass2 - extends WebDriverStep
 - StepC
 - StepD
 - CompositeStepAA: {StepA, StepC, StepB, StepD}  == This is what I am trying 
 to accomplish
 
 Both StepClass1 and StepClass2 are injected via the stepsFactory()
 
 
 What is the best way to do the above? Should I have StepClass inherit from 
 StepClass1 (but will that result in double steps?)
 
 Thanks!


Re: [jbehave-user] SeleniumStepMonitor does not show up in JBehave 4.0 beta 4

2014-02-24 Thread Mauro Talevi
Yes, it does not work yet in 4.0 beta because the step monitor is also used 
internally for finding matched steps.  I'll get a new beta out this week that 
uses a delegating model.


 On 24 Feb 2014, at 08:52, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 The new ContextStepMonitor works with jbehave 3.9 I discovered now, but not 
 with 4.0-beta-4, at least not with the same code.
  
 Maybe it is just because version 4 is still beta, or it has to be used in 
 another way than in 3.9. I suppose there will be an example project for 4.0, 
 so that I then can see how to use it for that version when it is released.
  
 I will use jbehave 3.9 until then.
 
 
 2014-02-24 9:44 GMT+01:00 Hans Schwäbli bugs.need.love@gmail.com:
 I could run that CoreStories, but could not port the example to version 
 jbehave-beta-4.
  
 The CoreStories example runs on version 3.10-SNAPSHOT which I cannot depend 
 in Maven since it is not in the Maven repository.
  
 Maybe CoreStories works only for 3.10-SNAPSHOT?
  
 I have to figure this out. It is not so easy with stuggling with Maven and 
 Java code at the same time to get it working.
 
 
 2014-02-20 18:53 GMT+01:00 Mauro Talevi mauro.tal...@aquilonia.org:
 
 CoreStories has a working example.
 
 On 20 Feb 2014, at 16:56, Hans Schwäbli bugs.need.love@gmail.com 
 wrote:
 
 Yes, I want to show the running progress like I could do with 
 SeleniumStepMonitor.
  
 I try to figure out how to use that new way.
 
 
 2014-02-20 1:07 GMT+01:00 Mauro Talevi mauro.tal...@aquilonia.org:
 The SeleniumStepMonitor should be replaced by the ContextStepMonitor, now 
 in core. 
 
 What is the objective?   Show the running progress? 
 
 On 19/02/2014 16:34, Hans Schwäbli wrote:
 I am opening a new topic for the problem with the SeleniumStepMonitor in 
 JBehave 4.0 beta 4 with JBehave-web 3.5.5 and 3.6-beta-1.
  
 It does not show up with that version. It works however with JBehave 3.9.
  
 I discovered that in method 
 org.jbehave.core.embedder.PerformableTree.RunContext.scenarioSteps(Scenario,
  MapString, String) a MatchingStepMonitor is used instead of the 
 configured step monitor.
  
 It can be fixed by creating an anonymous class and overriding 
 org.jbehave.core.steps.MarkUnmatchedStepsAsPending.collectScenarioSteps(ListCandidateSteps,
  Scenario, MapString, String, StepMonitor)
  
 MarkUnmatchedStepsAsPending myStepCollector = new
  MarkUnmatchedStepsAsPending() {
 @Override
 public ListStep 
 collectScenarioSteps(ListCandidateSteps candidateSteps, Scenario 
 scenario, MapString, String parameters,
 StepMonitor stepMonitor) {
 return super.collectScenarioSteps(candidateSteps, 
 scenario, parameters, mySeleniumStepMonitor);
 }
 };
 Then in the configuration I write: .useStepCollector(myStepCollector)
  
 It must be an older issue since month ago I had the same problem with 
 JBehave 4.0 beta 3 and switched to version 3.9 because of 
 that.
  
 Maybe it is a bug (or you can please tell me how to configure it 
 properly for JBehave 4.x)?
 


Re: [jbehave-user] JBehave reusing instance variables in Examples Scenario

2014-02-24 Thread Mauro Talevi
It's a bug.  The lifecycle phases should be applied before/after each 
example scenario.


Can you please raise a JIRA issue for this?

On 24/02/2014 13:33, Bernardo Pinto wrote:

I have the following story:
Meta: Story proof of concept

Lifecycle:
Before:
Given I have a bank account
And my balance is 100

Scenario: Simple scenario
Meta: @simple

When I withdraw 10
Then my bank account balance should be 90

Scenario: Scenario with Examples
Meta: @examples

When I add value
Then my bank account balance should be balance

Examples:
|value|balance|
|30|130|
|50|150|

Scenario: Scenario with data tables
Meta: @tables

Given these people have bank accounts with balances:
|Name|balance|
|Person1|1000|
|Person2|500|
When I take all their money
Then my bank account balance should be 1600

And have this Step implementation class:
public class BankAccountSteps extends Embedder {

private BankAccount ba;
private ListBankAccount accounts = new ArrayListBankAccount();

@Given(I have a bank account)
public void I_have_a_bank_account(){
this.ba http://this.ba = new BankAccount(Me);
}

@Given(my balance is $balance)
public void my_balance_is(int balance){
ba.setBalance(balance);
}

@When(I withdraw $value)
public void I_withdraw(int value){
ba.withdraw(value);
}

@Then(my bank account balance should be $balance)
@Alias(my bank account balance should be balance)
public void my_bank_account_balance_should_be(@Named(balance)int 
balance){

System.out.println(ba);

Assert.assertEquals(balance, ba.getBalance());
}

@When(I add $value)
@Alias(I add value)
public void I_add(@Named(value)int value) {
ba.add(value);
}

@Given(these people have bank accounts with balances: $accountInfos)
public void 
these_people_have_bank_accounts_with_balances(@Named(accountInfos)ExamplesTable 
accountInfos) throws Throwable {

for(MapString, String ai : accountInfos.getRows()) {
final BankAccount b = new BankAccount(ai.get(Name));
final int balance = Integer.parseInt(ai.get(balance));
b.setBalance(balance);
accounts.add(b);
}
}

@When(I take all their money)
public void I_take_all_their_money() {
for(BankAccount bankAccount : accounts) {
ba.add(bankAccount.balance);
}
}

public static class BankAccount {
private int balance;
private final String name;

public BankAccount(String name) {
this.name http://this.name = name;
}

public int getBalance() {
return this.balance;
}
public void setBalance(int balance) {
this.balance = balance;
}

public void add(int v) {
this.balance += v;
}

public void withdraw(int v) {
this.balance -= v;
}
}
}

The second scenario (and only this one) is reusing the ba variable 
from the first scenario (i.e. it's not running the Lifecycle  Before).

Is this a bug or a feature?


Bernardo Oliveira Pinto
Byclosure, Lda.
Mail: bernardo.pi...@byclosure.com mailto:bernardo.pi...@byclosure.com
Web: http://byclosure.com




Re: [jbehave-user] SeleniumStepMonitor does not show up in JBehave 4.0 beta 4

2014-02-20 Thread Mauro Talevi
CoreStories has a working example.

 On 20 Feb 2014, at 16:56, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 Yes, I want to show the running progress like I could do with 
 SeleniumStepMonitor.
  
 I try to figure out how to use that new way.
 
 
 2014-02-20 1:07 GMT+01:00 Mauro Talevi mauro.tal...@aquilonia.org:
 The SeleniumStepMonitor should be replaced by the ContextStepMonitor, now in 
 core. 
 
 What is the objective?   Show the running progress? 
 
 On 19/02/2014 16:34, Hans Schwäbli wrote:
 I am opening a new topic for the problem with the SeleniumStepMonitor in 
 JBehave 4.0 beta 4 with JBehave-web 3.5.5 and 3.6-beta-1.
  
 It does not show up with that version. It works however with JBehave 3.9.
  
 I discovered that in method 
 org.jbehave.core.embedder.PerformableTree.RunContext.scenarioSteps(Scenario,
  MapString, String) a MatchingStepMonitor is used instead of the 
 configured step monitor.
  
 It can be fixed by creating an anonymous class and overriding 
 org.jbehave.core.steps.MarkUnmatchedStepsAsPending.collectScenarioSteps(ListCandidateSteps,
  Scenario, MapString, String, StepMonitor)
  
 MarkUnmatchedStepsAsPending myStepCollector = new 
 MarkUnmatchedStepsAsPending() {
 @Override
 public ListStep collectScenarioSteps(ListCandidateSteps 
 candidateSteps, Scenario scenario, MapString, String parameters,
 StepMonitor stepMonitor) {
 return super.collectScenarioSteps(candidateSteps, 
 scenario, parameters, mySeleniumStepMonitor);
 }
 };
 Then in the configuration I write: .useStepCollector(myStepCollector)
  
 It must be an older issue since month ago I had the same problem with 
 JBehave 4.0 beta 3 and switched to version 3.9 because of that.
  
 Maybe it is a bug (or you can please tell me how to configure it properly 
 for JBehave 4.x)?
 


Re: [jbehave-user] Adding timestamps to report

2014-02-19 Thread Mauro Talevi
Yes, the idea is that the timestamps are available in the xref and can 
be rendered into an html report.   One will be provided out of the box 
but it'll be much easier to customise and even extend.


On 19/02/2014 15:44, Hans Schwäbli wrote:

I tried it now on 4.0 beta 4.
The precondition seems to use 
org.jbehave.core.reporters.StoryReporterBuilder.withCrossReference(new 
CrossReference()) when creating the 
org.jbehave.core.configuration.Configuration. Otherwise the two files 
xref.json and xref.xml are not created.
But it is not how I thought it would be. I expected that I see the 
timestamps in the story report HTML. But there are no timstamps there.
What is your concept behind the timestamps? Do I have to transform the 
xref.xml file myself into a HTML file in order to see the timestamps?
By the way, my LocalFrameContextView is not shown anymore while 
executing the story with JBehave 4. Has something changed with how the 
StepMonitor is configured or something like that? It seems to use 
MatchingStepMonitor or NullStepMonitor instead of SeleniumStepMonitor.



2014-02-19 9:24 GMT+01:00 Mauro Talevi mauro.tal...@aquilonia.org 
mailto:mauro.tal...@aquilonia.org:


The step timings is a functionality already available in 4.x
http://jira.codehaus.org/browse/JBEHAVE-778

In 3.x it'd be rather complicated to do.   Can you take the latest
4.0 beta for a spin?


On 18/02/2014 14:46, Hans Schwäbli wrote:

I would like to add timestamps to the report logging,
especially for the steps so that I can see when a step has
started and how long it took to finish.
What is the recommended way to accomplish this?
Someone in this mailing list wrote to modify the Freemarker
template which JBehave uses. But that solution seems not
maintainable to me since I don't want to deal with that
complexity just to add some timestamps to the report. I would
rather don't use timestamps if I would have to touch the
Freemarker templates of JBehave.



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email







Re: [jbehave-user] How to include stacktrace in test result report?

2014-02-13 Thread Mauro Talevi
Configuration.storyReporterBuilder().withFailureTrace(true)


 On 13 Feb 2014, at 13:41, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 If an exception occurs while a step is being executed, JBehave only prints 
 the type of exception and its message.
  
 It does not print the stacktrace, which could contain valuable information to 
 analyse the exception.
  
 Can I somehow configure JBehave so that it includes the stacktrace in the 
 test result report?

-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Scenario Definition with delimited string

2014-02-13 Thread Mauro Talevi

Wrap in quotes:  When a client posts a response pattern of '1,0,0,0,0'

@When(a client posts a response pattern of '$value')
public void whenAClientPostsValue(String value){
}

The same applies if you want to have a value with spaces.

On 13/02/2014 21:53, Corbin, J.D. wrote:

I have a scenario and I want to define a textual step as follows,

When a client posts a response pattern of 1,0,0,0,0


I know I can define a parameterized scenario and use Examples instead, 
but I want the delimited 1's and 0's to be in the step definition.  I 
need it to match a step implementation that accepts a string.


I'm not sure how to force it to treat '1,0,0,0,0' as a single string 
value.


I'm sure there is a way to do this.


J.D.




-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Problem with parameter injection when an examples table is used

2014-02-07 Thread Mauro Talevi
Hi,

this is indeed one of the solutions.

I agree that it would be more useful as a default.  Please raise a JIRA issue 
for this and we'll add it to next release.

Cheers

 On 7 Feb 2014, at 15:23, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 As it seems it can be solved with configuring the MostUsefuleConfiguration 
 like this:
  .useParameterControls(new 
 ParameterControls().useDelimiterNamedParameters(true))
  
 It is even documented here: 
 http://jbehave.org/reference/stable/parametrised-scenarios.html 
 (Parametrisation by name delimiters).
  
 I think this should be the default, using delimeter named parameters.
 
 
 2014-02-07 Hans Schwäbli bugs.need.love@gmail.com:
 I debugged it and as it seems, this method does not work as I would expect 
 it: org.jbehave.core.steps.StepCreator.ParameterisedStep.parametriseStep()
  
 The org.jbehave.core.annotations.Named annotation supports only one value. 
 But in my use cases I need two values: creditAccount and debitAccount.
  
 What if you support using an regular expression for the @Named annotation 
 instead of allowing just one value?
  
 That could be one way to solve it. The method 
 ParameterisedStep.parametriseStep() would need to be adapted accordingly 
 to support that logic.
 
 
 2014-02-07 Hans Schwäbli bugs.need.love@gmail.com:
 
 Hello Mauro,
 
 I took the time to create an example project for Eclipse so that you can 
 reproduce it.
 
 I attached the zip file to this email. Hopfully it is passed to the mailing 
 list. If not, I will have to upload it somewhere and tell you the download 
 link.
 
 You will see that it is not working as I expect it.
 
 My intention is to use the data from the examples table to pass it into the 
 step.
 
 I have to use two different variable names for the account number, since I 
 use both credit account number and debit account number in the examples 
 table. If I would only use one account number in the examples table it 
 would pass the value into the method.
 
 But with the way how I tried to use it, debitAccount and 
 creditAccount are passed into the step method instead of the actual 
 values from the examples table.
  
 I hope you can help me to achieve my goal.
 
 
 2014-02-06 Mauro Talevi mauro.tal...@aquilonia.org:
 
 Hi
 
 what is the stated intention here?   You want two steps to match the same 
 method with different parameter names?
 
 Can you please provide a sample project - inclusive of textual stories and 
 steps class that reproduces your issue?
 
 Thanks
 
 
 On 06/02/2014 16:52, Hans Schwäbli wrote:
 I have two steps like this with a examples table where the values are 
 defined:
 Given the account data of debitAccount is known
 Given the account data of creditAccount is known
 First I tried this in the step class method for the two steps above:
 @Given(the account data of $debitAccount is known)
 It works only for the first of the two steps. But the second step gets 
 value creditAccount passed into the method instead of the actual value 
 from the examples table.
 So I changed the annotation to be like this:
 @Given(the account data of $acount is known)
 But this does not work for both steps above since debitAccount and 
 creditAccount is passed into the method instead of the actual values.
 Then I tried it with an alias:
 @Given(the account data of debitAccount is known)
 @Alias(the account data of creditAccount is known)
 The result was that the story failed without showing me why (no exception 
 or any meaningful message).
 I tried also some other things with no success. I use JBehave 3.9 by the 
 way.
 Can you please tell me the solution?
 
 
 -
 To unsubscribe from this list, please visit:
 
http://xircles.codehaus.org/manage_email
 


Re: [jbehave-user] Problem with parameter injection when an examples table is used

2014-02-06 Thread Mauro Talevi

Hi

what is the stated intention here?   You want two steps to match the 
same method with different parameter names?


Can you please provide a sample project - inclusive of textual stories 
and steps class that reproduces your issue?


Thanks

On 06/02/2014 16:52, Hans Schwäbli wrote:
I have two steps like this with a examples table where the values are 
defined:

Given the account data of debitAccount is known
Given the account data of creditAccount is known
First I tried this in the step class method for the two steps above:
@Given(the account data of $debitAccount is known)
It works only for the first of the two steps. But the second step gets 
value creditAccount passed into the method instead of the actual 
value from the examples table.

So I changed the annotation to be like this:
@Given(the account data of $acount is known)
But this does not work for both steps above since debitAccount and 
creditAccount is passed into the method instead of the actual values.

Then I tried it with an alias:
@Given(the account data of debitAccount is known)
@Alias(the account data of creditAccount is known)
The result was that the story failed without showing me why (no 
exception or any meaningful message).
I tried also some other things with no success. I use JBehave 3.9 by 
the way.

Can you please tell me the solution?



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Examples table best practice question

2014-02-05 Thread Mauro Talevi
You'd want to use parametrised scenarios when there is a need to repeat the 
execution of the scenario for different combinations of parameters.

Using it with only row of data is redundant and impacts readability.

If you want to avoid specifying the username or other reusable parameter you 
should provide it once in a Given step and use it in the other steps.


 On 5 Feb 2014, at 12:30, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 I am asking myself whether it is a good idea to use example tables all the 
 time or only on demand.
  
 Lets take this scenario to illustrate the options:
  
 Scenario: Login
 When I login with username Hans and password Swordfish
 Then I am logged in and username Hans is displayed
  
 It could be possible to use an example table for it:
  
 Scenario: Login
 When I login with username username and password password
 Then I am logged in and username username is displayed
 Examples:
 |--|
 |username|password |
 |--|
 |Hans|Swordfish|
 |--|
  
 The username is a bit redundant in the first example since it occurs two 
 times and might have to be changed in two places.
  
 In the second example the redundancy is removed by using an examples table.
  
 The first scenario example is more readable I think, escpecially for 
 non-programmers, since they don't have encounter variables there, wheras the 
 second example is more maintainable.
  
 What would you do in such and similiar cases? Accept the redundancy or remove 
 it wherever possible with an examples table?


Re: [jbehave-user] Limiting scope of steps possible?

2014-02-05 Thread Mauro Talevi
More generally, you could extend JUnitStories to provide a common configuration 
and steps context to different set of stories.

 On 5 Feb 2014, at 11:29, Hans Schwäbli bugs.need.love@gmail.com wrote:
 
 Great idea, thank you!
  
 As it seems the JBehave editor uses the input from the JUnitStory class.
  
 We will try your solution.
 
 
 2014-02-05 Bernardo Pinto bernardo.pi...@byclosure.com:
 Yes, it is.
 Each one of your class that represents a story can extend JUnitStory.
 If you override the candidateSteps() method in the JUnitStory, you can add 
 the step classes that you want. Something like this:
 
 abstract class StoryGroupOne extends JUnitStory {
   @Override
   public ListCandidateSteps candidateSteps() {
 return new InstanceStepsFactory(new StepsClassOne(), new 
 StepsClassTwo()).createCandidateSteps();
   }
 }
 
 abstract class StoryGroupTwo extends JUnitStory {
   @Override
   public ListCandidateSteps candidateSteps() {
 return new InstanceStepsFactory(new StepsClassThree(), new 
 StepsClassFour()).createCandidateSteps();
   }
 }
 
 public class StoryOne extends StoryGroupOne {}
 public class StoryTwo extends StoryGroupTwo {}
 
 This way, StoryOne only has access to the steps in StepsClassOne and 
 StesClassTwo and StoryTwo only has access to steps in StepsClassThree and 
 StepsClassFour.
 
 
 Bernardo Oliveira Pinto
 Byclosure, Lda.
 Mail: bernardo.pi...@byclosure.com
 Web: http://byclosure.com
 
 
 On Wed, Feb 5, 2014 at 10:55 AM, Hans Schwäbli 
 bugs.need.love@gmail.com wrote:
 The application under test contains several different functional modules to 
 test.
  
 These modules are tested by different testers.
  
 Currently, if a tester writes a JBehave story, the story editor proposes 
 all steps which exist for all modules.
  
 Is it possible to restrict which steps are proposed in JBehave so that only 
 steps for a specific module are valid to be used in a story for that module?
  
 Of course we could create several Eclipse projects, each one for a specific 
 module of the application under test. But that seems to be over engineered 
 to me. If there is no other solution, we might have to go that way.
  
 I am currently looking for a solution inside JBehave to limit the steps 
 which are accessible in the JBehave editor. For example, can steps be 
 categorized and be imported in the story, so that only imported steps are 
 valid? That would be one solution if that is possible.
  
 Any ideas which might help us to solve this?
 


Re: [jbehave-user] Reset State in Parameterized Scenario

2014-01-28 Thread Mauro Talevi
Hi Enrique,

using meta is actually an astute solution I hadn't thought of.  

If you feel like writing a little doc entry about it, we could add it to the 
docs.

Cheers 


 On 28 Jan 2014, at 00:17, Jorge Pombar jorge_pom...@symantec.com wrote:
 
 I had a similar use case and we did the following:
 · Defined all the @Before/After annotations in a LifecycleSteps class 
 that extends org.jbehave.web.selenium.PerStoryWebDriverSteps
 · These steps can take the Meta tags as input. Hence we define a meta 
 that looks like “@resetAcctPolsToDefaulsOnFailure true” for the scenarios in 
 which we wanted to reset
 · Inside the method we check if this is defined and true and then do 
 the resetting
  
 Our code looks something like this
 @AfterScenario(uponOutcome=Outcome.FAILURE)
 public void 
 resetAcctPolsToDefaulsOnFailure(@Named(resetAcctPolsToDefaulsOnFailure)String
  resetAcctPolsToDefaulsOnFailure) {
  logger.debug([resetAcctPolsToDefaulsOnFailure] Scenario failed inside);
  if(new Boolean(resetVipAcctPolsToDefaulsOnFailure)) {
logger.info([resetVipAcctPolsToDefaulsOnFailure] Reseting VIP 
 Account tab policies back to default);
 //resetting code here
  }
  else
logger.debug([resetAcctPolsToDefaulsOnFailure] MetaTag 
 resetVipAcctPolsToDefaulsOnFailure [{}] NOT RESETING VIP Account tab policies 
 back to default, resetVipAcctPolsToDefaulsOnFailure);
 }
  
 Thanks,
 Enrique
  
 From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
 Sent: Monday, January 27, 2014 12:35 PM
 To: user@jbehave.codehaus.org
 Subject: Re: [jbehave-user] Reset State in Parameterized Scenario
  
 Hi, 
 
 the @Before/After annotations are not able to take any runtime parameters.  
 
 If you want to reset after a single parametrised scenario then you can simply 
 define a reset step and make it part of the scenario.  
 
 Cheers
 
 On 27/01/2014 15:26, Corbin, J.D. wrote:
 Hi Mauro,
  
 Thanks for that suggestion.  It happens to work in my case since I only have 
 one parameterized scenario, but what if I had two and only wanted the reset 
 behavior for a single parameterized scenario.  Is that possible?  I would 
 think the scenario would have to be named in some way.
  
 J.D.
  
 
 On Sat, Jan 25, 2014 at 2:21 AM, Mauro Talevi mauro.tal...@aquilonia.org 
 wrote:
 Use annotation specifying the scenario type
 
 @BeforeScenario(uponType=ScenarioType.EXAMPLE)
 
 Cheers
 
 
 On 24/01/2014 23:14, Corbin, J.D. wrote:
 We are using the tabular scenario format to run multiple sets of data through 
 a single jbehave scenario using the Examples: tabular format.
 
 We are using a custom scenario scope that has our global scenario state.  
 Using this approach, we get a new instance of our global state object at the 
 beginning of each scenario which is what we want.
 
 The problem is that there is some state we'd like to reset in between the 
 tabular runs for the scenario but I don't see where to inject some behavior 
 into JBehave.  JBehave doesn't treat each run as a new scenario, just runs 
 the new set of parameterized data through the same scenario instance, so we 
 cannot figure out where to reset the state in between the runs.  We have 
 gotten around this by resetting the state in one of the steps of the scenario 
 but this is not ideal because its possible that this step is used in other 
 scenarios and we don't necessary want this state reset in those cases.
 
 Is there such a thing as tabular scope or some place we can introduce some 
 behavior in between parameterized runs of a single scenario?
 
 J.D.
 
 
  
 
 -
 To unsubscribe from this list, please visit:
 
http://xircles.codehaus.org/manage_email
 
 
  
  


Re: [jbehave-user] Reset State in Parameterized Scenario

2014-01-27 Thread Mauro Talevi

Hi,

the @Before/After annotations are not able to take any runtime parameters.

If you want to reset after a single parametrised scenario then you can 
simply define a reset step and make it part of the scenario.


Cheers

On 27/01/2014 15:26, Corbin, J.D. wrote:

Hi Mauro,

Thanks for that suggestion.  It happens to work in my case since I 
only have one parameterized scenario, but what if I had two and only 
wanted the reset behavior for a single parameterized scenario.  Is 
that possible?  I would think the scenario would have to be named in 
some way.


J.D.


On Sat, Jan 25, 2014 at 2:21 AM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


Use annotation specifying the scenario type

@BeforeScenario(uponType=ScenarioType.EXAMPLE)

Cheers


On 24/01/2014 23:14, Corbin, J.D. wrote:

We are using the tabular scenario format to run multiple sets
of data through a single jbehave scenario using the Examples:
tabular format.

We are using a custom scenario scope that has our global
scenario state.  Using this approach, we get a new instance of
our global state object at the beginning of each scenario
which is what we want.

The problem is that there is some state we'd like to reset in
between the tabular runs for the scenario but I don't see
where to inject some behavior into JBehave.  JBehave doesn't
treat each run as a new scenario, just runs the new set of
parameterized data through the same scenario instance, so we
cannot figure out where to reset the state in between the
runs.  We have gotten around this by resetting the state in
one of the steps of the scenario but this is not ideal because
its possible that this step is used in other scenarios and we
don't necessary want this state reset in those cases.

Is there such a thing as tabular scope or some place we can
introduce some behavior in between parameterized runs of a
single scenario?

J.D.




-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email







Re: [jbehave-user] Reset State in Parameterized Scenario

2014-01-25 Thread Mauro Talevi

Use annotation specifying the scenario type

@BeforeScenario(uponType=ScenarioType.EXAMPLE)

Cheers

On 24/01/2014 23:14, Corbin, J.D. wrote:
We are using the tabular scenario format to run multiple sets of data 
through a single jbehave scenario using the Examples: tabular format.


We are using a custom scenario scope that has our global scenario 
state.  Using this approach, we get a new instance of our global state 
object at the beginning of each scenario which is what we want.


The problem is that there is some state we'd like to reset in between 
the tabular runs for the scenario but I don't see where to inject some 
behavior into JBehave.  JBehave doesn't treat each run as a new 
scenario, just runs the new set of parameterized data through the same 
scenario instance, so we cannot figure out where to reset the state in 
between the runs.  We have gotten around this by resetting the state 
in one of the steps of the scenario but this is not ideal because its 
possible that this step is used in other scenarios and we don't 
necessary want this state reset in those cases.


Is there such a thing as tabular scope or some place we can introduce 
some behavior in between parameterized runs of a single scenario?


J.D.





-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Re: [jbehave-user] Differentiating between test failures and test errors

2014-01-22 Thread Mauro Talevi

Hi Enrique,

The list of features can be found on JIRA:

http://jira.codehaus.org/browse/JBEHAVE/fixforversion/18486#selectedTab=com.atlassian.jira.plugin.system.project%3Aversion-issues-panel

Essentially, 4.x is meant to replace the execution engine of the stories 
and its reporting, which will more flexible than 3.x and all 
template-based.


I'll be almost backward compatible with 3.x - with few exceptions, 
such as the CrossReference output.


One of my new year's resolution to get 4.0 out soon but no ETA as yet.

The betas of 4.x mirror closely the development of the 3.x main line.  
As the 4.x is meant to be functionally equivalent we want to ensure they 
are properly tested.


You should try them out.  As usual all feedback is most welcome.

Cheers

On 20/01/2014 22:35, Jorge Pombar wrote:

Mauro,
I've been hearing of really great improvement for 4.0 for a while. Do you have 
a feature list for 4.0? Also do you have an ETA of a non Beta release?

Thanks,
Enrique


-Original Message-
From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
Sent: Sunday, January 19, 2014 8:42 AM
To: user@jbehave.codehaus.org
Subject: Re: [jbehave-user] Differentiating between test failures and test 
errors

I would not really go down that route.

In 4.x StoryRunner will be completely replaced by a different tree-based
execution engine called PerformableTree.The idea is to create a tree
of performable objects that can contain runtime results which can then be 
rendered in a template, thereby rendering the story reporter obsolete.

I'd prefer you gave the latest 4.0-beta-4 a whirl (I've released it today and 
it should be synched soon to Maven Central).

You could start by creating a new JIRA issue outlining your use case and we 
take it from there.

On 19/01/2014 12:05, Stephen de Vries wrote:

Thank Mauro,

Ideally, I'd like to see the error in the xml and html files, e.g.  step 
outcome=error , so it sounds like I'd have to re-implement StoryRunner and 
create a custom StoryReporter to achieve this?  Is there an easier way?




On 19 Jan 2014, at 11:21, Mauro Talevi mauro.tal...@aquilonia.org wrote:



JBehave supports the definition of a custom and configurable FailureStrategy, 
which defaults to RethrowingFailure.

You can provide your own implementation which can check if the Throwable is an 
UnexpectedContentException or not and decide how to handle it, e.g. log a 
message and swallow the exception.

Be aware though that if you do rethrow the exception, it'll be treated by the 
JBehave story execution as a failure.   So there is no specific mechanism to 
distinguish the failures thereafter.

On 19/01/2014 09:54, Stephen de Vries wrote:

Hi,

Is there a mechanism in JBehave to differentiate between a scenario failure and 
a scenario error?  Basically, when a scenario fails I'd like to know whether 
it's a problem with my test, or a problem with the application under test.

I'm using JBehave for security tests, so a scenario failure indicates a security 
vulnerability; but I have error checking logic in the test itself which just ensures that 
the test is behaving properly, so if there's an error in the test then I don't want the 
test to fail but rather to throw some kind of distinguishable error 
condition, like in the following contrived example:

@Then(bob must not see alice's private data) public void
checkAccessControl() {
loginAsBob();
driver.get(bobsPage);
  if (notOnBobsPage()) throw UnexpectedContentException(Can't access bob's 
page even though bob is logged in); //Test error
   driver.get(alicesPage);
  assertThat(bob can see alices data, canViewAlicesData(),
is(true));  //Application error and security vulnerability }
  In the case above, I'd like the scenario outcome to be different if 
assertion fails vs if the UnexpectedContentException is thrown.   If there's no 
native way to do this in JBehave, do you have any ideas on the easiest way to 
achieve this?

regards,
Stephen







- 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





-
To unsubscribe from this list, please visit:

   http

Re: [jbehave-user] Differentiating between test failures and test errors

2014-01-19 Thread Mauro Talevi
JBehave supports the definition of a custom and configurable 
FailureStrategy, which defaults to RethrowingFailure.


You can provide your own implementation which can check if the Throwable 
is an UnexpectedContentException or not and decide how to handle it, 
e.g. log a message and swallow the exception.


Be aware though that if you do rethrow the exception, it'll be treated 
by the JBehave story execution as a failure.   So there is no specific 
mechanism to distinguish the failures thereafter.


On 19/01/2014 09:54, Stephen de Vries wrote:

Hi,

Is there a mechanism in JBehave to differentiate between a scenario failure and 
a scenario error?  Basically, when a scenario fails I’d like to know whether 
it’s a problem with my test, or a problem with the application under test.

I’m using JBehave for security tests, so a scenario failure indicates a 
security vulnerability; but I have error checking logic in the test itself 
which just ensures that the test is behaving properly, so if there’s an error 
in the test then I don’t want the test to “fail” but rather to throw some kind 
of distinguishable error condition, like in the following contrived example:

@Then(“bob must not see alice’s private data”)
public void checkAccessControl() {
loginAsBob();
driver.get(bobsPage);
 if (notOnBobsPage()) throw UnexpectedContentException(“Can’t access 
bob’s page even though bob is logged in”); //Test error
 
 driver.get(alicesPage);

 assertThat(“bob can see alices data”, canViewAlicesData(), is(true));  
//Application error and security vulnerability
}
 
In the case above, I’d like the scenario outcome to be different if assertion fails vs if the UnexpectedContentException is thrown.   If there’s no native way to do this in JBehave, do you have any ideas on the easiest way to achieve this?


regards,
Stephen






-
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




  1   2   3   4   5   >