Contributions
Dynamic Test Runner
Hi, Is there any documentation or tutorial to invoke a feature to run dynamically? I have a properties file that includes the tags that should be ran. After I save the property into a string, how can I run the test runner with said cucumber options? Thank you1.7KViews0likes1CommentRe: How to fetch if the test passed or failed in the After hook
I have found a partial solution for my issue by using the After Hook: @After public void tearDown(Scenario scenario) { if(scenario.isFailed()){ //Code here }else if(scenario.getStatus().toString().equalsIgnoreCase("passed")){ //Code here } driver.quit(); } However, the second part of my issue is to fetch the Reason why the Scenario failed. I have tried using the Arguments : @After public void tearDown(Scenario scenario, Step step) { And cucumber does not support that. Is there a way I can access the failed step reason?3 years agoPlace Cucumber OpenCucumber Open2.4KViews0likes0CommentsHow to fetch if the test passed or failed in the After hook
Hi, I would like to know how can I implement an After hook that does an action if the test failed or passed. For example, please check the follow snippet of a sample where I can handle the step state with the reason of failing. if( Step.failed() ){ System.out.println("The test failed due to this reason " + Step.failReason()); }else if( Step.passed(){ System.out.println("The test passed with no issues"); } I am using Cucumber Open Source with Appium/Selenium Libraries.3 years agoPlace Cucumber OpenCucumber Open2.4KViews0likes1Comment