test automation, agile testing; dev ops summit hyderabad bdd with cucumber

18
Name of the Speaker : Dharmender Srivastav Company Name : Thoughtworks

Upload: dharmender-srivastav

Post on 07-Jan-2017

57 views

Category:

Technology


0 download

TRANSCRIPT

Name of the Speaker : Dharmender SrivastavCompany Name : Thoughtworks

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

Define BDD in agile methodology Answer Specification and Example ScenariosCucumber as BDD framework Anti-patterns

YOU’LL BE ABLE TO…

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

BDD?Behavior Driven Development

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

TDD ATDD BDD

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

Uses examples to illustrate behavior Core is around conversations and requirements discovery Uses conversations around examples, expressed In a form that can be easily automated Starting with the business outcome, and working through high level functional areas to drill into specific stories with acceptance criteria. When writing examples, regression tests are a by-product

BEHAVIOR DRIVEN DEVELOPMENT ?

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

SPECIFICATION BY EXAMPLE…

Specification by example is a way to:

Express outcomes

Focus is on a story/ feature not a test.

Focus is to deliver business value.

Written in a language relevant to domain.

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

FORMAT OF SPECIFICATION

Feature: [Business relevance] As an [actor]

I want to [goal]

So that [benefit]

Scenario: [An example]

Given [pre-condition] When [action]

Then [the benefit of action]

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

TOOLS

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

CUCUMBER

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

Collaboration tool It’s Testing toolOutside-In approach , where programmers incrementally write code and run the scenarios using Cucumber until the feature passes all the testsSupports about 60+ languages Helps to execute plain text functional descriptions as automated testsAutomation can be written in own favorite language ( Ruby, Java, c#.net , JavaScript, Scala, Groovy, Jython, Python, Perl, Go, C++ etc)writing scenarios before code enables programmers to be guided by an unambiguous specification

CUCUMBER

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

SCENARIO Scenario: [An example]

Given [pre-condition] When [action]Then [the benefit of action]

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

LET’S LOOK AT AN EXAMPLE Given John bought a fridge for £150

And the fridge was on 10% discount

When the store offers a refund

Then John should get back £135

Is this the only outcome that matters?

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

BENEFITS Better communication Better collaboration between stakeholders; QA, BA and Developers Formal documentation is not required Living documentation (Single source of truth) Quick feedback Right Focus, Right Product, Product Right

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

Given John bought a fridge for £150

And the fridge was on 10% discount

And there was a discount of 10%

When John presents a valid credit card

Then John is charged only £135

When John returns the fridge

Then the fridge is checked if it is in working order

And refund preference is recorded

And refund is processed

When the store offers a refund

Then John should get back £135

Is this the only outcome that matters?

ANTI-PATTERN: EXAMPLE

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/

PITFALLS It requires high level of business engagement and collaborations May not work with silos Poorly written features can lead higher maintenance costs

THANK YOU

Speaker Name: Dharmender SrivastavEmail ID: [email protected] byUNICOM Trainings & Seminars Pvt. [email protected]

http://www.unicomlearning.com/2016/Test_Automation_Agile_Testing_and_DevOps_Summit_Hyderabad/