Author: yzhishko
Date: 2009-10-15 13:10:38 -0400 (Thu, 15 Oct 2009)
New Revision: 18115
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java
Log:
Seam SWTBot tests correction.
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java 2009-10-15
16:54:31 UTC (rev 18114)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java 2009-10-15
17:10:38 UTC (rev 18115)
@@ -1,16 +1,11 @@
package org.jboss.tools.seam.ui.bot.test;
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
import org.jboss.tools.seam.ui.bot.test.create.CreateSeamRuntimes;
import org.jboss.tools.seam.ui.bot.test.create.CreateSeamProjects;
import org.jboss.tools.seam.ui.bot.test.create.CreateForms;
import org.jboss.tools.seam.ui.bot.test.create.CreateActions;
import org.jboss.tools.seam.ui.bot.test.create.CreateConversations;
import org.jboss.tools.seam.ui.bot.test.create.CreateEntities;
-import org.jboss.tools.seam.ui.bot.test.create.DeleteSeamProjects;
-import org.jboss.tools.ui.bot.test.JBTSWTBotTestCase;
-
-import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java 2009-10-15
16:54:31 UTC (rev 18114)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java 2009-10-15
17:10:38 UTC (rev 18115)
@@ -3,16 +3,10 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
-
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.waits.ICondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.hamcrest.CoreMatchers;
-import org.hamcrest.Matcher;
import org.jboss.tools.test.TestProperties;
import org.jboss.tools.ui.bot.test.JBTSWTBotTestCase;
import org.jboss.tools.ui.bot.test.WidgetVariables;
@@ -27,11 +21,11 @@
protected static Properties seam2fpSettings;
protected static Properties seam21Settings;
- private static String PROJECT_PROPERTIES = "projectProperties.properties";
- private static String EAP_RUNTIME = "jbossEAPRuntime.properties";
- private static String SEAM_SET_12 = "seam12Settings.properties";
- private static String SEAM_SET_2FP = "seam2fpSettings.properties";
- private static String SEAM_SET_21 = "seam21Settings.properties";
+ private static final String PROJECT_PROPERTIES =
"projectProperties.properties";
+ private static final String EAP_RUNTIME = "jbossEAPRuntime.properties";
+ private static final String SEAM_SET_12 = "seam12Settings.properties";
+ private static final String SEAM_SET_2FP = "seam2fpSettings.properties";
+ private static final String SEAM_SET_21 = "seam21Settings.properties";
public static String JBOSS_EAP_HOME;
public static String SEAM_12_SETTINGS_HOME;
@@ -46,6 +40,9 @@
};
static {
+// System.setProperty("jbosstools.test.seam.1.2.1.eap.home",
"C:/jbdevstudio0609/jboss-eap/seam");
+// System.setProperty("jbosstools.test.seam.2fp.eap.home",
"C:/jbdevstudio0609/jboss-eap/seamfp");
+// System.setProperty("jbosstools.test.seam.2.1.0.GA.home",
"C:/jbdevstudio0609/jboss-eap/jboss-seam-2.1.1.GA");
try {
InputStream is = TestControl.class.getResourceAsStream("/" +
PROJECT_PROPERTIES);
projectProperties = new TestProperties();
@@ -96,14 +93,10 @@
catch (IllegalStateException e) {
fail("Property file " + SEAM_SET_21 + " was not found");
}
- JBOSS_EAP_HOME =
System.getProperty("jbosstools.test.jboss.home",jbossEAPRuntime.getProperty("runtimePath"));
- SEAM_12_SETTINGS_HOME =
System.getProperty("jbosstools.test.seam.1.2.1.eap.home",seam12Settings.getProperty("seamRuntimePath"));
-
- //Property SEAM_21_SETTINGS_HOME should be deleted or commented. There is no such
property on hudson
- SEAM_21_SETTINGS_HOME =
System.getProperty("jbosstools.test.seam.home.2.1",seam21Settings.getProperty("seamRuntimePath"));
-
-
- SEAM_2FP_SETTINGS_HOME =
System.getProperty("jbosstools.test.seam.2.0.1.GA.home",seam2fpSettings.getProperty("seamRuntimePath"));
+ JBOSS_EAP_HOME = jbossEAPRuntime.getProperty("runtimePath");
+ SEAM_12_SETTINGS_HOME = seam12Settings.getProperty("seamRuntimePath");
+ SEAM_21_SETTINGS_HOME = seam21Settings.getProperty("seamRuntimePath");
+ SEAM_2FP_SETTINGS_HOME = seam2fpSettings.getProperty("seamRuntimePath");
}
@@ -118,19 +111,6 @@
}
}
- private static void substituteSystemProperties(Properties projectProperties2) {
- for (Object opject : projectProperties2.keySet()) {
- String propertyValue = projectProperties2.get(opject).toString();
- if(propertyValue.matches("\\$\\{.*")) {
- for (String substitute : SUBSTITUTE_PROPERTIES) {
- String regexp = "\\$\\{" + substitute + "}";
- if(propertyValue.matches(regexp)) {
- projectProperties2.put(opject, propertyValue.replaceAll(regexp,
System.getProperty(substitute)));
- }
- }
- }
- }
- }
/*protected void setUp() throws Exception {
super.setUp();
@@ -196,7 +176,6 @@
bot.radio(type).click();
bot.comboBoxWithLabel("Connection
profile:").setSelection(projectProperties.getProperty("connName"));
bot.button("Finish").click();
- bot.waitUntil(Conditions.shellCloses(bot.activeShell()),30000);
}
/**Creates any Seam Action, Form etc. */
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2009-10-15
16:54:31 UTC (rev 18114)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2009-10-15
17:10:38 UTC (rev 18115)
@@ -6,31 +6,47 @@
public void testCreateSeamProject12war(){
createSeamProject(seam12Settings, jbossEAPRuntime, TYPE_WAR);
+ waitForBlockingJobsAcomplished(180000, BUILDING_WS);
}
-/* public void testCreateSeamProject12ear(){
- createSeamProject(seam12Settings, jbossEAPRuntime, TYPE_EAR);
- waitForJobs();
- }
+// public void testCreateSeamProject12ear(){
+// createSeamProject(seam12Settings, jbossEAPRuntime, TYPE_EAR);
+// try {
+// waitForBlockingJobsAcomplished(180000, BUILDING_WS);
+// } catch (InterruptedException e) {
+// }
+// }
+//
+// public void testCreateSeamProject2fpwar(){
+// createSeamProject(seam2fpSettings, jbossEAPRuntime, TYPE_WAR);
+// try {
+// waitForBlockingJobsAcomplished(180000, BUILDING_WS);
+// } catch (InterruptedException e) {
+// }
+// }
+//
+// public void testCreateSeamProject2fpear(){
+// createSeamProject(seam2fpSettings, jbossEAPRuntime, TYPE_EAR);
+// try {
+// waitForBlockingJobsAcomplished(180000, BUILDING_WS);
+// } catch (InterruptedException e) {
+// }
+// }
+//
+// public void testCreateSeamProject21war(){
+// createSeamProject(seam21Settings, jbossEAPRuntime, TYPE_WAR);
+// try {
+// waitForBlockingJobsAcomplished(180000, BUILDING_WS);
+// } catch (InterruptedException e) {
+// }
+// }
+//
+// public void testCreateSeamProject21ear(){
+// createSeamProject(seam21Settings, jbossEAPRuntime, TYPE_EAR);
+// try {
+// waitForBlockingJobsAcomplished(180000, BUILDING_WS);
+// } catch (InterruptedException e) {
+// }
+// }
- public void testCreateSeamProject2fpwar(){
- createSeamProject(seam2fpSettings, jbossEAPRuntime, TYPE_WAR);
- waitForJobs();
- }
-
- public void testCreateSeamProject2fpear(){
- createSeamProject(seam2fpSettings, jbossEAPRuntime, TYPE_EAR);
- waitForJobs();
- }
-
- public void testCreateSeamProject21war(){
- createSeamProject(seam21Settings, jbossEAPRuntime, TYPE_WAR);
- waitForJobs();
- }
-
- public void testCreateSeamProject21ear(){
- createSeamProject(seam21Settings, jbossEAPRuntime, TYPE_EAR);
- waitForJobs();
- }*/
-
}
\ No newline at end of file