static String buildAndRunFromLocalBase(String target, String base)
      throws IOException, InterruptedException, DigestException {
    BuildResult buildResult =
        SingleProjectIntegrationTest.simpleTestProject.build(
            "clean",
            "jib",
            "-Djib.useOnlyProjectCache=true",
            "-Djib.console=plain",
            "-D_TARGET_IMAGE=" + target,
            "-D_BASE_IMAGE=" + base,
            "-Djib.allowInsecureRegistries=" + target.startsWith("localhost"),
            "-b=" + "build-local-base.gradle");
    assertBuildSuccess(buildResult, "jib", "Built and pushed image as ");
    assertThatExpectedImageDigestAndIdReturned(
        SingleProjectIntegrationTest.simpleTestProject.getProjectRoot());
    MatcherAssert.assertThat(buildResult.getOutput(), CoreMatchers.containsString(target));
    return pullAndRunBuiltImage(target);
  }
Helper class to run integration tests.
jib-gradle-plugin/src/integration-test/java/com/google/cloud/tools/jib/gradle/JibRunHelper.java