I am using Behat with Mink in PHP. I'm writing a class to create Json logs for every test run including failed/passed steps and so on.
Now we are using Scenario Outlines a lot because we run the tests on multiple websites and put the URLs into the examples section.
However I cannot get the title of the Scenario Node to put it into Json. I am using
$event->getScenario()->getTitle();
but that returns not the Scenario title but the example that is currently running. So if I have this
Scenario Outline: Scenario 1
Given I am on "<domain>"
Then I should see "test"
Examples:
|domain|
|www.webpage.com|
what I ultimately want in my report is the name of the Scenario Outline, 'Scenario 1'. But what is really returned is '|www.webpage.com|'.
Is there a way to get to the name of a Scenario Outline? It works fine on 'normal' Scenarios.