[jbehave-dev] 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-dev] 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




[jbehave-dev] [jira] (JBEHAVE-1077) Archetypes featuring a StepMonitor with JFrameContextView

2015-05-07 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Archetypes featuring a StepMonitor with JFrameContextView 










Sure, that's a good idea! 
Please provide a pull request.












   

 Add Comment

























 JBehave /  JBEHAVE-1077



  Archetypes featuring a StepMonitor with JFrameContextView 







 What about adding the nice JFrameContextView in all of the archetypes?   I've started with the archetype simple. If you like the idea, I can add it to all.   https://github.com/alb-i986/jbehave-core/tree/archetypes-with-step-monitor















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2015-04-25 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










Hi Christopher,
thanks for the update. I'm quite puzzled by the difference between Maven and Ant. The logic of the timeout matching is entirely external to either, being in the StoryManager. Can you offer more information or a reproduceable example?
As for the behaviour in presence of slashes, could you please see if you can reproduce at unit level in the StoryManagerBehaviour? 












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1036) StoryReporterBuilder fails to parse test results if story has GivenStories

2015-04-25 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi resolved an issue as Fixed



















Pulled with thanks









 JBehave /  JBEHAVE-1036



  StoryReporterBuilder fails to parse test results if story has GivenStories 










Change By:

 Mauro Talevi




Resolution:

 Fixed




Fix Version/s:

 4.0




Status:

 Open Resolved












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core/jbehave-4.x][2/2] JBEHAVE-833: Added StoryManagerBehaviour to unit test timeout patterns.

2015-04-18 Thread Mauro Talevi
commit 27908fed69413ce1f95dfab71fe93b5e5d5f
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 18 Apr 2015 09:33:47 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 18 Apr 2015 09:33:47 +0200

JBEHAVE-833: Added StoryManagerBehaviour to unit test timeout patterns.

diff --git 
a/jbehave-core/src/test/java/org/jbehave/core/embedder/StoryManagerBehaviour.java
 
