SlideShare a Scribd company logo
Automated Virtualized Testing (AVT) with
Docker, Kubernetes, WireMock and Gatling
Liberty Mutual Insurance - Tongyu Wang & Wei Li
Introduction
2
Tongyu Wang
Architect,
Liberty Mutual Insurance
Wei Li
Solutions Engineer,
Liberty Mutual Insurance
Agenda
3
 Traditional Testing Approach
 What’s AVT
 AVT Architecture and Implementation
 Demo
 Lessons Learned
How We Test Traditionally
4
Build
Unit
Test
Deploy
CI/CD Pipeline
SCM
Dev/Test/Stage/Perf
MyApp
Data
Service A
Service C
Service B
App
AppOther
Apps
Dedicated
Testing Suite
(LoadRunner)
Problems:
▪ Environment stability
▪ Dependency availability
▪ Limited testing window
▪ Unreliable results
Client
Dedicated env with shared dependencies
Performance TestingFunctional Testing
Dependencies
Automated Virtualized Testing (AVT) Approach
5
Introducing AVT
AVT is an approach that leverages
Containers As A Service (CaaS)
infrastructure to auto-provision
ephemeral runtime environments with
external dependencies virtualized with
mocks, so your application can run and
be tested in a scalable and repeatable
fashion.
Benefits
▪ Reliable results and trending over time -
because we focus on app-under-test
rather than its dependencies and the
environment
▪ Cost saving - we no longer need to
maintain dedicated permanent test
environments that only see sporadic
usage
▪ Automated and repeatable - Increase
testing automation in CI/CD pipeline
Guiding
Principles
Reusable
Components
Integrated
Framework
• Test only what you control
• Avoid testing in shared
environments
• Treat infrastructure as code
• Docker images
• Docker compose files
• Kubernetes manifest files
• Shell scripts
• Monitoring/Visualization tools
• Project structure convention
• CI/CD pipeline integration
• CaaS provider integration
AVT Conceptual Architecture
6
Build
Unit
Test
Functional
Test
CI/CD Pipeline
SCM
Non-Prod/Prod
MyApp Data
Perf
Test
Deploy
Functional Testing Env
MyApp
Data
Mock Svc A
Mock Svc A
Mock Svc A
Test Driver
& Scripts
Perf Testing Env
MyApp
Data
Mock Svc A
Mock Svc A
Mock Svc A
Test Driver
& Scripts
CaaS Infrastructure
Auto-Provision
Mock Svc A
Mock Svc A
Service A
Artifact
Repo
Result
Aggregation &
Visualization
AVT Implementation @ Liberty Mutual
7
Build
Unit
Test
Functional
Test
CI/CD Pipeline Non-Prod/Prod
MyApp Data
Perf
Test
Deploy
Functional Testing Env
Mock Svc A
Mock Svc A
Perf Testing Env
Mock Svc A
Mock Svc A
Auto-Provision
Mock Svc A
Mock Svc A
Service A
App
Artifacts
Mock
Config
Test
Scripts
App Artifacts
Mock Config
Test Scripts
Demo - Sample Application and Tooling
8
Sample Application
• A Spring Boot application
• Expose Restful endpoints
• Read data from a MySQL database
• Call other web services
Tooling
• Java 11 and Maven 3.2.5
• InfluxDB 1.7
• Grafana 7.0.5
• Docker Desktop Community 2.3.0.3
• Kubernetes 1.16.5
• Kompose 1.21.0
Demo - Steps
9
Clone git repo (skipped)
Use kompose to convert docker-compose to
Kubernetes manifest files
Build Spring Boot executable jar
(skipped)
run-app-gatling-k8s.sh
kubectl apply -f k8s-app-gatling/
Demo - AVT Process Flow
10
Demo - AVT Process Flow (Continued)
11
Lessons Learned
12
 Having well-defined service contracts is important.
 The adoption of the framework can be incremental depending on each
app’s unique situation to balance upfront costs vs. benefits over time.
 Being able to launch test environments either from desktop or via
CI/CD pipeline is very powerful, especially during test development and
troubleshooting environment configurations.
 Organizations adopting AVT should focus more on its core guiding
principles, keep the implementation flexible and adjust to your
organization’s existing infrastructure and practice.
Appendix
13
Docker Compose
14
Docker Compose (continued)
15
Sample Gatling Test Script
16
Kubernetes Manifests Converted from docker
compose file by kompose
17
Kubernetes Manifest Example (app-deployment.yaml)
18
Kubernetes Manifest Example (app-deployment.yaml,
continued)
19
Kubernetes Manifest Example (app-service.yaml)
20
Grafana Real Time Monitoring
21
Sample Gatling Test Report
22
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gatling

