SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Chris Wash CapTech Ventures FYB Aug 2010
Java EE Development Evolution POJO Model Container  Services Ease of Development Ease of Testing Framework Integration Dependency Injection JNDI CMP EJB2.x Struts Hibernate EJB3 JPA JSF CDI Weld Spring Arquillian Seam “Lightweight” movement Grails
Shift Focus to Testing in EE Lots of developers abandoned EE in search of greener “testing” pastures. Testing has not been the focus for most of the platform’s history. Ride the wave… encourage support and adoption Dev-friendly container-based component models cry out for ease of testability!
Real EE Testing What does “real” mean? Unit testing using doubles can only get us so far when working with container managed resources. Want to be confident we get the interactions correct between container managed resources Short feedback cycle when making a change
Integration Testing
Rolling Your Own How do I get unit test class into the container? Remote deployment (using hook into server) Bootstrap container inside test How do I exercise the code under test? How do I see the results of the test? How does test isolation work? Test classpath-hell Can I call it from IDE and get results?
Challenges to testing in container High barrier to entry Substantial code, configuration and infrastructure Most don’t run from IDE - where’s the feedback? Most aren’t reusable – tied to 1 project’s build Often slow (think “mvn package”) Can’t interact with containers from test (all black-box testing) Enough ROI to justify work/maintenance?
CDI (JSR-299) TCK + ALR EJB3 book examples Used by Weld Plan to be used by JBossAS “Ike” - controls everything in his little world Good way to learn CDI, EJB, JPA, etc.
Arquillian Features JUnit or TestNG compatible Abstracts out server lifecycle and deployment Injects container managed resources into test Zero reliance on build – run straight from IDE Two container modes – remote/embedded Pass-by-reference between test and server Even across JVMs Extensible SPI to plug any container in Single test executed against all containers
Arquillian Architecture
Arquillian: Flexibility Out of the box, supports multiple: Test frameworks (JUnit, TestNG) Containers Enrichers Run Modes Most things are pluggable API/SPI Modular design
ShrinkWrap “Skip the Build!” Fluent API for describing deployable archives Apache-licensed Zero transitive-dependency promise Solves test-classpath madness Removes dependency of integration tests on packaging Creates fine grained archives Contains only what you need
ShrinkWrap
ShrinkWrap IDE can perform incremental compilation Change a class that is ShrinkWrap’d, only that class needs to be recompiled (no repackaging) Poor man’s “hot swap”? Future support tooling views in IDEs See what your archive would look like when SW is executed
ShrinkWrap – Arquillian Integration Simple – method annotated @Deployable within your test class Gets called by ShrinkWrap when deploying your archive, “bundles it” on the fly
Containers Loosely defined, anything that accepts an archive deployment and provides services Arquillian finds specified DeployableContainer SPI on classpath Multiple containers already supported, fairly easy to add support for a container Configured by using Maven profiles, e.g. mvn test –Pjbossas-remote-6
Container Modes Describes how the test archive should be deployed Embedded Same JVM Bootstraps container, often “standalone” environment Managed Different JVM, same machine Server will be started/stopped as part of the test run Remote Different JVM, different machine Server startup/shutdown not controlled by ARQ Arquillian controls binding/unbinding to server
Container Support Notably, no Weblogic and no WebSphere yet Looking for community contribution No Spring or Hibernate yet, but they’re planned.
Enrichers Allow for injections into your test from within a container Out of the box, supports: @Resource (ghetto!) @EJB (a few caveats) @Inject (CDI) Transparent to user – internal lifecycle step before executing test methods
Run Modes IN_CONTAINER AS_CLIENT Arquillian uses this when running your test (after enrichment) Determines which side of the client/server divide the test method should be executed on See LocalRunServletTestCase
Embedded Lifecycle Bundle test archive* Use ShrinkWrap’d archive Bootstrap container Deploy archive to container Enrich test class Execute tests After execution, undeploy archive Stop container Display captured test results
Managed Lifecycle Bundle test archive* Use ShrinkWrap’d archive Add test class and invoker Bootstrap server Deploy archive to container Enrich test class Negotiate test method execution (based on Run Mode) Collect test results, return back thru Arquillian After execution, undeploy archive Stop server Display test results returned from server
Remote Lifecycle Bundle test archive* Use ShrinkWrap’d archive Add test class and invoker Bind to container Deploy archive to container Inside container, enrich test class Negotiate test method execution (based on Run Mode) Collect test results, return back thru Arquillian After execution, undeploy archive Unbind from container Display test results returned from server
Test Execution/SPI Overview
Demo
The Cons Lack of true test isolation Implementing feature to deal with isolation If using an Embedded container you’re in a “Simulated” environment Easy to turn an embedded test into a remote test
The Pros  Scale up to the level of integration you need by growing your test archive Rely on shared memory Don’t have to return/serialize a lot of state just to do asserts on Pass-by-reference works Don’t need remote views exposed just to test Managed concurrency Multiple containers for free
Future *Bundling – read Maven pom.xml and run through dependency resolution algorithm to include required dependencies Support for more Containers Performance monitoring Archive “bundle-time” class manipulation Exception, Callback, Assertion injection Component coverage recording Tooling support Framework integration Selenium, HTTPUnit, DBUnit, easyB
#jbosstesting initiatives Establish testing culture in Java EE! Other frameworks Placeebo – Mock Java EE API implementations (Fakes) JSFUnit – Gray-box JSF testing (Pretty cool, if you’ve seen SeamTest in action)
Further Info Chris Wash, @cwash (Twitter, Yammer) Use #testrevolutionhashtag Material jacked from the following sites: http://github.com/arquillian/arquillian-showcase http://www.slideshare.net/mojavelinux/real-javaeetestingwithanswers http://docs.jboss.org/arquillian/reference/latest/en-US/html_single IRC #jbosstestingirc.freenode.net Sites http://jboss.org/arquillian http://jboss.org/shrinkwrap Source http://github.com/arquillian

