64
Automate across Pla.orm, OS, Technologies with TaaS Anand Bagmar So#ware Quality Evangelist Principal Consultant, @BagmarAnand

Automate across Platform, OS, Technologies with TaaS

Embed Size (px)

DESCRIPTION

"TaaS" is an open-source product that allows you do achieve the "correct" way of doing integration testing across a variety of products via Test Automation. Typically in organizations, there are multiple projects / products. Many organizations like to have a common Test Automation solution across these products in an effort to standardize the framework. However, this is not a good idea! Each product should be tested using the tools and technologies that are "right" for it. Yet - these different products talk with each other and you need to test the integration between them in an automated way.

Citation preview

Page 1: Automate across Platform, OS, Technologies with TaaS

Automate  across  Pla.orm,  OS,  

Technologies  with  TaaS  

Anand  Bagmar  So#ware  Quality  Evangelist  

       Principal  Consultant,  @BagmarAnand  

Page 2: Automate across Platform, OS, Technologies with TaaS

Organiza@on  Objec@ve  

Time  

Quality  

Money  /  Value  

Page 3: Automate across Platform, OS, Technologies with TaaS

Reality  –  Organiza@ons    are  spread  across  the  World  

Page 4: Automate across Platform, OS, Technologies with TaaS

What  is  a  prac@ce  that  makes  Teams  successful?  

Test  Automa=on  

Page 5: Automate across Platform, OS, Technologies with TaaS

What  is  a  prac@ce  that  makes  Teams  unsuccessful?  

Test  Automa=on  

Page 6: Automate across Platform, OS, Technologies with TaaS

Is  Test  Automa@on  treated  as  1st  class  ci@zen  in  your  organiza@on?  •  Value  –  To  the  team?  –  From  the  team?  

•  Quality  –  Provide  feedback?  –  Built  well?  

Where  is  Test  Automa@on  placed  in  the  Food  Chain  of  SDLC?  

Page 7: Automate across Platform, OS, Technologies with TaaS

Principles  &  Prac@ces    for  Building  a  

Test  Automa@on  Framework  

Page 8: Automate across Platform, OS, Technologies with TaaS

Principles  for  building  an  Automa=on  Framework  

Code  Quality  

Design  PaDerns  

Abstrac=on  Layers  

Refactor  Pairing  

Extend  

Evolve  

Page 9: Automate across Platform, OS, Technologies with TaaS

Prac=ces  for  building  an  Automa=on  Framework  

No  Copy-­‐Paste  

Configurable  

Test  Data  

Tools  &  U=li=es  Logging  

Screenshots,  Video  

Recording  

Con=nuous  Integra=on  (CI)  

Page 10: Automate across Platform, OS, Technologies with TaaS

Audience  Survey  

How  many  of  you  are  part  of  a  large  organiza@on?  

Page 11: Automate across Platform, OS, Technologies with TaaS

Audience  Survey  

What  are  the  average  number  of  products  in  your  organiza@on’s  porVolio?  

…  large  organiza,on?  

Page 12: Automate across Platform, OS, Technologies with TaaS

Audience  Survey  

What  are  the  average  number  of  projects  across  all  these  products?  

…  large  organiza,on?  …  number  of  products?  

Page 13: Automate across Platform, OS, Technologies with TaaS

Audience  Survey  

What  is  the  typical  technology  stack  of  these  products?  

…  large  organiza,on?  …  number  of  products  and  projects?  

Page 14: Automate across Platform, OS, Technologies with TaaS

Audience  Survey  

How  many  of  you  are  part  of  merged  /  acquired  companies?  

Do  you  have  the  same  technology  across  the  “new”  products?  

…  large  organiza,on?  …  number  of  products  and  projects?  …  same  technology  stack?  

Page 15: Automate across Platform, OS, Technologies with TaaS

How  many  of  you  work  in  distributed  teams?  

Audience  Survey  …  large  organiza,on?  …  number  of  products  and  projects?  …  same  technology  stack?  …  merged  companies  –  same  technology  stack?  

Page 16: Automate across Platform, OS, Technologies with TaaS

Audience  Survey  

Have  you  heard  of  a    Common  Test  Automa@on  framework?  

 Good?  Bad?    

Easy?  Difficult?  

…  large  organiza,on?  …  number  of  products  and  projects?  …  same  technology  stack?  …  merged  companies  –  same  technology  stack?  …  distributed  teams?  

Page 17: Automate across Platform, OS, Technologies with TaaS
Page 18: Automate across Platform, OS, Technologies with TaaS

Case  Study  

Page 19: Automate across Platform, OS, Technologies with TaaS

Outlook  Outlook  (Windows)  

