Hey Mauro,
I looked at the ReportCanBeWrittenToFile.java file and the Trader
example. I tried to configure my scenario class to act the same as
ReportCanBeWrittenToFile but it looks like I'll need 3 additional
files ( Converter (ie TraderConverter.java) file and
a Persister type file (TraderPersister.java), and the Scenario
Reporter) per story to output to a file. I can't use this method
since my team is going to have around 100 stories. Does that make
sense?
I want to output just like the Trader example scenario
"ReportCanBeWrittenToFile" but on a large scale project with multiple
stories and scenarios. I also want to output passing scenarios.
Basically I tried ReportCanBeWrittenToFile story and want the same
output (plus passing scenarios), but need a way to get this without
having to rely on making a converter file (ie TraderConverter) and a
Persister file.
Do you know how I can give this??
Dan suggested doing...
new MostUsefulConfiguration() {
PrintStream out; // one instance for the whole run
{ // anonymous constructor block
try {
out = new PrintStream(new FileOutputStream("TestOutput.txt"));
} catch (Exception e) {
throw new RuntimeException(e);
}
public ScenarioReporter forReportingScenarios() {
return out;
}
};
But I have no idea where he would insert this within the code....I
tried playing around with it, but was unsuccessful.
Any ideas??
Thanks so much!
Laura
On Thu, Feb 26, 2009 at 7:46 PM, Mauro Talevi
<[email protected]> wrote:
> Laura Vendramini wrote:
>>
>> Hey Chandru,
>>
>> Sounds like I am trying to do the same thing as you. I tried the
>> trader sample and it was able to output to a file in the tmp
>> directory. I tried migrating the changes over to my code but it looks
>> like 3 additional files ( Converter (ie TraderConverter.java) file and
>> a Persister type file (TraderPersister.java), and the Scenario
>> Reporter) are needed per story to output to a file. I can't use this
>> method since my team is going to have around 100 stories. That means
>> at least 300 additional classes...
>>
>> Anyone know a better way to output to a file or create a summary
>> report with maven 2?
>>
>
> First of all, apologies for the wrong URL - core has moved now and the
> correct URL is:
>
> https://svn.codehaus.org/jbehave/trunk/core/examples/trader/src/main/java/org/jbehave/examples/trader/scenarios/ReportCanBeWrittenToFile.java
>
> Secondly, this examples shows out to create a bespoke configuration that
> allow to write scenario to a file. If you define a base scenario, e.g.
> MyProjectScenario that uses this configuration and then extend this scenario
> in your stories, you'll be able to write all the output to same file (or
> easily extend just the filename of the output to differ for each story if
> you prefer).
>
> Have I misunderstood your usecase? If so, please feel free to give more
> details of the expected summary report. This is a feature that we know we
> can improve on.
>
> Cheers
>
>
>
> ---------------------------------------------------------------------
> 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