damianszczepanik / cucumber-reporting

HTML reports for Cucumber
GNU Lesser General Public License v2.1
548 stars 403 forks source link

Broken links when using matrix projects in Jenkins #464

Closed midopa closed 8 years ago

midopa commented 8 years ago

Valid link: //localhost:8080/job/Sandwich/58/jam=raspberry,bread=rye,cheese=cheddar/cucumber-html-reports/

But the links in the generated page look like: //localhost:8080/job/jam=raspberry,bread=rye,cheese=cheddar/58/cucumber-html-reports/

This is consistent for all three links:

damianszczepanik commented 8 years ago

Have you tried to solve such problem by setting https://github.com/damianszczepanik/cucumber-reporting/blob/master/src/main/java/net/masterthought/cucumber/Configuration.java#L65 ?

midopa commented 8 years ago

I tried setting it through the Jenkins plugin and the URLs are still wrong: //localhost:8080/job/Sandwich/job/jam=raspberry,bread=rye,cheese=cheddar/58/cucumber-html-reports/

setJenkinsBasePath is meant to point to the Jenkins instance, not to the Jenkins project, because the report tool crafts the rest of the URL path and appends it to the base path.

So it seems the reporter should be made aware of a few things:

damianszczepanik commented 8 years ago

Can you prepare PR with correct solution? Seems like not many installations have this option enabled so its hard to test it

midopa commented 8 years ago

Turns out this is a simple fix that can be done in the Jenkins plugin. PR coming for that repo

midopa commented 8 years ago

Fix is merged. Will be avail next plugin release. So I'll close this.