SlideShare a Scribd company logo
1 of 11
Download to read offline
#DevoxxFR
Functional Configuration Testing
with Docker & TestContainers
Vincent Massol @vmassol
1
#DevoxxFR
Use Case: XWiki
2
Application with functional tests, e.g. web app & UI tests
Database
Servlet Engine
Webapp (XWiki)
Browser
JDBCHTTP
#DevoxxFR
DB Type DB Version
JDBC
Driver
Servlet
E.Type
Servlet E.
Version
Browser
Type
Browser
Version
Other
5.7.24 5.1.45 8.5.35 63.0 N/A
9.6.8 42.1.4 Latest 9.x
70.0.3538.
77
Solr
External
2.4.1 2.4.1 9.4.12 60.0.2 Clustering
Latest
10.3.x
Latest
9.4.8.v201
71121
67.0.3396.
87
LibreOffice
Server
Problem: Configurations
3
Validate that XWiki works on supported configurations
#DevoxxFR
Docker Container #3Docker Container #2Docker Container #1
Solution: Dockerization
4
Use Docker to represent the various configurations
Database
Servlet Engine
Webapp (XWiki)
Browser
#DevoxxFR
Implementation 1: Jenkins
5
Dependency on CI, not able to run & debug locally
pipeline {
agent {
docker {
image 'xwiki-maven-firefox'
args '-v $HOME/.m2:/root/.m2'
}
}
stages {
stage('Test') {
steps {
docker.image('mysql:5').withRun('-e
"MYSQL_ROOT_PASSWORD=my-secret-pw"') { c ->
docker.image('tomcat:8').withRun('-v
$XWIKIDIR:/usr/local/tomcat/webapps/
xwiki').inside("--link ${c.id}:db") {
[...]
#DevoxxFR
Implementation 2: Maven
6
Dependency on Maven, not easy to debug in IDE
<plugin>
 <groupId>io.fabric8</groupId>
 <artifactId>docker-maven-plugin</artifactId>
 <configuration>
   <imagePullPolicy>IfNotPresent</imagePullPolicy>
   <images>
[…]
#DevoxxFR
Implementation 3: TestContainers
7
@Testcontainers

public class MyTestcontainersTests {
@Container

private static final MySQLContainer MY_SQL_CONTAINER = new
MySQLContainer();
@Container

private PostgreSQLContainer pgsqlContainer = new PostgreSQLContainer()

.withDatabaseName("foo")

.withUsername("foo")

.withPassword("secret");
Best solution so far: Reproduce and debug locally and in IDE testcontainers.org
#DevoxxFR
XWiki & TestContainers
8
@UITest(

database = Database.MYSQL,

databaseTag = "5",

servletEngine = ServletEngine.TOMCAT,

servletEngineTag = "8",

browser = Browser.CHROME)
public class MenuIT
Custom JUnit5 Extension, makes it easy to use for XWiki devs
Selenium test here
#DevoxxFR 9
Demo Time
#DevoxxFR
TestContainers Features
10
• Several built-in Containers: MySQL, PostgreSQL,
Selenium/WebDriver, ElasticSearch, Nginx, and a lot
more… even a DockerCompose one!
• Automatically record videos
• Automatic and powerful clean up of containers
• Full Docker API available (uses docker-java underneath)
• Create Docker images on the fly
#DevoxxFR
Conclusion
11
• Very easy to reproduce/debug problems from production
• Supports about everything including Docker Outside of
Docker (DOOD)
• Consistent behavior: didn’t notice many false positives
due to the environment
Configuration Testing in your IDE
testcontainers.org

More Related Content

What's hot

20140419 xamarin で Azure Mobile Services
20140419 xamarin で Azure Mobile Services20140419 xamarin で Azure Mobile Services
20140419 xamarin で Azure Mobile ServicesTakayoshi Tanaka
 
Whatthestack using Tempest for testing your OpenStack deployment
Whatthestack using Tempest for testing your OpenStack deploymentWhatthestack using Tempest for testing your OpenStack deployment
Whatthestack using Tempest for testing your OpenStack deploymentChristian Schwede
 
Oleksandr Navka How I Configure Infrastructure of My Project
Oleksandr Navka   How I Configure Infrastructure of My ProjectOleksandr Navka   How I Configure Infrastructure of My Project
Oleksandr Navka How I Configure Infrastructure of My ProjectGlobalLogic Ukraine
 
Managing enterprise client deployment with p2
Managing enterprise client deployment with p2Managing enterprise client deployment with p2
Managing enterprise client deployment with p2Thomas Kratz
 
Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)
Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)
Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)WSO2
 
Spring Testing, Fight for the Context
Spring Testing, Fight for the ContextSpring Testing, Fight for the Context
Spring Testing, Fight for the ContextGlobalLogic Ukraine
 
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...Mark A
 

What's hot (9)

20140419 xamarin zumo
20140419 xamarin zumo20140419 xamarin zumo
20140419 xamarin zumo
 
20140419 xamarin で Azure Mobile Services
20140419 xamarin で Azure Mobile Services20140419 xamarin で Azure Mobile Services
20140419 xamarin で Azure Mobile Services
 
Whatthestack using Tempest for testing your OpenStack deployment
Whatthestack using Tempest for testing your OpenStack deploymentWhatthestack using Tempest for testing your OpenStack deployment
Whatthestack using Tempest for testing your OpenStack deployment
 
Oleksandr Navka How I Configure Infrastructure of My Project
Oleksandr Navka   How I Configure Infrastructure of My ProjectOleksandr Navka   How I Configure Infrastructure of My Project
Oleksandr Navka How I Configure Infrastructure of My Project
 
Managing enterprise client deployment with p2
Managing enterprise client deployment with p2Managing enterprise client deployment with p2
Managing enterprise client deployment with p2
 
Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)
Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)
Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)
 
ESIGate dev meeting #4 21-11-2013
ESIGate dev meeting #4 21-11-2013ESIGate dev meeting #4 21-11-2013
ESIGate dev meeting #4 21-11-2013
 
Spring Testing, Fight for the Context
Spring Testing, Fight for the ContextSpring Testing, Fight for the Context
Spring Testing, Fight for the Context
 
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
 

Similar to Configuration Testing with Docker & TestContainers

Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Roberto Franchini
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Robert Scholte
 
Project Presentation on Advance Java
Project Presentation on Advance JavaProject Presentation on Advance Java
Project Presentation on Advance JavaVikas Goyal
 
XWiki Testing with TestContainers
XWiki Testing with TestContainersXWiki Testing with TestContainers
XWiki Testing with TestContainersVincent Massol
 
CONTINUOUS INTEGRATION && DOCKER
CONTINUOUS INTEGRATION && DOCKERCONTINUOUS INTEGRATION && DOCKER
CONTINUOUS INTEGRATION && DOCKERStfalcon Meetups
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesArun Gupta
 
WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6Jeffrey West
 
Development Process Optimization Using Docker. Based on a True Story
Development Process Optimization Using Docker. Based on a True StoryDevelopment Process Optimization Using Docker. Based on a True Story
Development Process Optimization Using Docker. Based on a True StoryGlobalLogic Ukraine
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetesBen Hall
 
Busy developer-html5-javaee7
Busy developer-html5-javaee7Busy developer-html5-javaee7
Busy developer-html5-javaee7Geertjan Wielenga
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Linuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro WorkshopLinuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro WorkshopElton Stoneman
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...Frank Munz
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_ContainersGrace Jansen
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker, Inc.
 
COBOL deployment to .NET or JVM
COBOL deployment to .NET or JVMCOBOL deployment to .NET or JVM
COBOL deployment to .NET or JVMMicro Focus
 
Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Henryk Konsek
 
Troubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineersTroubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineersDocker, Inc.
 

Similar to Configuration Testing with Docker & TestContainers (20)

Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
 
Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)Java 9 and the impact on Maven Projects (Devoxx 2016)
Java 9 and the impact on Maven Projects (Devoxx 2016)
 
