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
3 votes
8 answers
1k views

Can one step on test case contain more than one expected result?

Is it so that each step in a test case must be specific and contain only one expected result? The context is for combine UI and functionality testing. For example, when clicked button X user should be ...
Safarina Lutfiyya's user avatar
5 votes
2 answers
724 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 ...
agvera's user avatar
  • 131
2 votes
3 answers
306 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 ...
JordiLaForge's user avatar
0 votes
3 answers
1k 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 ...
Matt's user avatar
  • 163
2 votes
2 answers
605 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 ...
srinivas trully's user avatar
3 votes
0 answers
911 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 ...
Vedant Kulkarni's user avatar