Hi
you're trying to employ two different uses of GivenStories anchors which
are not meant to used together.
If you want to use parametrised GivenStories by examples row, you should
specify the examples table in the scenario that invokes the given story
and use the anchor to specify the row:
A.story
Scenario: A - 1
Meta: @id1 scenario1
Given actions with <Apara1>
When ...
B.story:
Scenario: B - 1
GivenStories: A.story#{0}
Examples:
|Apara1|
|value1|
If you want to filter by scenario anchor then provide the name:value
pair as the anchor.
B.story:
Scenario: B - 2
GivenStories: A.story#{id2:scenario2}
Combining the two is not possible.
As a side note, it does seem that your setup is particularly complicated
and perhaps you should consider simplifying it by separating concerns.
Cheers
On 15/10/2014 05:27, Zheng, Ayesha(AWF) wrote:
Hi all,
I have a problem about GivenStories.
Assume A.story has 2 or more scenarios:
Scenario: A - 1
Meta: @id1 scenario1
Given actions with <Apara1>
When ...
Examples:
|Apara1|
|value1|
Scenario: A-2
Meta: @id2 scenairo2
Given ...
Examples: A2.table
B.story want to run only scenario A-1 for prepare with different data.
B.story:
Scenario: B - 1
GivenStories: A.story#{id1:scenario1}#{0} àProblem here.
Given actions with <Bpara1> and <Bpara2>
When ...
Examples:
|Bpara1|Bpara2|Apara1|
|value1|value2|value3|
My problem is:
How can I use givenStories to match follow requirements:
1.Run only Scenario A-1 in A.story.
2.Pass data in Table Row 0 to givenStories A-1.
3.Run Scenario B-1 with example data.
Thanks very much.
Best Regards,
Ayesha