|
@@ -661,7 +661,9 @@ bool CSATExecutor::ReportCaseResult(SATHTTP::STTask* pTask, SATHTTP::STCase *pCa
|
|
|
#endif
|
|
|
xmlpath.append("_result.xml");
|
|
|
std::vector<STCaseItem> vtCaseItem;
|
|
|
- GetCaseXMLResult(xmlpath, vtCaseItem);
|
|
|
+ if ( GetCaseXMLResult(xmlpath, vtCaseItem) )
|
|
|
+ pCase->_nExecutionResult = SATHTTP::SUCCESS;
|
|
|
+
|
|
|
// 如果测试项空,任务失败;
|
|
|
if ( vtCaseItem.size() == 0 ) {
|
|
|
// 将默认成功值改为异常;
|
|
@@ -905,6 +907,20 @@ bool CSATExecutor::GetCaseXMLResult(std::string xmlpath, std::vector<STCaseItem>
|
|
|
|
|
|
if (_tcsicmp(pXmlRoot->Value(), "results") != 0)
|
|
|
return false;
|
|
|
+
|
|
|
+ // 获取属性;
|
|
|
+ bool bFinishStatus = false;
|
|
|
+ const tinyxml2::XMLAttribute *pAttr = pXmlRoot->FirstAttribute();
|
|
|
+ while (pAttr) {
|
|
|
+ if (_tcsicmp(pAttr->Name(), "caseFinish") == 0) {
|
|
|
+ // 整个测试项ok;
|
|
|
+ if ( _tcsicmp(pAttr->Value(), _T("1")) == 0 )
|
|
|
+ bFinishStatus = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ pAttr = pAttr->Next();
|
|
|
+ }
|
|
|
|
|
|
GLOBAL::WriteTextLog(GLOBAL::SAT_EXE, "开始获取测试项内容:%s", xmlpath.c_str());
|
|
|
tinyxml2::XMLElement *pXmlElent = pXmlRoot->FirstChildElement();
|
|
@@ -952,7 +968,7 @@ bool CSATExecutor::GetCaseXMLResult(std::string xmlpath, std::vector<STCaseItem>
|
|
|
pXmlElent = pXmlElent->NextSiblingElement();
|
|
|
}
|
|
|
|
|
|
- return true;
|
|
|
+ return bFinishStatus;
|
|
|
}
|
|
|
|
|
|
int CSATExecutor::AttachTaskInfo2Buffer(SATPROTO::TaskInfo (&pbuff)[SATPROTO::MAX_TASKS])
|