Hi Mauro,
     For example, take a look at the custom report packaged in JBehave core 
example (/behave-3.9.5/examples/core/src/main/java/ftl/custom-reports.ftl). In 
this FreeMarker template, a data object reportsTable is accessed and used to 
populate the content for HTML reports.

<#assign reportNames = reportsTable.getReportNames()>

Through reportsTable data object, other stats information (including story 
duration) is also accessed.

<#assign stats = report.getStats()>
<@renderMillis stats "duration"/>

Questions:


1.       Where is reportsTable data model coming from? How is it created and 
injected into this FreeMarker template file (.ftl)?



2.        As the story duration is no longer available in the stats object 
(story .stats file) with JBehave 3.9.4+ 
(https://jira.codehaus.org/browse/JBEHAVE-1041), and if I want to use and 
access the story duration available in storyDurations.props file from the same 
FreeMarker template file, how can I do this?

Thanks,
Phong

From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
Sent: Friday, March 20, 2015 2:16 AM
To: user@jbehave.codehaus.org
Subject: Re: [jbehave-user] Story duration are not calculated correctly in 
multi-thread execution

Not sure what you mean.   Where do you want to make available the story 
durations?

On 20/03/2015 00:17, tran, phong wrote:
Thanks Mauro and Brent for confirming the fix. It's actually my fault. I did 
not update all other modules in the project with the latest JBehave 3.9.5. I 
could see the storyDurations.props file created with expected story duration 
time now. My next question is how I can take the information in 
storyDurations.props file and make them available for access in the FreeMarker 
templates (.ftl) to produce the HTML views?

Thanks,
Phong

From: Mauro Talevi [mailto:mauro.tal...@aquilonia.org]
Sent: Thursday, March 19, 2015 3:00 AM
To: user@jbehave.codehaus.org<mailto:user@jbehave.codehaus.org>
Subject: Re: [jbehave-user] Story duration are not calculated correctly in 
multi-thread execution

Can you provide a sample project reproducting this behaviour.

This problem should be fixed in latest release.

On 17/03/2015 22:39, tran, phong wrote:
When I ran stories with a single thread (serial), the story duration in reports 
looked correct. The duration time is in minutes as expected. See the attached 
report (single-thread-reports.png). However, when stories are executed with 
multiple threads (currently), the story duration is not calculated correctly 
(See Multiple-Thread-Reports.png). The duration time is in in sub-seconds and 
is not what expected. I'm using JBehave 3.9.2 and thought this problem could be 
related to https://jira.codehaus.org/browse/JBEHAVE-1041 but upgrading to the 
latest JBehave 3.9.5 does not seem to help with this problem.

Here is the code fragment for building story report.

.useStoryReporterBuilder(new StoryReporterBuilder()
                .withDefaultFormats()
                .withFormats(CONSOLE, TXT, HTML_WEB)
                .withFailureTrace(true)
                .withFailureTraceCompression(false)
                .withViewResources(viewResources)
                .withCrossReference(xref)
                );

Does anyone have an idea what's could be the problem here?

Thanks in advance,
Phong









---------------------------------------------------------------------

To unsubscribe from this list, please visit:



    http://xircles.codehaus.org/manage_email


Reply via email to