Welcome
Welcome to mbttigrisorg

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Debug command for Java statements in model

If you need something you believe mbt.tigris.org is missing. This is the place to post that feature request.

Debug command for Java statements in model

Postby aandelkovic on Thu Jun 11, 2009 4:24 pm

It would be nice to be able to have a debug command for Java statements used in models.
aandelkovic
 
Posts: 1
Joined: Thu Jun 11, 2009 11:18 am

Re: Debug command for Java statements in model

Postby KristianKarl on Fri Jun 12, 2009 2:50 pm

In a way, it already exists in mbt today. For example, when running the model Example 2 at http://mbt.tigris.org/simple_example_models.html using the command:
Code: Select all
java -jar mbt-2.2-beta6.jar offline -x -g A_STAR -s EDGE_COVERAGE:100 -f model/UC01.graphml
e_init
v_BrowserStopped/num_of_books=0;MAX_BOOKS=5;
e_StartBrowser
v_BrowserStarted/num_of_books=0;MAX_BOOKS=5;
e_EnterBaseURL
v_BaseURL/num_of_books=0;MAX_BOOKS=5;
e_SearchBook
v_SearchResult/num_of_books=0;MAX_BOOKS=5;
e_ClickBook
v_BookInformation/num_of_books=0;MAX_BOOKS=5;
e_AddBookToCart
v_OtherBoughtBooks/num_of_books=1;MAX_BOOKS=5;
e_SearchBook
v_SearchResult/num_of_books=1;MAX_BOOKS=5;
e_ClickBook
v_BookInformation/num_of_books=1;MAX_BOOKS=5;
e_AddBookToCart
v_OtherBoughtBooks/num_of_books=2;MAX_BOOKS=5;
e_ShoppingCart
v_ShoppingCart/num_of_books=2;MAX_BOOKS=5;
e_SearchBook
v_SearchResult/num_of_books=2;MAX_BOOKS=5;
e_ShoppingCart
v_ShoppingCart/num_of_books=2;MAX_BOOKS=5;
e_SearchBook
v_SearchResult/num_of_books=2;MAX_BOOKS=5;
e_ClickBook
v_BookInformation/num_of_books=2;MAX_BOOKS=5;
e_SearchBook
v_SearchResult/num_of_books=2;MAX_BOOKS=5;
e_ClickBook
v_BookInformation/num_of_books=2;MAX_BOOKS=5;
e_ShoppingCart
v_ShoppingCart/num_of_books=2;MAX_BOOKS=5;

As you can see, you can follow which variables are instantiated, when, and which values they are holding. This is however not entirely true, since only primitives and string are printed in a way that makes sense. More advanced objects or arrays are not printed correctly.

The question is how a good debugger is designed for MBT. I'm not sure how this should be done. Better, perhaps, is to improve the logging?
KristianKarl
Site Admin
 
Posts: 38
Joined: Fri May 15, 2009 1:07 pm


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron