码迷,mamicode.com
首页 > 其他好文 > 详细

Software Testing soot —— 软件测试soot安装及使用

时间:2017-04-13 00:59:09      阅读:1034      评论:0      收藏:0      [点我收藏+]

标签:stl   and   java   call   command   cond   ima   png   pre   

Well, I try to install soot in Eclipse through "help -> install...", but when I finish it, I can not find "soot" on the right click of project.

So, I use soot in command line. 

Firstly, put soot-trunk.jar under bin. And run soot. 

java -cp soot-trunk.jar soot.tools.CFGViewer --soot-classpath .;"%JAVA_HOME%"\jre\lib\rt.jar homeWork.homeWork

Tipes: The first one is package name, and the second one is class name.

技术分享

Then, open the file. There is a new file called "sootOutput".

技术分享

As we can see, A new document is created in sootOutput.

技术分享

Open the document, it is difficult for us to read clearly.

技术分享

Thus, install graphviz. Use graphviz dot to switch a document to a picture. Before that, we should config environment.

技术分享

The name of the document is too long, so I change the name.

技术分享

Run graphviz dot.

dot -Tpng -o homeWork.png homeWork.dot

Give the name of the picture and the last one is the name of your document.

技术分享

Result.

技术分享

技术分享

 

Software Testing soot —— 软件测试soot安装及使用

标签:stl   and   java   call   command   cond   ima   png   pre   

原文地址:http://www.cnblogs.com/Danning1996/p/6701692.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!