Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
@MicroShedTest
public class MyTest {
// Search for Dockerfile.
// Start app in Container.
// Wait for Container before running tests.
@Container
public static MicroProfileApplication app
= new MicroProfileApplication()
.withAppContextRoot("/myservice");
// Inject JAX-RS REST Client
@RestClient
public static MyService mySvc;
// A test method like any other
@Test
public void testMyService() {
...
}
}
The @MicroShedTest annotation is required so
that the build knows this is a MicroShed test
The @Container annotation is required for
setting up your container to run your tests
inside
The @RESTClient annotation is needed to
give us something to test against
The @Test annotation like you would in a
normal JUnit test.
public class AppContainerConfig implements SharedContainerConfiguration {
@Container
public static ApplicationContainer app = new ApplicationContainer()
.withAppContextRoot("/myservice");
}
@MicroShedTest
@SharedContainerConfig(AppContainerConfig.class)
public class MySimpleTestA {
// ...
}
@MicroShedTest
@SharedContainerConfig(AppContainerConfig.class)
public class MySimpleTestB {
// ...
}
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Dev
mode
Replicating production on your laptop using the magic of containers
<dependency>
<groupId>org.microshed</groupId>
<artifactId>microshed-testing-liberty</artifactId>
<version>0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
import org.junit.jupiter.api.Test;
import org.microshed.testing.jaxrs.RESTClient;
import org.microshed.testing.jupiter.MicroShedTest;
import
org.microshed.testing.testcontainers.ApplicationContainer;
import org.testcontainers.junit.jupiter.Container;
Maven Dependencies Java Imports
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers
Replicating production on your laptop using the magic of containers

More Related Content

PDF
Testing Spring Boot Applications
PDF
Finally, easy integration testing with Testcontainers
PPTX
Springboot2 postgresql-jpa-hibernate-crud-example with test
PDF
Testing Web Apps with Spring Framework
PPTX
Spring Testing, Fight for the Context
PPTX
Automating the Quality
PDF
Android Meetup Slovenija #3 - Testing with Robolectric by Ivan Kust
PDF
What is Kubernetes?
Testing Spring Boot Applications
Finally, easy integration testing with Testcontainers
Springboot2 postgresql-jpa-hibernate-crud-example with test
Testing Web Apps with Spring Framework
Spring Testing, Fight for the Context
Automating the Quality
Android Meetup Slovenija #3 - Testing with Robolectric by Ivan Kust
What is Kubernetes?

What's hot (20)

PPT
Features java9
PDF
Testing Web Apps with Spring Framework 3.2
PDF
Glassfish JEE Server Administration - Clustering
PDF
Testing with Spring: An Introduction
PDF
A React Journey
PDF
Introduction to Spring Framework
PPTX
Introduction to Spring Boot
PPTX
Use open stack to run java programs inside a Docker container
PPTX
Chapter 06: Eclipse Vert.x - Reactive Microservices with OpenShift
PPTX
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
PPTX
Workshop MSF4J - Getting Started with Microservices and Java
PPTX
Meteor
PDF
Javantura v4 - (Spring)Boot your application on Red Hat middleware stack - Al...
ODP
Jenkins Pipelining and Gatling Integration
PDF
Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)
PDF
Corso su ReactJS
PDF
Java EE with NetBeans on OpenShift
PDF
1/3 : introduction to CDI - Antoine Sabot-Durand
PDF
Testing with JUnit 5 and Spring
PPTX
Git Overview
Features java9
Testing Web Apps with Spring Framework 3.2
Glassfish JEE Server Administration - Clustering
Testing with Spring: An Introduction
A React Journey
Introduction to Spring Framework
Introduction to Spring Boot
Use open stack to run java programs inside a Docker container
Chapter 06: Eclipse Vert.x - Reactive Microservices with OpenShift
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
Workshop MSF4J - Getting Started with Microservices and Java
Meteor
Javantura v4 - (Spring)Boot your application on Red Hat middleware stack - Al...
Jenkins Pipelining and Gatling Integration
Integrating MQ Protocols with WSO2 ESB 4.9.0 (RabbitMQ, MQTT, Kafka)
Corso su ReactJS
Java EE with NetBeans on OpenShift
1/3 : introduction to CDI - Antoine Sabot-Durand
Testing with JUnit 5 and Spring
Git Overview
Ad

More from Jamie Coleman (20)

