{"id":13494,"date":"2017-02-09T00:00:00","date_gmt":"2017-02-09T06:00:00","guid":{"rendered":"https:\/\/centricconsulting.com\/post\/cucumber-framework-create-first-bdd-project_sqat\/"},"modified":"2021-12-15T00:13:47","modified_gmt":"2021-12-15T05:13:47","slug":"cucumber-framework-create-first-bdd-project_sqat","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/cucumber-framework-create-first-bdd-project_sqat\/","title":{"rendered":"Cucumber Framework: How to Use It to Create Your First BDD Project"},"content":{"rendered":"

In this series, we will provide a how-to-guide on applying the Cucumber Framework to lead your agile testing team\u00a0down the path of\u00a0automation.<\/h2>\n

Blog one of a series<\/a>.<\/em><\/p>\n

Imagine this scenario: Your agile testing team is starting to adopt Behavior-Driven Development (BDD) principles by writing Acceptance Criteria and test scripts in the Gherkin (Given-When-Then) format.<\/p>\n

So far, there have been some successes: defect counts have gone down, developers are delivering code faster, and product owners seem to be happier as they get more of what they want.<\/p>\n

But your agile testing team is struggling to get all functional testing done in one sprint. And, regression testing is only being used as needed, which isn\u2019t too often.<\/p>\n

So for this next sprint, your team is going to try using a well-known BDD, Acceptance Test Driven Development, and Agile Testing trick: create and execute your scripts in the Cucumber automation framework<\/a>.<\/p>\n

Getting Started With Cucumber<\/h2>\n

After attending a BDD\/ATDD\/Cucumber\/WebDriver training course and receiving clearance from corporate security to install the needed software, your agile testing team is ready.<\/p>\n

Your team starts by downloading and running Rails Installer, which installs Ruby and some key gems on your laptop, as well as JetBrain\u2019s RubyMine IDE. The final two gems your team will need: Cucumber and TestGen. To install them, they type the following in Command Prompt:<\/p>\n

gem Install cucumber<\/em><\/span><\/p>\n

gem install testgen<\/em><\/span><\/p>\n

\"Cucumber\"<\/a><\/p>\n

Then, to create a project in Command Prompt, go to the RubyMineProjects directory, type the following, and let testgen create the project for you:<\/p>\n

testgen project <project name> –pageobject-driver=watir<\/span><\/em><\/span><\/p>\n

\"Cucumber\"<\/a><\/p>\n

Open the Cucumber project in RubyMine and you are ready to go.<\/p>\n

Understanding the Cucumber Structure<\/h2>\n

Here is what you will see:<\/p>\n