The current project contains the main application components that are used by the Interoperability Test Bed. These are:
gitb-srv
image.gitb-ui
image.In the subsequent sections each of these components will be referred to using their Docker image names\
(gitb-srv
and gitb-ui
).
Note
This repository is used to build the Test Bed's software components from their source. The simplest approach to use the Test Bed is via its published Docker images (gitb-ui and gitb-srv) for which you can follow the installation guides for development and for production. All other documentation (guides, tutorials, reference documentation) is available here.Alternatively, you may also build and launch the Docker service directly from the provided sources. See here for details.
Both gitb-srv
and gitb-ui
are Java-based applications. Specifically, gitb-srv
is packaged
as a Spring Boot application using Akka as its primary internal framework, whereas gitb-ui
is developed in Scala and uses the Play Framework.
The frontend of the gitb-ui
component is an Angular app developed in TypeScript, and is managed in terms
of scaffolding and build using Angular CLI.
The main configuration file of interest is application.conf
from gitb-ui
although this never needs
to be adapted directly. All properties can be set through environment variables, provided either via Docker
or through the IDE used for development.
The full listing and documentation of properties is available here.
Follow these steps to build and run the application components for development purposes.
To build and run the Test Bed's components you need to have the following tools:
gitb-srv
and gitb-ui
.gitb-srv
.gitb-ui
.gitb-ui
.gitb-ui
.Although not mandatory, the proposed IDE to use is IntelliJ, and VS Code for gitb-ui
's Angular app.
The focus of this README file is the gitb-srv
and gitb-ui
components. To run a complete Test Bed instance
you will also require at least:
Both these instances are set up separately (e.g. via Docker) environment. These can be set up from Docker as follows:
docker run --name gitb-mysql -p 3306:3306 -d isaitb/gitb-mysql
docker run --name gitb-redis -p 6379:6379 -d redis:7.0.11
Note
All images and containers are defined indocker-compose.yml
and explained in detail the developer installation guide. You may build and launch the complete service as described here.
To build and run the gitb-srv
component carry out the following steps:
gitb
run mvn clean install -DskipTests=true
.Application
from the gitb-testbed-service
module as
your entry point. This is the best approach as it allows direct debugging without extra configuration.mvn spring-boot:run
from the gitb-testbed-service
module.remote.testcase.repository.url
= http://localhost:9000/repository/tests/:test_id/definitionremote.testresource.repository.url
= http://localhost:9000/repository/resource/:test_id/:resource_idNote that defining a run configuration is something specific. If running outside an IDE you can follow either approach but ensure that the environment variables are correctly set up.
To build and run the gitb-ui
component carry out the following steps:
gitb-ui
folder issue sbt compile
.sbt run
.THEME = ec
for a EC-themed UI.The next step is to choose how to build and run the Angular UI application. Its resources are defined in
the gitb-ui/ui
folder and its build is managed by Angular CLI. You have two options on how to work with
the Angular app - choose the preferred approach for you from the two following sections. As a common first
step regardless of the approach you choose you need to issue npm install
from folder gitb-ui/ui
.
Developing with EU Login enabled: In case you are developing with EU Login enabled (i.e. against a local EU Login test instance), you need to ensure that the following environment variables are set:
SESSION_SECURE
set to false
SESSION_COOKIE_NAME
set to ITB_SESSION
.Failure to set these properties will result in session cookies never getting served over HTTP, resulting in endless authentication loops. The alternative is to test over HTTPS via a local SSL-enabled proxy (e.g. a local nginx server with a self-signed server certificate).
Using this approach you build the Angular app using Angular CLI but access it through the Play application. To do this:
gitb-ui/ui
issue npm run build
. This will build the app and copy it under the Play application's assets
folder. To rebuild automatically for any changes use npm run build:dev
.When to use this approach: Using this approach mirrors exactly how the application will run in production. In addition, you may need to use this approach to effectively test aspects that require interaction with the Play application. These include:
Using this approach you build and serve the Angular app using Angular CLI. In this scenario the Play application is only used through its REST API which the Angular app proxies and uses. To use this approach:
gitb-ui/ui
issue npm run build
. This is needed to put in place static resources used by the Angular app
(most notably tinymce styles).gitb-ui/ui
issue npm start
. This reloads the app upon detected changes.When to use this approach: This approach is the most efficient as it allows use of the lightweight CLI server and provides automatic refresh for build changes. The problem with this approach is that it cannot cover cases where you need to test interactions with the Play application (e.g. when EU Login is used for authentication). Having said this however, you can still use this after you have authenticated using the Play application given that authentication cookies are shared.
Follow these steps to build the components for deployment as a Dockerised service. Two approaches are available:
This approach is more suitable is you have set up the repository for development and have installed all necessary tooling. Producing build artefacts is faster but expects the necessary tools (Java, Maven, NPM, SBT, Scala) to be installed, and manual steps to build Docker images.
mvn clean install -DskipTests=true -Denv=docker
gitb-testbed-service/target/itbsrv.war
to a separate folder to build its Docker image.etc/docker/gitb-srv/Dockerfile
from the same folder to build the image with docker build -t isaitb/gitb-srv .
.gitb-ui
folder issue sbt clean dist
. This builds all Play code and automatically calls the required
prod build target from its Angular app.gitb-ui/target/universal/gitb-1.0-SNAPSHOT.zip
archive to a separate folder. The name of the resulting unzipped folder should be gitb-ui
.etc/docker/gitb-ui/Dockerfile
from the same folder to build the image with docker build -t isaitb/gitb-ui .
.etc/docker/gitb-mysql
folder build the image with docker build -t isaitb/gitb-mysql .
docker-compose.yml
file with docker compose up -d
.This approach is more suitable for a containerised build, avoiding any manual steps and developer tool installations (apart from Docker Compose). Make sure that your
Docker Compose is at least at version 2.0.0
. Note that the overall build time in this case is slower compared to building with the relevant tools.
To build and launch all containers, issue from the repository's root folder: docker compose up -d --build
.
Once a complete Test Bed instance has been set up, either in development or as a Dockerised service, access using the default Test Bed administrator account as follows:
admin@itb
. This account is set with a one-time password that is refreshed at start-up until a
first login is made. The password to use is obtained by checking the logs of container gitb-ui
.An example log output to retrieve the administrator password is as follows:
###############################################################################
The one-time password for the default administrator account [admin@itb] is:
b1afbc39-8ad7-49f4-a9d9-0bcec942aef4
###############################################################################
For information on how to proceed once you have logged in, you may refer to the Test Bed's user guide and sample usage tutorials.
This software is shared under the European Union Public Licence (EUPL) version 1.1, featuring a CEN-specific extension for the GITB CWA to limit its liability and trademark use. See here for details.
The authors of this software waive any and all liability linked to its usage, or the interpretation of any results it may produce. Any data, including data of private nature that it may store, is defined by the eventual downstream user's configuration. A detailed legal notice of the shared instance hosted by the European Commission is available via the relevant welcome page link.
For feedback or questions regarding the GITB Test Bed software you are invited to post issues in the current repository. In addition, feel free to contact the Test Bed team via email at DIGIT-ITB@ec.europa.eu.
For general information on all aspects of the Interoperability Test Bed and the GITB software in particular you may refer to its Joinup space.
The GITB software is used to realise a complete conformance testing platform. If you are more interested in standalone data validation you may find interesting the Test Bed's validators for XML, RDF, JSON and CSV content.