PPTX
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
PPTX
Black Friday Brilliance Managing a Billion Transactions with Tech, Tactics, a...
PPTX
Breaking Down Digital Barriers Overcoming Challenges in Online Retail.pptx
PPTX
Open Source Licence to Kill in Software Development
PPTX
The Secret Life of Maven Central - LJC 2022.pptx
PPTX
Code to Cloud Workshop, Shifting Security to the Left
PPTX
The Death Star & The Ultimate Vulnerability.pptx
PPTX
Why Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptx
PPTX
Code to Cloud Workshop.pptx
PPTX
Magic of Automation and Everyday Chores.pptx
PPTX
Code to Cloud Workshop
PPTX
Using Static Analysis Tools to Become a Superhero Programmer.pptx
PPTX
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
PPTX
Microservices made easy JavaCro 2021
PPTX
Replicating production on your laptop using the magic of containers v2
PPTX
Simple tweaks to get the most out of your JVM
PPTX
Open Source In The World Of Java
PPTX
Simple tweaks to get the most out of your jvm
PPTX
Codecamp 2020 microservices made easy workshop
PPTX
Cloud native java workshop
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
Black Friday Brilliance Managing a Billion Transactions with Tech, Tactics, a...
Breaking Down Digital Barriers Overcoming Challenges in Online Retail.pptx
Open Source Licence to Kill in Software Development
The Secret Life of Maven Central - LJC 2022.pptx
Code to Cloud Workshop, Shifting Security to the Left
The Death Star & The Ultimate Vulnerability.pptx
Why Building Your Ship (Application) with Raw Materials is a Bad Idea!.pptx
Code to Cloud Workshop.pptx
Magic of Automation and Everyday Chores.pptx
Code to Cloud Workshop
Using Static Analysis Tools to Become a Superhero Programmer.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Microservices made easy JavaCro 2021
Replicating production on your laptop using the magic of containers v2
Simple tweaks to get the most out of your JVM
Open Source In The World Of Java
Simple tweaks to get the most out of your jvm
Codecamp 2020 microservices made easy workshop
Cloud native java workshop
Ad

Recently uploaded (20)

PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
DOC
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PPTX
GSA Content Generator Crack (2025 Latest)
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PPTX
Full-Stack Developer Courses That Actually Land You Jobs
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
Introduction to Windows Operating System
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
PDF
BoxLang Dynamic AWS Lambda - Japan Edition
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PPTX
How to Odoo 19 Installation on Ubuntu - CandidRoot
PDF
Visual explanation of Dijkstra's Algorithm using Python
PDF
Guide to Food Delivery App Development.pdf
CNN LeNet5 Architecture: Neural Networks
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
UTEP毕业证学历认证,宾夕法尼亚克拉里恩大学毕业证未毕业
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
GSA Content Generator Crack (2025 Latest)
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
Full-Stack Developer Courses That Actually Land You Jobs
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
Introduction to Windows Operating System
Topaz Photo AI Crack New Download (Latest 2025)
Multiverse AI Review 2025: Access All TOP AI Model-Versions!
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
iTop VPN Crack Latest Version Full Key 2025
Ableton Live Suite for MacOS Crack Full Download (Latest 2025)
BoxLang Dynamic AWS Lambda - Japan Edition
How Tridens DevSecOps Ensures Compliance, Security, and Agility
How to Use SharePoint as an ISO-Compliant Document Management System
How to Odoo 19 Installation on Ubuntu - CandidRoot
Visual explanation of Dijkstra's Algorithm using Python
Guide to Food Delivery App Development.pdf

Replicating production on your laptop using the magic of containers

Editor's Notes

  • #5: Unix V7 in 1979, the chroot system call was introduced, changing the root directory of a process and its children to a new location in the filesystem. Process Containers (launched by Google in 2006) was designed for limiting, accounting and isolating resource usage (CPU, memory, disk I/O, network) of a collection of processes. LXC (LinuX Containers) was the first, most complete implementation of Linux container manager. It was implemented in 2008 using cgroups and Linux namespaces, and it works on a single Linux kernel without requiring any patches. 
  • #6: Unix V7 in 1979, the chroot system call was introduced, changing the root directory of a process and its children to a new location in the filesystem. Process Containers (launched by Google in 2006) was designed for limiting, accounting and isolating resource usage (CPU, memory, disk I/O, network) of a collection of processes. LXC (LinuX Containers) was the first, most complete implementation of Linux container manager. It was implemented in 2008 using cgroups and Linux namespaces, and it works on a single Linux kernel without requiring any patches. 
  • #7: Unix V7 in 1979, the chroot system call was introduced, changing the root directory of a process and its children to a new location in the filesystem. Process Containers (launched by Google in 2006) was designed for limiting, accounting and isolating resource usage (CPU, memory, disk I/O, network) of a collection of processes. LXC (LinuX Containers) was the first, most complete implementation of Linux container manager. It was implemented in 2008 using cgroups and Linux namespaces, and it works on a single Linux kernel without requiring any patches. 
  • #8: Unix V7 in 1979, the chroot system call was introduced, changing the root directory of a process and its children to a new location in the filesystem. Process Containers (launched by Google in 2006) was designed for limiting, accounting and isolating resource usage (CPU, memory, disk I/O, network) of a collection of processes. LXC (LinuX Containers) was the first, most complete implementation of Linux container manager. It was implemented in 2008 using cgroups and Linux namespaces, and it works on a single Linux kernel without requiring any patches. 
  • #9: Unix V7 in 1979, the chroot system call was introduced, changing the root directory of a process and its children to a new location in the filesystem. Process Containers (launched by Google in 2006) was designed for limiting, accounting and isolating resource usage (CPU, memory, disk I/O, network) of a collection of processes. LXC (LinuX Containers) was the first, most complete implementation of Linux container manager. It was implemented in 2008 using cgroups and Linux namespaces, and it works on a single Linux kernel without requiring any patches. 
  • #10: Unix V7 in 1979, the chroot system call was introduced, changing the root directory of a process and its children to a new location in the filesystem. Process Containers (launched by Google in 2006) was designed for limiting, accounting and isolating resource usage (CPU, memory, disk I/O, network) of a collection of processes. LXC (LinuX Containers) was the first, most complete implementation of Linux container manager. It was implemented in 2008 using cgroups and Linux namespaces, and it works on a single Linux kernel without requiring any patches.