Botsing is a Java framework for crash reproduction. It relies on EvoSuite for code instrumentation.
See the documentation for the Maven Plugin.
The latest version of Botsing command line (botsing-preprocessing-X-X-X.jar) is available at https://github.com/STAMP-project/botsing/releases.
Botsing preprocessing has these mandatory parameters (key/value):
-i
represents the input file path (crash_log
) with the stack trace to clean. For example-i=path-name-of-crash-log
-o
represents the output file path (output_log
) cleaned of the error message and/or nested exceptions. For example-o=path-name-of-output-log
The actions to perform (clean) in the input log file are:
-f
to flatten the stack trace. This action needs to use-p
parameter (key/value) to set the package has frames pointing to the software under test (as regexp). For example-p=my.package.*
.-e
to remove the error message. For example-e
.
To clean the nested stack trace:
java -jar botsing-preprocessing.jar -i=crash_log.txt -o=output_log.log -f -p=com.example.*
or to remove the error message in the log file
java -jar botsing-preprocessing.jar -e -i=crash_log.txt -o==output_log.log
Note that you can use also both actions (-f
and -e
).
The latest version of Botsing command line (botsing-reproduction-X-X-X.jar) is available at https://github.com/STAMP-project/botsing/releases.
Botsing has three mandatory parameters:
-crash_log
the file with the stack trace. The stack trace should be clean (no error message) and cannot contain any nested exceptions.-target_frame
the target frame to reproduce. This number should be between 1 and the number of frames in the stack trace.-project_cp
the classpath of the project and all its dependencies. The classpath can be a folder containing all the.jar
files required to run the software under test.
By default, Botsing uses the following parameter values:
-Dsearch_budget=1800
, a time budget of 30 min. This value can be modified by specifying an additional parameter in format-Dsearch_budget=60
(here, for 60 seconds).-Dpopulation=100
, a default population with 100 individuals. This value may be modified using-Dpopulation=10
(here, for 10 individuals).-Dtest_dir=crash-reproduction-tests
, the output directory where the tests will be created (if any test is generated). This value may be modified using-Dtest_dir=newoutputdir
.
To check the list of options, use:
$ java -jar botsing-reproduction.jar -help
usage: java -jar botsing-reproduction.jar -crash_log stacktrace.log -target_frame 2
-project_cp dep1.jar;dep2.jar )
-crash_log <arg> File with the stack trace
-D <property=value> use value for given property
-help Prints this help message.
-project_cp <arg> classpath of the project under test and all its
dependencies
-target_frame <arg> Level of the target frame
java -jar botsing-reproduction.jar -crash_log LANG-1b.log -target_frame 2 -project_cp ~/bin
Botsing is licensed under Apache-2.0, pull request as are welcome.
The coding style is described in checkstyle.xml
. Please (successfully) run the command mvn checkstyle:check
before submitting a pull request.
Currently, Botsing using a customized version of the EvoSuite-client. Hence, the building process contains two steps: 1- Installing the customized version of EvoSuite-client:
mvn install:install-file -Dfile=botsing-reproduction/evosuite-client-botsing-1.0.7.jar -DgroupId=org.evosuite -DartifactId=evosuite-client-botsing -Dversion=1.0.7 -Dpackaging=jar
2- Build the Botsing project:
mvn package
Dependencies are managed at the module level. Each module declares a list of Maven dependencies, if you want to add one, simply add it to the list (see for instance botsing-reproduction/pom.xml
). However, dependency version must be declared as a property in the parent pom.xml
file using the following syntax:
<properties>
...
<!-- Dependencies versions -->
<!-- To ensure a proper management of dependencies, all versions have to be declared here -->
<depdencendy-artifactId.version>1.1.1</depdencendy-artifactId.version>
...
</properties>
And referenced in the dependencies of the module using the following syntax:
<dependencies>
<dependency>
<groupId>com.groupId</groupId>
<artifactId>depdencendy-artifactId</artifactId>
<version>${depdencendy-artifactId.version}</version>
</dependency>
</dependencies>
Please check in the list of properties that the dependency version is not already there before adding a new one.
Botsing (Dutch for 'crash') is a complete re-implementation of the crash replication tool EvoCrash (github). Whereas EvoCrash was a full clone of EvoSuite (making it hard to update EvoCrash as EvoSuite evolves), Botsing relies on EvoSuite as a (maven) dependency only. Furthermore, it comes with an extensive test suite, making it easier to extend. The license adopted is Apache, in order to facilitate adoption in industry and academia.
The underlying evolutionary algorithm and fitness function are described in:
-
Mozhan Soltani, Annibale Panichella, and Arie van Deursen. Search-Based Crash Reproduction and Its Impact on Debugging. IEEE Transactions on Software Engineering, 2018. (DOI, preprint)
-
Mozhan Soltani, Pouria Derakhshanfar, Annibale Panichella, Xavier Devroey, Andy Zaidman, and Arie van Deursen. Single-objective versus Multi-Objectivized Optimization for Evolutionary Crash Reproduction. In Colanzi and McMinn, editors, Search-Based Software Engineering - 10th International Symposium, SSBSE 2018 - Proceedings. Lecture Notes in Computer Science, Springer. 2018. p. 325-340. (DOI, preprint).
Botsing is partially funded by research project STAMP (European Commission - H2020) ICT-16-10 No.731529.