Questions tagged [step-definitions]

Step Definitions is where the automation code is written. The steps in the gherkin file directly map to the step defintions. Each step in the gherkin maps to a step definition that in turn contains a block of code that gets executed when the scenario is ran.

Filter by
Sorted by
Tagged with
5
votes
2answers
201 views

Actual Steps in Step Definition or Call Test Cases in Step Definition, What's the Best Practice?

I'm currently working on a Cucumber project using Katalon Studio, and I'm not sure if... I need to directly write the test items on Step Definition file OR Should I call the test cases in Step ...
2
votes
3answers
86 views

Behavioural Gherkin Steps requiring complex Step Definitions when Automating

I'm currently part of a team that is trying to reinforce BDD in our tests and automation. Our tests up to this point were procedural and we want to move towards behavioural steps. An example of our ...
0
votes
3answers
283 views

Cucumber feature file steps not requiring a step def

This seems like an obvious question to me but I cant seem to find an answer on it anywhere which is making me think its a practice that I shouldn't be doing. I have a feature file step which is there ...
2
votes
2answers
243 views

What is the purpose of splitting a cucumber Step Definition file

As per my understanding, a single step definition file methods can be reused by steps with the same name in other feature files. then, what is the purpose of splitting a single cucumber Step ...
3
votes
0answers
712 views

Why am I getting a NullPointerException with different classes for Cucumber? [closed]

Currently I am unable to run classes present in different step definition files in cucumber under same package.How do I make it run? I am getting a NullPointerException in the console for the methods ...