reportportal / agent-java-cucumber4

Cucumber JVM version [4.0.0; 5.0.0) adapter
Apache License 2.0
6 stars 9 forks source link

Corrupt image attachments in 5.3 using cucumber integration #66

Closed babantax closed 4 years ago

babantax commented 4 years ago

Describe the bug Since we upgraded to RP version 5.3, our projects using agent-java-cucumber4(currently using 5.0.0-BETA-10) are logging corrupted screenshots.

To Reproduce

See comparation between one screenshot properly saved (on the left) and the same saved after upgrade to 5.3 (on the right and not working)

image

evjlobanova commented 4 years ago

@HardNorth Vadzim could you please check, if this issue relates to agent?

babantax commented 4 years ago

We didn´t change anything apart from the upgrade from rp 5.0 to 5.3

babantax commented 4 years ago

Has anyone apart from me reported this issue? Its very strange, after upgrade to rp 5.3, we didin´t change anything in the cucumber integration and screenshots don´t work but projets using serenity-integration are saving screenshots properly....

HardNorth commented 4 years ago

@babantax BETA-10 is a pretty old agent. Have you tried newer one?

babantax commented 4 years ago

Yes but newer versions break our project because of depencencies problems. Was working fine until we updated to RP 5.3

HardNorth commented 4 years ago

@babantax what kind of problems? I can't help you in any case if you are unable to use the newest agent.

HardNorth commented 4 years ago

I'm 99% sure that the issue caused by an old agent version. Since it contains a bug of missed mime type for attachments. That means in most cases it will be transferred as a text and randomly damaged by servers. Whenever one of them decide to change the text encoding or line endings.

babantax commented 4 years ago

The problem is that newer versions of the agent make our project break. Depencies seem not compatibles.

HardNorth commented 4 years ago

@babantax To help you with the problem I need to know what's wrong. Could you be more specific? What exactly breaking?

kristianadidas commented 4 years ago

Hi @HardNorth , We tried up to agent-java-cucumber4 5.0.0-BETA-12 using cucumber 4.8.1. But the issue @babantax reported is still reproducible after upgrading RP to 5.3.

Are you saying that those versions are not compatible and our only solution is to upgrade to newer version of cucumber and agents ? If so could you please tell us the minimum supported versions so that we can plan the work accordingly, doing a version change to cucumber 5 and newer agents requires some code refactoring in our framework.

Kind Regards, Kris.

HardNorth commented 4 years ago

@kristianadidas You can still use cucumber 4, just newer agent. The fix was introduced in 5.0.0-BETA-13: https://github.com/reportportal/agent-java-cucumber4/releases/tag/5.0.0-BETA-13

Just read the release notes.

And the newest version is actually 5.0.0-BETA-15: https://github.com/reportportal/agent-java-cucumber4/releases

kristianadidas commented 4 years ago

Thanks @HardNorth , There were some issues with cucumber 4.8.1 and going above agent BETA-12, i think it was mostly dependencies related. I'll upgrade to BETA-15 and see if there are any issues.

HardNorth commented 4 years ago

@kristianadidas Again, could you be more specific, which kind of issues? I need details to help you.

kristianadidas commented 4 years ago

The error we got is java.lang.NoClassDefFoundError: Could not initialize class com.epam.reportportal.cucumber.Utils With cucumber runner plugins set to plugin = {"json:target/report-json/Runner.json", "html:target/Runner", "com.epam.reportportal.cucumber.ScenarioReporter"}, But for now i'm trying to figure out if its related to our setup or not, before i reach out for support. Still if you have any ideas all commets are welcome.

HardNorth commented 4 years ago

@kristianadidas Now I can catch a thread, at least. Do you include cucumber cucumber-java dependency by yourself or you rely on ours?

kristianadidas commented 4 years ago

Hi @HardNorth ,

We might have found a fix using the latest version BETA-15 and cucumber 4.8.1. Last time we tried BETA-15 was not out yet and images still did not work.

We will test the setup now and if everything is working fine ill comment back here.

HardNorth commented 4 years ago

No response