We have written a substantial number of unit tests to exercise ImageJ 1.x functionality. You can find them in the ij1-tests repository:
git clone git://github.com/imagej/ij1-tests
There is a Jenkins job that automatically runs the tests with each new version of ImageJ 1.x.
Running the tests
If you wish to run the unit tests manually, you can do so from the command line:
cd ij1-tests
mvn clean test
Or from Eclipse:
- Import the ij1-tests project using File > Import Existing Maven Projects and choosing the ij1-tests/pom.xml file.
- Right-click the ij1-tests project, Run As > JUnit Test.
Using a different version of ImageJ1
You can change which version of ImageJ1 is tested by editing the ij1-tests/pom.xml file. Change the line:
<version>${imagej1.version}</version>
To:
<version>1.46a</version>
Or whichever version you wish to use (of those listed here). The unit tests were created circa 1.44, and do not compile correctly with earlier versions of ImageJ.
If running tests on the command line, you may wish to run "mvn clean" prior to "mvn" in order to recompile the tests against the chosen version. This verifies the version's compile-time compatibility with the tests.
