批量应用测试与开发环境搭建
批量应用测试
在批量应用开发中,测试是确保应用可靠性和健壮性的关键环节。下面将介绍如何进行批量应用的测试。
测试步骤测试
以下是一个步骤测试的示例代码:
@Test
@DirtiesContext
public void integration() throws Exception {
JobParameters jobParameters = new JobParametersBuilder()
.addString("reportResource", "file:" + STATISTIC_PATH)
.toJobParameters();
JobExecution exec = jobLauncherTestUtils.launchStep("statisticStep",
jobParameters);
assertEquals(BatchStatus.COMPLETED, exec.getStatus());
StepExecution setpExec = exec.getStepExecutions().iterator().next();
assertEquals(1, setpExec.getWriteCount());
assertFileEquals(
new ClassPathResource(STATISTIC_REF_PATH),
new FileSystemResource(STATISTIC_PATH));
}
<
批量应用测试与开发环境搭建指南
超级会员免费看
订阅专栏 解锁全文
5万+

被折叠的 条评论
为什么被折叠?



