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:
++ 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:
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:
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:
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:
From line 45 added to line 54:
From line 46 changed to line 56:
`mvn -Pftest-jboss -Darchetype.test.version=1.0.0-SNAPSHOT verify`
From line 48 added to line 58:
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:
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.