Weitere ähnliche Inhalte

Was ist angesagt?

Testcontainers - Geekout EE 2017 presentation
Testcontainers - Geekout EE 2017 presentationTestcontainers - Geekout EE 2017 presentation
Testcontainers - Geekout EE 2017 presentationRichard North
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With SeleniumMarakana Inc.
 
Take Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainersTake Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainersNaresha K
 
Arquillian & Citrus
Arquillian & CitrusArquillian & Citrus
Arquillian & Citruschristophd
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016Gavin Pickin
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toNicolas Fränkel
 
Testing Web Apps with Spring Framework
Testing Web Apps with Spring FrameworkTesting Web Apps with Spring Framework
Testing Web Apps with Spring FrameworkDmytro Chyzhykov
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationNicolas Fränkel
 
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...eleksdev
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Anton Arhipov
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsVMware Tanzu
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React AppAll Things Open
 
2014 Joker - Integration Testing from the Trenches
2014 Joker - Integration Testing from the Trenches2014 Joker - Integration Testing from the Trenches
2014 Joker - Integration Testing from the TrenchesNicolas Fränkel
 
Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)William Yeh
 
Testing the Grails Spring Security Plugins
Testing the Grails Spring Security PluginsTesting the Grails Spring Security Plugins
Testing the Grails Spring Security PluginsBurt Beckwith
 
Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsJohn Ferguson Smart Limited
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Controlindiver
 

Was ist angesagt? (20)

Testcontainers - Geekout EE 2017 presentation
Testcontainers - Geekout EE 2017 presentationTestcontainers - Geekout EE 2017 presentation
Testcontainers - Geekout EE 2017 presentation
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
 
Take Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainersTake Control of your Integration Testing with TestContainers
Take Control of your Integration Testing with TestContainers
 
Arquillian & Citrus
Arquillian & CitrusArquillian & Citrus
Arquillian & Citrus
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-to
 
Testing Web Apps with Spring Framework
Testing Web Apps with Spring FrameworkTesting Web Apps with Spring Framework
Testing Web Apps with Spring Framework
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012
 
Apache Lucene for Java EE Developers
Apache Lucene for Java EE DevelopersApache Lucene for Java EE Developers
Apache Lucene for Java EE Developers
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized Applications
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React App
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
2014 Joker - Integration Testing from the Trenches
2014 Joker - Integration Testing from the Trenches2014 Joker - Integration Testing from the Trenches
2014 Joker - Integration Testing from the Trenches
 
Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)Immutable infrastructure:觀念與實作 (建議)
Immutable infrastructure:觀念與實作 (建議)
 
Testing the Grails Spring Security Plugins
Testing the Grails Spring Security PluginsTesting the Grails Spring Security Plugins
Testing the Grails Spring Security Plugins
 
Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yards
 
Make It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version ControlMake It Cooler: Using Decentralized Version Control
Make It Cooler: Using Decentralized Version Control
 

Andere mochten auch

Enterprise Testing using Arquillian
Enterprise Testing using ArquillianEnterprise Testing using Arquillian
Enterprise Testing using ArquillianRafael Pestano
 
Making Your Results Visible - A Test Result Dashboard and Comparison Tool
Making Your Results Visible - A Test Result Dashboard and Comparison ToolMaking Your Results Visible - A Test Result Dashboard and Comparison Tool
Making Your Results Visible - A Test Result Dashboard and Comparison ToolXiaoxing Hu
 
Desarrollo de pruebas en entornos Java EE
Desarrollo de pruebas en entornos Java EEDesarrollo de pruebas en entornos Java EE
Desarrollo de pruebas en entornos Java EEJosé Manuel López
 
(Codemotion 2014) JVM GC: WTF?!
(Codemotion 2014) JVM GC: WTF?!(Codemotion 2014) JVM GC: WTF?!
(Codemotion 2014) JVM GC: WTF?!Alonso Torres
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, SuccessfullySauce Labs
 
Testing Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianReza Rahman
 
Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014Oren Rubin
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reza Rahman
 
QA Automation Solution
QA Automation SolutionQA Automation Solution
QA Automation SolutionDataArt
 

Andere mochten auch (12)

Enterprise Testing using Arquillian
Enterprise Testing using ArquillianEnterprise Testing using Arquillian
Enterprise Testing using Arquillian
 
Arquillian
ArquillianArquillian
Arquillian
 
Introduccion arqullian
Introduccion arqullianIntroduccion arqullian
Introduccion arqullian
 
Testing the Java EE
Testing the Java EETesting the Java EE
Testing the Java EE
 
Making Your Results Visible - A Test Result Dashboard and Comparison Tool
Making Your Results Visible - A Test Result Dashboard and Comparison ToolMaking Your Results Visible - A Test Result Dashboard and Comparison Tool
Making Your Results Visible - A Test Result Dashboard and Comparison Tool
 
Desarrollo de pruebas en entornos Java EE
Desarrollo de pruebas en entornos Java EEDesarrollo de pruebas en entornos Java EE
Desarrollo de pruebas en entornos Java EE
 
(Codemotion 2014) JVM GC: WTF?!
(Codemotion 2014) JVM GC: WTF?!(Codemotion 2014) JVM GC: WTF?!
(Codemotion 2014) JVM GC: WTF?!
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
 
Testing Java EE Applications Using Arquillian
Testing Java EE Applications Using ArquillianTesting Java EE Applications Using Arquillian
Testing Java EE Applications Using Arquillian
 
Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014Page Objects Done Right - selenium conference 2014
Page Objects Done Right - selenium conference 2014
 
Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!Reactive Java EE - Let Me Count the Ways!
Reactive Java EE - Let Me Count the Ways!
 
QA Automation Solution
QA Automation SolutionQA Automation Solution
QA Automation Solution
 

Ähnlich wie Arquillian

Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshellBrockhaus Group
 
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...JAXLondon2014
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianVirtual JBoss User Group
 
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Dan Allen
 
Level Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersLevel Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersVMware Tanzu
 
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Peter Pilgrim
 
Arquillian 소개
Arquillian 소개Arquillian 소개
Arquillian 소개성욱 전
 
테스트 어디까지 해봤니? Arquillian을 이용한 Real Object 테스트
테스트 어디까지 해봤니? Arquillian을 이용한 Real Object 테스트테스트 어디까지 해봤니? Arquillian을 이용한 Real Object 테스트
테스트 어디까지 해봤니? Arquillian을 이용한 Real Object 테스트jbugkorea
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Appschrisb206 chrisb206
 
Creating Realistic Unit Tests with Testcontainers
Creating Realistic Unit Tests with TestcontainersCreating Realistic Unit Tests with Testcontainers
Creating Realistic Unit Tests with TestcontainersPaul Balogh
 
Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Ryan Cuprak
 
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)DevelopIntelligence
 
JLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersJLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersGrace Jansen
 
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...telestax
 
Apache DeltaSpike
Apache DeltaSpikeApache DeltaSpike
Apache DeltaSpikeos890
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_ContainersGrace Jansen
 
Kubernetes your tests! automation with docker on google cloud platform
Kubernetes your tests! automation with docker on google cloud platformKubernetes your tests! automation with docker on google cloud platform
Kubernetes your tests! automation with docker on google cloud platformLivePerson
 

