Making Your Test Automation Transparent

9
T15 Test Automation 10/16/2014 1:30:00 PM Making Your Test Automation Transparent Presented by: Subodh Parulekar AFour Technologies, Inc. Brought to you by: 340 Corporate Way, Suite 300, Orange Park, FL 32073 888-268-8770 ∙ 904-278-0524 ∙ [email protected] ∙ www.sqe.com

Transcript of Making Your Test Automation Transparent

T15 Test Automation

10/16/2014 1:30:00 PM

Making Your Test Automation Transparent

Presented by:

Subodh Parulekar

AFour Technologies, Inc.

Brought to you by:

340 Corporate Way, Suite 300, Orange Park, FL 32073 888-268-8770 ∙ 904-278-0524 ∙ [email protected] ∙ www.sqe.com

Subodh Parulekar

AFour Technologies, Inc. Subodh Parulekar has more than eighteen years of software engineering experience, with expertise in software testing and quality engineering, solutions architecture, and creation of new services. Subodh is the CEO of AFourTech (afourtech.com), a provider of software testing and QA services with testing labs in Redmond, WA, and Pune, India. Prior positions included co-head of MindTree's testing business unit; VP and head of the itest Practice at Aztecsoft, through the acquisition of Disha Technologies; and developer of embedded software for Metawave Communications in Redmond and Nortel Networks in Ottawa.

Subodh'Parulekar'

Making Your Test Automation Transparent

www.afourtech.com'

Dev$

Release$Manager$

BA$

I’m adding a few new

features. Here are the user

stories.

I have added new code. Want to quickly check

with some tests

QA$

OK. I’ll fire off the runs now. I’ll send you the report.

QA$

Thanks! I’ll get started on automating

them

Bug'

Tracker'QA$ Dev$

BA$QA$

QA$

We cannot automate User Story 0034 since,

*rules*… *rules*… *rules*… *rules*

*Thinking* … Will I get this release out in

time?

A0er$a$few$hours/days$

A0er$a$few$hours/days$

Here’s the

Report!

Done automating! Here’s the

execution report!

Agility'Automa:on'A<tude'Ap:tude'Is'Everyone'on'the'Same'Page?'

ReDwri:ng'700+'test'cases'

Need'for'all'stakeholder'involvement'in'the'QA'process'

Easily'decipherable'Test'Results'

Test'from'Anywhere'

Test'Coverage'Analysis'

The'Problem'Statement' Agility'Automa:on'A<tude'Ap:tude'

Solu:on'Approach'–'BDD'

The$BDD$Approach$

A0er:$Given&the&login&screen&is&open & &'When&I&enter&“Batman”&as&username & &'And&I&enter&“BruceWayne”&as&password&&And&I&click&on&“Login” &'Then&the&page&“Bat&Cave”&should&open & &'&Given&the&login&screen&is&open&When&I&enter&“Batman”&as&username&And&I&enter&“TheRiddler”&as&password&And&I&click&on&“Login”&Then&the&error&message&“Sorry,&try&again”&should&be&displayed&

