SlideShare a Scribd company logo
with	a	dash	of	chaos
with	a	dash	of	chaos
with	a	dash	of	chaos
with	a	dash	of	chaos
with	a	dash	of	chaos
with	a	dash	of	chaos
with	a	dash	of	chaoswith	a	dash	of	chaos






	
	
alexsotob		
alexsotob		
	
	
alexsotob		
alexsotob		
	
	
alexsotob		
alexsotob		
		alexsotob		alexsotob		
D O C K E R I Z E D 	 S Y S T E M 	 T E S T I N G
D O C K E R I Z E D 	 S Y S T E M 	 T E S T I N G
D O C K E R I Z E D 	 S Y S T E M 	 T E S T I N G
D O C K E R I Z E D 	 S Y S T E M 	 T E S T I N G
D O C K E R I Z E D 	 S Y S T E M 	 T E S T I N G
D O C K E R I Z E D 	 S Y S T E M 	 T E S T I N G
D O C K E R I Z E D 	 S Y S T E M 	 T E S T I N GD O C K E R I Z E D 	 S Y S T E M 	 T E S T I N G
A L E X 	 S O T O
R E D 	 H A T 	 E N G I N E E R
O P E N 	 S O U R C E 	 A D V O C A T E
@ A L E X S O T O B
	alexsotob		lordofthejars
Q U E S T I O N S
	alexsotob		lordofthejars
S O F T W A R E 	I S
E A T I N G 	 T H E 	W O R L D
	alexsotob		lordofthejars
	alexsotob		lordofthejars
	alexsotob		lordofthejars
	alexsotob		lordofthejars
A U T O M A T I C 	 T E S T S	A S 	 S O L U T I O N
	alexsotob		lordofthejars
U N I T 	 T E S T S 	A R E 	 N O T 	 E N O U G H
	alexsotob		lordofthejars
S O C I A B L E 	U N I T 	 T E S T S
	alexsotob		lordofthejars
W O U L D 	 I T 	 W O R K 	 I N 	P R O D U C T I O N 	?
	alexsotob		lordofthejars
H I G H - L E V E L 	 T E S T S	R U N N I N G 	 I N 	
P R O D U C T I O N - L I K E 	E N V I R O N M E N T
	alexsotob		lordofthejars
	alexsotob		lordofthejars
W H A T 	 I S 	A R Q U I L L I A N ?
Middleware
for
your
tests
	alexsotob		lordofthejars
W H A T 	 I S 	A R Q U I L L I A N ?
Middleware
for
your
tests
Fills
the
gap
between
Unit/Integration
tests
	alexsotob		lordofthejars
W H A T 	 I S 	A R Q U I L L I A N ?
Middleware
for
your
tests
Fills
the
gap
between
Unit/Integration
tests
Child's
game
	alexsotob		lordofthejars
W H A T 	 I S 	A R Q U I L L I A N ?
Middleware
for
your
tests
Fills
the
gap
between
Unit/Integration
tests
Child's
game
Any
kind
of
high-level
tests
	alexsotob		lordofthejars
W H A T 	 I S 	A R Q U I L L I A N ?
Middleware
for
your
tests
Fills
the
gap
between
Unit/Integration
tests
Child's
game
Any
kind
of
high-level
tests
JavaEE
and
beyond
	alexsotob		lordofthejars
W H A T 	 I S 	A R Q U I L L I A N ?
Middleware
for
your
tests
Fills
the
gap
between
Unit/Integration
tests
Child's
game
Any
kind
of
high-level
tests
JavaEE
and
beyond
Open
Source
	alexsotob		lordofthejars
apply	pluginapply	plugin::		"io.spring.dependency-management""io.spring.dependency-management"
dependencyManagement	dependencyManagement	{{
		imports			imports	{{
				mavenBom					mavenBom	'org.jboss.arquillian:arquillian-bom:1.1.10.Final''org.jboss.arquillian:arquillian-bom:1.1.10.Final'
				}}
}}		
B U I L D . G R A D L E
	alexsotob		lordofthejars
