Support test|report|none operation. Add timeout to system test example
authorEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Fri, 27 Nov 2015 13:31:41 +0000 (14:31 +0100)
committerEduardo Ramos Testillano <eduardo.ramos.testillano@ericsson.com>
Fri, 27 Nov 2015 13:31:41 +0000 (14:31 +0100)
example/diameter/launcher/Launcher.cpp
example/diameter/launcher/resources/st_examples/DynamicQualification/testcase.txt.msk

index 67343ff..9aa5425 100644 (file)
@@ -1366,7 +1366,7 @@ std::string Launcher::help() const throw() {
   result += "\n                                 enabled because the programmed test cases dumps could be heavy (anyway you could enable the";
   result += "\n                                 dumps separately, for any of the possible states: Initialized, InProgress, Failed, Success).";
   result += "\n";
-  result += "\n   test|report|<initialized/in-progress/failed/success/all>[|[yes]|no]";
+  result += "\n   test|report|<initialized/in-progress/failed/success/all/none>[|[yes]|no]";
   result += "\n";
   result += "\n                                 Enables/disables report generation for a certain test case state: initialized, in-progress,";
   result += "\n                                 failed or success. This applies to report summary (former described operation) and automatic";
@@ -1781,7 +1781,7 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons
     // test|next[|<sync-amount>]                Forces the execution of the next test case(s) without waiting for test manager tick ...
     // test|ip-limit[|amount]                   In-progress limit of test cases. No new test cases will be launched over this value ...
     // test|repeats|<amount>                    Restarts the whole programmed test list when finished the amount number of times ...
-    // test|report|<initialized/in-progress/failed/success/all>[|[yes]|no]
+    // test|report|<initialized/in-progress/failed/success/all/none>[|[yes]|no]
     //                                          Enables/disables report generation for a certain test case state: initialized, in-progress ...
     // test|report-hex[|[yes]|no]               Reports could include the diameter messages in hexadecimal format. Disabled by default.
     // test|goto|<id>                           Updates current test pointer position.
@@ -1855,9 +1855,6 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons
       if (numParams > 3)
         throw anna::RuntimeException("Wrong body content format on HTTP Request. Use 'help' management command to see more information.", ANNA_FILE_LOCATION);
 
-      if(param2 != "initialized" && param2 != "in-progress" && param2 != "failed" && param2 != "success" && param2 != "all")
-        throw anna::RuntimeException("Wrong body content format on HTTP Request. Use 'help' management command to see more information.", ANNA_FILE_LOCATION);
-
       if(param3 == "") param3 = "yes";
       bool enable = (param3 == "yes");
 
@@ -1869,8 +1866,12 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons
         testManager.setDumpFailedReports(enable);
       else if(param2 == "success")
         testManager.setDumpSuccessReports(enable);
-      else // all
+      else if(param2 == "all")
         testManager.setDumpAllReports(enable);
+      else if(param2 == "none")
+        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 '";
index 2abbda0..04aea23 100644 (file)
@@ -1,6 +1,7 @@
 test|__TESTID__|delay|0
 test|__TESTID__|delay|0
 test|__TESTID__|delay|0
+test|__TESTID__|timeout|5000
 test|__TESTID__|sendxml2e|15.hex.as.xml
 test|__TESTID__|waitfe|272|0|||MMTel_DynamicQualification;ggsnNodeHostname.nodeHostRealm.com;2;1__SEQ8__|2001
 test|__TESTID__|sendxml2e|20.hex.as.xml