[arquillian-issues] [JBoss JIRA] (ARQ-1077) Persistence Plugin does not work with Drone/Graphene

Patrick Fink (JIRA) issues at jboss.org
Fri May 29 18:03:07 EDT 2015


    [ https://issues.jboss.org/browse/ARQ-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072499#comment-13072499 ] 

Patrick Fink edited comment on ARQ-1077 at 5/29/15 6:02 PM:
------------------------------------------------------------

I think currently the best workaround for this is to do something like this:

Test class:
{code:java}
@Test
@InSequence(1)
@UsingDataSet("myDroneTest-seeding.yml")
public void populateDatabaseWorkaround() {}

@Test
@InSequence(2)
@RunAsClient
public void myDroneTest() {
	//Do GUI testing here
}

@Test
@InSequence(3)
@ShouldMatchDataset("myDroneTest-checking.yml")
@Cleanup(phase = TestExecutionPhase.NONE)
public void checkDatabaseWorkaround() {}
{code}
Depending on your needs, either the first or the last test method can be skipped.

arquillian.xml:
{code:xml}
<extension qualifier="persistence">
	<property name="defaultCleanupPhase">BEFORE</property>   
</extension>
{code}

At least this workaround isolates your persistence+drone tests better from the rest of your test suite then just using @Cleanup(phase = TestExecutionPhase.NONE).


was (Author: patrick.fink):
I think currently the best workaround for this is to do something like this:

Test class:
{code:java}
@Test
@InSequence(1)
@UsingDataSet("myDroneTest-seeding.yml")
public void populateDatabaseWorkaround() {}

@Test
@InSequence(2)
@RunAsClient
public void myDroneTest() {
	//Do GUI testing here
}

@Test
@InSequence(3)
@ShouldMatchDataset("myDroneTest-checking.yml")
@Cleanup(phase = TestExecutionPhase.NONE)
public void checkDatabaseWorkaround() {}
{code}

arquillian.xml:
{code:xml}
<extension qualifier="persistence">
	<property name="defaultCleanupPhase">BEFORE</property>   
</extension>
{code}

At least this workaround isolates your persistence+drone tests better from the rest of your test suite then just using @Cleanup(phase = TestExecutionPhase.NONE). Depending on your needs, either the first or the last test method can be skipped.

> Persistence Plugin does not work with Drone/Graphene
> ----------------------------------------------------
>
>                 Key: ARQ-1077
>                 URL: https://issues.jboss.org/browse/ARQ-1077
>             Project: Arquillian
>          Issue Type: Feature Request
>          Components: Extension - Drone, Extension - Persistence
>         Environment: JBoss AS 7 Container
>            Reporter: Bryan Saunders
>            Assignee: Bartosz Majsak
>              Labels: drone, persistence
>             Fix For: drone_2.0.0.Beta1
>
>
> Persistence Extension does not execute when being used with the Drone/Graphene extensions.  When you run the tests in Client Mode the @UsingDataSet annotations do not trigger and populate the database. @ApplyScriptBefore also does not work.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the arquillian-issues mailing list