Getting started with Stackwork


Importing Stackwork in your project

Stackwork is published on the Gradle plugin portal, so your projects can download it with little configuration. You should have a build.gradle in the main project directory containing at least

// /build.gradle

plugins {
  id 'org.stackwork' version '0.6.0'

See here on Github for the latest release.

Create your test stack(s) and suite(s)

You can now create Stackwork modules for all the different parts of your testing setup. Since the modules technically are Gradle sub projects you will have a settings.gradle to include them. The root project can be a module as well, which makes sense if you want one of the deliverables of your project is in fact a Docker image. For every module, you should have a build.gradle that applies Stackwork and configures it with at least the module type:

// module-dir/build.gradle

import static org.stackwork.gradle.docker.ModuleType.*

// in the root project you can skip the following line:
apply plugin: 'stackwork'

stackwork {
  moduleType = ${MODULE TYPE}
  // further configuration

A note on Gradle

Gradle is a powerful and versatile tool. You can for instance create tasks producing anything you might need in the creation of your (test) images. Or you can create your own custom tasks that scan the stack log files for certain messages and fail your build if you found such. The possibilities are near endless, so be sure to take a look at the Gradle documentation if you are not familiar with this build tool yet.


To dive into some regularly occuring use cases, see the collection of pages below Usage. To see everything that Stackwork has to offer, see those below Reference.