Outlook  (Mac)  

Outlook  Web  Access  (OWA)  (Browser)   Outlook  

Sync  (Android)  

…  

Page 20: Automate across Platform, OS, Technologies with TaaS

How  will  you  Automate  the  Tes@ng  for  Outlook?  

Page 21: Automate across Platform, OS, Technologies with TaaS

Outlook  for  Windows  • White  /  QTP  

Outlook  for  Mac  •  Automator  

Outlook  Web  Access  (OWA)  •  Selenium  /  Ruby  

Outlook  Sync  for  Android  •  Robo@um  /  Java  

Page 22: Automate across Platform, OS, Technologies with TaaS

For  a  user  who  has  installed  and  configured  Outlook  on  – Windows  OS  –  desktop  version,  and,  – Android  device  –  na@ve  mobile  app  – …  

An  email  draTed  in  one  product  is  reflected  in  the  other  products    

How  will  you  Automate  the    Integra@on  Test  ….  

Page 23: Automate across Platform, OS, Technologies with TaaS

End-­‐2-­‐End  Integra-on  

Tests  

(Test  Framework  

for)    Outlook  on  Windows  

   

(Test  Framework  

for)  Outlook  Sync  on  Android  

   

Create  &  Save  as  DraE  

1  

Verify  DraE  4  

Verify  DraE    present  2  

Modify  DraE  

3  Orchestrator  

Page 24: Automate across Platform, OS, Technologies with TaaS

Can  you  use  the  same  technology  stack  for  automa=ng  the  tes=ng  

of  each  variant  of  Outlook?  

The  Problem  

Page 25: Automate across Platform, OS, Technologies with TaaS

Outlook  for  Windows  • White  /  QTP  

Outlook  for  Mac  •  Automator  

Outlook  Web  Access  (OWA)  •  Selenium  /  Ruby  

Outlook  Sync  for  Android  •  Robo@um  /  Java  

Page 26: Automate across Platform, OS, Technologies with TaaS

My  Original  Problem  

Page 27: Automate across Platform, OS, Technologies with TaaS

The  Solu=on  

Page 28: Automate across Platform, OS, Technologies with TaaS

What  is  TaaS?  

“TaaS”  is  a  product  that  allows  you  to  validate  the  integra-on  across  a  variety  of  products  via  Test  Automa-on  

•  The  “correct”  way  •  Pla.orm  /  OS  agnos=c  

•  Implementa=on  Language  Independent  

Page 29: Automate across Platform, OS, Technologies with TaaS

What  is  TaaS?  

Agnos-c  PlaVorm  /  OS  

Implementa@on  Language  

Page 30: Automate across Platform, OS, Technologies with TaaS

What  is  TaaS?  

Contract  Decoupling  of  technology  barriers  

Timeout  

Page 31: Automate across Platform, OS, Technologies with TaaS

What  is  TaaS?  

Simple  Parameters  Input  &  Output  

Page 32: Automate across Platform, OS, Technologies with TaaS

What  is  TaaS?  

Developed  in  Ruby  using  Sinatra  

Page 33: Automate across Platform, OS, Technologies with TaaS

TaaS  is  Not  a  …  

“Tool”  for  integra@on  different  products  -­‐  Lack  of  Security  

-­‐  Probably  not  as  robust  

Page 34: Automate across Platform, OS, Technologies with TaaS

TaaS  is  Not  a  …  

Load  Tes@ng  Tool  

Page 35: Automate across Platform, OS, Technologies with TaaS

How  does  TaaS  work?  

Page 36: Automate across Platform, OS, Technologies with TaaS

End-­‐2-­‐End  Integra-on  

Tests  Framework  

TaaS  Client  

Test  Framework  

for    Outlook  on  Windows  

   

TaaS  Server  

Test  Framework  for  Outlook  Sync  on  Android  

   

TaaS  Server  

Create  &  Save  as  DraE  

1  

Verify  DraE  4  

Verify  DraE    present  2  

Modify  DraE  

3  Orchestrator  

Service  Providers  

Page 37: Automate across Platform, OS, Technologies with TaaS

Demo  

How  to  use  TaaS?  TaaS  Server  -­‐>  Ruby  project  

TaaS  Service  provider  -­‐>  Cucumber-­‐jvm  Project  (Java)  

Client  –  command  line  invoca@on  

Page 38: Automate across Platform, OS, Technologies with TaaS

TaaS  Server  Implementa@on  

Page 39: Automate across Platform, OS, Technologies with TaaS

What  is  a  Contract?  

Specified  in  a  simple  yml  file  

Page 40: Automate across Platform, OS, Technologies with TaaS

Contract  Defini@on  