Ähnlich wie Arquillian (20)

Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshell
 
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
 
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
Throwing complexity over the wall: Rapid development for enterprise Java (Jav...
 
Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshell
 
Level Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersLevel Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With Testcontainers
 
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
 
Ensuring Software Quality in the cloud
Ensuring Software Quality in the cloudEnsuring Software Quality in the cloud
Ensuring Software Quality in the cloud
 
Arquillian 소개
Arquillian 소개Arquillian 소개
Arquillian 소개
 
테스트 어디까지 해봤니? Arquillian을 이용한 Real Object 테스트
테스트 어디까지 해봤니? Arquillian을 이용한 Real Object 테스트테스트 어디까지 해봤니? Arquillian을 이용한 Real Object 테스트
테스트 어디까지 해봤니? Arquillian을 이용한 Real Object 테스트
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Creating Realistic Unit Tests with Testcontainers
Creating Realistic Unit Tests with TestcontainersCreating Realistic Unit Tests with Testcontainers
Creating Realistic Unit Tests with Testcontainers
 
Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)
 
Advanced Java Testing
Advanced Java TestingAdvanced Java Testing
Advanced Java Testing
 
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
 
JLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containersJLove - Replicating production on your laptop using the magic of containers
JLove - Replicating production on your laptop using the magic of containers
 
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
Mobicents Summit 2012 - George Vagenas - Testing SIP Applications with Arquil...
 
Apache DeltaSpike
Apache DeltaSpikeApache DeltaSpike
Apache DeltaSpike
 
JBCN_Testing_With_Containers
JBCN_Testing_With_ContainersJBCN_Testing_With_Containers
JBCN_Testing_With_Containers
 
Kubernetes your tests! automation with docker on google cloud platform
Kubernetes your tests! automation with docker on google cloud platformKubernetes your tests! automation with docker on google cloud platform
Kubernetes your tests! automation with docker on google cloud platform
 

