Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Why do embedded screenshots from Cucumber JSON report don't appear as evidence


I take screenshots at the end of a cucumber test run whenever a scenario fails. This happens in the after hook with this code (java):

public void scenarioRunTearDown() {
if( currentScenario.isFailed() ) {

byte[] screenshot = ((TakesScreenshot)this.driver).getScreenshotAs( OutputType.BYTES);
currentScenario.embed( screenshot, "image/png" );
else {
LOG.debug( "scenario passed" );


After the cucumber JSON gets imported to a Test Execution in JIRA/Xray the embedded screenshot appears in the steps (examples in case of a Scenario Outline):

Screen Shot 2018-04-19 at 11.39.21.png

The attachment is rather hard to find as this odd eye-icon is hard to spot, if you don't know what to look for. Besides this, the screenshot is not attached to a step where the exception happened, but to another one.

At the same time there already is a place to save execution evidences at the top of an Test Execution details page. Unfortunately the attached screenshot does not appear here:

Screen Shot 2018-04-19 at 11.48.47.png

So... what am I doing wrong here? How do I attach screenshots to a Cucumber JSON report, so that they appear at the right step and in the Execution Evidences box in a Test Execution?

1 answer

0 votes

Hi Majchman,

The problem should be the format, please follow the Xray Json format described in our documentation here and here.
Using this method and format you should be able to manage to obtain the result you need.
As the format you are currently using is for cucumber steps so every evidence you provide through that method will be understood as step evidences.


Best regards,

Xpand Add-ons Team

How do we get Cucumber Execution Results properly translated to Xray Json format? Is the intended workflow that everyone using Cucumber should write a custom translator from Cucumber -> Xray?

Like # people like this

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events