[2876fbf] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[2876fbf] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[fce275e] | 7 | <!ENTITY junit-download-http "&sourceforge-repo;/junit/junit&junit-version;.zip">
|
---|
[2876fbf] | 8 | <!ENTITY junit-download-ftp " ">
|
---|
[aad5d54] | 9 | <!ENTITY junit-md5sum "86aae1041d5f36ab9b2fd7f53fb531c6">
|
---|
| 10 | <!ENTITY junit-size "1.6 MB">
|
---|
| 11 | <!ENTITY junit-buildsize "15 MB">
|
---|
[2876fbf] | 12 | <!ENTITY junit-time "less than 0.1 SBU">
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="junit" xreflabel="JUnit-&junit-version;">
|
---|
| 16 | <?dbhtml filename="junit.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>JUnit-&junit-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="junit">
|
---|
| 26 | <primary sortas="a-JUnit">JUnit</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to JUnit</title>
|
---|
| 31 |
|
---|
| 32 | <para>The <application>JUnit</application> package contains a simple, open
|
---|
| 33 | source framework to write and run repeatable tests. It is an instance of
|
---|
| 34 | the xUnit architecture for unit testing frameworks. JUnit features include
|
---|
| 35 | assertions for testing expected results, test fixtures for sharing common
|
---|
| 36 | test data, and test runners for running tests.</para>
|
---|
| 37 |
|
---|
[480ea81] | 38 | <para>&lfssvn_checked;20101029&lfssvn_checked2;</para>
|
---|
| 39 |
|
---|
[2876fbf] | 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>Download (HTTP): <ulink url="&junit-download-http;"/></para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>Download (FTP): <ulink url="&junit-download-ftp;"/></para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download MD5 sum: &junit-md5sum;</para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download size: &junit-size;</para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Estimated disk space required: &junit-buildsize;</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Estimated build time: &junit-time;</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | </itemizedlist>
|
---|
| 61 |
|
---|
| 62 | <bridgehead renderas="sect3">JUnit Dependencies</bridgehead>
|
---|
| 63 |
|
---|
| 64 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 65 | <para role="required"><xref linkend="unzip"/></para>
|
---|
| 66 |
|
---|
| 67 | <para condition="html" role="usernotes">User Notes:
|
---|
| 68 | <ulink url="&blfs-wiki;/junit"/></para>
|
---|
| 69 |
|
---|
| 70 | </sect2>
|
---|
| 71 |
|
---|
| 72 | <sect2 role="installation">
|
---|
| 73 | <title>Installation of JUnit</title>
|
---|
| 74 |
|
---|
| 75 | <para>Install <application>JUnit</application> by running the following
|
---|
| 76 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 77 |
|
---|
| 78 | <screen role="root"><userinput>install -v -m755 -d /usr/share/{,doc/}junit-&junit-version; &&
|
---|
| 79 | chown -R root:root . &&
|
---|
[f9950ee] | 80 | cp -v -R junit* org /usr/share/junit-&junit-version; &&
|
---|
| 81 | cp -v -R *.html *doc /usr/share/doc/junit-&junit-version;</userinput></screen>
|
---|
[2876fbf] | 82 |
|
---|
| 83 | <para>Add the <filename
|
---|
| 84 | class='libraryfile'>junit-&junit-version;.jar</filename> and <filename
|
---|
| 85 | class='directory'>/usr/share/junit-&junit-version;</filename> directory to
|
---|
[895826e] | 86 | your system <envar>CLASSPATH</envar> environment variable:</para>
|
---|
[2876fbf] | 87 |
|
---|
| 88 | <screen><userinput>export CLASSPATH=$CLASSPATH:\
|
---|
| 89 | /usr/share/junit-&junit-version;/junit-&junit-version;.jar:/usr/share/junit-&junit-version;</userinput></screen>
|
---|
| 90 |
|
---|
| 91 | <para>To run the <application>JUnit</application> regression self-tests,
|
---|
[b66ece35] | 92 | you'll need to have <xref linkend="icedtea6"/>, <xref linkend="jdk"/>, or
|
---|
| 93 | <ulink url="http://jikes.sourceforge.net/">Jikes</ulink> installed and the
|
---|
[2876fbf] | 94 | <envar>CLASSPATH</envar> environment variable updated. Then, as an
|
---|
| 95 | unprivileged user, issue:</para>
|
---|
| 96 |
|
---|
| 97 | <screen><userinput>java org.junit.runner.JUnitCore org.junit.tests.AllTests</userinput></screen>
|
---|
| 98 |
|
---|
| 99 | </sect2>
|
---|
| 100 |
|
---|
| 101 | <sect2 role="content">
|
---|
| 102 | <title>Contents</title>
|
---|
| 103 |
|
---|
| 104 | <segmentedlist>
|
---|
| 105 | <segtitle>Installed Programs</segtitle>
|
---|
| 106 | <segtitle>Installed Library</segtitle>
|
---|
| 107 | <segtitle>Installed Directories</segtitle>
|
---|
| 108 |
|
---|
| 109 | <seglistitem>
|
---|
| 110 | <seg>None</seg>
|
---|
| 111 | <seg>junit-&junit-version;.jar</seg>
|
---|
| 112 | <seg>/usr/share/junit-&junit-version;,
|
---|
| 113 | /usr/share/doc/junit-&junit-version;</seg>
|
---|
| 114 | </seglistitem>
|
---|
| 115 | </segmentedlist>
|
---|
| 116 |
|
---|
| 117 | <variablelist>
|
---|
| 118 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 119 | <?dbfo list-presentation="list"?>
|
---|
| 120 | <?dbhtml list-presentation="table"?>
|
---|
| 121 |
|
---|
| 122 | <varlistentry id="junit.jar">
|
---|
| 123 | <term><filename class='libraryfile'>junit-&junit-version;.jar</filename></term>
|
---|
| 124 | <listitem>
|
---|
| 125 | <para>contains java classes to support the xUnit framework testing
|
---|
| 126 | architecture.</para>
|
---|
| 127 | <indexterm zone="junit junit.jar">
|
---|
| 128 | <primary sortas="c-junit.jar">junit-&junit-version;.jar</primary>
|
---|
| 129 | </indexterm>
|
---|
| 130 | </listitem>
|
---|
| 131 | </varlistentry>
|
---|
| 132 |
|
---|
| 133 | </variablelist>
|
---|
| 134 |
|
---|
| 135 | </sect2>
|
---|
| 136 |
|
---|
| 137 | </sect1>
|
---|