testing java persistence layer done right with arquillian

Post on 22-May-2015

1.091 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

TESTING JAVA PERSISTENCE LAYER DONE RIGHT WITH ARQUILLIAN

Bartosz Majsak

Cambridge Technology Partners

@majson

✔ 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

First attempt

First attempt

First attempt

First attempt

First attempt

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>

And better

And even better

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

What's for the nearest future?

✔ NoSQLUnit integration

✔ Data providers (like in TestNG)

✔ Standalone mode

We need you!

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

http://arquillian.org

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

Thank you!

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

top related