Hello, I'm setting a custom report location with StoryReporterBuilder
StoryReporterBuilder reporterBuilder = 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