Search code examples
junitinstall4jacceptance-testing

Use Junit to Test install4j installer Behavior


Does anyone know of documentation or examples around using junit to test installer behavior?

We build install4j with maven + execmojo producing installer during maven's compile phase. We want integration tests to verify installer logic (if variable = foo, display form or perform action || if action performed, expect contents...).

Are junit test of installer viable or must automate via external tool (e.g., autoit). Testing by hand seems like the wrong approach.

Thanks

Peter


Solution

  • I would suggest to test the console mode of the installer (start the installer with the argument "-c"). Then you can use a tool like expectj to drive the interaction with the installer.