b/jbehave-core/src/test/java/org/jbehave/core/embedder/StoryManagerBehaviour.java
new file mode 100644
index 000..d9f27a6
--- /dev/null
+++ 
b/jbehave-core/src/test/java/org/jbehave/core/embedder/StoryManagerBehaviour.java
@@ -0,0 +1,57 @@
+package org.jbehave.core.embedder;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.jbehave.core.embedder.PerformableTree.RunContext;
+import org.jbehave.core.embedder.StoryManager.EnqueuedStory;
+import org.jbehave.core.model.Story;
+import org.junit.Test;
+
+public class StoryManagerBehaviour {
+
+   private PerformableTree performableTree = new PerformableTree();
+   private RunContext context = mock(RunContext.class);
+   private EmbedderMonitor embedderMonitor = new NullEmbedderMonitor(); 
+   private EmbedderControls embedderControls = new EmbedderControls();
+   private Story story = mock(Story.class);
+
+   @Test
+   public void shouldSupportDefaultStoryTimeout(){
+   assertThat(enqueuedStory(embedderMonitor, 
story).getTimeoutInSecs(), is(300L));
+   }
+
+   @Test
+   public void shouldSupportStoryTimeoutsByPathUsingAntPatterns(){
+   
embedderControls.useStoryTimeoutInSecsByPath(**/*short*:50,**/*long*:500);
+   
when(story.getPath()).thenReturn(/path/to/a_short_and_sweet.story);
+   assertThat(enqueuedStory(embedderMonitor, 
story).getTimeoutInSecs(), is(50L));
+   
when(story.getPath()).thenReturn(/path/to/a_long_and_winding.story);
+   assertThat(enqueuedStory(embedderMonitor, 
story).getTimeoutInSecs(), is(500L));
+   }
+
+   @Test
+   public void shouldSupportStoryTimeoutsByPathUsingRegexPatterns(){
+   
embedderControls.useStoryTimeoutInSecsByPath(/[a-z]+/.*short.*:50,/[a-z]+/.*long.*:500);
+   
when(story.getPath()).thenReturn(/path/to/a_short_and_sweet.story);
+   assertThat(enqueuedStory(embedderMonitor, 
story).getTimeoutInSecs(), is(50L));
+   
when(story.getPath()).thenReturn(/path/to/a_long_and_winding.story);
+   assertThat(enqueuedStory(embedderMonitor, 
story).getTimeoutInSecs(), is(500L));
+   }
+
+   @Test
+   public void shouldSupportStoryTimeoutsByPathUsingMixedPatterns(){
+   
embedderControls.useStoryTimeoutInSecsByPath(/[a-z]+/.*short.*:50,**/*long*:500);
+   
when(story.getPath()).thenReturn(/path/to/a_short_and_sweet.story);
+   assertThat(enqueuedStory(embedderMonitor, 
story).getTimeoutInSecs(), is(50L));
+   
when(story.getPath()).thenReturn(/path/to/a_long_and_winding.story);
+   assertThat(enqueuedStory(embedderMonitor, 
story).getTimeoutInSecs(), is(500L));
+   }
+
+   private EnqueuedStory enqueuedStory(EmbedderMonitor embedderMonitor, 
Story story) {
+   return new EnqueuedStory(performableTree, context, 
embedderControls, embedderMonitor, story);
+   }
+
+}





[jbehave-scm] [scm-core/jbehave-4.x][1/2] JBEHAVE-833: Support both Ant-style and regex pattern syntaxes. Added Christopher Aguirre's example configuration to core example pom.xml.

2015-04-18 Thread Mauro Talevi
commit b8ad7ded5cfb09c7ede127d5a996e2c564ab2d2d
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 18 Apr 2015 09:32:06 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 18 Apr 2015 09:32:54 +0200

JBEHAVE-833:  Support both Ant-style and regex pattern syntaxes.  Added 
Christopher Aguirre's example configuration to core example pom.xml.

diff --git a/examples/core/pom.xml b/examples/core/pom.xml
index 73815ca..dd67d6e 100755
--- a/examples/core/pom.xml
+++ b/examples/core/pom.xml
@@ -36,6 +36,8 @@
   generateViewAfterStoriestrue/generateViewAfterStories
   
ignoreFailureInStories${ignore.failure.in.stories}/ignoreFailureInStories
   
ignoreFailureInView${ignore.failure.in.view}/ignoreFailureInView
+  storyTimeoutInSecs300/storyTimeoutInSecs  
+  
storyTimeoutInSecsByPath**/and_*.story:8,**/*calendar.story:15/storyTimeoutInSecsByPath
  
   threads${threads}/threads
   metaFilters
 metaFilter${meta.filter}/metaFilter
diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java 
b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java
index 73c2f3b..ca12f79 100644
--- a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java
@@ -14,6 +14,7 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
 
 import org.codehaus.plexus.util.StringUtils;
 import org.jbehave.core.configuration.Configuration;
@@ -251,7 +252,7 @@ public class StoryManager {
return new RunningStory(enqueuedStory, 
executorService.submit(enqueuedStory));
}
 
-   private static class EnqueuedStory implements CallableThrowableStory {
+   static class EnqueuedStory implements CallableThrowableStory {
 
private final PerformableTree performableTree;
private final RunContext context;
@@ -323,7 +324,14 @@ public class StoryManager {
}
 
private String regexOf(String storyPattern) {
-   return storyPattern.replace(**, .*);
+   try {
+   // check if pattern is already a valid regex
+   Pattern.compile(storyPattern);
+   return storyPattern;
+   } catch (PatternSyntaxException e) {
+   // assume Ant-style pattern:  **/path/*.story
+   return storyPattern.replace(*, .*);
+   }   
}
}
 





[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2015-04-18 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










Hi Christopher, 
I've committed a fix to support both ant-style patterns (a la StoryFinder) and regex patterns. 
I've also updated the core examples pom.xml with story timeouts.
Can you please give it a whirl and let me know if we can resolve this issue? 












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core][1/1] JBEHAVE-1066: Upgraded maven dependencies.

2015-04-18 Thread Mauro Talevi
commit 164edafd533d05c3af22025fa0b0b948f60aa0b8
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 18 Apr 2015 10:57:04 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 18 Apr 2015 10:57:04 +0200

JBEHAVE-1066:  Upgraded maven dependencies.

diff --git a/pom.xml b/pom.xml
index 7ca893f..495f20b 100755
--- a/pom.xml
+++ b/pom.xml
@@ -93,7 +93,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
-  version3.1/version
+  version3.2/version
   configuration
 source${jdk.version}/source
 target${jdk.version}/target
@@ -102,12 +102,12 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-enforcer-plugin/artifactId
-  version1.3.1/version
+  version1.4/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-surefire-plugin/artifactId
-  version2.17/version
+  version2.18.1/version
   configuration
 junitArtifactNamejunit:junit/junitArtifactName
 includes
@@ -127,17 +127,17 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-surefire-report-plugin/artifactId
-  version2.17/version
+  version2.18.1/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-project-info-reports-plugin/artifactId
-  version2.7/version
+  version2.8/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-javadoc-plugin/artifactId
-  version2.9.1/version
+  version2.10.3/version
   executions
 execution
   idattach-javadoc/id
@@ -146,6 +146,7 @@
 goaljar/goal
   /goals
   configuration
+failOnErrorfalse/failOnError  
 links
   linkhttp://java.sun.com/j2se/1.5/docs/api/link
 /links
@@ -156,7 +157,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-source-plugin/artifactId
-  version2.2.1/version
+  version2.4/version
   executions
 execution
   idattach-sources/id
@@ -170,7 +171,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-resources-plugin/artifactId
-  version2.5/version
+  version2.7/version
   configuration
 encoding${resource.encoding}/encoding
   /configuration
@@ -178,7 +179,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-release-plugin/artifactId
-  version2.5/version
+  version2.5.1/version
   configuration
 autoVersionSubmodulestrue/autoVersionSubmodules
 preparationGoalsclean install/preparationGoals
@@ -190,22 +191,22 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-assembly-plugin/artifactId
-  version2.4/version
+  version2.5.3/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-dependency-plugin/artifactId
-  version2.8/version
+  version2.10/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-antrun-plugin/artifactId
-  version1.7/version
+  version1.8/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-site-plugin/artifactId
-  version3.3/version
+  version3.4/version
 /plugin
 plugin
   groupIdorg.codehaus.mojo/groupId





[jbehave-scm] [scm-core/jbehave-4.x][1/1] JBEHAVE-1066: Upgraded maven dependencies.

2015-04-18 Thread Mauro Talevi
commit d82ba195d1087193f0f2b8743c8e48bca53f0b30
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 18 Apr 2015 10:57:04 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 18 Apr 2015 11:00:53 +0200

JBEHAVE-1066:  Upgraded maven dependencies.

diff --git a/pom.xml b/pom.xml
index e8fd08b..51a9b4e 100755
--- a/pom.xml
+++ b/pom.xml
@@ -93,7 +93,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
-  version3.1/version
+  version3.2/version
   configuration
 source${jdk.version}/source
 target${jdk.version}/target
@@ -102,12 +102,12 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-enforcer-plugin/artifactId
-  version1.3.1/version
+  version1.4/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-surefire-plugin/artifactId
-  version2.17/version
+  version2.18.1/version
   configuration
 junitArtifactNamejunit:junit/junitArtifactName
 includes
@@ -127,17 +127,17 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-surefire-report-plugin/artifactId
-  version2.17/version
+  version2.18.1/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-project-info-reports-plugin/artifactId
-  version2.7/version
+  version2.8/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-javadoc-plugin/artifactId
-  version2.9.1/version
+  version2.10.3/version
   executions
 execution
   idattach-javadoc/id
@@ -146,6 +146,7 @@
 goaljar/goal
   /goals
   configuration
+failOnErrorfalse/failOnError  
 links
   linkhttp://java.sun.com/j2se/1.5/docs/api/link
 /links
@@ -156,7 +157,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-source-plugin/artifactId
-  version2.2.1/version
+  version2.4/version
   executions
 execution
   idattach-sources/id
@@ -170,7 +171,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-resources-plugin/artifactId
-  version2.5/version
+  version2.7/version
   configuration
 encoding${resource.encoding}/encoding
   /configuration
@@ -178,7 +179,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-release-plugin/artifactId
-  version2.5/version
+  version2.5.1/version
   configuration
 autoVersionSubmodulestrue/autoVersionSubmodules
 preparationGoalsclean install/preparationGoals
@@ -191,22 +192,22 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-assembly-plugin/artifactId
-  version2.4/version
+  version2.5.3/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-dependency-plugin/artifactId
-  version2.8/version
+  version2.10/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-antrun-plugin/artifactId
-  version1.7/version
+  version1.8/version
 /plugin
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-site-plugin/artifactId
-  version3.3/version
+  version3.4/version
 /plugin
 plugin
   groupIdorg.codehaus.mojo/groupId





Re: [jbehave-dev] Override step in Jbehave

2015-04-13 Thread Mauro Talevi

You could convert it from your own file format using a table transformer.

http://jbehave.org/reference/stable/tabular-parameters.html

On 13/04/2015 17:24, Patel, Nikunj (GE Healthcare) wrote:


I thought about parametrized scenarios option to read table values 
from a file but then looks like we need to create external resource 
file in table format and maintain. Is there any way we can read from 
our existing data source (file or database) directly without 
converting to table format?


*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Monday, April 13, 2015 3:54 AM
*To:* dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Override step in Jbehave

Hi,

Sorry but I had misunderstood the usecase, the report will show the 
original textual value.


What you might consider is parametrised scenarios, where the values 
are replaced at the each execution.   The table values can be read 
from a file.


If you can provide a simplified example of your usecase we can add it 
our core examples.


Cheers


On 12 Apr 2015, at 17:56, Patel, Nikunj (GE Healthcare) 
nikunj.pa...@ge.com mailto:nikunj.pa...@ge.com wrote:


Mauro,

I tried just simple String conversion using @AsParameterConverter
(haven’t created ErrorCode type yet) . It is returning converted
string fine but I don’t see converted string in HTML report.
Report still showing original string from feature file in report.
How can I replace converted string in report?

Thanks,

Nikunj

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Tuesday, April 07, 2015 3:30 AM
*To:* dev@jbehave.codehaus.org mailto:dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Override step in Jbehave

Here's an example of dynamic lookup via a parameter converter method:


https://github.com/jbehave/jbehave-core/blob/master/examples/core/src/main/java/org/jbehave/examples/core/steps/TraderSteps.java

Look for:

publicTrader retrieveTrader(Stringname);

On 05/04/2015 16:07, Patel, Nikunj (GE Healthcare) wrote:

Thanks Mauro.

Can you please guide to the example (if any)?

Thanks,

Nikunj

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Saturday, April 04, 2015 11:01 AM
*To:* dev@jbehave.codehaus.org mailto:dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Override step in Jbehave

Hi,

thanks for explaining your scenario.  In this case, a custom
ErrorMessage type and a custom converter that looks up the
translation in a file or database would seem your best option.

Let use know if you encounter problems in its implementation.

Cheers

On 03/04/2015 14:38, Patel, Nikunj (GE Healthcare) wrote:

HI,

This is one the option we are thinking for i18n testing.

I know JBehave have i18n testing example but we don’t want
to convert entire story file in language we supporting. We
only want to convert labels and messages in different
language and test and keep everything in English. We are
planning to have converted text in multiple languages
available in files (key/values) or database.

Using below example, error message or label “abc” will be
in English, then using language files we convert values to
appropriate language(language set in
application.properties) before do compare with actual
value. Now, we want to include this converted text in the
HTML report.

One other option I was thinking to these message in story
example template and use meta filter but there are so many
and we don’t want to maintain in feature file.

What do you suggest we should do to test this kind of
scenario?

Thanks,

Nikunj

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Friday, April 03, 2015 6:15 AM
*To:* dev@jbehave.codehaus.org
mailto:dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Override step in Jbehave

It's possible if you define your own custom converter, but
it should be associated to a custom parameter type, e.g.
ErrorCode.

Then you implement the value conversion logic in the
parameter converter.

That said, it does not really seem very logical to do
this.   What's your usecase?

On 03/04/2015 03:00, Patel, Nikunj (GE Healthcare) wrote:

Hi,

Is there any way in Jbehave we can override step with
converted parameter values?

Here is what I am trying to do:

For Example:

I have step in feature file- Then error message “abc”
should

[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2015-04-13 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










Hi Christopher, 
you can set it either in CoreStories or in the pom.xml but be aware that the pom.xml overrides what is set in the embedded Java configuration. 












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-dev] Override step in Jbehave

2015-04-13 Thread Mauro Talevi
Hi,

Sorry but I had misunderstood the usecase, the report will show the original 
textual value. 

What you might consider is parametrised scenarios, where the values are 
replaced at the each execution.   The table values can be read from a file.

If you can provide a simplified example of your usecase we can add it our core 
examples.

Cheers



 On 12 Apr 2015, at 17:56, Patel, Nikunj (GE Healthcare) nikunj.pa...@ge.com 
 wrote:
 
 Mauro,
  
 I tried just simple String conversion using @AsParameterConverter (haven’t 
 created ErrorCode type yet) . It is returning converted string fine but I 
 don’t see converted string in HTML report. Report still showing original 
 string from feature file in report. How can I replace converted string in 
 report?
  
  
 Thanks,
 Nikunj
  
 From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
 Sent: Tuesday, April 07, 2015 3:30 AM
 To: dev@jbehave.codehaus.org
 Subject: Re: [jbehave-dev] Override step in Jbehave
  
 Here's an example of dynamic lookup via a parameter converter method: 
 
 https://github.com/jbehave/jbehave-core/blob/master/examples/core/src/main/java/org/jbehave/examples/core/steps/TraderSteps.java
 
 Look for:
 
 public Trader retrieveTrader(String name);
 
 On 05/04/2015 16:07, Patel, Nikunj (GE Healthcare) wrote:
 Thanks Mauro.
  
 Can you please guide to the example (if any)?
  
 Thanks,
 Nikunj
  
 From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
 Sent: Saturday, April 04, 2015 11:01 AM
 To: dev@jbehave.codehaus.org
 Subject: Re: [jbehave-dev] Override step in Jbehave
  
 Hi, 
 
 thanks for explaining your scenario.  In this case, a custom ErrorMessage 
 type and a custom converter that looks up the translation in a file or 
 database would seem your best option. 
 
 Let use know if you encounter problems in its implementation. 
 
 Cheers
 
 On 03/04/2015 14:38, Patel, Nikunj (GE Healthcare) wrote:
 HI,
  
 This is one the option we are thinking for i18n testing.
 I know JBehave have i18n testing example but we don’t want to convert entire 
 story file in language we supporting. We only want to convert labels and 
 messages in different language and test and keep everything in English. We 
 are planning to have converted text in multiple languages available in files 
 (key/values) or database.
 Using below example, error message or label “abc” will be in English, then 
 using language files we convert values to appropriate language(language set 
 in application.properties) before do compare with actual value. Now, we want 
 to include this converted text in the HTML report.
  
 One other option I was thinking to these message in story example template 
 and use meta filter but there are so many and we don’t want to maintain in 
 feature file.
  
 What do you suggest we should do to test this kind of scenario?
  
 Thanks,
 Nikunj
  
  
 From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org] 
 Sent: Friday, April 03, 2015 6:15 AM
 To: dev@jbehave.codehaus.org
 Subject: Re: [jbehave-dev] Override step in Jbehave
  
 It's possible if you define your own custom converter, but it should be 
 associated to a custom parameter type, e.g. ErrorCode.
 
 Then you implement the value conversion logic in the parameter converter. 
 
 That said, it does not really seem very logical to do this.   What's your 
 usecase? 
 
 On 03/04/2015 03:00, Patel, Nikunj (GE Healthcare) wrote:
 Hi,
  
 Is there any way in Jbehave we can override step with converted parameter 
 values?
  
 Here is what I am trying to do:
 For Example:
 I have step in feature file- Then error message “abc” should be displayed. 
 Let’s see I am converting  string from “abc”  to “xyz”.
 Now, I want to override feature file step with converted value and see HTML 
 report like-  Then error message “xyz” should be displayed.
  
 Thanks,
 Nikunj
  
  
  
  
  
  
  


[jbehave-dev] [jira] (JBEHAVE-1076) Travis builds failing

2015-04-09 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Travis builds failing 










The jenkins maven repo is only for Jenkins artifacts. The surefire plugin is found in Maven Central. If not found in one repo, it'll look it up in another.
The build works with settings.xml provided unless there are network issues preventing correct download.
Travis has been known to have connection issues. 












   

 Add Comment

























 JBehave /  JBEHAVE-1076



  Travis builds failing 







 From my findings, it looks like the problem is the settings.xml file.   E.g. this works - https://travis-ci.org/alb-i986/jbehave-core/builds/57723534  this does not - https://travis-ci.org/alb-i986/jbehave-core/builds/57725840   The latter fails because of these:  {code}  [WARNING] Could not validate integrity of download from http://maven.jenkins-c...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core][2/2] JBEHAVE-1075: Minor tidy up.

2015-04-08 Thread Mauro Talevi
commit d463814e7602de6a856fea3ba15eabb171934c2f
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Wed, 8 Apr 2015 19:30:24 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Wed, 8 Apr 2015 19:30:24 +0100

JBEHAVE-1075:  Minor tidy up.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java 
b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
index e1d1122..b69d5c6 100755
--- a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
@@ -601,8 +601,7 @@ public class ParameterConverters {
 
 @Override
 public Object convertValue(String value, Type type) {
-String transformedValue = value.replaceAll(\\W, 
_).toUpperCase();
-return super.convertValue(transformedValue, type);
+return super.convertValue(value.replaceAll(\\W, 
_).toUpperCase(), type);
 }
 }
 
diff --git 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
index 8ddb0f2..3e16a5a 100755
--- 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
+++ 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
@@ -40,11 +40,9 @@ import org.jbehave.core.steps.SomeSteps.MyParameters;
 import org.junit.Test;
 
 import static org.hamcrest.MatcherAssert.assertThat;
-
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.instanceOf;
 import static org.hamcrest.Matchers.is;
-
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 
@@ -64,7 +62,7 @@ public class ParameterConvertersBehaviour {
 }
 
 private void assertThatDefaultConvertersInclude(ParameterConverter[] 
defaultConverters,
-Class? extends ParameterConverter... converterTypes) {
+@SuppressWarnings(unchecked) Class? extends 
ParameterConverter... converterTypes) {
 for (Class? extends ParameterConverter type : converterTypes) {
 boolean found = false;
 for (ParameterConverter converter : defaultConverters) {
@@ -461,7 +459,7 @@ public class ParameterConvertersBehaviour {
 }
 
 @Test
-public void flexibleEnumConverter_givenLowercasedSpaceSeparatedValue() {
+public void shouldConvertEnumFluently() {
 ParameterConverter converter = new FluentEnumConverter();
 assertThat(converter.accept(SomeEnum.class), equalTo(true));
 assertThat((SomeEnum) converter.convertValue(multiple words and 1 
number, SomeEnum.class), equalTo(SomeEnum.MULTIPLE_WORDS_AND_1_NUMBER));





[jbehave-scm] [scm-core/jbehave-4.x][2/2] JBEHAVE-1075: Minor tidy up.

2015-04-08 Thread Mauro Talevi
commit 3d8b2a125746dcf3110634dcf6731e5fe55626b0
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Wed, 8 Apr 2015 19:30:24 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Wed, 8 Apr 2015 19:31:01 +0100

JBEHAVE-1075:  Minor tidy up.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java 
b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
index e1d1122..b69d5c6 100755
--- a/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/steps/ParameterConverters.java
@@ -601,8 +601,7 @@ public class ParameterConverters {
 
 @Override
 public Object convertValue(String value, Type type) {
-String transformedValue = value.replaceAll(\\W, 
_).toUpperCase();
-return super.convertValue(transformedValue, type);
+return super.convertValue(value.replaceAll(\\W, 
_).toUpperCase(), type);
 }
 }
 
diff --git 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
index 8ddb0f2..3e16a5a 100755
--- 
a/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
+++ 
b/jbehave-core/src/test/java/org/jbehave/core/steps/ParameterConvertersBehaviour.java
@@ -40,11 +40,9 @@ import org.jbehave.core.steps.SomeSteps.MyParameters;
 import org.junit.Test;
 
 import static org.hamcrest.MatcherAssert.assertThat;
-
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.instanceOf;
 import static org.hamcrest.Matchers.is;
-
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 
@@ -64,7 +62,7 @@ public class ParameterConvertersBehaviour {
 }
 
 private void assertThatDefaultConvertersInclude(ParameterConverter[] 
defaultConverters,
-Class? extends ParameterConverter... converterTypes) {
+@SuppressWarnings(unchecked) Class? extends 
ParameterConverter... converterTypes) {
 for (Class? extends ParameterConverter type : converterTypes) {
 boolean found = false;
 for (ParameterConverter converter : defaultConverters) {
@@ -461,7 +459,7 @@ public class ParameterConvertersBehaviour {
 }
 
 @Test
-public void flexibleEnumConverter_givenLowercasedSpaceSeparatedValue() {
+public void shouldConvertEnumFluently() {
 ParameterConverter converter = new FluentEnumConverter();
 assertThat(converter.accept(SomeEnum.class), equalTo(true));
 assertThat((SomeEnum) converter.convertValue(multiple words and 1 
number, SomeEnum.class), equalTo(SomeEnum.MULTIPLE_WORDS_AND_1_NUMBER));





[jbehave-dev] [jira] (JBEHAVE-1075) Add FluentEnumConverter, able to convert lower-cased, space-separated values to Enums

2015-04-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi resolved an issue as Fixed



















Pulled with thanks









 JBehave /  JBEHAVE-1075



  Add FluentEnumConverter, able to convert lower-cased, space-separated values to Enums 










Change By:

 Mauro Talevi




Resolution:

 Fixed




Fix Version/s:

 3.10




Status:

 Open Resolved












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1075) Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums

2015-04-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 










I think FluentEnumConverter would be a more suitable name. 












   

 Add Comment

























 JBehave /  JBEHAVE-1075



  Add FlexibleEnumConverter, able to convert lower-cased, space-separated values to Enums 







 Copyingpasting from the javadoc:   An EnumConverter allowing stories prose to be more natural. Before performing the actual conversion, it transforms values to upper-case, with any non-alphanumeric character replaced by an underscore ('_').   Example: assuming we have defined the step Given I am on the $page which is mapped to the method iAmOnPage(Pa...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-dev] Override step in Jbehave

2015-04-07 Thread Mauro Talevi

Here's an example of dynamic lookup via a parameter converter method:

https://github.com/jbehave/jbehave-core/blob/master/examples/core/src/main/java/org/jbehave/examples/core/steps/TraderSteps.java

Look for:

publicTraderretrieveTrader(Stringname);

On 05/04/2015 16:07, Patel, Nikunj (GE Healthcare) wrote:


Thanks Mauro.

Can you please guide to the example (if any)?

Thanks,

Nikunj

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Saturday, April 04, 2015 11:01 AM
*To:* dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Override step in Jbehave

Hi,

thanks for explaining your scenario.  In this case, a custom 
ErrorMessage type and a custom converter that looks up the translation 
in a file or database would seem your best option.


Let use know if you encounter problems in its implementation.

Cheers

On 03/04/2015 14:38, Patel, Nikunj (GE Healthcare) wrote:

HI,

This is one the option we are thinking for i18n testing.

I know JBehave have i18n testing example but we don’t want to
convert entire story file in language we supporting. We only want
to convert labels and messages in different language and test and
keep everything in English. We are planning to have converted text
in multiple languages available in files (key/values) or database.

Using below example, error message or label “abc” will be in
English, then using language files we convert values to
appropriate language(language set in application.properties)
before do compare with actual value. Now, we want to include this
converted text in the HTML report.

One other option I was thinking to these message in story example
template and use meta filter but there are so many and we don’t
want to maintain in feature file.

What do you suggest we should do to test this kind of scenario?

Thanks,

Nikunj

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Friday, April 03, 2015 6:15 AM
*To:* dev@jbehave.codehaus.org mailto:dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Override step in Jbehave

It's possible if you define your own custom converter, but it
should be associated to a custom parameter type, e.g. ErrorCode.

Then you implement the value conversion logic in the parameter
converter.

That said, it does not really seem very logical to do this.  
What's your usecase?


On 03/04/2015 03:00, Patel, Nikunj (GE Healthcare) wrote:

Hi,

Is there any way in Jbehave we can override step with
converted parameter values?

Here is what I am trying to do:

For Example:

I have step in feature file- Then error message “abc” should
be displayed.

Let’s see I am converting  string from “abc”  to “xyz”.

Now, I want to override feature file step with converted value
and see HTML report like-  Then error message “xyz” should be
displayed.

Thanks,

Nikunj





Re: [jbehave-dev] Additional info in HTML report

2015-04-07 Thread Mauro Talevi

No, that's currently not supported. Please raise a JIRA issue for this.

On 06/04/2015 19:35, Patel, Nikunj (GE Healthcare) wrote:


Thanks Mauro. I was able to implement custom html output.

One more question- I want to print some items (i.e- browser name, 
build ) from our .properties files in to this HTML report. Is it 
possible to define variables from .properties file or java class to 
ftl template?


*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Tuesday, March 31, 2015 3:10 AM
*To:* dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Additional info in HTML report

That's because the html output is configured in the CustomHtmlOutput 
class.


Follow the example, it shows you how to configure the custom html 
output template.


On 30/03/2015 21:57, Patel, Nikunj (GE Healthcare) wrote:

Thanks Mauro.

I am following below link for custom template but having issue
with location.


https://github.com/jbehave/jbehave-core/blob/master/examples/core/src/main/java/org/jbehave/examples/core/CustomCoreStories.java

Currently, I have custome files under  src/main/java/ftl  and
using below to call it but doesn’t seem to be working? Getting
file not found.

viewResources.put(reports,  ftl/custom-html-output.ftl);

where should I put this custom report file?

Thanks,

Nikunj

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Monday, March 30, 2015 12:37 PM
*To:* dev@jbehave.codehaus.org mailto:dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Additional info in HTML report

The successful/failed information is implicit in the colour-coding
- green for success and red for failure.

If you want you can adapt your the html report template to
prepend/append the words.Look for macro called renderStep.

Cheers

On 30/03/2015 19:23, Patel, Nikunj (GE Healthcare) wrote:

Hi,

I would like know if there is a way to add additional logging
in HTML report specially for successful steps. We are required
to provide objective evidence in test results and as part of
it we are thinking to add “PASSED” or “SUCCESS” before/after
each successful step.

What do you suggest to achieve above goal?

Approaches I took so far:

1. I tried it below class which is writing info in log4j.txt
file but I really want add info in HTML report.

cid:image001.png@01D06ADF.46CEBEB0

2.I am thinking about creating custom freemarker template
using jbehave-html-output.ftl but not sure it will work.

Thanks,

Nikunj





[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2015-04-07 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










I think it'd be much easier to modifiy the examples' CoreStories configuration to reproduce the behaviour in the doc.
Can you provide such pull request please? I'd be interested in understanding what works and what does not for you. 
Thanks












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1066) Upgrade dependencies to support JDK 8

2015-04-07 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi resolved an issue as Fixed


















 JBehave /  JBEHAVE-1066



  Upgrade dependencies to support JDK 8 










Change By:

 Mauro Talevi




Resolution:

 Fixed




Status:

 InProgress Resolved












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-dev] Override step in Jbehave

2015-04-04 Thread Mauro Talevi

Hi,

thanks for explaining your scenario.  In this case, a custom 
ErrorMessage type and a custom converter that looks up the translation 
in a file or database would seem your best option.


Let use know if you encounter problems in its implementation.

Cheers

On 03/04/2015 14:38, Patel, Nikunj (GE Healthcare) wrote:


HI,

This is one the option we are thinking for i18n testing.

I know JBehave have i18n testing example but we don’t want to convert 
entire story file in language we supporting. We only want to convert 
labels and messages in different language and test and keep everything 
in English. We are planning to have converted text in multiple 
languages available in files (key/values) or database.


Using below example, error message or label “abc” will be in English, 
then using language files we convert values to appropriate 
language(language set in application.properties) before do compare 
with actual value. Now, we want to include this converted text in the 
HTML report.


One other option I was thinking to these message in story example 
template and use meta filter but there are so many and we don’t want 
to maintain in feature file.


What do you suggest we should do to test this kind of scenario?

Thanks,

Nikunj

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Friday, April 03, 2015 6:15 AM
*To:* dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Override step in Jbehave

It's possible if you define your own custom converter, but it should 
be associated to a custom parameter type, e.g. ErrorCode.


Then you implement the value conversion logic in the parameter converter.

That said, it does not really seem very logical to do this.   What's 
your usecase?


On 03/04/2015 03:00, Patel, Nikunj (GE Healthcare) wrote:

Hi,

Is there any way in Jbehave we can override step with converted
parameter values?

Here is what I am trying to do:

For Example:

I have step in feature file- Then error message “abc” should be
displayed.

Let’s see I am converting  string from “abc”  to “xyz”.

Now, I want to override feature file step with converted value and
see HTML report like-  Then error message “xyz” should be displayed.

Thanks,

Nikunj





Re: [jbehave-dev] Override step in Jbehave

2015-04-03 Thread Mauro Talevi
It's possible if you define your own custom converter, but it should be 
associated to a custom parameter type, e.g. ErrorCode.


Then you implement the value conversion logic in the parameter converter.

That said, it does not really seem very logical to do this. What's your 
usecase?


On 03/04/2015 03:00, Patel, Nikunj (GE Healthcare) wrote:


Hi,

Is there any way in Jbehave we can override step with converted 
parameter values?


Here is what I am trying to do:

For Example:

I have step in feature file- Then error message “abc” should be 
displayed.


Let’s see I am converting  string from “abc”  to “xyz”.

Now, I want to override feature file step with converted value and see 
HTML report like-  Then error message “xyz” should be displayed.


Thanks,

Nikunj





[jbehave-dev] [jira] (JBEHAVE-1073) Story duration time in multi-threading execution mode is higher than normal

2015-04-02 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1073



  Story duration time in multi-threading execution mode is higher than normal 










Change By:

 Mauro Talevi




Fix Version/s:

 3.9.6




Assignee:

 MauroTalevi









 From:MauroTalevi[mailto:mauro.tal...@aquilonia.org]Sent:Wednesday,April01,20154:03PMTo:u...@jbehave.codehaus.orgSubject:Re:[jbehave-user]Storydurationarenotcalculatedcorrectlyinmulti-threadexecutionSure,easyenoughtodo!CanyoupleaseraiseaJIRAissueforthisusecase?CheersOn1Apr2015,at23:56,tran,phongphong.t...@emc.comwrote:HiMauro,Yeswe€™re When runninginmulti-threadingmode with10threadsforconcurrentstoryexecution.EmbedderControls[batch=false , skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=true,verboseFiltering=false,storyTimeoutInSecs=108000,failOnStoryTimeout=false,threads=10]We€™retryingtospeedup the testexecution(Selenium-basedtests)withmultiplethreads(threads=10)targetingaSeleniumGridwith10nodes.Inoticedthatthereporteddurationforeachstoryisalsohighandthatiswhythesumofallstorydurationsaddeduptoahigh total number.Doesthismeanthedurationatthestorylevelhasbeenaffectedwithmulti-threadingexecutionmode?Doweneedtode-normalize(dividedby10inthiscase)thedurationforeachstorytogetitsaccurateexecutiontime?Itwouldbegreatifthede-normalizationforstorydurationcanbeataddressedattheJBehaveframeworkleveltohandlethemulti-threadingexecutionmode.Thanks,PhongFrom:MauroTalevi[mailto:mauro.tal...@aquilonia.org]Sent:Saturday,March28,20151:56AMTo:u...@jbehave.codehaus.orgSubject:Re:[jbehave-user]Storydurationarenotcalculatedcorrectlyinmulti-threadexecutionHiPhong,Iwouldimagineyou'rerunninginmulti-threadingmode.Thetotal iscalculatedassimplybethesumofeachduration.Ifyouhaveasinglethreadthenitwillcoincidewiththebuildduration(moreorless),butyouusemultiplethreadsit'llbeoffbyafactorwhichshouldcorrespondtothenumberofthreads. Arguablywecouldusetheinformationofthethreadstorenormalisethetotalbythenumberofthreads.Thisformulawouldstillworkinthecaseofasinglethread.Canyouconfirmthatyou'reusingmultiplethreads?CheersOn25/03/201508:22,tran,phongwrote:HiMauro,Thanksalotforupdatingthecoreexampletemplate!WecanaccessandintegratethedurationsfromstoryDurations.propsintoourcustomHTMLreportnow.However,wejustnoticeanotherissue.ThetotaldurationreportedinstoryDurations.propsforallstoriesismuchhigher(8times)thatwhatweusuallyseeinourtestrun.BasicallywehaveaconfigurationinTeamCitytorunourSelenium-basedtestsandthetestruntook5hoursand25minutesasreportedbyTeamCity.Thisisthenormaltimerangeweexpectedforourtestrun. Results Started Changes Started Duration   #177 image001.pngNGIS#:6234Beacon#:3224PassRate:83.43949%passed:262failed:52pending:51 image002.pngView Changes(7) 24Mar1509:55 5h:25m Beacon_Selenium_W2K8R2_13 None  However

[jbehave-dev] [jira] (JBEHAVE-1073) Story duration time in multi-threading execution mode is higher than normal

2015-04-02 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1073



  Story duration time in multi-threading execution mode is higher than normal 










Change By:

 Mauro Talevi




Summary:

 Storydurationtimeinmulti-threadingexecutionmodeis high higher thannormal












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1073) Story duration time in multi-threading execution mode is higher than normal

2015-04-02 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1073



  Story duration time in multi-threading execution mode is higher than normal 










Change By:

 Mauro Talevi




Issue Type:

 Bug Improvement









 Whenrunninginmulti-threadingmode,thetotaliscalculatedassimplybethesumofeachduration.Ifyouhaveasinglethreadthenitwillcoincidewiththebuildduration(moreorless),but if youusemultiplethreadsit'llbeoffbyafactorwhichshouldcorrespondtothenumberofthreads. Theadditionalinformationoftheaveragedurationperthread,thetotalsumofthestorydurationsdividedbythenumberofthreads,shouldalsobeavailableifyouareinmulti-threadingmode.












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core][1/1] JBEHAVE-1073: Added thread average story duration when running in multi-threading mode.

2015-04-02 Thread Mauro Talevi
commit 8ea8f9e58e7cb879c23bb4f4fff00d15592c3600
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Thu, 2 Apr 2015 13:25:14 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Thu, 2 Apr 2015 13:25:14 +0200

JBEHAVE-1073:  Added thread average story duration when running in 
multi-threading mode.

diff --git a/examples/core/pom.xml b/examples/core/pom.xml
index 0e0f7eb..686c73d 100755
--- a/examples/core/pom.xml
+++ b/examples/core/pom.xml
@@ -12,6 +12,7 @@
   properties
 embeddables**/CoreStories.java/embeddables
 meta.filter/meta.filter
+threads2/threads
 ignore.failure.in.storiestrue/ignore.failure.in.stories
 ignore.failure.in.viewtrue/ignore.failure.in.view
   /properties
@@ -35,7 +36,7 @@
   generateViewAfterStoriestrue/generateViewAfterStories
   
ignoreFailureInStories${ignore.failure.in.stories}/ignoreFailureInStories
   
ignoreFailureInView${ignore.failure.in.view}/ignoreFailureInView
-  threads2/threads
+  threads${threads}/threads
   metaFilters
 metaFilter${meta.filter}/metaFilter
   /metaFilters
diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java 
b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java
index 123084a..dec454b 100644
--- a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryManager.java
@@ -200,7 +200,11 @@ public class StoryManager {
 future.cancel(true);
 }
}
+   int threads = embedderControls.threads();
+   long threadAverage = total / threads;
storyDurations.setProperty(total, Long.toString(total));
+   storyDurations.setProperty(threads, Long.toString(threads));
+   storyDurations.setProperty(threadAverage, 
Long.toString(threadAverage));
write(storyDurations, storyDurations.props);
}
 
diff --git 
a/jbehave-core/src/main/resources/ftl/jbehave-reports-with-totals.ftl 
b/jbehave-core/src/main/resources/ftl/jbehave-reports-with-totals.ftl
index 52cd4ee..c24c68f 100755
--- a/jbehave-core/src/main/resources/ftl/jbehave-reports-with-totals.ftl
+++ b/jbehave-core/src/main/resources/ftl/jbehave-reports-with-totals.ftl
@@ -197,6 +197,20 @@
 Totals
 /td
 /tr
+
+#assign threads = storyDurations.get('threads')!1
+#if (threads != 1) 
+tr class=totals
+td colspan=18/
+td
+@renderTime storyDurations.get('threadAverage')!0/
+/td
+td
+${threads}-Thread Average
+/td
+/tr
+/#if
+
 /table
 br /
 /div





Re: [jbehave-dev] Additional info in HTML report

2015-03-31 Thread Mauro Talevi

That's because the html output is configured in the CustomHtmlOutput class.

Follow the example, it shows you how to configure the custom html output 
template.


On 30/03/2015 21:57, Patel, Nikunj (GE Healthcare) wrote:


Thanks Mauro.

I am following below link for custom template but having issue with 
location.


https://github.com/jbehave/jbehave-core/blob/master/examples/core/src/main/java/org/jbehave/examples/core/CustomCoreStories.java

Currently, I have custome files under  src/main/java/ftl  and using 
below to call it but doesn’t seem to be working? Getting file not found.


viewResources.put(reports,  ftl/custom-html-output.ftl);

where should I put this custom report file?

Thanks,

Nikunj

*From:*Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
*Sent:* Monday, March 30, 2015 12:37 PM
*To:* dev@jbehave.codehaus.org
*Subject:* Re: [jbehave-dev] Additional info in HTML report

The successful/failed information is implicit in the colour-coding - 
green for success and red for failure.


If you want you can adapt your the html report template to 
prepend/append the words.Look for macro called renderStep.


Cheers

On 30/03/2015 19:23, Patel, Nikunj (GE Healthcare) wrote:

Hi,

I would like know if there is a way to add additional logging in
HTML report specially for successful steps. We are required to
provide objective evidence in test results and as part of it we
are thinking to add “PASSED” or “SUCCESS” before/after each
successful step.

What do you suggest to achieve above goal?

Approaches I took so far:

1. I tried it below class which is writing info in log4j.txt file
but I really want add info in HTML report.

cid:image001.png@01D06ADF.46CEBEB0

2.I am thinking about creating custom freemarker template using
jbehave-html-output.ftl but not sure it will work.

Thanks,

Nikunj





Re: [jbehave-dev] Additional info in HTML report

2015-03-30 Thread Mauro Talevi
The successful/failed information is implicit in the colour-coding - 
green for success and red for failure.


If you want you can adapt your the html report template to 
prepend/append the words.Look for macro called renderStep.


Cheers

On 30/03/2015 19:23, Patel, Nikunj (GE Healthcare) wrote:


Hi,

I would like know if there is a way to add additional logging in HTML 
report specially for successful steps. We are required to provide 
objective evidence in test results and as part of it we are thinking 
to add “PASSED” or “SUCCESS” before/after each successful step.


What do you suggest to achieve above goal?

Approaches I took so far:

1. I tried it below class which is writing info in log4j.txt file but 
I really want add info in HTML report.


cid:image001.png@01D06ADF.46CEBEB0

2.I am thinking about creating custom freemarker template using 
jbehave-html-output.ftl but not sure it will work.


Thanks,

Nikunj





[jbehave-scm] [scm-eclipse][1/1] JBEHAVE-1071: Use oss.sonatype.org.

2015-03-29 Thread Mauro Talevi
commit 2168a6dc1e501d753f62a7152e2c6c239edc863e
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sun, 29 Mar 2015 16:35:48 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sun, 29 Mar 2015 16:35:48 +0200

JBEHAVE-1071:  Use oss.sonatype.org.

diff --git a/pom.xml b/pom.xml
index 99b59b5..a372c2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,9 +4,9 @@
   modelVersion4.0.0/modelVersion
 
   parent
-groupIdorg.codehaus/groupId
-artifactIdcodehaus-parent/artifactId
-version1/version
+groupIdorg.sonatype.oss/groupId
+artifactIdoss-parent/artifactId
+version9/version
   /parent
 
   groupIdorg.jbehave.eclipse/groupId





[jbehave-scm] [scm-web][1/1] JBEHAVE-1072: Upgraded to selenium 2.44.0

2015-03-29 Thread Mauro Talevi
commit 53f49d5ad77840d08d3bde852793382177d793eb
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sun, 29 Mar 2015 17:09:54 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sun, 29 Mar 2015 17:09:54 +0200

JBEHAVE-1072:  Upgraded to selenium 2.44.0

diff --git a/web-selenium/pom.xml b/web-selenium/pom.xml
index 3368c4c..f7a3022 100644
--- a/web-selenium/pom.xml
+++ b/web-selenium/pom.xml
@@ -11,7 +11,7 @@
   descriptionSelenium and WebDriver API bindings for JBehave/description
 
   properties
-selenium.version2.42.1/selenium.version
+selenium.version2.44.0/selenium.version
 groovy.version2.1.8/groovy.version
   /properties
 





[jbehave-scm] [scm-web][1/1] JBEHAVE-1071: Use oss.sonatype.org.

2015-03-29 Thread Mauro Talevi
commit cd9e53e4c854c705aedd31920ccc131e01e60938
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sun, 29 Mar 2015 16:29:42 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sun, 29 Mar 2015 16:29:42 +0200

JBEHAVE-1071:  Use oss.sonatype.org.

diff --git a/pom.xml b/pom.xml
index 1c50f32..0d6832d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,9 +2,9 @@
 project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   parent
-groupIdorg.codehaus/groupId
-artifactIdcodehaus-parent/artifactId
-version1/version
+groupIdorg.sonatype.oss/groupId
+artifactIdoss-parent/artifactId
+version9/version
   /parent
   groupIdorg.jbehave.web/groupId
   artifactIdjbehave-web/artifactId
@@ -235,7 +235,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-site-plugin/artifactId
-  version3.0/version
+  version3.4/version
 /plugin
 plugin
   groupIdorg.codehaus.mojo/groupId





[jbehave-scm] [scm-site][1/1] JBEHAVE-1071: Use oss.sonatype.org.

2015-03-29 Thread Mauro Talevi
commit 42f3bb545de4f091769907521dbc109dd17073de
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sun, 29 Mar 2015 16:32:50 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sun, 29 Mar 2015 16:32:50 +0200

JBEHAVE-1071:  Use oss.sonatype.org.

diff --git a/pom.xml b/pom.xml
index d067a49..ea59eed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,9 +1,9 @@
 project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   parent
-groupIdorg.codehaus/groupId
-artifactIdcodehaus-parent/artifactId
-version1/version
+groupIdorg.sonatype.oss/groupId
+artifactIdoss-parent/artifactId
+version9/version
   /parent
   groupIdorg.jbehave.site/groupId
   artifactIdjbehave-site/artifactId





[jbehave-scm] [scm-web/4.x][1/2] JBEHAVE-1071: Use oss.sonatype.org.

2015-03-29 Thread Mauro Talevi
commit 18101810346da2d4fa5d7a7458d39c638e6813aa
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sun, 29 Mar 2015 16:29:42 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sun, 29 Mar 2015 17:10:29 +0200

JBEHAVE-1071:  Use oss.sonatype.org.

diff --git a/pom.xml b/pom.xml
index 59b21ac..19acf5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,9 +2,9 @@
 project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   parent
-groupIdorg.codehaus/groupId
-artifactIdcodehaus-parent/artifactId
-version1/version
+groupIdorg.sonatype.oss/groupId
+artifactIdoss-parent/artifactId
+version9/version
   /parent
   groupIdorg.jbehave.web/groupId
   artifactIdjbehave-web/artifactId
@@ -235,7 +235,7 @@
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-site-plugin/artifactId
-  version3.0/version
+  version3.4/version
 /plugin
 plugin
   groupIdorg.codehaus.mojo/groupId





[jbehave-dev] [jira] (JBEHAVE-1072) Upgrade to Selenium 2.44.0

2015-03-29 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi created an issue


















 JBehave /  JBEHAVE-1072



  Upgrade to Selenium 2.44.0 










Issue Type:

  Task




Assignee:

 Mauro Talevi




Components:


 Web Selenium




Created:


 29/Mar/15 10:09 AM




Fix Versions:


 web-3.6




Priority:

  Major




Reporter:

 Mauro Talevi












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c

[jbehave-scm] [scm-web/4.x][2/2] JBEHAVE-1072: Upgraded to selenium 2.44.0

2015-03-29 Thread Mauro Talevi
commit 41c27e813c3606a1bb6ec00fea0ac137bad8df2b
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sun, 29 Mar 2015 17:09:54 +0200
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sun, 29 Mar 2015 17:10:32 +0200

JBEHAVE-1072:  Upgraded to selenium 2.44.0

diff --git a/web-selenium/pom.xml b/web-selenium/pom.xml
index 9fbb4c4..31caf45 100644
--- a/web-selenium/pom.xml
+++ b/web-selenium/pom.xml
@@ -11,7 +11,7 @@
   descriptionSelenium and WebDriver API bindings for JBehave/description
 
   properties
-selenium.version2.42.1/selenium.version
+selenium.version2.44.0/selenium.version
 groovy.version2.1.8/groovy.version
   /properties
 





[jbehave-scm] [scm-core/jbehave-4.x][1/1] JBEHAVE-1071: Use oss.sonatype.org.

2015-03-24 Thread Mauro Talevi
commit 35e6b94e19e86a9bec84c61ec071fa367e90ce77
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Tue, 24 Mar 2015 11:44:48 +
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Tue, 24 Mar 2015 11:45:48 +

JBEHAVE-1071:  Use oss.sonatype.org.

diff --git a/pom.xml b/pom.xml
index 206bf76..e8fd08b 100755
--- a/pom.xml
+++ b/pom.xml
@@ -1,9 +1,10 @@
-project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
+project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   parent
-groupIdorg.codehaus/groupId
-artifactIdcodehaus-parent/artifactId
-version1/version
+groupIdorg.sonatype.oss/groupId
+artifactIdoss-parent/artifactId
+version9/version
   /parent
   groupIdorg.jbehave/groupId
   artifactIdjbehave/artifactId
diff --git a/settings.xml b/settings.xml
index f99454e..17b002e 100755
--- a/settings.xml
+++ b/settings.xml
@@ -6,15 +6,15 @@
   profiles
 profile
   !-- Required for dependencies of JBehave snapshots --
-  idcodehaus/id
+  idsonatype/id
   activation
 activeByDefaultfalse/activeByDefault
   /activation
   repositories
 repository
-  idcodehaus-public-repository-group/id
-  nameCodehaus Public Repository Group/name
-  urlhttps://nexus.codehaus.org/content/groups/public//url
+  idsonatype-public-repository-group/id
+  nameSonatype Public Repository Group/name
+  urlhttps://oss.sonatype.org/content/groups/public//url
   layoutdefault/layout
   releases
 enabledtrue/enabled
@@ -28,9 +28,9 @@
   /repositories
   pluginRepositories
 pluginRepository
-  idcodehaus-public-repository-group/id
-  nameCodehaus Public Repository Group/name
-  urlhttps://nexus.codehaus.org/content/groups/public//url
+  idsonatype-public-repository-group/id
+  nameSonatype Public Repository Group/name
+  urlhttps://oss.sonatype.org/content/groups/public//url
   releases
 enabledtrue/enabled
   /releases





[jbehave-scm] [scm-core][1/1] JBEHAVE-1071: Use oss.sonatype.org.

2015-03-24 Thread Mauro Talevi
commit 1c6e5379f6ee200b446f5b33ff19f791288693d9
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Tue, 24 Mar 2015 11:44:48 +
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Tue, 24 Mar 2015 11:44:48 +

JBEHAVE-1071:  Use oss.sonatype.org.

diff --git a/pom.xml b/pom.xml
index 6b5d5cc..7ca893f 100755
--- a/pom.xml
+++ b/pom.xml
@@ -1,9 +1,10 @@
-project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
+project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   parent
-groupIdorg.codehaus/groupId
-artifactIdcodehaus-parent/artifactId
-version1/version
+groupIdorg.sonatype.oss/groupId
+artifactIdoss-parent/artifactId
+version9/version
   /parent
   groupIdorg.jbehave/groupId
   artifactIdjbehave/artifactId
diff --git a/settings.xml b/settings.xml
index f99454e..17b002e 100755
--- a/settings.xml
+++ b/settings.xml
@@ -6,15 +6,15 @@
   profiles
 profile
   !-- Required for dependencies of JBehave snapshots --
-  idcodehaus/id
+  idsonatype/id
   activation
 activeByDefaultfalse/activeByDefault
   /activation
   repositories
 repository
-  idcodehaus-public-repository-group/id
-  nameCodehaus Public Repository Group/name
-  urlhttps://nexus.codehaus.org/content/groups/public//url
+  idsonatype-public-repository-group/id
+  nameSonatype Public Repository Group/name
+  urlhttps://oss.sonatype.org/content/groups/public//url
   layoutdefault/layout
   releases
 enabledtrue/enabled
@@ -28,9 +28,9 @@
   /repositories
   pluginRepositories
 pluginRepository
-  idcodehaus-public-repository-group/id
-  nameCodehaus Public Repository Group/name
-  urlhttps://nexus.codehaus.org/content/groups/public//url
+  idsonatype-public-repository-group/id
+  nameSonatype Public Repository Group/name
+  urlhttps://oss.sonatype.org/content/groups/public//url
   releases
 enabledtrue/enabled
   /releases





[jbehave-dev] [jira] (JBEHAVE-1071) Migrate from Codehaus Nexus to Sonatype Nexus

2015-03-21 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi created an issue


















 JBehave /  JBEHAVE-1071



  Migrate from Codehaus Nexus to Sonatype Nexus 










Issue Type:

  Task




Assignee:

 Mauro Talevi




Components:


 Build




Created:


 21/Mar/15 9:10 AM




Fix Versions:


 3.9.6, 4.0




Priority:

  Critical




Reporter:

 Mauro Talevi










As Codehaus is closing down, use Sonatype OSS Nexus at 
https://oss.sonatype.org
for releases and snapshots.












   

 Add Comment

[jbehave-scm] [scm-core][1/1] Updated core exmaple custom-reports template. Updated Eclipse lifecycle mapping.

2015-03-21 Thread Mauro Talevi
commit ab2da932e01fd3929817c67f73f8b637e1225f0a
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 21 Mar 2015 13:56:04 +
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 21 Mar 2015 13:56:04 +

Updated core exmaple custom-reports template.  Updated Eclipse lifecycle 
mapping.

diff --git a/examples/core/src/main/java/ftl/custom-reports.ftl 
b/examples/core/src/main/java/ftl/custom-reports.ftl
index 4459b36..fae5584 100755
--- a/examples/core/src/main/java/ftl/custom-reports.ftl
+++ b/examples/core/src/main/java/ftl/custom-reports.ftl
@@ -1,16 +1,13 @@
 #ftl strip_whitespace=true
 #macro renderStat stats name class=#assign value = stats.get(name)!0#if 
(value != 0)span 
class=${class}${value}/span#else${value}/#if/#macro
-#macro renderMillis stats name class=#assign millis = 
stats.get(name)!0span class=${class}#assign time = 
timeFormatter.formatMillis(millis)${time}/span/#macro
+#macro renderTime millis class=span class=${class}#assign time = 
timeFormatter.formatMillis(millis)${time}/span/#macro
 
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html
 head
-titleCustom Reports/title
-meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 /
-style type=text/css media=all
-@import url( ./style/jbehave-core.css );
-/style
+titleJBehave Reports/title
+meta http-equiv=Content-Type content=text/html; charset=${encoding} /
 /head
 
 body
@@ -22,7 +19,7 @@
 
 h2Story Reports/h2
 
-table
+table id=mainTable
 colgroup span=2 class=stories/colgroup
 colgroup span=5 class=scenarios/colgroup
 colgroup span=5 class=scenarios/colgroup
@@ -129,7 +126,8 @@
 @renderStat stats stepsIgnorable ignorable/
 /td
 td
-@renderMillis stats duration/
+#assign path = report.getPath()
+@renderTime storyDurations.get(path)!0/
 /td
 td
 #assign filesByFormat = report.filesByFormat
@@ -193,7 +191,7 @@
 @renderStat stats stepsIgnorable ignorable/
 /td
 td
-@renderMillis stats duration/
+@renderTime storyDurations.get('total')!0/
 /td
 td
 Totals
@@ -206,10 +204,24 @@ Totals
 div class=clear/div
 div id=footer
 div class=leftGenerated on ${date?string(dd/MM/ HH:mm:ss)}/div
-div class=rightJBehave #169; 2003-2011/div
+div class=rightJBehave #169; 2003-2014/div
 div class=clear/div
 /div
 
+script type=text/javascript language=javascript 
src=TableFilter/tablefilter.js/script  
+script language=javascript type=text/javascript  
+
+var mainTable_Props = {
+filters_row_index: 2,
+btn_reset: true
+};
+var tableFilter = setFilterGrid(mainTable, mainTable_Props, 2);
+/script
+
+style type=text/css media=all
+@import url( ./style/jbehave-core.css );
+/style
+
 /body
 
 /html
diff --git a/ides/eclipse/lifecycle-mapping-metadata.xml 
b/ides/eclipse/lifecycle-mapping-metadata.xml
index 9cb75be..9a4d18b 100644
--- a/ides/eclipse/lifecycle-mapping-metadata.xml
+++ b/ides/eclipse/lifecycle-mapping-metadata.xml
@@ -1,6 +1,5 @@
 ?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
@@ -47,11 +46,9 @@
 artifactIdmaven-hpi-plugin/artifactId
 versionRange[3.0,)/versionRange
 goals
-  goalinsert-test/goal
+  goalresolve-test-dependencies/goal
   goaltest-hpl/goal
-  goal
-resolve-test-dependencies
-  /goal
+  goalinsert-test/goal
 /goals
   /pluginExecutionFilter
   action
@@ -64,9 +61,9 @@
 artifactIdmaven-scala-plugin/artifactId
 versionRange[2.9.1,)/versionRange
 goals
-  goaladd-source/goal
-  goalcompile/goal
   goaltestCompile/goal
+  goalcompile/goal
+  goaladd-source/goal
 /goals
   /pluginExecutionFilter
   action
@@ -86,6 +83,18 @@
 ignore /
   /action
 /pluginExecution
+pluginExecution
+  pluginExecutionFilter
+groupIdorg.apache.maven.plugins/groupId
+artifactIdmaven-plugin-plugin/artifactId
+versionRange3.2/versionRange
+goals
+  goaldescriptor/goal
+/goals
+  /pluginExecutionFilter
+  action
+ignore /
+  /action
+/pluginExecution
   /pluginExecutions
 /lifecycleMappingMetadata
-





[jbehave-dev] [jira] (JBEHAVE-362) Convert story name in report to human readable form

2015-03-20 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Convert story name in report to human readable form 










Please use mailing lists for these kind of questions (http://jbehave.org/mailing-lists.html). 
Do not comment on old resolved issues.












   

 Add Comment

























 JBehave /  JBEHAVE-362



  Convert story name in report to human readable form 







 Another good suggestion from feedback. Convert:   - trader_sells_stocks.story - Trader Sells Stocks  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2015-03-12 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










You're mixing two very different concerns here, configuration and monitoring. 
What matters is whether the path of the story we're running matches the regex patterns provided in the CSV of story timeouts. 
I'm looking into simplify your solution. 












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1070) Loose step matching, not based on StepType

2015-03-12 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Loose step matching, not based on StepType 










While it's true that this constraint is strictly speaking not needed, it is nonetheless useful as it forces scenario writers not to be lazy and think about the syntax and how to word the steps. It is rather unlikely that steps of different types have exactly the same syntax. One could argue that it's a smell. 
That said, there are situations where that may happen. In this case it may be worth introducing an ANY value in the StepType enum (rather than dropping the step type). 
Having an annotation @Step(type=ANY) could be a good suggestion. We could then also have @Step(type=GIVEN) as an alias to @Given, etc ... 












   

 Add Comment

























 JBehave /  JBEHAVE-1070



  Loose step matching, not based on StepType 







 Hi,   I've recently started working with jbehave, and I am noticing duplication when a step method can be more than one StepType, e.g.:   {code}  @Given(the cart is empty)  @When(the cart is empty)  public void cartIsEmpty() {}  {code}   An easy (?) workaround could be to support the following syntax   {code}  @Given(the cart is empty)  @When  p...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c

[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2015-03-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










Hi Christopher,
finally got around to the patch. Can you please explain why you need to introduce the method



public String getSearchDirectory() 



in the EmbedderMonitor?












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core/jbehave-4.x][1/1] JBEHAVE-1066 Upgraded xstream and scala dependencies.

2015-03-08 Thread Mauro Talevi
commit 33128c984ee1ec7916ee6e332d23c952d8e19190
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Fri, 13 Feb 2015 10:09:28 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Fri, 13 Feb 2015 10:10:36 +0100

JBEHAVE-1066 Upgraded xstream and scala dependencies.

diff --git a/jbehave-core/pom.xml b/jbehave-core/pom.xml
index bd6588c..54c8983 100755
--- a/jbehave-core/pom.xml
+++ b/jbehave-core/pom.xml
@@ -76,7 +76,7 @@
 dependency
   groupIdcom.thoughtworks.xstream/groupId
   artifactIdxstream/artifactId
-  version1.4.5/version
+  version1.4.7/version
 /dependency
 dependency
   groupIdjavax.inject/groupId
diff --git a/jbehave-scala/pom.xml b/jbehave-scala/pom.xml
index bf7df6d..bf8f2d5 100755
--- a/jbehave-scala/pom.xml
+++ b/jbehave-scala/pom.xml
@@ -19,7 +19,7 @@
 dependency
   groupIdorg.scala-lang/groupId
   artifactIdscala-library/artifactId
-  version2.9.1/version
+  version2.11.5/version
 /dependency
   /dependencies
 
@@ -28,7 +28,7 @@
   plugin
 groupIdorg.scala-tools/groupId
 artifactIdmaven-scala-plugin/artifactId
-version2.9.1/version
+version2.15.2/version
 executions
   execution
 idscala-test-compile/id





[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2015-03-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi edited a comment on an issue


















  Re: Provide a configurable timeout value for each story running time 









 HiChristopher,finallygotaroundtothepatch.Canyoupleaseexplainwhyyouneedtointroducethemethod{code}publicStringgetSearchDirectory(){code}intheEmbedderMonitor? Ifyouneedtoconfigureanything,itshouldnotbeinthemonitorclass.












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2015-02-25 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










Hi Christopher, 
yes, I've seen it thanks. I'll get to it by the end of this week. 
Cheers












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1067) it is not possible to comment a scenario with !--

2015-02-20 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: it is not possible to comment a scenario with !-- 










No, it's not possible to comment a scenario with !--
If you want to skip the execution of a scenario, you should annotated it with a meta property, e.g.:
Scenario:  Meta: @skip
And use a filter -skip to avoid running the scenarios annotated with this property.












   

 Add Comment

























 JBehave /  JBEHAVE-1067



  it is not possible to comment a scenario with !-- 







 If you write a scenario with parameter see example, and comment the next scenario with !--. Then the previous when doesn't work.   Example: This will not work   Scenario: example  When using profiles  |profile|  |WEBSOCKET 1 |   !-- Scenario: xxx   The scenario example will not work, because he think that !-- Scenario: xxx is a parameter.   But i...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core][1/1] JBEHAVE-1066 Upgraded xstream and scala dependencies.

2015-02-13 Thread Mauro Talevi
commit 0eaf1266dd749a1e8cc2b14bc3c96aed8916e352
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Fri, 13 Feb 2015 10:09:28 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Fri, 13 Feb 2015 10:09:28 +0100

JBEHAVE-1066 Upgraded xstream and scala dependencies.

diff --git a/jbehave-core/pom.xml b/jbehave-core/pom.xml
index 03783c2..993426e 100755
--- a/jbehave-core/pom.xml
+++ b/jbehave-core/pom.xml
@@ -76,7 +76,7 @@
 dependency
   groupIdcom.thoughtworks.xstream/groupId
   artifactIdxstream/artifactId
-  version1.4.5/version
+  version1.4.7/version
 /dependency
 dependency
   groupIdjavax.inject/groupId
diff --git a/jbehave-scala/pom.xml b/jbehave-scala/pom.xml
index 1088551..eeb4ea4 100755
--- a/jbehave-scala/pom.xml
+++ b/jbehave-scala/pom.xml
@@ -19,7 +19,7 @@
 dependency
   groupIdorg.scala-lang/groupId
   artifactIdscala-library/artifactId
-  version2.9.1/version
+  version2.11.5/version
 /dependency
   /dependencies
 
@@ -28,7 +28,7 @@
   plugin
 groupIdorg.scala-tools/groupId
 artifactIdmaven-scala-plugin/artifactId
-version2.9.1/version
+version2.15.2/version
 executions
   execution
 idscala-test-compile/id





[jbehave-dev] [jira] (JBEHAVE-1066) Upgrade dependencies to support JDK 8

2015-02-13 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi created an issue


















 JBehave /  JBEHAVE-1066



  Upgrade dependencies to support JDK 8 










Issue Type:

  Improvement




Assignee:

 Mauro Talevi




Components:


 Core, Scala Support




Created:


 13/Feb/15 3:08 AM




Fix Versions:


 3.9.6, 4.0




Priority:

  Major




Reporter:

 Mauro Talevi










Upgrade any dependencies to support JDK 8.












   

 Add Comment

[jbehave-dev] [jira] (JBEHAVE-1066) Upgrade dependencies to support JDK 8

2015-02-13 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi started work on an issue



















Change By:

 Mauro Talevi




Status:

 Open InProgress












   

 Add Comment

























 JBehave /  JBEHAVE-1066



  Upgrade dependencies to support JDK 8 







 Upgrade any dependencies to support JDK 8.















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1053) Allow entire story to be restarted

