@Test
	public void doStopAllJobExecutions() throws Exception {
		String jobName = generateJobName();
		executeJobCreate(jobName, JOB_WITH_STEP_EXECUTIONS);
		checkForJobInList(jobName, JOB_WITH_STEP_EXECUTIONS, true);
		triggerJobWithDelay(jobName, "5");
		Thread.sleep(5000);
		String executionId = getJobExecutionId(jobName);
		String executionStatus = getJobExecutionStatus(jobName);
		assertTrue(executionStatus.equals("STARTING") || executionStatus.equals("STARTED"));
		// Stop the execution by the given executionId.
		executeCommand("job execution all stop --force");
		// sleep for stop() until the step2 is invoked.
		Thread.sleep(3000);
		Table table = (Table) executeCommand("job execution list").getResult();
		for (TableRow tr : table.getRows()) {
			// Match by above executionId
			if (tr.getValue(1).equals(executionId)) {
				executionStatus = tr.getValue(5);
				break;
			}
		}
		assertTrue("Expected an executionStatus with Status 'STOPPING' or 'STOPPED' but got " + executionStatus,
				executionStatus.equals("STOPPING") || executionStatus.equals("STOPPED"));
	}
Test {@link JobCommands}.

@author Glenn Renfro
@author Gunnar Hillert
@author Ilayaperumal Gopinathan
@author Michael Minella
@since 1.0
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/AbstractJobCommandsTests.java