- if(param2 == "") param2 = "yes";
- testManager.setDumpReports((param2 == "yes"));
- opt_response_content += (testManager.getDumpReports() ? "report enabled" : "report disabled");
+ if(param2 == "") param2 = "all";
+ if(param3 == "") param3 = "yes";
+ bool enable = (param3 == "yes");
+
+ if(param2 == "initialized")
+ testManager.setDumpInitializedReports(enable);
+ else if(param2 == "in-progress")
+ testManager.setDumpInProgressReports(enable);
+ else if(param2 == "failed")
+ testManager.setDumpFailedReports(enable);
+ else if(param2 == "success")
+ testManager.setDumpSuccessReports(enable);
+ else if(param2 == "all") {
+ param2 = "any";
+ testManager.setDumpAllReports(enable);
+ }
+ else if(param2 == "none") {
+ enable = !enable;
+ param2 = "any";
+ testManager.setDumpAllReports(enable);
+ }
+ else
+ throw anna::RuntimeException("Wrong body content format on HTTP Request. Use 'help' management command to see more information.", ANNA_FILE_LOCATION);
+
+ opt_response_content += (enable ? "report enabled " : "report disabled ");
+ opt_response_content += "for tests in '";
+ opt_response_content += param2;
+ opt_response_content += "' state";