In this section:
Prerequisites
Jtest supports flow analysis with FindBugs 2.0.2, 2.0.3, 3.0 and 3.0.1.
Downloading and Installing FindBugs
- Download FindBugs from the following website: http://findbugs.sourceforge.net/down-loads.html.
- Unpack FindBugs to install.
- Copy the configs, plugins, and rules folders from the
[INSTALL_DIR]/integration/findbugs
directory into the installation directory Modify the
jtestcli.properties
file to include the following properties:jtest.analyzer.findbugs.enabled=true jtest.analyzer.findbugs.dir=FINDBUGS/INSTALLATION/DIRECTORY rules.provider_fb.analyzer=edu.umd.cs.findbugs rules.provider_fb.data=${jtest.home}/rules/fbrules.xml
Analyzing Code with FindBugs
Specify the FindBugs user test configurations to perform analysis with Findbugs:
user://FindBugs
- Enables every ruleuser://FindBugs Recommended
- Enables FindBugs recommended rules
Optional Customizations
You can customize your FindBugs integration by configuring the following properties:
# Custom limit for number of files to be tested in a single executed FindBugs process. Default is reasonably high. jtest.analyzer.findbugs.files.limit=1000 # Custom timeout (seconds) for the FindBugs process to start. Default is 5 seconds. / jtest.analyzer.findbugs.launch.timeout=5 # Custom timeout (seconds) for the FindBugs process to complete. Default is 360 seconds. / jtest.analyzer.findbugs.timeout=360 # Custom launch file for FindBugs process. Default is taken from the FindBugs analyzer jar file. # If one cannot be found, attempts to use file 'findbugs.ini' from current working directory. jtest.analyzer.findbugs.launch.file=CUSTOM/LAUNCH/FILE