SlideShare a Scribd company logo
1 of 54
Alien Driven Development
Integrationstests with Pleasure
http://blog.eisele.net/
@myfear
http://myfear.com/+
markus@eisele.net
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net4
Testing is too hard.
Testing isn’t fun.
Testing is so sloow.
Testing sucks!
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net5
Unit Tests Integration Tests System Tests
Complexity
Functional
Test Code
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net6
You can’t fix what you can’t run.
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net7
You can’t fix what you can’t debug.
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net8
You can’t fix what you can’t test.
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net9
You can’t develop what you can’t test.
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net10
Not testing needs to be more painful
And time consuming than using testing.
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net11
What is touched
by testing?
Frameworks
Build
IDE
Server
Client
Code
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net12
Frameworks
Build
IDE
Server
Client
EE Spring DI
Maven Ant Gradle
Eclipse NetBeans IntelliJ
GlassFish Tomcat AS7
IE Chrome FF
…
…
…
…
…
Code Source Test Other …
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net13
http://www.youtube.com/watch?v=VpZmIiIXuZ0
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net14
An Innovative Testing Platform for the JVM
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net15
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net16
Guiding Principles
 Tests should be portable to any supported container
 Tests should be executable from IDE and build tool
 Should extend or integrate existing test frameworks
https://docs.jboss.org/author/display/ARQ/Reference+Guide
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net17
SourceTest
IDE
Build
Frameworks
Tests Classes
Server
Deps
Package
~
Client
arquillian
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net18
SourceTest
IDE
Build
Tests Classes
Server
Deps
Package
ClientPackage
Client
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net19
Lifecycle
 Select Container
 Start Container
 Package Archive
 Run Test in Container
 Show Results
 Undeploy / Disconnect
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net20
Basic Setup
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.0.4.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net21
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<!-- … -->
</dependencies>
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net22
Java EE Container Support
Embedded Managed Remote
https://docs.jboss.org/author/display/ARQ/Container+adapters
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net23
<profiles>
<profile>
<id>arquillian-glassfish-managed</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-managed-3.1</artifactId>
<version>1.0.0.CR4</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
https://docs.jboss.org/author/display/ARQ/Container+adapters
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net24
<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<container qualifier="glassfish" default="true">
<configuration>
<property name="glassFishHome">D:glassfish4-b85</property>
<property name="adminHost">localhost</property>
<property name="adminPort">4848</property>
</configuration>
</container>
</arquillian>
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net25
@Stateless
public class HelloBean {
public String sayHello(String name) {
return "Hello " + name + "!";
}
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net26
@RunWith(Arquillian.class)
public class HelloBeanIntegrationTest {
@EJB
HelloBean hello;
@Deployment
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class)
.addClass(HelloBean.class)
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
@Test
public void shouldSayHello() throws Exception {
Assert.assertEquals("Hello Earthling!", hello.sayHello("Earthling"));
}
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net27
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net28
http://www.youtube.com/watch?v=VpZmIiIXuZ0
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net29
https://docs.jboss.org/author/display/ARQ/Drone
Drone
…brings power of Selenium into Arquillian framework.
@Drone
WebDriver driver;
@Test
@InSequence(1)
public void login() {
driver.get(contextPath + "home.jsf");
driver.findElement(USERNAME_FIELD).sendKeys(USERNAME);
driver.findElement(PASSWORD_FIELD).sendKeys(PASSWORD);
driver.findElement(LOGIN_BUTTON).click();
Assert.isTrue("User is logged in.",
driver.findElement(LOGGED_IN).isDisplayed());
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net30
Graphene
https://docs.jboss.org/author/display/ARQ/Graphene
…brings power of Selenium and AJAX into Arquillian
framework.
@RunWith(Arquillian.class)
public class TestLogin {
@Drone
WebDriver browser;
@Page
HomePage homePage;
@Test(expects = LoginFailedException.class)
public void testLoginFailed(){
homePage.login("non-existent", "user");
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net31
Warp
https://github.com/arquillian/arquillian-extension-warp/blob/master/README.md
…client-side test which asserts server-side logic.
@RunWith(Arquillian.class)
@WarpTest
@RunAsClient
public class BasicTest {
//...
}
Warp
.initiate(Activity)
.inspect(Inspection);
@BeforeServlet
@AfterServlet
@BeforePhase
@AfterPhase
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net32
Warp
.initiate(new Activity() {
public void perform() {
WebElement nameInput =
browser.findElement(By.id("helloWorldJsf:nameInput"));
nameInput.sendKeys("X");
browser.findElement(By.tagName("body")).click();
}})
.inspect(new Inspection() {
private static final long serialVersionUID = 1L;
@Inject
CdiBean myBean;
private String updatedName;
@BeforePhase(UPDATE_MODEL_VALUES)
public void initial_state_havent_changed_yet() {
assertEquals("John", myBean.getName());
}
});
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net33
Transaction
https://github.com/arquillian/arquillian-extension-transaction
…enhances your tests with transaction support.
@RunWith(Arquillian.class)
public class TransactionTest {
@Deployment
public static WebArchive deployment() {
//...
}
@Test
@Transactional(TransactionMode.ROLLBACK)
public void test() {
//….
}
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net34
Persistence
https://docs.jboss.org/author/display/ARQ/Persistence
…helps with database wrangling.
@RunWith(Arquillian.class)
public class PersistenceTest {
@Deployment
public static WebArchive deployment() {
//...
.addAsResource("test-persistence.xml", "persistence.xml");
}
@Test
@UsingDataSet("datasets/users.yml")
@ShouldMatchDataSet("datasets/expected-users.yml")
public void test() {
//….
}
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net35
https://docs.jboss.org/author/display/ARQ/Persistence
@RunWith(Arquillian.class)
@CreateSchema("scripts/ddl.sql")
public class PersistenceTest {
@Deployment
public static WebArchive deployment() {
//...
.addAsManifestResource("test-persistence.xml", "persistence.xml");
}
@Test
@UsingDataSet("datasets/users.yml")
@ShouldMatchDataSet("datasets/expected-users.yml")
@CleanupUsingScript("drop-schema.sql")
public void test() {
//….
}
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net36
Performance
https://docs.jboss.org/author/display/ARQ/Performance
…keeps your tests in time.
@RunWith(Arquillian.class)
@PerformanceTest(resultsThreshold = 2)
public class PersformanceTest {
@Deployment
public static WebArchive deployment() {
//...
}
@Test
@Performance(time = 575)
public void test() {
//….
}
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net37
Seam 2
https://docs.jboss.org/author/display/ARQ/Seam+2
…bringing Seam 2 Context to Arquillian.
@RunWith(Arquillian.class)
public class ComponentInjectionTest {
@Deployment
public static WebArchive deployment() {
//...
.addAsResource(EmptyAsset.INSTANCE, "seam.properties");
}
@In
SomeSeamComponent component;
@Test
public void test() {
assertThat(component).isNotNull();
}
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net38
Spring
https://github.com/arquillian/arquillian-extension-spring
…bringing Spring 2 and 3 to Arquillian.
• Injection of Spring beans into test classes
• Configuration from both XML and Java-based config
• Injecting beans configured in web application (e.g. DispatcherServlet)
for tests annotated with @SpringWebConfiguration
• Support for both Spring(@Autowired, @Qualifier, @Required) and
JSR-330(@Inject, @Named) annotations
• Bean initialization support (@PostConstruct)
• Auto packaging the spring-context and spring-web artifacts.
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net39
Guice
https://github.com/arquillian/arquillian-extension-guice
…bringing Guice DI to Arquillian.
@RunWith(Arquillian.class)
@GuiceConfiguration(AppointmentModule.class)
public class ComponentInjectionTest {
@Deployment
public static WebArchive deployment() {
//...
}
@Inject
@Named("appointmentService")
private AppointmentService appointmentService;
@Test
public void test() {
assertThat(appointmentService).isNotNull();
}
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net40
Spock
https://github.com/arquillian/arquillian-testrunner-spock
…bringing Spock Testing to Arquillian.
@Inject
AccountService service
def "transferring between accounts should result in account withdrawal and
deposit"() {
when:
service.transfer(from, to, amount)
then:
from.balance == fromBalance
to.balance == toBalance
where:
from << [new Account(100), new Account(10)]
to << [new Account(50), new Account(90)]
amount << [50, 10]
fromBalance << [50, 0]
toBalance << [100, 100]
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net41
Screen Recorder
https://github.com/arquillian/arquillian-extension-screenrecorder
…records your tests.
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-screen-recorder</artifactId>
<version>1.0.0.Alpha1</version>
</dependency>
<extension qualifier="screenRecorder">
<property name="rootFolder">target</property>
<property name="videoFolder">video</property>
<property name="videoName">myTestVideo</property>
<property name="video">suite</property>
<property name="screenshot">test</property>
</extension>
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net42
Jacoco
https://github.com/arquillian/arquillian-extension-jacoco
…gives you test-coverage.
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.3.201306030806</version>
</plugin>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-jacoco</artifactId>
<version>1.0.0.Alpha5</version>
</dependency>
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net43
Google Web Toolkit
https://github.com/arquillian/arquillian-extension-gwt
… brings Arquillian to GWT.
@Test
@RunAsGwtClient(moduleName = "org.myapp.MyGwtModule")
public void testGreetingService() {
GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
greetingService.greetServer("Hello!", new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
Assert.fail("Request failure: " + caught.getMessage());
}
@Override
public void onSuccess(String result) {
assertEquals("Received invalid response from Server", "Welcome!", result);
finishTest();
}
});
delayTestFinish(5000);
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net44
Portal
https://github.com/arquillian/arquillian-extension-portal
…help you write tests for portlets.
@RunWith(Arquillian.class)
@PortalTest
public class PortletTest {
@Deployment
public static WebArchive deployment() {
//...
}
@ArquillianResource
@PortalURL
URL portalURL;
@Test
@RunAsClient
public void renderFacesPortlet() throws Exception {
browser.get(portalURL.toString());
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net45
https://github.com/arquillian/arquillian-extension-byteman
Byteman …gives you runtime bytecode manipulation.
@RunWith(Arquillian.class)
@BMRules(
@BMRule(
name = "Throw exception on success", targetClass =
"StatelessManagerBean", targetMethod = "forcedClassLevelFailure",
action = "throw new java.lang.RuntimeException()")
)
public class BytemanFaultInjectionTestCase {
//…
@EJB(mappedName = "java:module/StatelessManagerBean")
private StatelessManager bean;
@Test(expected = EJBException.class) {
Assert.assertNotNull("Verify bean was injected", bean);
bean.forcedMethodLevelFailure();
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net46
JRebel
https://github.com/arquillian/arquillian-extension-jrebel
… hot-deploy your integration tests.
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-jrebel-impl</artifactId>
<version>1.0.0.Alpha1</version>
</dependency>
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net47
OSGi
https://github.com/arquillian/arquillian-container-osgi
… brings Arquillian to OSGi Frameworks.
@RunWith(Arquillian.class)
public class SimpleBundleTestCase {
@ArquillianResource
BundleContext context;
@Deployment
public static JavaArchive createdeployment() {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class,
"test.jar");
archive.setManifest(new Asset() {
public InputStream openStream() {
OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
builder.addBundleSymbolicName(archive.getName());
builder.addBundleManifestVersion(2);
builder.addImportPackages(Bundle.class);
return builder.openStream(); } });
return archive;
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net48
@Test
public void testBundleContextInjection() {
assertNotNull("BundleContext injected", context);
assertEquals("System Bundle ID", 0, context.getBundle().getBundleId());
}
@Test
public void testBundleInjection(@ArquillianResource Bundle bundle) {
// Assert that the bundle is injected
assertNotNull("Bundle injected", bundle);
// Assert that the bundle is in state RESOLVED
// Note when the test bundle contains the test case it
// must be resolved already when this test method is called
assertEquals("Bundle RESOLVED", Bundle.RESOLVED, bundle.getState());
// Start the bundle
bundle.start();
assertEquals("Bundle ACTIVE", Bundle.ACTIVE, bundle.getState());
https://github.com/arquillian/arquillian-container-osgi
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net49
https://github.com/arquillian/arquillian-droidium
…brings Native and WebDriver based testing to
Android devices.
<container qualifier="android">
<configuration>
<property name="adapterImplClass">
org.jboss.arquillian.container.android.managed.AndroidManagedDeployableContainer
</property>
</configuration>
</container>
@ArquillianResource
AndroidDevice android;
@Test
@OperateOnDeployment("android1")
public void test01() {
assertTrue(android != null);
}
Droidium
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net50
iOS Platform
https://github.com/arquillian/arquillian-extension-ios
…brings Native and WebDriver based testing to
iOS devices.
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net51
QUnit automates the QUnit JavaScript testing on Web
Applications
@RunWith(QUnitRunner.class)
@QUnitResources("src/test/resources/assets")
public class QUnitRunnerTestCase {
@QUnitTest("tests/ticketmonster/qunit-tests-dom.html")
@InSequence(1)
public void qunitDomTest() {
// empty body - only the annotations are used
}
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net52
Cukespace … deploy and run Cucumber features using Arquillian.
@RunWith(ArquillianCucumber.class)
public class CukesInBellyTest {
@Deployment
public static Archive<?> createDeployment() {
return ShrinkWrap.create(WebArchive.class)
//…
.addAsResource("my/features/cukes.feature");
}
@EJB private CukeService service;
@Inject private CukeLocator cukeLocator;
@When("^I persist my cuke$")
public void persistCuke() {
this.service.persist(this.cukeLocator.findCuke());
}
}
https://github.com/cukespace/cukespace
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net53
© msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net54
Questions?

More Related Content

Similar to Alien driven-development

Test-Driven Development for Developers: Plain and Simple
Test-Driven Development for Developers: Plain and SimpleTest-Driven Development for Developers: Plain and Simple
Test-Driven Development for Developers: Plain and SimpleTechWell
 
The Challenges of BIG Testing: Automation, Virtualization, Outsourcing, and More
The Challenges of BIG Testing: Automation, Virtualization, Outsourcing, and MoreThe Challenges of BIG Testing: Automation, Virtualization, Outsourcing, and More
The Challenges of BIG Testing: Automation, Virtualization, Outsourcing, and MoreTechWell
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksKunal Ashar
 
Test Automation on Large Agile Projects: It's Not a Cakewalk
Test Automation on Large Agile Projects: It's Not a CakewalkTest Automation on Large Agile Projects: It's Not a Cakewalk
Test Automation on Large Agile Projects: It's Not a CakewalkTechWell
 
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
 
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power Tools
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power ToolsJavaOne 2017 CON2902 - Java Code Inspection and Testing Power Tools
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power ToolsJorge Hidalgo
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrumSyam Sasi
 
Fostering Long-Term Test Automation Success
Fostering Long-Term Test Automation SuccessFostering Long-Term Test Automation Success
Fostering Long-Term Test Automation SuccessJosiah Renaudin
 
Sydney mule soft meetup 30 april 2020
Sydney mule soft meetup   30 april 2020Sydney mule soft meetup   30 april 2020
Sydney mule soft meetup 30 april 2020Royston Lobo
 
Priyanka Singh_testing_resume
Priyanka Singh_testing_resumePriyanka Singh_testing_resume
Priyanka Singh_testing_resumePriyanka Singh
 
Automation Testing of Web based Application with Selenium and HP UFT (QTP)
Automation Testing of Web based Application with Selenium and HP UFT (QTP)Automation Testing of Web based Application with Selenium and HP UFT (QTP)
Automation Testing of Web based Application with Selenium and HP UFT (QTP)IRJET Journal
 
Mastering Model-based Systems Engineering
Mastering Model-based Systems EngineeringMastering Model-based Systems Engineering
Mastering Model-based Systems EngineeringAnsys
 
It's Not Continuous Delivery If You Can't Deploy Right Now
It's Not Continuous Delivery If You Can't Deploy Right NowIt's Not Continuous Delivery If You Can't Deploy Right Now
It's Not Continuous Delivery If You Can't Deploy Right NowKen Mugrage
 
Universal test solutions customer testimonial 10192013-v2.3
Universal test solutions customer testimonial 10192013-v2.3Universal test solutions customer testimonial 10192013-v2.3
Universal test solutions customer testimonial 10192013-v2.3Universal Technology Solutions
 
Strategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source FrameworksStrategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source FrameworksDimitry Polivaev
 
Practical Test Automation Deep Dive
Practical Test Automation Deep DivePractical Test Automation Deep Dive
Practical Test Automation Deep DiveAlan Richardson
 
How to apply AI to Testing
How to apply AI to TestingHow to apply AI to Testing
How to apply AI to TestingSAP SE
 

Similar to Alien driven-development (20)

Test-Driven Development for Developers: Plain and Simple
Test-Driven Development for Developers: Plain and SimpleTest-Driven Development for Developers: Plain and Simple
Test-Driven Development for Developers: Plain and Simple
 
The Challenges of BIG Testing: Automation, Virtualization, Outsourcing, and More
The Challenges of BIG Testing: Automation, Virtualization, Outsourcing, and MoreThe Challenges of BIG Testing: Automation, Virtualization, Outsourcing, and More
The Challenges of BIG Testing: Automation, Virtualization, Outsourcing, and More
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web Frameworks
 
Test Automation on Large Agile Projects: It's Not a Cakewalk
Test Automation on Large Agile Projects: It's Not a CakewalkTest Automation on Large Agile Projects: It's Not a Cakewalk
Test Automation on Large Agile Projects: It's Not a Cakewalk
 
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
 
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power Tools
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power ToolsJavaOne 2017 CON2902 - Java Code Inspection and Testing Power Tools
JavaOne 2017 CON2902 - Java Code Inspection and Testing Power Tools
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrum
 
Fostering Long-Term Test Automation Success
Fostering Long-Term Test Automation SuccessFostering Long-Term Test Automation Success
Fostering Long-Term Test Automation Success
 
Sydney mule soft meetup 30 april 2020
Sydney mule soft meetup   30 april 2020Sydney mule soft meetup   30 april 2020
Sydney mule soft meetup 30 april 2020
 
Priyanka Singh_testing_resume
Priyanka Singh_testing_resumePriyanka Singh_testing_resume
Priyanka Singh_testing_resume
 
Automation Testing of Web based Application with Selenium and HP UFT (QTP)
Automation Testing of Web based Application with Selenium and HP UFT (QTP)Automation Testing of Web based Application with Selenium and HP UFT (QTP)
Automation Testing of Web based Application with Selenium and HP UFT (QTP)
 
Mastering Model-based Systems Engineering
Mastering Model-based Systems EngineeringMastering Model-based Systems Engineering
Mastering Model-based Systems Engineering
 
It's Not Continuous Delivery If You Can't Deploy Right Now
It's Not Continuous Delivery If You Can't Deploy Right NowIt's Not Continuous Delivery If You Can't Deploy Right Now
It's Not Continuous Delivery If You Can't Deploy Right Now
 
Grails Advanced
Grails Advanced Grails Advanced
Grails Advanced
 
Universal test solutions customer testimonial 10192013-v2.3
Universal test solutions customer testimonial 10192013-v2.3Universal test solutions customer testimonial 10192013-v2.3
Universal test solutions customer testimonial 10192013-v2.3
 
Modularization in java 8
Modularization in java 8Modularization in java 8
Modularization in java 8
 
Strategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source FrameworksStrategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source Frameworks
 
Practical Test Automation Deep Dive
Practical Test Automation Deep DivePractical Test Automation Deep Dive
Practical Test Automation Deep Dive
 
SQL TUNING 101
SQL TUNING 101SQL TUNING 101
SQL TUNING 101
 
How to apply AI to Testing
How to apply AI to TestingHow to apply AI to Testing
How to apply AI to Testing
 

More from Markus Eisele

Sustainable Software Architecture - Open Tour DACH '22
Sustainable Software Architecture - Open Tour DACH '22Sustainable Software Architecture - Open Tour DACH '22
Sustainable Software Architecture - Open Tour DACH '22Markus Eisele
 
Going from java message service (jms) to eda
Going from java message service (jms) to eda Going from java message service (jms) to eda
Going from java message service (jms) to eda Markus Eisele
 
Let's be real. Quarkus in the wild.
Let's be real. Quarkus in the wild.Let's be real. Quarkus in the wild.
Let's be real. Quarkus in the wild.Markus Eisele
 
What happens when unicorns drink coffee
What happens when unicorns drink coffeeWhat happens when unicorns drink coffee
What happens when unicorns drink coffeeMarkus Eisele
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudMarkus Eisele
 
Java in the age of containers - JUG Frankfurt/M
Java in the age of containers - JUG Frankfurt/MJava in the age of containers - JUG Frankfurt/M
Java in the age of containers - JUG Frankfurt/MMarkus Eisele
 
Java in the Age of Containers and Serverless
Java in the Age of Containers and ServerlessJava in the Age of Containers and Serverless
Java in the Age of Containers and ServerlessMarkus Eisele
 
Migrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systemsMigrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systemsMarkus Eisele
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Markus Eisele
 
Cloud wars - A LavaOne discussion in seven slides
Cloud wars - A LavaOne discussion in seven slidesCloud wars - A LavaOne discussion in seven slides
Cloud wars - A LavaOne discussion in seven slidesMarkus Eisele
 
Streaming to a new Jakarta EE
Streaming to a new Jakarta EEStreaming to a new Jakarta EE
Streaming to a new Jakarta EEMarkus Eisele
 
Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained  Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained Markus Eisele
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolithMarkus Eisele
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolithMarkus Eisele
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithMarkus Eisele
 
Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?Markus Eisele
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Markus Eisele
 
Nine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youNine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youMarkus Eisele
 
How lagom helps to build real world microservice systems
How lagom helps to build real world microservice systemsHow lagom helps to build real world microservice systems
How lagom helps to build real world microservice systemsMarkus Eisele
 
CQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersCQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersMarkus Eisele
 

More from Markus Eisele (20)

Sustainable Software Architecture - Open Tour DACH '22
Sustainable Software Architecture - Open Tour DACH '22Sustainable Software Architecture - Open Tour DACH '22
Sustainable Software Architecture - Open Tour DACH '22
 
Going from java message service (jms) to eda
Going from java message service (jms) to eda Going from java message service (jms) to eda
Going from java message service (jms) to eda
 
Let's be real. Quarkus in the wild.
Let's be real. Quarkus in the wild.Let's be real. Quarkus in the wild.
Let's be real. Quarkus in the wild.
 
What happens when unicorns drink coffee
What happens when unicorns drink coffeeWhat happens when unicorns drink coffee
What happens when unicorns drink coffee
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the Cloud
 
Java in the age of containers - JUG Frankfurt/M
Java in the age of containers - JUG Frankfurt/MJava in the age of containers - JUG Frankfurt/M
Java in the age of containers - JUG Frankfurt/M
 
Java in the Age of Containers and Serverless
Java in the Age of Containers and ServerlessJava in the Age of Containers and Serverless
Java in the Age of Containers and Serverless
 
Migrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systemsMigrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systems
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19
 
Cloud wars - A LavaOne discussion in seven slides
Cloud wars - A LavaOne discussion in seven slidesCloud wars - A LavaOne discussion in seven slides
Cloud wars - A LavaOne discussion in seven slides
 
Streaming to a new Jakarta EE
Streaming to a new Jakarta EEStreaming to a new Jakarta EE
Streaming to a new Jakarta EE
 
Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained  Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Nine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take youNine Neins - where Java EE will never take you
Nine Neins - where Java EE will never take you
 
How lagom helps to build real world microservice systems
How lagom helps to build real world microservice systemsHow lagom helps to build real world microservice systems
How lagom helps to build real world microservice systems
 
CQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersCQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java Developers
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Alien driven-development

  • 3.
  • 4. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net4 Testing is too hard. Testing isn’t fun. Testing is so sloow. Testing sucks!
  • 5. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net5 Unit Tests Integration Tests System Tests Complexity Functional Test Code
  • 6. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net6 You can’t fix what you can’t run.
  • 7. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net7 You can’t fix what you can’t debug.
  • 8. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net8 You can’t fix what you can’t test.
  • 9. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net9 You can’t develop what you can’t test.
  • 10. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net10 Not testing needs to be more painful And time consuming than using testing.
  • 11. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net11 What is touched by testing? Frameworks Build IDE Server Client Code
  • 12. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net12 Frameworks Build IDE Server Client EE Spring DI Maven Ant Gradle Eclipse NetBeans IntelliJ GlassFish Tomcat AS7 IE Chrome FF … … … … … Code Source Test Other …
  • 13. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net13 http://www.youtube.com/watch?v=VpZmIiIXuZ0
  • 14. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net14 An Innovative Testing Platform for the JVM
  • 15. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net15
  • 16. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net16 Guiding Principles  Tests should be portable to any supported container  Tests should be executable from IDE and build tool  Should extend or integrate existing test frameworks https://docs.jboss.org/author/display/ARQ/Reference+Guide
  • 17. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net17 SourceTest IDE Build Frameworks Tests Classes Server Deps Package ~ Client
  • 18. arquillian © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net18 SourceTest IDE Build Tests Classes Server Deps Package ClientPackage Client
  • 19. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net19 Lifecycle  Select Container  Start Container  Package Archive  Run Test in Container  Show Results  Undeploy / Disconnect
  • 20. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net20 Basic Setup <dependencyManagement> <dependencies> <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.0.4.Final</version> <scope>import</scope> <type>pom</type> </dependency> </dependencies> </dependencyManagement>
  • 21. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net21 <dependencies> <dependency> <groupId>javax</groupId> <artifactId>javaee-web-api</artifactId> <version>7.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency> <!-- … --> </dependencies>
  • 22. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net22 Java EE Container Support Embedded Managed Remote https://docs.jboss.org/author/display/ARQ/Container+adapters
  • 23. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net23 <profiles> <profile> <id>arquillian-glassfish-managed</id> <dependencies> <dependency> <groupId>org.jboss.arquillian.container</groupId> <artifactId>arquillian-glassfish-managed-3.1</artifactId> <version>1.0.0.CR4</version> <scope>test</scope> </dependency> </dependencies> </profile> </profiles> https://docs.jboss.org/author/display/ARQ/Container+adapters
  • 24. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net24 <?xml version="1.0" encoding="UTF-8"?> <arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> <container qualifier="glassfish" default="true"> <configuration> <property name="glassFishHome">D:glassfish4-b85</property> <property name="adminHost">localhost</property> <property name="adminPort">4848</property> </configuration> </container> </arquillian>
  • 25. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net25 @Stateless public class HelloBean { public String sayHello(String name) { return "Hello " + name + "!"; } }
  • 26. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net26 @RunWith(Arquillian.class) public class HelloBeanIntegrationTest { @EJB HelloBean hello; @Deployment public static WebArchive createDeployment() { return ShrinkWrap.create(WebArchive.class) .addClass(HelloBean.class) .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); } @Test public void shouldSayHello() throws Exception { Assert.assertEquals("Hello Earthling!", hello.sayHello("Earthling")); } }
  • 27. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net27
  • 28. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net28 http://www.youtube.com/watch?v=VpZmIiIXuZ0
  • 29. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net29 https://docs.jboss.org/author/display/ARQ/Drone Drone …brings power of Selenium into Arquillian framework. @Drone WebDriver driver; @Test @InSequence(1) public void login() { driver.get(contextPath + "home.jsf"); driver.findElement(USERNAME_FIELD).sendKeys(USERNAME); driver.findElement(PASSWORD_FIELD).sendKeys(PASSWORD); driver.findElement(LOGIN_BUTTON).click(); Assert.isTrue("User is logged in.", driver.findElement(LOGGED_IN).isDisplayed()); }
  • 30. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net30 Graphene https://docs.jboss.org/author/display/ARQ/Graphene …brings power of Selenium and AJAX into Arquillian framework. @RunWith(Arquillian.class) public class TestLogin { @Drone WebDriver browser; @Page HomePage homePage; @Test(expects = LoginFailedException.class) public void testLoginFailed(){ homePage.login("non-existent", "user"); }
  • 31. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net31 Warp https://github.com/arquillian/arquillian-extension-warp/blob/master/README.md …client-side test which asserts server-side logic. @RunWith(Arquillian.class) @WarpTest @RunAsClient public class BasicTest { //... } Warp .initiate(Activity) .inspect(Inspection); @BeforeServlet @AfterServlet @BeforePhase @AfterPhase
  • 32. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net32 Warp .initiate(new Activity() { public void perform() { WebElement nameInput = browser.findElement(By.id("helloWorldJsf:nameInput")); nameInput.sendKeys("X"); browser.findElement(By.tagName("body")).click(); }}) .inspect(new Inspection() { private static final long serialVersionUID = 1L; @Inject CdiBean myBean; private String updatedName; @BeforePhase(UPDATE_MODEL_VALUES) public void initial_state_havent_changed_yet() { assertEquals("John", myBean.getName()); } });
  • 33. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net33 Transaction https://github.com/arquillian/arquillian-extension-transaction …enhances your tests with transaction support. @RunWith(Arquillian.class) public class TransactionTest { @Deployment public static WebArchive deployment() { //... } @Test @Transactional(TransactionMode.ROLLBACK) public void test() { //…. } }
  • 34. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net34 Persistence https://docs.jboss.org/author/display/ARQ/Persistence …helps with database wrangling. @RunWith(Arquillian.class) public class PersistenceTest { @Deployment public static WebArchive deployment() { //... .addAsResource("test-persistence.xml", "persistence.xml"); } @Test @UsingDataSet("datasets/users.yml") @ShouldMatchDataSet("datasets/expected-users.yml") public void test() { //…. } }
  • 35. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net35 https://docs.jboss.org/author/display/ARQ/Persistence @RunWith(Arquillian.class) @CreateSchema("scripts/ddl.sql") public class PersistenceTest { @Deployment public static WebArchive deployment() { //... .addAsManifestResource("test-persistence.xml", "persistence.xml"); } @Test @UsingDataSet("datasets/users.yml") @ShouldMatchDataSet("datasets/expected-users.yml") @CleanupUsingScript("drop-schema.sql") public void test() { //…. } }
  • 36. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net36 Performance https://docs.jboss.org/author/display/ARQ/Performance …keeps your tests in time. @RunWith(Arquillian.class) @PerformanceTest(resultsThreshold = 2) public class PersformanceTest { @Deployment public static WebArchive deployment() { //... } @Test @Performance(time = 575) public void test() { //…. } }
  • 37. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net37 Seam 2 https://docs.jboss.org/author/display/ARQ/Seam+2 …bringing Seam 2 Context to Arquillian. @RunWith(Arquillian.class) public class ComponentInjectionTest { @Deployment public static WebArchive deployment() { //... .addAsResource(EmptyAsset.INSTANCE, "seam.properties"); } @In SomeSeamComponent component; @Test public void test() { assertThat(component).isNotNull(); } }
  • 38. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net38 Spring https://github.com/arquillian/arquillian-extension-spring …bringing Spring 2 and 3 to Arquillian. • Injection of Spring beans into test classes • Configuration from both XML and Java-based config • Injecting beans configured in web application (e.g. DispatcherServlet) for tests annotated with @SpringWebConfiguration • Support for both Spring(@Autowired, @Qualifier, @Required) and JSR-330(@Inject, @Named) annotations • Bean initialization support (@PostConstruct) • Auto packaging the spring-context and spring-web artifacts.
  • 39. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net39 Guice https://github.com/arquillian/arquillian-extension-guice …bringing Guice DI to Arquillian. @RunWith(Arquillian.class) @GuiceConfiguration(AppointmentModule.class) public class ComponentInjectionTest { @Deployment public static WebArchive deployment() { //... } @Inject @Named("appointmentService") private AppointmentService appointmentService; @Test public void test() { assertThat(appointmentService).isNotNull(); } }
  • 40. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net40 Spock https://github.com/arquillian/arquillian-testrunner-spock …bringing Spock Testing to Arquillian. @Inject AccountService service def "transferring between accounts should result in account withdrawal and deposit"() { when: service.transfer(from, to, amount) then: from.balance == fromBalance to.balance == toBalance where: from << [new Account(100), new Account(10)] to << [new Account(50), new Account(90)] amount << [50, 10] fromBalance << [50, 0] toBalance << [100, 100] }
  • 41. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net41 Screen Recorder https://github.com/arquillian/arquillian-extension-screenrecorder …records your tests. <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-screen-recorder</artifactId> <version>1.0.0.Alpha1</version> </dependency> <extension qualifier="screenRecorder"> <property name="rootFolder">target</property> <property name="videoFolder">video</property> <property name="videoName">myTestVideo</property> <property name="video">suite</property> <property name="screenshot">test</property> </extension>
  • 42. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net42 Jacoco https://github.com/arquillian/arquillian-extension-jacoco …gives you test-coverage. <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.6.3.201306030806</version> </plugin> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-jacoco</artifactId> <version>1.0.0.Alpha5</version> </dependency>
  • 43. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net43 Google Web Toolkit https://github.com/arquillian/arquillian-extension-gwt … brings Arquillian to GWT. @Test @RunAsGwtClient(moduleName = "org.myapp.MyGwtModule") public void testGreetingService() { GreetingServiceAsync greetingService = GWT.create(GreetingService.class); greetingService.greetServer("Hello!", new AsyncCallback<String>() { @Override public void onFailure(Throwable caught) { Assert.fail("Request failure: " + caught.getMessage()); } @Override public void onSuccess(String result) { assertEquals("Received invalid response from Server", "Welcome!", result); finishTest(); } }); delayTestFinish(5000); }
  • 44. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net44 Portal https://github.com/arquillian/arquillian-extension-portal …help you write tests for portlets. @RunWith(Arquillian.class) @PortalTest public class PortletTest { @Deployment public static WebArchive deployment() { //... } @ArquillianResource @PortalURL URL portalURL; @Test @RunAsClient public void renderFacesPortlet() throws Exception { browser.get(portalURL.toString()); }
  • 45. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net45 https://github.com/arquillian/arquillian-extension-byteman Byteman …gives you runtime bytecode manipulation. @RunWith(Arquillian.class) @BMRules( @BMRule( name = "Throw exception on success", targetClass = "StatelessManagerBean", targetMethod = "forcedClassLevelFailure", action = "throw new java.lang.RuntimeException()") ) public class BytemanFaultInjectionTestCase { //… @EJB(mappedName = "java:module/StatelessManagerBean") private StatelessManager bean; @Test(expected = EJBException.class) { Assert.assertNotNull("Verify bean was injected", bean); bean.forcedMethodLevelFailure(); }
  • 46. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net46 JRebel https://github.com/arquillian/arquillian-extension-jrebel … hot-deploy your integration tests. <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-jrebel-impl</artifactId> <version>1.0.0.Alpha1</version> </dependency>
  • 47. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net47 OSGi https://github.com/arquillian/arquillian-container-osgi … brings Arquillian to OSGi Frameworks. @RunWith(Arquillian.class) public class SimpleBundleTestCase { @ArquillianResource BundleContext context; @Deployment public static JavaArchive createdeployment() { final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "test.jar"); archive.setManifest(new Asset() { public InputStream openStream() { OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance(); builder.addBundleSymbolicName(archive.getName()); builder.addBundleManifestVersion(2); builder.addImportPackages(Bundle.class); return builder.openStream(); } }); return archive; }
  • 48. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net48 @Test public void testBundleContextInjection() { assertNotNull("BundleContext injected", context); assertEquals("System Bundle ID", 0, context.getBundle().getBundleId()); } @Test public void testBundleInjection(@ArquillianResource Bundle bundle) { // Assert that the bundle is injected assertNotNull("Bundle injected", bundle); // Assert that the bundle is in state RESOLVED // Note when the test bundle contains the test case it // must be resolved already when this test method is called assertEquals("Bundle RESOLVED", Bundle.RESOLVED, bundle.getState()); // Start the bundle bundle.start(); assertEquals("Bundle ACTIVE", Bundle.ACTIVE, bundle.getState()); https://github.com/arquillian/arquillian-container-osgi
  • 49. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net49 https://github.com/arquillian/arquillian-droidium …brings Native and WebDriver based testing to Android devices. <container qualifier="android"> <configuration> <property name="adapterImplClass"> org.jboss.arquillian.container.android.managed.AndroidManagedDeployableContainer </property> </configuration> </container> @ArquillianResource AndroidDevice android; @Test @OperateOnDeployment("android1") public void test01() { assertTrue(android != null); } Droidium
  • 50. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net50 iOS Platform https://github.com/arquillian/arquillian-extension-ios …brings Native and WebDriver based testing to iOS devices.
  • 51. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net51 QUnit automates the QUnit JavaScript testing on Web Applications @RunWith(QUnitRunner.class) @QUnitResources("src/test/resources/assets") public class QUnitRunnerTestCase { @QUnitTest("tests/ticketmonster/qunit-tests-dom.html") @InSequence(1) public void qunitDomTest() { // empty body - only the annotations are used }
  • 52. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net52 Cukespace … deploy and run Cucumber features using Arquillian. @RunWith(ArquillianCucumber.class) public class CukesInBellyTest { @Deployment public static Archive<?> createDeployment() { return ShrinkWrap.create(WebArchive.class) //… .addAsResource("my/features/cukes.feature"); } @EJB private CukeService service; @Inject private CukeLocator cukeLocator; @When("^I persist my cuke$") public void persistCuke() { this.service.persist(this.cukeLocator.findCuke()); } } https://github.com/cukespace/cukespace
  • 53. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net53
  • 54. © msg Applied Technology Research, 01.07.2013Markus Eisele - @myfear - http://blog.eisele.net54 Questions?