Forum Discussion
- aslakhellesoySmartBear Alumni (Retired)
This is currently not possible. It's not something we're likely to add support for either.
- mpkorstanjeOccasional Contributor
I got the impression this wasn't a feature request but rather a "How do I do x" disguised as one.
To attach datapackage io.cucumber.examples.java;
import io.cucumber.java.Before;
import io.cucumber.java.Scenario;
import io.cucumber.java.en.Given;
public class RpnCalculatorSteps {
private Scenario scenario;
@Before
public void after(Scenario scenario) {
this.scenario = scenario;
}
@Given("I log some data")
public void log_some_data(){
scenario.attach("{hello:\"World\"}", "application/json", "hell-world.json");
}
}This then shows up in the report as:
Given I log some data{hello:"World"}
- aslakhellesoySmartBear Alumni (Retired)
Well spotted XY problem mpkorstanje !