43
Integra(on tes(ng in Enterprises using TaaS Anand Bagmar So#ware Quality Evangelist Principal Consultant, ThoughtWorks

Integration testing in enterprises using TaaS

  • View
    512

  • Download
    2

Embed Size (px)

DESCRIPTION

Presented in World Conference - Next Generation Testing, Bangalore on 11th July 2013

Citation preview

Page 1: Integration testing in enterprises using TaaS

Integra(on  tes(ng  in  Enterprises  using  TaaS  

Anand  Bagmar  So#ware  Quality  Evangelist  

Principal  Consultant,  ThoughtWorks  

Page 2: Integration testing in enterprises using TaaS

Organiza?on  Objec?ve  

Page 3: Integration testing in enterprises using TaaS

Business  spread  across  the  globe  

Page 4: Integration testing in enterprises using TaaS

A  prac?ce  that  makes  Teams  successful?  

Test  Automa(on  

Page 5: Integration testing in enterprises using TaaS

A  prac?ce  that  makes  Teams  unsuccessful?  

Test  Automa(on  

Page 6: Integration testing in enterprises using TaaS

Principles  &  Prac?ces    for  building  a  

Test  Automa?on  Framework  

Page 7: Integration testing in enterprises using TaaS

Principles  &  Prac(ces  of  Automa(on  Framework  

Code  Quality  

Design  PaBerns  

Pairing  

Test  Data  

Abstrac(on  Layers  

Refactor,  Evolve  &  Extend  

   

Configurable  

Con(nuous  Integra(on  

(CI)  

Screenshots,  Video  

Recordings  Logging  

Tools  &  U(li(es  

No  Copy-­‐Paste  

Page 8: Integration testing in enterprises using TaaS

Is  Test  Automa?on  treated  as  1st  class  ci?zen  in  your  organiza?on?  •  Value  •  Quality  

Page 9: Integration testing in enterprises using TaaS

Quick  survey  

•  Part  of  a  large  organiza?on?  •  #  of  products  in  the  porNolio?  •  #  of  projects  across  all  these  products?  •  Technology  stack  of  these  products?  •  Part  of  merged  /  acquired  companies?    – Same  technology  of  “new”  products?  

•  Distributed  teams?  •  Common  Test  Automa?on  framework?  

Page 10: Integration testing in enterprises using TaaS
Page 11: Integration testing in enterprises using TaaS

Case  Study  

Page 12: Integration testing in enterprises using TaaS

Outlook  Outlook  (Windows)  

Outlook  (Mac)  

Outlook  Web  Access  (OWA)  (Browser)  

Outlook  Sync  (Android)  

…  

…  

Page 13: Integration testing in enterprises using TaaS

How  will  you  automate  these?  

Page 14: Integration testing in enterprises using TaaS

Outlook  for  Windows  • White  /  QTP  

Outlook  for  Mac  •  Automator  

Outlook  Web  Access  (OWA)  •  Selenium  /  Ruby  

Outlook  Sync  for  Android  •  Robo?um  /  Java  

Page 15: Integration testing in enterprises using TaaS

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

 How  will  you  automate  the  test  ….  

 

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

Page 16: Integration testing in enterprises using TaaS

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

Test  

(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 17: Integration testing in enterprises using TaaS

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

of  each  variant  of  Outlook?  

Page 18: Integration testing in enterprises using TaaS

The  problem  

Page 19: Integration testing in enterprises using TaaS

Outlook  for  Windows  • White  /  QTP  

Outlook  for  Mac  •  Automator  

Outlook  Web  Access  (OWA)  •  Selenium  /  Ruby  

Outlook  Sync  for  Android  •  Robo?um  /  Java  

Page 20: Integration testing in enterprises using TaaS

The  solu(on  

Page 21: Integration testing in enterprises using TaaS

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

Test  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 22: Integration testing in enterprises using TaaS
Page 23: Integration testing in enterprises using TaaS

TaaS  Server  

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

Page 24: Integration testing in enterprises using TaaS

What  is  a  Contract?  

Specified  in  a  simple  yml  file  

Page 25: Integration testing in enterprises using TaaS

Contract  defini?on  

Page 26: Integration testing in enterprises using TaaS

Contract  defini?on  

Page 27: Integration testing in enterprises using TaaS

Implement  the  Contract  

•  Update  tests  to  -­‐  – Handle  input  parameters  

•  From  Environment  variables  

– Execute  the  “test”  

Page 28: Integration testing in enterprises using TaaS

Implement  the  Contract  

Page 29: Integration testing in enterprises using TaaS

Parse  Input  parameters  

Page 30: Integration testing in enterprises using 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 31: Integration testing in enterprises using TaaS

Return  Output  parameter  values  

Page 32: Integration testing in enterprises using TaaS

Run  TaaS  Server  

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

Page 33: Integration testing in enterprises using TaaS

TaaS  Client  

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

Page 34: Integration testing in enterprises using TaaS

Invoke  TaaS  Contract  

Page 35: Integration testing in enterprises using TaaS

Summary  of  Features  

•  Developed  in  Ruby  using  Sinatra  •  Contract  – Decoupling  of  technology  barriers  – Timeout  

•  Passing  of  input  parameters  as  Environment  variables  

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

Page 36: Integration testing in enterprises using 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 37: Integration testing in enterprises using 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  

•  Its  –  providing  Test  as  a  Service!!!  

Page 38: Integration testing in enterprises using TaaS

What  this  is  Not  

•  Load  tes?ng  tool  •  A  “tool”  for  integra?ng  different  products  – Lack  of  security  – Probably  not  as  robust  

Page 39: Integration testing in enterprises using TaaS

What  TaaS  did  for  me?  

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

Page 40: Integration testing in enterprises using TaaS

Does  it  really  work?  

Page 41: Integration testing in enterprises using TaaS

How  can  you  use  TaaS?  

•  Open  source  (apache2  license)  •  Available  on  github!    •  Available  as  taas.gem  on  rubygems.org  (~500  downloads)  

Page 42: Integration testing in enterprises using TaaS

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

How  can  you  help  TaaS?  

Page 43: Integration testing in enterprises using TaaS

hkp://essenceo#es?ng.blogspot.com  

hkps://github.com/anandbagmar/taas  

anandbagmar/  

[email protected]                        [email protected]  

 

   @BagmarAnand