2015-02-12 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Allow entire story to be restarted 










Hi Brett,
apologies for the delay in pulling this request. I meant to do the corresponding changes to the 4.x branch but did not get time for it. Could you perhaps have a first stab at it? Essentially changing the PerformableTree in a similar way you've modified the StoryRunner? 
Cheers












   

 Add Comment

























 JBehave /  JBEHAVE-1053



  Allow entire story to be restarted 







 For selenium tests that keep the same browser / context throughout the story, there are countless things that can go wrong such as network latency, slow application, etc. Since a false positive can cause people to quickly lose trust in the tests, others advised that the story should restart x amount of times before failing the test.   There is a way to...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-dev] Problem Creating XRef files from Eclipse

2015-02-08 Thread Mauro Talevi

Hi Chris,

feel free to upgrade the version of xstream as part of the patch.

Cheers

On 07/02/2015 02:12, Chris Aguirre wrote:
Figure out what the problem was - I was using JDK 1.8 and the version 
of XStream we are using: 1.4.5 has some issues with JDK 1.8.


After downgrading locally to JDK 1.7 these XRef and Json files were 
being created fine and tests passed.


We will need to upgrade xstream to at least version 1.4.6 if we want 
to claim JBehave works with JDK 1.8.


XStream Issue: https://jira.codehaus.org/browse/XSTR-746

