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
cd archetypes
mvn install
Lets refer to the archetypes directory as $ARCHETYPES.
svn co http://anonsvn.jboss.org/repos/weld/ftest/trunk ftest
cd ftest
./checkout.sh
mvn install
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:
cd $ARCHETYPES/jsf/servlet-minimal
For tomcat:
mvn -Pftest-embedded -Darchetype.test.version=1.0.0-SNAPSHOT verify
For jetty:
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.
cd $ARCHETYPES/jsf/jee-minimal
For JBossAS:
mvn -Pftest-jboss -Darchetype.test.version=1.0.0-SNAPSHOT verify
For Glassfish:
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.
cd $ARCHETYPES/jsf/jee
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.