in gepard-gherkin-cucumber/src/main/java/com/epam/gepard/gherkin/cucumber/CucumberEventListener.java [181:206]
public void logScenarioStarted(final Description example) {
String innerScenario;
try {
Field privateSerializableField = Description.class.getDeclaredField("fUniqueId");
privateSerializableField.setAccessible(true);
Serializable scenarioCandidate = (Serializable) privateSerializableField.get(example);
Scenario scenario = (Scenario) scenarioCandidate;
innerScenario = scenario.getName();
} catch (NoSuchFieldException | IllegalAccessException e) {
LOGGER.error("Cannot access Scenario object at: " + example.toString(), e);
innerScenario = getTestClassExecutionData().getTestScriptName();
}
innerScenario = innerScenario.replace('\uFF5F', '(').replace('\uFF60', ')'); //Unicode to Console (partial transfer)
String consoleInfo = "Scenario: \"" + innerScenario + "\"";
if (example != null) {
consoleInfo += " with Example row: " + example.toString();
}
HtmlRunReporter reporter = getTestClassExecutionData().getHtmlRunReporter();
LogFileWriter htmlLog = reporter.getTestMethodHtmlLog();
if (htmlLog != null) {
htmlLog.insertText(
"<tr><td align=\"center\"> " + step + ". </td><td bgcolor=\"#b0e0b0\"> " + consoleInfo + "</td></tr>\n");
}
reporter.systemOutPrintLn(step + ". " + consoleInfo);
step++;
}