Mhmm, not good enough +) which maven version are you using? +) are you sure that you added the maven-webtest-plugin to the reporting section?
Cheers, Siegfried Goeschl jarkko pave wrote: > I have this same configuration, but for some reason the test results > are not included in the generated site, even though the webtest > results HTML appears under the target site directory quite OK. > > It's OK now though since I manually added a link to the web test > results to my site....not too pretty though. > > > 2009/12/8 Siegfried Goeschl <[email protected] > <mailto:[email protected]>> > > Hi jimmi4664, > > here is my snippet to solve/answer the following issues/questions > > +) bind the webtest execution to the "integration-test" phase > +) get the reports in the "post-integration-phase" (just in case you > want to figure out why the test failed without generating the > whole site) > +) add the webtest report generation to the site life cycle (otherwise > they don't show up in the report section) > > "mvn clean install" will run the webtests and generate reports > (independent from the site life cycle) > "mvn clean install site" will run the webtests and generate reports > included in the report section > "mvn clean site" will NOT run the webtest and therefore no report is > available > > or in different words > > +) the webtest execution is not bound to any life cycle (so you > have to > bind it manually in the build section) > +) the webtest report are only generated (and included in the report > section) if the webtests have been run before > > Hope this helps, > > Siegried Goeschl > > <build> > <plugins> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>webtest-maven-plugin</artifactId> > <executions> > <execution> > <id>webtest-test</id> > <phase>integration-test</phase> > <goals> > <goal>test</goal> > </goals> > <configuration> > <host>jakarta.apache.org > <http://jakarta.apache.org></host> > <port>80</port> > <haltonfailure>false</haltonfailure> > <haltonerror>false</haltonerror> > <loglevel>warn</loglevel> > </configuration> > </execution> > <execution> > <id>webtest-report</id> > <phase>post-integration-test</phase> > <goals> > <goal>report</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </build> > <reporting> > <plugins> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>webtest-maven-plugin</artifactId> > </plugin> > </plugins> > </reporting> > > > jimmi4664 wrote: > > - 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 > <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> > > > > > > > > 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> > <http://webapp.name>>${war.name <http://war.name> > >>> <http://war.name>}</webapp.name <http://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> > >>> > > <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] <mailto:[email protected]> > >> http://lists.canoo.com/mailman/listinfo/webtest > >> > >> > >> > > > > > _______________________________________________ > WebTest mailing list > [email protected] <mailto:[email protected]> > http://lists.canoo.com/mailman/listinfo/webtest > > _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