XStream Release Notes Which mention this issue was resolved: 
http://xstream.codehaus.org/changes.html


Regards,
Christopher Aguirre

On Fri, Jan 30, 2015 at 12:42 PM, Chris Aguirre 
chris.aguirr...@gmail.com mailto:chris.aguirr...@gmail.com wrote:


Haven't tried that yet - will try and get back to you when I get
the chance to get back to work on this.

Thanks for the fast response.

Regards,
Christopher Aguirre

On Fri, Jan 30, 2015 at 12:09 PM, Mauro Talevi
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org
wrote:

Chris,

What counts is the command line build. Does it work?

If not can you stash your changes and verify that you can
build the latest master?

Cheers



On 30 Jan 2015, at 16:36, Chris Aguirre
chris.aguirr...@gmail.com mailto:chris.aguirr...@gmail.com
wrote:


JBehave Devs,

I am having issues creating CrossReferences in Eclipse.
Specifically, I am getting an ArrayIndexOutOfBoundsException
(-1) in:

/ 
com.thoughtworks.xstream.core.util.OrderRetainingMap.entrySet(OrderRetainingMap.java:77)/

when running the following Unit Tests:

/ ConcurrencyBehaviour.shouldCompleteXmlReportWhenStoryIsCancelled()/
/ ConcurrencyBehaviour.shouldAllowStoriesToBeTimed()/

