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

Integration testing in enterprises using TaaS (Test as a Service)

Embed Size (px)

DESCRIPTION

If a product technology stack cannot be unified in an organization, then why FORCE the Test Automation technology stack to be the same across the same organization? "TaaS - Test as a Service" is an open source framework that allows teams within large organisations to use tools and technologies that will best test individual products, and then use TaaS to do the end-2-end automated integration testing across these products.

Citation preview

Integra(on  tes(ng  in  Enterprises  using  TaaS  

Anand  Bagmar  So#ware  Quality  Evangelist  

Principal  Consultant,  ThoughtWorks  

Organiza?on  Objec?ve  

Business  spread  across  the  globe  

Test  Automa?on  

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

Quick  survey  

•  Part  of  a  large  organiza?on?  •  #  of  products  in  the  porLolio?  •  #  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?  

Case  Study  

Outlook  Outlook  (Windows)  

Outlook  (Mac)  

Outlook  Web  Access  (OWA)  (Browser)  

Outlook  Sync  (Android)  

…  

…  

How  will  you  automate  these?  

The  solu?on  

Outlook  for  Windows  • White  /  QTP  

Outlook  for  Mac  •  Automator  

Outlook  Web  Access  (OWA)  •  Selenium  /  Ruby  

Outlook  Sync  for  Android  •  Robo?um  /  Java  

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  test  ….  

 

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

Can  you  use  the  same  technology  stack  for  tes(ng  each  variant  of  

Outlook?  

On  Windows  • Create  an  email  and  save  it  as  dra#  

In  Browser  (OWA)  • Verify  dra#  email  is  seen  

On  Mac  • Verify  dra#  email  is  seen  

On  Android  • Verify  dra#  email  is  seen  

…  

…  

In  OWA  • Change  the  dra#  email  content  

On  Windows  • Verify  updated  email  content  is  seen  

On  Mac  • Verify  updated  email  content  is  seen  

On  Android  • Verify  updated  email  content  is  seen  

The  problem  

Outlook  for  Windows  • White  /  QTP  

Outlook  for  Mac  •  Automator  

Outlook  Web  Access  (OWA)  •  Selenium  /  Ruby  

Outlook  Sync  for  Android  •  Robo?um  /  Java  

The  solu(on  

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  

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  

TaaS  Server  

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

The  contract  

Implement  the  contract  

•  Update  tests  to  -­‐  – Handle  input  parameters  

•  From  Environment  variables  

– Execute  the  “test”  

Return  the  results  

•  Output  parameters  – As  console  output  between  special  markers  

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

Run  TaaS  Server  

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

TaaS  Client  

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

Some  code  snippets    

from  Cucumber  /  Ruby  world  

Specify  the  Contract  

Specify  the  Contract  

Implement  the  Contract  

Parse  Input  parameters  

Return  Output  parameter  values  

Invoke  TaaS  Contract  

Other  features  

•  Timeout  •  Console  logs  and  errors  •  Developed  in  Ruby  using  Sinatra  •  Available  on  github!  

Does  it  really  work?  

Another  analogy  

•  Error  codes  for  the  service  •  Service  Discovery  •  Security  •  Publish  as  a  gem  

Why  is  this  a  good  idea?  

•  No  code  duplica?on  •  Implementa?on  of  contract  lies  with  the  framework  tes?ng  that  product  – Evolves  with  product  changes  

•  Each  product  is  tested  in  the  “best”  possible  way  

•  Decoupling  of  technologies  •  Its  –  providing  Test  as  a  Service!!!  

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

hcps://github.com/anandbagmar/taas  

hcp://in.linkedin.com/in/anandbagmar/  

[email protected]                        [email protected]  

 

   @BagmarAnand