From Fedora Project Wiki
 
(8 intermediate revisions by the same user not shown)
Line 3: Line 3:
Upstream Thermostat source releases can be downloaded from: http://icedtea.wildebeest.org/download/thermostat/
Upstream Thermostat source releases can be downloaded from: http://icedtea.wildebeest.org/download/thermostat/


= Building standalone Integration Tests =
= Getting and Running Standalone Integration Tests =


This only works for releases > 0.15.
$ export VERSION=1.6.5-SNAPSHOT
 
$ export SHORT_VERSION=1.6
  $ wget <nowiki>http://icedtea.wildebeest.org/download/thermostat/thermostat-<VERSION>.tar.gz</nowiki>
  $ wget -O thermostat-standalone-integration-tests-${VERSION}.jar \
$ tar -xzf thermostat-<VERSION>.tar.gz
  <nowiki>http://builder.classpath.org/jenkins/job/Thermostat-${SHORT_VERSION}/lastSuccessfulBuild/artifact/integration-tests/standalone/target/thermostat-integration-tests-standalone-${VERSION}.jar</nowiki>
$ cd thermostat-<VERSION>
$ mvn clean package
  $ java -Dcom.redhat.thermostat.itest.thermostatHome=/usr/share/thermostat \
  $ java -Dcom.redhat.thermostat.itest.thermostatHome=/usr/share/thermostat \
         -Dcom.redhat.thermostat.itest.thermostatUserHome=$(mktemp -d thermostat.XXXXXXXXXX) \
         -Dcom.redhat.thermostat.itest.thermostatUserHome=$(mktemp -d thermostat.XXXXXXXXXX) \
         -cp $(ls integration-tests/standalone/target/thermostat-integration-tests-standalone-*.jar) \
        -Dthermostat.agent.verbose=true \
         -cp $(ls thermostat-standalone-integration-tests-*.jar) \
         com.redhat.thermostat.itest.standalone.ItestRunner
         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.
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". In case of failed tests, there should be one file per failed test class in folder "thermostat-itest-reports". Look in those files for details about the test failures.


'''Why run those tests?'''
'''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.
For example if those tests pass, bundles resolve for all thermostat one-off-commands. For more details have a look at the AllStandaloneTests class in the upstream Thermostat sources. At least this should give some confidence that packaged thermostat isn't terribly broken.
 
= Known Issues =
 
Some tests depend on the log level for them to pass: See http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1594
$THERMOSTAT_HOME is not writable, which makes PluginTest fail: See http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1594

Latest revision as of 07:22, 20 September 2016

Getting sources

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

Getting and Running Standalone Integration Tests

$ export VERSION=1.6.5-SNAPSHOT
$ export SHORT_VERSION=1.6
$ wget -O thermostat-standalone-integration-tests-${VERSION}.jar \
  http://builder.classpath.org/jenkins/job/Thermostat-${SHORT_VERSION}/lastSuccessfulBuild/artifact/integration-tests/standalone/target/thermostat-integration-tests-standalone-${VERSION}.jar
$ java -Dcom.redhat.thermostat.itest.thermostatHome=/usr/share/thermostat \
       -Dcom.redhat.thermostat.itest.thermostatUserHome=$(mktemp -d thermostat.XXXXXXXXXX) \
       -Dthermostat.agent.verbose=true \
       -cp $(ls thermostat-standalone-integration-tests-*.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". In case of failed tests, there should be one file per failed test class in folder "thermostat-itest-reports". Look in those files for details about the test failures.

Why run those tests?

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