Re: GivenStories @ the end of execution

2015-10-27 Thread Mauro Talevi

Hi,

there is no such mechanism, but you could:

 * use the Lifecycle to execute steps (not stories) after the execution
   of a scenario (executed after each scenario)
 * have a final scenario which invokes the given stories


On 26/10/2015 08:27, igal epshtein wrote:

Hi,

I'm using a GivenStories for executing Login scenario which is located 
in different story.
I was wondering if there is a way to use something similar in order to 
execute a logout story which is also located in different story than 
one I actually executing.


I know that I can do some tricks with @before/after annotations , but 
the question is if I can execute a "post" story


Thanks
--
You received this message because you are subscribed to the Google 
Groups "JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jbehave-user+unsubscr...@googlegroups.com 
.
To post to this group, send email to jbehave-user@googlegroups.com 
.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/eef87343-a404-4d78-8594-c727be533490%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JBehave 
User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/562E1598.6050305%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Eclipse+Maven+JBehave Project

2015-11-17 Thread Mauro Talevi

All the examples provided by JBehave are Maven based.

Eclipse, IDEA and all major IDEs support Maven.

http://jbehave.org/reference/stable/running-examples.html

On 16/11/2015 06:38, Shiva Tej wrote:

Hi,

Could you please share the  Eclipse+Maven+JBehave sample Project?

Regards,
Shivatej k
--
You received this message because you are subscribed to the Google 
Groups "JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jbehave-user+unsubscr...@googlegroups.com 
.
To post to this group, send email to jbehave-user@googlegroups.com 
.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/405df034-2408-4019-9e37-aaf7e9e5f908%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JBehave 
User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/564BC1B2.3040609%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Custom StepMonitor doesn't work in version 4.xxx

2015-10-04 Thread Mauro Talevi
Please raise a JIRA issue for this: 
http://jbehave.org/how-to-contribute.html


On 03/10/2015 12:28, Irko Kordirko wrote:

I created a custom StepMonitor:
|
privateStepMonitorstp =newNullStepMonitor(){
publicvoidperforming(Stringstep,booleandryRun){
System.err.println("DEBUG - Monitor. Step = "+step);
}
|
and I use it in my configuration:
|
returnnewMostUsefulConfiguration()

.useStepMonitor(stp);
|

On version 3,9,5 it works as expected, the result is like this:
|
Scenario:A scenario withsome pending steps
DEBUG -Monitor.Step=GivenI am a pending step
GivenI am a pending step
DEBUG -Monitor.Step=AndI am still pending step
AndI am still pending step
DEBUG -Monitor.Step=Whena good soul will implement me
Whena good soul will implement me
DEBUG -Monitor.Step=ThenI shall be happy
ThenI shall be happy
|

But on version 4.0.4 it doesn't work, I have got:
|
Scenario:A scenario withsome pending steps
GivenI am a pending step

AndI am still pending step

Whena good soul will implement me

ThenI shall be happy
|


--
You received this message because you are subscribed to the Google 
Groups "JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jbehave-user+unsubscr...@googlegroups.com 
.
To post to this group, send email to jbehave-user@googlegroups.com 
.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/edcb29c4-1be3-450e-bcb3-0d004d528304%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JBehave 
User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/56117E54.10105%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: StoryReporter being executed 3 times ...

2015-12-30 Thread Mauro Talevi
Hi,  thanks for the example.   It's a weird one and it requires some 
debugging.


On 29/12/2015 15:12, igal epshtein wrote:
I've upload some simple example, pls see that the Before/After stories 
is being executed several times , same has happens with the rest 
methods I'm implementing.


/Processing system properties {}/
/Using controls 
EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=false,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeouts=60,threads=1,failOnStoryTimeout=false]/

/
/
/(BeforeStories)/
/before -- BeforeStories/
/before -- BeforeStories/
/before -- BeforeStories/
/
/
/after -- /
/after -- /
/after -- /
/
/
/(AfterStories)/
/before -- AfterStories/
/before -- AfterStories/
/before -- AfterStories/
/
/
/after -- /
/after -- /
/after -- /
/Generating reports view to 
'/Users/ie54553/Desktop/JbehaveExample/target/jbehave' using formats 
'[console, txt, console, mystoryreporter, console, txt, console, 
mystoryreporter, console, txt, console, mystoryreporter]' and view 
properties '{navigator=ftl/jbehave-navigator.ftl, 
views=ftl/jbehave-views.ftl, reports=ftl/jbehave-reports.ftl, 
nonDecorated=ftl/jbehave-report-non-decorated.ftl, 
decorated=ftl/jbehave-report-decorated.ftl, maps=ftl/jbehave-maps.ftl}'/
/Disconnected from the target VM, address: '127.0.0.1:49948', 
transport: 'socket'/
/Reports view generated with 0 stories (of which 0 pending) containing 
0 scenarios (of which 0 pending)/

/
/
/Process finished with exit code 0/


On Tuesday, December 29, 2015 at 2:30:41 PM UTC+2, mauro.talevi wrote:

Difficult to help you without a working example that reproduces
the problem.

Can you please provide this working example project please?

On 29/12/2015 09:54, igal epshtein wrote:

Hi,
I'm implementing my own Reporter by extending StoryReporter.

The thing is , each override method being executed 3 times (one
after another) before the the execution moves to next method in
the execution flow

For example : *beforeStory (3 executions) ---> beforeScenario (3
executions) ---> afterScenario (3 executions)*
*
*
*
*
The running file looks like :

