Status: Unstable | Not ready for production use
How it works
This plugin appears to Gauge as a language runner. Gauge has no knowledge about Docker usage. The plugin is responsible for bringing up Docker and executing the test code in the container.
When a new project is initialized, this plugin builds a Docker image from the Dockerfile shipped with the plugin. The image has Gauge Java installed in it.
When gauge tests are run, the plugin brings up a container from the image that was built previously, mounts the current project root in the container, sets Gauge's API ports as environment variables and invokes the Gauge Java runner inside the container. The Gauge Java runner in the container connects to Gauge running on the host through TCP.
- Works only on Linux at the moment. OSX needs further abstractions using
- Docker is invoked using
--net=hostoption. This does not isolate the network interface of the container from the host. This is necessary because both Gauge and Gauge-Java try to listen and connect on
- Currently, Gauge commands need to be run as the same user that runs the Docker daemon. By default, it needs
root. So, you may need to do
sudo gauge --init docker-javaand
sudo gauge specs/unless you run Docker manager as a different user.
gauge-javain the container is not able to figure out the classpaths. So,
jars have to explicitly copied over from
./libsdirectory in the current project.
Build from source
go run make.go
go run make.go --install
Run after compiling:
go run make.go --distro
Create a project
gauge --init docker-java
This will build a docker image with Gauge Java and create a sample implementation in the current directory.
Write your tests the way you would write for Gauge Java.
This will start Gauge, Gauge will trigger the
which will in turn bring up a container with the image compiled
Gauge-Ruby is released under GNU Public License version 3.0
Copyright 2016 ThoughtWorks, Inc.