Standard approach is to have an impl that delegates to multiple other
generators.
On 27/05/2013 15:02, joao machado wrote:
Still make sense in our use case having at least two generators, one
to generate the HTML reports in CI (pipeline status) and one to upload
the execution result to Rally for management purposes (current status
of the sprint).
Cheers.
------------------------------------------------------------------------
Date: Mon, 27 May 2013 11:43:44 +0200
From: mauro.tal...@aquilonia.org
To: dev@jbehave.codehaus.org
Subject: Re: [jbehave-dev] Submit reports to database
Yes, you're right the view generator assumes it being done to an
output directory. But you can simply ignore the directory if you're
using the performable tree.
We can refactor the interface method in 4.x, moving the output dir to
the view resources.
On 27/05/2013 00:37, joao machado wrote:
I misunderstand the purpose of the ViewGenerator interface. The
main purpose of the interface is file-based reports and was I
thinking of a more generic generator for reporting purposes
(file-based, database, etc).
I'll let you know the updates on this issue.
------------------------------------------------------------------------
Date: Sun, 26 May 2013 18:09:46 +0200
From: mauro.tal...@aquilonia.org <mailto:mauro.tal...@aquilonia.org>
To: dev@jbehave.codehaus.org <mailto:dev@jbehave.codehaus.org>
Subject: Re: [jbehave-dev] Submit reports to database
You can access the PerformableRoot of the tree via
Embedder.storyManager().performableRoot().
It will be generated during the generateReportsView() method using
the view generator configured via:
Configuration.useViewGenerator(ViewGenerator).
So there only one view generator for given run. Why would you
want two at the same time?
Cheers
On 26/05/2013 16:48, joao machado wrote:
Hi again,
We already have jbehave-rally module but we need something
like PerformableTree to access Story information and the
ability to perform individual stories concurrently is
definitely plus.
Should I use this module in my overridden run() after the
execution of generateReportsView()?
I think it would nice add more than one view generator to the
Configuration, in order to perform different kind of reporting
strategies.
Kind Regards.
------------------------------------------------------------------------
Date: Sun, 26 May 2013 15:14:37 +0200
From: mauro.tal...@aquilonia.org
<mailto:mauro.tal...@aquilonia.org>
To: dev@jbehave.codehaus.org <mailto:dev@jbehave.codehaus.org>
Subject: Re: [jbehave-dev] Submit reports to database
Hi,
if your need is to interface with Rally, I'd opt to have a
jbehave-rally module that deals with all the specifics of
rally, in particular the db schema. Then we can also add
other elements of this interaction as needed, e.g. a Rally
specifc configuration extension that makes it easy for users
to setup and use.
The execution results need to be read from files in 3.x but in
4.x there is a new execution context (called PerformableTree)
that you can use directly. 4.x is currently in beta.
Up to you where you want to start from ...
You can start cloning jbehave-core repo from github and start
developping this new module. We'll be happy to help you along.
Cheers
On 26/05/2013 14:26, joao machado wrote:
Hi Mauro and JBehave devs,
first of all thank you for your prompt reply.
Your suggestion is really great for our purpose because,
as you write in the previous e-mail, we want to submit
stories execution status to the Rally (rallydev.com)
database and also create the HTML reports in the
continuous integration filesystem.
The test case information result that is currently being
inserted is:
Test Case ID: identifier (string)
Method signature: ClassName.methodName (string)
Status: status (String)
Exception Msg: optional (String)
Defect ID: optional (String)
Build No: 0.1-SNAPSHOT-number (String)
It is possible to insert the Test result which is a set of
steps.
How can I add a new ViewGenerator implementation?
Do I need to read the scenarios results from file before
database update or do I have access to the execution
context with all story (scenarios) execution status? The
second option is better.
I hope you can support us with this issue.
Cheers.
------------------------------------------------------------------------
Date: Sat, 25 May 2013 21:42:32 +0200
From: mauro.tal...@aquilonia.org
<mailto:mauro.tal...@aquilonia.org>
To: dev@jbehave.codehaus.org <mailto:dev@jbehave.codehaus.org>
Subject: Re: [jbehave-dev] Submit reports to database
Hi,
To plugin a different kind of report generation, your main
interface is ViewGenerator, of which you can write a
database-centric implementation.
You can start from the template-based implementation.
https://github.com/jbehave/jbehave-core/blob/master/jbehave-core/src/main/java/org/jbehave/core/reporters/TemplateableViewGenerator.java
Now this assumes that you just want to store the final
view reports in a db, but you're still happy to have the
single raw story reports being written to filesystem.
Feel free to share your usecase. Maybe it's sufficiently
generic that we may add support for it.
Cheers
On 25/05/2013 21:32, joao machado wrote:
Hi all,
I would like to know how to plug-in into JBehave an
module that submit story/stories reports to the
Database after the report generation.
Any suggestion?
Thanks in advance.