Page 41: Automate across Platform, OS, Technologies with TaaS

Contract  Defini@on  

Page 42: Automate across Platform, OS, Technologies with TaaS

Implement  the  Contract  

•  Update  tests  to  -­‐  – Handle  input  parameters  

•  From  Environment  variables  

– Execute  the  “test”  

Page 43: Automate across Platform, OS, Technologies with TaaS

Implement  the  Contract  

Page 44: Automate across Platform, OS, Technologies with TaaS

Parse  Input  Parameters  

Page 45: Automate across Platform, OS, Technologies with TaaS

Return  the  Results  

•  Output  parameters  – As  console  output  between  special  markers  

•  Console  logs  •  Excep@ons  (if  any)  •  All  return  values  are  in  “json”  format  

Page 46: Automate across Platform, OS, Technologies with TaaS

Collect  Output  Parameter  Values  

Page 47: Automate across Platform, OS, Technologies with TaaS

Return  Output  Parameter  Values  

Page 48: Automate across Platform, OS, Technologies with TaaS

Run  TaaS  Server  

•  Dedicated  machine  •  Provide  IP  address  /  host  name  +  port  to  poten@al  clients  

Page 49: Automate across Platform, OS, Technologies with TaaS

TaaS  Client  Implementa@on  

Page 50: Automate across Platform, OS, Technologies with TaaS

Setup  TaaS  Client  

Page 51: Automate across Platform, OS, Technologies with TaaS

Invoke  TaaS  Contract  

Page 52: Automate across Platform, OS, Technologies with TaaS

TaaS  Technical  Summary  

Page 53: Automate across Platform, OS, Technologies with TaaS

TaaS  Server  

•  Specify  contract  details  •  Implement  contracts  •  Return  the  results  •  Run  TaaS  Server  (REST  service)  •  Serve  TaaS  Client  requests  – As  separate  processes  

Page 54: Automate across Platform, OS, Technologies with TaaS

TaaS  Client  

•  Collect  the  input  parameters  •  Invoke  the  contract  •  Consume  the  result  •  Con@nue  with  test  orchestra@on  

Page 55: Automate across Platform, OS, Technologies with TaaS

Summary  of  Features  

•  Contract  – Decoupling  of  technology  barriers  – Timeout  

•  Passing  of  input  parameters  as  Environment  variables  

•  Result  as  json  – Output  parameters  – Console  logs  and  errors  – Excep@ons  

•  Developed  in  Ruby  using  Sinatra  

Page 56: Automate across Platform, OS, Technologies with TaaS

Why  is  this  a  Good  Idea?  

•  Automate  the  last-­‐mile  •  No  code  duplica@on  •  Implementa@on  of  contract  lies  with  the  framework  tes@ng  that  product  – Evolves  with  product  changes  

•  Decoupling  of  technologies  

Page 57: Automate across Platform, OS, Technologies with TaaS

Why  is  this  a  Good  Idea?  

•  Helps  in  Manual  Tes@ng  (setup  of  data)  •  Anyone  can  use  it  •  Each  product  is  tested  in  the  “best”  possible  way  

 

Page 58: Automate across Platform, OS, Technologies with TaaS

How  can  you  use  TaaS?  

•  Open  source  (apache2  license)  •  Available  on  github!    •  Available  on  rubygems.org  !  •  Refer  sample  project  (taas-­‐server)  to  get  started  

Page 59: Automate across Platform, OS, Technologies with TaaS

Steps  to  Follow  

•  Nego@ate  contract  details  •  Setup  &  configure  TaaS  Server  –  Implement  contracts  – Return  the  results  – Run  TaaS  Server  (REST  service)  

•  Configure  TaaS  Client  

Page 60: Automate across Platform, OS, Technologies with TaaS

Does  it  really  work?  

>1.2K  downloads  

Page 61: Automate across Platform, OS, Technologies with TaaS

Before  you  use  TaaS  …  

Iden@fy  –    •  Is  TaaS  the  right  thing  for  you?  

Page 62: Automate across Platform, OS, Technologies with TaaS

•  Error  codes  for  the  service  •  Service  Discovery  •  Security  •  Create  a  Java  /  .Net  version  of  TaaS  Server  •  Asynchronous  requests  

How  can  You  help  TaaS?  

Page 63: Automate across Platform, OS, Technologies with TaaS

What  TaaS  did  for  me?  

•  Be  crea@ve  •  Find  Innova@ve  solu@on  to  the  problem  •  Another  open  source  contribu@on  

Page 64: Automate across Platform, OS, Technologies with TaaS

[email protected]      

         @BagmarAnand    

about.me/anand.bagmar  

Thank  you