Kürzlich hochgeladen

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Arquillian

  • 1. Chris Wash CapTech Ventures FYB Aug 2010
  • 2. Java EE Development Evolution POJO Model Container Services Ease of Development Ease of Testing Framework Integration Dependency Injection JNDI CMP EJB2.x Struts Hibernate EJB3 JPA JSF CDI Weld Spring Arquillian Seam “Lightweight” movement Grails
  • 3. Shift Focus to Testing in EE Lots of developers abandoned EE in search of greener “testing” pastures. Testing has not been the focus for most of the platform’s history. Ride the wave… encourage support and adoption Dev-friendly container-based component models cry out for ease of testability!
  • 4. Real EE Testing What does “real” mean? Unit testing using doubles can only get us so far when working with container managed resources. Want to be confident we get the interactions correct between container managed resources Short feedback cycle when making a change
  • 6. Rolling Your Own How do I get unit test class into the container? Remote deployment (using hook into server) Bootstrap container inside test How do I exercise the code under test? How do I see the results of the test? How does test isolation work? Test classpath-hell Can I call it from IDE and get results?
  • 7. Challenges to testing in container High barrier to entry Substantial code, configuration and infrastructure Most don’t run from IDE - where’s the feedback? Most aren’t reusable – tied to 1 project’s build Often slow (think “mvn package”) Can’t interact with containers from test (all black-box testing) Enough ROI to justify work/maintenance?
  • 8. CDI (JSR-299) TCK + ALR EJB3 book examples Used by Weld Plan to be used by JBossAS “Ike” - controls everything in his little world Good way to learn CDI, EJB, JPA, etc.
  • 9. Arquillian Features JUnit or TestNG compatible Abstracts out server lifecycle and deployment Injects container managed resources into test Zero reliance on build – run straight from IDE Two container modes – remote/embedded Pass-by-reference between test and server Even across JVMs Extensible SPI to plug any container in Single test executed against all containers
  • 11. Arquillian: Flexibility Out of the box, supports multiple: Test frameworks (JUnit, TestNG) Containers Enrichers Run Modes Most things are pluggable API/SPI Modular design
  • 12. ShrinkWrap “Skip the Build!” Fluent API for describing deployable archives Apache-licensed Zero transitive-dependency promise Solves test-classpath madness Removes dependency of integration tests on packaging Creates fine grained archives Contains only what you need
  • 14. ShrinkWrap IDE can perform incremental compilation Change a class that is ShrinkWrap’d, only that class needs to be recompiled (no repackaging) Poor man’s “hot swap”? Future support tooling views in IDEs See what your archive would look like when SW is executed
  • 15. ShrinkWrap – Arquillian Integration Simple – method annotated @Deployable within your test class Gets called by ShrinkWrap when deploying your archive, “bundles it” on the fly
  • 16. Containers Loosely defined, anything that accepts an archive deployment and provides services Arquillian finds specified DeployableContainer SPI on classpath Multiple containers already supported, fairly easy to add support for a container Configured by using Maven profiles, e.g. mvn test –Pjbossas-remote-6
  • 17. Container Modes Describes how the test archive should be deployed Embedded Same JVM Bootstraps container, often “standalone” environment Managed Different JVM, same machine Server will be started/stopped as part of the test run Remote Different JVM, different machine Server startup/shutdown not controlled by ARQ Arquillian controls binding/unbinding to server
  • 18.
  • 19. Container Support Notably, no Weblogic and no WebSphere yet Looking for community contribution No Spring or Hibernate yet, but they’re planned.
  • 20. Enrichers Allow for injections into your test from within a container Out of the box, supports: @Resource (ghetto!) @EJB (a few caveats) @Inject (CDI) Transparent to user – internal lifecycle step before executing test methods
  • 21. Run Modes IN_CONTAINER AS_CLIENT Arquillian uses this when running your test (after enrichment) Determines which side of the client/server divide the test method should be executed on See LocalRunServletTestCase
  • 22. Embedded Lifecycle Bundle test archive* Use ShrinkWrap’d archive Bootstrap container Deploy archive to container Enrich test class Execute tests After execution, undeploy archive Stop container Display captured test results
  • 23. Managed Lifecycle Bundle test archive* Use ShrinkWrap’d archive Add test class and invoker Bootstrap server Deploy archive to container Enrich test class Negotiate test method execution (based on Run Mode) Collect test results, return back thru Arquillian After execution, undeploy archive Stop server Display test results returned from server
  • 24. Remote Lifecycle Bundle test archive* Use ShrinkWrap’d archive Add test class and invoker Bind to container Deploy archive to container Inside container, enrich test class Negotiate test method execution (based on Run Mode) Collect test results, return back thru Arquillian After execution, undeploy archive Unbind from container Display test results returned from server
  • 26. Demo
  • 27. The Cons Lack of true test isolation Implementing feature to deal with isolation If using an Embedded container you’re in a “Simulated” environment Easy to turn an embedded test into a remote test
  • 28. The Pros Scale up to the level of integration you need by growing your test archive Rely on shared memory Don’t have to return/serialize a lot of state just to do asserts on Pass-by-reference works Don’t need remote views exposed just to test Managed concurrency Multiple containers for free
  • 29. Future *Bundling – read Maven pom.xml and run through dependency resolution algorithm to include required dependencies Support for more Containers Performance monitoring Archive “bundle-time” class manipulation Exception, Callback, Assertion injection Component coverage recording Tooling support Framework integration Selenium, HTTPUnit, DBUnit, easyB
  • 30. #jbosstesting initiatives Establish testing culture in Java EE! Other frameworks Placeebo – Mock Java EE API implementations (Fakes) JSFUnit – Gray-box JSF testing (Pretty cool, if you’ve seen SeamTest in action)
  • 31. Further Info Chris Wash, @cwash (Twitter, Yammer) Use #testrevolutionhashtag Material jacked from the following sites: http://github.com/arquillian/arquillian-showcase http://www.slideshare.net/mojavelinux/real-javaeetestingwithanswers http://docs.jboss.org/arquillian/reference/latest/en-US/html_single IRC #jbosstestingirc.freenode.net Sites http://jboss.org/arquillian http://jboss.org/shrinkwrap Source http://github.com/arquillian

Hinweis der Redaktion

  1. We branched from Grails developers as we began to walk upright. 
  2. “Unit testing doesn’t catch the kind of bugs I write.”Test doubles – unit testing constructs that help provide test isolation. Fakes – empty impls make setup of test easier, like Spring test helpers. Stubs – simpler implementation for testing, like a dummy Paypalwebservice.Mocks – allow you to test interactions between collaborating objects.
  3. Without Arquillian…
  4. Classpath for the test has traditionally been a kitchen sink of all production classes and resources with the test classes and resources layered on top. Can make the test run undeterministic, different from what actually happens, hard to isolate different resources. One big reason to use SW – microdeployments – contain only what you need!