Archive distribution acceptance testing


Product of our Gradle build is a zip/tar.gz archive, built with Gradle ‘distribution’ plugin. We would like to add the following two kinds of tests:

  1. Distribution tests - e.g. verification of distro archive size, verification of existence and content of specific paths inside the archives, also verification of file permissions attributes stored inside the archive. Some of the tests may be performed on the unpacked distribution, some of them should be performed directly with the archive file.

  2. Functional tests - executed with command line driver of the product (contained inside the distribution archives). Execution of specific command lines and then deciding on test result via checking content of the text/xml files created, exit codes, console output etc.

We would be very grateful for any general hints or examples how to organize this testing and how to integrate it with the Gradle build. We prefer to use JUnit, Spock, Groovy.