增加日志

This commit is contained in:
seagull 2019-06-13 11:15:34 +08:00
parent 3897efc15f
commit 462955e73a
3 changed files with 9 additions and 6 deletions

View File

@ -146,13 +146,14 @@ public class AppTestControl {
List<ProjectCase> cases = GetServerAPI.getCasesbyplanId(taskScheduling.getPlanId());
LogUtil.APP.info("当前计划【{}】中共有【{}】条待测试用例...",task.getTaskName(),cases.size());
LogOperation.updateTaskExecuteStatus(taskId, cases.size());
int i = 0;
for (ProjectCase testcase : cases) {
i++;
LogUtil.APP.info("开始执行当前测试任务 {} 的第【{}】条测试用例:【{}】......",task.getTaskName(),i,testcase.getCaseSign());
List<ProjectCaseSteps> steps = GetServerAPI.getStepsbycaseid(testcase.getCaseId());
if (steps.size() == 0) {
continue;
}
LogUtil.APP.info("开始执行用例:【{}】......",testcase.getCaseSign());
try {
//插入开始执行的用例
caselog.insertTaskCaseExecute(taskId, taskScheduling.getProjectId(),testcase.getCaseId(),testcase.getCaseSign(), testcase.getCaseName(), 4);

View File

@ -109,7 +109,7 @@ public class TestControl {
new ArrayBlockingQueue<Runnable>(1000), new ThreadPoolExecutor.CallerRunsPolicy());
List<ProjectCase> cases = GetServerAPI.getCasesbyplanId(taskScheduling.getPlanId());
LogUtil.APP.info("当前计划【{}】中共有【{}】条待测试用例...",task.getTaskName(),cases.size());
LogUtil.APP.info("当前测试任务 {} 中共有【{}】条待测试用例...",task.getTaskName(),cases.size());
LogOperation.updateTaskExecuteStatus(taskid, cases.size());
int casepriority = 0;
for (int j = 0; j < cases.size(); j++) {
@ -135,6 +135,7 @@ public class TestControl {
}
casepriority = projectcase.getPriority();
THREAD_COUNT++; // 多线程计数++用于检测线程是否全部执行完
LogUtil.APP.info("开始执行当前测试任务 {} 的第【{}】条测试用例...",task.getTaskName(),j+1);
threadExecute.execute(new ThreadForExecuteCase(projectcase, steps, taskid, pcplist, caselog));
}
// 多线程计数用于检测线程是否全部执行完

View File

@ -110,15 +110,16 @@ public class WebTestControl {
LogOperation caselog = new LogOperation();
List<ProjectCase> cases = GetServerAPI.getCasesbyplanId(taskScheduling.getPlanId());
LogUtil.APP.info("当前计划【{}】中共有【{}】条待测试用例...",task.getTaskName(),cases.size());
LogUtil.APP.info("当前测试任务 {} 中共有【{}】条待测试用例...",task.getTaskName(),cases.size());
LogOperation.updateTaskExecuteStatus(taskid, cases.size());
int i = 0;
for (ProjectCase testcase : cases) {
i++;
LogUtil.APP.info("开始执行当前测试任务 {} 的第【{}】条测试用例:【{}】......",task.getTaskName(),i,testcase.getCaseSign());
List<ProjectCaseSteps> steps = GetServerAPI.getStepsbycaseid(testcase.getCaseId());
if (steps.size() == 0) {
continue;
}
LogUtil.APP.info("开始执行用例:【{}】......",testcase.getCaseSign());
try {
// ²åÈ뿪ʼִÐеÄÓÃÀý
caselog.insertTaskCaseExecute(taskid, taskScheduling.getProjectId(),testcase.getCaseId(),testcase.getCaseSign(), testcase.getCaseName(), 4);