|  | @@ -340,10 +340,10 @@ bool CSATExecutor::ReportCaseItemFinish(SATParameters::STTask* pTask, SATParamet
 | 
	
		
			
				|  |  |  	stJobProcessReq.strArtificialModify = "";
 | 
	
		
			
				|  |  |  	stJobProcessReq.strRunnerName = "";
 | 
	
		
			
				|  |  |  	stJobProcessReq.strTaskType = "FUNCTIONALITY";
 | 
	
		
			
				|  |  | -	stJobProcessReq.strCaseRepeat = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCaseRepeat = "0";
 | 
	
		
			
				|  |  |  	stJobProcessReq.strApplicationGroup = "";
 | 
	
		
			
				|  |  |  	// 实例Id;
 | 
	
		
			
				|  |  | -	_itoa_s(pTask->nInstanceId, szValue, 10);
 | 
	
		
			
				|  |  | +	_itoa_s(pTask->Id, szValue, 10);
 | 
	
		
			
				|  |  |  	stJobProcessReq.strInstanceId = szValue;
 | 
	
		
			
				|  |  |  	stJobProcessReq.strCaseId = pCase->strId;
 | 
	
		
			
				|  |  |  	// 进度;
 | 
	
	
		
			
				|  | @@ -351,7 +351,7 @@ bool CSATExecutor::ReportCaseItemFinish(SATParameters::STTask* pTask, SATParamet
 | 
	
		
			
				|  |  |  	stJobProcessReq.strProgress = szValue;
 | 
	
		
			
				|  |  |  	// 需要将utf-8转gbk;
 | 
	
		
			
				|  |  |  	stJobProcessReq.strReusltMessage = CharEncoding::UTF82ASCII(caseItem.name.c_str());
 | 
	
		
			
				|  |  | -	stJobProcessReq.strJobRepeat = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strJobRepeat = "0";
 | 
	
		
			
				|  |  |  	stJobProcessReq.strScreenShot = "";
 | 
	
		
			
				|  |  |  	stJobProcessReq.strStartTime = pCase->_strStartTime;
 | 
	
		
			
				|  |  |  	stJobProcessReq.strCrashNumber = "";
 | 
	
	
		
			
				|  | @@ -362,7 +362,7 @@ bool CSATExecutor::ReportCaseItemFinish(SATParameters::STTask* pTask, SATParamet
 | 
	
		
			
				|  |  |  		int npos = it->find_last_of('/');
 | 
	
		
			
				|  |  |  		if ( std::string::npos != npos )
 | 
	
		
			
				|  |  |  		{
 | 
	
		
			
				|  |  | -			stJobProcessReq.strImgName.append(it->substr(npos));
 | 
	
		
			
				|  |  | +			stJobProcessReq.strImgName.append(it->substr(npos+1));
 | 
	
		
			
				|  |  |  			stJobProcessReq.strImgName.append("&");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  	}
 | 
	
	
		
			
				|  | @@ -543,6 +543,78 @@ bool CSATExecutor::UploadTaskLog(SATParameters::STTask* pTask)
 | 
	
		
			
				|  |  |  	return false;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +bool CSATExecutor::ReportTaskStart(SATParameters::STTask* pTask)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	TCHAR szValue[MAX_PATH] = {0};
 | 
	
		
			
				|  |  | +	std::string url = Global::g_stSATConfig.szExecuteServer;
 | 
	
		
			
				|  |  | +	url.append("/ajaxInteractiveManage!setResultList.action");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	SATParameters::STJobProcessReq stJobProcessReq;
 | 
	
		
			
				|  |  | +	SATParameters::STJobProcessResp stJobProcessResp;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	// 需要处理###
 | 
	
		
			
				|  |  | +	stJobProcessReq.strResultState = "0";	// 脚本执行中,认为fail;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCaseScene = "";
 | 
	
		
			
				|  |  | +	// 索引;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCaseStep = "0";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strApkMD5 = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCrashTime = "";
 | 
	
		
			
				|  |  | +	// 就是Task中的ExecuteId
 | 
	
		
			
				|  |  | +	_itoa_s(pTask->nExecuteId, szValue, 10);
 | 
	
		
			
				|  |  | +	stJobProcessReq.strRunnerId = szValue;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCPUInfo = "0";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strRunnedActionNameList = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strArtificialResult = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strArtificialModify = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strRunnerName = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strTaskType = "FUNCTIONALITY";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCaseRepeat = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strApplicationGroup = "";
 | 
	
		
			
				|  |  | +	// 实例Id;
 | 
	
		
			
				|  |  | +	_itoa_s(pTask->nInstanceId, szValue, 10);
 | 
	
		
			
				|  |  | +	stJobProcessReq.strInstanceId = szValue;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCaseId = "";
 | 
	
		
			
				|  |  | +	// 进度(###需要修改此处###);
 | 
	
		
			
				|  |  | +	stJobProcessReq.strProgress = "0";
 | 
	
		
			
				|  |  | +	// 需要将utf-8转gbk;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strReusltMessage = "任务开始";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strJobRepeat = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strScreenShot = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strStartTime = pTask->strStartTime;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCrashNumber = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCaseName = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strFailedReason = "";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	stJobProcessReq.strImgName = "";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strCaseIndex = "";
 | 
	
		
			
				|  |  | +	// 实例Id;
 | 
	
		
			
				|  |  | +	_itoa_s(pTask->nDeviceId, szValue, 10);
 | 
	
		
			
				|  |  | +	stJobProcessReq.strDeviceId = szValue;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strSceneIndex = "";
 | 
	
		
			
				|  |  | +	// 实例Id;
 | 
	
		
			
				|  |  | +	_itoa_s(pTask->nTaskId, szValue, 10);
 | 
	
		
			
				|  |  | +	stJobProcessReq.strTaskId = szValue;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strAnalysis = "";
 | 
	
		
			
				|  |  | +	// 设备名称:即DeviceSerial;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strDevnceName = pTask->Job.strDeviceId;	// 命名及其不范围,一会deviceid是deviceserial,一会是id;
 | 
	
		
			
				|  |  | +	// 固定为:TOTAL
 | 
	
		
			
				|  |  | +	stJobProcessReq.strInfoType = "TOTAL";
 | 
	
		
			
				|  |  | +	// 如果是Android设备,需要通过adb获取;
 | 
	
		
			
				|  |  | +	//stJobProcessReq.strMemoryInfo = stDevice.strMemory;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strEndTime = "";// CTime::GetCurrentTime().Format(_T("%Y-%m-%d %H:%M:%S"));//"2019-12-16 10:18:20";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strRoundNumber = "1";
 | 
	
		
			
				|  |  | +	stJobProcessReq.strResultType = "0";		// reportJobStart;
 | 
	
		
			
				|  |  | +	stJobProcessReq.strOperationStep = "";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	if ( SetResultList(url, stJobProcessReq, stJobProcessResp) )
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		return true;
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	return false;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  bool CSATExecutor::ReportTaskFinish(SATParameters::STTask* pTask)
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |  	TCHAR szValue[MAX_PATH] = {0};
 | 
	
	
		
			
				|  | @@ -867,6 +939,9 @@ DWORD CSATExecutor::ExecuteScriptThread(LPVOID lpVoid)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  				// 通知SAT服务器,脚本开始执行;
 | 
	
		
			
				|  |  |  				that->NotifyTaskStart(pTask);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +				// 通知SAT服务器,脚本开始;
 | 
	
		
			
				|  |  | +				that->ReportTaskStart(pTask);
 | 
	
		
			
				|  |  |  			}		
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  	} while ( WaitForSingleObject(that->m_hEventExcuteScript, 10000) == WAIT_TIMEOUT );
 |