-
1. Re: Using Arquillian Persistence with Drone/Graphene
bmajsak Aug 20, 2012 1:48 AM (in response to btsaunde)Hi Bryan,
I think at this moment we unfortunately don't provide this feature yet. Would you mind to open feature request in JIRA so I can investigate on that (+ you will see the progress).
Many thanks!
Bartosz
-
2. Re: Using Arquillian Persistence with Drone/Graphene
btsaunde Aug 21, 2012 9:41 PM (in response to bmajsak)Bartosz, I created Feature Request ARQ-1077 for you to investigate.
-
3. Re: Re: Using Arquillian Persistence with Drone/Graphene
jgurda Apr 8, 2014 2:43 AM (in response to bmajsak)Bartosz,
does this limitation also apply to "@RunAsClient" mode?
I have following class testing JaxRS resource (EjbTestBase simply creates WAR file):
@RunAsClient @RunWith(Arquillian.class) @UsingDataSet({ "datasets/ApplicationConfigurationWithEmbededMongoDb.xls"}) public class TestJaxRsResource extends EjbTestBase { @ArquillianResource private URL deploymentURL; @Test public void jaxRsClientTest() throws Exception { //JAXRS client code here. It uses data populated in @UsingDataSet anotation } Assert.assertEquals(200L, response.getStatus()); }
Unfortunately database is not populated with sample data. I set dbunit log level to DEBUG so I would see inserts in JBoss logs but there are no iserts at all.
Thanks,
Jan
-
4. Re: Re: Using Arquillian Persistence with Drone/Graphene
bmajsak Apr 8, 2014 5:09 AM (in response to jgurda)Hi Jan,
unfortunately you are also in the same situation. For the time being you can use this not so great workaround mentioned in JIRA I will look at how we can leverage WARP for that.
Will keep you posted.
Cheers,
Bartosz
-
5. Re: Re: Re: Using Arquillian Persistence with Drone/Graphene
jgurda Apr 11, 2014 2:45 PM (in response to bmajsak)Thank you! Workaround works perfectly.
Attaching skeleton of my test:
@RunWith(Arquillian.class) @Cleanup(phase = TestExecutionPhase.NONE) public class TestJaxRsResource { @Before public void setUp() throws Exception { // Init code } @After public void tearDown() throws Exception { // tear down code } @Test @InSequence(1) @UsingDataSet({ "datasets/ApplicationConfigurationWithEmbededMongoDb.xls", "datasets/device/SampleDevices.xls" }) public void populateDatabaseWorkaround() { // Populates database since unable to use @UsingDataSet with @RunAsClient // Check https://issues.jboss.org/browse/ARQ-1077 } @Test @RunAsClient @InSequence(2) public void shouldAddLocation(@ArquillianResource URL deploymentURL) throws Exception { // deploymentURL - resource injected by Arquillian - holds URL to deployed WAR // Client side test code goes here.... // given // when // then }
Regards,
Jan
-
6. Re: Using Arquillian Persistence with Drone/Graphene
hoeppnerrobert Aug 24, 2015 11:35 AM (in response to jgurda)Hello Jan,
If I do so, then I have to ad the test to the deployment.
And then Arquillian needs all dependend Classes in Deployment.
Can you show your deployment, please?