The architecture diagram can be found in doc/architecture.png
.
The RAML description of the service's REST endpoints can be found in doc/screenshot-service.html
.
- Docker Toolbox with docker-compose (docker engine 17.12.0+)
- Postman (for manual REST requests)
docker-compose up --build --scale selenium-chrome=5
This generates 5 containers:
A small container with maven and JDK 11 installed, which takes the source code and generates the output EARs.
The Wildfly application server, which deploys any EARs built in the shared volume by the 'builder_java' container.
The Selenium hub that Wildfly will send requests to, that forwards to the browser-specific container.
The Google Chrome remote browser. Nothing will send requests to this directly, instead requests are sent to **selenium-hub** which will forward requests on to this container.
The PostgreSQL database container, used to persist requests and results.
We also specify --scale selenium-chrome=5
in order to create 5 instances of the selenium-chrome container.
mvn clean install -Dts
This will execute some basic tests:
- Send a valid POST request with 10 URLs, retrieve the response, retrieve the screenshot
- Send an invalid POST request (with malformed URLs), and receive a 400 HTTP response
- Send an invalid GET request for a job ID, and receive a 404 HTTP response
- Send an invalid GET request for a screenshot file name, and receive a 404 HTTP response