-
Notifications
You must be signed in to change notification settings - Fork 12
Manual tests
You need to have ImageJ or Fiji installed, and know how to use Maven.
Installing your plugin on a local copy of Fiji is the ultimate test for your software before creating a pull request. It accomplishes several goals:
- Checking that the plugin works as expected in a real environment
- Ensuring that your code can be built reproducibly
- Checking that your code can be built quickly and automatically
- Figuring out which exact dependencies you need
To start with run mvn dependency:analyze
to see if the POM of your project declares any redundant dependencies, or conversely is missing declarations for dependencies it actually uses. Then run
mvn -Dimagej.app.directory=/path/to/my/Fiji.app/ -Ddelete.other.versions=true clean install
The first option specifies the location of ImageJ/Fiji. Note that it works only if you have the imagej-maven-plugin
configured in your project. If you use pom-scijava
, or other such artefact as your project's parent, the plugin is included automatically.
The second option of the above command deletes all conflicting versions of dependencies - even if they are newer than your project uses. The third one cleans files from the last build. The last one downloads, compiles, tests and finally deploys all necessary components. After Maven has finished, you should be able to use your plugin when you run ImageJ. If your build is unsuccessful, resolve failing tests, and other issues, and repeat the command. Instead of typing the above command to the command line every time, you can use the script provided in the BoneJ2 repository.
Sometimes you might want to add the option -Dmaven.test.skip=true
to skip the testing phase, and speed up the installation, but please confirm that all unit tests pass before creating a pull request. You can use the IJinstall_naughty.sh
script to run the installation command without tests.