-
Notifications
You must be signed in to change notification settings - Fork 29
Description
π€ What's the problem you're trying to solve?
I'm re-implementing the json-formatter to use messages. And as part of that I'm running regression tests with cucumber-jvm 7.26.0 and cucumber-scala 8.29.0.
Currently HookDefinition.getHookType
is not implemented. As a result it is not possible to produce report.json
from an equivalent message stream in report.ndjson
.
Additionally this Location.getLocation
implementation is giving me some problems:
cucumber-jvm-scala/cucumber-scala/src/main/scala/io/cucumber/scala/ScalaStepDefinition.scala
Lines 38 to 40 in a528111
// Easier to just print out fileName and lineNumber | |
override def getLocation(): String = | |
stepDetails.frame.getFileName + ":" + stepDetails.frame.getLineNumber |
The message protocol includes the source reference rather than the location string. And because the source reference in this case is based off a stacktrace element, I can't reproduce the location string as Cucumber Scala produces it, because the Cucumber Java8 backend uses StackTraceElement.toString()
and I can't tell from the messages which backend is used.
Removing the implementation would help me out as the expected implementation is already used here:
cucumber-jvm-scala/cucumber-scala/src/main/scala/io/cucumber/scala/AbstractGlueDefinition.scala
Lines 21 to 23 in a528111
override def getLocation(): String = { | |
location.toString | |
} |
β¨ What's your proposed solution?
n/a
β Have you considered any alternatives or workarounds?
For the regression tests I can probably grep around the results of Location.getLocation
. But I can't do without HookDefinition.getHookType
.
π Any additional context?
Regression tests for Scala are added here cucumber/cucumber-json-formatter#2