AFAIK, there is not a Canoo WebTest plugin for Maven 2.  Someone said
they created one a while back on this list, but I don't believe we
ever saw the code for it.

In AppFuse, we simply use the maven-antrun-plugin. Here's a sample
configuration with Cargo:

   <profiles>
       <profile>
           <id>integration-test</id>
           <activation>
               <property>
                   <name>!maven.test.skip</name>
               </property>
           </activation>
           <build>
               <plugins>
                   <plugin>
                       <groupId>org.codehaus.cargo</groupId>
                       <artifactId>cargo-maven2-plugin</artifactId>
                       <version>0.3</version>
                       <configuration>
                           <wait>${cargo.wait}</wait>
                           <container>
                               <containerId>${cargo.container}</containerId>
                               <!--home>${cargo.container.home}</home-->
                               <zipUrlInstaller>
                                   <url>${cargo.container.url}</url>
                                   <installDir>${installDir}</installDir>
                               </zipUrlInstaller>
                           </container>
                           <configuration>

<home>${project.build.directory}/${cargo.container}/container</home>
                               <properties>

<cargo.hostname>${cargo.host}</cargo.hostname>

<cargo.servlet.port>${cargo.port}</cargo.servlet.port>
                               </properties>
                           </configuration>
                       </configuration>
                       <executions>
                           <execution>
                               <id>start-container</id>
                               <phase>pre-integration-test</phase>
                               <goals>
                                   <goal>start</goal>
                               </goals>
                           </execution>
                           <execution>
                               <id>stop-container</id>
                               <phase>post-integration-test</phase>
                               <goals>
                                   <goal>stop</goal>
                               </goals>
                           </execution>
                       </executions>
                   </plugin>
                   <plugin>
                       <artifactId>maven-antrun-plugin</artifactId>
                       <version>1.1</version>
                       <configuration>
                           <tasks>
                               <taskdef
resource="webtest_base_relaxed.taskdef">
                                   <classpath>
                                       <path refid="maven.test.classpath"/>
                                       <path location="src/main/resources"/>
                                   </classpath>
                               </taskdef>
                               <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="test" value="run-all-tests"/>
                               <echo level="info">Testing
'${project.build.finalName}' with locale '${user.language}'</echo>
                               <ant
antfile="src/test/resources/web-tests.xml" target="${test}">
                                   <property name="user.language"
value="${user.language}"/>
                                   <property name="webapp.name"
value="${project.build.finalName}"/>
                                   <property name="host"
value="${cargo.host}"/>
                                   <property name="port"
value="${cargo.port}"/>
                               </ant>
                           </tasks>
                       </configuration>
                       <executions>
                           <execution>
                               <phase>integration-test</phase>
                               <goals>
                                   <goal>run</goal>
                               </goals>
                           </execution>
                       </executions>
                       <dependencies>
                           <dependency>
                               <groupId>com.canoo</groupId>
                               <artifactId>webtest</artifactId>
                               <version>${webtest.version}</version>
                               <exclusions>
                                   <exclusion>
                                       <groupId>javax.xml</groupId>
                                       <artifactId>jsr173</artifactId>
                                   </exclusion>
                               </exclusions>
                           </dependency>
                           <dependency>
                               <groupId>javax.mail</groupId>
                               <artifactId>mail</artifactId>
                               <version>${javamail.version}</version>
                           </dependency>
                           <dependency>
                               <groupId>log4j</groupId>
                               <artifactId>log4j</artifactId>
                               <version>${log4j.version}</version>
                           </dependency>
                           <dependency>
                               <groupId>oro</groupId>
                               <artifactId>oro</artifactId>
                               <version>${oro.version}</version>
                           </dependency>
                       </dependencies>
                   </plugin>
               </plugins>
           </build>
       </profile>
   </profiles>

Matt

On 5/25/07, Michael Habbert <[EMAIL PROTECTED]> wrote:
Marc Guillemot wrote:
> Hi Christian,
>
> as I don't use maven2 with WebTest I haven't answered previously.
>
> comments below
>
>> a.) Is there a valid and working WebTest maven2 plugin?
>
> as far as know: no

me too

>
>> b.) looking on > http://www.mvnrepository.com/search.html?query=webtest
>> < there are 3 entries which are related to the Canoo-WebTest - which one
>> can be used (I wonder why only 1.0 version is listed here although one
>> can find version 1.2 and 1.5 here: >
>> ftp://ibiblio.org/pub/packages/maven2/maven-plugins/maven-webtest-plugin
>> <)
>
> no idea ;-(
>
>> c.) is there anyone who ever used the webtest maven2-plugin (maybe the
>> authors of the plugin) - Please can you cut/paste from your pom-file how
>> to use it?
>
> no idea either ;-(
>
> For a few months 2 WebTest user have mentioned on this mailing list that
> they would work on a Maven 2 plugin. No news since.

Maybe in the futur I will be looking for the maven 2 plugin, while I'm involved 
in a project just
moved to maven 2.

--
Mit freundlichen Grüßen

Michael Habbert

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest



--
http://raibledesigns.com
Y��z�fj)b�      b�՞m7��X������hm����+-�Ƨ��(����Y���b�ا~��y�^�

Reply via email to