Class TestSourceParsed
- All Implemented Interfaces:
Event
Cucumber scenarios and individual examples in a scenario outline are compiled
into pickles. These pickles are wrapped by a TestCase
. As such
Cucumbers internal representation lacks any hierarchy. I.e. once compiled
into a a pickle a scenario is no longer associated with a feature file.
However consumers of Cucumbers output generally expect results to be reported
in hierarchical fashion. This event allows test cases to be associated with
with a Node
in the hierarchy.
Note that this representation is intentionally abstract. To create more
detailed reports that recreate a facsimile of the feature file it is
recommended to use the Gherkin AST. This AST can be obtained by parsing the
source provided by TestSourceRead
event using gherkin.Parser
or io.cucumber.gherkin.Gherkin
.
Note that a test source may contain multiple root nodes. Though currently there are no parsers that support this yet.
-
Constructor Details
-
TestSourceParsed
-
-
Method Details
-
getNodes
The root nodes in the parsed test source.- Returns:
- root nodes in the parsed test source.
-
getUri
-
getInstant
Returns instant from epoch.- Specified by:
getInstant
in interfaceEvent
- Returns:
- time instant in Instant
- See Also:
-