This might be a Cargo question, but I tried to subscribe to
their
mailing list several times w/o success. Must be on of those
days...
I seem to have successfully integrated Cargo with Canoo
WebTest using
Maven 2. I'm doing this as part of AppFuse's move from
Ant to Maven
2. My antrun-plugin is configured as follows:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<configuration>
<tasks>
<taskdef
file="src/test/resources/webtestTaskdefs.properties&q
uot;/>
<mkdir
dir="target/webtest-data"/>
<!-- Delete old results
file if it exists -->
<delete
file="target/webtest-data/web-tests-result.xml"/
>
<!-- This is so the
default will be
used if no test case is specified -->
<property
name="testcase"
value="run-all-tests"/>
<echo
level="info">Testing with locale
'${user.language}'</echo>
<ant
antfile="src/test/data/web-tests.xml"
inheritRefs="true"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
...
</plugin>
The echo from my pom.xml works fine:
[echo] Testing with locale 'en'
But it doesn't seem like this property (${user.language})
is resolved
in the web-tests.xml file that's called.
[INFO] [talledLocalContainer] WARN -
ValidatorResources.getForm(448) |
Form 'null' not found for locale '${user.language}'
Is it possible to read Cargo's properties in the Ant file
that's
called? For example, it'd be nice if I could make my host,
port and
basepath values variables rather than hard-coded.
<config host="localhost"
port="8080" protocol="http"
basepath="appfuse-spring-war-2.0-SNAPSHOT"
resultpath="target/webtest-data"
saveresponse="true"
resultfile="web-tests-result.xml"
summary="true">
<header name="Accept-Language"
value="${user.language}"/>
</config>
I've attached my pom.xml in case someone has time to
critique it.
Thanks,
Matt
------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribe maven.apache.org
For additional commands, e-mail: users-help maven.apache.org |