Project Presentation on Advance Java
Project Presentation on Advance JavaProject Presentation on Advance Java
Project Presentation on Advance Java
 
XWiki Testing with TestContainers
XWiki Testing with TestContainersXWiki Testing with TestContainers
XWiki Testing with TestContainers
 
CONTINUOUS INTEGRATION && DOCKER
CONTINUOUS INTEGRATION && DOCKERCONTINUOUS INTEGRATION && DOCKER
CONTINUOUS INTEGRATION && DOCKER
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6
 
Development Process Optimization Using Docker. Based on a True Story
Development Process Optimization Using Docker. Based on a True StoryDevelopment Process Optimization Using Docker. Based on a True Story
Development Process Optimization Using Docker. Based on a True Story
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Busy developer-html5-javaee7
Busy developer-html5-javaee7Busy developer-html5-javaee7
Busy developer-html5-javaee7
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Linuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro WorkshopLinuxing in London: Docker Intro Workshop
Linuxing in London: Docker Intro Workshop
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_Containers
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, SollianceDocker for .NET Developers - Michele Leroux Bustamante, Solliance
Docker for .NET Developers - Michele Leroux Bustamante, Solliance
 
COBOL deployment to .NET or JVM
COBOL deployment to .NET or JVMCOBOL deployment to .NET or JVM
COBOL deployment to .NET or JVM
 
Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.
 
Troubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineersTroubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineers
 
Jenkins & IaC
Jenkins & IaCJenkins & IaC
Jenkins & IaC
 

More from Vincent Massol

XWiki: The best wiki for developers
XWiki: The best wiki for developersXWiki: The best wiki for developers
XWiki: The best wiki for developersVincent Massol
 
Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019Vincent Massol
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projectsVincent Massol
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projectsVincent Massol
 
What's new in XWiki 9.x and 10.x
What's new in XWiki 9.x and 10.xWhat's new in XWiki 9.x and 10.x
What's new in XWiki 9.x and 10.xVincent Massol
 
Creating your own project's Quality Dashboard
Creating your own project's Quality DashboardCreating your own project's Quality Dashboard
Creating your own project's Quality DashboardVincent Massol
 
XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointXWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointVincent Massol
 
Creating your own project's Quality Dashboard
Creating your own project's Quality DashboardCreating your own project's Quality Dashboard
Creating your own project's Quality DashboardVincent Massol
 
XWiki: The web's Swiss Army Knife
XWiki: The web's Swiss Army KnifeXWiki: The web's Swiss Army Knife
XWiki: The web's Swiss Army KnifeVincent Massol
 
Leading a Community-Driven Open Source Project
Leading a Community-Driven Open Source ProjectLeading a Community-Driven Open Source Project
Leading a Community-Driven Open Source ProjectVincent Massol
 
XWiki Status - July 2015
XWiki Status - July 2015XWiki Status - July 2015
XWiki Status - July 2015Vincent Massol
 
XWiki SAS development practices
XWiki SAS development practicesXWiki SAS development practices
XWiki SAS development practicesVincent Massol
 
XWiki SAS: An open source company
XWiki SAS: An open source companyXWiki SAS: An open source company
XWiki SAS: An open source companyVincent Massol
 
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014Vincent Massol
 
XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014Vincent Massol
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java ProjectVincent Massol
 

More from Vincent Massol (20)

XWiki: The best wiki for developers
XWiki: The best wiki for developersXWiki: The best wiki for developers
XWiki: The best wiki for developers
 
Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019Advanced Java Testing @ POSS 2019
Advanced Java Testing @ POSS 2019
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projects
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projects
 
What's new in XWiki 9.x and 10.x
What's new in XWiki 9.x and 10.xWhat's new in XWiki 9.x and 10.x
What's new in XWiki 9.x and 10.x
 
QDashboard 1.2
QDashboard 1.2QDashboard 1.2
QDashboard 1.2
 
Advanced Java Testing
Advanced Java TestingAdvanced Java Testing
Advanced Java Testing
 
Creating your own project's Quality Dashboard
Creating your own project's Quality DashboardCreating your own project's Quality Dashboard
Creating your own project's Quality Dashboard
 
XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointXWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
 
Creating your own project's Quality Dashboard
Creating your own project's Quality DashboardCreating your own project's Quality Dashboard
Creating your own project's Quality Dashboard
 
XWiki: The web's Swiss Army Knife
XWiki: The web's Swiss Army KnifeXWiki: The web's Swiss Army Knife
XWiki: The web's Swiss Army Knife
 
Leading a Community-Driven Open Source Project
Leading a Community-Driven Open Source ProjectLeading a Community-Driven Open Source Project
Leading a Community-Driven Open Source Project
 
