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 Definition and then create a separate Test Case that would call the Feature file using the Step Definition?

    I've searched about this and there aren't so many guides on how to PROPERLY do it, only how to properly write Gherkin format. Basically what I'm after is to know the best practices in the industry using BDD Katalon Studio Projects



  • I personally divide the logic into three levels:

    1. feature file (Cucumber),
    2. step definition (Cucumber + Java),
    3. page objects (Selenium and Java).

    Cucumber separates business logic from the programming logic (1. and 2.) and the page object pattern separates test methods from the pages locators.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2