JaBUTi command line
De Software testing
Concepts
- JaBUTi-CLI is a set of scripts that provides a command line interface to use JaBUTi.
Facts
- The configuration of the JaBUTi-CLI is defined in a .jbt file. This file is a shell script that provides the following information as variables:
- JABUTI_HOME: Directory where JaBUTi is installed.
- ORIG_DIR: Directory with the original classes of the software under testing.
- TEST_SCRIPT: The build.xml (Ant build file) that contains the targets the run the test cases.
- TEST_SCRIPT_OUT: Directory where the outputs from the execution of the test cases are saved to.
- TEST_EXEC_CMD: Tha target that run the test cases.
- SPAGO_DIR: Directory where the SPAGO4Q xml file will be saved to.
- SPAGO_ID: The project ID, in the SPAGO4Q, of the software under testing.
- The configuration of the JaBUTi-CLI can define the following optional variables:
- ORIG_JAR: Jar package with original classes.
- INSTRUM_JAR: Jar package name that will be generated by instrumentation.
- Each script of the JaBUTi-CLI has to receive a "-cfg" argument that corresponds to the configuration file (e.g., "jabuti-instrument -cfg example.jbt").
- There are 4 scripts that have to be executed in the following order: jabuti-initialize, jabuti-instrument, jabuti-execute, jabuti-consolidate.
Procedure
- Test an application
- Analyze the application to be tested and gather the following information:
- Directory that contains the compiled classes or the filename of the package with the compiled classes.
- Dependencies of the application (usually Jar packages stored in the lib directory).
- Directory that contains the test cases.
- Scrips and commands required to run the test cases.
- Instrument the application's classes using
jabuti-cli -cfg project.cfg -action instrument
. - Execute the test cases using
jabuti-cli -cfg project.cfg -action execute
. - Analyze the trace files (generated by the instrumented classes when running the test cases) and create a test report of the coverage and metrics of the application under testing. Use the command
jabuti-cli -cfg project.cfg -action report
.
- Analyze the application to be tested and gather the following information: