-
Notifications
You must be signed in to change notification settings - Fork 2
Automated Tests
helkv edited this page Nov 13, 2019
·
1 revision
This Page gives an overview over the existing automated tests for imeji and how to run them.
The automated tests for imeji are separated in:
- UI Tests
- Integration Tests
Imeji workflows are tested on UI level using the Selenium testing framework.
The Selenium tests are managed in an separate project: https://github.com/MPDL/imeji-gui-testing
Methods on the Service level and the connection to the Jena DB and to Elasticsearch are tested by the Integration Tests.
The Integration Tests are located in the src/test
directory of this project.
-
Requirements
- Requirements of the current imeji release are fulfilled: https://github.com/MPDL/imeji/wiki/Installation
-
Docker must be installed and running:
- Docker is used to start an Elasticsearch instance within a Docker Container for the tests
- Instructions to set up Docker for the tests on Windows 7 :
- Download the latest version of Docker Toolbox: https://github.com/docker/toolbox/releases
- Install Docker Toolbox: https://docs.docker.com/toolbox/toolbox_install_windows (skip step 1. and 3.)
- Create and Start a VirtualBox as Docker host:
- Open Windows Command Prompt:
cmd.exe
- List all Docker hosts:
docker-machine ls
- Create a VirtualBox if none exists:
docker-machine create default
- Start the VirtualBox:
docker-machine start default
- Open Windows Command Prompt:
- The VirtualBox should be stopped before system shut down:
- Stop the VirtualBox:
docker-machine stop default
- Stop the VirtualBox:
- As soon as the VirtualBox is created and started (steps a.-d.) the tests can be executed!
-
Configuration
- Imeji properties for the tests can be configured in the
src/test/resources/imeji.properties
file. The following properties should be checked and set correctly before running the tests:- imeji.tdb.path Set to a writeable directory where the test database (Apache Jena) can be stored
- imeji.storage.path Set to a writeable directory where the test binary files can be stored
- imeji.imagemagick.installpath If ImageMagick 6 is installed (recommended), set to the directory where the ImageMagick binaries (convert etc.) are installed – Set this path to avoid Exceptions referring to ImageMagick during the tests
- Imeji properties for the tests can be configured in the