<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=UNITTEST</id>
	<title>UNITTEST - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=UNITTEST"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=UNITTEST&amp;action=history"/>
	<updated>2026-04-11T11:14:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=UNITTEST&amp;diff=815&amp;oldid=prev</id>
		<title>ConvertBot: Runs a set of unit tests.</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=UNITTEST&amp;diff=815&amp;oldid=prev"/>
		<updated>2020-04-27T22:05:06Z</updated>

		<summary type="html">&lt;p&gt;Runs a set of unit tests.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Runs a set of unit tests.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;OPT&amp;gt;   The option to run the unit tests for or the name of the individual test&lt;br /&gt;
        class to run. [DEF=SYS]&lt;br /&gt;
&amp;lt;RES&amp;gt;   The table to write the results of running the tests to. [OPTIONAL]&lt;br /&gt;
&lt;br /&gt;
This will run a complete set of unit tests for an option tree. At the conclusion&lt;br /&gt;
of running the tests the results will be written to the table named &amp;lt;RES&amp;gt; or&lt;br /&gt;
will be printed to the terminal (if &amp;lt;RES&amp;gt;=&amp;quot;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
The names of the individual tests will be read in from the unittest_config.tbl&lt;br /&gt;
file that should be in the test/junit directory of the indicated option tree.&lt;br /&gt;
The structure of the option tree should look like this:&lt;br /&gt;
   opt&lt;br /&gt;
    +- lib&lt;br /&gt;
    |   +- Foo  (The class to test, nxm.opt.lib.Foo)&lt;br /&gt;
    +- libg&lt;br /&gt;
    |   +- Bar  (Another class to test, nxm.opt.libg.Bar)&lt;br /&gt;
    +- test&lt;br /&gt;
        +- junit&lt;br /&gt;
            +- unittest_config.tbl (List of the available unit tests)&lt;br /&gt;
            +- lib&lt;br /&gt;
                +- FooTest (JUnit test class, nxm.opt.test.junit.lib.FooTest)&lt;br /&gt;
            +- libg&lt;br /&gt;
                +- BarTest (JUnit test class, nxm.opt.test.junit.libg.BarTest)&lt;br /&gt;
&lt;br /&gt;
To run the test cases for a single unit test file set &amp;lt;OPT&amp;gt; to the full name&lt;br /&gt;
of the unit test file (e.g. &amp;quot;nxm.sys.test.junit.lib.UtilTest&amp;quot;) or give the full&lt;br /&gt;
name of the NeXtMidas class being tested (e.g. &amp;quot;nxm.sys.lib.Cache&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  1. Run the unit tests for the SYS option tree:&lt;br /&gt;
       nM&amp;gt; unittest SYS&lt;br /&gt;
&lt;br /&gt;
  2. Run the unit tests for the SYS option tree but with limited output:&lt;br /&gt;
       nM&amp;gt; unittest/verbose=0 SYS&lt;br /&gt;
&lt;br /&gt;
  3. Run the unit tests in the class file nxm.sys.test.junit.lib.UtilTest:&lt;br /&gt;
       nM&amp;gt; unittest nxm.sys.test.junit.lib.UtilTest&lt;br /&gt;
&lt;br /&gt;
  4. Run the unit tests for the class nxm.sys.lib.Cache:&lt;br /&gt;
       nM&amp;gt; unittest nxm.sys.lib.Cache&lt;br /&gt;
&lt;br /&gt;
  5. Build one of the unit tests in the SYS option tree&lt;br /&gt;
       nM&amp;gt; build FileUtilTest test/junit/lib sys&lt;br /&gt;
     -OR-&lt;br /&gt;
       nM&amp;gt; build junit/lib/FileUtilTest.java test sys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  /VERBOSE Turns on/off the printing to the console of the results for testing&lt;br /&gt;
           each method.&lt;br /&gt;
&lt;br /&gt;
  /FAILURE Prints an informational message about each failure (this is turned&lt;br /&gt;
           on by default if VERBOSE is on and off if VERBOSE is off).&lt;br /&gt;
&lt;br /&gt;
  /ERROR   Prints an informational message about each error (this is turned&lt;br /&gt;
           on by default if VERBOSE is on and off if VERBOSE is off).&lt;br /&gt;
&lt;br /&gt;
  /ST      Print a stack trace to accompany any error or failure error messages&lt;br /&gt;
           (this has no affect if FAILURE and ERROR are both off).&lt;br /&gt;
&lt;br /&gt;
SEE ALSO:  CONFIDENCE, nxm.sys.test.junit.NMTestCase&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>