2007-03-23 22:54:02 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-04-05 03:42:53 +08:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2007-03-23 22:54:02 +08:00
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2014-05-16 00:22:53 +08:00
|
|
|
<!ENTITY junit-download-http "https://launchpad.net/debian/+archive/primary/+files/junit4_&junit-version;.orig.tar.gz">
|
2007-03-23 22:54:02 +08:00
|
|
|
<!ENTITY junit-download-ftp " ">
|
2013-07-18 03:45:57 +08:00
|
|
|
<!ENTITY junit-md5sum "b4d163832583dcec8bedb5427c795cc4">
|
2012-05-08 03:30:09 +08:00
|
|
|
<!ENTITY junit-size "1.7 MB">
|
2013-07-18 03:45:57 +08:00
|
|
|
<!ENTITY junit-buildsize "34 MB">
|
|
|
|
<!ENTITY junit-time "0.1 SBU">
|
2007-03-23 22:54:02 +08:00
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="junit" xreflabel="JUnit-&junit-version;">
|
|
|
|
<?dbhtml filename="junit.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>JUnit-&junit-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="junit">
|
|
|
|
<primary sortas="a-JUnit">JUnit</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to JUnit</title>
|
|
|
|
|
2014-12-15 23:13:32 +08:00
|
|
|
<para>
|
|
|
|
The <application>JUnit</application> 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.
|
|
|
|
</para>
|
2007-03-23 22:54:02 +08:00
|
|
|
|
2017-08-27 00:42:24 +08:00
|
|
|
&lfs81_checked;
|
2010-11-12 22:14:59 +08:00
|
|
|
|
2007-03-23 22:54:02 +08:00
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Download (HTTP): <ulink url="&junit-download-http;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download (FTP): <ulink url="&junit-download-ftp;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download MD5 sum: &junit-md5sum;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download size: &junit-size;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated disk space required: &junit-buildsize;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated build time: &junit-time;</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2013-07-18 03:45:57 +08:00
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
2013-07-17 22:09:25 +08:00
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2015-11-13 22:24:57 +08:00
|
|
|
Required file: <ulink
|
2016-10-31 06:46:49 +08:00
|
|
|
url="http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/&hamcrest-version;/hamcrest-core-&hamcrest-version;.jar"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Required file: <ulink
|
|
|
|
url="http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/&hamcrest-version;/hamcrest-core-&hamcrest-version;-sources.jar"/>
|
2013-07-17 22:09:25 +08:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2015-11-13 22:24:57 +08:00
|
|
|
|
2007-03-23 22:54:02 +08:00
|
|
|
<bridgehead renderas="sect3">JUnit Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
2013-07-17 22:09:25 +08:00
|
|
|
<para role="required">
|
2013-07-18 03:45:57 +08:00
|
|
|
<xref linkend="apache-ant"/> and
|
2013-07-17 22:09:25 +08:00
|
|
|
<xref linkend="unzip"/>
|
|
|
|
</para>
|
2007-03-23 22:54:02 +08:00
|
|
|
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
|
|
<ulink url="&blfs-wiki;/junit"/></para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of JUnit</title>
|
|
|
|
|
2014-12-15 23:13:32 +08:00
|
|
|
<para>
|
|
|
|
The <command>javadoc</command> command coming with OpenJDK 8 has become
|
|
|
|
much stricter than before regarding the conformance of the Javadoc
|
|
|
|
comments in source code to HTML. The <application>Junit</application>
|
2015-04-02 22:08:01 +08:00
|
|
|
documentation does not meet that standard, so the conformance checks
|
2014-12-15 23:13:32 +08:00
|
|
|
have to be disabled. This can be done with the following command:
|
|
|
|
</para>
|
2007-03-23 22:54:02 +08:00
|
|
|
|
2014-12-23 22:23:50 +08:00
|
|
|
<screen><userinput>sed -i '\@/docs/@a<arg value="-Xdoclint:none"/>' build.xml</userinput></screen>
|
2013-07-18 03:45:57 +08:00
|
|
|
|
2014-12-15 23:13:32 +08:00
|
|
|
<para>
|
|
|
|
Now place the required hamcrest jar files where needed and build the
|
|
|
|
package:
|
|
|
|
</para>
|
2013-07-18 03:45:57 +08:00
|
|
|
|
2016-10-31 06:46:49 +08:00
|
|
|
<screen><userinput>cp -v ../hamcrest-core-&hamcrest-version;{,-sources}.jar lib/ &&
|
2014-12-15 23:13:32 +08:00
|
|
|
ant populate-dist</userinput></screen>
|
2013-07-17 22:09:25 +08:00
|
|
|
|
2014-12-15 23:13:32 +08:00
|
|
|
<para>
|
|
|
|
Test the package by issuing <command>ant dist</command>. One test fails
|
|
|
|
for unknown reason.
|
|
|
|
</para>
|
2013-07-18 03:45:57 +08:00
|
|
|
|
2014-12-15 23:13:32 +08:00
|
|
|
<para>
|
|
|
|
Install the files in the final location as the
|
|
|
|
<systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
2015-11-13 22:24:57 +08:00
|
|
|
|
2013-07-18 03:45:57 +08:00
|
|
|
<screen role="root"><userinput>install -v -m755 -d /usr/share/{doc,java}/junit-&junit-version; &&
|
|
|
|
chown -R root:root . &&
|
|
|
|
|
|
|
|
cp -v -R junit*/javadoc/* /usr/share/doc/junit-&junit-version; &&
|
|
|
|
cp -v junit*/junit*.jar /usr/share/java/junit-&junit-version; &&
|
2014-05-16 00:22:53 +08:00
|
|
|
cp -v hamcrest-&hamcrest-version;/hamcrest-core*.jar /usr/share/java/junit-&junit-version;</userinput></screen>
|
2015-11-13 22:24:57 +08:00
|
|
|
|
2014-12-15 23:13:32 +08:00
|
|
|
<para>
|
2015-03-05 06:17:44 +08:00
|
|
|
If you have followed the instructions in <xref linkend="ojdk-conf"/>,
|
|
|
|
there is nothing more to do: the <envar>CLASSPATH</envar> variable
|
2016-01-17 02:11:06 +08:00
|
|
|
would be automatically updated.
|
2014-12-15 23:13:32 +08:00
|
|
|
</para>
|
2013-07-17 22:09:25 +08:00
|
|
|
|
2007-03-23 22:54:02 +08:00
|
|
|
</sect2>
|
2013-07-18 03:45:57 +08:00
|
|
|
|
2007-03-23 22:54:02 +08:00
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
2014-12-15 23:13:32 +08:00
|
|
|
<segtitle>Installed Libraries</segtitle>
|
2007-03-23 22:54:02 +08:00
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>None</seg>
|
2013-07-18 03:45:57 +08:00
|
|
|
<seg>hamcrest-core and junit jar files</seg>
|
|
|
|
<seg>/usr/share/doc/junit-&junit-version; and
|
|
|
|
/usr/share/java/junit-&junit-version;</seg>
|
2007-03-23 22:54:02 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="junit.jar">
|
2013-07-18 03:45:57 +08:00
|
|
|
<term><filename class='libraryfile'>junit jar files</filename></term>
|
2007-03-23 22:54:02 +08:00
|
|
|
<listitem>
|
|
|
|
<para>contains java classes to support the xUnit framework testing
|
|
|
|
architecture.</para>
|
|
|
|
<indexterm zone="junit junit.jar">
|
|
|
|
<primary sortas="c-junit.jar">junit-&junit-version;.jar</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2013-07-18 03:45:57 +08:00
|
|
|
|
2007-03-23 22:54:02 +08:00
|
|
|
</sect1>
|