1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY junit-download-http "http://downloads.sourceforge.net/junit/junit&junit-version;.zip">
|
---|
8 | <!ENTITY junit-download-ftp " ">
|
---|
9 | <!ENTITY junit-md5sum "6c22e6733f4ba9d755a437375e3d476e">
|
---|
10 | <!ENTITY junit-size "643 KB">
|
---|
11 | <!ENTITY junit-buildsize "5.7 MB">
|
---|
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 |
|
---|
38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
39 | <itemizedlist spacing="compact">
|
---|
40 | <listitem>
|
---|
41 | <para>Download (HTTP): <ulink url="&junit-download-http;"/></para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>Download (FTP): <ulink url="&junit-download-ftp;"/></para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>Download MD5 sum: &junit-md5sum;</para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>Download size: &junit-size;</para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>Estimated disk space required: &junit-buildsize;</para>
|
---|
54 | </listitem>
|
---|
55 | <listitem>
|
---|
56 | <para>Estimated build time: &junit-time;</para>
|
---|
57 | </listitem>
|
---|
58 | </itemizedlist>
|
---|
59 |
|
---|
60 | <bridgehead renderas="sect3">JUnit Dependencies</bridgehead>
|
---|
61 |
|
---|
62 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
63 | <para role="required"><xref linkend="unzip"/></para>
|
---|
64 |
|
---|
65 | <para condition="html" role="usernotes">User Notes:
|
---|
66 | <ulink url="&blfs-wiki;/junit"/></para>
|
---|
67 |
|
---|
68 | </sect2>
|
---|
69 |
|
---|
70 | <sect2 role="installation">
|
---|
71 | <title>Installation of JUnit</title>
|
---|
72 |
|
---|
73 | <para>Install <application>JUnit</application> by running the following
|
---|
74 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
75 |
|
---|
76 | <screen role="root"><userinput>install -v -m755 -d /usr/share/{,doc/}junit-&junit-version; &&
|
---|
77 | chown -R root:root . &&
|
---|
78 | cp -v -R junit* org /usr/share/junit-&junit-version; &&
|
---|
79 | cp -v -R *.html *doc /usr/share/doc/junit-&junit-version;</userinput></screen>
|
---|
80 |
|
---|
81 | <para>Add the <filename
|
---|
82 | class='libraryfile'>junit-&junit-version;.jar</filename> and <filename
|
---|
83 | class='directory'>/usr/share/junit-&junit-version;</filename> directory to
|
---|
84 | your system <envar>CLASSPATH</envar> environment variable:</para>
|
---|
85 |
|
---|
86 | <screen><userinput>export CLASSPATH=$CLASSPATH:\
|
---|
87 | /usr/share/junit-&junit-version;/junit-&junit-version;.jar:/usr/share/junit-&junit-version;</userinput></screen>
|
---|
88 |
|
---|
89 | <para>To run the <application>JUnit</application> regression self-tests,
|
---|
90 | you'll need to have <xref linkend="jdk"/> or <ulink
|
---|
91 | url="http://jikes.sourceforge.net/">Jikes</ulink> installed and the
|
---|
92 | <envar>CLASSPATH</envar> environment variable updated. Then, as an
|
---|
93 | unprivileged user, issue:</para>
|
---|
94 |
|
---|
95 | <screen><userinput>java org.junit.runner.JUnitCore org.junit.tests.AllTests</userinput></screen>
|
---|
96 |
|
---|
97 | </sect2>
|
---|
98 |
|
---|
99 | <sect2 role="content">
|
---|
100 | <title>Contents</title>
|
---|
101 |
|
---|
102 | <segmentedlist>
|
---|
103 | <segtitle>Installed Programs</segtitle>
|
---|
104 | <segtitle>Installed Library</segtitle>
|
---|
105 | <segtitle>Installed Directories</segtitle>
|
---|
106 |
|
---|
107 | <seglistitem>
|
---|
108 | <seg>None</seg>
|
---|
109 | <seg>junit-&junit-version;.jar</seg>
|
---|
110 | <seg>/usr/share/junit-&junit-version;,
|
---|
111 | /usr/share/doc/junit-&junit-version;</seg>
|
---|
112 | </seglistitem>
|
---|
113 | </segmentedlist>
|
---|
114 |
|
---|
115 | <variablelist>
|
---|
116 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
117 | <?dbfo list-presentation="list"?>
|
---|
118 | <?dbhtml list-presentation="table"?>
|
---|
119 |
|
---|
120 | <varlistentry id="junit.jar">
|
---|
121 | <term><filename class='libraryfile'>junit-&junit-version;.jar</filename></term>
|
---|
122 | <listitem>
|
---|
123 | <para>contains java classes to support the xUnit framework testing
|
---|
124 | architecture.</para>
|
---|
125 | <indexterm zone="junit junit.jar">
|
---|
126 | <primary sortas="c-junit.jar">junit-&junit-version;.jar</primary>
|
---|
127 | </indexterm>
|
---|
128 | </listitem>
|
---|
129 | </varlistentry>
|
---|
130 |
|
---|
131 | </variablelist>
|
---|
132 |
|
---|
133 | </sect2>
|
---|
134 |
|
---|
135 | </sect1>
|
---|