Skip to content
Advertisement

Tag: cucumber

How do I get the name of the Scenario step currently executing?

I’m logging the currently executing Scenario in a hook like so: But, how do I get the name of the Step? I mean, the Given, When, Then lines. Answer You would need to implement the ConcurrentEventListener interface and setup the handlers for the event you are looking for, in your case the TestStepStarted event Then implement the method handTestStepStarted

Gradle Build Error in Multi-module project: java.lang.NoClassDefFoundError: at groovyjarjarasm.asm.signature.SignatureReader.parseType

I’m getting Execution failed for task ‘:app-specification:compileTestGroovy’ along with org.gradle.api.tasks.TaskExecutionException: when trying to build gradle. This is a multi-module gradle project with the first module being the main app(SpringBoot app) with some Spock tests and the other module which consists of Cucumber specifications(feature files and step definitions). The gradle build occurs at specifications, which uses the main spring boot application

Cucumber feature file isn’t bound to glue path

I am trying to set up a simple Cucumber project to run with Selenium (The Selenium bits are irrelevant so I removed them). The structure is as follows: sayHiTest.feature: testRunner.java: SayHiTestStepsdefs.java: Trying to run testRunner yields the following error: For some reason, it doesn’t see automated.SayHiTestStepdefs (It prints the same error if I changed its name to say, abc.SayHiTestStepdefs). I

Java cucumber Selenium : NullPointerException for scenario.write for the first scenario on before tag

I am getting the NullPointerException when the code below code is executed. Note that the exception is recieved only for the first cucumber scenario executed. There is no exception for the second scenario. I am actually trying to insert the timestamp before start of each scenario. Please advise how this issue can be fixed. Any help will be appreciated. I

Getting an exception “org.apache.maven.surefire.booter.SurefireBooterForkException: . VM crash or System.exit called?”

I am working on a Selenium Automation project which is based on Maven Cucumber + TestNg. While on run i am getting the below exception not sure but tried all the possibilities of incrementing or decrementing the Surefire versions. Error occurred in starting fork, check output in log Process Exit Code: 1 org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying

Advertisement