You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, not sure if this is an issue or not, but it's still worth asking I think.
I have test2.feature like this:
Feature: Test 2
Background:
@ignore @scenario1
Scenario: Scenario 1
* print "Hello from Test 2 - Scenario 1"
And test.feature like this:
Feature: Test 1
Background:
* callonce read('test2.feature@scenario1')
Scenario: Scenario 1
* print 'Hello from Test 1 - Scenario 1'
Scenario: Scenario 2
* print 'Hello from Test 1 - Scenario 2'
When I execute test.feature, it looks good, test2.feature@scenario1 is only called once, which is as expected:
Now I change test.feature to be like this: An ignored scenario (scenario0) added, then call to that one from Scenario 1 and 2.
Feature: Test 1
Background:
* callonce read('test2.feature@scenario1')
@ignore @scenario0
Scenario: Scenario 0
* print 'Hello from Test 1 - Scenario 0'
Scenario: Scenario 1
* call read('@scenario0')
* print 'Hello from Test 1 - Scenario 1'
Scenario: Scenario 2
* call read('@scenario0')
* print 'Hello from Test 1 - Scenario 2'
This time, test2.feature@scenario1 is called 3 times (1 for Background, and 2 for every time we call the ignored (scenario0). I expect that test2.feature@scenario1 should be always called once no matter what. Please kindly let me know if I am expecting it correctly? Thank you very much.
The text was updated successfully, but these errors were encountered:
phipgn
changed the title
callonce seems to be called many times through ignored scenarios
callonce seems to be called more than once through ignored scenarios
Apr 5, 2023
Hi there, not sure if this is an issue or not, but it's still worth asking I think.
I have
test2.feature
like this:And
test.feature
like this:When I execute
test.feature
, it looks good,test2.feature@scenario1
is only called once, which is as expected:Now I change
test.feature
to be like this: An ignored scenario (scenario0) added, then call to that one from Scenario 1 and 2.This time,
test2.feature@scenario1
is called 3 times (1 for Background, and 2 for every time we call the ignored (scenario0). I expect thattest2.feature@scenario1
should be always called once no matter what. Please kindly let me know if I am expecting it correctly? Thank you very much.The text was updated successfully, but these errors were encountered: