I am using Rhapsody 18.104.22.168 . I created a class having a statechart in it with two states.
Then i created test architecture on this class.
I am not able to get code coverage for the statechart, and when i am debugging the project the control goes to the states. For reference i am attaching my sample project here.
I want to get coverage for lines of code written in the statechart.
Could anyone tell me how can i solve this problem. ?
Thanks in Advance
This topic has been locked.
4 replies Latest Post - 2013-01-04T05:38:38Z by RichaM
Pinned topic Code Coverage Problem
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-04T05:38:38Z at 2013-01-04T05:38:38Z by RichaM
RichaM 270002DMXT70 PostsACCEPTED ANSWER
Re: Code Coverage Problem2012-12-28T06:18:28Z in response to Love_k1I want to add to this query .Even I am facing the same issue.
Enviroment - MSVC9
Assertion based testing in testconductor.
Whenever i fire an event from my test application which is being processed by Statechart of SUT,it is getting processed and our test case also passes
But in code coverage, processEvent is not getting covered.
pathfinder_hartmut 270002HYND49 Posts
pathfinder_hartmut 270002HYND49 PostsACCEPTED ANSWER
Re: Code Coverage Problem2013-01-03T12:57:24Z in response to pathfinder_hartmutHi again,
@love_k1 I can't find any statechart in your attached model. Possibly, you attached the wrong model?
@RichaM it is sometimes necessary to introduce additional time intervals at TestComponentInstances' life line in order to ensure, that the application isn't terminated before relevant parts of the behavior could be observed. E.g. if you only trigger the SUT with, say, evA() and evB(), then TestConductor will terminate the application after these events have been sent, regardless of SUT processing them. If you want the SUT to process these events (and, hence, rootState_processEvent() to be covered, then it will delay termination if you add a time interval with for example '>1sec' to the driving instance in the sequence diagram after sending the second event.