Getting running scenario name

44 views
Skip to first unread message

Harry King

unread,
Jul 27, 2016, 7:13:53 AM7/27/16
to Serenity BDD Users Group
I'd like to capture trend data on which scenarios fail most often.  Something similar to what Trivago use with Kibana.  What options do I have for exposing the current scenario's name to my Test Suite?

Matthew Chan

unread,
Aug 2, 2016, 8:17:06 PM8/2/16
to Serenity BDD Users Group
You don't need Serenity to do this, you can find that out through cucumber api before scenario method like so

import cucumber.api.java.before;

@Before
public void beforeScenario(Scenario scenario) {
     System.out.println(scenario.getName());
Reply all
Reply to author
Forward
0 new messages