/public abstract class GenericScenario extends JUnitStories {
/
/  //set system time property in order to be appended to the log
file/
/  static {/
/  SimpleDateFormat dateFormat = new SimpleDateFormat("dd MMM
 - HH:mm:ss");/
/  System.setProperty("systemDate" , dateFormat.format(new
Date()));/
/  }/
/
/
/  public GenericScenario(){/
/  Embedder embedder = configuredEmbedder();/

/embedder.embedderControls().useStoryTimeouts(PropertiesSingelton.getInstance().getProperty("timeout"));/
/  embedder.useTimeoutParsers(new MyParser());/
/  embedder.configuration().useParameterConverters(/
/  configuration().parameterConverters().addConverters(/
/  new ParameterConverters.EnumConverter()));/
/
/
/  //adding skip support/
/  configuredEmbedder().useMetaFilters(Arrays.asList("-skip"));/
/  }/
/  public class MyParser implements StoryTimeouts.TimeoutParser{/
/  public boolean isValid(String timeout) {/
/  return timeout.matches("(\\d+)sec");/
/  }/
/
/
/  public long asSeconds(String timeout) {/
/  return
Long.parseLong(StringUtils.substringBefore(timeout, "sec"));/
/  }/
/  }/
/
/
/  @Override/
/  public Configuration configuration(){/
/  return new MostUsefulConfiguration().useStoryLoader(/
/  new LoadFromClasspath(this.getClass()))/
/ 
.useStoryReporterBuilder(storyReporter.withDefaultFormats()/

/  .withFormats(Format.TXT , Format.CONSOLE )/
/  .withReporters(new MyStoryReporter()))/
/  .useStoryControls(new
StoryControls().doSkipScenariosAfterFailure(true));/
/  }/
/
/
/
/
/  StoryReporterBuilder storyReporter = new StoryReporterBuilder() {/
/  /**/
/   * The builder is configured to build with the/
/   * StoryReporterBuilder.Format.STATS as default format. To
change/
/   * the default formats the user can override the method:/
/   *//
/  @Override/
/  public StoryReporterBuilder withDefaultFormats() {/
/  return withFormats(Format.CONSOLE);/
/  }/
/  };/
/
/
/  @Override/
/  public InjectableStepsFactory stepsFactory(){/
/  return new InstanceStepsFactory(configuration(), new
classes  );/
/  }/
/
/
/  @Override/
/  protected abstract List storyPaths();/
/}/


Any idea how to overcome the issue ?

Thanks
-- 
You received this message 

Re: StoryReporter being executed 3 times ...

2015-12-29 Thread Mauro Talevi
Difficult to help you without a working example that reproduces the 
problem.


Can you please provide this working example project please?

On 29/12/2015 09:54, igal epshtein wrote:

Hi,
I'm implementing my own Reporter by extending StoryReporter.

The thing is , each override method being executed 3 times (one after 
another) before the the execution moves to next method in the 
execution flow


For example : *beforeStory (3 executions) ---> beforeScenario (3 
executions) ---> afterScenario (3 executions)*

*
*
*
*
The running file looks like :

/public abstract class GenericScenario extends JUnitStories {
/
///set system time property in order to be appended to the log file/
/static {/
/SimpleDateFormat dateFormat = new SimpleDateFormat("dd MMM  - 
HH:mm:ss");/

/System.setProperty("systemDate" , dateFormat.format(new Date()));/
/}/
/
/
/public GenericScenario(){/
/Embedder embedder = configuredEmbedder();/
/embedder.embedderControls().useStoryTimeouts(PropertiesSingelton.getInstance().getProperty("timeout"));/
/embedder.useTimeoutParsers(new MyParser());/
/embedder.configuration().useParameterConverters(/
/  configuration().parameterConverters().addConverters(/
/  new ParameterConverters.EnumConverter()));/
/
/
///adding skip support/
/configuredEmbedder().useMetaFilters(Arrays.asList("-skip"));/
/}/
/public class MyParser implements StoryTimeouts.TimeoutParser{/
/public boolean isValid(String timeout) {/
/  return timeout.matches("(\\d+)sec");/
/}/
/
/
/public long asSeconds(String timeout) {/
/  return Long.parseLong(StringUtils.substringBefore(timeout, "sec"));/
/}/
/}/
/
/
/@Override/
/public Configuration configuration(){/
/return new MostUsefulConfiguration().useStoryLoader(/
/  new LoadFromClasspath(this.getClass()))/
/.useStoryReporterBuilder(storyReporter.withDefaultFormats()/
/  .withFormats(Format.TXT , Format.CONSOLE )/
/  .withReporters(new MyStoryReporter()))/
/  .useStoryControls(new 
StoryControls().doSkipScenariosAfterFailure(true));/

/}/
/
/
/
/
/StoryReporterBuilder storyReporter = new StoryReporterBuilder() {/
//**/
/ * The builder is configured to build with the/
/ * StoryReporterBuilder.Format.STATS as default format. To 
change/

/ * the default formats the user can override the method:/
/ *//
/@Override/
/public StoryReporterBuilder withDefaultFormats() {/
/  return withFormats(Format.CONSOLE);/
/}/
/};/
/
/
/@Override/
/public InjectableStepsFactory stepsFactory(){/
/return new InstanceStepsFactory(configuration(), new classes  );/
/}/
/
/
/@Override/
/protected abstract List storyPaths();/
/}/


Any idea how to overcome the issue ?

Thanks
--
You received this message because you are subscribed to the Google 
Groups "JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jbehave-user+unsubscr...@googlegroups.com 
.
To post to this group, send email to jbehave-user@googlegroups.com 
.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/1c86948b-c814-43cd-8bfb-809d3eeda697%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JBehave 
User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/56827CED.40001%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Scenario level declared meta data do not appear in generated XML report

2015-11-19 Thread Mauro Talevi

Hi Damien,

welcome to the list!   Could you please provide a fully working example 
reproducing this behaviour?


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

Cheers

On 18/11/2015 19:11, Damien Grandemange wrote:

Hi,
this is my first post, so i may quickly myself : Damien, french guy, 
using JBehave since a few month along Thucydides.

My config : JBehave 4.0.4, Thucydides 0.9.275

We would like to work with meta-infos, not only at Story level, but 
also at Scenario level, not for filtering concerns, but rather to see 
those meta infos be reported in the JBehave reports (and beyond that, 
be parsed by Thucydides).
Works like a charm when the meta-data is declared at the Story level. 
But when it comes to the Scenario level... Well, the meta infos simply 
do not appear in the XML report.


Considering the following scenario where :
1) a meta info is declared at the Story level : @tag 
requirements:R_FONC_TOTA
2) another meta info is declared at the Scenario level : @tags 
blurp:R_FONC_TOTO


Narrative:
In order to communicate effectively to the business some functionality
As a development team
I want to use Behaviour-Driven Development

Meta:
@tag requirements:R_FONC_TOTA

Scenario: some dummy scenario
Meta:
@tags blurp:R_FONC_TOTO
Given I have some step that implicitly requires meta params
When noaction
Then void


