- if I just add webtest-maven-plugin to <reporting>, webtest report does not
get created at all when I do "mvn clean install site"
- if I manually add webtest plugin goal "report" (see below), webtest report
gets created under target/site/webtest. Still, the final site does not link
to the webtest report and it is not listed under project reports

    <profile>
        <id>integration-test</id>
        <activation>
            <property>
                <name>!maven.test.skip</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>webtest-maven-plugin</artifactId>
                    <version>0.6.5</version>
                    <executions>
                        <execution>
                            <id>webtest-test</id>
                            <phase>integration-test</phase>
                            <goals>
                                <goal>test</goal>
                            </goals>
                            <configuration>
                                <sourcedirectory>target/test-classes
                                </sourcedirectory>
                                <!--
                                    use the filtered version
                                -->
                                <sourcefile>web-tests.xml</sourcefile>
                                <host>${cargo.host}</host>
                                <port>${cargo.port}</port>
                                <target>run-all-tests</target>
                                <webapp.name>${war.name}</webapp.name>
                            </configuration>
                        </execution>
                        <execution>
                            <id>webtest-report</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <configuration>
                               
<resultpath>target/test-classes/webtest-results
                                </resultpath>
                            </configuration>
                        </execution>
            </executions>



Siegfried Goeschl wrote:
> 
> Hi,
> 
> I'm not sure if I understand your problem - if you add the following
> snippet
> 
>   <reporting>
>     <plugins>
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>webtest-maven-plugin</artifactId>
>       </plugin>
>     </plugins>
>   </reporting>
> 
> then the following command will do the trick
> 
> "mvn clean install site"
> 
> It is also possible to bind webtest execution and reporting into the
> integration test phase independent from the site life cycle so you get
> the webtest reports even when no site is created (I have a test example
> doing that)
> 
> Cheers,
> 
> Siegfried Goeschl
> 
> 
> 
> jarkko pave wrote:
>> I'm having trouble with the Canoo maven plugin...
>>
>> My Canoo web tests are run in the integration-tests phase (not test
>> phase). This has been used for a while, just running the tests as part
>> of integration tests, and not including the reports anywhere. Now I'm
>> trying to include the results in my site as well. 
>>
>> After a while of tinkering I was able to run the tests with
>> webtest-maven-plugin (before they were just run by antrun plugin) and
>> create reports. The pom.xml config now looks like: 
>>
>>     <plugins> 
>>         <plugin> 
>>             <groupId>org.codehaus.mojo</groupId> 
>>             <artifactId>webtest-maven-plugin</artifactId> 
>>             <version>0.6.5</version> 
>>             <executions> 
>>                 <execution> 
>>                     <id>webtest-test</id> 
>>                     <phase>integration-test</phase> 
>>                     <goals> 
>>                         <goal>test</goal> 
>>                     </goals> 
>>                     <configuration> 
>>                         <!-- 
>>                             use the maven filtered version of test
>> configurations 
>>                         --> 
>>                         <sourcedirectory>target/test-classes 
>>                         </sourcedirectory> 
>>                         <sourcefile>web-tests.xml</sourcefile> 
>>                         <host>${cargo.host}</host> 
>>                         <port>${cargo.port}</port> 
>>                         <target>run-all-tests</target> 
>>                         <webapp.name <http://webapp.name>>${war.name
>> <http://war.name>}</webapp.name <http://webapp.name>> 
>>                     </configuration> 
>>                 </execution> 
>>                 <execution> 
>>                     <id>webtest-report</id> 
>>                     <phase>post-integration-test</phase> 
>>                     <goals> 
>>                         <goal>report</goal> 
>>                     </goals> 
>>                     <configuration> 
>>                         <resultpath>target/test-classes/webtest-results 
>>                         </resultpath> 
>>                     </configuration> 
>>                 </execution> 
>>             </executions> 
>>         </plugin> 
>>
>> And the created webtests result in target/site/webtest looks fine. 
>>
>> But I cannot get these results included to my site. When site is
>> created, webtest results are not included. This has probably to do
>> with that tests are bound to integration-test which is not done when
>> site is created. I need to have web tests bound to integration test
>> phase, since my deployment-to-web-server etc tasks are build around
>> that assumption. 
>>
>> I have also tried configuration where I use the simple example
>> from
>> http://people.apache.org/~sgoeschl/download/maven-plugins/webtest-maven-plugin/site/usage.html
>> <http://people.apache.org/%7Esgoeschl/download/maven-plugins/webtest-maven-plugin/site/usage.html>
>> and
>> don't specify anything else than binding the webtest-tests to
>> integration-test phase, but this does not work either. Adding
>> webtest-plugin to "reporting" does not seem to affect anything. When I
>> generate site with "mvn site" nothing webtest-related seems to happen. 
>>
>> Basically no matter how I try to confgure it, my site does not contain
>> canoo webtest under "project reports". 
>>
>> Almost forgot, the setup is multimodule, I have a root pom.xml and
>> under it core/pom.xml and web/pom.xml and webtest naturally relates
>> only to web. 
>>
>> How should I configure this? 
>>
>> I could also create my site with > mvn clean install site, for
>> example, if that would help. 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-include-webtest-results-in-Maven-site--tp26642453p26677701.html
Sent from the WebTest mailing list archive at Nabble.com.

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

Reply via email to