tdd - ketan soni

12

Upload: thoughtworks

Post on 20-Aug-2015

805 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: TDD - Ketan Soni
Page 2: TDD - Ketan Soni

Acceptance Test Driven Development (ATDD)

in practice

Ketan Soni

Page 3: TDD - Ketan Soni

BAs specify requiremen

ts

Devs develop

functionality

QAs identify

test scenarios

BAs verifies

functionality

Business sign off

Typical flow in industry

QAs -Testing + automate scenarios

Page 4: TDD - Ketan Soni

From “Functional Test” perspective what all problems / concerns do you guys see in this flow?

From Devs perspective• Late Feedback• Functional test does not help

From QAs perspective• Automation always lags

behind• QA sign off without

automation• Lesser time for exploratory

testing

From Team perspective• Collaboration within Team (Dev/QA/BA)

Page 5: TDD - Ketan Soni

How to overcome problems?

“Begin with the end in mind.” — Stephen R. Covey

One way that worked for us:

Acceptance Test Driven Development (ATDD) is a practice in which the whole team collaboratively discusses acceptance criteria, with examples, and then distills them into a set of concrete acceptance tests before development begins.

Page 6: TDD - Ketan Soni

BA

Login functionality…As a userWhen I enter login credentialsThen I should get authenticated

Page 7: TDD - Ketan Soni

Executable test scenarios in human readable format…

Scenario 1 : Verify valid login credentials…Given I am on login pageWhen I login as username “test” and password “testing”Then I should get authenticated

Scenario 2 : Verify logout functionality…Given I am a logged in userWhen I click on “logout” linkThen I should be logged out

QA

BA

Verify

Page 8: TDD - Ketan Soni

Dev

Application code to make the above statements pass…//Create login page// Implement the back-end for login functionality…

Scenario 1 : Verify login functionality…Given I am on login pageWhen I login as username “test” and password “testing”Then I should get authenticated…

Test Scenario …Scenario 1 : Verify login functionality…Given I am on login pageWhen I login as username “test” and password “testing”Then I should get authenticated

1) Developers run this test scenario and expect it to fail

2) To make the above executable statements pass, developer write the application and implement the login functionality…

3) Developers run the test scenario mentioned in step 1 and expect it to pass…

Page 9: TDD - Ketan Soni

QA

Scenario : Verify login and logout functionality…Given I am on login pageWhen I login as username “test” and password “testing”Then I should get authenticatedWhen I click on “logout” linkThen I should logout

+ Consolidation of test scenarios…

MANUAL TESTING

Page 10: TDD - Ketan Soni

1

QAs + BAs write scenarios

1

Developers implement scenarios

1QAs - Manual Testing

and consolidation of scenarios

Typical ATDD flow…

Page 11: TDD - Ketan Soni

Faster feedback cycleNo Automation Backlog.QA’s get more time to do exploratory testing.Developers think from different angle while

coding.Very less functional bugsNo separate Test case repositoryGreater collaboration within Team

Benefits of ATDD…

Page 12: TDD - Ketan Soni

Questions?