Sometime we need to know the Feature name or Scenario name whenever we ran our script using Cucumber-JVM. It may be required for logging purpose for status of execution. So How we can do that. It is very simple we need to add the following lines to get the Feature Name and Scenario Name.
"Feature Name : " + scenario.getId().split(";")[0]
"Scenario Name : " + scenario.getName()
"Feature Name : " + scenario.getId().split(";")[0]
"Scenario Name : " + scenario.getName()