X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FLauncher.cpp;h=4219399813e82a6fe06745cf1463b0bdabc9de64;hb=ec48516a195faabbb514298ad743520b3fdb7ee4;hp=a6e5ab9ddb46e6e9ef2ff54002a5c7c0f7993c91;hpb=9ec374517954efc1b34694c7ed801231f035d7f7;p=anna.git diff --git a/example/diameter/launcher/Launcher.cpp b/example/diameter/launcher/Launcher.cpp index a6e5ab9..4219399 100644 --- a/example/diameter/launcher/Launcher.cpp +++ b/example/diameter/launcher/Launcher.cpp @@ -1340,19 +1340,6 @@ std::string Launcher::help() const throw() { result += "\n Test cases reports are not dumped on process context (too many information in general)."; result += "\n The report contains context information in every moment: this operation acts as a snapshot."; result += "\n"; - result += "\n test|report|[|[yes]|no]"; - result += "\n"; - result += "\n Every time a test case is finished, its xml representation will be dump on a file under"; - result += "\n the execution directory (or the one configured in process command-line 'tmDir') with"; - result += "\n the name 'cycle-.testcase-.xml'. The third parameter represents"; - result += "\n the test result condition to dump the information. By default, neither failed nor successful"; - result += "\n test cases are written to avoid IO overload (in most of cases not all the tests are going to"; - result += "\n fail and you could enable only such dumps, but you can enable both types if you want)."; - result += "\n Better, you can use the 'look' operation to see the desired report(s) and its result state,"; - result += "\n in case that you miss the xml files or you disabled all the dumps during testing."; - result += "\n"; - result += "\n test|report-hex[|[yes]|no] Reports could include the diameter messages in hexadecimal format. Disabled by default."; - result += "\n"; result += "\n test|interact|amount|id Makes interactive a specific test case id. The amount is the margin of execution steps"; result += "\n to be done. Normally, we will execute 'test|interact|0|', which means that"; result += "\n the test case is selected to be interactive, but no step is executed. Then you have to"; @@ -1377,8 +1364,24 @@ std::string Launcher::help() const throw() { result += "\n"; result += "\n test|summary Test manager general report (number of test cases, counts by state, global configuration,"; result += "\n forced in-progress limitation, reports visibility, etc.). Be careful when you have reports"; - result += "\n enabled because the programmed test cases dumps could be heavy (try to disable both failed"; - result += "\n and successful dumps)."; + 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|[|[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"; + result += "\n dumps during testing where only failed or success states will appear: every time a test case"; + result += "\n is finished its xml representation will be dump on a file under the execution directory (or"; + result += "\n the one configured in process command-line 'tmDir') with the name:"; + result += "\n"; + result += "\n 'cycle-.testcase-.xml'."; + result += "\n"; + result += "\n By default, all the states are disabled to avoid IO overload. In most of cases not all the"; + result += "\n tests are going to fail and you could enable only such failed dumps, but you can enable all"; + result += "\n the types if you want (use reserved word 'all' for this)."; + result += "\n"; + result += "\n test|report-hex[|[yes]|no] Reports could include the diameter messages in hexadecimal format. Disabled by default."; result += "\n"; result += "\n"; result += "\nUSING OPERATIONS INTERFACE"; @@ -1779,7 +1782,8 @@ void Launcher::eventOperation(const std::string &operation, std::string &respons // test|next[|] 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| Restarts the whole programmed test list when finished the amount number of times ... - // test|report|[|[yes]|no] Every time a test case is finished a report file in xml format will be created under ... + // test|report|[|[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| Updates current test pointer position. // test|look[|id] Show programmed test case for id provided, current when missing ... @@ -1852,16 +1856,22 @@ 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 != "failed" && param2 != "success") + 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"); - if(param2 == "success") - testManager.setDumpSuccessfulReports(enable); - else + 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 // all + testManager.setDumpAllReports(enable); opt_response_content += (enable ? "report enabled " : "report disabled "); opt_response_content += "for tests in '";