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
A prac?ce that makes Teams successful?
Test Automa(on
A prac?ce that makes Teams unsuccessful?
Test Automa(on
Principles & Prac?ces for building a
Test Automa?on Framework
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
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 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?
Case Study
Outlook Outlook (Windows)
Outlook (Mac)
Outlook Web Access (OWA) (Browser)
Outlook Sync (Android)
…
…
How will you automate these?
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 automate the test ….
An email draQed in one product is reflected in the other products
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
Can you use the same technology stack for automa(ng the tes(ng
of each variant of Outlook?
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 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 contract details • Implement contracts • Return the results • Run TaaS Server (REST service) • Serve TaaS Client requests – As separate processes
What is a Contract?
Specified in a simple yml file
Contract defini?on
Contract defini?on
Implement the Contract
• Update tests to -‐ – Handle input parameters
• From Environment variables
– Execute the “test”
Implement the Contract
Parse Input parameters
Return the results
• Output parameters – As console output between special markers
• Console logs • Excep?ons (if any) • All return values are in “json” format
Return Output parameter values
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
Invoke TaaS Contract
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
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
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!!!
What this is Not
• Load tes?ng tool • A “tool” for integra?ng different products – Lack of security – Probably not as robust
What TaaS did for me?
• Be crea?ve • Find Innova?ve solu?on to the problem • Another open source contribu?on
Does it really work?
How can you use TaaS?
• Open source (apache2 license) • Available on github! • Available as taas.gem on rubygems.org (~500 downloads)
• Error codes for the service • Service Discovery • Security • Create a Java / .Net version of TaaS Server
How can you help TaaS?
hkp://essenceo#es?ng.blogspot.com
hkps://github.com/anandbagmar/taas
anandbagmar/
[email protected] [email protected]
@BagmarAnand
Top Related