WebDriverScreenshotOnFailure has a 3 parameter constructor where the 3rd
parameter is the screenshot path pattern, if you use that with a path
like /path/screenshots/failed-scenario-{1}.png, you should be able to
set the path
On 12.07.2012 01:54, Jorge Pombar wrote:
Hello, I’m setting a custom report location with StoryReporterBuilder
StoryReporterBuilderreporterBuilder = *new*StoryReporterBuilder()
.withCodeLocation(/codeLocationFromClass/(NavitasStories.*class*)).withFailureTrace(*true*)
.withFailureTraceCompression(*true*).withDefaultFormats().withFormats(formats)
.withCrossReference(crossReference).withRelativeDirectory("myCustomLocation");
This is working fine when generating all the reports. However, the
reports aren’t able to find the screenshots which are still saved under
“target\jbehave\screenshots”. I was looking at the code and it seems it
gets this location from the call “reporterBuilder.outputDirectory()”.
I was thinking to extend WebDriverScreenshotOnFailure and override the
screenshotPath method. But before doing that is there a better
configuration way to achieve this?
On a related note. The purpose of the custom location is to generate
separate reports for each automation run (we want to keep each result so
we can go back to them if we have/want to). The only thing that I don’t
like is to copy the resources every time to each output folder of each
run. I guess I could copy them to a single location and change all the
templates to get the resources from there but this seems tedious. Do you
have any ideas of a better approach?
Thanks,
Enrique
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email