I have some trouble executing my selenium tests. I integrated the
tests into a maven lifecycle. There is allways a running JBoss. When I
do the maven compile cargo deploys my web application to that JBoss in
the pre-integration-test phase. In the following integration-test
phase selenium executes the tests.
While cargo signals a successful deployment to maven, JBoss is still
deploying the WAR. It takes quite a few seconds I guess. So maven
starts the test allthough JBoss has not yet finished starting the
application and the tests fail.
I tried to solve the problem by preceding the test with an
"initialization test" which does a simple pause command, but it doesn
't work. Selenium executes the pause command successfully but doesn 't
really wait the specified amount of milliseconds.
My testsuite and testscripts are HTML files.
Can anybody tell me how I can force my tests to wait before executing?
Thanks,
Stephan
the way I use it, cargo is deploying the application in the pre-
integration-test phase.
add a ping url and ping timeout (see below) and cargo will wait until
your application is ready before
it lets maven continue to the integration-test phase.
How that helps,
Ron
<deployable>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<type>war</type>
<properties>
<context>xxx</context>
</properties>
<pingURL>http://localhost:${cargo.port}/xxx/index</pingURL>
<pingTimeout>${cargo.deploy.ping-timeout}</pingTimeout>
</deployable>
that seems to me to be the right solution, but I have problems
implementing it. Cargo ignores my configuration of a deployer. I'm not
sure, perhaps I'm configuring some type of deployer and Cargo uses a
different one. Can you review my configuration?
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0</version>
<configuration>
<wait>false</wait>
<container>
<containerId>jboss42x</containerId>
</container>
<configuration>
<type>existing</type>
<home>C:\jboss-6.0.0.M1\server\default</home>
</configuration>
<deployer>
<!-- type>installed</type -->
<deployables>
<deployable>
<groupId>com.unionit.daska</groupId>
<artifactId>new-daskapoc</artifactId>
<type>war</type>
<pingURL>http://localhost:8080/new-daskapoc/index.html</pingURL>
<pingTimeout>20000</pingTimeout>
</deployable>
</deployables>
</deployer>
</configuration>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
GroupId, artifactId and type match the corresponding POM attributes. I
configured a JBoss 4.2 but in fact I 'm using a 6.0 one. Do you see
anything suspicious?
Thanks,
Stephan