Slide 1

Slide 1 text

VODQA Behaviour Driven Tests with Selenium Webdriver - SANDHYA SASIDHARAN

Slide 2

Slide 2 text

About me

Slide 3

Slide 3 text

As Quality enthusiasts What bothers us the most?

Slide 4

Slide 4 text

Requirement Defects Implementation Defects Defects Atleast 50%

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Domain Human language Business profit/loss Code Services Technical Test Implement Client U I

Slide 7

Slide 7 text

Specifications

Slide 8

Slide 8 text

BDT ❖ If shifts focus from pure test scenarios to ‘Specifications’! ❖ Helps capture the behaviour of the application from the point of view of the stakeholders ❖ Lets technical and non-technical stakeholders validate/ contribute to the tests and be on the same page ❖ All about writing executable specifications

Slide 9

Slide 9 text

BDT with Cucumber-jvm

Slide 10

Slide 10 text

Gherkin Syntax ❖ Feature ❖ Scenario ❖ Given-When-Then ❖ But, And ❖ *

Slide 11

Slide 11 text

Gherkin Syntax (contd.) ❖ Background

Slide 12

Slide 12 text

Gherkin Syntax (contd.) ❖ Scenario Outline and Examples

Slide 13

Slide 13 text

Hooks Cucumber supports hooks, which are blocks of code that run before or after each scenario Before and After Tagged Hooks

Slide 14

Slide 14 text

Quick Setup Steps ❖ Create a Java project ❖ Add Selenium libraries ❖ Add Cucumber libraries ❖ cucumber-core ❖ cucumber-java ❖ cucumber-junit ❖ cucumber-jvm-deps ❖ cucumber-reporting ❖ gherkin ❖ junit ❖ Install Eclipse Cucumber plugin

Slide 15

Slide 15 text

Demo in Eclipse

Slide 16

Slide 16 text

Cucumber Reports ❖ Formats ❖ html ❖ JSON

Slide 17

Slide 17 text

When not to choose BDD? ❖ Assess your project before you choose BDD ❖ Very short term project ❖ Not many new on-boarding ❖ When you are sure that business will not get involved

Slide 18

Slide 18 text

Other BDD tools ❖ Cucumber ❖ Specflow ❖ JBehave ❖ Gauge ❖ Rspec ❖ Jasmine

Slide 19

Slide 19 text

Thank you! Questions?