/(Stack Trace is attached)/

Has anyone encountered similar issues when running from Eclipse?

I am actually close to submitting code for a new Ant/Maven
property: /storyTimeoutInSecsByPath /and want to ensure
XRef's are created after a failure.

Appreciate the guidance/help.

Regards,
Christopher Aguirre
StackTrace.txt

-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email








[jbehave-dev] [jira] (JBEHAVE-1065) error with tab character in comments

2015-02-04 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: error with tab character in comments 










Could you please provide some concrete examples? 
As a side note, why not simply configure your editor to replace tabs with spaces? 












   

 Add Comment

























 JBehave /  JBEHAVE-1065



  error with tab character in comments 







 When we write scenarios, we use tab character to aline columns of tabulars.  The problem appears when such step is commented (entirely or partially) by prefixing each step line by !-- .   The problem comes from the tab characters used in step tabular.  The result is that next uncommented step is recognized pending, and thus scenario fails.   If tab ch...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-dev] Problem Creating XRef files from Eclipse

2015-01-30 Thread Mauro Talevi
Chris,

What counts is the command line build.   Does it work?

If not can you stash your changes and verify that you can build the latest 
master?

Cheers 



 On 30 Jan 2015, at 16:36, Chris Aguirre chris.aguirr...@gmail.com wrote:
 
 JBehave Devs, 
 
 I am having issues creating CrossReferences in Eclipse. Specifically, I am 
 getting an ArrayIndexOutOfBoundsException (-1) in:
 
  
 com.thoughtworks.xstream.core.util.OrderRetainingMap.entrySet(OrderRetainingMap.java:77)
 
 when running the following Unit Tests: 
 
  ConcurrencyBehaviour.shouldCompleteXmlReportWhenStoryIsCancelled()
  ConcurrencyBehaviour.shouldAllowStoriesToBeTimed()
 
 (Stack Trace is attached)
 
 Has anyone encountered similar issues when running from Eclipse? 
 
 I am actually close to submitting code for a new Ant/Maven property: 
 storyTimeoutInSecsByPath and want to ensure XRef's are created after a 
 failure. 
 
 Appreciate the guidance/help.
 
 Regards, 
 Christopher Aguirre
 StackTrace.txt
 
 -
 To unsubscribe from this list, please visit:
 
http://xircles.codehaus.org/manage_email


Re: [jbehave-dev] Loggin in jbehave

2015-01-29 Thread Mauro Talevi
The reporters do not by default include any logger output, except for 
logger configured to wrote to sysout and then only for the Console 
output.   If you want to do some quick debugging this is the easiest way.


Else, you can define your own custom logging-based reporter that 
includes any log statements you want.   Bear in mind that JBehave was 
designed to be log-agnostic.


Cheers

On 29/01/2015 08:56, Omer Shem-Tov wrote:

Hi,
I'm trying to add logging to jbehave, and I'm not sure what is the 
best practice.
beside this discussion 
http://www.mail-archive.com/dev%40jbehave.codehaus.org/msg08872.html I 
didn't find any documentation.


I'm trying to add log4j properties from a file, so when I log messages 
using logger.debug(message) and above it will go to text file, and 
messages like
logger.info http://logger.info(message) and above will go to the 
console log.


if I want also these messages to be shown in the html report?


How can I do that?
Why do I need to explicitly specify log4j as dependency in the pom?

Thanks,
  Omer





[jbehave-dev] [jira] (JBEHAVE-1053) Allow entire story to be restarted

2015-01-13 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Allow entire story to be restarted 










Hi Brett, the changes are a bit tricky to track because they're spread over multiple commits.
Could you please provide in a single commit the proposed changes since the pull of Nov 10? 
Thanks












   

 Add Comment

























 JBehave /  JBEHAVE-1053



  Allow entire story to be restarted 







 For selenium tests that keep the same browser / context throughout the story, there are countless things that can go wrong such as network latency, slow application, etc. Since a false positive can cause people to quickly lose trust in the tests, others advised that the story should restart x amount of times before failing the test.   There is a way to...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1063) ConcurrentModificationException in CrossReference.outputFile()

2015-01-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: ConcurrentModificationException in CrossReference.outputFile() 










Which version are you using? Can you provide a sample project that reproduces this behaviour?












   

 Add Comment

























 JBehave /  JBEHAVE-1063



  ConcurrentModificationException in CrossReference.outputFile() 







 When Tests are executed massivley multithreaded, from time to time a ConcurrentModificationException is thrown when JBehave tries to write a report-file.   Trace:  {code}  java.util.ConcurrentModificationException  at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926)  at java.util.HashMap$KeyIterator.next(HashMap.java:960)  at com.thoughtwork...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1062) Named parameter values containing backslash and dollar characters cause side effects

2014-12-20 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi resolved an issue as Fixed



















Pulled with thanks!









 JBehave /  JBEHAVE-1062



  Named parameter values containing backslash and dollar characters cause side effects 










Change By:

 Mauro Talevi




Resolution:

 Fixed




Status:

 Open Resolved












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1062) Named parameter values containing backslash and dollar characters cause side effects

2014-12-20 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1062



  Named parameter values containing backslash and dollar characters cause side effects 










Change By:

 Mauro Talevi




Affects Version/s:

 3.9.6




Affects Version/s:

 3.x












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-979) Improve default report

2014-12-20 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Improve default report 










Hi, thanks for the contribution. It's been pulled and applied to both master and jbehave-4.x branches.
A couple of minor further suggestions: 


do we need all the tablefilter*.js files or tablefilter_all_min.js?


can we use lower capitalisation consistently?


can we use white as the background color of the table header?














   

 Add Comment

























 JBehave /  JBEHAVE-979



  Improve default report 







 The current report suffers from lack of information.  i'm working on a bit project and most of the people prefer the junit report provided on jenkins ci.   i think that the default report should have more information regrading:  * step failure - add full stacktrace and as much information as possible  * step duration  * filtering for the report table (ex...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c

[jbehave-dev] [jira] (JBEHAVE-1061) @BeforeScenario runs for every steps file that are instanciated

2014-12-20 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: @BeforeScenario runs for every steps file that are instanciated 










All the methods annotated with @BeforeScenario will run before each scenario, regardless of which steps file the are contained in. 
Can you provide a sample project reproducing your behaviour? 












   

 Add Comment

























 JBehave /  JBEHAVE-1061



  @BeforeScenario runs for every steps file that are instanciated 







 When i run my scenario that are using multiple steps files, the method that are annotated with @BeforeScenario runs for each steps file.   Im excpecting it to only run per scenario not per steps file















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-dev] JBEHAVE-979 - Improve Default Report

2014-12-16 Thread Mauro Talevi
Yes, you can add it to src/main/resources.

Please add js resources to
/js/tablefilter
and any style resources (if any) would go in the die
/style/tablefilter

Cheers

 On 15 Dec 2014, at 19:00, Chris Aguirre chris.aguirr...@gmail.com wrote:
 
 Mauro, 
 
 To make this change, I need to update jbehave-reports-with-totals.ftl and 
 include the TableFilter directory/code in jbehave-core/src/main-resources. 
 
 TableFilter is available on GitHub, but there is no mention of a maven 
 repository. Is there a way to retrieve from GitHub, or should I simply add 
 the new directory manually? 
 
 https://github.com/koalyptus/HTML-Table-Filter-Generator
 
 
 
 Regards, 
 Christopher Aguirre
 
 On Thu, Dec 11, 2014 at 9:07 AM, Chris Aguirre chris.aguirr...@gmail.com 
 wrote:
 Mauro, 
 
 I just did prototype for now - I will complete over next few days and send 
 the pull request when done. 
 
 Regards, 
 Chris Aguirre
 
 On Thu, Dec 11, 2014 at 8:05 AM, Mauro Talevi mauro.tal...@aquilonia.org 
 wrote:
 Hi Chris,
 
 this looks like an interesting and useful improvement.   
 
 Can you please provide a pull request with your implementation? 
 
 Cheers
 
 
 On 10/12/2014 21:13, Chris Aguirre wrote:
 JBehave Devs, 
 
 I've done a prototype of using TableFilter (http://tablefilter.free.fr/), 
 a javascript library which can be used to add filters to the JBehave 
 reports.html. 
 
 I've attached 2 screen shots to give a visual - and you can see the filter 
 in action on their website. 
 
 Thoughts on this implementation?
 
 
 Regards, 
 Christopher Aguirre
 
 
 -
 To unsubscribe from this list, please visit:
 
 http://xircles.codehaus.org/manage_email


Re: [jbehave-dev] JBEHAVE-979 - Improve Default Report

2014-12-11 Thread Mauro Talevi

Hi Chris,

this looks like an interesting and useful improvement.

Can you please provide a pull request with your implementation?

Cheers

On 10/12/2014 21:13, Chris Aguirre wrote:

JBehave Devs,

I've done a prototype of using TableFilter 
(http://tablefilter.free.fr/), a javascript library which can be used 
to add filters to the JBehave reports.html.


I've attached 2 screen shots to give a visual - and you can see the 
filter in action on their website.


Thoughts on this implementation?


Regards,
Christopher Aguirre


-
To unsubscribe from this list, please visit:

 http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2014-12-09 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










This features requires two main elements:


configuration: add a configuration element similar to storyTimeoutInSecs, which we may call storyTimeoutInSecsByPath, which will override the default value in storyTimeoutInSecs, and can be expressed as a CSV of regex expressions matching story paths. E.g. */long/.story:5000,*/short/.story:200. Note that there are several places where the storyTimeoutInSecs is configured and an equivalent element needs to be added for storyTimeoutInSecsByPath (using the type String in place of long).


implementation of logic: in StoryManager the story timeouts by paths need to be parsed and matched according to the story path being executed














   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c

[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2014-12-09 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










To subscribe to the mailing lists you need to create a Codehaus account and then subscribe via the project site: 
http://xircles.codehaus.org/projects/jbehave












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-933) timeout should be applied to stories only

2014-12-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: timeout should be applied to stories only 










Yes












   

 Add Comment

























 JBehave /  JBEHAVE-933



  timeout should be applied to stories only 







 Hi,   as I read the specification of a timeout, it is setting the controls to let a story time out, when a specified amount of time has passed. By the name this is a setting per story. So, when I have a timeout of 300s per story, I should be able to have 100 stories, which take 250 seconds each.   The way it is implemented is different, though. The Sto...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-833) Provide a configurable timeout value for each story running time

2014-12-08 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Provide a configurable timeout value for each story running time 










