You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
Testing of Weld archetypes is almost fully automated. This consists of unit and functional tests. Functional tests are written in Java using Selenium framework. All the process of testing is made easy by leveraging Maven builds. Currently, there are three types of projects which can be generated with Weld archetypes:
All the types of projects are sequentially generated and tested.
Before you can run the testsuite you have to download it.
svn co http://anonsvn.jboss.org/repos/weld/archetypes/trunk archetypes
Lets refer to the archetypes directory as $ARCHETYPES.
svn co http://anonsvn.jboss.org/repos/weld/ftest/trunk ftest
Running testsuite for this kind of archetype does not need any container to be downloaded manually. All you have to do is run the following commands:
mvn -Pftest-embedded -Darchetype.test.version=1.0.0-SNAPSHOT verify
mvn -Pftest-embedded -Dcontainer=jetty -Darchetype.test.version=1.0.0-SNAPSHOT verify
This kind of testsuite can be executed with GlassfishV3 standalone or JBoss AS 6.0.0.M2 container. Before you can run the testsuite you have to download one of these containers, unpack it and set environment variable to point to the installation (JBOSS_HOME for JBossAS and GLASSFISH_HOME for GlassfishV3). You can download JBossAS here and GlassfishV3 here. JBossAS has to be started manually, Glassfish will start automatically from within maven build. The following commands will run the testsuite.
mvn -Pftest-jboss -Darchetype.test.version=1.0.0-SNAPSHOT verify
mvn -Pftest-glassfish -Darchetype.test.version=1.0.0-SNAPSHOT verify
Running this kind of testsuite is basically the same as the previous one. Only difference is the directory where you run the mvn command.
Now you can run the testsuite for JBossAS or Glassfish as previously.
All the properties passed to Selenium are defined as Maven properties, you can override them by flags in Maven command line. Main properties can be found at pom.xml file under $ARCHETYPES directory.
For example you can change the following:
You can also change the version of archetypes you want to test. By omitting archetype.test.version parameter you will test 1.0.0-BETA1 version which is default. Of course, you first have to install the version to your local maven repo.