More Related Content

What's hot (20)

PPTX
Maven Basics - Explained
Smita Prasad
 
PDF
Spring Boot
Pei-Tang Huang
 
PDF
CNCF and Cloud Native Intro
Cloud Native Bangalore
 
PDF
Prometheus
wyukawa
 
PPT
Jenkins Overview
Ahmed M. Gomaa
 
PDF
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
ODP
Xke spring boot
sourabh aggarwal
 
PPTX
Docker 基礎介紹與實戰
Bo-Yi Wu
 
PDF
Introduction to K6
Knoldus Inc.
 
PDF
Designing APIs with OpenAPI Spec
Adam Paxton
 
PDF
Docker Registry V2
Docker, Inc.
 
PDF
Introduction to Red Hat OpenShift 4
HngNguyn748044
 
PPTX
An Introduction to Maven
Vadym Lotar
 
PPTX
Sonarqube
Kalkey
 
PPTX
Spring boot Introduction
Jeevesh Pandey
 
PPTX
Maven tutorial
Dragos Balan
 
PDF
Kubernetes
erialc_w
 
PPTX
Jenkins presentation
Valentin Buryakov
 
PDF
Ansible Introduction
Robert Reiz
 
PDF
Jenkins
Roger Xia
 
Maven Basics - Explained
Smita Prasad
 
Spring Boot
Pei-Tang Huang
 
CNCF and Cloud Native Intro
Cloud Native Bangalore
 
Prometheus
wyukawa
 
Jenkins Overview
Ahmed M. Gomaa
 
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
Xke spring boot
sourabh aggarwal
 
Docker 基礎介紹與實戰
Bo-Yi Wu
 
Introduction to K6
Knoldus Inc.
 
Designing APIs with OpenAPI Spec
Adam Paxton
 
Docker Registry V2
Docker, Inc.
 
Introduction to Red Hat OpenShift 4
HngNguyn748044
 
An Introduction to Maven
Vadym Lotar
 
Sonarqube
Kalkey
 
Spring boot Introduction
Jeevesh Pandey
 
Maven tutorial
Dragos Balan
 
Kubernetes
erialc_w
 
Jenkins presentation
Valentin Buryakov
 
Ansible Introduction
Robert Reiz
 
Jenkins
Roger Xia
 

Similar to Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gatling (6)

PDF
Flintstones or Jetsons? Jump Start Your Virtual Test Lab
TechWell
 
PDF
Containers and Virtualisation for Continuous Testing
sbbabu
 
PDF
Automation for Anyone at Nutanix NEXT 2017 US
Chris Wahl
 
PDF
Modernizing Testing as Apps Re-Architect
DevOps.com
 
PPT
Smart testing using virtual environments
Faris Nizamic
 
PDF
Service Virtualization: What Testers Need to Know
TechWell
 
Flintstones or Jetsons? Jump Start Your Virtual Test Lab
TechWell
 
Containers and Virtualisation for Continuous Testing
sbbabu
 
Automation for Anyone at Nutanix NEXT 2017 US
Chris Wahl
 
Modernizing Testing as Apps Re-Architect
DevOps.com
 
Smart testing using virtual environments
Faris Nizamic
 
Service Virtualization: What Testers Need to Know
TechWell
 
Ad

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
PDF
What AI Means For Your Product Strategy And What To Do About It
VMware Tanzu
 
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
PPTX
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
PDF
Spring Update | July 2023
VMware Tanzu
 
PPTX
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
PPTX
Building Cloud Ready Apps
VMware Tanzu
 
PDF
Spring Boot 3 And Beyond
VMware Tanzu
 
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
PPTX
tanzu_developer_connect.pptx
VMware Tanzu
 
PDF
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
PDF
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
PDF
Virtual Developer Connect Workshop - English
VMware Tanzu
 
PDF
Tanzu Developer Connect - French
VMware Tanzu
 
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
PDF
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
PDF
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
What AI Means For Your Product Strategy And What To Do About It
VMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
Spring Update | July 2023
VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
Building Cloud Ready Apps
VMware Tanzu
 
Spring Boot 3 And Beyond
VMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
tanzu_developer_connect.pptx
VMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
Virtual Developer Connect Workshop - English
VMware Tanzu
 
Tanzu Developer Connect - French
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 
Ad

