Help

Controls

Switch Workspace

Built with Seam

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.

Comparing current revision with historical revision 2.
Document History: How do I test Weld archetypes?
Current revision:
10
Parent:
Weld
Created On:
23. Mar 2010, 17:09 (mgencur)
Last Modified On:
16. Sep 2011, 23:39 (sbryzak)
Historical revisions:
9 24. Mar 2010, 12:18 (sbryzak) ShowDiff
8 24. Mar 2010, 12:17 (mgencur) ShowDiff
7 24. Mar 2010, 12:17 (mgencur) ShowDiff
6 24. Mar 2010, 12:16 (mgencur) ShowDiff
5 24. Mar 2010, 12:15 (mgencur) ShowDiff
4 24. Mar 2010, 09:29 (mgencur) ShowDiff
3 24. Mar 2010, 09:27 (mgencur) ShowDiff
2 23. Mar 2010, 17:32 (mgencur) ShowDiff
1 23. Mar 2010, 17:31 (mgencur) ShowDiff
0 (Initial Revision) ShowDiff

From line 0 changed to line 0:
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 by Weld archetypes:
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:
From line 19 added to lines 19 to 20:
Lets refer to the archetypes directory as $ARCHETYPES.

From line 26 added to line 28:

From line 31 changed to line 34:
TODO: ...
++ servlet-minimal project
From line 33 added to line 36:
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:
From line 34 changed to line 38:
servlet-minimal project
`cd $ARCHETYPES/jsf/servlet-minimal`
From line 36 changed to line 40:
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 command:
For tomcat:
From line 38 added to line 42:
`mvn -Pftest-embedded -Darchetype.test.version=1.0.0-SNAPSHOT verify`
From line 39 added to line 44:
For jetty:
From line 40 added to line 46:
`mvn -Pftest-embedded -Dcontainer=jetty -Darchetype.test.version=1.0.0-SNAPSHOT verify `
From line 41 added to line 48:
++ jee-minimal project
From line 42 added to line 50:
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=>http://www.jboss.org/jbossas/downloads/] and GlassfishV3 [here=>http://download.java.net/glassfish/v3/release/]. JBossAS has to be started manually, Glassfish will start automatically from within maven build. The following commands will run the testsuite.
From line 43 changed to line 52:
jee-minimal project
`cd $ARCHETYPES/jsf/jee-minimal`
From line 45 added to line 54:
For JBossAS:
From line 46 changed to line 56:
jee project
`mvn -Pftest-jboss -Darchetype.test.version=1.0.0-SNAPSHOT verify`
From line 48 added to line 58:
For Glassfish:
From line 49 added to line 60:
`mvn -Pftest-glassfish -Darchetype.test.version=1.0.0-SNAPSHOT verify`
From line 51 added to line 63:
++ jee project
From line 52 added to line 65:
Running this kind of testsuite is basically the same as the previous one. Only difference is the directory where you run the mvn command.
From line 53 added to line 67:
`cd $ARCHETYPES/jsf/jee`
From line 54 added to line 69:
Now you can run the testsuite for JBossAS or Glassfish as previously.
From line 56 added to lines 72 to 84:
++ Alternative ways of running the testsuite


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:


= *selenium.browser* - use to select browser (\*firefoxproxy, \*firefox, \*iexplore, \*custom, ...)



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.