allure-framework / allure-cucumberjvm

Deprecated, use https://github.com/allure-framework/allure-java instead
Apache License 2.0
16 stars 13 forks source link

Attachments on Cucumber-jvm #26

Closed Jiwari closed 8 years ago

Jiwari commented 8 years ago

I'm having problems attaching files to the Allure report

This is my step @Given("^some step to be ran$") @Attachment(value = "Page screenshot", type = "image/png") public byte[] takeScreenshot() { return ((TakesScreenshot) Chrome.getDriver()).getScreenshotAs(OutputType.BYTES); }

I have seen a lot of similar questions, but the solution always was about the -javaagent, which mine is correctly set on the pom. -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"

Is there something I'm missing?

clicman commented 8 years ago

I was created branch for you. Look here. Try mvn clean test on it. All steps will with screenshots.

Jiwari commented 8 years ago

I cloned your project, compared the pom and found the problem. Under my maven-surefire-plugin I had a second argLine that I was using for the encoding, this was overwriting the argLine for the javaagent. I merged both args into one and now it's working. Thanks for the help!