Mercurial > hg > ThermostatQA
changeset 131:86af136ea500
adding new property clean_after_gui_test
author | Jana Fabrikova <jfabriko@redhat.com> |
---|---|
date | Mon, 02 Dec 2013 11:40:18 +0100 |
parents | 8612e27034af |
children | 1d1b70cce62f |
files | ChangeLog src/org/thermostat/qa/common/Configuration.java src/org/thermostat/qa/framework/ThermostatTest.java test.properties |
diffstat | 4 files changed, 27 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Nov 28 17:29:33 2013 +0100 +++ b/ChangeLog Mon Dec 02 11:40:18 2013 +0100 @@ -1,3 +1,14 @@ +2013-12-02 Jana Fabrikova <jfabriko@redhat.com> + + * test.properties: + adding new property clean_after_gui_test which indicates whether to perform + switching off gui and testclass after each gui test, it is needed on Fedora19, + but not on rhel 7 + * src/org/thermostat/qa/common/Configuration.java: + the same change + * src/org/thermostat/qa/framework/ThermostatTest.java: + taking the new property into account when performing the tests + 2013-11-28 Jana Fabrikova <jfabriko@redhat.com> * src/org/thermostat/qa/testuites/CliClientDBModifWebStorageTest.java:
--- a/src/org/thermostat/qa/common/Configuration.java Thu Nov 28 17:29:33 2013 +0100 +++ b/src/org/thermostat/qa/common/Configuration.java Mon Dec 02 11:40:18 2013 +0100 @@ -50,6 +50,7 @@ private String thermostatHome = null; private String thermostatUserHome = null; private String apacheTomcatHome = null; + private boolean performCleaningAfterGuiTests = false; // if true -> gfx tests would be run against pre-generated screenshots private static boolean dummyGfxTests = false; @@ -108,6 +109,8 @@ this.thermostatHome = properties.getProperty("thermostat_home"); this.thermostatUserHome = properties.getProperty("thermostat_user_home"); this.apacheTomcatHome = properties.getProperty("apache_tomcat_home"); + + this.performCleaningAfterGuiTests = properties.getProperty("clean_after_gui_test").equals("true"); } public String getThermostatVersion() @@ -155,4 +158,7 @@ Configuration.dummyGfxTests = dummyGfxTests; } + public boolean getPerformCleaningAfterGuiTests() { + return performCleaningAfterGuiTests; + } }
--- a/src/org/thermostat/qa/framework/ThermostatTest.java Thu Nov 28 17:29:33 2013 +0100 +++ b/src/org/thermostat/qa/framework/ThermostatTest.java Mon Dec 02 11:40:18 2013 +0100 @@ -94,6 +94,12 @@ private boolean guiTest = false; /** + * Do we want to clean all thermostat processes after each gui test? + * (May do problems on rhel) + */ + private boolean performAfterGuiCleaning = false; + + /** * Does the current test use web storage? */ private boolean webStorage = false; @@ -130,6 +136,8 @@ { webStorage = (storageType.value() == StorageTypes.WEBTOMCAT_STORAGE); } + + performAfterGuiCleaning = this.configuration.getPerformCleaningAfterGuiTests(); // setup test setUp(); try @@ -164,7 +172,7 @@ //cleanup after an attempt to run all tests //there could be hanging gui or this testsuite class - if(guiTest) + if(guiTest && performAfterGuiCleaning) { try {
--- a/test.properties Thu Nov 28 17:29:33 2013 +0100 +++ b/test.properties Mon Dec 02 11:40:18 2013 +0100 @@ -4,3 +4,4 @@ thermostat_home=/home/jfabriko/thermostaty/testing_thermostat/thermostat/distribution/target/image/ thermostat_user_home=/home/jfabriko/.thermostat/ apache_tomcat_home=/home/jfabriko/thermostaty/apache-tomcat-7.0.42/ +clean_after_gui_test=true