Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Warning
titleStale Content

The content of this page is growing stale and may or may not contain relevant, useful or correct information.

Table of Contents
minLevel1

...

Checkout or update the trunk.
Build it top down (till until we have all the 2.0-SNAPSHOT artifacts published)

Creating an archetype (template) testsuite

...

  1. Change the newFunc-testsuite/testset-1 directory name to reflect your testset name (say, basic-testset).
  2. Edit the newFunc-testsuite/basic-testset/pom.xml and replace the <artifactId> element value to match the new directory name.
  3. Populate newFunc-testsuite/basic-testset project with your tests. Any executions in the basic-testset/pom.xml will have to be inside a profile whose id is "child".

NOTE Steps 1 & 2 above can be skipped. But there is a possibility that this artifactId will conflict with another artifactId created similarly from archetype. Hence it is recommended.

Running tests

Code Block
titlecommand
borderStylesolid
$>cd geronimo/testsuite
$>mvn [-DinstallDirectory=/path/to/geronimoHome]

Maven will run through all the testsuites. For every testsuite, it will invoke all the testsets under it. By the time it is done, it should have created surefire xmls in every target/surefire-reports directory.

Using the -DinstallDirectory parameter will install Geronimo in one location and the same server instance will be used for each foo-testsuite. The server will be started/stopped for each of them too. The default is for every foo-testsuite to have it's own installation of the server in it's target directory. All testsets under it will use this same instance of the running server.

You may go to any single testsuite and execute 'mvn' from it to run only it's tests.

...

titleWarning

...

tests.

Viewing test results

Code Block
titlecommand
borderStylesolid
$>cd geronimo/testsuite
$>mvn site-deploy -DdeployDirectory=/path/to/websiteDbuildNumber=<a timestamp>

This will generate a website for the entire testsuite . Click on the Surefire Test Reports link to see the test resultsand deploy it to a site under geronimo.apache.org. See the summary of the results here.

Framework

The integration test is part of the regular geronimo tree and it resides under geronimo/testsuite. The child modules under this pom.xml are organized into various functional categories of the server. For eg., console-testsuite will perform tests on the console while the web-testsuites will perform tests against the web container.

...

The goals to install/start/stop the server and deploy/undeploy modules are provided by the geronimo-maven-plugin. It has configuration option to either install a separate Geronimo server for each foo-testsuite or reuse one instance of the server installation. It also has configuration option to log the results for the purpose of generating surefire reports xml. The goals from this plugin are invoked by the pre-integration-test and post-integration-test phase of the aven Maven lifecycle appropriately.

A set of modules are provided for testing purposes. They are in the geronimo/testsupport directory. This pom.xml gets built during the beginning of the build cycle and provides various j2ee archives for use by the testsuite.

See deployment-testsuite for an example

Anchor
selenium-maven-plugin
selenium-maven-plugin

selenium-maven-plugin

http://geronimo.apache.org/maven/genesisserver/maven-plugins/mavenselenium-maven-plugin/index.html

The console-testsuite under geronimo/testsuite tests the console using Selenium (http://openqa.org).  This requires a special server process started which is provided by our selenium-maven-plugin.  

...

Anchor
maven-maven-plugin
maven-maven-plugin

maven-maven-plugin

http://geronimo.apache.org/maven/servergenesis/maven-plugins/maven-maven-plugin/index.html

This plugin invokes each of the testset-n/pom.xml in the integration-test phase of the maven lifecycle. The testcases are defined in those projects. The tests can be either junit or testng testcases. maven-surefire-plugin is configured to skip the tests during the test phase and run in the integration-test phase. surefire-report xmls are generated after the tests.

...

Maven does not generate surefire-reports for pom packagings. foo-testsuite is a pom packaging with executions in pre-integration-test and post-integration-test phases. The results of those tests will not be captured by Maven. Also, the surefire reports from the testset-n projects should be rolled up into it's parent foo-testsuite. This is done by generate-surefire-xml goal in the testsuite-maven-plugin. Another goal, generate-surefire-report will generate the surefire-report.html from those surefire xmls. Another Finaly fix-menu goal will fix the menu for this html file.