No, there is currently only one configured timeout value.












   

 Add Comment

























 JBehave /  JBEHAVE-833



  Provide a configurable timeout value for each story running time 







 When running stories that may take a bit longer, e.g. web tests, a timeout value for each story would be useful as opposed to a timeout for all stories together.  















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core][2/2] JBEHAVE-1058: Removed entries corresponding to single letters.

2014-12-06 Thread Mauro Talevi
commit 870bc8878b35c545fdfddbfd382353fd690f07fe
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 6 Dec 2014 17:12:11 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 6 Dec 2014 17:12:11 +0100

JBEHAVE-1058:  Removed entries corresponding to single letters.

diff --git a/jbehave-core/src/main/resources/i18n/keywords_hu.properties 
b/jbehave-core/src/main/resources/i18n/keywords_hu.properties
index c9ddc66..92e4731 100644
--- a/jbehave-core/src/main/resources/i18n/keywords_hu.properties
+++ b/jbehave-core/src/main/resources/i18n/keywords_hu.properties
@@ -1,14 +1,3 @@
-é = \u00e9
-É = \u00c9
-á = \u00e1
-Ö = \u00d6
-Ő = \u0150
-ö = \u00f6
-ő = \u0151
-Ü = \u00dc
-Á = \u00c1
-í = \u00ed
-ó = \u00f3
 Meta=Meta:
 MetaProperty=@
 Narrative=\u00d6sszefoglal\u00e1s:





[jbehave-dev] [jira] (JBEHAVE-1058) Hungarian language support

2014-12-06 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi resolved an issue as Fixed



















Pulled https://github.com/jbehave/jbehave-core/pull/70 with thanks









 JBehave /  JBEHAVE-1058



  Hungarian language support 










Change By:

 Mauro Talevi




Resolution:

 Fixed




Assignee:

 MauroTalevi




Status:

 Open Resolved












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1060) Polish language support

2014-12-06 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi resolved an issue as Fixed



















Pulled with thanks









 JBehave /  JBEHAVE-1060



  Polish language support 










Change By:

 Mauro Talevi




Resolution:

 Fixed




Status:

 Open Resolved












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core/jbehave-4.x][2/3] JBEHAVE-1058: Removed entries corresponding to single letters.

2014-12-06 Thread Mauro Talevi
commit 248b4cf3db3a14d847cf0c6706325e4394bf6331
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 6 Dec 2014 17:12:11 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 6 Dec 2014 17:16:29 +0100

JBEHAVE-1058:  Removed entries corresponding to single letters.

diff --git a/jbehave-core/src/main/resources/i18n/keywords_hu.properties 
b/jbehave-core/src/main/resources/i18n/keywords_hu.properties
index c9ddc66..92e4731 100644
--- a/jbehave-core/src/main/resources/i18n/keywords_hu.properties
+++ b/jbehave-core/src/main/resources/i18n/keywords_hu.properties
@@ -1,14 +1,3 @@
-é = \u00e9
-É = \u00c9
-á = \u00e1
-Ö = \u00d6
-Ő = \u0150
-ö = \u00f6
-ő = \u0151
-Ü = \u00dc
-Á = \u00c1
-í = \u00ed
-ó = \u00f3
 Meta=Meta:
 MetaProperty=@
 Narrative=\u00d6sszefoglal\u00e1s:





[jbehave-dev] [jira] (JBEHAVE-1060) Polish language support

2014-12-04 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi assigned an issue to Mauro Talevi


















 JBehave /  JBEHAVE-1060



  Polish language support 










Change By:

 Mauro Talevi




Assignee:

 MauroTalevi












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1059) NPE during run tests in other languages

2014-12-04 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: NPE during run tests in other languages 










This NPE does not occur in the JBehave code but in the codecentric code. 
You should raise the issue with them.












   

 Add Comment

























 JBehave /  JBEHAVE-1059



  NPE during run tests in other languages 







 I have a simple project Jbehave + Thucydides from archetype: net.thucydides:thucydides-jbehave-archetype.  And I modified class *de.jbehave.AcceptanceTestSuite* to change the locale of the test for other language e.x. German  {code:lang=java}  package de.jbehave;   import net.thucydides.jbehave.ThucydidesJUnitStories;  import net.thucydides.jbehave.UTF8S...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1058) Hungarian language support

2014-12-02 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1058



  Hungarian language support 










Change By:

 Mauro Talevi




Fix Version/s:

 3.9.6












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1058) Hungarian language support

2014-12-02 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Hungarian language support 










Can you please provide a patch with the Hungarian version of keywords:
https://github.com/jbehave/jbehave-core/blob/master/jbehave-core/src/main/resources/i18n/keywords_en.properties












   

 Add Comment

























 JBehave /  JBEHAVE-1058



  Hungarian language support 














 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1056) ResolveToPackagedName path resolver is broken on Windows

2014-12-02 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1056



  ResolveToPackagedName path resolver is broken on Windows 










Change By:

 Mauro Talevi




Affects Version/s:

 3.x




Affects Version/s:

 3.9.5




Fix Version/s:

 3.9.6












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1056) ResolveToPackagedName path resolver is broken on Windows

2014-12-02 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: ResolveToPackagedName path resolver is broken on Windows 










