Source:
<code>public void pushImage() { String dockerHubUsername = System.getProperty("dockerHubUsername"); String dockerHubEmail = System.getProperty("dockerHubEmail"); String dockerHubPassword = System.getProperty("dockerHubPassword"); if (dockerHubUsername == null || dockerHubUsername.isEmpty() || dockerHubEmail == null || dockerHubEmail.isEmpty() || dockerHubPassword == null || dockerHubPassword.isEmpty()) { <START> fail("At least one of credentials is null or empty! Aborting test..."); <END> } DockerImagesTab imageTab = new DockerImagesTab(); imageTab.activate(); imageTab.refresh(); new WaitWhile(new JobIsRunning(), TimePeriod.NORMAL); String dockerFilePath = ""; try { dockerFilePath = (new File("resources/test-variables")).getCanonicalPath(); } catch (IOException ex) { fail("Resource file not found!"); } imageTab.buildImage(imageName, dockerFilePath); new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG); ConsoleView consoleView = new ConsoleView(); consoleView.open(); assertFalse("Console has no output!", consoleView.getConsoleText().isEmpty()); assertTrue("Build has not been successful", consoleView.getConsoleText().contains("Successfully built")); setUpRegister(registryAddress, dockerHubEmail, dockerHubUsername, dockerHubPassword); setSecureStorage("password"); java.util.Date date = new java.util.Date(); seconds = String.valueOf(date.getTime()); imageNewTag = imageTag + ":" + seconds; new DockerExplorerView().getDockerConnection(getDockerServer()).getImage(imageName).addTagToImage(imageNewTag); new DockerExplorerView().getDockerConnection(getDockerServer()).getImage(imageTag, seconds) .pushImage(registryAccount, false, false); new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG); deleteImage(imageTag, seconds); new DockerExplorerView().getDockerConnection(getDockerServer()).pullImage(imageTag, seconds, registryAddress); new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG); assertTrue("Image has not been pushed/pulled!", imageIsDeployed(imageTag)); }</code><technical_language>I good list properties in fail message. If run this test fails arguments required. need check parameter specific parameter is missing, hurt ;-)</technical_language>

Target:
public void pushImage() { String dockerHubUsername = System.getProperty("dockerHubUsername"); String dockerHubEmail = System.getProperty("dockerHubEmail"); String dockerHubPassword = System.getProperty("dockerHubPassword"); if (dockerHubUsername == null || dockerHubUsername.isEmpty() || dockerHubEmail == null || dockerHubEmail.isEmpty() || dockerHubPassword == null || dockerHubPassword.isEmpty()) { fail("At least one of credentials is null or empty! dockerHubUsername:" + dockerHubUsername + " dockerHubEmail:" + dockerHubEmail + " dockerHubPassword:" + dockerHubPassword + " Aborting test..."); } DockerImagesTab imageTab = new DockerImagesTab(); imageTab.activate(); imageTab.refresh(); new WaitWhile(new JobIsRunning(), TimePeriod.NORMAL); String dockerFilePath = ""; try { dockerFilePath = (new File("resources/test-variables")).getCanonicalPath(); } catch (IOException ex) { fail("Resource file not found!"); } imageTab.buildImage(imageName, dockerFilePath); new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG); ConsoleView consoleView = new ConsoleView(); consoleView.open(); assertFalse("Console has no output!", consoleView.getConsoleText().isEmpty()); assertTrue("Build has not been successful", consoleView.getConsoleText().contains("Successfully built")); setUpRegister(registryAddress, dockerHubEmail, dockerHubUsername, dockerHubPassword); setSecureStorage("password"); java.util.Date date = new java.util.Date(); seconds = String.valueOf(date.getTime()); imageNewTag = imageTag + ":" + seconds; new DockerExplorerView().getDockerConnection(getDockerServer()).getImage(imageName).addTagToImage(imageNewTag); new DockerExplorerView().getDockerConnection(getDockerServer()).getImage(imageTag, seconds) .pushImage(registryAccount, false, false); new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG); deleteImage(imageTag, seconds); new DockerExplorerView().getDockerConnection(getDockerServer()).pullImage(imageTag, seconds, registryAddress); new WaitWhile(new JobIsRunning(), TimePeriod.VERY_LONG); assertTrue("Image has not been pushed/pulled!", imageIsDeployed(imageTag)); }