damianszczepanik / cucumber-reporting-jenkins

Java jenkins plugin for cucumber-jvm reporting
151 stars 12 forks source link

Embedded screenshot in report #32

Closed thienanmac closed 11 years ago

thienanmac commented 12 years ago

Hi,

It seems that reports are not being embedded in the reports. I have checked the JSON reports generated by cucumber and it does have the "embedding" tag, and i have also generated the embedded base64 code in HTML and the screenshot is rendered properly.

However, after the publishing step of the plugin and copying the JSON reports into Jenkin's build folder, the "embedding" tags are removed from the report. I have compared the JSON reports generated by cucumber (cucumber --format json -o myreport.json myfeature.feature) and the one copied into the build folder jenkins and the "embedding" tag is removed. It would be nice to have that and embed the screenshots in the HTML reports.

kingsleyh commented 12 years ago

Hi

Ok, I'll fix that in the next release :)

--k

Sent from my iPhone

On 14 Aug 2012, at 02:04, thienanmac notifications@github.com wrote:

Hi,

It seems that reports are not being embedded in the reports. I have checked the JSON reports generated by cucumber and it does have the "embedding" tag, and i have also generated the embedded base64 code in HTML and the screenshot is rendered properly.

However, after the publishing step of the plugin and copying the JSON reports into Jenkin's build folder, the "embedding" tags are removed from the report. I have compared the JSON reports generated by cucumber (cucumber --format json -o myreport.json myfeature.feature) and the one copied into the build folder jenkins and the "embedding" tag is removed. It would be nice to have that and embed the screenshots in the HTML reports.

— Reply to this email directly or view it on GitHub.

ghost commented 12 years ago

Hey I was curious on that issue and played a bit with the source code. I've built a tentative solution to embed screenshots in the reports. So I can provide you access to the *.hpi file or push the code back to github if you want. :)

cheers!

thienanmac commented 12 years ago

hey. can you send me the hpi file? I'll give it a shot and let you know!

cheers

ghost commented 12 years ago

Of course, you can download it from here http://db.tt/R70O28UY

Cheers!

Von meinem iPhone gesendet

Am 27.08.2012 um 09:29 schrieb thienanmac notifications@github.com:

hey. can you send me the hpi file? I'll give it a shot and let you know!

cheers

— Reply to this email directly or view it on GitHub.

thienanmac commented 12 years ago

Hi Roland,

the copied JSON does contain the "embeddings" tag, but the generated HTML doesn't have the embedded HTML (nor does it have an tag). Furthermore, I think the scenarios that have failed return a 404 error when i look at the reports in the overview html.

ghost commented 12 years ago

Hey there were some minor issues which I've fixed and I've uploaded another version. I've tried with my local jenkins(v1.478) and it displays the generated html reports with embedded screenshots from the base64 encoded raw data within the json reports.

Hope it works for you as well. If not let me know.

cheers! :)

thienanmac commented 12 years ago

Hi Roland,

Sorry for the very late reply. I was stuck in other issues and couldn't really validate it. It seems to work fine, but on my end i can't seem to have the screenshots generated (seems that it's a cucumber bug). I do see the embedding with the values in the json report! I guess you can merge your changes and request a push and share the this fix with everybody!

kingsleyh commented 12 years ago

sure send me a pull request On 13 Sep 2012, at 23:37, thienanmac notifications@github.com wrote:

Hi Roland,

Sorry for the very late reply. I was stuck in other issues and couldn't really validate it. It seems to work fine, but on my end i can't seem to have the screenshots generated (seems that it's a cucumber bug). I do see the embedding with the values in the json report! I guess you can merge your changes and request a push and share the this fix with everybody!

— Reply to this email directly or view it on GitHub.

ChrisKozak commented 12 years ago

Hey, I've been working on adding screenshots as well, and just stumbled across this conversation. I didn't see any mentions of "embeddings" in the codebase. Was this ever pulled?

Also, how do you generate the .hpi file? With the current pom, I've only been able to generate a jar.

vijayeta2387 commented 12 years ago

In the end, Was there a solution for this?? I am facing the same issue,not able to see the embedded screenshot in cucumber report. Refer to issue https://github.com/cucumber/cucumber-jvm/issues/401. I opened this issue thinking it as a cucumber issue but I think its related to the plugin rather.

thienanmac commented 12 years ago

The fix that roland compiled into an HPI worked. Since I didn't do the fix, I can't submit a pull request.

vijayeta2387 commented 12 years ago

Can you or Roland send me that hpi file?. So that I can make things work on my side too.

ghost commented 12 years ago

Sorry guys I've been very busy during the last days and quite in hurry at the moment. As a real github noob I promise to push the changes back to the repo as soon as I've figured out how this pull thing works. For so long you might use the hpi?!

kingsleyh commented 12 years ago

Hi

I have been super busy also but from November I'll be fixing and improving the plugin again

Sent from my iPad

On 12 Oct 2012, at 19:17, Roland Jülich notifications@github.com wrote:

Sorry guys I've been very busy during the last days and quite in hurry at the moment. As a real github noob I promise to push the changes back to the repo as soon as I've figured out how this pull thing works. For so long you might use the hpi?!

— Reply to this email directly or view it on GitHub.

ChrisKozak commented 12 years ago

I submitted patches to fix the screenshot issue. It required changes to both this project and the cucumber-reporting project.

The related request is at: https://github.com/masterthought/cucumber-reporting/pull/4 It looks like the Travis build failed because it's trying to compile against Java 1.3

Until both of those are merged, you can find my hpi at: https://github.com/ChrisKozak/jenkins-cucumber-jvm-reports-plugin-java/downloads

noww commented 12 years ago

Hey Chris,

tryed out your fix and still getting:

Status Code: 404

Exception: Stacktrace: (none)

Generated by Winstone Servlet Engine v0.9.10 at Tue Nov 13 11:50:31 CET 2012

Cucumber JVM Version 1.1.1 Jenkins Version 1.488

BR noww

kingsleyh commented 11 years ago

fixed in trunk

amsathishkumar commented 10 years ago

Hi All

i have download the source from the git repo ans user the maven goal "clean test" to run. how to generate the .hpi from the source code for the jenkins plugins.