Skip to content

Conversation

@lorenzodalaqua
Copy link

This PRs customizes the title of a Scenario and other attributes when formatting test output using the junit format.

It mainly adds the line number and CircleCI node number to the scenario title.

Chekote and others added 5 commits February 23, 2022 10:21
Scenario:
Given I have a context class MyContext
And I have a context class MyExtendingContext that extends MyContext
When I register MyExtendingContext in the Behat environment
And I try to use InitializedContextEnvironment::getContext to get MyContext

Desired Behavior:
Then I should receive MyExtendingContext as it "is-a" MyContext

Current Behavior:
Then I do not receive MyExtendingContext as it is not a MyContext

Implementation:
I modified the hasContextClass and getContext methods to check for extending or implementation of the specified class or interface.
This is applicable to Scenarios which are a part of a Scenario Outline.
Each example in an outline would be appended an index to its name in the
output (ex: Chekote#1, Chekote#2, Chekote#3...), but in a behat --rerun, they are all
appended Chekote#1, which breaks IFT detection. Not having the Example number
is the way the script currently expects the output to be, so it was
removed.
@lorenzodalaqua
Copy link
Author

Whoops, meant to open this PR against the v3-10-with-patches branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants