| 153 | } |
| 154 | |
| 155 | Json::Value FuzzGenReporter::exportAPIsReportJson() const { |
| 156 | Json::Value APIsJson = Json::Value(Json::arrayValue); |
| 157 | for (auto APIReportPair : this->APIReportMap) { |
| 158 | auto APIReport = APIReportPair.second; |
| 159 | Json::Value APIJson; |
| 160 | APIJson["Name"] = APIReport->APIName; |
| 161 | APIJson["Status"] = static_cast<std::string>(APIReport->APIStatus.second); |
| 162 | APIJson["StatusList"] = Json::Value(Json::arrayValue); // for debug |
| 163 | for (auto Status : APIReport->CallStatus) { |
| 164 | Json::Value StatusJson; |
| 165 | StatusJson["Status"] = static_cast<std::string>(Status.second); |
| 166 | StatusJson["StatusFromUT"] = Status.first; |
| 167 | APIJson["StatusList"].append(StatusJson); |
| 168 | } |
| 169 | APIsJson.append(APIJson); |
| 170 | } |
| 171 | return APIsJson; |
| 172 | } |
| 173 | |
| 174 | Json::Value FuzzGenReporter::exportStatsJson() const { |
| 175 | Json::Value RetJson; |