Hello folks,
I have my jbehave tests running on jenkins, I am then publishing the
jbehave reports using the jenkins html publisher plugin. As Jenkins
can keep historical records of past builds there is an option to "keep
historical HTML reports" as well, this allows me to look at last
week's build and still be able to view the jbehave report.html that
was generated with it. All good - keep in mind these are the native
jbehave reports *not* the junit-like reports created via the
jbehave-hudson-plugin.
I've run into a problem after enabling the screenshot on failure
mechanism for my jbehave selenium tests.
This is where it gets tricky:
When there is a failure the jbehave scenario.html report will contain
a link to the specific screenshot "seen" at the time of failure,
default is "target/jbehave/screenshots/failed-scenario-{random-number}.png".
When running this within a dev environment the link works great.
However, when you run this on Jenkins the screenshots end up in:
jenkins/job/job_name/build_number/artifact/target/jbehave/screenshots/failed-scenario-{random-number}.png"
note the <<artifact/target/jbehave>>, but the associated story report
wants to link to:
"jenkins/job/job_name/build_number/screenshots/failed-scenario-{random-number}.png"
I know I can control the location of the parent directory where all
the reports are stored via the
StoryReporterBuilder().withRelativeDirectory(), further I can control
the directory structure of the screenshots themselves with the third
arg in WebDriverScreenshotOnFailure(driverProvider, storyReporter,
"{0}/screenshots/failed-scenario-{1}.png")).
This also adjusts the link in the final html, which is very cool and I
thought I was close to a solution, but on Jenkins I ended up with:
jenkins/job/job_name/build_number/artifact/target/jbehave/artifact/target/jbehave/screenshots/failed-scenario-{random-number}.png
when I tried to anticipate the directory that Jenkins would be storing
the files in.
What it seems like I need is the ability to control the links to the
screenshots and leave the actual screenshots in their default
location. Through filtering in maven and on jenkins I know I can
dynamically create the correct link.
I know this is a pretty focused issue. Anyone dealt with it?
Thanks,
Seth
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email