From Fedora Project Wiki
Line 11: Line 11:
  $ cd thermostat-<VERSION>
  $ cd thermostat-<VERSION>
  $ mvn clean package
  $ mvn clean package
$ java -Dcom.redhat.thermostat.itest.thermostatHome=/usr/share/thermostat \
        -Dcom.redhat.thermostat.itest.thermostatUserHome=$(mktemp -d thermostat.XXXXXXXXXX) \
        -cp $(ls integration-tests/standalone/target/thermostat-integration-tests-standalone-*.jar) \
        com.redhat.thermostat.itest.standalone.ItestRunner


The last step should produce a jar with stand-alone integration tests, which can be run against packaged thermostat. Passing integration tests will ensure that basic thermostat functionality is working.
The last step runs very basic integration tests against packaged thermostat. A summary of the test run can be found in the "thermostat-itest-reports" folder, file "summary.txt". Should there have been failed tests, there should be one file per test class with details about the test failures in the "thermostat-itest-reports" folder.
 
'''Why run those tests?'''
 
For example if those tests pass, bundles resolve for most (all?) thermostat one-off-commands. For more details have a look at the AllStandaloneTests class in the sources. At least this should give some confidence that packaged thermostat isn't terribly broken.

Revision as of 11:04, 18 October 2013

Getting sources

Upstream Thermostat source releases can be downloaded from: http://icedtea.wildebeest.org/download/thermostat/

Building standalone Integration Tests

This only works for releases > 0.15.

$ wget http://icedtea.wildebeest.org/download/thermostat/thermostat-<VERSION>.tar.gz
$ tar -xzf thermostat-<VERSION>.tar.gz
$ cd thermostat-<VERSION>
$ mvn clean package
$ java -Dcom.redhat.thermostat.itest.thermostatHome=/usr/share/thermostat \
       -Dcom.redhat.thermostat.itest.thermostatUserHome=$(mktemp -d thermostat.XXXXXXXXXX) \
       -cp $(ls integration-tests/standalone/target/thermostat-integration-tests-standalone-*.jar) \
       com.redhat.thermostat.itest.standalone.ItestRunner

The last step runs very basic integration tests against packaged thermostat. A summary of the test run can be found in the "thermostat-itest-reports" folder, file "summary.txt". Should there have been failed tests, there should be one file per test class with details about the test failures in the "thermostat-itest-reports" folder.

Why run those tests?

For example if those tests pass, bundles resolve for most (all?) thermostat one-off-commands. For more details have a look at the AllStandaloneTests class in the sources. At least this should give some confidence that packaged thermostat isn't terribly broken.