18

TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

Embed Size (px)

DESCRIPTION

Demo: https://github.com/bartoszmajsak/devoxx12-ape

Citation preview

Page 1: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN
Page 2: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

Bartosz Majsak

Cambridge Technology Partners

@majson

Page 3: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

✔ Java developer by day

✔ Open source junkie by night

✔ Arquillian team member, lead of✔ Persistence Extension✔ Spock test runner✔ Seam 2 integration

✔ github.com/bartoszmajsak✔ @majson

[bartosz@devoxx ~]$ whoami

Page 4: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN
Page 5: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN
Page 6: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

First attempt

Page 7: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

First attempt

Page 8: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

First attempt

Page 9: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

First attempt

Page 10: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

First attempt

Page 11: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

We can do better

<dataset> <brewery id="1" name="Brew Dog" country="Scotland" /> <beer id="1" name="End of History" price="756" alcohol="55.0" brewery_id="1" /></dataset>

Page 12: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

And better

Page 13: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

And even better

Page 14: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

Recap

✔ You can write your test fixtures in XML, Excel, YAML or JSON

✔ @UsingDataSet / @ShouldMatchDataSet

✔ @Cleanup / @CleanupUsingScript

✔ @ApplyScriptBefore / After

✔ @CreateSchema

✔ JPA 2nd level cache eviction

Page 15: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

What's for the nearest future?

✔ NoSQLUnit integration

✔ Data providers (like in TestNG)

✔ Standalone mode

Page 16: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

We need you!

Page 17: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

Q&Ahttps://github.com/bartoszmajsak/devoxx12-ape

http://arquillian.org

https://docs.jboss.org/author/display/ARQ/Persistence

Thank you!

Page 18: TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

Q&A

Credits

[5] http://www.flickr.com/photos/montine/2311288263/[6] http://www.flickr.com/photos/visitflanders/6328705484/[15] http://www.flickr.com/photos/leebennett/3181855130

Slide 5 – Author's permissionSlides 6, 15 – Creative Commons