Developing XWiki
Developing XWikiDeveloping XWiki
Developing XWiki
 
XWiki Status - July 2015
XWiki Status - July 2015XWiki Status - July 2015
XWiki Status - July 2015
 
XWiki SAS development practices
XWiki SAS development practicesXWiki SAS development practices
XWiki SAS development practices
 
XWiki SAS: An open source company
XWiki SAS: An open source companyXWiki SAS: An open source company
XWiki SAS: An open source company
 
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
XWiki: A web dev runtime for writing web apps @ FOSDEM 2014
 
XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014XWiki Rendering @ FOSDEM 2014
XWiki Rendering @ FOSDEM 2014
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java Project
 

Recently uploaded

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Configuration Testing with Docker & TestContainers

  • 1. #DevoxxFR Functional Configuration Testing with Docker & TestContainers Vincent Massol @vmassol 1
  • 2. #DevoxxFR Use Case: XWiki 2 Application with functional tests, e.g. web app & UI tests Database Servlet Engine Webapp (XWiki) Browser JDBCHTTP
  • 3. #DevoxxFR DB Type DB Version JDBC Driver Servlet E.Type Servlet E. Version Browser Type Browser Version Other 5.7.24 5.1.45 8.5.35 63.0 N/A 9.6.8 42.1.4 Latest 9.x 70.0.3538. 77 Solr External 2.4.1 2.4.1 9.4.12 60.0.2 Clustering Latest 10.3.x Latest 9.4.8.v201 71121 67.0.3396. 87 LibreOffice Server Problem: Configurations 3 Validate that XWiki works on supported configurations
  • 4. #DevoxxFR Docker Container #3Docker Container #2Docker Container #1 Solution: Dockerization 4 Use Docker to represent the various configurations Database Servlet Engine Webapp (XWiki) Browser
  • 5. #DevoxxFR Implementation 1: Jenkins 5 Dependency on CI, not able to run & debug locally pipeline { agent { docker { image 'xwiki-maven-firefox' args '-v $HOME/.m2:/root/.m2' } } stages { stage('Test') { steps { docker.image('mysql:5').withRun('-e "MYSQL_ROOT_PASSWORD=my-secret-pw"') { c -> docker.image('tomcat:8').withRun('-v $XWIKIDIR:/usr/local/tomcat/webapps/ xwiki').inside("--link ${c.id}:db") { [...]
  • 6. #DevoxxFR Implementation 2: Maven 6 Dependency on Maven, not easy to debug in IDE <plugin>  <groupId>io.fabric8</groupId>  <artifactId>docker-maven-plugin</artifactId>  <configuration>    <imagePullPolicy>IfNotPresent</imagePullPolicy>    <images> […]
  • 7. #DevoxxFR Implementation 3: TestContainers 7 @Testcontainers
 public class MyTestcontainersTests { @Container
 private static final MySQLContainer MY_SQL_CONTAINER = new MySQLContainer(); @Container
 private PostgreSQLContainer pgsqlContainer = new PostgreSQLContainer()
 .withDatabaseName("foo")
 .withUsername("foo")
 .withPassword("secret"); Best solution so far: Reproduce and debug locally and in IDE testcontainers.org
  • 8. #DevoxxFR XWiki & TestContainers 8 @UITest(
 database = Database.MYSQL,
 databaseTag = "5",
 servletEngine = ServletEngine.TOMCAT,
 servletEngineTag = "8",
 browser = Browser.CHROME) public class MenuIT Custom JUnit5 Extension, makes it easy to use for XWiki devs Selenium test here
  • 10. #DevoxxFR TestContainers Features 10 • Several built-in Containers: MySQL, PostgreSQL, Selenium/WebDriver, ElasticSearch, Nginx, and a lot more… even a DockerCompose one! • Automatically record videos • Automatic and powerful clean up of containers • Full Docker API available (uses docker-java underneath) • Create Docker images on the fly
  • 11. #DevoxxFR Conclusion 11 • Very easy to reproduce/debug problems from production • Supports about everything including Docker Outside of Docker (DOOD) • Consistent behavior: didn’t notice many false positives due to the environment Configuration Testing in your IDE testcontainers.org