Then, the generated XML reports shows :

path="stories/R_FONC_HERCULE_01/R_FONC_HERCULE_01_01/001_login_sans_SUA.story" 
title="">





  communicate effectively to the 
business some functionality

  development team
  use Behaviour-Driven Development

Meta:
@tag requirements:R_FONC_TOTA


Given I have some step that implicitly 
requires meta params

When noaction
Then void




Well, there is no sign of my 'scenario level' meta info here (as far 
as i understand it , a  child element is expected under the 
 element).


I 've dived into the code and found that the StoryReporter interface 
provide a scenariometa() method.
The thing is : StoryReporter.scenariometa() method is invoked by the 
now deprecated org.jbehave.core.embedder.StoryRunner in the 
runCancellable() method (see line 316). StoryRunner seems deprecated, 
and the PerformableTree is now preferred and used.
But looking at this PerformableTree class, and especially on the 
PerformableTree.PerformableScenario.perform(RunContext context) method 
(see line 866) , there is no more call to the 
StoryReporter.scenariometa(), as it was done in the StoryRunner.


Well, i may be wrong with all this.
Any help would be appreciated.
--
You received this message because you are subscribed to the Google 
Groups "JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jbehave-user+unsubscr...@googlegroups.com 
.
To post to this group, send email to jbehave-user@googlegroups.com 
.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/81b54d49-efe6-4b52-9f2c-b642af5366a1%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JBehave 
User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/564D8F1E.6040302%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Rerun failed test with Jbehave and WebDriver, Java

2016-03-08 Thread Mauro Talevi

You can throw a RestartingStoryFailure or RestartingScenarioFailure.

On 08/03/2016 19:06, Olena Shyshkova wrote:
I want to rerun failed end-to-end tests. I'm using Jbehave and 
WebDriver, Java. Currently I'm using Maven but going to migrate to 
Gradle. Is there any solution?

--
You received this message because you are subscribed to the Google 
Groups "JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jbehave-user+unsubscr...@googlegroups.com 
.
To post to this group, send email to jbehave-user@googlegroups.com 
.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/f99ba951-5e95-424b-99ec-f104112d46e3%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JBehave 
User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/56DF551E.2060705%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Add new test result status to report

2016-03-29 Thread Mauro Talevi

Hi Olena,

this behaviour is currently not supported. But you can retrieve the 
results statistics for each run and keep track of the statistics.   You 
could then define a new report output for these statistics.


Feel free to create a new JIRA issue and attach your contribution!

Cheers

On 28/03/2016 22:37, Olena Shyshkova wrote:

Hi,

I want to add new test result status to my report.
I'm going to rerun failed tests 3 times and if it failed 3 times then 
set status "Failed" but if test failed ones and passed next time I 
want to set status "Flaky" to track statistic of flaky tests.

Is there any way to do it?
--
You received this message because you are subscribed to the Google 
Groups "JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jbehave-user+unsubscr...@googlegroups.com 
.
To post to this group, send email to jbehave-user@googlegroups.com 
.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/8ce871eb-210b-4721-a1c3-970debaffc29%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JBehave 
User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/56FA51E9.80402%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: story examples

2016-05-23 Thread Mauro Talevi
Hi, 

currently, you can only parametrise given stories by examples

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


> On 23 May 2016, at 07:45, Tibor B  wrote:
> 
> Hello,
> 
> I know it is possible to use Examples section to run the same scenario with 
> multiple parameters. However I didn't find the way to run whole story 
> multiple times with different parameters. Is it possible to parametrise whole 
> story?
> 
> Thanks
> 
> Tibor
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/d3450da7-6718-49c6-8ad8-e851210148bf%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/0FBC9C7C-BBB4-4E1D-9ADA-9A5DC102041F%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Explicit parameters from Context

2016-05-18 Thread Mauro Talevi
Hi, 

The context is a user defined object so it is not known to JBehave.

If you want to inject parameters in methods you could use the @Named 
annotation, specifying the name-value pairs in the Meta: section.

That said, it's not clear why you'd want to do this, as the values of the 
Context will be already accessible without injection in the signature.

Could you explain your usecase better?

> On 17 May 2016, at 20:05, Laura Ruiz  wrote:
> 
> Hi there,
> 
> I'm currently working with JBehave and we implemented a Context object where 
> we store data that we need to share between different steps.
> 
> Now, we are considering some improvements on this, like explicitly passing 
> this data to the methods that implement these steps.
> 
> Imagine you have a first step which will create a user and store its 
> credentials into the Context.
> These credentials are needed in the second step. We would like to have some 
> kind of annotation that allowed us to implement our step like this:
> 
> @When("...some step definition which includes some $parameterFromStep")
> public void someMethod(String parameterFromStep, 
> @FromContext("userCredentials") String userCredentials) { ... }
> 
> 
> We tried to implement some logic that would take the parameter from the 
> Context and pass it to the method. The problem with this is that JBehave 
> doesn't find a method matching this step, as the method has the wrong number 
> of parameters (it expects 1 but the method has 2).
> 
> So my question is: Is there any way of doing this with the current 
> implementation? Is there any way to force JBehave, for example, ignore the 
> parameters that are annotated?
> 
> I would really appreciate some guidance on this. Let me know if something is 
> something needs extra clarifications, please.
> 
> Thank you guys.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com.
> To post to this group, send email to jbehave-user@googlegroups.com.
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/0fae230a-b5f6-4dc8-95ff-d3f4bb500ad1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/893CB175-7C99-4E67-B557-9C78294B57ED%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: beforeStory method from StoryReporter executed before @BeforeStories

2016-08-11 Thread Mauro Talevi
Hi

thanks for the sample project.The issue you are seeing is a consequence of 
the fact that there are two special “stories” called (BeforeStories and 
AfterStories - used to report issues in the execution of the @BeforeStories and 
@AfterStories annotated steps).If you disregard these two special 
“stories” - the rest of the reporting works as expected.   To determine which 
story to ignore you can use the Story injected in the beforeStory() method and 
check the getPath() method: 

public void beforeStory(Story story, boolean givenStory) {
if ( story.getPath().matches("(Before|After)Stories") ) {
System.out.println("ignore me");
return;
}
System.out.println("==CustomReporter before Story===");
}

Cheers
 
> On 8 Aug 2016, at 20:20, jms2m...@gmail.com wrote:
> 
> 
> Hi,
> 
> 
> Attached the sample project for your reference.
> 
> Thank you.
> 
> On Monday, August 8, 2016 at 10:45:49 PM UTC+5:30, mauro.talevi wrote:
> Yes, the beforeStory() event will be invoked for each story and after the 
> @BeforeStories annotated method. 
> 
> But if you don’t share your project which reproduces your behaviour you can’t 
> be helped. 
> 
> Please ensure that it is a self-contained (and as simple as possible) Maven 
> project.   
>   
>> On 8 Aug 2016, at 09:30, jms2...@gmail.com  wrote:
>> 
>> Actually its working like below
>> 
>> 
>> (BeforeStories)
>> ==In CustomStoryReporter beforeStory=
>> ==In Jbehave @BeforeStories=
>> ==In CustomStoryReporter aftertory=
>> 
>> Running story Login_Story.story
>> Login story
>> (Login_Story.story)
>> ==In CustomStoryReporter beforeStory=
>> ==In CustomStoryReporter aftertory=
>> 
>> (AfterStories)
>> ==In CustomStoryReporter beforeStory=
>> ==In Jbehave @AfterStories=
>> ==In CustomStoryReporter aftertory=
>> 
>> This is the way it should work?
>> 
>> On Sunday, August 7, 2016 at 6:10:11 PM UTC-12, jms2...@gmail.com 
>>  wrote:
>> Sorry I am not getting what you are saying. I thought that beforeStory 
>> method in the cistomreporter class should execute after @ BeforeStories 
>> annotation. But it is executed before the @BeforeStories annotation. Please 
>> clarify me what's the exact behaviour or life cycle of beforeStory
>>  
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "JBehave User" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jbehave-user...@googlegroups.com .
>> To post to this group, send email to jbehav...@googlegroups.com 
>> .
>> To view this discussion on the web, visit 
>> https://groups.google.com/d/msgid/jbehave-user/491b5ed9-10dd-4aff-bcc7-640bb0755542%40googlegroups.com
>>  
>> .
>> For more options, visit https://groups.google.com/d/optout 
>> .
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/0b257df6-b460-43e6-9188-3a6b0207089c%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/3D035031-5B6B-4BD3-9054-116D2421AB04%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: beforeStory method from StoryReporter executed before @BeforeStories

2016-08-08 Thread Mauro Talevi
Yes, the beforeStory() event will be invoked for each story and after the 
@BeforeStories annotated method. 

But if you don’t share your project which reproduces your behaviour you can’t 
be helped. 

Please ensure that it is a self-contained (and as simple as possible) Maven 
project.   
  
> On 8 Aug 2016, at 09:30, jms2m...@gmail.com wrote:
> 
> Actually its working like below
> 
> 
> (BeforeStories)
> ==In CustomStoryReporter beforeStory=
> ==In Jbehave @BeforeStories=
> ==In CustomStoryReporter aftertory=
> 
> Running story Login_Story.story
> Login story
> (Login_Story.story)
> ==In CustomStoryReporter beforeStory=
> ==In CustomStoryReporter aftertory=
> 
> (AfterStories)
> ==In CustomStoryReporter beforeStory=
> ==In Jbehave @AfterStories=
> ==In CustomStoryReporter aftertory=
> 
> This is the way it should work?
> 
> On Sunday, August 7, 2016 at 6:10:11 PM UTC-12, jms2...@gmail.com wrote:
> Sorry I am not getting what you are saying. I thought that beforeStory method 
> in the cistomreporter class should execute after @ BeforeStories annotation. 
> But it is executed before the @BeforeStories annotation. Please clarify me 
> what's the exact behaviour or life cycle of beforeStory
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/491b5ed9-10dd-4aff-bcc7-640bb0755542%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/90A9E876-ABF3-4BA1-8FCB-ABE240AC97FF%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: beforeStory method from StoryReporter executed before @BeforeStories

2016-08-07 Thread Mauro Talevi
BeforeStories events are reported in a separate file from the other 
story-specific reports.  

But why are you getting the NPE?  

> On 7 Aug 2016, at 14:22, jms2m...@gmail.com wrote:
> 
> Yes I did in the configuration part only.I created the custom reporter and 
> added ib the cobfiguration part. My question is before story method which is 
> implemented from StoryReporter executed before the @BeforeStories , is this 
> right behaviour?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com.
> To post to this group, send an email to jbehave-user@googlegroups.com.
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/b9a3bcd9-f185-489d-8745-916df0a4b48e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/09FDE0EA-75B0-41B7-B781-58D98564048D%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Expected Release date for 4.1 version

2016-11-14 Thread Mauro Talevi
Hi Rafa, 

I’d been trying to get the release to work with mvn 3, overcoming the problem 
of the Jenkins repo:

https://issues.jenkins-ci.org/browse/JENKINS-13637 


I’ve now sorted out the issue by setting up a local Nexus instance for the 
release. 

Still to iron out some permission issues on the deployment side but we should 
finally see 4.1 this week. 

Thanks for patience!  Cheers

> On 14 Nov 2016, at 18:14, Rafael Jimenez  wrote:
> 
> Hi Mauro,
> 
> Is there any expected release date for 4.1 version? I don't see any pending 
> ticket in JIRA.
> 
> 
> Best Regards,
> 
> Rafa.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/a9a3d679-24ad-4345-9b58-51f9aa1ebc8d%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/DE0979C7-8F7E-4589-A3FC-A5A80A59FE6F%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: WebDriverScreenshotOnFailure is failing

2017-06-24 Thread Mauro Talevi
This typically means that there was an issue with the underlying browser.   Try 
killing all instances of browser (e.g. killall firefox) and run again. 

