Installation

Quick install

The teamengine-virtualization module enables the automatic creation of a fully provisioned server image that can be deployed and run on a dynamic infrastructure platform such as Amazon EC2 and VirtualBox. See the Virtualization Guide for instructions.

The TEAM Engine Builder project provides another way to build TEAM Engine and selected OGC test suites on a physical or virtual machine. Shell scripts for Windows and Unix-like systems are available. Detailed instructions are provided in the tutorial.

Download and build from source

Prerequisites

  • Java 17: Download the Java Development Kit (JDK) 17. OpenJDK is recommended.
  • Apache Maven: Download the latest release from https://maven.apache.org/download.cgi.
  • Git: Download Git SCM.
  • Apache Tomcat 10.1: TEAM Engine requires Tomcat 10.1.

Get the source code

The source code is available from GitHub. Use Git to clone the repository and checkout a branch or a tagged release as indicated below:

git clone https://github.com/opengeospatial/teamengine.git
git checkout ${project.version}

Apache Maven 3.9 is required to build the TEAM Engine code base, which currently consists of the following modules:

  • teamengine-core: Main CTL script processor
  • teamengine-resources: Includes shared resources such as stylesheets and schemas
  • teamengine-spi: Provides an extensibility framework and a REST-like API for test execution
  • teamengine-spi-ctl: Enables the execution of legacy CTL test suites using a RESTful API.
  • teamengine-realm: A custom Tomcat user realm for file-based authentication
  • teamengine-web: A web application for executing test suites and browsing test results
  • teamengine-console: A console application that provides a command-line interface for executing test suites in Unix and Windows environments.
  • teamengine-virtualization: Enables the automatic creation of virtualization images using Packer.

Build with Maven

Simply run mvn package in the root project directory to generate all build artifacts, or run mvn install to also install them into the local Maven repository. The main build artifacts are listed below.

  • teamengine-console-${project.version}-bin.[zip|tar.gz]: Archive containing the console application (command-line usage)
  • teamengine-console-${project.version}-base.[zip|tar.gz]: Archive containing the initial contents of the teamengine instance directory (TE_BASE)
  • teamengine.war: The JEE (Servlet) web application
  • teamengine-common-libs.[zip|tar.gz]: Archive containing common runtime dependencies (e.g. JAX-RS 1.1, Apache Derby)

The site documentation can be generated by simply executing the ‘mvn site’ phase against the top-level POM. An aggregrate PDF document is also created and placed in the target/pdf directory.

Set up an instance directory (TE_BASE)

The value of the TE_BASE system property or environment variable specifies the location of the instance directory that contains several essential sub-directories. Create the TE_BASE directory (e.g. at /srv/teamengine) and unpack the contents of the teamengine-console-${project.version}-base archive into this location; make sure that users (including the Tomcat user) have write access. The structure of the TE_BASE directory is shown below.

TE_BASE
  |-- config.xml    # main configuration file
  |-- resources/    # test suite resources
      |-- site      # site-specific HTML (welcome, title, etc.)
      |-- lib       # Java-based test suites and supporting libraries
  |-- scripts/      # CTL test scripts
  |-- work/         # teamengine work directory
  +-- users/
     |-- {user1}/   # user account information and test run results
     |-- {user2}/
     +-- ...

CTL test scripts must be placed in the TE_BASE/scripts directory. Java-based test suites along with their supporting libraries are placed in the TE_BASE/resources/lib directory.

Deploy the web application

System requirements

  • Java runtime: JDK 17
  • Servlet container: Apache Tomcat 10.1

Create a dedicated Tomcat instance

Apache Tomcat 10.1 is a supported servlet container. It is strongly recommended that a dedicated Tomcat instance be created to host the teamengine application. That is, keep the location of the instance-specific data–referred to as CATALINA_BASE in the Tomcat documentation–separate from the Tomcat software installation (CATALINA_HOME). Create it as outlined below for your operating system.

To create a CATALINA_BASE directory in Windows:

mkdir base-1 & cd base-1
xcopy %CATALINA_HOME%\conf conf\
mkdir lib logs temp webapps work

In a Unix-like environment:

sudo mkdir -p /srv/tomcat/base-1; cd /srv/tomcat/base-1
sudo cp -r $CATALINA_HOME/conf .
sudo mkdir lib logs temp webapps work

The recommended JVM options for the Tomcat instance are shown below. Note that the maximum memory heap size (-Xmx) may need to be increased as the number of concurrent users increases.

CATALINA_OPTS="-server -Xmx1024m -XX:MaxPermSize=128m -DTE_BASE=$TE_BASE -Dderby.system.home=$DERBY_DATA"

Unpack the contents of the teamengine-common-libs archive into the CATALINA_BASE/lib directory. Deploy the teamengine.war component by either copying it into the CATALINA_BASE/webapps directory or using the Tomcat Manager application. Start the Tomcat instance.

The URIs listed below provide starting points for discovering and executing test suites. Modify the path if the name of the WAR file (and hence the context path) has been changed from the default value: “teamengine”.

  • /teamengine: Home page for selecting and running test suites using the web interface
  • /teamengine/rest/suites: Presents a listing of available test suites that expose a RESTful API, with links to test suite documentation

Install test suites in TEAM Engine

There are various examples of an executable test suite (ETS) that can be installed in TEAM Engine. For example,

Even though the GML suite is a Java-based implementation that uses TestNG and the WMS 1.3 suite uses OGC CTL scripts, they both follow Maven conventions; the suites are built and deployed in a similar manner. To download and install a test suite do the following steps:

  1. Checkout the test suite: e.g. git clone https://github.com/opengeospatial/ets-gml32.git
  2. Change to the project directory cd ets-gml32
  3. Checkout a specific release version (run the git tag command to list these) e.g. for GML, git checkout 1.25
  4. Build the test suite: mvn clean install
  5. Check that the build is successful–you should see BUILD SUCCESS displayed in the terminal output
  6. Change to the target folder cd target
  7. Unpack the archive file that ends with ctl.zip into $TE_BASE/scripts
  8. If it exists, unpack the archive file that ends with deps.zip into $TE_BASE/resources/lib

Customize the welcome page

Several elements of the welcome page may be customized if desired: the logo in the header, the main text, and the content in the footer. The files located in the TE_BASE/resources/site directory can be modified to provide site-specific content:

  • site/logo.png: The logo that appears in the header (at top left). The size of the default image is 127x58 px.
  • site/welcome.txt: The main text.
  • site/footer.txt: Footer content.
  • site/title.html: Title of the web application

Using a proxy

It is recommended to enable HSTS in proxy configuration when using TEAM Engine behind a reverse proxy.