Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Test Automation Framework using Cucumber BDD overview (part 1)


Published on

This seminar is about understanding BDD concepts. This includes overview of test automation framework using Cucumber/Java.

Published in: Software
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ ◀ ◀ ◀ ◀
    Are you sure you want to  Yes  No
    Your message goes here

Test Automation Framework using Cucumber BDD overview (part 1)

  1. 1. Test automation framework using Cucumber: BDD overview Part-1 of 3 Jayprakash Mourya SQA @Mindfire Solutions
  2. 2. Agenda ● What is BDD/TDD ● Why to use BDD ● Cucumber implements BDD ● Creating the Maven Project ● Downloading the Maven Dependencies for Cucumber,junit ● Preparing Features File having test scenarios ● Writing a step definition ● Given, When, Then, And, But annotations and usage in feature file ● Writing Runner Class ● Passing parameters in Step Functions
  3. 3. TDD Test Driven Development
  4. 4. TDD in summary ● First we write a test. ● Then we write code to make the test pass. ● Then we find the best possible design for what we have - re-factoring (Relying on the existing tests to keep us from breaking things while we are at it)
  5. 5. Steps to start TDD ● Analyze the requirements and write the list of tasks or features ● Pick a task ● Brainstorm a list of tests for the task or feature ● Review the tests list and pick a test ● Write the test case ● Run the test case and see it fails to compile ● Write only enough code that the test case compiles ● Run the test and see running the code fails ● Write only enough code to just pass the test ● Re-factor the production code and eliminate duplication ● Repeat
  6. 6. BDD Behavior Driven Development
  7. 7. Why BDD ● It provides framework for matching the simplicity of the customers requests against an actual running application and reporting back what is working and what is not ● From the developers point of view, it validates that they are not missing anything at the higher level their unit tests may have missed. ● Gherkin is the language that Cucumber understands. It is a Business Readable, Domain Specific Language that lets you describe software’s behavior without detailing how that behavior is implemented. ● Reusable, copy & paste
  8. 8. What is in here for QA ??? Let's see....a demo
  9. 9. Jars required ● Junit 4.11 ● Cucumber-html 0.2.3 ● Cucumber-core 1.1.8 ● Cucumber-junit 1.1.8 ● Cucumber-java 1.1.8
  10. 10. Queries......
  11. 11. Thank you! -Reach out to me Skype: jayprakash.mourya