Recently uploaded (20)

PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
Executive Business Intelligence Dashboards
vandeslie24
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 

Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gatling

  • 1. Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gatling Liberty Mutual Insurance - Tongyu Wang & Wei Li
  • 2. Introduction 2 Tongyu Wang Architect, Liberty Mutual Insurance Wei Li Solutions Engineer, Liberty Mutual Insurance
  • 3. Agenda 3  Traditional Testing Approach  What’s AVT  AVT Architecture and Implementation  Demo  Lessons Learned
  • 4. How We Test Traditionally 4 Build Unit Test Deploy CI/CD Pipeline SCM Dev/Test/Stage/Perf MyApp Data Service A Service C Service B App AppOther Apps Dedicated Testing Suite (LoadRunner) Problems: ▪ Environment stability ▪ Dependency availability ▪ Limited testing window ▪ Unreliable results Client Dedicated env with shared dependencies Performance TestingFunctional Testing Dependencies
  • 5. Automated Virtualized Testing (AVT) Approach 5 Introducing AVT AVT is an approach that leverages Containers As A Service (CaaS) infrastructure to auto-provision ephemeral runtime environments with external dependencies virtualized with mocks, so your application can run and be tested in a scalable and repeatable fashion. Benefits ▪ Reliable results and trending over time - because we focus on app-under-test rather than its dependencies and the environment ▪ Cost saving - we no longer need to maintain dedicated permanent test environments that only see sporadic usage ▪ Automated and repeatable - Increase testing automation in CI/CD pipeline Guiding Principles Reusable Components Integrated Framework • Test only what you control • Avoid testing in shared environments • Treat infrastructure as code • Docker images • Docker compose files • Kubernetes manifest files • Shell scripts • Monitoring/Visualization tools • Project structure convention • CI/CD pipeline integration • CaaS provider integration
  • 6. AVT Conceptual Architecture 6 Build Unit Test Functional Test CI/CD Pipeline SCM Non-Prod/Prod MyApp Data Perf Test Deploy Functional Testing Env MyApp Data Mock Svc A Mock Svc A Mock Svc A Test Driver & Scripts Perf Testing Env MyApp Data Mock Svc A Mock Svc A Mock Svc A Test Driver & Scripts CaaS Infrastructure Auto-Provision Mock Svc A Mock Svc A Service A Artifact Repo Result Aggregation & Visualization
  • 7. AVT Implementation @ Liberty Mutual 7 Build Unit Test Functional Test CI/CD Pipeline Non-Prod/Prod MyApp Data Perf Test Deploy Functional Testing Env Mock Svc A Mock Svc A Perf Testing Env Mock Svc A Mock Svc A Auto-Provision Mock Svc A Mock Svc A Service A App Artifacts Mock Config Test Scripts App Artifacts Mock Config Test Scripts
  • 8. Demo - Sample Application and Tooling 8 Sample Application • A Spring Boot application • Expose Restful endpoints • Read data from a MySQL database • Call other web services Tooling • Java 11 and Maven 3.2.5 • InfluxDB 1.7 • Grafana 7.0.5 • Docker Desktop Community 2.3.0.3 • Kubernetes 1.16.5 • Kompose 1.21.0
  • 9. Demo - Steps 9 Clone git repo (skipped) Use kompose to convert docker-compose to Kubernetes manifest files Build Spring Boot executable jar (skipped) run-app-gatling-k8s.sh kubectl apply -f k8s-app-gatling/
  • 10. Demo - AVT Process Flow 10
  • 11. Demo - AVT Process Flow (Continued) 11
  • 12. Lessons Learned 12  Having well-defined service contracts is important.  The adoption of the framework can be incremental depending on each app’s unique situation to balance upfront costs vs. benefits over time.  Being able to launch test environments either from desktop or via CI/CD pipeline is very powerful, especially during test development and troubleshooting environment configurations.  Organizations adopting AVT should focus more on its core guiding principles, keep the implementation flexible and adjust to your organization’s existing infrastructure and practice.
  • 16. Sample Gatling Test Script 16
  • 17. Kubernetes Manifests Converted from docker compose file by kompose 17
  • 18. Kubernetes Manifest Example (app-deployment.yaml) 18
  • 19. Kubernetes Manifest Example (app-deployment.yaml, continued) 19
  • 20. Kubernetes Manifest Example (app-service.yaml) 20
  • 21. Grafana Real Time Monitoring 21
  • 22. Sample Gatling Test Report 22