<!-- <questionid="arch-overall"when="init"> Describetheoverallarchitecture. <hint> WhatwillbeAPIfor <ahref="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi"> clientsandwhatsupportAPI</a>? Whatpartswillbepluggable? Howwillplug-insberegistered?Pleaseuse<code><apitype="export"/></code> todescribeyourgeneralAPIs. Ifpossiblepleaseprovide simplediagrams. </hint> </question>
-->
<answer id="arch-overall">
<p>
Module contains NetBeans extension to JUnit. It provides classes and
methods which allow one to verify performance, memory consumption,
file output and other aspects of the IDE or applications built
on the NetBeans Platform.
</p>
</answer>
<!-- <questionid="arch-quality"when="init"> Howwillthe<ahref="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a> ofyourcodebetestedand howarefutureregressionsgoingtobeprevented? <hint> Whatkindoftestingdo youwanttouse?Howmuchfunctionality,inwhichareas, shouldbecoveredbythetests? </hint> </question>
-->
<answer id="arch-quality">
<p>
Used daily for testing of NetBeans. A few unite tests exists.
</p>
</answer>
<!-- <questionid="dep-nb"when="init"> WhatotherNetBeansprojectsandmodulesdoesthisonedependon? <hint> Ifyouwant,describesuchprojectsasimportedAPIsusing the<code><apiname="identification"type="importorexport"category="stable"url="whereisthedescription"/></code> </hint> </question>
-->
<answer id="dep-nb">
<defaultanswer generate='none' />
<api type='import' group='java' category='devel' name='org.netbeans.insane' >
The only module that this one is using is the insane library to find leaked
objects after unsuccessful <code>assertGC</code> calls.
</api>
</answer>
<!-- <questionid="exec-property"when="impl"> Isexecutionofyourcodeinfluencedbyanyenvironmentor Javasystem(<code>System.getProperty</code>)property? <hint> Ifthereisapropertythatcanchangethebehaviorofyour code,somebodywilllikelyuseit.Youshoulddescribewhatitdoes andthe<ahref="http://openide.netbeans.org/tutorial/api-design.html#life">stabilitycategory</a> ofthisAPI.Youmayuse <pre> <apitype="export"group="property"name="id"category="private"url="http://..."> descriptionoftheproperty,whereitisused,whatitinfluence,etc. </api> </pre> </hint> </question>
-->
<answer id="exec-property">
<p>
NetBeans extension to JUnit uses standard JUnit preferences file to store additional information required when using advanced features of NbJUnit. The junit.properties file is a standard property file, which is stored in user's home directory (as defined in user.home system property of JVM). Recognized properties by NbJUnit are the following:
nbjunit.diff.impl - name of the java class implementing org.netbeans.junit.diff.Diff inteface. This class performs 'diff' between files. In NBJunit extension is available org.netbeans.junit.diff.SimpleDiff for simple comparision (this class decides only whether compared files are equal or not, it does not provide any additional information) and org.netbeans.junit.diff.NativeDiff for comparision via native diff code (e.g. diff program on unix machines).
Please note, SimpleDiff is rather trivial implementation of diff command, so it is recommended to use native diff whenever possible.
</p>
<ul>
<li>
<api name="nbjunit.diff.impl.CmdLine" group="systemproperty"type="export" category="devel">
used only when nbjunit.diff.impl is set
to org.netbeans.junit.diff.NativeDiff class. This property
contain command line, which is called from NativeDiff class
to perform comparision. This property use
also '%TESTFILE%' and '%PASSFILE%' variables understood
by NbJUnit, which are replaced with real
file names when running tests.
</api>
</li>
<li>
<api name="nbjunit.workdir" group="systemproperty"type="export" category="devel">
path to a directory, which is used as a root for tests' working
directories (for details see JavaDoc for NbTestCase.getWorkDir()).
</api>
</li>
<li>
<api name="NbTestCase.order" group="systemproperty"type="export" category="friend">
This property tries to influence the order of <code>NbTestCase</code>
methods so it is more predicatable (see <a href="http://wiki.apidesign.org/wiki/OrderOfElements">
Order of elements</a> for description of the problem). The acceptable
values of the property are:
<ul>
<li>"<b>natural</b>" - use the methods as provided by JDK (e.g. quite random on JDK7)</li>
<li>"<b>a-z</b>" - sort the tests in ascending alphabetical order</li>
<li>"<b>z-a</b>" - sort the tests in descending alphabetical order</li>
<li>"<b>shuffle</b>" - randomize the order of the tests.
If a test fails in this mode a <em>seed</em> is attached to
the failure message, use it in the seed mode
</li>
<li>seed mode "<b>12234390434</b>" - one can specify any long value
as a <em>seed</em> to shuffle the methods. Use this to reproduce
random failures
</li>
</ul>
The default order is <b>natural</b> right now, but this may
change in future to mitigate the <a href="http://wiki.apidesign.org/wiki/OrderOfElements">
randomness caused by JDK7</a>.
</api>
</li>
<li>
<api name="branding.token" group="systemproperty"type="export" category="devel">
<a href="@TOP@/org/netbeans/junit/NbModuleSuite.html">NbModuleSuite</a>
can now be influenced by system property <code>branding.token</code>.
If it is provided (by Ant harness for example), it is used
to call <a href="@org-openide-util@/org/openide/util/NbBundle.html#setBranding(java.lang.String)">
NbBundle.setBranding</a>.
</api>
</li>
</ul>
<p>s
Here's an example of junit.properties file:
</p>
<pre>
nbjunit.workdir=/space/netbeans/tests/workdir
nbjunit.diff.impl=org.netbeans.junit.diff.NativeDiff
nbjunit.diff.impl.CmdLine=/usr/bin/diff -bw %TESTFILE% %PASSFILE%
</pre>
</answer>
<!-- <questionid="resources-preferences"when="final"> DoesyourmoduleusespreferencesviaPreferencesAPI?DoesyourmoduleuseNbPreferencesor orregularJDKPreferences?Doesitread,writeorboth? Doesitsharepreferenceswithothermodules?Ifso,thenwhy? <hint> Youmayuse <apitype="export"group="preferences" name="preferencenodename"category="private"> descriptionofindividualkeys,whereitisused,whatit influences,whetherthemodulereads/writeit,etc. </api> DuetoXMLIDrestrictions,ratherthan/org/netbeans/modules/foogivethe"name"asorg.netbeans.modules.foo. NotethatifyouuseNbPreferencesthisnamewillthenbethesameasthecodenamebaseofthemodule. </hint> </question>
-->
<answer id="resources-preferences">
<p>
By default the NbTestCase provides its own in-memory implementation of
preferences. To suppress this behaviour one can use initialize own Preferences
by accessing them in static initializer of the suite.
</p>
</answer>
</api-answers>
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.32Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.