[arquillian-issues] [JBoss JIRA] Commented: (ARQ-152) Support multiple container configurations for same container type
Dan Allen (JIRA)
jira-events at lists.jboss.org
Wed Sep 15 03:22:28 EDT 2010
[ https://jira.jboss.org/browse/ARQ-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12550991#action_12550991 ]
Dan Allen commented on ARQ-152:
-------------------------------
It would be pretty simple to add the arquillian.container.config (other options include: arquillian.container.configuration, arquillian.container.qualifier) property and consult it when deciding which configuration of the target container to select.
In Eclipse, you would have to custom the run configuration of the JUnit/TestNG test and add a VM argument under the Arguments tab:
-Darquillian.container.config=staging
Setting the property from the commandline when using Maven is complicated by the debacle around SUREFIRE-121 (http://jira.codehaus.org/browse/SUREFIRE-121). At the moment, you have to setup a pass-through in the surefire plugin configuration:
<configuration>
<systemProperties>
<property>
<name>arquillian.container.config</name>
<value>${arquillian.container.config}</value>
</property>
</systemProperties>
</configuration>
Then you can use it from the commandline using the -D switch.
mvn test -Darquillian.container.config=staging -Pjbossas-remote-6
I don't think that the configuration name should be a universal id. It's really just a qualifier. You may use the same qualifier again with a different container.
<jboss:container qualifier="qa1">
...
</jboss:container>
<jboss:container qualifier="qa2">
...
</jboss:container>
<glassfish:container qualifier="qa1">
...
</glassfish:container>
<glassfish:container qualifier="qa2">
...
</glassfish:container>
(Selecting which container implementation to use in a test run is currently controlled by the classpath, but in the future may be controlled by yet another property).
> Support multiple container configurations for same container type
> -----------------------------------------------------------------
>
> Key: ARQ-152
> URL: https://jira.jboss.org/browse/ARQ-152
> Project: Arquillian
> Issue Type: Feature Request
> Components: Configuration
> Reporter: Aslak Knutsen
> Fix For: 1.0.0.Beta1
>
>
> Configuration need to support multiple container configurations for the same container type with a runtime 'flag' for switching configuration.
> UseCase:
> Different configuration for test/stage servers. e.g.
> {code:XML}
> <arquillian xmlns="http://jboss.com/arquillian"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jboss="urn:arq:org.jboss.arquillian.jbossas.remote60">
> <jboss:container id="jbossTest">
> <localDeploymentBindAddress>my.domain</localDeploymentBindAddress>
> <remoteServerAddress>remote.test.server</remoteServerAddress>
> <remoteServerHttpPort>8080</remoteServerHttpPort>
> </jboss:container>
> <jboss:container id="jbossStage">
> <localDeploymentBindAddress>my.domain</localDeploymentBindAddress>
> <remoteServerAddress>remote.stage.server</remoteServerAddress>
> <remoteServerHttpPort>8181</remoteServerHttpPort>
> </jboss:container>
> </arquillian>
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the arquillian-issues
mailing list