The PerformableTree is accessible from the StoryManager, which is
accessible from the Embedder.
Embedder.storyManager().performableTree().
CrossReference is in 4.x simply a facade that serialises the
PerformableTree to the configured output directory of the
StoryReporterBuilder.
The advantage of using CrossReference is that it's completely decoupled
and user-defined. I would say it'd be simpler that having keep
reference of the Embedder or the StoryManager, which are more framework
oriented.
We could add to CrossReference the functionality to deserialise the xml
or json back to a Java object, essentially what you've done but in a
single easy-to-invoke step.
It that works for you, please raise a Jira issue and of course feel free
to contribute the patch.
Cheers
On 02/08/2012 12:49, James Shaw wrote:
The CrossReference report is useful, but I'd like to get programmatic
access to the PerformableRoot instead of serializing it to a file.
This is so that I can send story and step timings to our monitoring
tool.
Right now, I'm either going to have to load the xref file and parse
the JSON, or I'd have to extend CrossReference and cast the Object
passed to serialise() back into a PerformableRoot.
What's the best way to implement this? I'd be willing to have a go at
patching JBehave 4 to add support for this.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email