Skip to content

Commit

Permalink
help intellij to navigate to source from test results
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrthomas committed May 31, 2022
1 parent b142f0e commit 11e9e85
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void beforeSuite(Suite suite) {
public boolean beforeScenario(ScenarioRuntime sr) {
if (sr.caller.depth == 0) {
Scenario scenario = sr.scenario;
String path = scenario.getFeature().getResource().getRelativePath();
String path = scenario.getFeature().getResource().getUri().toString();
log(String.format(TEMPLATE_TEST_STARTED, getCurrentTime(), path + ":" + scenario.getLine(), escape(scenario.getRefIdAndName())));
// log(String.format(TEMPLATE_SCENARIO_STARTED, getCurrentTime()));
}
Expand All @@ -71,7 +71,7 @@ public void afterScenario(ScenarioRuntime sr) {
public boolean beforeFeature(FeatureRuntime fr) {
if (fr.caller.depth == 0) {
Feature feature = fr.feature;
String path = feature.getResource().getRelativePath();
String path = feature.getResource().getUri().toString();
log(String.format(TEMPLATE_TEST_SUITE_STARTED, getCurrentTime(), path + ":" + feature.getLine(), escape(feature.getNameForReport())));
}
return true;
Expand Down

0 comments on commit 11e9e85

Please sign in to comment.