This project provides functional tests of TERASOLUNA Server Framework for Java (5.x) Common Library.
Contributing (bug report, pull request, any comments etc.) is welcome !! Please see the contributing guideline for details.
Test case scenarios are managed at wiki pages.
Note:
Currently, support language is Japanese only. (Will translate to English as soon as possible)
Tested environments are managed at wiki page.
Preconditions are as follow:
- JDK 8 or JDK 7 installed (
JAVA_HOME
defined as environment variable) - Maven installed (Can run
mvn
command) - Firefox(for personal or ESR) installed (ESR is used on our CI environment)
If PostgreSQL use as database , you need to create database of PostgreSQL into local machine. (PostgreSQL can download via here site).
Note:
If H2 use as database, you can skip this step.
By default, database owner is postgres
user, and password of postgres
user is 'P0stgres'
.
$ createdb -U postgres terasoluna-gfw-functionaltest --locale=C --encoding=UTF8 --template=template0
Clone the terasolunaorg/terasoluna-gfw-functionaltest
repository into local machine.
$ git clone https://github.com/terasolunaorg/terasoluna-gfw-functionaltest.git
Build artifacts using maven commands as follows.
$ cd {your repository directory}
$ git checkout {target branch}
$ mvn -U install -am -pl terasoluna-gfw-functionaltest-web
$ cd {your repository directory}
$ git checkout {target branch}
$ mvn -U install -am -pl terasoluna-gfw-functionaltest-web -P tomcat8-postgresql,warpack-env,warpack-jstl,travis
Note:
If you not use default user(
postgres
) or password(P0stgres
), you should modify settings interasoluna-gfw-functionaltest-env/configs/travis/ContainerConfigXML/context.xml
.
If PostgreSQL use as database, initialize database before run functional test.
$ mvn -U sql:execute -pl terasoluna-gfw-functionaltest-initdb
Note:
If you not use default user(
postgres
) or password(P0stgres
), you should specify-Ddb.username={your user}
or-Ddb.password={your password}
or both.
Startup Tomcat8 and deploy war file using CARGO maven plugin.
$ cd {your repository directory}
$ mvn -U cargo:run -pl terasoluna-gfw-functionaltest-web
$ cd {your repository directory}
$ mvn -U cargo:run -pl terasoluna-gfw-functionaltest-web -P travis
Note:
Shutdown trigger is "Ctrl + C" on console.
Run tests using Selenium(WebDriver
) on JUnit.
$ cd {your repository directory}
$ mvn -U test -pl terasoluna-gfw-functionaltest-selenium
Note:
If functional test is failed, try again using latest Selenium(specify with
-Dselenium.version={latest version}
). Please also refer tested environment for more information about our tested environment. At last, please check selenium changelog to make sure your Firefox version is supported.
If latest or any branch snapshot of Common Library want to use, install latest or any branch snapshot before build and test.
$ git clone https://github.com/terasolunaorg/terasoluna-gfw.git
$ cd {your repository directory of terasoluna-gfw}
$ git checkout {target branch}
$ mvn clean install