Vijay & Supriya - Test your service not your ui

Post on 15-Jan-2015

751 views 0 download

Tags:

description

Test your service not your ui - presented in vodQA - THE TESTING SPIRIT! on Oct 7, 2010 in ThoughtWorks, PuneOrganization: ThoughtWorks

Transcript of Vijay & Supriya - Test your service not your ui

Test your service not your

UI By Vijay and Supriya

Meet Tejal

Tejal– Six yrs in QA

Automation Expert

Tools that she uses

Selenium, Watir and QTP

Attends Conferences

Nickname – “Bug Hunter”

How does Tejal test? Browser

Selenium

U

I

L

A

Y

E

R

Tejal wants to test the movie

booking flow

Her automation approach

What’s troubling Tejal?

Tests are High Maintenance

• Change in UI

Tests are Flaky

• Page load handling

• Ajax

Longer Time to execute

100 tests take 3 hours to

execute

Tool Limitations

Handling custom controls

Handling modal dialogs

Tejal needs Ideas

Tejal attends vodQA in Pune

Tejal meets Ram And explains to him

her sob story

Meet Ram

Ram – 8 yrs in QA

Automation Expert

Tools used – Selenium, QTP,

Watir, Fitnesse

Likes to try new things

How does Ram test? Browser

Selenium (For Smoke testing only)

Service Layer

U

I

L

A

Y

E

R

Regression tests written at

service layer

Database Layer DB

Ram’s automation approach

SearchMovieService(City, TheatreName, MovieName,

Date, Time, NoOfSeats).

SelectSeats(A1, A2, A3).

MakePayment(CardNo, CardExpiry, Pin).

VerifyConfirmation();

What are the benefits?

Shorter time to execute

• No browser/application

startup

• Devoid of elements

• Tests run “super fast”

Only needs an IDE

No tool limitations

xUnit framework

Tests are Low Maintenance

• Business process seldom

changes

Manual Exploratory testing

• Automating tests is faster

• More time for

exploratory testing

Wait, Tejal has some questions …

What should be covered as part of Service

testing?

What happens to UI Functionality

testing?

Are you not duplicating tests created by Devs?

Tejal is now happy

The End

And tejal started testing happily ever after

Our Experiences

• Changing mindset wasn’t easy

• 20 Regression E2E tests which run in ~4 minutes

• Entire regression suite would run after every

developer check-in

• Tests were written before UI was ready

Developer Speak

Service tests by our QAs caught some really good

bugs. – Ashish Sharma (Developer)

To Summarize…

Service testing is a

concept worth exploring

Treating the service as an

application which

deserves its own suite of

tests

Both need to co-exist

Questions