Skip to content

Latest commit

 

History

History
99 lines (70 loc) · 3.7 KB

README.md

File metadata and controls

99 lines (70 loc) · 3.7 KB

JaBUTi4Run?

Gittip

JaBUTi4Run is a project for just to manipulate the JaBUTi .jar for run it and some examples

Project at GitHub

Requirements

  • Java 1.6 or above to run
  • BCEL 5.2 (Byte Code Enginnering Library)
  • CAPI 1.0 (Curve API)
  • Mucode (Java API for mobile agent systems)
  • JUnit <=4.4 (Framework for writing and running automated tests)
  • GraphViz <= 2.20.x

Requirements for system under testing (SUT)

  • Java 1.6 or below

    The library we use to manipulate Java bytecode is not completely compatible with Java 7.0 and above. We could still test when using the option "-XX:-SplitVerifier", but this option is ignored by recent Java 7 and 8 virtual machines. Thus, the only safe choice is to use an application compiled to Java 1.6 or below.

How do I start?

  1. Access here and dowload the project;
  2. Unzip in some directory of your choise;
  3. Run the JaBUTi 👍.

Follow the tips and the step-by-step below.

Tips

Here's some examples how to execute the JaBUTi.

You can run JaBUTi by typing

java -cp jabuti.jar br.jabuti.gui.JabutiGUI

Or runnning

run.sh

To execute a test case

java -cp jabuti.jar br.jabuti.probe.ProberLoader -p <project name> <class to execute> [execution parameters]

To instrument and store it instrumented

java -cp jabuti.jar br.jabuti.probe.ProberInstrum -o <file.jar> -p <project name> <class to execute>

Once instrumented, to execute a test case

java -cp <file.jar> <class to execute> [execution parameters]

Step-by-step

  1. Run JaBUTi
  2. If is the first time
  3. Click in File ▶️ Open Class
  4. Put the class (binary - .class) which will be test
  5. In classpath put the source path of the class file (without package name). * For example:
    • ../src 👍 (It's ok!)
    • ../src/paper 🚫 (It's wrong!)
  6. Click in "OK"
  7. It will open the Project Manager window
  8. Select in User Packager the class which will be test (The classpath needs be correct to appear the class file)
  9. Click in ⏩ (second button) to select the class to instrument
  10. Click in Select and give a name for the project
  11. Click in "OK"
  12. Click in File ▶️ Save Instrumented Classes and after click in Yes, if the class there is a main method, otherwise No and next "OK".
  13. Click in Teste Case ▶️ Executing JUnit Test Set
  14. Put in Path to JUnit test suite source code the test path (java file - whithout package name)
  15. Put in Path to JUnit test suite binary code the test path (binary file - whithout package name)
  16. Put in Test suite full qualified name the test file name (whithout extension and with package name)
  17. Put in JaBUTi's library the JaBUTi's jar
  18. Check the javac path if is correct
  19. Click in Compile Test Case and check if the .class file was generated
  20. Click in Run Normally (no trace) - This action will check and execute the test cases
  21. Click in Run Collecting Trace Information - This action will enable a red button in the JaBUTi and this is because we need update the JaBUTi informations
  22. Close the test case window
  23. Click in Update ▶️ Update
  24. Check the coverage in Summary choosing the scope of coverage
  25. Click in Reports ▶️ Custom Reports and give a name for the report file

For more informations access here and dowload the manual