Vijay & Supriya - Test your service not your ui

30
Test your service not your UI By Vijay and Supriya

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

Page 1: Vijay & Supriya - Test your service not your ui

Test your service not your

UI By Vijay and Supriya

Page 2: Vijay & Supriya - Test your service not your ui

Meet Tejal

Tejal– Six yrs in QA

Automation Expert

Tools that she uses

Selenium, Watir and QTP

Attends Conferences

Nickname – “Bug Hunter”

Page 3: Vijay & Supriya - Test your service not your ui

How does Tejal test? Browser

Selenium

U

I

L

A

Y

E

R

Page 4: Vijay & Supriya - Test your service not your ui

Tejal wants to test the movie

booking flow

Page 5: Vijay & Supriya - Test your service not your ui

Her automation approach

Page 6: Vijay & Supriya - Test your service not your ui

What’s troubling Tejal?

Page 7: Vijay & Supriya - Test your service not your ui

Tests are High Maintenance

• Change in UI

Page 8: Vijay & Supriya - Test your service not your ui

Tests are Flaky

• Page load handling

• Ajax

Page 9: Vijay & Supriya - Test your service not your ui

Longer Time to execute

100 tests take 3 hours to

execute

Page 10: Vijay & Supriya - Test your service not your ui

Tool Limitations

Handling custom controls

Handling modal dialogs

Page 11: Vijay & Supriya - Test your service not your ui

Tejal needs Ideas

Page 12: Vijay & Supriya - Test your service not your ui

Tejal attends vodQA in Pune

Page 13: Vijay & Supriya - Test your service not your ui

Tejal meets Ram And explains to him

her sob story

Page 14: Vijay & Supriya - Test your service not your ui

Meet Ram

Ram – 8 yrs in QA

Automation Expert

Tools used – Selenium, QTP,

Watir, Fitnesse

Likes to try new things

Page 15: Vijay & Supriya - Test your service not your ui

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

Page 16: Vijay & Supriya - Test your service not your ui

Ram’s automation approach

SearchMovieService(City, TheatreName, MovieName,

Date, Time, NoOfSeats).

SelectSeats(A1, A2, A3).

MakePayment(CardNo, CardExpiry, Pin).

VerifyConfirmation();

Page 17: Vijay & Supriya - Test your service not your ui

What are the benefits?

Page 18: Vijay & Supriya - Test your service not your ui

Shorter time to execute

• No browser/application

startup

• Devoid of elements

• Tests run “super fast”

Page 19: Vijay & Supriya - Test your service not your ui

Only needs an IDE

No tool limitations

xUnit framework

Page 20: Vijay & Supriya - Test your service not your ui

Tests are Low Maintenance

• Business process seldom

changes

Page 21: Vijay & Supriya - Test your service not your ui

Manual Exploratory testing

• Automating tests is faster

• More time for

exploratory testing

Page 22: Vijay & Supriya - Test your service not your ui

Wait, Tejal has some questions …

Page 23: Vijay & Supriya - Test your service not your ui

What should be covered as part of Service

testing?

Page 24: Vijay & Supriya - Test your service not your ui

What happens to UI Functionality

testing?

Page 25: Vijay & Supriya - Test your service not your ui

Are you not duplicating tests created by Devs?

Page 26: Vijay & Supriya - Test your service not your ui

Tejal is now happy

Page 27: Vijay & Supriya - Test your service not your ui

The End

And tejal started testing happily ever after

Page 28: Vijay & Supriya - Test your service not your ui

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)

Page 29: Vijay & Supriya - Test your service not your ui

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

Page 30: Vijay & Supriya - Test your service not your ui

Questions