Skip to content

UnitTestGuide

Quintin Siebers edited this page Oct 21, 2022 · 2 revisions

⚠️ The information on this page is no longer valid

If you want to run the entire test suite, the easiest is to do

  ant test

However, this runs the entire test suite. If you want to run just a subset of the test suite you can do so with this command:

  java net.ontopia.test.TestRunner src/test-data/config/tests.xml group1 group2 group3...

The groups are those listed in the tests.xml file. For example, net.ontopia.topicmaps.xml would run only the XTM 1.0 and XTM 2.0 tests.

It's not possible to specify an individual test on the command-line (unfortunately; we should consider adding this), but by making your own test file you can easily define any test group you want:


<test-collection>

  <include>tests.xml</include>

  <group>
    <name>default</name>
    <test>net.ontopia.topicmaps.utils.test.DeletionUtilsTest</test>
  </group>

  <property>
    <name>net.ontopia.test.TestRunner.debug</name>
    <value>false</value>
  </property>

  <property>
    <name>net.ontopia.test.root</name>
    <value>/Users/larsga/cvs-co/ontopia/src/test-data</value>
  </property>
  
  <property>
    <name>net.ontopia.topicmaps.impl.rdbms.PropertyFile</name>
    <value>/home/larsga/cvs-co/src/java/test-data/config/toplink.properties</value>
  </property>

</test-collection>

Clone this wiki locally