-
1. Re: Arquillian example with JPA and Graphene not working
johnsky Jul 10, 2013 12:55 PM (in response to johnsky)Already 34 persons read this post... please... just a comment like: yes you can, no you never can, you can, but have to wait until the Czech-Developers do the next release ;-)
-
2. Re: Arquillian example with JPA and Graphene not working
johnsky Jul 15, 2013 9:55 PM (in response to johnsky)Hi,
could anybody please give it a try?
A solution could be that I only use Graphene for functional tests and the peristence and business components are already deployed in the container, right?
Thanks in advance
-
3. Re: Arquillian example with JPA and Graphene not working
lfryc Jul 16, 2013 9:16 AM (in response to johnsky)Hey Johanes,
from a linked issue it seems it should be possible implement this using mixed mode:
https://docs.jboss.org/author/display/ARQ/Test+run+modes#Testrunmodes-Mixedmode
You have two options here:
- use Arquillian Persistence Extension (APE) extension to setup/tear-down the database
- handle the above manually
It also seems like the linked sample [1] doesn't actually use Arquillian Persistence Extension.
When using APE, the crucial thing here is that:
- Arquillian manages the deployment (you use @Deployment which has (testable=true)
- you use @InSequence and you setup the database in first step and reset it on the end
- you use Graphene in @RunAsClient test method
It would be interesting to connect those two, however generally I would not recommend to use Graphene for testing database layer.
You can use in-container testing to do so (testing on a level of JPA, CDI, EJB).
Even though, it would be interesting to use Graphene for full-scale testing, where APE roll changes to the database back.
-
4. Re: Arquillian example with JPA and Graphene not working
johnsky Sep 17, 2013 9:25 PM (in response to lfryc)Hi Lukáš, thanks a lot for your help!