Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Debugging TTCN
Debugging TTCN [message #1718866] Thu, 31 December 2015 10:40 Go to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi,

We're running a huge TTCN Script with our SUT.
After running for a while, the Test Executable throws Unexpected Message error.
We're unable to find out what message is it expecting.

What are the ways we can debug the TTCN script (Putting breakpoints, stepping in the code, etc).
We tried to compile the generated source and the Titan source with '-g' option and tried to put breakpoints in Test Executable with gdb but the breakpoints don't hit.
Also putting print statements is too tedious and difficult to debug. I'm attaching the run log of the script.

Please suggest ways to debug.

Thanks
Murli
  • Attachment: logs.tgz
    (Size: 22.55KB, Downloaded 142 times)
Re: Debugging TTCN [message #1718879 is a reply to message #1718866] Thu, 31 December 2015 14:13 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

first of all, I understand you managed to make your test suite working; congratulations are on order; well done.

About debugging: we are working on a debugger , but that will not be ready anytime soon.

However , in our experience, with the rarest exception, the Titan logging should offer the user sufficient information to debug problematic test cases.


What can be seen from your logs is that an unexpected message is received on port U_TM which is caught by the default altstep a_UTRAN_StandardDefault
defined in UTRAN_Components.ttcn:


altstep a_UTRAN_StandardDefault() runs on UTRAN_PTC
  {
  
  :
  :
  
    [not vc_UTRAN_Global.Ctrl.DefaultCtrl.U_TM_Blocked] U_TM.receive (cr_RLC_TR_DATA_IND_Any) { // @sic R5s120098 R5s120086 sic@
      all timer.stop;
      f_UTRAN_SetVerdictFailOrInconc(__FILE__, __LINE__, "unexpected receive event at U_TM port");
    }



the received message matches the template cr_RLC_TR_DATA_IND_Any;

However , from the log the code execution flow is not visible, and this is because some essential logging functions remained deactivated:

15:21:06.215331 TTCN Logger v2.2 options: TimeStampFormat:=Time; LogEntityName:=No; LogEventTypes:=No; SourceInfoFormat:=None; *.FileMask:=LOG_ALL; *.ConsoleMask:=LOG_ALL; LogFileSize:=0; LogFileNumber:=1; DiskFullAction:=Error 



As a first step I would suggest the following:
-Activate LogEntityName, LogEventTypes, SourceInfoFormat

by setting

SourceInfoFormat:= Single //or Stack
LogEntityName:= Yes
LogEventTypes:= Yes

in the [LOGGING] section in the .cfg file; SourceInfoFormat activated will add filename/line info to the log , so it will be easier to trace the evolution of events


-also , LOG_ALL is set, but that does not cover DEBUG and MATCHING ; please add those flags too for some extra information

Detailed information about logging configuration can be found in reference guide 7.1 [LOGGING]

- I would definitely discourage you to try to trace by adding print instructions to C++ code or debugging the C++ code; I don't think that's practical; adding log statements to TTCN-3 code will bring in the information that might not be revealed by logging


In general, every kind of debugging will require and amount of understanding of the test suite, and debugging will not answer the question of what message is expected; this should be answered by the TTCN-3 code itself.


I hope this will help; if you set the logging config as above and the log file still does not answer your questions, pls. send them to me and I'll try to take a look.


Best regards

Elemer



Previous Topic:Testing SUT written in JAVA/C++
Next Topic:Connecting TTCN-3 and Titan to SQL databases
Goto Forum:
  


Current Time: Fri Sep 20 05:02:21 GMT 2024

Powered by FUDForum. Page generated in 0.03423 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top