このセクションの内容

前提条件

Jtest FindBugs 2.0.2、2.0.3、3.0 および 3.0.1 での静的解析をサポートしています。

FindBugs のダウンロードとインストール

  1. 次のウェブ サイトから FindBugs をダウンロードします。  
    http://findbugs.sourceforge.net/downloads.html
  2. FindBugs を展開し、インストールします。
  3. [INSTALL_DIR]/integration/findbugs ディレクトリにある configs、plugins、rules フォルダーをインストール ディレクトリにコピーします。
  4. jtestcli.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

FindBugs を使用したコードの解析


FindBugs ユーザー定義テスト コンフィギュレーションを指定して FindBugs での解析を実行します。

オプションのカスタマイズ

以下のプロパティを構成して FindBugs との統合をカスタマイズできます。

# 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

  • No labels