X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Ftesting%2FTestStep.cpp;h=84c577c77de1e7126bb6b8eab3bbf58997f0d357;hp=5355024a5dae217077d6b675a3a069d5609959ab;hb=e782294456d0877aa8fc05aa931291ac79808eb3;hpb=7618e65d62aa5231b9399d6e361e884c38f49285 diff --git a/source/testing/TestStep.cpp b/source/testing/TestStep.cpp index 5355024..84c577c 100644 --- a/source/testing/TestStep.cpp +++ b/source/testing/TestStep.cpp @@ -374,7 +374,7 @@ throw() { // Message if (TestManager::instantiate().getDumpHex()) { if (a_message.isEmpty()) { - msg = ""; + msg = "[empty]"; } else { msg = "\n"; msg += a_message.asString(); msg += "\n"; @@ -387,7 +387,7 @@ throw() { xmlmsg += "\n"; } else { - xmlmsg = ""; + xmlmsg = "[unable to decode, check traces]"; } if (msg != "") result->createAttribute("Message", msg); @@ -478,7 +478,7 @@ bool TestStepSendDiameterXml::do_execute() throw() { // Detailed log: if(a_originHost->logEnabled()) { if (decodeMessage(true /* trust */)) { - std::string detail = usedClientSession ? usedClientSession->asString() : ""; // shouldn't happen + std::string detail = usedClientSession ? usedClientSession->asString() : "[null client session]"; // shouldn't happen a_originHost->writeLogFile(*a_messageCodec, (success ? "sent2e" : "send2eError"), detail); } } @@ -512,7 +512,7 @@ bool TestStepSendDiameterXml::do_execute() throw() { // Detailed log: if(a_originHost->logEnabled()) { if (decodeMessage(true /* trust */)) { - std::string detail = usedServerSession ? usedServerSession->asString() : ""; // shouldn't happen + std::string detail = usedServerSession ? usedServerSession->asString() : "[null server session]"; // shouldn't happen a_originHost->writeLogFile(*a_messageCodec, (success ? "sent2c" : "send2cError"), detail); } } @@ -642,7 +642,7 @@ throw() { // Message if (TestManager::instantiate().getDumpHex()) { if (a_message.isEmpty()) { - msg = ""; + msg = "[empty]"; } else { msg = "\n"; msg += a_message.asString(); msg += "\n"; @@ -650,7 +650,7 @@ throw() { } if (a_message.isEmpty()) { - xmlmsg = ""; + xmlmsg = "[empty]"; } else { if (decodeMessage()) { @@ -659,7 +659,7 @@ throw() { xmlmsg += "\n"; } else { - xmlmsg = ""; + xmlmsg = "[unable to decode, check traces]"; } } @@ -713,7 +713,7 @@ throw() { anna::xml::Node* result = TestStep::asXML(parent); //parent->createChild("TestStepCmd"); - result->createAttribute("Script", (a_script != "") ? a_script:""); + result->createAttribute("Script", (a_script != "") ? a_script:"[no script]"); if (a_errorMsg != "") result->createAttribute("ErrorMessage", a_errorMsg); if (a_threadRunning) { if (a_childPid != -1) @@ -795,7 +795,7 @@ void TestStepCmd::do_reset() throw() { anna::xml::Node* TestStepIpLimit::asXML(anna::xml::Node* parent) throw() { anna::xml::Node* result = TestStep::asXML(parent); - std::string limit = (a_ipLimit != UINT_MAX) ? anna::functions::asString(a_ipLimit) : ""; + std::string limit = (a_ipLimit != UINT_MAX) ? anna::functions::asString(a_ipLimit) : "[no limit]"; result->createAttribute("IpLimit", limit); return result; @@ -809,7 +809,7 @@ bool TestStepIpLimit::do_execute() throw() { void TestStepIpLimit::do_complete() throw() { if (TestManager::instantiate().getDumpStdout()) { - std::string limit = (a_ipLimit != UINT_MAX) ? anna::functions::asString(a_ipLimit) : ""; + std::string limit = (a_ipLimit != UINT_MAX) ? anna::functions::asString(a_ipLimit) : "[no limit]"; std::cout << "Executed IpLimit Test Step (value = " << limit << ")" << std::endl; } }