From 88cd809b9442870f34e4e8b9ca04fdb7609340e4 Mon Sep 17 00:00:00 2001 From: dhgarrette Date: Tue, 27 Jan 2009 22:29:40 +0000 Subject: [PATCH] BATCH-674: Added section on Testing Individual Steps --- docs/src/site/docbook/reference/testing.xml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/src/site/docbook/reference/testing.xml b/docs/src/site/docbook/reference/testing.xml index 4ec5fa4aa..9fcab4f1e 100644 --- a/docs/src/site/docbook/reference/testing.xml +++ b/docs/src/site/docbook/reference/testing.xml @@ -81,12 +81,30 @@ simpleJdbcTemplate.update("insert into CUSTOMER values (?, 0, ?, 100000)", i, "customer" + i); } - JobExecution jobExecution = this.launchJob(); + JobExecution jobExecution = this.launchJob(); Assert.assertEquals("COMPLETED", jobExecution.getExitStatus()); } } + + + +
+ Testing Individual Steps + + For complex batch jobs, test cases in the end-to-end tesing approach + may become unmanageable. It these cases, it may be more useful to have + test cases to test individual steps on their own. The + AbstractJobTests class contains a method + launchStep that takes a step name and runs just + that particular Step. This approach allows for more + targeted tests by allowing the test to set up data for just that step and + to validate its results directly. + + + JobExecution jobExecution = this.launchStep("loadFileStep"); +