Hello Everyone,
I have been trying to implement how can the different capabilities of Cucumber can be utilized in an automation Framework.
I have come across the following on my research on the internet.
1. Animated Results can be attached to Final Reports of cucumber - Could anybody give a small example with Cucumber Webdriver.
2. Screenshots taken can be attached into the reports.html
However when i tried to implement it in my automation framework which integrates WebDriver and Cucumber; I am unable to get the proper integration.
Attached is the screenshot of my project. Please help and suggest asap.
I have the code inserted here with @After annotation. However i do not know where and how it will be called when steps fail during execution.
1. I have tried failing the steps but at that time this screenshot must have been called. I did not receive any indication of this.
2. I have created this method under a Java class. Should i create it under a Separate class and if yes how do i call it since step definitions do not allow extending to other classes.
Appreciate your time and help in this regard.
Regards,
Swaroop
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@After
public void embedScreenshot(Scenario scenario) {
if (scenario.isFailed()) {
try {
byte[] screenshot = ((TakesScreenshot) FeatureTest.driver)
.getScreenshotAs(OutputType.BYTES);
scenario.embed(screenshot, "image/png");
} catch (Exception e) {
e.printStackTrace();
}
}
}
Regards,
Swaroop
You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/Th6Fev42Vs4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.