Integration testing in enterprises using TaaS

572 views
414 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
572
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Integration testing in enterprises using TaaS

  1. 1. Integra(on  tes(ng  in   Enterprises  using  TaaS   Anand  Bagmar   So#ware  Quality  Evangelist   Principal  Consultant,  ThoughtWorks  
  2. 2. Organiza?on  Objec?ve  
  3. 3. Business  spread  across  the  globe  
  4. 4. A  prac?ce  that  makes  Teams   successful?   Test  Automa(on  
  5. 5. A  prac?ce  that  makes  Teams   unsuccessful?   Test  Automa(on  
  6. 6. Principles  &  Prac?ces     for  building  a   Test  Automa?on  Framework  
  7. 7. 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  
  8. 8. Is  Test  Automa?on  treated  as  1st  class  ci?zen  in   your  organiza?on?   •  Value   •  Quality  
  9. 9. 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?  
  10. 10. Case  Study  
  11. 11. Outlook  Outlook   (Windows)   Outlook  (Mac)   Outlook  Web   Access  (OWA)   (Browser)   Outlook  Sync   (Android)   …   …  
  12. 12. How  will  you  automate  these?  
  13. 13. Outlook  for   Windows   •  White  /  QTP   Outlook  for   Mac   •  Automator   Outlook  Web   Access   (OWA)   •  Selenium  /   Ruby   Outlook  Sync   for  Android   •  Robo?um  /   Java  
  14. 14. 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    
  15. 15. 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  
  16. 16. Can  you  use  the  same  technology   stack  for  automa(ng  the  tes(ng   of  each  variant  of  Outlook?  
  17. 17. The  problem  
  18. 18. Outlook  for   Windows   •  White  /  QTP   Outlook  for   Mac   •  Automator   Outlook  Web   Access   (OWA)   •  Selenium  /   Ruby   Outlook  Sync   for  Android   •  Robo?um  /   Java  
  19. 19. The  solu(on  
  20. 20. 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  
  21. 21. TaaS  Server   •  Specify  contract  details   •  Implement  contracts   •  Return  the  results   •  Run  TaaS  Server  (REST  service)   •  Serve  TaaS  Client  requests   – As  separate  processes  
  22. 22. What  is  a  Contract?   Specified  in  a  simple  yml  file  
  23. 23. Contract  defini?on  
  24. 24. Contract  defini?on  
  25. 25. Implement  the  Contract   •  Update  tests  to  -­‐   – Handle  input  parameters   •  From  Environment  variables   – Execute  the  “test”  
  26. 26. Implement  the  Contract  
  27. 27. Parse  Input  parameters  
  28. 28. Return  the  results   •  Output  parameters   – As  console  output  between  special  markers   •  Console  logs   •  Excep?ons  (if  any)   •  All  return  values  are  in  “json”  format  
  29. 29. Return  Output  parameter  values  
  30. 30. Run  TaaS  Server   •  Dedicated  machine   •  Provide  IP  address  /  host  name  +  port  to   poten?al  clients  
  31. 31. TaaS  Client   •  Collect  the  input  parameters   •  Invoke  the  contract   •  Consume  the  result   •  Con?nue  with  test  orchestra?on  
  32. 32. Invoke  TaaS  Contract  
  33. 33. 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  
  34. 34. 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  
  35. 35. 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!!!  
  36. 36. What  this  is  Not   •  Load  tes?ng  tool   •  A  “tool”  for  integra?ng  different  products   – Lack  of  security   – Probably  not  as  robust  
  37. 37. What  TaaS  did  for  me?   •  Be  crea?ve   •  Find  Innova?ve  solu?on  to  the  problem   •  Another  open  source  contribu?on  
  38. 38. Does  it  really  work?  
  39. 39. How  can  you  use  TaaS?   •  Open  source  (apache2  license)   •  Available  on  github!     •  Available  as  taas.gem  on  rubygems.org  (~500   downloads)  
  40. 40. •  Error  codes  for  the  service   •  Service  Discovery   •  Security   •  Create  a  Java  /  .Net  version  of  TaaS  Server   How  can  you  help  TaaS?  
  41. 41. hkp://essenceo#es?ng.blogspot.com   hkps://github.com/anandbagmar/taas   anandbagmar/   Anand.Bagmar@thoughtworks.com                        Abagmar@gmail.com        @BagmarAnand  

×