> On 23 Jun 2017, at 13:51, shyamkumarraju kandimalla 
>  wrote:
> 
> Hi All,
> 
> I am trying to execute my webdriver tests using Jbehave BDD.
> 
> I have an parameterized story file which contains Examples like below :
> 
> Examples:
> |username|lastname   |email  |phone   
>   |company|errormsg |
> |Test|Test   |t...@gmail.com 
> |9966004535|SDET   |Please enter requirement |
> |Test2|Test2   |te...@gmail.com 
> |9966004535|SDET   |Please enter requirements |
> 
> 
> In second set data it will fail because of assertion error and  it has to 
> take the screenshot. Sometimes it is working but sometimes its failing below 
> is the error:
> 
> INFO [pool-1-thread-1] (MyStoryReporter.java:129) - Then I should see error 
> message '$errormsg' >> Failed org.jbehave.core.failures.UUIDExceptionWrapper: 
> Then I should see error message '$errormsg'
> Screenshot of page '[unknown page title]. Will try again. Cause: WebDriver 
> has not been found for this thread.
> Please verify you are using the correct WebDriverProvider, with the 
> appropriate credentials if using remote access, e.g. to SauceLabs: 
> -DSAUCE_USERNAME=xx -DSAUCE_ACCESS_KEY=xxx----xxx 
> Screenshot of page '[unknown page title]' has **NOT** been saved to 
> 'D:\SDET\jbehave-test\target\jbehave/screenshots/failed-scenario-383f714e-f944-4dda-afa8-3eaa5a8ba859.png'
>  because error 'WebDriver has not been found for this thread.
> Please verify you are using the correct WebDriverProvider, with the 
> appropriate credentials if using remote access, e.g. to SauceLabs: 
> -DSAUCE_USERNAME=xx -DSAUCE_ACCESS_KEY=xxx----xxx ' 
> encountered. Stack trace follows:
> org.jbehave.web.selenium.DelegatingWebDriverProvider$DelegateWebDriverNotFound:
>  WebDriver has not been found for this thread.
> Please verify you are using the correct WebDriverProvider, with the 
> appropriate credentials if using remote access, e.g. to SauceLabs: 
> -DSAUCE_USERNAME=xx -DSAUCE_ACCESS_KEY=xxx----xxx 
>  at 
> org.jbehave.web.selenium.DelegatingWebDriverProvider.get(DelegatingWebDriverProvider.java:24)
>  at 
> org.jbehave.web.selenium.DelegatingWebDriverProvider.saveScreenshotTo(DelegatingWebDriverProvider.java:35)
>  at 
> com.qe.test.jbehave.providers.LocalWebDriverProvider.saveScreenshotTo(LocalWebDriverProvider.java:26)
>  at 
> org.jbehave.web.selenium.WebDriverScreenshotOnFailure.afterScenarioFailure(WebDriverScreenshotOnFailure.java:56)
>  at 
> org.jbehave.web.selenium.WebDriverScreenshotOnFailure.afterScenarioWithExamplesFailure(WebDriverScreenshotOnFailure.java:40)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:606)
>  at 
> org.jbehave.core.steps.StepCreator$MethodInvoker.invoke(StepCreator.java:805)
>  at 
> org.jbehave.core.steps.StepCreator$BeforeOrAfterStep.perform(StepCreator.java:491)
>  at 
> org.jbehave.core.steps.StepCreator$UponFailureStep.doNotPerform(StepCreator.java:560)
>  at 
> org.jbehave.core.embedder.PerformableTree$SomethingHappened.run(PerformableTree.java:372)
>  at 
> org.jbehave.core.embedder.PerformableTree$PerformableSteps.perform(PerformableTree.java:1072)
>  at 
> org.jbehave.core.embedder.PerformableTree$ExamplePerformableScenario.perform(PerformableTree.java:1012)
>  at 
> org.jbehave.core.embedder.PerformableTree$PerformableScenario.perform(PerformableTree.java:883)
>  at 
> org.jbehave.core.embedder.PerformableTree$PerformableStory.performScenarios(PerformableTree.java:811)
>  at 
> org.jbehave.core.embedder.PerformableTree$PerformableStory.perform(PerformableTree.java:784)
>  at 
> org.jbehave.core.embedder.PerformableTree.performCancellable(PerformableTree.java:416)
>  at 
> org.jbehave.core.embedder.PerformableTree.perform(PerformableTree.java:387)
>  at 
> org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:291)
>  at 
> org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:265)
>  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  at java.lang.Thread.run(Thread.java:724)
> 
> I have PerstoryWebDriverSteps class where i am handling driver 

Re: Commented line in scenario is reported as skipped test

2017-05-29 Thread Mauro Talevi
We could make it a configurable feature.   

Please raise a JIRA issue for this.

> On 4 Apr 2017, at 09:49, Hannes Niederhausen  wrote:
> 
> Hi,
> 
> We have a lot of jbehave tests and use jenkins to run them. If we use the !-- 
> lines they are reported as skipped tests. This is weird and also confusing 
> for the outsiders to understand why skiped tests are a good thing.
> 
> So is there a way to tell jbehave just to ignore those lines as I would 
> expect it to do?
> 
> Thanks in advance
> Hannes
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/124544d7-e8d8-4395-872d-fc0da7bbf053%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/BFB9C9B6-BE95-4C43-AB29-1D4C1B7F8782%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Can JBehave be used for testing a batch processing system?

2017-08-29 Thread Mauro Talevi
Hi Ken, 

BDD can be used to verify any system’s behaviour that can be automated. 

The tricky bit is to describe the behaviour in a way that is intelligible from 
a business point of view (big files aren’t as you’ve noted).You may try to 
autogenerate the input files based on templates with the relevant scenario 
values being exposes in steps or tables.  

As for batch-oriented systems, BDD can surely be of help but you need to design 
the scenarios to ensure the execution of the required transactions.If you 
use multi-threading you need to make sure that all the threads are complete 
before the results are verified.   Typically this can be realised easily with a 
single step, e.g. 

When all transactions are completed

Please note that each scenario is meant as a self-contained use-case so you 
should not have one scenario rely on the the results obtained from other 
scenarios. You can use GivenStories or other Before steps to ensure the 
state of the system before a scenario or story. 

Cheers

> On 17 Aug 2017, at 03:41, Ken Van Camp  wrote:
> 
> I am new to JBehave, but very familiar with BDD concepts and would like to 
> try to follow them on a new batch-oriented system we are starting development 
> on. I'm on the development side, but our "QA team" is responsible for all 
> automated testing (yeah I know right away that's a contradiction wrt BDD). 
> They are experienced in JBehave but they are really only trying to use it as 
> an automated testing tool, and I'm trying to convince them that the natural 
> language features allow for much more. (Since we are developing a 
> batch-oriented system, with files as input and files as output, they want to 
> write one JBehave scenario which takes their big input file, processes it, 
> then compares the output files against expectations. But the scenarios are 
> therefore not human-readable, so it seems we are getting very little benefit 
> from using JBehave.)
> 
> Does anyone have experience in testing batch-oriented systems in JBehave? It 
> seems like tests normally execute sequentially, but this poses a problem for 
> a batch system that is not designed for good performance in processing a 
> single transaction. Therefore, I think we should be building up a "batch" of 
> small tests in which each scenario generates a transaction then all the 
> transactions are pulled together into a single input file. The input file is 
> processed, then the results are gathered. We have a single unique key on each 
> transaction so it is easy to match up results to inputs, and compare expected 
> vs. actual values. So now we have to go back to our original scenarios to 
> compare the "THEN" clauses on each one and report results.
> 
> Can it work in JBehave? Or is there a better way to do this? Thanks.
> Ken
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/45765ed9-fab0-4440-890a-1a38bf73fb7f%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/93865232-A353-40F7-87AA-26CC6109C5A5%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: JBehave and version of guava library

2017-08-26 Thread Mauro Talevi
Sure, no problem.  Please raise a JIRA issue for this.

> On 26 Aug 2017, at 07:59, Irko Krokodilko  wrote:
> 
> 
> 
> W dniu piątek, 25 sierpnia 2017 23:55:06 UTC+2 użytkownik Irko Krokodilko 
> napisał:
> Hi,
> 
> Are there amy plans to upgrade a version of guava library in JBehave ?
> 
> We are trying to update Selenium/Webdriver to a latest version 3.5 in our 
> project, but we hit a problem with guava library.
> Selenium beginning from version 3.2 or 3.3 depends on guava version 21.0
> JBehave 4.1.1 currently depends on version 19.0 of guava and uses some of 
> it's features that were deprecated and actually are removed from guava.
> 
> One example I've found is MoreExecutors.sameThreadExecutor(); 
> 
> import java.util.concurrent.ExecutorService;
> 
> 
> import org.jbehave.core.embedder.EmbedderControls;
> 
> 
> import com.google.common.util.concurrent.MoreExecutors;
> 
> 
> /**
>  *  Creates instances of {@link MoreExecutors#sameThreadExecutor()}.
>  */
> public class SameThreadExecutors implements ExecutorServiceFactory {
> 
> 
> public ExecutorService create(EmbedderControls controls) {
> return MoreExecutors.sameThreadExecutor(); // < this function was 
> removed from guava in version 20.0.
> }
> 
> 
> }
> 
> 
> = EDIT =
> 
> I've created a pull request for this issue: 
> https://github.com/jbehave/jbehave-core/pull/148
> JIRA link: https://jbehave.atlassian.net/browse/JBEHAVE-1239
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/77ce6045-3c45-496e-9d3b-736a247483b7%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/16946987-FBC9-4A0B-BD61-3D297D39FA2A%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: When will a new version of JBehave be released ?

2017-10-12 Thread Mauro Talevi
Hi Valery, 

version 4.1.2 has been finally released.   Thanks for your patience. 

I’ve moved one issue to 4.1.3: 

https://jbehave.atlassian.net/browse/JBEHAVE-1138 


I’d like to get this one out quickly but we should devise a better example to 
verify the behaviour. 

Could you please share how you test it? 

Thanks

> On 11 Oct 2017, at 08:35, Valery Yatsynovich  
> wrote:
> 
> Hi Mauro,
> 
> It's been a month, but new version is not released yet. Also the overall 
> activity on github project is very low. 
> Mauro, do you need help with some tasks/actions?
> 
> - Valery
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/6a18786c-d5d4-4c08-8561-f2fdfdac3949%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/A539CBDB-0F51-4F06-9DF2-16CF1FC1A6A4%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Getting error as pending steps

2017-12-10 Thread Mauro Talevi
What have you posted?  

> On 29 Nov 2017, at 17:34, Maganti Suryanarayana murthy  
> wrote:
> 
> Posted in stack overflow. Could anyone sort out the issue ?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/e694a0f2-9ac8-43c9-b7c7-0588c7d3a278%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/2F15F33A-293C-4C09-87D7-D4B4E4F300F5%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing "Examples" Data at Step Level

2018-02-12 Thread Mauro Talevi
Hi,

not really sure what you mean.   There are several ways to parametrise the 
scenarios: 

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


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


It’d be easier if you can provide a use case?

Thanks

> On 12 Feb 2018, at 11:18, neha.zen...@gmail.com wrote:
> 
> Hi,
> 
> I need to access data given under "Examples" keyword ( Scenario level) at 
> each step of the scenario as an argument . Any way to achieve the same ? 
> Thanks in advance ,
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/ce2a5182-dd66-45c0-9369-a212828179e4%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/3CD0F6B4-D206-480D-BF8F-6A2200556B5F%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Jbehave story report is not showing the time in report i.e., the Duration is shown as 00:00:00.000.

2018-02-22 Thread Mauro Talevi
You need to provide a sample project that reproduces the issue for us to help 
you.

> On 21 Feb 2018, at 16:39, Maganti Suryanarayana murthy  
> wrote:
> 
> Any help on this 
> ?
> 
> On Tuesday, February 20, 2018 at 10:16:58 AM UTC-6, Maganti Suryanarayana 
> murthy wrote:
> Any one is facing above issue ?
> 
> On Tuesday, February 20, 2018 at 9:42:28 AM UTC-6, Maganti Suryanarayana 
> murthy wrote:
> Jbehave story report is not showing the time in report i.e., the Duration is 
> shown as 00:00:00.000. I am using gradle as a build tool. 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/6376be18-29ad-444f-9670-79a4a6eae694%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/A5A330DC-C18D-4058-941A-4153F3A1BD6C%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Jbehave story report is not showing the time in report i.e., the Duration is shown as 00:00:00.000.

2018-02-23 Thread Mauro Talevi
Please package all this in a downloadable zip that can be opened and run.  
Don't forget a readme with tool versions etc 

> On 23 Feb 2018, at 18:32, Maganti Suryanarayana murthy <suryai...@gmail.com> 
> wrote:
> 
> Hi Mauro Talevi, 
> 
> I have used gradle as a build file and please find the code base that i am 
> using. I am pasing build.gradle file and apptechJbehaveStories.java
> 
> Build.gradle:
> 
> def buildNumber = System.getProperty('buildNumber') ?: '0'
> def buildVersion = '1.0.0-' + buildNumber
> 
> version = buildVersion
> 
> apply plugin: 'groovy'
> apply plugin: 'java'
> apply plugin: 'maven'
> 
> 
> repositories {
> mavenCentral()
>}
> 
> configurations {
> jbehave
> }
> 
> dependencies {
> testCompile group: 'junit', name: 'junit', version: '4.11'
> compile(group: 'org.jbehave.web', name: 'jbehave-web-selenium', 
> version:'4.0-beta-1') {
> exclude(module: 'selenium-remote-control')
> exclude(module: 'selenium-java')
> exclude(module: 'jbehave-core')
> }
> compile 'org.springframework:spring-webmvc:5.0.2.RELEASE'
> compile 'org.jbehave.site:jbehave-site-resources:3.3.1'
> compile 'org.jbehave:jbehave-spring:4.1.3'
> compile 'org.jbehave:jbehave-core:4.1.3'
> compile 'log4j:log4j:1.2.16'
> compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: 
> '3.7.1'
> compile group: 'commons-collections', name: 'commons-collections', 
> version: '3.2.1'
> testCompile group: 'org.jbehave', name: 'jbehave-core', version: '4.1.3'
> compile 'org.jbehave.site:jbehave-site-resources:3.3.1:@zip'
> }
> 
> /** userDefined task to copy the srories from /src/main/stories into 
> build/classes/test/stories*/
> task copyStories(type: Copy) {
> from 'src/main/resources' into "${buildDir}/classes/test"
> from 'src/main/stories' into "${buildDir}/classes/test/stories"
> }
> 
> 
> task copyJbehaveStyle(type: Copy) {
> from(zipTree(jarPath("jbehave-core"))) {
> include "style/*"
> }
> into("${buildDir}/classes/jbehave/view")
> }
> 
> task copyJbehaveUtilities(type: Copy) {
> from(zipTree(jarPath("jbehave-site-resources"))) {
> include "js/**/*"
> include "style/**/*"
> include "images/*"
> }
> into("${buildDir}/classes/jbehave/view")
> }
> 
> def jarPath(String jarName) {
> configurations.testCompile.find({ it.name.startsWith(jarName) 
> }).absolutePath
> }
> 
> 
> /** to specify the source for java and resources for test task, by default 
> this is refered to src/test folder in gradle and maven*/
> sourceSets {
> test {
> java {
> srcDir "src/main/java"
> }
> resources {
> srcDir "src/main/resources"
> }
> }
> }
> 
> test {
> systemProperty "metaFilters", System.getProperty("metaFilters", "")
> doFirst {
> copy {
> from(zipTree(jarPath("jbehave-core"))) {
> include "style/*"
> }
> into("build/reports/jbehave/view")
> 
> }
> copy {
> from(zipTree(jarPath("jbehave-site-resources"))) {
> include "js/**/*"
> include "style/**/*"
> include "images/*"
> }
> into("build/reports/jbehave/view")
> }
> }
> systemProperties System.getProperties()
> dependsOn([clean,copyStories,copyJbehaveUtilities,copyJbehaveStyle])
> }
> 
> 
> apptechJBehaveStories.java
> 
> package com.apptech.qmo;
> 
> import com.apptech.qmo.ipt.QMOHtmlOutput;
> import com.apptech.qmo.ipt.QMOStoryData;
> import com.apptech.qmo.ipt.QMOStoryReporterBuilder;
> import com.apptech.qmo.ipt.utils.Loggers;
> import com.google.common.util.concurrent.MoreExecutors;
> import org.apache.log4j.Logger;
> import org.apache.log4j.PropertyConfigurator;
> import org.jbehave.core.Embeddable;
> import org.jbehave.core.configuration.Configuration;
> import org.jbehave.core.embedder.Embedder;
> import org.jbehave.core.embedder.StoryControls;
> import org.jbehave.core.embedder.StoryTimeouts;
> import org.jbehave.core.failures.FailingUponPendingStep;
> import org.jbehave.core.failures.PendingStepStrategy;
> import org.jbehave.core.i18n.LocalizedKeywords;
> import org.jbehave.core.io.CodeLocations;
> import org.jbehave.cor

Re: Content Security Policy prohibits inline styles in JBehave reports

2018-03-09 Thread Mauro Talevi
Hi,

this is an odd one.  The CSS styling hasn’t changed for a long time and I’ve 
not seen this issue (on different platforms, mostly using Chrome). 

Which platform are you using?   Can you provide a project that reproduces it? 

Or If you can provide a patch that works for you, we can try to apply it and 
see if it breaks anything.  Or make it configurable.

Thanks 

> On 9 Mar 2018, at 10:01, Andreas Ebbert-Karroum 
>  wrote:
> 
> Hi,
> 
> I don't since when this is happening, but when accessing the jbehave reports 
> now, all my browsers (chrome, firefox, safari) refuse to import the 
> appropriate styles.
> 
> from jbehave-reports.ftl:
> 
> 
> @import url( "./style/jbehave-core.css" );
> 
> 
> Error messages in the console:
> thousands of this:
> Blocked script execution in 
> 'http://.../jenkins/job/worblehat-040-acceptance-test/ws/worblehat-acceptancetests/target/jbehave/view/reports.html'
>  because the document's frame is sandboxed and the 'allow-scripts' permission 
> is not set.
> 
> And this one:
> Refused to apply inline style because it violates the following Content 
> Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' 
> keyword, a hash ('sha256-+wMlwzpGZub48VLogpJEaVDbAQx6pC50QgQWRKyG524='), or a 
> nonce ('nonce-...') is required to enable inline execution.
> 
> Any hints appreciated,
> Andreas Ebbert-Karroum
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/7844c404-a4c3-4711-9a75-9d5b083023dc%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/22BD99BD-CD31-44AB-A905-59CFD32F395C%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: Finding unused steps

2018-04-23 Thread Mauro Talevi
Hi Jurgen, 

this is an interesting use case.   Can you please create a JIRA for it and we 
can satisfy it by adding the appropriate functionality. 

Thanks

> On 23 Apr 2018, at 17:21, Jürgen Schmied  wrote:
> 
> I tried to find unused steps and ended up with overriding a method of 
> PerformableTree.
> 
> This is quita a hack but found 250 unused steps in our code base ;-)
> 
> Is there any better method of doing this?
> 
> @Override
> public void addStories(RunContext context, List stories) {
> super.addStories(context, stories);
> 
> Set usedMethods = new HashSet<>();
> Set existingMethods = new HashSet<>();
> 
> List candidateSteps = (List) 
> ReflectionTestUtils.getField(context, "candidateSteps");
> 
> List collectCandidates = 
> context.configuration().stepFinder().collectCandidates(candidateSteps);
> for (StepCandidate stepCandidate : collectCandidates) {
> existingMethods.add(stepCandidate.getMethod());
> }
> 
> for (PerformableStory story : getRoot().getStories()) {
> for (PerformableScenario scenario : story.getScenarios()) {
> NormalPerformableScenario sc = (NormalPerformableScenario) 
> ReflectionTestUtils.getField(scenario, "normalScenario");
> if (sc != null) {
> PerformableSteps ps = (PerformableSteps) 
> ReflectionTestUtils.getField(sc, "steps");
> List steps = (List) 
> ReflectionTestUtils.getField(ps, "steps");
> for (Step step : steps) {
> if (step instanceof StepCreator.ParametrisedStep) {
> usedMethods.add((Method) 
> ReflectionTestUtils.getField(step, "method"));
> }
> }
> }
> List ec = 
> (List) ReflectionTestUtils.getField(scenario, 
> "exampleScenarios");
> if (ec != null) {
> for (ExamplePerformableScenario eps : ec) {
> PerformableSteps ps = (PerformableSteps) 
> ReflectionTestUtils.getField(eps, "steps");
> List steps = (List) 
> ReflectionTestUtils.getField(ps, "steps");
> for (Step step : steps) {
> if (step instanceof StepCreator.ParametrisedStep) 
> {
> usedMethods.add((Method) 
> ReflectionTestUtils.getField(step, "method"));
> }
> }
> }
> }
> }
> }
> 
> 
> System.out.println("#");
> System.out.println("existing " + existingMethods.size());
> 
> existingMethods.removeAll(usedMethods);
> 
> System.out.println("leftover " + existingMethods.size());
> 
> for (Method leftover : existingMethods) {
> System.out.println(leftover.toString());
> }
> 
> 
> System.out.println("#");
>
> }
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/b84cc7a5-ba6a-4e1e-b07c-0b3df8385e32%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/B6D3E8B3-D1D0-403D-9FD7-6B6E9FF27784%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: JBehave 4+ - After upgrading core to 4.3.5 jbehave is pasrsing the stories 3 times.

2018-11-14 Thread Mauro Talevi
What makes you conclude that it’s parsing the story 3 times?

> On 10 Nov 2018, at 01:59, Gajendra Sahu  wrote:
> 
> Hi All,
> 
> After upgrading core to 4.3.5 jbehave is pasrsing the stories 3 times and so 
> it is taking too long for actual story to start running.
> 
> I am using below - 
> 
>   1) jbehave-core - 4.3.5
>   2) jbehave-web-selenium - 3.6-beta-2
>   3) jbehave-junit-reporter - 2.2.0
> 
> Line 168: Meta[properties={manageLists=, 
> narrative=Narrative[inOrderTo=,asA=,iWantTo=,soThat=], description=, 
> rcmRegression=, path=stories/listsEntities/lists/ManageLists.story}] excluded 
> by filter '+standardizationViaFFUImport'
>   Line 169: Meta[properties={givenStories=, manageLists=, 
> narrative=Narrative[inOrderTo=,asA=,iWantTo=,soThat=], examplesTable=, 
> description=, rcmRegression=, 
> path=stories/listsEntities/lists/ManageLists.story, title=Verify Manage List 
> Page
>   Line 2145: Meta[properties={manageLists=, 
> narrative=Narrative[inOrderTo=,asA=,iWantTo=,soThat=], description=, 
> rcmRegression=, path=stories/listsEntities/lists/ManageLists.story}] excluded 
> by filter '+standardizationViaFFUImport'
>   Line 2146: Meta[properties={givenStories=, manageLists=, 
> narrative=Narrative[inOrderTo=,asA=,iWantTo=,soThat=], examplesTable=, 
> description=, rcmRegression=, 
> path=stories/listsEntities/lists/ManageLists.story, title=Verify Manage List 
> Page
>   Line 4122: Meta[properties={manageLists=, 
> narrative=Narrative[inOrderTo=,asA=,iWantTo=,soThat=], description=, 
> rcmRegression=, path=stories/listsEntities/lists/ManageLists.story}] excluded 
> by filter '+standardizationViaFFUImport'
>   Line 4123: Meta[properties={givenStories=, manageLists=, 
> narrative=Narrative[inOrderTo=,asA=,iWantTo=,soThat=], examplesTable=, 
> description=, rcmRegression=, 
> path=stories/listsEntities/lists/ManageLists.story, title=Verify Manage List 
> Page
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/3572534d-905d-4d99-8cb7-f7c8945e4541%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/1169286A-587B-437B-A0AC-524602EEB956%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.


Re: How can I compress the IDE log while running the Jbehave?

2018-11-14 Thread Mauro Talevi
You can define your own reporter based on IdeOnlyConsoleOutput:

https://jbehave.org/reference/stable/reporting-stories.html 



> On 7 Nov 2018, at 02:09, Gajendra Sahu  wrote:
> 
> Hi All,
> 
> The runner goes to all the stories to find the matching meta tag and while 
> doing so it logs all the info in the IDE Console. How can I compress those 
> logs? Any ideas?
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JBehave User" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbehave-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to jbehave-user@googlegroups.com 
> .
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/jbehave-user/296e9640-6e4f-4bf4-8820-be30a0f1ae4f%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/71F1DF37-BC20-415E-B247-2B632424A301%40aquilonia.org.
For more options, visit https://groups.google.com/d/optout.