RE: [jbehave-user] Stories' Dependency

2014-09-12 Thread Zheng, Ayesha(AWF)
Thanks for your answer.
Seems “GivenStories” cannot match my requirement.

Actually my requirement is:
B and C depend on A.
If A succeed, then run B and C in parallel. (Run them in serial need too long 
time)
If A failed, then skip B and C.

Does any feature in JBehave can do this?

Thanks.

Best Regards,
Ayesha

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

Check this description of the “GivenStories” keyword:
http://jbehave.org/reference/stable/given-stories.html

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

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


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

Hi all,

I have a problem with stories’ dependency.

Example:
I have A,B,C stories, and stories B, C depends on A. (B-A, C-A).
I add “GivenStories: A.story” in both B.story and C.story to do this, then run 
these 3 stories.
I found A.story run for 3 times.

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

Thanks very much.


Best Regards,
Ayesha



[jbehave-user] Parametrised scenario problem

2014-09-19 Thread Zheng, Ayesha(AWF)
Hi all,

I have a scenario:

Given a user open homepage
Then should see message1
When user do something and go to another page
Then should see message2
Examples:
test.table


And test.table with content:
|message1|message2|
|Welcome|Hello|

And step Then should see message1 and Then should see message2 do the 
same thing: just check the text.
So I just want to implement it once time.
Code like:
@Then(should see message)
public void shouldSeeMsg(@Named(message)String message)
{
// check text...
}

When running this case, I hope it can match both step message1 and 
message2.
But the problem is, I found the parameter name in code must be the same with 
the name specified in scenario.
These steps always in PENDING status.

Could anyone help to how to solve this?
Thanks very much.

Best Regards,
Ayesha



[jbehave-user] Issue about GivenStories Examples

2014-10-14 Thread Zheng, Ayesha(AWF)
Hi all,

I have a problem about GivenStories.

Assume A.story has 2 or more scenarios:
Scenario: A - 1
Meta: @id1 scenario1
Given actions with Apara1
When ...
Examples:
|Apara1|
|value1|

Scenario: A-2
Meta: @id2 scenairo2
Given ...
Examples: A2.table



B.story want to run only scenario A-1 for prepare with different data.
B.story:
Scenario: B - 1
GivenStories: A.story#{id1:scenario1}#{0} -- Problem here.
Given actions with Bpara1 and Bpara2
When ...
Examples:
|Bpara1|Bpara2|Apara1|
|value1|value2|value3|



My problem is:
How can I use givenStories to match follow requirements:

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

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

3.   Run Scenario B-1 with example data.

Thanks very much.


Best Regards,
Ayesha