apply	pluginapply	plugin::		"io.spring.dependency-management""io.spring.dependency-management"
dependencyManagement	dependencyManagement	{{
		imports			imports	{{
				mavenBom					mavenBom	'org.jboss.arquillian:arquillian-bom:1.1.10.Final''org.jboss.arquillian:arquillian-bom:1.1.10.Final'
				}}
}}		
dependencies	dependencies	{{
		testCompile	group		testCompile	group::		'org.jboss.arquillian.junit''org.jboss.arquillian.junit',,	name	name::		'arquillian-junit-container''arquillian-junit-container'
B U I L D . G R A D L E
	alexsotob		lordofthejars
apply	pluginapply	plugin::		"io.spring.dependency-management""io.spring.dependency-management"
dependencyManagement	dependencyManagement	{{
		imports			imports	{{
				mavenBom					mavenBom	'org.jboss.arquillian:arquillian-bom:1.1.10.Final''org.jboss.arquillian:arquillian-bom:1.1.10.Final'
				}}
}}		
dependencies	dependencies	{{
		testCompile	group		testCompile	group::		'org.jboss.arquillian.junit''org.jboss.arquillian.junit',,	name	name::		'arquillian-junit-container''arquillian-junit-container'
		testCompile			testCompile	'org.apache.tomee:arquillian-tomee-remote:7.0.0''org.apache.tomee:arquillian-tomee-remote:7.0.0'
}}
B U I L D . G R A D L E
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		PlanetServiceAPITestPlanetServiceAPITest		{{
P L A N E T S T E S T . J A V A
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		PlanetServiceAPITestPlanetServiceAPITest		{{
		@		@DeploymentDeployment((testable	testable	==		falsefalse))
				publicpublic		staticstatic	WebArchive		WebArchive	createDeploymentcreateDeployment(())		{{
								returnreturn	ShrinkWrap	ShrinkWrap..createcreate((WebArchiveWebArchive..classclass))
												..addClassesaddClasses((SwapiGatewaySwapiGateway..classclass,,	PlanetService	PlanetService..classclass,,		......))
												..addAsResourceaddAsResource(("swapitest.properties""swapitest.properties",,		"swapi.properties""swapi.properties"));;
				}}
P L A N E T S T E S T . J A V A
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		PlanetServiceAPITestPlanetServiceAPITest		{{
		@		@DeploymentDeployment((testable	testable	==		falsefalse))
				publicpublic		staticstatic	WebArchive		WebArchive	createDeploymentcreateDeployment(())		{{
								returnreturn	ShrinkWrap	ShrinkWrap..createcreate((WebArchiveWebArchive..classclass))
												..addClassesaddClasses((SwapiGatewaySwapiGateway..classclass,,	PlanetService	PlanetService..classclass,,		......))
												..addAsResourceaddAsResource(("swapitest.properties""swapitest.properties",,		"swapi.properties""swapi.properties"));;
				}}
		@ArquillianResource		@ArquillianResource
		URL	url		URL	url;;
		@Test		@Test
				publicpublic		voidvoid		shouldReturnTheAverageshouldReturnTheAverage(())		{{
				final	String	average					final	String	average	==	RestAssured	RestAssured..getget((urlurl..toExternalFormtoExternalForm(())		++		
																																																				"rest/planet/orbital/average""rest/planet/orbital/average"))..asStringasString(());;
				assertThat				assertThat((averageaverage,,		isis(("1699.42""1699.42"))));;
				}}
}}
P L A N E T S T E S T . J A V A
	alexsotob		lordofthejars
D E M O
	alexsotob		lordofthejars
P R I N C I P L E S 	 O F 	A R Q U I L L I A N ?
Portable
tests
	alexsotob		lordofthejars
P R I N C I P L E S 	 O F 	A R Q U I L L I A N ?
Portable
tests
Executable
from
IDE
and
buildtool
	alexsotob		lordofthejars
P R I N C I P L E S 	 O F 	A R Q U I L L I A N ?
Portable
tests
Executable
from
IDE
and
buildtool
Reuse
exitsing
frameworks
	alexsotob		lordofthejars
P R I N C I P L E S 	 O F 	A R Q U I L L I A N ?
Portable
tests
Executable
from
IDE
and
buildtool
Reuse
exitsing
frameworks
Flexible
to
adapt
technologies
	alexsotob		lordofthejars
P R I N C I P L E S 	 O F 	A R Q U I L L I A N ?
Portable
tests
Executable
from
IDE
and
buildtool
Reuse
exitsing
frameworks
Flexible
to
adapt
technologies
Extensible
to
new
platforms
	alexsotob		lordofthejars
P R I N C I P L E S 	 O F 	A R Q U I L L I A N ?
Portable
tests
Executable
from
IDE
and
buildtool
Reuse
exitsing
frameworks
Flexible
to
adapt
technologies
Extensible
to
new
platforms
Ease
of
deployment
	alexsotob		lordofthejars
D O C K E R
	alexsotob		lordofthejars
	alexsotob		lordofthejars
A R Q U I L L I A N 	 C U B E
	alexsotob		lordofthejars
W H A T 	 I S 	C U B E ?
Manage
lifecycle
of
Docker
containers
	alexsotob		lordofthejars
W H A T 	 I S 	C U B E ?
Manage
lifecycle
of
Docker
containers
Uses
Arquillian
remote
adapters
	alexsotob		lordofthejars
W H A T 	 I S 	C U B E ?
Manage
lifecycle
of
Docker
containers
Uses
Arquillian
remote
adapters
Orchestrate
containers
	alexsotob		lordofthejars
W H A T 	 I S 	C U B E ?
Manage
lifecycle
of
Docker
containers
Uses
Arquillian
remote
adapters
Orchestrate
containers
Support
for
containerless
systems
	alexsotob		lordofthejars
W H A T 	 I S 	C U B E ?
Manage
lifecycle
of
Docker
containers
Uses
Arquillian
remote
adapters
Orchestrate
containers
Support
for
containerless
systems
Ready
for
Docker
Machine
	alexsotob		lordofthejars
dependencies	dependencies	{{
		testCompile			testCompile	'org.arquillian.cube:arquillian-cube-docker:1.0.0.Alpha11''org.arquillian.cube:arquillian-cube-docker:1.0.0.Alpha11'
}}
B U I L D . G R A D L E
	alexsotob		lordofthejars
<<arquillianarquillian>>
				<<extensionextension		qualifierqualifier==""dockerdocker"">>
												<<propertyproperty		namename==""machineNamemachineName"">>devdev</</propertyproperty>>
												<<propertyproperty		namename==""definitionFormatdefinitionFormat"">>COMPOSECOMPOSE</</propertyproperty>>
												<<propertyproperty		namename==""dockerContainersFiledockerContainersFile"">>docker-compose.ymldocker-compose.yml</</propertyproperty>>
				</</extensionextension>>
				
S R C / T E S T / R E S O U R C E S / A R Q U I L L I A N . X M L
	alexsotob		lordofthejars
<<arquillianarquillian>>
				<<extensionextension		qualifierqualifier==""dockerdocker"">>
												<<propertyproperty		namename==""machineNamemachineName"">>devdev</</propertyproperty>>
												<<propertyproperty		namename==""definitionFormatdefinitionFormat"">>COMPOSECOMPOSE</</propertyproperty>>
												<<propertyproperty		namename==""dockerContainersFiledockerContainersFile"">>docker-compose.ymldocker-compose.yml</</propertyproperty>>
				</</extensionextension>>
				
				<<containercontainer		qualifierqualifier==""tomcattomcat"">>
								<<configurationconfiguration>>
												<<propertyproperty		namename==""useruser"">>adminadmin</</propertyproperty>>
												<<propertyproperty		namename==""passpass"">>mypassmypass</</propertyproperty>>
								</</configurationconfiguration>>
				</</containercontainer>>
</</arquillianarquillian>>
S R C / T E S T / R E S O U R C E S / A R Q U I L L I A N . X M L
	alexsotob		lordofthejars
tomcattomcat::
		env_file		env_file::	envs	envs
		image		image::	tutum	tutum//tomcattomcat::7.07.0
		ports		ports::
												--		"8089:8089""8089:8089"
												--		"8088:8088""8088:8088"
												--		"8081:8080""8081:8080"
		links		links::
												--	pingpong	pingpong::pingpongpingpong
												
		pingpong		pingpong::
				image				image::	jonmorehouse	jonmorehouse//pingping--pongpong
				ports				ports::
												--		"8080:8080""8080:8080"
												
D O C K E R - C O M P O S E . Y M L
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		HelloWorldServletTestHelloWorldServletTest		{{
		@		@DeploymentDeployment((testabletestable==falsefalse))
				publicpublic		staticstatic	WebArchive		WebArchive	createcreate(())		{{
												returnreturn	ShrinkWrap	ShrinkWrap..createcreate((WebArchiveWebArchive..classclass,,		"hello.war""hello.war"))
																				..addClassaddClass((HelloWorldServletHelloWorldServlet..classclass));;
				}}
				
P I N G P O N G T E S T . J A V A
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		HelloWorldServletTestHelloWorldServletTest		{{
		@		@DeploymentDeployment((testabletestable==falsefalse))
				publicpublic		staticstatic	WebArchive		WebArchive	createcreate(())		{{
												returnreturn	ShrinkWrap	ShrinkWrap..createcreate((WebArchiveWebArchive..classclass,,		"hello.war""hello.war"))
																				..addClassaddClass((HelloWorldServletHelloWorldServlet..classclass));;
				}}
				
		@HostIp		@HostIp
		String	hostIp		String	hostIp;;
		@		@HostPortHostPort((containerName	containerName	==		"tomcat""tomcat",,	value		value	==		80808080))
		int	tomcatPort		int	tomcatPort;;
P I N G P O N G T E S T . J A V A
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		HelloWorldServletTestHelloWorldServletTest		{{
		@		@DeploymentDeployment((testabletestable==falsefalse))
				publicpublic		staticstatic	WebArchive		WebArchive	createcreate(())		{{
												returnreturn	ShrinkWrap	ShrinkWrap..createcreate((WebArchiveWebArchive..classclass,,		"hello.war""hello.war"))
																				..addClassaddClass((HelloWorldServletHelloWorldServlet..classclass));;
				}}
				
		@HostIp		@HostIp
		String	hostIp		String	hostIp;;
		@		@HostPortHostPort((containerName	containerName	==		"tomcat""tomcat",,	value		value	==		80808080))
		int	tomcatPort		int	tomcatPort;;
		@Test		@Test
				publicpublic		voidvoid		testtest((@ArquillianResource	URL	base@ArquillianResource	URL	base))	throws	IOException		throws	IOException	{{
				URL	obj					URL	obj	==		newnew		URLURL((basebase,,		"HelloWorld""HelloWorld"));;
				}}
P I N G P O N G T E S T . J A V A
	alexsotob		lordofthejars
D E M O
	alexsotob		lordofthejars
C O N T A I N E R L E S S
	alexsotob		lordofthejars
W H A T 	 I S 	C O N T A I N E R L E S S ?
Runs
any
application
that
runs
on
Docker
	alexsotob		lordofthejars
W H A T 	 I S 	C O N T A I N E R L E S S ?
Runs
any
application
that
runs
on
Docker
Including
but
not
limited
Nodejs,
Wildfly
Swarm,
Spring
Boot,
Vert.x,
Go
	alexsotob		lordofthejars
W H A T 	 I S 	C O N T A I N E R L E S S ?
Runs
any
application
that
runs
on
Docker
Including
but
not
limited
Nodejs,
Wildfly
Swarm,
Spring
Boot,
Vert.x,
Go
Shrinkwrap
support
	alexsotob		lordofthejars
dependencies	dependencies	{{
		testCompile			testCompile	'org.arquillian.cube:arquillian-cube-containerless:1.0.0.Alpha11''org.arquillian.cube:arquillian-cube-containerless:1.0.0.Alpha11'
}}
B U I L D . G R A D L E
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		NodeTestNodeTest		{{
				@				@DeploymentDeployment((testable	testable	==		falsefalse))
								publicpublic		staticstatic	GenericArchive		GenericArchive	createDeploymentcreateDeployment(())		{{
																returnreturn	ShrinkWrap	ShrinkWrap..createcreate((GenericArchiveGenericArchive..classclass,,		"app.tar""app.tar"))
																																..addadd((newnew		FileAssetFileAsset((newnew		FileFile(("src/test/js/index.js""src/test/js/index.js")))),,		"index.js""index.js"))
																																..addadd((newnew		FileAssetFileAsset((newnew		FileFile(("src/test/js/package.json""src/test/js/package.json")))),,		"package.json""package.json"));;
								}}
								
				@Test				@Test
								publicpublic		voidvoid		shouldReturnMessageFromNodeJsshouldReturnMessageFromNodeJs((@ArquillianResource	URL	base@ArquillianResource	URL	base))		{{
								}}
}}
N O D E J S T E S T . J A V A
	alexsotob		lordofthejars
FROM	nodeFROM	node::0.110.11..1414
RUN	mkdir	RUN	mkdir	--p	p	//usrusr//srcsrc//appapp
WORKDIR	WORKDIR	//usrusr//srcsrc//appapp
ADD	$ADD	${{deployableFilenamedeployableFilename}}		//usrusr//srcsrc//appapp
RUN	npm	installRUN	npm	install
EXPOSE	EXPOSE	80808080
CMD	CMD	[[		"npm""npm",,		"start""start"		]]
D O C K E R F I L E T E M P L A T E
	alexsotob		lordofthejars
nodeexamplenodeexample::
		build		build::	src	src//testtest//resourcesresources
				
D O C K E R - C O M P O S E . Y M L
	alexsotob		lordofthejars
<<extensionextension		qualifierqualifier==""dockerdocker"">>
				<<propertyproperty		namename==""machineNamemachineName"">>devdev</</propertyproperty>>
</</extensionextension>>
A R Q U I L L I A N . X M L
	alexsotob		lordofthejars
<<extensionextension		qualifierqualifier==""dockerdocker"">>
				<<propertyproperty		namename==""machineNamemachineName"">>devdev</</propertyproperty>>
</</extensionextension>>
<<containercontainer		qualifierqualifier==""containerlesscontainerless""		defaultdefault==""truetrue"">>
				<<configurationconfiguration>>
								<<propertyproperty		namename==""containerlessDockercontainerlessDocker"">>nodeexamplenodeexample</</propertyproperty>>
				</</configurationconfiguration>>
</</containercontainer>>
A R Q U I L L I A N . X M L
	alexsotob		lordofthejars
D E M O
	alexsotob		lordofthejars
C O N T A I N E R 	 O B J E C T	P A T T E R N
	alexsotob		lordofthejars
W H A T 	 A R E 	C O N T A I N E R 	 O B J E C T S?
Encapsulate
containers
(Operations
and
Configuration)
	alexsotob		lordofthejars
W H A T 	 A R E 	C O N T A I N E R 	 O B J E C T S?
Encapsulate
containers
(Operations
and
Configuration)
Single
Responsibility
	alexsotob		lordofthejars
W H A T 	 A R E 	C O N T A I N E R 	 O B J E C T S?
Encapsulate
containers
(Operations
and
Configuration)
Single
Responsibility
Reuse
	alexsotob		lordofthejars
@@CubeCube((value	value	==		"pingpong""pingpong",,	portBinding		portBinding	==		"5000->8080/tcp""5000->8080/tcp"))
publicpublic		classclass		PingPongContainerPingPongContainer		{{
P I N G - P O N G - C O N T A I N E R . J A R
	alexsotob		lordofthejars
@@CubeCube((value	value	==		"pingpong""pingpong",,	portBinding		portBinding	==		"5000->8080/tcp""5000->8080/tcp"))
publicpublic		classclass		PingPongContainerPingPongContainer		{{
		@HostIp		@HostIp
		String	dockerHost		String	dockerHost;;
		@		@HostPortHostPort((80808080))
				privateprivate	int	port	int	port;;
		@ArquillianResource		@ArquillianResource
				privateprivate	DockerClient	dockerClient	DockerClient	dockerClient;;
		@CubeDockerFile		@CubeDockerFile
				publicpublic		staticstatic	Archive		Archive	createContainercreateContainer(())		{{
				String	dockerDescriptor					String	dockerDescriptor	==	Descriptors	Descriptors..createcreate((DockerDescriptorDockerDescriptor..classclass))
																..fromfrom(("jonmorehouse/ping-pong""jonmorehouse/ping-pong"))..exportAsStringexportAsString(());;
								returnreturn	ShrinkWrap	ShrinkWrap..createcreate((GenericArchiveGenericArchive..classclass))
																..addadd((newnew		StringAssetStringAsset((dockerDescriptordockerDescriptor)),,		"Dockerfile""Dockerfile"));;
				}}
P I N G - P O N G - C O N T A I N E R . J A R
	alexsotob		lordofthejars
@@CubeCube((value	value	==		"pingpong""pingpong",,	portBinding		portBinding	==		"5000->8080/tcp""5000->8080/tcp"))
publicpublic		classclass		PingPongContainerPingPongContainer		{{
		@HostIp		@HostIp
		String	dockerHost		String	dockerHost;;
		@		@HostPortHostPort((80808080))
				privateprivate	int	port	int	port;;
		@ArquillianResource		@ArquillianResource
				privateprivate	DockerClient	dockerClient	DockerClient	dockerClient;;
		@CubeDockerFile		@CubeDockerFile
				publicpublic		staticstatic	Archive		Archive	createContainercreateContainer(())		{{
				String	dockerDescriptor					String	dockerDescriptor	==	Descriptors	Descriptors..createcreate((DockerDescriptorDockerDescriptor..classclass))
																..fromfrom(("jonmorehouse/ping-pong""jonmorehouse/ping-pong"))..exportAsStringexportAsString(());;
								returnreturn	ShrinkWrap	ShrinkWrap..createcreate((GenericArchiveGenericArchive..classclass))
																..addadd((newnew		StringAssetStringAsset((dockerDescriptordockerDescriptor)),,		"Dockerfile""Dockerfile"));;
				}}
				publicpublic	URL		URL	getConnectionURLgetConnectionURL(())		{{
				URL	url					URL	url	==		newnew		URLURL(("http://""http://"		++	dockerHost		dockerHost	++		":"":"		++	port	port));;
				}}
}}
P I N G - P O N G - C O N T A I N E R . J A R
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		PingPongTestPingPongTest		{{
		@Cube		@Cube
		PingPongContainer	pingPongContainer		PingPongContainer	pingPongContainer;;
				
P I N G P O N G T E S T . J A V A
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))
publicpublic		classclass		PingPongTestPingPongTest		{{
		@Cube		@Cube
		PingPongContainer	pingPongContainer		PingPongContainer	pingPongContainer;;
				
		@Test		@Test
				publicpublic		voidvoid		shouldReturnOkAsPongshouldReturnOkAsPong(())	throws	IOException		throws	IOException	{{
				String	pong					String	pong	==		pingping((pingPongContainerpingPongContainer..getConnectionUrlgetConnectionUrl(())));;
				assertThat				assertThat((pongpong,,		containsStringcontainsString(("OK""OK"))));;
				}}
}}
P I N G P O N G T E S T . J A V A
	alexsotob		lordofthejars
<<extensionextension		qualifierqualifier==""dockerdocker"">>
				<<propertyproperty		namename==""machineNamemachineName"">>devdev</</propertyproperty>>
</</extensionextension>>
A R Q U I L L I A N . X M L
	alexsotob		lordofthejars
D E M O
	alexsotob		lordofthejars
The	more	we	relay	on	being	online	
The	more	offline	support	is	needed?.
	alexsotob		lordofthejars
A R Q U I L L I A N 	 C U B E 	 Q
	alexsotob		lordofthejars
	alexsotob		lordofthejars
W H A T 	 I S 	Q ?
Automatic
redirect
to
Toxic
Proxy
	alexsotob		lordofthejars
W H A T 	 I S 	Q ?
Automatic
redirect
to
Toxic
Proxy
Toxicity
	alexsotob		lordofthejars
W H A T 	 I S 	Q ?
Automatic
redirect
to
Toxic
Proxy
Toxicity
Chaos
latency,
bandwidth,
down,
slow_close,
timeout,
slicer
	alexsotob		lordofthejars
W H A T 	 I S 	Q ?
Automatic
redirect
to
Toxic
Proxy
Toxicity
Chaos
latency,
bandwidth,
down,
slow_close,
timeout,
slicer
To
come
Long
test
execution
	alexsotob		lordofthejars
helloworldhelloworld::
		image		image::	lordofthejars	lordofthejars//helloworldhelloworld
		ports		ports::
								--		"8081:8080""8081:8080"
		links		links::
								--	pingpong	pingpong::pingpongpingpong
								
pingpongpingpong::
		image		image::	jonmorehouse	jonmorehouse//pingping--pongpong
		expose		expose::
												--		"8080""8080"
D O C K E R - C O M P O S E . Y M L
	alexsotob		lordofthejars
dependencies	dependencies	{{
		testCompile			testCompile	'org.arquillian.cube.q:arquillian-cube-q-toxic:1.0.0.Alpha1''org.arquillian.cube.q:arquillian-cube-q-toxic:1.0.0.Alpha1'
}}
B U I L D . G R A D L E
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))		//@Ignore//@Ignore
publicpublic		classclass		ToxicFuntionalTestCaseToxicFuntionalTestCase		{{
		@ArquillianResource		@ArquillianResource
				privateprivate	Q	Q	Q	Q;;
				
		@HostIp		@HostIp
				privateprivate	String	ip	String	ip;;
				
T O X I C F U N T I O N A L T E S T C A S E . J A V A
	alexsotob		lordofthejars
@@RunWithRunWith((ArquillianArquillian..classclass))		//@Ignore//@Ignore
publicpublic		classclass		ToxicFuntionalTestCaseToxicFuntionalTestCase		{{
		@ArquillianResource		@ArquillianResource
				privateprivate	Q	Q	Q	Q;;
				
		@HostIp		@HostIp
				privateprivate	String	ip	String	ip;;
				
		@Test		@Test
				publicpublic		voidvoid		shouldSurviveOnLatencyshouldSurviveOnLatency(())	throws	Exception		throws	Exception	{{
				Q				Q..onon(("pingpong""pingpong",,		80808080))..latencylatency((40004000,,		00,,		(())		-->>		{{
						URL	url							URL	url	==		newnew		URLURL(("http://""http://"		++	ip		ip	++		":"":"		++		80818081		++		"/hw/HelloWorld""/hw/HelloWorld"));;
						String	response							String	response	==	IOUtil	IOUtil..asStringasString((urlurl..openStreamopenStream(())));;
								}}));;
				}}
}}
T O X I C F U N T I O N A L T E S T C A S E . J A V A
	alexsotob		lordofthejars
D E M O
	alexsotob		lordofthejars
L E T ' S 	 W I N D 	 D O W N
	alexsotob		lordofthejars
Unit
tests
are
important
	alexsotob		lordofthejars
Unit
tests
are
important
But
test
in
production-like
environment
	alexsotob		lordofthejars
Unit
tests
are
important
But
test
in
production-like
environment
Arquillian
extensions
	alexsotob		lordofthejars
Unit
tests
are
important
But
test
in
production-like
environment
Arquillian
extensions
Be
prepared
for
Unexpected
	alexsotob		lordofthejars
Unit
tests
are
important
But
test
in
production-like
environment
Arquillian
extensions
Be
prepared
for
Unexpected
Arquillian
works
in
No
Java
projects
	alexsotob		lordofthejars
I T 
 I S 
N O T 
 N E C E S S A R Y
T O 
 C H A N G E . 

S U R V I V A L 
I S 
 N O T 
 M A N D A T O R Y.
W.	Edwards	Deming
	alexsotob		lordofthejars

http://www.slideshare.net/asotobu/docker-testing

asotobu@gmail.com
	alexsotob		lordofthejars
github.com/arquillian/arquillian-cube/tree/master/docker/ftest-docker-containerobject
github.com/arquillian/arquillian-cube/tree/master/docker/ftest-docker-compose
github.com/lordofthejars/starwars
http://toxiproxy.io
http://arquillian.org/
	alexsotob		lordofthejars

More Related Content

What's hot

Ankara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumuAnkara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumu
Ankara JUG
 
Baremetal deployment scale
Baremetal deployment scaleBaremetal deployment scale
Baremetal deployment scale
baremetal
 
Baremetal deployment
Baremetal deploymentBaremetal deployment
Baremetal deployment
baremetal
 
Effective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiDEffective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiD
CODEiD PHP Community
 
The Impact of Code Review Coverage and Participation on Software Quality
The Impact of Code Review Coverage and Participation on Software QualityThe Impact of Code Review Coverage and Participation on Software Quality
The Impact of Code Review Coverage and Participation on Software Quality
Shane McIntosh
 

What's hot (20)

Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your Master
 
Ankara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumuAnkara jug mayıs 2013 sunumu
Ankara jug mayıs 2013 sunumu
 
Baremetal deployment scale
Baremetal deployment scaleBaremetal deployment scale
Baremetal deployment scale
 
Baremetal deployment
Baremetal deploymentBaremetal deployment
Baremetal deployment
 
Testing Grails 3, the goob (unit), the bad (integration) and the ugly (functi...
Testing Grails 3, the goob (unit), the bad (integration) and the ugly (functi...Testing Grails 3, the goob (unit), the bad (integration) and the ugly (functi...
Testing Grails 3, the goob (unit), the bad (integration) and the ugly (functi...
 
[Perforce] Tasks - The Holy Hand Grenade of Branching
[Perforce] Tasks - The Holy Hand Grenade of Branching[Perforce] Tasks - The Holy Hand Grenade of Branching
[Perforce] Tasks - The Holy Hand Grenade of Branching
 
Effective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiDEffective codereview | Dave Liddament | CODEiD
Effective codereview | Dave Liddament | CODEiD
 
Chaos Engineering on Microservices - 윤석찬, AWS 테크에반젤리스트
Chaos Engineering on Microservices - 윤석찬, AWS 테크에반젤리스트 Chaos Engineering on Microservices - 윤석찬, AWS 테크에반젤리스트
Chaos Engineering on Microservices - 윤석찬, AWS 테크에반젤리스트
 
GraphQL, l'avenir du REST ?
GraphQL, l'avenir du REST ?GraphQL, l'avenir du REST ?
GraphQL, l'avenir du REST ?
 
GitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo ManagementGitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo Management
 
Testing Java Microservices Devoxx be 2017
Testing Java Microservices Devoxx be 2017Testing Java Microservices Devoxx be 2017
Testing Java Microservices Devoxx be 2017
 
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) :: 한국 카오스엔지니어링 밋업
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) ::  한국 카오스엔지니어링 밋업Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) ::  한국 카오스엔지니어링 밋업
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) :: 한국 카오스엔지니어링 밋업
 
My Notes from https://www.codeschool.com/courses/git-real
My Notes from  https://www.codeschool.com/courses/git-realMy Notes from  https://www.codeschool.com/courses/git-real
My Notes from https://www.codeschool.com/courses/git-real
 
The Bash Dashboard (Or: How to Use Bash for Data Analysis)
The Bash Dashboard (Or: How to Use Bash for Data Analysis)The Bash Dashboard (Or: How to Use Bash for Data Analysis)
The Bash Dashboard (Or: How to Use Bash for Data Analysis)
 
A Taxonomy of Clustering, or, No Container is an Island
A Taxonomy of Clustering, or, No Container is an IslandA Taxonomy of Clustering, or, No Container is an Island
A Taxonomy of Clustering, or, No Container is an Island
 
Version Control and Git - GitHub Workshop
Version Control and Git - GitHub WorkshopVersion Control and Git - GitHub Workshop
Version Control and Git - GitHub Workshop
 
Isolating GPU Access in its Own Process
Isolating GPU Access in its Own ProcessIsolating GPU Access in its Own Process
Isolating GPU Access in its Own Process
 
Tools Bringing Happiness
Tools Bringing HappinessTools Bringing Happiness
Tools Bringing Happiness
 
On the development and distribution of R packages
On the development and distribution of R packagesOn the development and distribution of R packages
On the development and distribution of R packages
 
The Impact of Code Review Coverage and Participation on Software Quality
The Impact of Code Review Coverage and Participation on Software QualityThe Impact of Code Review Coverage and Participation on Software Quality
The Impact of Code Review Coverage and Participation on Software Quality
 

Similar to Docker Testing

Sopa de letras y crucigrama
Sopa de letras y crucigramaSopa de letras y crucigrama
Sopa de letras y crucigrama
malatest
 
10 d bs in 30 minutes
10 d bs in 30 minutes10 d bs in 30 minutes
10 d bs in 30 minutes
David Simons
 

Similar to Docker Testing (20)

AWS Seminar Series 2015 Melbourne
AWS Seminar Series 2015 MelbourneAWS Seminar Series 2015 Melbourne
AWS Seminar Series 2015 Melbourne
 
AWS SeMINAR SERIES 2015 Sydney
AWS SeMINAR SERIES 2015 SydneyAWS SeMINAR SERIES 2015 Sydney
AWS SeMINAR SERIES 2015 Sydney
 
AWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 BrisbaneAWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 Brisbane
 
Auckland AWS Seminar Series
Auckland AWS Seminar SeriesAuckland AWS Seminar Series
Auckland AWS Seminar Series
 
Svelte (adjective): Attractively thin, graceful, and stylish
Svelte (adjective): Attractively thin, graceful, and stylishSvelte (adjective): Attractively thin, graceful, and stylish
Svelte (adjective): Attractively thin, graceful, and stylish
 
Choosing the right database
Choosing the right databaseChoosing the right database
Choosing the right database
 
Jenkins Docker
Jenkins DockerJenkins Docker
Jenkins Docker
 
OSDC 2017 - Sebastian Saemann - Developing a saa s platform based on open sou...
OSDC 2017 - Sebastian Saemann - Developing a saa s platform based on open sou...OSDC 2017 - Sebastian Saemann - Developing a saa s platform based on open sou...
OSDC 2017 - Sebastian Saemann - Developing a saa s platform based on open sou...
 
OSDC 2017 | Developing a SaaS platform based on Open Source Software by Sebas...
OSDC 2017 | Developing a SaaS platform based on Open Source Software by Sebas...OSDC 2017 | Developing a SaaS platform based on Open Source Software by Sebas...
OSDC 2017 | Developing a SaaS platform based on Open Source Software by Sebas...
 
AWS SEMINAR SERIES 2015 Perth
AWS SEMINAR SERIES 2015 PerthAWS SEMINAR SERIES 2015 Perth
AWS SEMINAR SERIES 2015 Perth
 
Google Assistant & Alexa - Asystenci głosowi: możliwości, podobieństwa, różnice
Google Assistant & Alexa - Asystenci głosowi: możliwości, podobieństwa, różniceGoogle Assistant & Alexa - Asystenci głosowi: możliwości, podobieństwa, różnice
Google Assistant & Alexa - Asystenci głosowi: możliwości, podobieństwa, różnice
 
eHarmony @ Phoenix Con 2016
eHarmony @ Phoenix Con 2016eHarmony @ Phoenix Con 2016
eHarmony @ Phoenix Con 2016
 
Drones - What's next?
Drones - What's next?Drones - What's next?
Drones - What's next?
 
Drones: What’s Next?
Drones: What’s Next?Drones: What’s Next?
Drones: What’s Next?
 
Sopa de letras y crucigrama
Sopa de letras y crucigramaSopa de letras y crucigrama
Sopa de letras y crucigrama
 
Serverless WordPress & next Interface of WordPress
Serverless WordPress & next Interface of WordPressServerless WordPress & next Interface of WordPress
Serverless WordPress & next Interface of WordPress
 
Angular server side rendering with NodeJS - In Pursuit Of Speed
Angular server side rendering with NodeJS - In Pursuit Of SpeedAngular server side rendering with NodeJS - In Pursuit Of Speed
Angular server side rendering with NodeJS - In Pursuit Of Speed
 
10 d bs in 30 minutes
10 d bs in 30 minutes10 d bs in 30 minutes
10 d bs in 30 minutes
 
Developing Apps With React Native
Developing Apps With React NativeDeveloping Apps With React Native
Developing Apps With React Native
 
Data Modelling at Scale
Data Modelling at ScaleData Modelling at Scale
Data Modelling at Scale
 

More from Alex Soto

More from Alex Soto (20)

Kubernetes Native Java
Kubernetes Native JavaKubernetes Native Java
Kubernetes Native Java
 
Reactive Programming for Real Use Cases
Reactive Programming for Real Use CasesReactive Programming for Real Use Cases
Reactive Programming for Real Use Cases
 
Chaos Engineering Kubernetes
Chaos Engineering KubernetesChaos Engineering Kubernetes
Chaos Engineering Kubernetes
 
Chaos Engineering Kubernetes
Chaos Engineering KubernetesChaos Engineering Kubernetes
Chaos Engineering Kubernetes
 
Microservices testing and automation
Microservices testing and automationMicroservices testing and automation
Microservices testing and automation
 
Testing in Production: From DevTestOops to DevTestOps
Testing in Production: From DevTestOops to DevTestOpsTesting in Production: From DevTestOops to DevTestOps
Testing in Production: From DevTestOops to DevTestOps
 
Supersonic Subatomic Java
Supersonic Subatomic JavaSupersonic Subatomic Java
Supersonic Subatomic Java
 
From DevTestOops to DevTestOps
From DevTestOops to DevTestOpsFrom DevTestOops to DevTestOps
From DevTestOops to DevTestOps
 
Istio service mesh & pragmatic microservices architecture
Istio service mesh & pragmatic microservices architectureIstio service mesh & pragmatic microservices architecture
Istio service mesh & pragmatic microservices architecture
 
Zero Downtime Deployment in Microservices era
Zero Downtime Deployment in Microservices eraZero Downtime Deployment in Microservices era
Zero Downtime Deployment in Microservices era
 
Service Mesh Patterns
Service Mesh PatternsService Mesh Patterns
Service Mesh Patterns
 
Supersonic, Subatomic Java
Supersonic, Subatomic JavaSupersonic, Subatomic Java
Supersonic, Subatomic Java
 
Zero Downtime Deployment in Microservices era
Zero Downtime Deployment in Microservices eraZero Downtime Deployment in Microservices era
Zero Downtime Deployment in Microservices era
 
Long Live and Prosper To Monolith
Long Live and Prosper To MonolithLong Live and Prosper To Monolith
Long Live and Prosper To Monolith
 
Sail in the cloud - An intro to Istio commit
Sail in the cloud - An intro to Istio commitSail in the cloud - An intro to Istio commit
Sail in the cloud - An intro to Istio commit
 
KubeBoot - Spring Boot deployment on Kubernetes
KubeBoot - Spring Boot deployment on KubernetesKubeBoot - Spring Boot deployment on Kubernetes
KubeBoot - Spring Boot deployment on Kubernetes
 
Sail in the Cloud - An intro to Istio
Sail in the Cloud  - An intro to IstioSail in the Cloud  - An intro to Istio
Sail in the Cloud - An intro to Istio
 
Testing XXIst Century
Testing XXIst CenturyTesting XXIst Century
Testing XXIst Century
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian Constellation
 
Testing for Unicorns
Testing for UnicornsTesting for Unicorns
Testing for Unicorns
 

Recently uploaded

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 

Docker Testing