Git Product home page Git Product logo

microbat-test's Introduction

Microbat Debugger

A feedback-based debugger for interactively recommending suspicious step in buggy program execution.

Snapshot of Microbat

Microbat is a feedback-based debugger which aims to locate bugs by interactively recommending suspicious program steps with developers' feedback. Given a buggy program, Microbat records its execution trace and allow developers to make light-weight feedback on trace steps, such as correct-step, wrong-variable-value, wrong-path, and unclear. Microbat reasons and analyzes the feedback along with program information to recommend a suspicious step for further inspection and feedback. Such a debugging process continues until the bug is found. A short demonstration of Microbat is available in http://linyun.info/microbat/index.html.

Feedback Type

We support four types of feedback, i.e., correct-step, wrong-variable-value, wrong-path, and unclear. Based on these types of feedback, we iteratively and interactively recommend suspicious steps on recoreded trace.

Evaluation

Our evaluation on Microbat shows promising results. The detailed evaluation results can be checked at http://linyun.info/microbat/index.html

Citation

If you need to reference our technique, please use the following citations:

  • Yun Lin, Jun Sun, Yinxing Xue, Yang Liu, and Jinsong Dong. Feedback-based Debugging. The 39th ACM SIGSOFT International Conference on Software Engineering (ICSE 2017), pp. 393-403.
  • Yun Lin, Jun Sun, Lyly Tran, Guangdong Bai, Haijun Wang, and Jinsong Dong. Break the Dead End of Dynamic Slicing: Localizing Data and Control Omission Bug. The 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE 2018), pp. 509-519.

Installation

Our debugger can be divided into two parts: trace collector and the bug inference engine. Two parts are presented in terms of an Eclipse plugin.

  1. When you clone the git repository, please make sure that the local path of the repository does not include Chinese characters (otherwise you may fail to use microbat to debug your project). After you clone the git repository, you need to load the microbat repository into eclipse (as the tool is manifested by Eclipse plugin). We recommend that the user should import the project through "Git perspective".

  1. Given our trace collector is implemented through Java instrumentation technique, the user need to run microbat.tools.JarPackageTool. Please modify the DEPLOY_DIR by your $eclipse_root_folder\dropins\junit_lib\. (Note: there is a "\" at the end of your path.) After running the code, you will generate an instrumentator.jar under the DEPLOY_DIR folder. More details can be refer to https://github.com/llmhyy/microbat/wiki/Compile-Runtime-Agent.

  2. Remember to replace the instrumentaor.jar in the lib folder under microbat project.

4. Make sure that you have downloaded java17 specificly and do not use the java17 that is automatically installed with Eclipse. First click " Windows >> Preferences >> Java >> Installed JREs >> Add >> standard VM >> Next ", and add the java17 you installed in "JRE Definition" window. After that, deselect the automatically installed java17 and select the one you installed and added. When all these are done, apply the changes.

  1. You may run the code as an Eclipse Application then.

Run with Java main() method

  • In the running Eclipse Application, specify the configuration in Perspective>>Microbat Debugging. Here, you need to specify (1) which eclipse project you are going to debug; (2) where is the JDK library for running your Java program; (3) Step Limit (e.g., 10000); (4) Variable Layer (e.g., 2); and (5) Lanuch Class. Lanuch class is supposed to be the class containing main() method. Alternatively, you can also speicify a Junit test case.

- Then, you can click the Microbat (in Eclipse Menu) >> Start Debug. The hierarhical trace will be generated and you can provide the feedback for debugging then.

Run with test method

Alternatively, we also support users (i.e., programmers) to run Microbat with JUnit4, JUnit5 and TestNG test cases. In this case, we need to package the project of "microbat_test_runner" and export it as a jar file "testrunner.jar". Moreover, we provide five jar files, i.e., junit.jar, org.hamcrest.core.jar, junit-platform-console-standalone-1.0.0.jar, testng-6.0.jar and junit-platform-runner-1.0.0.jar.

Place the testrunner.jar, the five jar files in junit_lib mentioned above into the path eclipse_root_folder\dropins\junit_lib\

We can use the following configuration to have the trace of a test method.

microbat-test's People

Contributors

llmhyy avatar lylytran avatar dingyuchen avatar bchenghi avatar alicializxu avatar griffinw-guanjie avatar sianghwee avatar songxuezhi avatar nime-sha256 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.