Closed Sourabh25 closed 6 years ago
I am guessing you are trying to make a report of the executed steps. Check out the existing implementations of the Plugin
interface.
Thanks for your response. @mpkorstanje Yes you are right. I am trying to make a report of the executed steps.
I don't follow what you mean by implementations of Plugin Interface. Could you please elaborate a bit.
Thanks, Sourabh
It's what prints the pretty output when you use --plugin pretty
or the equivalent in @CucumberOptions
.
My code in the runner is testNGCucumberRunner.runScenario(pe); where pe is the PickleEvent. Now this will run the entire scenario.
While executing the scenario how can i handle the steps even using PrettyFormatter. Kindly advise @mpkorstanje
When you create the testNGCucumberRunner
you provide it with a class argument. The @CucumberOptions
annotation from this class are used to configure cucumber.
Have a look at the testng example: https://github.com/cucumber/cucumber-jvm/tree/master/examples/java-calculator-testng
For the right usage of testNGCucumberRunner
have a look at the class the runner extends: https://github.com/cucumber/cucumber-jvm/blos b/master/testng/src/main/java/cucumber/api/testng/AbstractTestNGCucumberTests.java
But this isn't really the right place to get help for using Cucumber.
@mpkorstanje So as per the link https://github.com/cucumber/cucumber-jvm/blob/master/testng/src/main/java/cucumber/api/testng/AbstractTestNGCucumberTests.java
we have the below code @Test(groups = "cucumber", description = "Runs Cucumber Scenarios", dataProvider = "scenarios") public void runScenario(PickleEventWrapper pickleWrapper, CucumberFeatureWrapper featureWrapper) throws Throwable { // the 'featureWrapper' parameter solely exists to display the feature file in a test report testNGCucumberRunner.runScenario(pickleWrapper.getPickleEvent()); }
so in this step, testNGCucumberRunner.runScenario(pickleWrapper.getPickleEvent()); is there any way , i can handle the steps in the scenario. If not can I get an api to access these step.
Please let me know if my question or requirement is not clear
Please use the support forums for questions and discussions. We use GitHub issues to track bugs and contributions exclusively.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi,
I have a requirement to handle the cucumber steps . Now in the implementation, the TestCase class in the cucumber.runner package is private.
I want to do something like below:
Please let me know is there a way I can achieve it.
Thanks, Sourabh