You could in theory configure the Arquillian Container to start/stop on class level by setting the mode on the container element in arquillian.xml
But that would of course start and stop the container for every Test Class. Might not be what you want.
Another option would be to configure the build to have two executions, one that runs the arquillian tests and one that runs the other.
<build> <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <includes> <include>**/non-arq/*TestCase*</include> </includes> </configuration> <executions> <execution> <id>arquillian</id> <goals> <goal>test</goal> </goals> <phase>test</phase> <configuration> <includes> <include>**/arquillian/*TestCase*</include> </includes> </configuration> </execution> </executions> </plugin> </plugins> </build>
I came across this post after a google search for the "Already bootstrapped" error message. After hours of searching for a solutions, I figured that the glassfish-embedded-container plugin for Arquillian tries to bootstrap the embedded Glassfish multiple times. A simple workaround is to force a new JVM for each test class: