-
Type:
New Feature
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: jenkins-test-harness
-
Labels:
-
Similar Issues:
Lots of plugin functional tests using JenkinsRule assume some kind of software environment on the testing host, typically for running external processes (for example SCM tools), but this is rarely explicit. That makes it complicated to assure that both developer machines and CI builders have all required software packages installed and in the correct versions and configurations.
The acceptance-test-harness includes a very useful DockerFixture system which addresses this for acceptance tests. But acceptance tests are slow, flaky, and external to plugin sources, so most test code is written using functional tests.
We need to be able to reuse the same system in both kinds of tests.
An alternative would be to use Arquillian Cube Standalone as in this demo by Alex Soto/Alex Soto. The upside is of course use of a third-party library which is presumably maintained by others. Downsides:
Closer to the spirit of DockerFixture would be junit-docker-rule or docker-junit-rule, neither of which seems to support building images on demand from Dockerfile; or docker-compose-rule, which sounds good for multi-container situations, though it imposes an additional requirement that Compose be installed.
Also none of these seem to have any equivalent to ATH’s ability to subclass DockerContainer to define reusable, type-safe container classes.