Difference between revisions of "Unit tests for ImageJ1"

(Add Project template)
(Jenkins -> Travis)
 
Line 1: Line 1:
{{Project|ImageJ1}}We have [[2011-10-07 - Unit tests for ImageJ 1.45|written a substantial number of unit tests]] to exercise [[ImageJ 1.x]] functionality. You can find them in the {{GitHub|org=imagej|repo=ij1-tests|label=ij1-tests repository}}:
+
{{Project|ImageJ1}}There are a [[2011-10-07 - Unit tests for ImageJ 1.45|substantial number of unit tests]] to exercise [[ImageJ 1.x]] functionality. You can find them in the {{GitHub|org=imagej|repo=ij1-tests|label=ij1-tests repository}}:
 
<source lang="bash">
 
<source lang="bash">
 
git clone git://github.com/imagej/ij1-tests
 
git clone git://github.com/imagej/ij1-tests
 
</source>
 
</source>
There is a [http://jenkins.imagej.net/job/ImageJ1-unit-tests/ Jenkins job] that automatically runs the tests with each new version of ImageJ 1.x.
+
There is a [[Travis]] job [https://travis-ci.com/imagej/ij1-tests here] that automatically runs the tests with each new version of ImageJ 1.x.
  
 
=== Running the tests ===
 
=== Running the tests ===
Line 19: Line 19:
 
=== Using a different version of ImageJ1 ===
 
=== Using a different version of ImageJ1 ===
  
You can change which version of ImageJ1 is tested by overridding the <code>imagej1.version</code> property:
+
You can change which version of ImageJ1 is tested by overriding the <code>imagej1.version</code> property:
 
<source lang="bash">
 
<source lang="bash">
 
mvn -Dimagej1.version=1.48a clean test
 
mvn -Dimagej1.version=1.48a clean test
 
</source>
 
</source>
 
Or whichever version you wish to use (of [http://maven.imagej.net/content/groups/public/net/imagej/ij/ those listed here]). The unit tests were created circa 1.44, and do not compile correctly with earlier versions of ImageJ.
 
Or whichever version you wish to use (of [http://maven.imagej.net/content/groups/public/net/imagej/ij/ those listed here]). The unit tests were created circa 1.44, and do not compile correctly with earlier versions of ImageJ.

Latest revision as of 13:35, 5 April 2019

There are 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 Travis job here 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:

  1. Import the ij1-tests project using File  › Import Existing Maven Projects and choosing the ij1-tests/pom.xml file.
  2. 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 overriding the imagej1.version property:

mvn -Dimagej1.version=1.48a clean test

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.