Arquillian

25
ARQUILLIAN Jakub Kubrynski [email protected]

description

Framework for integration testing

Transcript of Arquillian

Page 1: Arquillian

ARQUILLIANJakub Kubrynski

[email protected]

Page 2: Arquillian

-------------------------------------------WHOAMI

- PayU.isHeadOfSoftwareDevelopment()

- write less get more

- import java.unit.concurrent.*- import sun.misc.Unsafe

Page 3: Arquillian

-------------------------------------------TO TEST OR NOT TO TEST

- waste of time- my code always rocks- it's too hard

- in fact we're testing easy things instead of important ones

Page 4: Arquillian

-------------------------------------------CORE PRINCIPLES

- tests should be portable to any supported container

- tests should be executable from both IDE and build tool

- the platform should extend or integrate existing test frameworks

Page 5: Arquillian

-------------------------------------------TESTING GAP

- unit vs integration vs functional

- totally different level of abstraction- integration is hard to test

Page 6: Arquillian

-------------------------------------------BUILD

- Maven - BillOfMaterial

- Gradle

- Ant + Ivy

Page 7: Arquillian

-------------------------------------------TEST FRAMEWORKS

- JUnit- TestNG

- Spock- JBehave- Cucumber

Page 8: Arquillian

-------------------------------------------SHRINKWRAP

- artifacts assembly- archiver- JavaArchive- WebArchive- EnterpriseArchive- resolver - MavenResolver

Page 9: Arquillian

-------------------------------------------SHRINKWRAP

- tests matrix- Tomcat + Jboss + GlassFish- Hibernate 3.x + 4.x- Spring 3.0 + 3.1 + 3.2- MySQL + PosgreSQL + Oracle- Chrome + Firefox + Opera

Page 10: Arquillian

-------------------------------------------CONTAINERS

- embedded, managed, remote

- JavaEE: JBoss, WAS, WLS, GlassFish- servlet container: Jetty, Tomcat- standalone: OpenEJB, Weld SE

Page 11: Arquillian

-------------------------------------------RUNNERS

- in container- inject datasource into test- inject connection factory

- at client- untestable deployment

Page 12: Arquillian

-------------------------------------------TOOLING

- Forge- JBoss tools- JRebel- Jacoco- Byteman

Page 13: Arquillian

-------------------------------------------WEB TESTING

- why not bare selenium?- life cycle management- multiple browsers in a single test- configuration outside of the code

Page 14: Arquillian

-------------------------------------------WEB TESTING

- Drone 1 and 2- Graphene 1 and 2- jQuery API- wait until- elementPresent, testEquals, alertPresent, elementNotVisible

- drag & drop

Page 15: Arquillian

-------------------------------------------EXTENSIONS

- JSF- Seam- REST- Mobile Android / iOS–- Spring Framework- Performance

Page 16: Arquillian

-------------------------------------------PERSISTENCE

- based on DBUnit- supports YAML, JSON, XML, XLS- transactions- custom SQL scripts

Page 17: Arquillian

-------------------------------------------WARP

- combines container and client executions in single test method

- Warp.initiate(...).inspect(...)

Page 18: Arquillian

-------------------------------------------DRAWBACKS

- Maven hell

- one test class per @Deployment

- too much capabilities

- strange client/server behaviour

Page 19: Arquillian

-------------------------------------------FUTURE

- client modularity- decoupled event model- polyglot (scala, clojure, jS, .NET, PHP)- mobile support (Android, iOS)

Page 20: Arquillian

-------------------------------------------CONTEST

Page 21: Arquillian

-------------------------------------------CONTEST

ebook

Page 22: Arquillian

-------------------------------------------CONTEST

Surefire vs Failsafe

Page 23: Arquillian

-------------------------------------------DEMO

- let's check if it actually works- let's check if it actually works- let's check if it actually works- let's check if it actually works- let's check if it actually works- let's check if it actually works- let's check if it actually works

Page 24: Arquillian

-------------------------------------------MATERIALS

- www.arquillian.org- http://docs.jboss.org/author/display/ ARQ/Reference+Guide- www.github.com/arquillian- community.jboss.org/en/arquillian?view=discussions

Page 25: Arquillian

THANKS!! :)