JUnit の概要

The JUnit package contains a simple, open source framework to write and run repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. JUnit features include assertions for testing expected results, test fixtures for sharing common test data, and test runners for running tests.

本パッケージは LFS-8.0 において正しくビルドでき動作することが確認されています。


Additional Downloads

JUnit の依存パッケージ


apache-ant-1.10.1, UnZip-6.0

ユーザー情報: http://wiki.linuxfromscratch.org/blfs/wiki/junit

JUnit のインストール

The javadoc command coming with OpenJDK 8 has become much stricter than before regarding the conformance of the Javadoc comments in source code to HTML. The Junit documentation does not meet that standard, so the conformance checks have to be disabled. This can be done with the following command:

sed -i '\@/docs/@a<arg value="-Xdoclint:none"/>' build.xml

Now place the required hamcrest jar files where needed and build the package:

cp -v ../hamcrest-core-1.3{,-sources}.jar lib/ &&
ant populate-dist

Test the package by issuing ant dist. One test fails for unknown reason.

Install the files in the final location as the root user:

install -v -m755 -d /usr/share/{doc,java}/junit-4.11 &&
chown -R root:root .                                 &&

cp -v -R junit*/javadoc/*             /usr/share/doc/junit-4.11  &&
cp -v junit*/junit*.jar               /usr/share/java/junit-4.11 &&
cp -v hamcrest-1.3/hamcrest-core*.jar /usr/share/java/junit-4.11

If you have followed the instructions in Configuring the JAVA environment, there is nothing more to do: the CLASSPATH variable would be automatically updated.


インストールプログラム: なし
インストールライブラリ: hamcrest-core, junit jar ファイル
インストールディレクトリ: /usr/share/doc/junit-4.11, /usr/share/java/junit-4.11


junit jar files

xUnit フレームワークによるテスト機構をサポートする Java クラスを提供します。

最終更新日: 2017-02-22 07:52:57 +0900