Could you please provide an example project reproducing this behaviour, in particular the configuration you use.












   

 Add Comment

























 JBehave /  JBEHAVE-1056



  ResolveToPackagedName path resolver is broken on Windows 







 Current implementation of 'org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName' is the following:   {code:java}  public static class ResolveToPackagedName extends AbstractPathResolver {   public String resolveName(StoryLocation storyLocation , String extension) {  String name = storyLocation .getPath().replace...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1057) Jenkins plugin broken, unmatched dependency

2014-12-02 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Jenkins plugin broken, unmatched dependency 










The DTKit dependency comes from the Jenkins xunit plugin.
Could you please try building the jbehave-jenkins-plugin with the latest updated version
$ mvn clean install -Dxunit.plugin.version=1.92 
to see if this fixes the problem? 
The currently used version of the xunit plugin is 1.62.












   

 Add Comment

























 JBehave /  JBEHAVE-1057



  Jenkins plugin broken, unmatched dependency 







 Current available jenkins plugin has unmatched dependency. When installing it crashes with:   WARNING: Failed to load org.jBehavePluginType$DescriptorImpl   jbehave is then not available in product configuration for processing the output.   I'm not only one with this problem. Here is a workaround which works great, modified jenkins package without the ...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit

Re: [jbehave-dev] mailing list confusion

2014-11-27 Thread Mauro Talevi

Hi Frank,

my misunderstanding.  Yes, I guess it should be a simple key-stroke 
command addition to an existing functionality (which is available 
already via the the menu).


Can you provide a patch for this?

Cheers

On 26/11/2014 00:25, Frank Pedroza wrote:

Thanks for the clarification.

One clarification I should provide is that my intention with using 
Ctrl+F is to do a text search, not a format.  I'm using Ctrl+H for now.


On Tue, Nov 25, 2014 at 4:18 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


Hi,

Firstly: those listed below are not mailing lists but web archives
- gmane and mail-archive.As archives, they are neither active
nor inactive and you don't need to be subscribed to search them. 
You may use them to search for previous posts or you can post a

question directly on the lists (as you're doing now ;-).

Secondly:  CTRL-F is only supported to format tables, at the
moment.   But you need to highlight the table for the action to be
activated.To support the formatting of the entire story, an
Eclipse formatter needs to be written.   If you have the time and
the expertise, your contribution would be most welcome.

Here's how: http://jbehave.org/how-to-contribute.html

Cheers


On 25/11/2014 19:31, Frank Pedroza wrote:

2 issues:

First:
Sorry, but not sure how to answer this question.  This may be a
noob question, but it seems like every site does it differently.

This page (http://jbehave.org/mailing-lists.html) lists 5 mailing
lists with no description of the intent behind them:

  * gmane.comp.java.jbehave.devel
http://dir.gmane.org/gmane.comp.java.jbehave.devel
  * gmane.comp.java.jbehave.user
http://dir.gmane.org/gmane.comp.java.jbehave.user
  * gmane.comp.java.jbehave.scm
http://dir.gmane.org/gmane.comp.java.jbehave.scm
  * dev@jbehave.codehaus.org
http://www.mail-archive.com/dev@jbehave.codehaus.org/
  * u...@jbehave.codehaus.org
http://www.mail-archive.com/user@jbehave.codehaus.org/

Are these all active?  Should I be subscribed/following all of
these?  Do I really need to go search all of these to see if a
question I have has been addressed before?

Second:
There was a post on 9/17/2014 to u...@jbehave.codehaus.org
mailto:u...@jbehave.codehaus.org titled CTRL+F does not work
in JBehave editor.  I haven't seen a response and I don't see
anything listed in the jira
(http://jira.codehaus.org/browse/JBEHAVE). Is this a known
issue?  Should/will a jira be created for it?  What should the
process be? How can I as a community member help?







Re: [jbehave-dev] mailing list confusion

2014-11-27 Thread Mauro Talevi

And please raise a JIRA issue for it.

On 27/11/2014 09:05, Mauro Talevi wrote:

Hi Frank,

my misunderstanding.  Yes, I guess it should be a simple key-stroke 
command addition to an existing functionality (which is available 
already via the the menu).


Can you provide a patch for this?

Cheers

On 26/11/2014 00:25, Frank Pedroza wrote:

Thanks for the clarification.

One clarification I should provide is that my intention with using 
Ctrl+F is to do a text search, not a format.  I'm using Ctrl+H for now.


On Tue, Nov 25, 2014 at 4:18 PM, Mauro Talevi 
mauro.tal...@aquilonia.org mailto:mauro.tal...@aquilonia.org wrote:


Hi,

Firstly: those listed below are not mailing lists but web
archives - gmane and mail-archive.As archives, they are
neither active nor inactive and you don't need to be subscribed
to search them.  You may use them to search for previous posts or
you can post a question directly on the lists (as you're doing
now ;-).

Secondly:  CTRL-F is only supported to format tables, at the
moment.   But you need to highlight the table for the action to
be activated.To support the formatting of the entire story,
an Eclipse formatter needs to be written.   If you have the time
and the expertise, your contribution would be most welcome.

Here's how: http://jbehave.org/how-to-contribute.html

Cheers


On 25/11/2014 19:31, Frank Pedroza wrote:

2 issues:

First:
Sorry, but not sure how to answer this question.  This may be a
noob question, but it seems like every site does it differently.

This page (http://jbehave.org/mailing-lists.html) lists 5
mailing lists with no description of the intent behind them:

  * gmane.comp.java.jbehave.devel
http://dir.gmane.org/gmane.comp.java.jbehave.devel
  * gmane.comp.java.jbehave.user
http://dir.gmane.org/gmane.comp.java.jbehave.user
  * gmane.comp.java.jbehave.scm
http://dir.gmane.org/gmane.comp.java.jbehave.scm
  * dev@jbehave.codehaus.org
http://www.mail-archive.com/dev@jbehave.codehaus.org/
  * u...@jbehave.codehaus.org
http://www.mail-archive.com/user@jbehave.codehaus.org/

Are these all active?  Should I be subscribed/following all of
these?  Do I really need to go search all of these to see if a
question I have has been addressed before?

Second:
There was a post on 9/17/2014 to u...@jbehave.codehaus.org
mailto:u...@jbehave.codehaus.org titled CTRL+F does not work
in JBehave editor.  I haven't seen a response and I don't see
anything listed in the jira
(http://jira.codehaus.org/browse/JBEHAVE). Is this a known
issue?  Should/will a jira be created for it?  What should the
process be? How can I as a community member help?









Re: [jbehave-dev] mailing list confusion

2014-11-25 Thread Mauro Talevi

Hi,

Firstly: those listed below are not mailing lists but web archives - 
gmane and mail-archive.As archives, they are neither active nor 
inactive and you don't need to be subscribed to search them. You may use 
them to search for previous posts or you can post a question directly on 
the lists (as you're doing now ;-).


Secondly:  CTRL-F is only supported to format tables, at the moment.   
But you need to highlight the table for the action to be activated.
To support the formatting of the entire story, an Eclipse formatter 
needs to be written.   If you have the time and the expertise, your 
contribution would be most welcome.


Here's how:  http://jbehave.org/how-to-contribute.html

Cheers

On 25/11/2014 19:31, Frank Pedroza wrote:

2 issues:

First:
Sorry, but not sure how to answer this question.  This may be a noob 
question, but it seems like every site does it differently.


This page (http://jbehave.org/mailing-lists.html) lists 5 mailing 
lists with no description of the intent behind them:


  * gmane.comp.java.jbehave.devel
http://dir.gmane.org/gmane.comp.java.jbehave.devel
  * gmane.comp.java.jbehave.user
http://dir.gmane.org/gmane.comp.java.jbehave.user
  * gmane.comp.java.jbehave.scm
http://dir.gmane.org/gmane.comp.java.jbehave.scm
  * dev@jbehave.codehaus.org
http://www.mail-archive.com/dev@jbehave.codehaus.org/
  * u...@jbehave.codehaus.org
http://www.mail-archive.com/user@jbehave.codehaus.org/

Are these all active?  Should I be subscribed/following all of these?  
Do I really need to go search all of these to see if a question I have 
has been addressed before?


Second:
There was a post on 9/17/2014 to u...@jbehave.codehaus.org 
mailto:u...@jbehave.codehaus.org titled CTRL+F does not work in 
JBehave editor.  I haven't seen a response and I don't see anything 
listed in the jira (http://jira.codehaus.org/browse/JBEHAVE). Is this 
a known issue?  Should/will a jira be created for it? What should the 
process be?  How can I as a community member help?




[jbehave-scm] [scm-core][1/1] JBEHAVE-1055: Removed stacktrace when story durations file is not found.

2014-11-18 Thread Mauro Talevi
commit 29fc4e462e3f44ede756bdfd82021d1d242f0c09
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Tue, 18 Nov 2014 20:57:51 +
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Tue, 18 Nov 2014 20:57:51 +

JBEHAVE-1055:  Removed stacktrace when story durations file is not found.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
 
b/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
index e86e536..7bd5c21 100644
--- 
a/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
+++ 
b/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
@@ -122,7 +122,7 @@ public class TemplateableViewGenerator implements 
ViewGenerator {
try {
p.load(new FileReader(new File(outputDirectory, 
storyDurations.props)));
} catch (IOException e) {
-   e.printStackTrace();
+   // story durations file not found - carry on
}
MapString,Long durations = new HashMapString, Long();
for ( Object key : p.keySet() ){





[jbehave-scm] [scm-core/jbehave-4.x][1/1] JBEHAVE-1055: Removed stacktrace when story durations file is not found.

2014-11-18 Thread Mauro Talevi
commit 894408f43d0fda504550f65d24b8769b24053c22
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Tue, 18 Nov 2014 20:57:51 +
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Tue, 18 Nov 2014 20:58:19 +

JBEHAVE-1055:  Removed stacktrace when story durations file is not found.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
 
b/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
index e86e536..7bd5c21 100644
--- 
a/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
+++ 
b/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
@@ -122,7 +122,7 @@ public class TemplateableViewGenerator implements 
ViewGenerator {
try {
p.load(new FileReader(new File(outputDirectory, 
storyDurations.props)));
} catch (IOException e) {
-   e.printStackTrace();
+   // story durations file not found - carry on
}
MapString,Long durations = new HashMapString, Long();
for ( Object key : p.keySet() ){





[jbehave-dev] [jira] (JBEHAVE-1055) FileNotFoundException storyDurations.props

2014-11-18 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi resolved an issue as Fixed


















 JBehave /  JBEHAVE-1055



  FileNotFoundException storyDurations.props 










Change By:

 Mauro Talevi




Resolution:

 Fixed




Fix Version/s:

 3.9.6




Assignee:

 MauroTalevi




Status:

 Open Resolved












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-dev] post test run callback

2014-11-18 Thread Mauro Talevi

Have you considered using a method annotated with @AfterStories?

If yes and it still does not work, can you detail your usecase better?

On 18/11/2014 17:57, Frank Pedroza wrote:
Is there support in the jbehave framework for registering a post-test 
run callback?  I was hoping for a addPostTestRunListener() type of 
method, but don't see anything.  Currently, in our InjectableEmbedder 
impl, we're calling some method that's part of an object we configured 
in our Configuration impl.  It's obviously quite ugly as we have to 
cast to accomplish this.  I do see EmbedderMonitor, but I'm having a 
difficult time understanding the intent of many of the framework 
objects due to a lack of javadoc.



-
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1054) Regression: configuration method inherited from JUnitStories class not being overridden

2014-11-11 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1054



  Regression: configuration method inherited from JUnitStories class not being overridden 










Change By:

 Mauro Talevi




Fix Version/s:

 3.9.2




Fix Version/s:

 3.9.6












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




Re: [jbehave-dev] problems with extending JBehave

2014-11-11 Thread Mauro Talevi

Hi,

making the methods protected means losing the possibility of changing 
their implementation without potentially breaking backward compat.   
Those methods are private for a reason.  Some methods are intended to be 
extensible, other not.


You should instead be using the public methods of the classes/interfaces 
of the underlying components.   It looks like you need to collect/list 
steps, so you can use the StepCollector interface or the StepCreator class.


If you need to expose some specific functionality that is not currently 
accessible via the interface methods, we can extend the interface.


Cheers

On 10/11/2014 11:39, Willemijn Wouters wrote:

Hello,

Unitils has a testlistener, just like JUnit.
Some methods of the testlistener must be executed before the 
@BeforeScenarios, some of the methods must be executed after the 
@BeforeScenarios.

To give you an idea:
@Override
public ListBeforeOrAfterStep 
listBeforeOrAfterScenario(ScenarioType type) {
ListBeforeOrAfterStep steps = new 
ArrayListBeforeOrAfterStep();

StepCreator stepCreator = createStepCreator();
InjectableStepsFactory stepsFactory = getStepsFactory();

steps.addAll(UnitilsStepsFactory.createBeforeTestClassStep(stepCreator, stepsFactory, 
type()));
steps.addAll(UnitilsStepsFactory.createAfterCreateTestObject(stepCreator, 
stepsFactory, type()));
steps.addAll(UnitilsStepsFactory.createBeforeTestSetUp(stepCreator, 
stepsFactory, type()));


steps.addAll(scenarioStepsHaving(type, Stage.BEFORE, 
BeforeScenario.class));
steps.addAll(UnitilsStepsFactory.createBeforeTestMethod(stepCreator, 
stepsFactory, type()));
steps.addAll(UnitilsStepsFactory.createAfterTestMethod(stepCreator, 
stepsFactory, type()));
steps.addAll(scenarioStepsHaving(type, Stage.AFTER, 
AfterScenario.class, ANY, SUCCESS, FAILURE));
steps.addAll(UnitilsStepsFactory.createAfterTestTearDown(stepCreator, 
stepsFactory, type()));

return Collections.unmodifiableList(steps);
}

We have find a way to make it work, but it wasn't easy because of the 
private methods/classes.
I couldn't make @BeforeScenarios  in a seperate step because these 
Unitils steps needs the be executed in the correct order and Unitils 
needs to know which step is executed because it injects objects into 
the steps fields.


So this was the only solution to make everything work with Unitils.
Is it possible to make these methods/classes protected?
/The following methods of //org.jbehave.core.steps.Steps:/

oorg.jbehave.core.steps.Steps.scenarioStepsHaving(ScenarioType, Stage, 
Class? extends Annotation, Outcome...)


oorg.jbehave.core.steps.Steps.createBeforeOrAfterStep(Stage, Method)

oorg.jbehave.core.steps.Steps.createBeforeOrAfterStep(Stage, Method)

oorg.jbehave.core.steps.Steps.scenarioOutcome(Method, Class? extends 
Annotation)


oorg.jbehave.core.steps.Steps.createCandidate(Method, StepType, 
String, int, Configuration)


/The following methods in 
//org.jbehave.core.steps.InstanceStepsFactory: 
/org.jbehave.core.steps.AbstractStepsFactory.methodReturningConverters(Class?)


/The following classes/methods in //org.jbehave.core.steps.StepCreator:/

oall the inner classes

oorg.unitils.jbehave.core.stepcreator.UnitilsStepCreator.StepCreatorBeforeOrAfterStep.paramConvertersWithExceptionInjector(UUIDExceptionWrapper)

Thanks
Willemijn Wouters

2014-11-07 19:56 GMT+01:00 Mauro Talevi mauro.tal...@aquilonia.org 
mailto:mauro.tal...@aquilonia.org:


Hi,

the methods are private because they are internal and not meant to
be an API.

Can you explain what you're trying to do?

Cheers

On 7 Nov 2014, at 11:35, Willemijn Wouters
wouters.willemij...@gmail.com
mailto:wouters.willemij...@gmail.com wrote:


Hello,

I work on a opensource project called Unitils
http://unitils.org/summary.html and at the moment we are
working on a project called unitils-jbehave
https://sourceforge.net/projects/unitilsjbehave/.
Unitils-jbehave is the glue between Unitils  JBehave.
But we have had some difficulties because of the fact that so
many things are private.

Is it possible to put the following things on 'protected'?

/The following methods of //org.jbehave.core.steps.Steps:/

oorg.jbehave.core.steps.Steps.scenarioStepsHaving(ScenarioType,
Stage, Class? extends Annotation, Outcome...)

oorg.jbehave.core.steps.Steps.createBeforeOrAfterStep(Stage, Method)

oorg.jbehave.core.steps.Steps.createBeforeOrAfterStep(Stage, Method)

oorg.jbehave.core.steps.Steps.scenarioOutcome(Method, Class?
extends Annotation)

oorg.jbehave.core.steps.Steps.createCandidate(Method, StepType,
String, int, Configuration)

/The following methods in
//org.jbehave.core.steps.InstanceStepsFactory:

/org.jbehave.core.steps.AbstractStepsFactory.methodReturningConverters(Class?)

/The following classes/methods in
//org.jbehave.core.steps.StepCreator:/

oall the inner classes

[jbehave-dev] [jira] (JBEHAVE-1053) Allow entire story to be restarted

2014-11-10 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Allow entire story to be restarted 










Did some cleanup on the StoryRunner implementation. Can you please verify it works on your side? 
Please add any different behaviour to restarting.story.












   

 Add Comment

























 JBehave /  JBEHAVE-1053



  Allow entire story to be restarted 







 For selenium tests that keep the same browser / context throughout the story, there are countless things that can go wrong such as network latency, slow application, etc. Since a false positive can cause people to quickly lose trust in the tests, others advised that the story should restart x amount of times before failing the test.   There is a way to...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1054) Regression: configuration method inherited from JUnitStories class not being overridden

2014-11-10 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi edited a comment on an issue


















  Re: Regression: configuration method inherited from JUnitStories class not being overridden 









 Yes,thisisasideeffectofJBEHAVE-1009.TheConfigurableEmbeddernowusestheconfiguration()methodlazilyonlyifthereisnootherconfigurationset.TooverridewithyourinstanceofConfiguration,youcanusethe#useConfiguration()methodintheconstructoroftheclassinheritingfromJUnitStories. TheCoreStoriesinthecoreexamplesshowhowtoconfigureusingtheconfiguration()method.  Ifyoustillhaveproblems,pleaseprovideafullyworkingexamplebuildableandexecutablebycommand-line(eitheraziporagitrepo)sowecanreproduceyourbehaviour.












   

 Add Comment

























 JBehave /  JBEHAVE-1054



  Regression: configuration method inherited from JUnitStories class not being overridden 







 When creating a JUnitStories class, the overridden configuration method is no longer executed starting in JBehave 3.9.2.   I also tested this with 3.9.3, 3.9.5 and 4.0-beta-11 and the issue persists. Only by changing the dependency version in my POM back to 3.9.1 does the method override correctly again.   I have attached my StoryReporter class, the abs...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c

[jbehave-dev] [jira] (JBEHAVE-1054) Regression: configuration method inherited from JUnitStories class not being overridden

2014-11-10 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Regression: configuration method inherited from JUnitStories class not being overridden 










Incidentally, you seem to be using both the annotated embedder and extending JUnitStories (which extends the configurable embedder). Using the two is redundant and may lead to inconsistent behaviour. 
It should suffice to use one of the two. 












   

 Add Comment

























 JBehave /  JBEHAVE-1054



  Regression: configuration method inherited from JUnitStories class not being overridden 







 When creating a JUnitStories class, the overridden configuration method is no longer executed starting in JBehave 3.9.2.   I also tested this with 3.9.3, 3.9.5 and 4.0-beta-11 and the issue persists. Only by changing the dependency version in my POM back to 3.9.1 does the method override correctly again.   I have attached my StoryReporter class, the abs...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] (JBEHAVE-1054) Regression: configuration method inherited from JUnitStories class not being overridden

2014-11-10 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1054



  Regression: configuration method inherited from JUnitStories class not being overridden 










You're using an inconsistent mix of version for the jbehave dependencies in your pom.xml.
With the attached patch (i.e. using the same jbehave version for all dependencies) it picks up your configuration. 










Change By:

 Mauro Talevi




Attachment:

 pom.patch












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-scm] [scm-core/jbehave-4.x][3/4] JBEHAVE-1053: Simplification.

2014-11-09 Thread Mauro Talevi
commit 6b66ed9d810398451fddcb4822c22237341c877c
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 8 Nov 2014 11:47:02 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 8 Nov 2014 11:47:38 +0100

JBEHAVE-1053:  Simplification.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java 
b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java
index 314587b..fd9af67 100755
--- a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java
@@ -50,7 +50,6 @@ public class StoryRunner {
 private ThreadLocalFailureStrategy failureStrategy = new 
ThreadLocalFailureStrategy();
 private ThreadLocalPendingStepStrategy pendingStepStrategy = new 
ThreadLocalPendingStepStrategy();
 private ThreadLocalUUIDExceptionWrapper storyFailure = new 
ThreadLocalUUIDExceptionWrapper();
-private ThreadLocalUUIDExceptionWrapper beforeAfterStoryFailure = new 
ThreadLocalUUIDExceptionWrapper();
 private ThreadLocalStoryReporter reporter = new 
ThreadLocalStoryReporter();
 private ThreadLocalString reporterStoryPath = new ThreadLocalString();
 private ThreadLocalState storiesState = new ThreadLocalState();
@@ -218,12 +217,11 @@ public class StoryRunner {
 }
 
 /**
- * Helper method to determine if the cause of a story failure contains 
{@link RestartingStoryFailure}
- * @param cause - the stacktrace to check for {@link 
RestartingStoryFailure}
+ * Determines if the cause of a story failure is {@link 
RestartingStoryFailure}
+ * @param cause the {@link Throwable} containing the {@link 
RestartingStoryFailure} in its stack trace
  * @return true if found, false otherwise
  */
-public boolean hasRestartingStoryException(Throwable cause)
-{
+   private boolean restartStory(Throwable cause) {
while (cause != null) {
if (cause instanceof RestartingStoryFailure) {
return true;
@@ -248,8 +246,8 @@ public class StoryRunner {
reporter.get().afterStory(context.givenStory);
}

-   // Restart entire story if determined it needs it
-   if (hasRestartingStoryException(e) || 
hasRestartingStoryException(beforeAfterStoryFailure.get())) {
+   // Restart entire story if needed
+   if (restartStory(e)) {
//this is not getting logged when running in 
multi-threaded mode
reporter.get().restartedStory(story, e);
restartingStory = true;
@@ -406,7 +404,6 @@ public class StoryRunner {
 }
 currentStrategy.set(context.configuration().failureStrategy());
 storyFailure.set(null);
-beforeAfterStoryFailure.set(null);
 }
 
 private void runGivenStories(GivenStories givenStories, MapString, 
String parameters, RunContext context) throws Throwable {
@@ -594,21 +591,15 @@ public class StoryRunner {
 }
 
 private final class SomethingHappened implements State {
-UUIDExceptionWrapper scenarioFailure;
+UUIDExceptionWrapper failure;
 
-public SomethingHappened(UUIDExceptionWrapper scenarioFailure) {
-this.scenarioFailure = scenarioFailure;
+public SomethingHappened(UUIDExceptionWrapper failure) {
+this.failure = failure;
 }
 
 public State run(Step step) {
-StepResult result = step.doNotPerform(scenarioFailure);
+StepResult result = step.doNotPerform(failure);
 result.describeTo(reporter.get());
-
-   if (result.getFailure() != null) {
-   //persist failures to see if we need to restart 
the story
-   
beforeAfterStoryFailure.set(result.getFailure());
-   }
-
 return this;
 }
 }
@@ -736,7 +727,7 @@ public class StoryRunner {
 
 public Throwable failure(State state) {
 if (failed(state)) {
-return ((SomethingHappened) state).scenarioFailure.getCause();
+return ((SomethingHappened) state).failure.getCause();
 }
 return null;
 }





[jbehave-scm] [scm-core/jbehave-4.x][2/4] JBEHAVE-1053: Added restarting.story to verify restarting behaviour.

2014-11-09 Thread Mauro Talevi
commit 7f5907f34b5d11ee2f701662e888d96dbca91b74
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Fri, 7 Nov 2014 13:38:19 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 8 Nov 2014 11:07:29 +0100

JBEHAVE-1053:  Added restarting.story to verify restarting behaviour.

diff --git 
a/examples/core/src/main/java/org/jbehave/examples/core/CoreStories.java 
b/examples/core/src/main/java/org/jbehave/examples/core/CoreStories.java
index d2adede..031f091 100755
--- a/examples/core/src/main/java/org/jbehave/examples/core/CoreStories.java
+++ b/examples/core/src/main/java/org/jbehave/examples/core/CoreStories.java
@@ -48,6 +48,7 @@ import org.jbehave.examples.core.steps.MyContext;
 import org.jbehave.examples.core.steps.NamedParametersSteps;
 import org.jbehave.examples.core.steps.PendingSteps;
 import org.jbehave.examples.core.steps.PriorityMatchingSteps;
+import org.jbehave.examples.core.steps.RestartingSteps;
 import org.jbehave.examples.core.steps.SandpitSteps;
 import org.jbehave.examples.core.steps.SearchSteps;
 import org.jbehave.examples.core.steps.TableSteps;
@@ -116,7 +117,8 @@ public class CoreStories extends JUnitStories {
 return new InstanceStepsFactory(configuration(), new TraderSteps(new 
TradingService()), new AndSteps(),
 new MetaParametrisationSteps(), new CalendarSteps(), new 
PriorityMatchingSteps(), new PendingSteps(),
 new SandpitSteps(), new SearchSteps(), new BeforeAfterSteps(), 
new CompositeSteps(),
-new NamedParametersSteps(), new 
ExamplesTableParametersSteps(), new TableSteps(), new ContextSteps(context));
+new NamedParametersSteps(), new 
ExamplesTableParametersSteps(), new TableSteps(), 
+new ContextSteps(context), new RestartingSteps());
 }
 
 @Override
diff --git 
a/examples/core/src/main/java/org/jbehave/examples/core/steps/RestartingSteps.java
 
b/examples/core/src/main/java/org/jbehave/examples/core/steps/RestartingSteps.java
new file mode 100644
index 000..f6c3f48
--- /dev/null
+++ 
b/examples/core/src/main/java/org/jbehave/examples/core/steps/RestartingSteps.java
@@ -0,0 +1,28 @@
+package org.jbehave.examples.core.steps;
+
+import org.jbehave.core.annotations.When;
+import org.jbehave.core.failures.RestartingScenarioFailure;
+import org.jbehave.core.failures.RestartingStoryFailure;
+
+public class RestartingSteps {
+   private int restartingScenario;
+   private int restartingStory;
+
+   @When(I restart scenario)
+   public void restartScenario(){
+   if ( restartingScenario  1 ){
+   restartingScenario++;
+   throw new RestartingScenarioFailure(Restarting 
scenario: +restartingScenario);
+   }
+   }
+
+   @When(I restart story)
+   public void restartStory(){
+   if ( restartingStory  1 ){
+   restartingStory++;
+   throw new RestartingStoryFailure(Restarting story: 
+restartingStory);
+   }
+   }
+   
+}
+
diff --git 
a/examples/core/src/main/java/org/jbehave/examples/core/stories/Restarting.java 
b/examples/core/src/main/java/org/jbehave/examples/core/stories/Restarting.java
new file mode 100644
index 000..cc7bfa0
--- /dev/null
+++ 
b/examples/core/src/main/java/org/jbehave/examples/core/stories/Restarting.java
@@ -0,0 +1,15 @@
+package org.jbehave.examples.core.stories;
+
+import org.jbehave.core.steps.InjectableStepsFactory;
+import org.jbehave.core.steps.InstanceStepsFactory;
+import org.jbehave.examples.core.CoreStory;
+import org.jbehave.examples.core.steps.RestartingSteps;
+
+public class Restarting extends CoreStory {
+
+   @Override
+   public InjectableStepsFactory stepsFactory() {
+   return new InstanceStepsFactory(configuration(), new 
RestartingSteps());
+   }
+
+}
diff --git 
a/examples/core/src/main/java/org/jbehave/examples/core/stories/restarting.story
 
b/examples/core/src/main/java/org/jbehave/examples/core/stories/restarting.story
new file mode 100755
index 000..b4d5a34
--- /dev/null
+++ 
b/examples/core/src/main/java/org/jbehave/examples/core/stories/restarting.story
@@ -0,0 +1,8 @@
+
+Scenario: Restarting scenario
+
+When I restart scenario
+
+Scenario: Restarting story
+
+When I restart story





[jbehave-scm] [scm-core/jbehave-4.x][4/4] JBEHAVE-1053: Support restarting scenario and story in PerformableTree.

2014-11-09 Thread Mauro Talevi
commit 14d9c2749ef2b64c05d92591716dd191d65e2f64
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sun, 9 Nov 2014 10:37:57 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sun, 9 Nov 2014 10:37:57 +0100

JBEHAVE-1053:  Support restarting scenario and story in PerformableTree.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/embedder/PerformableTree.java 
b/jbehave-core/src/main/java/org/jbehave/core/embedder/PerformableTree.java
index a8c87f1..23e4b6f 100644
--- a/jbehave-core/src/main/java/org/jbehave/core/embedder/PerformableTree.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/embedder/PerformableTree.java
@@ -17,6 +17,8 @@ import org.jbehave.core.failures.BatchFailures;
 import org.jbehave.core.failures.FailingUponPendingStep;
 import org.jbehave.core.failures.PendingStepFound;
 import org.jbehave.core.failures.PendingStepsFound;
+import org.jbehave.core.failures.RestartingScenarioFailure;
+import org.jbehave.core.failures.RestartingStoryFailure;
 import org.jbehave.core.failures.UUIDExceptionWrapper;
 import org.jbehave.core.model.ExamplesTable;
 import org.jbehave.core.model.GivenStories;
@@ -356,16 +358,23 @@ public class PerformableTree {
 }
 
 public void perform(RunContext context, Story story) {
+   boolean restartingStory = false;
+
 try {
 performCancellable(context, story);
-} catch (Throwable e) {
+if (context.restartStory()){
+   context.reporter().restartedStory(story, 
context.failure(context.state()));
+   restartingStory = true;
+   perform(context, story);
+}
+} catch (InterruptedException e) {
 if (context.isCancelled(story)) {
 context.reporter().storyCancelled(story, 
context.storyDuration(story));
 context.reporter().afterStory(context.givenStory);
 }
throw new UUIDExceptionWrapper(e);
 } finally {
-if (!context.givenStory()  context.reporter() instanceof 
ConcurrentStoryReporter) {
+if (!context.givenStory()  context.reporter() instanceof 
ConcurrentStoryReporter  !restartingStory ) {
 ((ConcurrentStoryReporter) context.reporter()).invokeDelayed();
 }
 }
@@ -374,6 +383,7 @@ public class PerformableTree {
 private void performCancellable(RunContext context, Story story) throws 
InterruptedException {
 if (context.configuration().storyControls().resetStateBeforeStory()) {
 context.resetState();
+context.resetFailures();
 }
 context.currentPath(story.getPath());
 
@@ -432,6 +442,28 @@ public class PerformableTree {
 resetState();
 }
 
+   public boolean restartScenario() {
+   Throwable cause = failure(state);
+   while (cause != null) {
+   if (cause instanceof RestartingScenarioFailure) {
+   return true;
+   }
+   cause = cause.getCause();
+   }
+   return false;
+   }
+
+   public boolean restartStory() {
+   Throwable cause = failure(state);
+   while (cause != null) {
+   if (cause instanceof RestartingStoryFailure) {
+   return true;
+   }
+   cause = cause.getCause();
+   }
+   return false;
+   }
+
public void currentPath(String path) {
 this.path = path;
 this.reporter = configuration.storyReporter(path);
@@ -761,7 +793,8 @@ public class PerformableTree {
 private boolean allowed;
private NormalPerformableScenario normalPerformableScenario;
 private ListExamplePerformableScenario examplePerformableScenarios = 
new ArrayListExamplePerformableScenario();
-Status status;
+@SuppressWarnings(unused)
+   private Status status;
 
 public PerformableScenario(Scenario scenario, String storyPath) {
 this.scenario = scenario;
@@ -858,6 +891,18 @@ public class PerformableTree {
 public MapString, String getParameters() {
 return parameters;
 }
+
+   protected void performRestartableSteps(RunContext context)
+   throws InterruptedException {
+   boolean restart = true;
+   while (restart) {
+   restart = false;
+   steps.perform(context);
+   if (context.restartScenario()){
+   restart = true;
+   }
+   }
+   }
 }
 
 public static class NormalPerformableScenario extends

[jbehave-dev] [jira] (JBEHAVE-1054) Regression: configuration method inherited from JUnitStories class not being overridden

2014-11-09 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi commented on an issue


















  Re: Regression: configuration method inherited from JUnitStories class not being overridden 










Yes, this is a side effect of 

JBEHAVE-1009
. The ConfigurableEmbedder now uses the configuration() method lazily only if there is no other configuration set.
To override with your instance of Configuration, you can use the #useConfiguration() method in the constructor of the class inheriting from JUnitStories.












   

 Add Comment

























 JBehave /  JBEHAVE-1054



  Regression: configuration method inherited from JUnitStories class not being overridden 







 When creating a JUnitStories class, the overridden configuration method is no longer executed starting in JBehave 3.9.2.   I also tested this with 3.9.3, 3.9.5 and 4.0-beta-11 and the issue persists. Only by changing the dependency version in my POM back to 3.9.1 does the method override correctly again.   I have attached my StoryReporter class, the abs...















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c

[jbehave-scm] [scm-core][1/1] JBEHAVE-1053: Simplification.

2014-11-08 Thread Mauro Talevi
commit ab48e7e56249713879ebb0f735536215992748b6
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Sat, 8 Nov 2014 11:47:02 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Sat, 8 Nov 2014 11:47:02 +0100

JBEHAVE-1053:  Simplification.

diff --git 
a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java 
b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java
index 314587b..fd9af67 100755
--- a/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java
+++ b/jbehave-core/src/main/java/org/jbehave/core/embedder/StoryRunner.java
@@ -50,7 +50,6 @@ public class StoryRunner {
 private ThreadLocalFailureStrategy failureStrategy = new 
ThreadLocalFailureStrategy();
 private ThreadLocalPendingStepStrategy pendingStepStrategy = new 
ThreadLocalPendingStepStrategy();
 private ThreadLocalUUIDExceptionWrapper storyFailure = new 
ThreadLocalUUIDExceptionWrapper();
-private ThreadLocalUUIDExceptionWrapper beforeAfterStoryFailure = new 
ThreadLocalUUIDExceptionWrapper();
 private ThreadLocalStoryReporter reporter = new 
ThreadLocalStoryReporter();
 private ThreadLocalString reporterStoryPath = new ThreadLocalString();
 private ThreadLocalState storiesState = new ThreadLocalState();
@@ -218,12 +217,11 @@ public class StoryRunner {
 }
 
 /**
- * Helper method to determine if the cause of a story failure contains 
{@link RestartingStoryFailure}
- * @param cause - the stacktrace to check for {@link 
RestartingStoryFailure}
+ * Determines if the cause of a story failure is {@link 
RestartingStoryFailure}
+ * @param cause the {@link Throwable} containing the {@link 
RestartingStoryFailure} in its stack trace
  * @return true if found, false otherwise
  */
-public boolean hasRestartingStoryException(Throwable cause)
-{
+   private boolean restartStory(Throwable cause) {
while (cause != null) {
if (cause instanceof RestartingStoryFailure) {
return true;
@@ -248,8 +246,8 @@ public class StoryRunner {
reporter.get().afterStory(context.givenStory);
}

-   // Restart entire story if determined it needs it
-   if (hasRestartingStoryException(e) || 
hasRestartingStoryException(beforeAfterStoryFailure.get())) {
+   // Restart entire story if needed
+   if (restartStory(e)) {
//this is not getting logged when running in 
multi-threaded mode
reporter.get().restartedStory(story, e);
restartingStory = true;
@@ -406,7 +404,6 @@ public class StoryRunner {
 }
 currentStrategy.set(context.configuration().failureStrategy());
 storyFailure.set(null);
-beforeAfterStoryFailure.set(null);
 }
 
 private void runGivenStories(GivenStories givenStories, MapString, 
String parameters, RunContext context) throws Throwable {
@@ -594,21 +591,15 @@ public class StoryRunner {
 }
 
 private final class SomethingHappened implements State {
-UUIDExceptionWrapper scenarioFailure;
+UUIDExceptionWrapper failure;
 
-public SomethingHappened(UUIDExceptionWrapper scenarioFailure) {
-this.scenarioFailure = scenarioFailure;
+public SomethingHappened(UUIDExceptionWrapper failure) {
+this.failure = failure;
 }
 
 public State run(Step step) {
-StepResult result = step.doNotPerform(scenarioFailure);
+StepResult result = step.doNotPerform(failure);
 result.describeTo(reporter.get());
-
-   if (result.getFailure() != null) {
-   //persist failures to see if we need to restart 
the story
-   
beforeAfterStoryFailure.set(result.getFailure());
-   }
-
 return this;
 }
 }
@@ -736,7 +727,7 @@ public class StoryRunner {
 
 public Throwable failure(State state) {
 if (failed(state)) {
-return ((SomethingHappened) state).scenarioFailure.getCause();
+return ((SomethingHappened) state).failure.getCause();
 }
 return null;
 }





[jbehave-scm] [scm-core][2/2] JBEHAVE-1053: Added restarting.story to verify restarting behaviour.

2014-11-07 Thread Mauro Talevi
commit 42f0cf699db8d65caa0845776dd868e12585abca
Author: Mauro Talevi mauro.tal...@aquilonia.org
AuthorDate: Fri, 7 Nov 2014 13:38:19 +0100
Commit: Mauro Talevi mauro.tal...@aquilonia.org
CommitDate: Fri, 7 Nov 2014 13:38:19 +0100

JBEHAVE-1053:  Added restarting.story to verify restarting behaviour.

diff --git 
a/examples/core/src/main/java/org/jbehave/examples/core/CoreStories.java 
b/examples/core/src/main/java/org/jbehave/examples/core/CoreStories.java
index 6086157..b865bb1 100755
--- a/examples/core/src/main/java/org/jbehave/examples/core/CoreStories.java
+++ b/examples/core/src/main/java/org/jbehave/examples/core/CoreStories.java
@@ -48,6 +48,7 @@ import org.jbehave.examples.core.steps.MyContext;
 import org.jbehave.examples.core.steps.NamedParametersSteps;
 import org.jbehave.examples.core.steps.PendingSteps;
 import org.jbehave.examples.core.steps.PriorityMatchingSteps;
+import org.jbehave.examples.core.steps.RestartingSteps;
 import org.jbehave.examples.core.steps.SandpitSteps;
 import org.jbehave.examples.core.steps.SearchSteps;
 import org.jbehave.examples.core.steps.TableSteps;
@@ -116,7 +117,8 @@ public class CoreStories extends JUnitStories {
 return new InstanceStepsFactory(configuration(), new TraderSteps(new 
TradingService()), new AndSteps(),
 new MetaParametrisationSteps(), new CalendarSteps(), new 
PriorityMatchingSteps(), new PendingSteps(),
 new SandpitSteps(), new SearchSteps(), new BeforeAfterSteps(), 
new CompositeSteps(),
-new NamedParametersSteps(), new 
ExamplesTableParametersSteps(), new TableSteps(), new ContextSteps(context));
+new NamedParametersSteps(), new 
ExamplesTableParametersSteps(), new TableSteps(), 
+new ContextSteps(context), new RestartingSteps());
 }
 
 @Override
diff --git 
a/examples/core/src/main/java/org/jbehave/examples/core/steps/RestartingSteps.java
 
b/examples/core/src/main/java/org/jbehave/examples/core/steps/RestartingSteps.java
new file mode 100644
index 000..f6c3f48
--- /dev/null
+++ 
b/examples/core/src/main/java/org/jbehave/examples/core/steps/RestartingSteps.java
@@ -0,0 +1,28 @@
+package org.jbehave.examples.core.steps;
+
+import org.jbehave.core.annotations.When;
+import org.jbehave.core.failures.RestartingScenarioFailure;
+import org.jbehave.core.failures.RestartingStoryFailure;
+
+public class RestartingSteps {
+   private int restartingScenario;
+   private int restartingStory;
+
+   @When(I restart scenario)
+   public void restartScenario(){
+   if ( restartingScenario  1 ){
+   restartingScenario++;
+   throw new RestartingScenarioFailure(Restarting 
scenario: +restartingScenario);
+   }
+   }
+
+   @When(I restart story)
+   public void restartStory(){
+   if ( restartingStory  1 ){
+   restartingStory++;
+   throw new RestartingStoryFailure(Restarting story: 
+restartingStory);
+   }
+   }
+   
+}
+
diff --git 
a/examples/core/src/main/java/org/jbehave/examples/core/stories/Restarting.java 
b/examples/core/src/main/java/org/jbehave/examples/core/stories/Restarting.java
new file mode 100644
index 000..cc7bfa0
--- /dev/null
+++ 
b/examples/core/src/main/java/org/jbehave/examples/core/stories/Restarting.java
@@ -0,0 +1,15 @@
+package org.jbehave.examples.core.stories;
+
+import org.jbehave.core.steps.InjectableStepsFactory;
+import org.jbehave.core.steps.InstanceStepsFactory;
+import org.jbehave.examples.core.CoreStory;
+import org.jbehave.examples.core.steps.RestartingSteps;
+
+public class Restarting extends CoreStory {
+
+   @Override
+   public InjectableStepsFactory stepsFactory() {
+   return new InstanceStepsFactory(configuration(), new 
RestartingSteps());
+   }
+
+}
diff --git 
a/examples/core/src/main/java/org/jbehave/examples/core/stories/restarting.story
 
b/examples/core/src/main/java/org/jbehave/examples/core/stories/restarting.story
new file mode 100755
index 000..b4d5a34
--- /dev/null
+++ 
b/examples/core/src/main/java/org/jbehave/examples/core/stories/restarting.story
@@ -0,0 +1,8 @@
+
+Scenario: Restarting scenario
+
+When I restart scenario
+
+Scenario: Restarting story
+
+When I restart story





[jbehave-dev] [jira] (JBEHAVE-1053) Allow entire story to be restarted

2014-11-07 Thread Mauro Talevi (JIRA)
Title: Message Title










 

 Mauro Talevi updated an issue


















 JBehave /  JBEHAVE-1053



  Allow entire story to be restarted 










Change By:

 Mauro Talevi




Fix Version/s:

 3.9.6












   

 Add Comment






















 This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)




 












-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




  1   2   3   4   5   6   7   8   9   10   >