forked from kodos/maven-cuke4duke-jump-start
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
44 lines (34 loc) · 2.14 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
This is a Web Application Skeleton that is built using Maven.
The features are:
1. The Web Application is automatically deployed to the Server for integration-testing.
2. Cucumber is used to drive BDD scenarios aginst the Web Application, using Cuke4Duke.
3. The pageObjects approach has been used to model the Web Application for use by
integration tests and Cucumber steps.
4. Spring 3 is used to autowire the components of the web app and the steps together.
5. Using Maven profiles, it will be possible to run the same Web tests against different
browsers.
6. Uses Firefox as the browser used to drive the web application. This can be changed
easily to HtmlUnit, Chrome or Internet Explorer. See below.
7. Unit tests are run separately to integration tests.
8. There are checks on code Complexity and Duplication.
9. The database is setup and migrated automatically (Liquibase).
To use this project, clone it, installed the Java SDK and Maven 2, then issue the following
two commands from the projects root folder:
mvn -Dcucumber.installGems=true cuke4duke:cucumber
mvn clean integration-test
On initial run there will be a *lot* of things downloaded from Maven repositories. You
should see the following as amongst the last lines of the Maven output:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8 seconds
*NOTE* When building the maven project for the first time there is a *LOT* of
cuke4duke dependencies downloaded, but just the first time. It takes a while
the first time. And now the weird part, if on the first run the Cucumber steps fail,
run 'mvn clean integration-test' again. This also only has to be done once.
If you want to change the browser used for driving the web site (default is Firefox) then
specify it on the command line with a Maven profile; firefox, htmlunit, ie and chrome are
valid profiles. For example, the following will run the test using HtmlUnit.
mvn clean integration-test -P htmlunit
If you have any feedback, please email me: james underscore ladd at hotmail dot com.
-end-