Before:$LoginPage&loginPage=new&LoginPage(“hGp://theloginpage.com/”);&HomePage&homePage=loginPage.doLogin(“Batman”,”BruceWayne”);&Assert.areEqual(homePage.Ptle,WebDriver.geRtle(),”Login&Failed”);&

Need'for'all'stakeholder'involvement'in'the'QA'process'

Solu:on'Approach'–'BDD'Solu:on'Approach'–'BDD'Agility'Automa:on'A<tude'Ap:tude'

Solu:on'Approach'–'A'liMle'bit'about'BDD'

•  Behavior'Driven'Development'in'Test'

When&I&enter&“Batman”&as&username'Given&the&login&screen&is&open'

Then&the&page&“Bat&Cave”&should&open'

Scenario:*Login*with*a*valid*username*and*password*Given&the&login&screen&is&open'When&I&enter&“Batman”&as&username'And&I&enter&“BruceWayne”&as&password'Then&the&page&“Bat&Cave”&should&open&&

Scenario:*Login*with*an*invalid*password*Given&the&login&screen&is&open&When&I&enter&“Batman”&as&username&And&I&enter&“TheRiddler”&as&password&Then&the&error&message&“Sorry,&try&again”&should&be&displayed&

Feature:*As*a*user*with*valid*creden9als*I*should*be*able*to*successfully*login*So*that*I*can*use*the*features*of*the*applica9on*&Scenario:&Login&with&a&valid&username&and&password&Given&the&login&screen&is&open'When&I&enter&“Batman”&as&username'And&I&enter&“BruceWayne”&as&password&And&I&click&on&“Login”'Then&the&page&“Bat&Cave”&should&open&&Scenario:&Login&with&an&invalid&password&Given&the&login&screen&is&open&When&I&enter&“Batman”&as&username&And&I&enter&“TheRiddler”&as&password&And&I&click&on&“Login”&Then&the&error&message&“Sorry,&try&again”&should&be&displayed&

Solu:on'Approach'–'A'liMle'bit'about'BDD'Solu:on'Approach'–'A'liMle'bit'about'BDD'Agility'Automa:on'A<tude'Ap:tude'

Solu:on'Approach'–'Wrapper'

Crea>ng$a$wrapper$around$the$exis>ng$WebDriver$code$

ReDwri:ng'700+'test'cases'

Given&the&login&screen&is&open'

BDD$ Selenium$Step$Defini>ons$

LoginPage&loginPage=new&LoginPage(“hGp://theloginpage.com/”);&

When&I&enter&“Batman”&&as&username' loginPage.username=“Batman”;&

And&I&enter&“BruceWayne”&as&password'

loginPage.password=“BruceWayne”;&

Then&the&page&“Bat&Cave”&should&open'

homePage.Ptle=“Bat&Cave”;&Assert.areEqual(homePage.Ptle,WebDriver.geRtle(),”Login&Failed”);&

A'‘Scenario'Outline’'can'be'used'to'create'dataDdriven'tests:'

When'I'enter'<username>'as'username'

And'I'enter'<password>'as'password'

Examples:'

|username '|password|'

|Batman '|BruceWayne|'

|Batman '|TheRiddler|'

HomePage&homePage=loginPage.doLogin(username,password);&And&I&click&on&“Login”'

Solu:on'Approach'–'Wrapper'Solu:on'Approach'–'Wrapper'Agility'Automa:on'A<tude'Ap:tude'

Solu:on'Approach'–'Test'Management'Dashboard'

Changing$the$way$Test$Results$are$displayed$•  Integra:on'between'Scenarios'&'Results'

•  Live'Repor:ng'

•  Test'Management'Dashboard'

Solu:on'Approach'–'Test'Management'Dashboard'Solu:on'Approach'–'Test'Management'Dashboard'

Agility'Automa:on'A<tude'Ap:tude'

Solu:on'Approach'–'Segrega:ng'Errors'

Easily'decipherable'Test'Results'

Excep:on'

Encountered'

Type'of'

Statement'

Log'as'

“Environmental'

Error”'

Segregate'as'per'

Excep:on'Type'

Config'

XML'Type'of'

Excep:on'

Log'as''

“Func:onal'Error”'

If'“Given”''

or'“When”'

If'“Then”'

www.afourtech.com'>'Desk'>'Resources'

Solu:on'Approach'–'Segrega:ng'Errors'Solu:on'Approach'–'Segrega:ng'Errors'Agility'Automa:on'A<tude'Ap:tude'

Solu:on'Approach'–'Test'from'Anywhere'

Test'from'Anywhere'

Harnessing$the$power$of$CI$•  Integra:ng'the'test'environment'with'Jenkins'

•  Integra:ng'the'Test'Management'Dashboard'with'Jenkins'API'

Solu:on'Approach'–'Test'from'Anywhere'Agility'Automa:on'A<tude'Ap:tude'

Solu:on'Approach'–'Test'Coverage'

Test'Coverage'Analysis'

Deriving$Coverage$Analysis$using$BDD$tagging$•  BDD'provides'the'ability'to'tag'(“@”)'a'scenario'

•  We'have'used'this'as'a:'

•  Filter'for'test'runs'

•  Medium'for'Test'Coverage'Analysis'

@Authen9ca9on*@Posi9veScenario*@P0*@Sanity*Scenario:&Login&with&valid&credenPals&Given&the&login&screen&is&open&When&I&enter&“Batman”&as&username & &'And&I&enter&“BruceWayne”&as&password & &'Then&the&page&“Bat&Cave”&should&open &'

Solu:on'Approach'–'Test'Coverage'Agility'Automa:on'A<tude'Ap:tude'

Solu:on'–'S:tching'It'All'Together'

The$Framework$

Anyone$

Feature'

Files'

Step'

Defini:on'

Classes'

Page'

Classes'

Selenium'

WebDriver'

Engine'

Common'Func:ons'

DB'Read/Write'

File'Read/Write'

XML'Read/Write'

Excep:on'Mapping'

Repor:ng'

…'

Automa:on'

Code'Repo'

DB'

Jenkins'(CI)'

Test'

Machine'

IE10'

Test'

Machine'''

IE9'

Test'

Machine''

IE8'

…'

Test'Management'Dashboard'

Anyone$

Solu:on'–'S:tching'It'All'Together'Agility'Automa:on'A<tude'Ap:tude'

Benefits'

OnDboarding'of'700+'test'cases'in'4'months'

Around'30%'reduc:on'in'CoQ'

Over'40%'increase'in'test'case'development'produc:vity''

BeMer'understanding'of'UAT'scenarios'

More'confidence'across'all'stakeholders'

MIS'

Benefits'Agility'Automa:on'A<tude'Ap:tude'

Thank'You!'

Questions?

Subodh'Parulekar'

www.afourtech.com Follow'Us:'

'''''''''@AFourTech