JBoss Tools SVN: r29408 - in trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test: src/org/jboss/tools/modeshape/rest/ui/bot/tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-03-01 09:29:35 -0500 (Tue, 01 Mar 2011)
New Revision: 29408
Added:
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties
Modified:
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Properties.java
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Publishing.java
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java
Log:
Added: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties (rev 0)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties 2011-03-01 14:29:35 UTC (rev 29408)
@@ -0,0 +1,12 @@
+# SWTBotTest properties
+# all properties are optional, all defined paths should exist
+# <java version>,<jre/jdk home>
+JAVA=1.6,/usr/lib/jvm/java-6-sun/jre
+#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>
+# note : when server is type of SOA, version is version of SOA (not the bundled EAP)
+#SERVER=JBOSS_AS,5.0,1.6,/home/psrna/data/jboss/jboss/jboss-as
+SERVER=SOA,5.1,1.6,/home/psrna/data/jboss/soa-5.1.0.CR1-eds/jboss-as
+#<seam version>,<seam runtime home>
+#SEAM=2.2,/home/psrna/data/jboss/jboss-eap-5.0/seam
+#<esb versoin>,<esb runtime home>
+#ESB=4.7,/home/psrna/data/jboss/jbossesb-4.7
Property changes on: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Properties.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Properties.java 2011-03-01 14:01:31 UTC (rev 29407)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Properties.java 2011-03-01 14:29:35 UTC (rev 29408)
@@ -26,8 +26,11 @@
public static final String TEIID_PROJECT_DESC = ".project";
- public static final String ORACLE_SQL = "data/CreateDB_PartsSupplier_Oracle.sql";
- public static final String SQLSERVER_SQL = "data/CreateDB_PartsSupplier_SQLServer.sql";
+ public static final String DATA_1 = "data/parts_table.data";
+ public static final String DATA_2 = "data/ship_via_table.data";
+ public static final String DATA_3 = "data/status_table.data";
+ public static final String DATA_4 = "data/supplier_parts_table.data";
+ public static final String DATA_5 = "data/supplier_table.data";
public static final String PARTS_SOURCE_A = "PartsSourceA.xmi";
public static final String PARTS_SOURCE_B = "PartsSourceB.xmi";
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Publishing.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Publishing.java 2011-03-01 14:01:31 UTC (rev 29407)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/Publishing.java 2011-03-01 14:29:35 UTC (rev 29408)
@@ -35,7 +35,7 @@
* @author psrna
*
*/
-//@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,version="5.1"),perspective="Java EE")
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,version="5.1"),perspective="Java EE")
public class Publishing extends SWTTestExt{
private static final String CONNERR_MSG = "Unable to connect using the specified server properties." +
@@ -139,15 +139,15 @@
SWTBot viewBot = view.bot();
SWTBotTreeItem node = eclipse.selectTreeLocation(viewBot, Properties.PROJECT_NAME, Properties.FILE_NAME);
- ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.tree(),node);
- ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "ModeShape", "Publish");
+ ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.bot().tree(),node);
+ ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(), "ModeShape", "Publish");
- SWTBotShell shell = bot.shell("Publish");
+ SWTBotShell shell = bot.shell("Publish to ModeShape");
shell.activate();
SWTBotCombo serverCombo = shell.bot().comboBoxWithLabel("Server:");
- SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("Repository:");
- SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("Workspace:");
+ SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("JCR Repository:");
+ SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("JCR Workspace:");
workspaceCombo.setSelection(Properties.WORKSPACE);
assertTrue("URL mismatch.", serverCombo.getText().equals(Properties.URL));
@@ -167,8 +167,8 @@
SWTBot viewBot = view.bot();
SWTBotTreeItem node = eclipse.selectTreeLocation(viewBot, Properties.PROJECT_NAME, Properties.FILE_NAME);
- ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.tree(),node);
- ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "ModeShape", "Show Published Locations");
+ ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.bot().tree(),node);
+ ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(), "ModeShape", "Show Published Locations");
SWTBotShell shell = bot.shell("Published Locations");
shell.activate();
@@ -200,15 +200,15 @@
SWTBot viewBot = view.bot();
SWTBotTreeItem node = eclipse.selectTreeLocation(viewBot, Properties.PROJECT_NAME, Properties.FILE_NAME);
- ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.tree(),node);
- ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "ModeShape", "Unpublish");
+ ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.bot().tree(),node);
+ ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(), "ModeShape", "Unpublish");
- SWTBotShell shell = bot.shell("Unpublish");
+ SWTBotShell shell = bot.shell("Unpublish from ModeShape");
shell.activate();
SWTBotCombo serverCombo = shell.bot().comboBoxWithLabel("Server:");
- SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("Repository:");
- SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("Workspace:");
+ SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("JCR Repository:");
+ SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("JCR Workspace:");
workspaceCombo.setSelection(Properties.WORKSPACE);
assertTrue("URL mismatch.", serverCombo.getText().equals(Properties.URL));
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java 2011-03-01 14:01:31 UTC (rev 29407)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/src/org/jboss/tools/modeshape/rest/ui/bot/tests/TeiidFilesPublishing.java 2011-03-01 14:29:35 UTC (rev 29408)
@@ -1,5 +1,8 @@
package org.jboss.tools.modeshape.rest.ui.bot.tests;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.waitForShell;
+
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -15,6 +18,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -34,7 +38,7 @@
* @author psrna
*
*/
-//@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,version="5.1"), perspective="Teiid Designer")
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,version="5.1"), perspective="Teiid Designer")
public class TeiidFilesPublishing extends SWTTestExt{
private static final String CONNERR_MSG = "Unable to connect using the specified server properties." +
@@ -52,6 +56,8 @@
open.finish(shell.bot(), IDELabel.Button.FINISH);
+ bot.waitUntil(Conditions.shellIsActive("Downloading..."));
+ bot.waitUntil(Conditions.shellCloses(bot.shell("Downloading...")));
}
@BeforeClass
@@ -115,15 +121,15 @@
SWTBot viewBot = view.bot();
SWTBotTreeItem node = eclipse.selectTreeLocation(viewBot, Properties.TEIID_PROJECT_NAME);
- ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.tree(),node);
- ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "ModeShape", "Publish");
+ ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.bot().tree(),node);
+ ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(), "ModeShape", "Publish");
- SWTBotShell shell = bot.shell("Publish");
+ SWTBotShell shell = bot.shell("Publish to ModeShape");
shell.activate();
SWTBotCombo serverCombo = shell.bot().comboBoxWithLabel("Server:");
- SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("Repository:");
- SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("Workspace:");
+ SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("JCR Repository:");
+ SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("JCR Workspace:");
workspaceCombo.setSelection(Properties.WORKSPACE);
assertTrue("URL mismatch.", serverCombo.getText().equals(Properties.URL));
@@ -131,13 +137,18 @@
assertTrue("Workspace mismatch.", workspaceCombo.getText().equals(Properties.WORKSPACE));
open.finish(shell.bot());
+ bot.waitUntil(Conditions.shellCloses(shell));
assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.TEIID_PROJECT_DESC));
assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.PARTS_SOURCE_A));
assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.PARTS_SOURCE_B));
assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.PARTS_VIRTUAL));
- assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.ORACLE_SQL));
- assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.SQLSERVER_SQL));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.DATA_1));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.DATA_2));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.DATA_3));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.DATA_4));
+ assertTrue("HTTP Response code must be 200 after publishing.", HttpURLConnection.HTTP_OK == testPublishedFile(Properties.DATA_5));
+
}
@Test
@@ -147,15 +158,15 @@
SWTBot viewBot = view.bot();
SWTBotTreeItem node = eclipse.selectTreeLocation(viewBot, Properties.TEIID_PROJECT_NAME);
- ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.tree(),node);
- ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "ModeShape", "Unpublish");
+ ContextMenuHelper.prepareTreeItemForContextMenu(projectExplorer.bot().tree(),node);
+ ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(), "ModeShape", "Unpublish");
- SWTBotShell shell = bot.shell("Unpublish");
+ SWTBotShell shell = bot.shell("Unpublish from ModeShape");
shell.activate();
SWTBotCombo serverCombo = shell.bot().comboBoxWithLabel("Server:");
- SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("Repository:");
- SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("Workspace:");
+ SWTBotCombo repoCombo = shell.bot().comboBoxWithLabel("JCR Repository:");
+ SWTBotCombo workspaceCombo = shell.bot().comboBoxWithLabel("JCR Workspace:");
workspaceCombo.setSelection(Properties.WORKSPACE);
assertTrue("URL mismatch.", serverCombo.getText().equals(Properties.URL));
@@ -163,13 +174,18 @@
assertTrue("Workspace mismatch.", workspaceCombo.getText().equals(Properties.WORKSPACE));
open.finish(shell.bot());
+ bot.waitUntil(Conditions.shellCloses(shell));
assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.TEIID_PROJECT_DESC));
assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.PARTS_SOURCE_A));
assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.PARTS_SOURCE_B));
assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.PARTS_VIRTUAL));
- assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.ORACLE_SQL));
- assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.SQLSERVER_SQL));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.DATA_1));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.DATA_2));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.DATA_3));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.DATA_4));
+ assertTrue("HTTP Response code must be 404 after unpublishing.", HttpURLConnection.HTTP_NOT_FOUND == testPublishedFile(Properties.DATA_5));
+
}
/**
13 years, 1 month
JBoss Tools SVN: r29407 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext: resources and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-03-01 09:01:31 -0500 (Tue, 01 Mar 2011)
New Revision: 29407
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SecureStorage.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/SetProperties.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
Log:
swtbotext: added support for secure storage (password) config property
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2011-03-01 10:31:08 UTC (rev 29406)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2011-03-01 14:01:31 UTC (rev 29407)
@@ -40,6 +40,7 @@
org.jboss.tools.ui.bot.ext.types,
org.jboss.tools.ui.bot.ext.view,
org.jboss.tools.ui.bot.ext.widgets,
+ org.jboss.tools.ui.bot.ext.wizards,
org.jboss.tools.ui.bot.ext.zest
Bundle-Vendor: JBoss by Red Hat
Bundle-ClassPath: .,
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2011-03-01 10:31:08 UTC (rev 29406)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2011-03-01 14:01:31 UTC (rev 29407)
@@ -23,3 +23,6 @@
#Connection profile named <db_type>_<version> will be created
#Annotation usage for TestCase db=@DB
DB=hsqldb18,internal,driver,jdbc,user,,
+# Secure Storage=<password>
+# configure master password for secure storage
+SS=password
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2011-03-01 10:31:08 UTC (rev 29406)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2011-03-01 14:01:31 UTC (rev 29407)
@@ -18,7 +18,7 @@
private JBPM jbpm = new JBPM();
private DB db = new DB();
private RemoteSystem remoteSystem = new RemoteSystem();
-
+ private String secureStoragePassword;
private boolean viewsPrepared = false;
public boolean isViewsPrepared() {
@@ -28,6 +28,12 @@
public void setViewsPrepared(boolean viewsPrepared) {
this.viewsPrepared = viewsPrepared;
}
+ public String getSecureStoragePassword() {
+ return secureStoragePassword;
+ }
+ public void setSecureStoragePassword(String secureStoragePassword) {
+ this.secureStoragePassword = secureStoragePassword;
+ }
/**
* gets list of installed jre's (without the default one)
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SecureStorage.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SecureStorage.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SecureStorage.java 2011-03-01 14:01:31 UTC (rev 29407)
@@ -0,0 +1,23 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+public class SecureStorage {
+
+ public String password;
+ public static SecureStorage fromString(String key, String propValue) throws Exception {
+ try {
+ if (propValue==null) {
+ return null;
+ }
+ SecureStorage bean = new SecureStorage();
+ bean.password = propValue;
+ return bean;
+ }
+ catch (Exception ex) {
+ throw new Exception(String.format("Cannot parse %s property line",key),ex);
+ }
+ }
+ @Override
+ public String toString() {
+ return String.format("Secure Storage is configured");
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java 2011-03-01 10:31:08 UTC (rev 29406)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java 2011-03-01 14:01:31 UTC (rev 29407)
@@ -31,6 +31,7 @@
private JBPMBean jbpm;
private DBBean db;
private RemoteSystemBean remoteSystem;
+ private SecureStorage secureStorage;
public TestConfiguration(String propName, String propFile) throws Exception {
this.propName = propName;
@@ -65,7 +66,8 @@
printConfig(Keys.JBPM, jbpm);
db = DBBean.fromString(getProperty(Keys.DB));
printConfig(Keys.DB,db);
-
+ secureStorage = SecureStorage.fromString(Keys.SS, getProperty(Keys.SS));
+ printConfig("Secure Storage",secureStorage);
checkConfig();
}
@@ -186,4 +188,7 @@
public RemoteSystemBean getRemoteSystem() {
return remoteSystem;
}
+ public SecureStorage getSecureStorage() {
+ return secureStorage;
+ }
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2011-03-01 10:31:08 UTC (rev 29406)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2011-03-01 14:01:31 UTC (rev 29407)
@@ -33,6 +33,7 @@
public static final String JBPM = "JBPM";
public static final String DB = "DB";
public static final String RS = "RS";
+ public static final String SS = "SS";
}
public class Values {
@@ -113,6 +114,12 @@
}
}
+ /**
+ * checks whether given property-file (its conntent) contains multiple configurations to load
+ * or it is just that configuration file
+ * @param propFile
+ * @return true if given property-file (its conntent) contains multiple configurations
+ */
public static boolean isMultiPropertiesFile(String propFile) {
Properties props = new Properties();
try {
@@ -260,6 +267,7 @@
// internal list
List<RequirementBase> reqs = new ArrayList<RequirementBase>();
reqs.add(RequirementBase.createPrepareViews());
+ reqs.add(RequirementBase.createSetProperties());
// all not annotated classes can run
if (requies == null) {
return reqs;
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2011-03-01 10:31:08 UTC (rev 29406)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2011-03-01 14:01:31 UTC (rev 29407)
@@ -136,6 +136,11 @@
return req;
}
+ public static RequirementBase createSetProperties() {
+ RequirementBase req = new SetProperties();
+ req.setPriority(-99);
+ return req;
+ }
public static RequirementBase createClearWorkspace() {
RequirementBase req = new ClearWorkspace();
req.setPriority(-2);
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/SetProperties.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/SetProperties.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/SetProperties.java 2011-03-01 14:01:31 UTC (rev 29407)
@@ -0,0 +1,25 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+
+/**
+ * special type of requirement. Does nothing, just copies several properties and its values from {@link TestConfigurator#currentConfig}
+ * to {@link SWTTestExt#configuredState}. Such properties are only propagated from config to config state
+ * @author lzoubek
+ *
+ */
+public class SetProperties extends RequirementBase {
+
+ @Override
+ public boolean checkFulfilled() {
+ SWTTestExt.configuredState.setSecureStoragePassword(TestConfigurator.currentConfig.getSecureStorage().password);
+ return true;
+ }
+
+ @Override
+ public void handle() {
+
+ }
+
+}
13 years, 1 month
JBoss Tools SVN: r29406 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-03-01 05:31:08 -0500 (Tue, 01 Mar 2011)
New Revision: 29406
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
Log:
fixed inconsistencies with swtbot 2.0.3
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java 2011-03-01 10:29:44 UTC (rev 29405)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java 2011-03-01 10:31:08 UTC (rev 29406)
@@ -129,11 +129,11 @@
}
}
- public SWTBotScaleExt scale() {
- return scale(0);
+ public SWTBotScaleExt scaleExt() {
+ return scaleExt(0);
}
@SuppressWarnings("unchecked")
- public SWTBotScaleExt scale(int index) {
+ public SWTBotScaleExt scaleExt(int index) {
try {
List<Scale> bsrs = (List<Scale>) widgets(widgetOfType(Scale.class));
return new SWTBotScaleExt(bsrs.get(index));
13 years, 1 month
JBoss Tools SVN: r29405 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-03-01 05:29:44 -0500 (Tue, 01 Mar 2011)
New Revision: 29405
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java
Log:
fixed compile error
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java 2011-03-01 09:54:58 UTC (rev 29404)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java 2011-03-01 10:29:44 UTC (rev 29405)
@@ -96,7 +96,7 @@
}
private void createDD(String project) {
- SWTBotTree tree = projectExplorer.tree();
+ SWTBotTree tree = projectExplorer.bot().tree();
SWTBotTreeItem ti = tree.expandNode(project);
bot.sleep(1500);
ti = ti.getNode("Deployment Descriptor: " + project);
13 years, 1 month
JBoss Tools SVN: r29404 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-03-01 04:54:58 -0500 (Tue, 01 Mar 2011)
New Revision: 29404
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
Log:
swtbotext: several tests for remote server configurations
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java 2011-03-01 09:52:50 UTC (rev 29403)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -1,13 +1,8 @@
package org.jboss.tools.ui.bot.ext.test.config;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
@@ -26,30 +21,12 @@
@Test
public void serverExists() {
- boolean found=false;
- for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- found = true;
- break;
- }
- }
- assertTrue(found);
+ ServerUtil.serverExists();
}
@Test
public void serverRunning() {
- SWTBotTreeItem server =null;
- SWTBotTree tree = servers.show().bot().tree();
- for (SWTBotTreeItem item : tree.getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- server = item;
- break;
- }
- }
- if (server!=null) {
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
- assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
- }
+ ServerUtil.serverRunning();
}
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java 2011-03-01 09:52:50 UTC (rev 29403)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -1,14 +1,9 @@
package org.jboss.tools.ui.bot.ext.test.config;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
@@ -27,30 +22,12 @@
@Test
public void serverExists() {
- boolean found=false;
- for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- found = true;
- break;
- }
- }
- assertTrue(found);
+ ServerUtil.serverExists();
}
@Test
public void serverRunning() {
- SWTBotTreeItem server =null;
- SWTBotTree tree = servers.show().bot().tree();
- for (SWTBotTreeItem item : tree.getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- server = item;
- break;
- }
- }
- if (server!=null) {
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
- assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
- }
+ ServerUtil.serverRunning();
}
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java 2011-03-01 09:52:50 UTC (rev 29403)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -1,14 +1,9 @@
package org.jboss.tools.ui.bot.ext.test.config;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
@@ -27,30 +22,12 @@
@Test
public void serverExists() {
- boolean found=false;
- for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- found = true;
- break;
- }
- }
- assertTrue(found);
+ ServerUtil.serverExists();
}
@Test
public void serverRunning() {
- SWTBotTreeItem server =null;
- SWTBotTree tree = servers.show().bot().tree();
- for (SWTBotTreeItem item : tree.getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- server = item;
- break;
- }
- }
- if (server!=null) {
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
- assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
- }
+ ServerUtil.serverRunning();
}
}
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedLocalServer.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -0,0 +1,30 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerLocation;
+import org.junit.Test;
+@SWTBotTestRequires(server=(a)Server(location=ServerLocation.Local),perspective="Java EE")
+public class AnnotatedLocalServer extends SWTTestExt{
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ assertTrue(configuredState.getServer().isLocal);
+ }
+
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+
+ @Test
+ public void serverRunning() {
+ ServerUtil.serverRunning();
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java 2011-03-01 09:52:50 UTC (rev 29403)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -27,14 +27,7 @@
@Test
public void serverExists() {
- boolean found=false;
- for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- found = true;
- break;
- }
- }
- assertTrue(found);
+ ServerUtil.serverExists();
}
@Test
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedRemoteServer.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -0,0 +1,25 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerLocation;
+import org.junit.Test;
+@SWTBotTestRequires(server=(a)Server(location=ServerLocation.Remote),perspective="Java EE")
+public class AnnotatedRemoteServer extends SWTTestExt{
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ assertFalse(configuredState.getServer().isLocal);
+ }
+
+ @Test
+ public void serverExists() {
+ ServerUtil.serverExists();
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java 2011-03-01 09:52:50 UTC (rev 29403)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -1,14 +1,9 @@
package org.jboss.tools.ui.bot.ext.test.config;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
@@ -27,30 +22,12 @@
@Test
public void serverExists() {
- boolean found=false;
- for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- found = true;
- break;
- }
- }
- assertTrue(found);
+ ServerUtil.serverExists();
}
@Test
public void serverRunning() {
- SWTBotTreeItem server =null;
- SWTBotTree tree = servers.show().bot().tree();
- for (SWTBotTreeItem item : tree.getAllItems()) {
- if (item.getText().startsWith(configuredState.getServer().name)) {
- server = item;
- break;
- }
- }
- if (server!=null) {
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
- assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
- }
+ ServerUtil.serverRunning();
}
}
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ConfigBeanTest.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -0,0 +1,38 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import static org.junit.Assert.*;
+
+import org.jboss.tools.ui.bot.ext.config.RemoteSystemBean;
+import org.jboss.tools.ui.bot.ext.config.ServerBean;
+import org.junit.Test;
+
+public class ConfigBeanTest {
+
+ @Test
+ public void serverBeanRemote() throws Exception{
+ ServerBean bean = ServerBean.fromString("EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as,jawa23.mw.lab.eng.brq.redhat.com,/opt/jboss-as");
+ assertEquals(bean.type,"EAP");
+ assertEquals(bean.version,"5.0");
+ assertEquals(bean.withJavaVersion,"1.6");
+ assertEquals(bean.runtimeHome,"/data/jboss/jboss-eap-5.0/jboss-as");
+ assertEquals(bean.remoteSystem,"jawa23.mw.lab.eng.brq.redhat.com");
+ assertEquals(bean.remoteHome, "/opt/jboss-as");
+ }
+ @Test
+ public void serverBeanLocal() throws Exception{
+ ServerBean bean = ServerBean.fromString("EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as");
+ assertEquals(bean.type,"EAP");
+ assertEquals(bean.version,"5.0");
+ assertEquals(bean.withJavaVersion,"1.6");
+ assertEquals(bean.runtimeHome,"/data/jboss/jboss-eap-5.0/jboss-as");
+ assertNull(bean.remoteSystem);
+ assertNull(bean.remoteHome);
+ }
+ @Test
+ public void remoteSystem() throws Exception {
+ RemoteSystemBean bean = RemoteSystemBean.fromString("lzoubek,jawa23.mw.lab.eng.brq.redhat.com,/home/lzoubek/.ssh/id_rsa");
+ assertEquals(bean.user,"lzoubek");
+ assertEquals(bean.host,"jawa23.mw.lab.eng.brq.redhat.com");
+ assertEquals(bean.key,"/home/lzoubek/.ssh/id_rsa");
+ }
+}
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ServerUtil.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -0,0 +1,39 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import static org.junit.Assert.*;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+public class ServerUtil {
+
+ public static void serverExists() {
+ boolean found=false;
+ for (SWTBotTreeItem item : SWTTestExt.servers.show().bot().tree().getAllItems()) {
+ if (item.getText().startsWith(SWTTestExt.configuredState.getServer().name)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+
+ public static void serverRunning() {
+ SWTBotTreeItem server =null;
+ SWTBotTree tree = SWTTestExt.servers.show().bot().tree();
+ for (SWTBotTreeItem item : tree.getAllItems()) {
+ if (item.getText().startsWith(SWTTestExt.configuredState.getServer().name)) {
+ server = item;
+ break;
+ }
+ }
+ if (server!=null) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
+ }
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java 2011-03-01 09:52:50 UTC (rev 29403)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java 2011-03-01 09:54:58 UTC (rev 29404)
@@ -15,6 +15,7 @@
import org.junit.runners.Suite.SuiteClasses;
@SuiteClasses( {
+ ConfigBeanTest.class,
NotAnnotated.class,
//ClassWithoutTests.class,
AnnotatedDefaultServer.class,
@@ -26,6 +27,8 @@
AnnotatedDisabledServer.class,
AnonatedRunningServer.class,
AnnotatedWithSeam.class,
+ AnnotatedRemoteServer.class,
+ AnnotatedLocalServer.class
})
@RunWith(RequirementAwareSuite.class)
public class Suite {
13 years, 1 month
JBoss Tools SVN: r29403 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext: src/org/jboss/tools/ui/bot/ext and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-03-01 04:52:50 -0500 (Tue, 01 Mar 2011)
New Revision: 29403
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/RemoteSystemBean.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddRemoteSystem.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveRemoteSystem.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/RemoteSystems.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
Log:
swtbotext: added support for remote servers/deployment (can be now auto-configured and forced by annotations)
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2011-03-01 09:52:50 UTC (rev 29403)
@@ -2,9 +2,12 @@
# all properties are optional, all defined paths should exist
# <java version>,<jre/jdk home>
JAVA=1.6,/opt/sun-jdk-1.6.0.19/jre
-#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>
+#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>,<optional remote system host>,<optional remote home>
# note : when server is type of SOA, version is version of SOA (not the bundled EAP)
SERVER=EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as
+#SERVER=EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as,remote.example.com,/opt/jboss-eap-5.0/jboss-as
+# remote system= <user>,<host>,<private key>
+#RS=lzoubek,remote.example.com,/home/lzoubek/.ssh/id_rsa
#<seam version>,<seam runtime home>
SEAM=2.2,/data/jboss/jboss-eap-5.0/seam
#<esb versoin>,<esb runtime home>
@@ -19,4 +22,4 @@
#DB=hsqldb18,1.8,/home/username/lib/hsqldb/lib/hsqldb.jar,jdbc:hsqldb:hsql://localhost:8001/xdb,sa,,
#Connection profile named <db_type>_<version> will be created
#Annotation usage for TestCase db=@DB
-DB=hsqldb18,internal,driver,jdbc,user,,
\ No newline at end of file
+DB=hsqldb18,internal,driver,jdbc,user,,
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -19,6 +19,7 @@
import static org.junit.Assert.fail;
import java.io.File;
+import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -33,6 +34,7 @@
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
@@ -49,7 +51,11 @@
import org.jboss.tools.ui.bot.ext.entity.JavaClassEntity;
import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.ServerServer;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.Preference;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View;
+import org.jboss.tools.ui.bot.ext.gen.INewObject;
import org.jboss.tools.ui.bot.ext.gen.IServer;
import org.jboss.tools.ui.bot.ext.gen.IServerRuntime;
import org.jboss.tools.ui.bot.ext.types.EntityType;
@@ -58,6 +64,7 @@
import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
import org.jboss.tools.ui.bot.ext.types.ViewType;
import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
+import org.jboss.tools.ui.bot.ext.view.RemoteSystems;
/**
* Provides Eclipse common operation based on SWTBot element operations
@@ -485,10 +492,28 @@
* @param serverName
*/
public void addServer(IServer server, String serverName) {
+ addServer(server, serverName, null,null);
+ }
+ /**
+ * adds server (Server runtime must be defined, the default selected runtime
+ * is used)
+ *
+ * @param server
+ * to add ( for example
+ * {@link ActionItem.Server.JBossCommunityJBossAS50#LABEL} class)
+ * @param serverName
+ */
+ public void addServer(IServer server, String serverName, String remoteSystem,String remoteHome) {
log.info("Adding server: " + serverName);
SWTBot wiz = open.newObject(ActionItem.NewObject.ServerServer.LABEL);
open.selectTreeNode(server);
wiz.textWithLabel(ServerServer.TEXT_SERVER_NAME).setText(serverName);
+ wiz.button(IDELabel.Button.NEXT).click();
+ if (remoteSystem!=null && remoteHome!=null) {
+ wiz.comboBoxInGroup("Server Behaviour", 0).setSelection("Remote System Deployment");
+ wiz.comboBoxWithLabel("Host").setSelection(remoteSystem);
+ wiz.textInGroup("Server Behaviour", 0).setText(remoteHome);
+ }
open.finish(wiz);
}
/**
@@ -680,8 +705,53 @@
props.put(IDELabel.JBossServerRuntimeDialog.NAME, name);
addServerRuntime(runtime, props, jreToUse);
}
-
/**
+ * adds remote system to RSE, does not verify hostname
+ * @param connectionName
+ * @param hostname
+ */
+ public void addRemoteSystem(String connectionName, String hostname) {
+ log.info(String.format("Adding remote system connection name=%s hostname=%s",connectionName,hostname));
+ RemoteSystems remote = new RemoteSystems();
+ if (remote.existsConnection(connectionName)) {
+ log.warn(String.format("Connection called '%' already exits, skipping",connectionName));
+ return;
+ }
+ SWTBot wiz = open.newObject(NewObject.create("Remote System Explorer","Connection"));
+ open.selectTreeNode(ActionItem.create("General","SSH Only"));
+ wiz.button(IDELabel.Button.NEXT).click();
+ wiz.textWithLabel("Connection name:").setText(connectionName);
+ wiz.comboBoxWithLabel("Host name:").setText(hostname);
+ wiz.checkBox("Verify host name").deselect();
+ open.finish(wiz);
+ log.info("Connection was added");
+ }
+ /**
+ * adds path to private key into SSH2 Preference page
+ * @param pathToKey
+ */
+ public void setSSHKey(String pathToKey) {
+ SWTBot wiz = open.preferenceOpen(Preference.create("General","Network Connections","SSH2"));
+ wiz.tabItem("General").activate();
+ wiz.textWithLabel("Private keys:").setText(pathToKey);
+ open.finish(wiz, IDELabel.Button.OK);
+ }
+ public void removeRemoteSystem(String connectionName) {
+ log.info(String.format("Removing remote system connection name=%s",connectionName));
+ RemoteSystems remote = new RemoteSystems();
+ if (remote.existsConnection(connectionName)) {
+ log.warn(String.format("Connection called '%' does not exist!",connectionName));
+ return;
+ }
+ remote.bot().tree().select(connectionName);
+ if (!remote.bot().tree().contextMenu(IDELabel.Menu.DELETE).isEnabled()) {
+ remote.bot().tree().contextMenu("Disconnect").click();
+ }
+ remote.bot().tree().contextMenu(IDELabel.Menu.DELETE).click();
+ open.finish(bot.shell("Delete Confirmation").bot(), true);
+ log.info("Connection was removed");
+ }
+ /**
* adds server runtime only if it's not specified yet
*
* @param runtime type of runtime
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -5,8 +5,10 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+
public class Annotations {
/**
* annotation which defines requirement of whole test Class
@@ -16,8 +18,12 @@
* <li>{@link SWTBotTestRequires#clearProjects()}</li>
* <li>{@link SWTBotTestRequires#clearWorkspace()}</li>
* <li>{@link SWTBotTestRequires#perspective()}</li>
+ * <li>{@link SWTBotTestRequires#runOnce()}</li>
* <li>{@link Server}</li>
* <li>{@link Seam}</li>
+ * <li>{@link ESB}</li>
+ * <li>{@link DB}</li>
+ * <li>{@link JBPM}</li>
* </ul>
* @author lzoubek
*
@@ -50,17 +56,17 @@
*/
String perspective() default "";
/**
- * my default workspace is cleaned before test (attempt to close all shells and editors, closes 'Welcome' view),
+ * workspace is cleaned before test class is run (attempt to close all shells and editors, closes 'Welcome' view),
* setting this to false will disable this feature
* @return
*/
+ boolean clearWorkspace() default true;
/**
* optionally require Database
* @return
*/
DB db() default @DB (required = false);
- boolean clearWorkspace() default true;
/**
* by default all projects are undeployed from pre-configured server & deleted before test runs
* setting this to false will disable this feature
@@ -77,7 +83,9 @@
boolean runOnce() default false;
}
/**
- * Server requirement, by default matches all server types and versions
+ * Server requirement, by default matches all server types and versions,
+ * if you enable this requirement, you get server running before your test class
+ * runs. Server name,type and version can be retrieved via {@link SWTTestExt#configuredState}
* @author lzoubek
*
*/
@@ -89,16 +97,21 @@
*/
boolean required() default true;
/**
- * state (default Running)
+ * state (default (default {@link ServerState#ALL}))
* @return
*/
ServerState state() default ServerState.Running;
/**
- * server type to match (Default ALL)
+ * server type to match (default {@link ServerType#ALL})
* @return
*/
ServerType type() default ServerType.ALL;
/**
+ * server location (derfault {@link ServerLocation#Any})
+ * @return
+ */
+ ServerLocation location() default ServerLocation.Any;
+ /**
* version of required server (use * for all versions) default *
* @return
*/
@@ -110,7 +123,8 @@
String operator() default "=";
}
/**
- *
+ * Seam runtime requirement, by default matches all versions, if enabled seam runtime will
+ * be configured in workspace before test class runs. Runtime details can be referenced from {@link SWTTestExt#configuredState}
* @author lzoubek(a)redhat.com
*
*/
@@ -196,7 +210,6 @@
*/
String operator() default "=";
}
-
public enum ServerState {
/**
* server is present, no matter if runs or not
@@ -215,6 +228,20 @@
*/
Disabled
}
+ public enum ServerLocation {
+ /**
+ * no matter where is server located (default)
+ */
+ Any,
+ /**
+ * server is required to be local
+ */
+ Local,
+ /**
+ * server is running on remote host
+ */
+ Remote,
+ }
public enum ServerType {
/**
* SOA platform (includes EAP)
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -7,10 +7,8 @@
/**
* this class represents state of running test suite. Properties of this object
- * should be changed only by classed extending {@link RequirementBase} class.
- *
+ * should be changed only by classes extending {@link RequirementBase} class.
* @author lzoubek(a)redhat.com
- *
*/
public class ConfiguredState {
private List<String> jreList = new Vector<String>();
@@ -19,7 +17,8 @@
private ESB esb = new ESB();
private JBPM jbpm = new JBPM();
private DB db = new DB();
-
+ private RemoteSystem remoteSystem = new RemoteSystem();
+
private boolean viewsPrepared = false;
public boolean isViewsPrepared() {
@@ -79,7 +78,18 @@
public DB getDB() {
return db;
}
-
+ /**
+ * gets configured remote host
+ * @return
+ */
+ public RemoteSystem getRemoteSystem() {
+ return remoteSystem;
+ }
+ /**
+ * represents current server configuration
+ * @author lzoubek
+ *
+ */
public class Server {
/**
* is server runtime & server added?
@@ -110,7 +120,26 @@
* version of bundled ESB (applicable only for server type SOA)
*/
public String bundledESBVersion=null;
+ /**
+ * is server local? if no see {@link RemoteSystem}
+ */
+ public boolean isLocal = true;
+
}
+ public class RemoteSystem {
+ /**
+ * is configured?
+ */
+ public boolean isConfigured = false;
+ /**
+ * server's hostname
+ */
+ public String remoteHost = null;
+ /**
+ * server's remote username
+ */
+ public String remoteUser = null;
+ }
public class Seam {
/**
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/RemoteSystemBean.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/RemoteSystemBean.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/RemoteSystemBean.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -0,0 +1,28 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+public class RemoteSystemBean {
+ public String user;
+ public String host;
+ public String key;
+ public static RemoteSystemBean fromString(String propValue) throws Exception {
+ try {
+ if (propValue == null) {
+ return null;
+ }
+ String[] rsParams = propValue.split(",");
+ RemoteSystemBean bean = new RemoteSystemBean();
+ bean.user = rsParams[0];
+ bean.host = rsParams[1];
+ bean.key = rsParams[2];
+ return bean;
+ } catch (Exception ex) {
+ throw new Exception("Cannot parse RS property line="+propValue, ex);
+ }
+ }
+
+ @Override
+ public String toString() {
+ return String.format("Remote System user=%s, host=%s, key=%s",
+ this.user, this.host, this.key);
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -1,5 +1,7 @@
package org.jboss.tools.ui.bot.ext.config;
+import java.util.Arrays;
+
/**
*
* @author lzoubek
@@ -11,8 +13,15 @@
public String runtimeHome;
public String withJavaVersion;
public String type;
-
/**
+ * name of remote system for this server, if null, server is local
+ */
+ public String remoteSystem;
+ /**
+ * home of app server located in remote system
+ */
+ public String remoteHome;
+ /**
* creates bean instance from property string
* @param propValue property value
* @return
@@ -29,6 +38,11 @@
bean.runtimeHome=serverParams[3];
bean.version=serverParams[1];
bean.type = serverParams[0];
+
+ if (serverParams.length>4) {
+ bean.remoteSystem=serverParams[4];
+ bean.remoteHome=serverParams[5];
+ }
return bean;
}
catch (Exception ex) {
@@ -37,7 +51,7 @@
}
@Override
public String toString() {
- return String.format("Server type=%s,version=%s,home=%s,withJava=%s", this.type,this.version,this.runtimeHome,this.withJavaVersion);
+ return String.format("Server type=%s,version=%s,home=%s,withJava=%s,remoteSystem=%s", this.type,this.version,this.runtimeHome,this.withJavaVersion,this.remoteSystem);
}
/**
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -8,7 +8,7 @@
import org.apache.log4j.Logger;
import org.jboss.tools.ui.bot.ext.Activator;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator.Keys;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator.Values;
@@ -30,7 +30,8 @@
private JavaBean java;
private JBPMBean jbpm;
private DBBean db;
-
+ private RemoteSystemBean remoteSystem;
+
public TestConfiguration(String propName, String propFile) throws Exception {
this.propName = propName;
this.propFile = propFile;
@@ -44,15 +45,18 @@
} else {
log.info("Loading default configuration");
- swtTestProperties.load(new FileInputStream(SWTTestExt.util
+ swtTestProperties.load(new FileInputStream(SWTUtilExt
.getResourceFile(Activator.PLUGIN_ID,
"/SWTBotTest-default.properties")));
}
// properties got loaded
java = JavaBean.fromString(getProperty(Keys.JAVA));
printConfig(Keys.JAVA, java);
+ log.info(getProperty(Keys.SERVER));
server = ServerBean.fromString(getProperty(Keys.SERVER));
printConfig(Keys.SERVER, server);
+ remoteSystem = RemoteSystemBean.fromString(getProperty(Keys.RS));
+ printConfig(Keys.RS, remoteSystem);
seam = SeamBean.fromString(getProperty(Keys.SEAM));
printConfig(Keys.SEAM, seam);
esb = ESBBean.fromString(getProperty(Keys.ESB));
@@ -60,6 +64,7 @@
jbpm = JBPMBean.fromString(getProperty(Keys.JBPM));
printConfig(Keys.JBPM, jbpm);
db = DBBean.fromString(getProperty(Keys.DB));
+ printConfig(Keys.DB,db);
checkConfig();
}
@@ -111,8 +116,27 @@
+ java.version);
}
}
+
+ if (server!=null) {
+ if (server.remoteSystem!=null) {
+ if (remoteSystem!=null) {
+ if (!server.remoteSystem.equals(remoteSystem.host)) {
+ throw new Exception("Server is configured with remote system called "
+ + server.remoteSystem
+ +" but RS is configured as "
+ + remoteSystem.host
+ +" these names must be equal");
+ }
+ }
+ else {
+ throw new Exception(
+ "Server is configured to run with remote system "
+ + server.remoteSystem
+ + " but no RS is configured");
+ }
+ }
+ }
return true;
-
}
private static void checkDirExists(String dir) throws FileNotFoundException {
@@ -159,4 +183,7 @@
public DBBean getDB() {
return db;
}
+ public RemoteSystemBean getRemoteSystem() {
+ return remoteSystem;
+ }
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -17,6 +17,7 @@
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Seam;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerLocation;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
@@ -31,6 +32,7 @@
public static final String ESB = "ESB";
public static final String JBPM = "JBPM";
public static final String DB = "DB";
+ public static final String RS = "RS";
}
public class Values {
@@ -165,22 +167,37 @@
return null;
}
}
+ if (s.location().equals(ServerLocation.Local) && currentConfig.getServer().remoteSystem!=null) {
+ return null;
+ }
+ if (s.location().equals(ServerLocation.Remote) && currentConfig.getServer().remoteSystem==null) {
+ return null;
+ }
if (!matches(currentConfig.getServer().version, s.operator(),
s.version())) {
return null;
}
- if (ServerState.Disabled.equals(s.state())) {
- RequirementBase removeServer = RequirementBase.createRemoveServer();
- removeServer.getDependsOn().add(RequirementBase.createStopServer());
- return removeServer;
- } else if (ServerState.NotRunning.equals(s.state())) {
- RequirementBase stopServer = RequirementBase.createStopServer();
- stopServer.getDependsOn().add(RequirementBase.createAddServer());
- return stopServer;
- } else if (ServerState.Present.equals(s.state())) {
- return RequirementBase.createAddServer();
- }
- return RequirementBase.createStartServer();
+ RequirementBase serverReq = null;
+ switch (s.state()) {
+ case Disabled: {
+ serverReq = RequirementBase.createRemoveServer();
+ serverReq.getDependsOn().add(RequirementBase.createStopServer());
+ break;
+ }
+ case NotRunning: {
+ serverReq = RequirementBase.createStopServer();
+ serverReq.getDependsOn().add(RequirementBase.createAddServer());
+ break;
+ }
+ case Present:{
+ serverReq = RequirementBase.createAddServer();
+ break;
+ }
+ default:
+ serverReq = RequirementBase.createStartServer();
+ break;
+ }
+ return serverReq;
}
/**
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddRemoteSystem.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddRemoteSystem.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddRemoteSystem.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -0,0 +1,24 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+
+public class AddRemoteSystem extends RequirementBase {
+
+ @Override
+ public boolean checkFulfilled() {
+ return SWTTestExt.configuredState.getRemoteSystem().isConfigured &&
+ SWTTestExt.configuredState.getRemoteSystem().remoteHost.equals(TestConfigurator.currentConfig.getServer().remoteSystem);
+ }
+
+ @Override
+ public void handle() {
+ SWTTestExt.eclipse.setSSHKey(TestConfigurator.currentConfig.getRemoteSystem().key);
+ String hostname = TestConfigurator.currentConfig.getRemoteSystem().host;
+ SWTTestExt.eclipse.addRemoteSystem(hostname, hostname);
+ SWTTestExt.configuredState.getRemoteSystem().isConfigured=true;
+ SWTTestExt.configuredState.getRemoteSystem().remoteHost=hostname;
+ SWTTestExt.configuredState.getRemoteSystem().remoteUser = TestConfigurator.currentConfig.getRemoteSystem().user;
+ }
+
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -33,6 +33,9 @@
getDependsOn().add(addJava);
javaName=addJava.getAddedAsName();
}
+ if (TestConfigurator.currentConfig.getServer().remoteSystem!=null) {
+ getDependsOn().add(createAddRemoteSystem());
+ }
}
@@ -53,7 +56,10 @@
String runtimeName=TestConfigurator.currentConfig.getServer().type+"-"+TestConfigurator.currentConfig.getServer().version;
SWTTestExt.eclipse.addJbossServerRuntime(serverInfo.runtime,
runtimeHome, runtimeName, javaName);
- SWTTestExt.eclipse.addServer(serverInfo.server, runtimeName);
+ String remoteSystem = TestConfigurator.currentConfig.getServer().remoteSystem;
+ String remoteHome = TestConfigurator.currentConfig.getServer().remoteHome;
+ SWTTestExt.eclipse.addServer(serverInfo.server, runtimeName,remoteSystem,remoteHome);
+ SWTTestExt.configuredState.getServer().isLocal = remoteSystem==null;
SWTTestExt.configuredState.getServer().isConfigured=true;
SWTTestExt.configuredState.getServer().name=runtimeName;
SWTTestExt.configuredState.getServer().version=TestConfigurator.currentConfig.getServer().version;
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveRemoteSystem.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveRemoteSystem.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveRemoteSystem.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -0,0 +1,20 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.view.RemoteSystems;
+
+public class RemoveRemoteSystem extends RequirementBase {
+
+ @Override
+ public boolean checkFulfilled() {
+ return !SWTTestExt.configuredState.getRemoteSystem().isConfigured;
+ }
+
+ @Override
+ public void handle() {
+ String connection = SWTTestExt.configuredState.getRemoteSystem().remoteHost;
+ String user = SWTTestExt.configuredState.getRemoteSystem().remoteUser;
+ SWTTestExt.eclipse.removeRemoteSystem(connection);
+ }
+
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -162,7 +162,15 @@
RequirementBase req = new RemoveServer();
return req;
}
-
+ public static RequirementBase createAddRemoteSystem() {
+ RequirementBase req = new AddRemoteSystem();
+ return req;
+ }
+
+ public static RequirementBase createRemoveRemoteSystem() {
+ RequirementBase req = new RemoveRemoteSystem();
+ return req;
+ }
public static RequirementBase prepareDB () {
RequirementBase req = new PrepareDB();
return req;
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StartServer.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -21,8 +21,10 @@
@Override
public void handle(){
if (!checkFulfilled()){
- SWTTestExt.servers.startServer(SWTTestExt.configuredState.getServer().name);
- SWTTestExt.configuredState.getServer().isRunning = true;
+ String server = SWTTestExt.configuredState.getServer().name;
+ String user = SWTTestExt.configuredState.getRemoteSystem().remoteUser;
+ SWTTestExt.servers.startServer(server,user,null);
+ SWTTestExt.configuredState.getServer().isRunning = true;
}
}
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -49,6 +49,34 @@
};
}
public static class View {
+ /**
+ * creates new action item instance from given path
+ * @param path
+ * @return
+ */
+ public static IView create(final String...path) {
+ if (path.length<1) {
+ throw new IllegalArgumentException("path must contain at least 1 item");
+ }
+ return new IView() {
+
+ @Override
+ public String getName() {
+ // TODO Auto-generated method stub
+ return path[path.length-1];
+ }
+
+ @Override
+ public List<String> getGroupPath() {
+ List<String> l = new Vector<String>();
+ for (int i=0; i<path.length-1;i++) {
+ l.add(path[i]);
+ }
+ return l;
+ }
+
+ };
+ }
public static class JavaBrowsingTypes {
/**
* represents item : Java Browsing->Types
@@ -2046,6 +2074,34 @@
}
public static class NewObject {
+ /**
+ * creates new action item instance from given path
+ * @param path
+ * @return
+ */
+ public static INewObject create(final String...path) {
+ if (path.length<1) {
+ throw new IllegalArgumentException("path must contain at least 1 item");
+ }
+ return new INewObject() {
+
+ @Override
+ public String getName() {
+ // TODO Auto-generated method stub
+ return path[path.length-1];
+ }
+
+ @Override
+ public List<String> getGroupPath() {
+ List<String> l = new Vector<String>();
+ for (int i=0; i<path.length-1;i++) {
+ l.add(path[i]);
+ }
+ return l;
+ }
+
+ };
+ }
public static class CVSProjectsfromCVS {
/**
* represents item : CVS->Projects from CVS
@@ -7394,6 +7450,34 @@
}
public static class Preference {
+ /**
+ * creates new action item instance from given path
+ * @param path
+ * @return
+ */
+ public static IPreference create(final String...path) {
+ if (path.length<1) {
+ throw new IllegalArgumentException("path must contain at least 1 item");
+ }
+ return new IPreference() {
+
+ @Override
+ public String getName() {
+ // TODO Auto-generated method stub
+ return path[path.length-1];
+ }
+
+ @Override
+ public List<String> getGroupPath() {
+ List<String> l = new Vector<String>();
+ for (int i=0; i<path.length-1;i++) {
+ l.add(path[i]);
+ }
+ return l;
+ }
+
+ };
+ }
public static class RunDebugViewManagement {
/**
* represents item : Run/Debug->View Management
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/RemoteSystems.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/RemoteSystems.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/RemoteSystems.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -0,0 +1,52 @@
+package org.jboss.tools.ui.bot.ext.view;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+public class RemoteSystems extends ViewBase {
+ Logger log = Logger.getLogger(RemoteSystems.class);
+
+ public RemoteSystems() {
+ viewObject = View.create("Remote Systems","Remote Systems");
+ }
+ public boolean existsConnection(String name) {
+ try {
+ bot().tree().getTreeItem(name);
+ return true;
+ }
+ catch (WidgetNotFoundException e) {
+ return false;
+ }
+ }
+ public List<String> getConnections() {
+ List<String> list = new ArrayList<String>();
+ for (SWTBotTreeItem item : bot().tree().getAllItems()) {
+ list.add(item.getText());
+ }
+ return list;
+ }
+ public void connect(String connection,String username, String password) {
+ bot().tree().getTreeItem(connection).select();
+ bot().tree().contextMenu("Connect").click();
+ SWTBot shell = bot.shell("Enter password").bot();
+ if (username!=null)
+ shell.textWithLabel("User ID:").setText(username);
+ if (password!=null)
+ shell.textWithLabel("Password (optional):").setText(password);
+ shell.button(IDELabel.Button.OK).click();
+ util.waitForNonIgnoredJobs();
+ }
+ public void disconnect(String connection) {
+
+ }
+ public void delete(String connection) {
+
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2011-03-01 09:44:41 UTC (rev 29402)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2011-03-01 09:52:50 UTC (rev 29403)
@@ -90,6 +90,15 @@
* @param serverName
*/
public void startServer(String serverName) {
+ startServer(serverName, null, null);
+ }
+ /**
+ * start server with given name, username and password are used in case server is remote type
+ * @param serverName
+ * @param username remote user, can be null (server is then treated as local)
+ * @param password should be null when SSH keys are properly set
+ */
+ public void startServer(String serverName, String username, String password) {
show();
SWTBot bot = show().bot();
SWTBotTree tree = bot.tree();
@@ -97,6 +106,18 @@
if (server!=null) {
ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.START, false)).click();
+ if (username!=null) {
+ try {
+ SWTBot shell = bot.shell("Enter Password").bot();
+ shell.textWithLabel("User ID:").setText(username);
+ if (password!=null)
+ shell.textWithLabel("Password (optional):").setText(password);
+ shell.button(IDELabel.Button.OK).click();
+ }
+ catch (Exception ex){
+ log.error(ex);
+ }
+ }
util.waitForNonIgnoredJobs(Timing.time100S());
util.waitForAll(Timing.time3S());
}
@@ -105,7 +126,6 @@
"\nThis server is not defined within Servers view");
}
}
-
public SWTBotTreeItem findServerByName(SWTBotTree tree, String name) {
for (SWTBotTreeItem i : tree.getAllItems()) {
13 years, 1 month
JBoss Tools SVN: r29402 - in trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance: startup and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2011-03-01 04:44:41 -0500 (Tue, 01 Mar 2011)
New Revision: 29402
Added:
trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/
trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/JBDSStartupTest.java
trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/UIStartupTest.java
Log:
basic tests
Added: trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/JBDSStartupTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/JBDSStartupTest.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/JBDSStartupTest.java 2011-03-01 09:44:41 UTC (rev 29402)
@@ -0,0 +1,130 @@
+package org.jboss.tools.tests.performance.startup;
+
+//import org.eclipse.core.tests.runtime.perf.AllTests;
+
+import org.eclipse.core.tests.session.UIPerformanceSessionTestSuite;
+import org.jboss.tools.tests.performance.Activator;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/*
+ * http://wiki.eclipse.org/Session_Tests
+
+ -Dosgi.requiredJavaVersion=1.5
+ -XX:MaxPermSize=256m
+ -Xms40m
+ -Xmx512m
+ -Dusage_reporting_enabled=false
+ -Dsetup.override.vmArgs=Xms256m;Xmx384m;XX:-UseParallelGC;XX:+AggressiveOpts;XX:-UseConcMarkSweepGC
+ -Dsetup.debug=true
+ -Dsetup.override.systemProperties=Xverify=none,usage_reporting_enabled=false,eclipse.perf.dbloc=/tmp/db;create=true;dbname=perfdb;dbuser=guest;dbpasswd=guest,eclipse.perf.config=build=3.2_201009010244_201009010244;host=localhost;jvm=sun
+
+
+
+ <property name="perf.baseBuildID" value="3.2_201009010246_201009010246"/><!--3.2_201009010244_201009010244-->
+ <property name="perf.buildID" value="3.2_201009010250_201009010250"/>
+ <property name="perf.memory" value="-Xms256M -Xmx512M -XX:MaxPermSize=256M"/>
+ <property name="perf.db" value="-Declipse.perf.dbloc=${jbt.perf.db.loc};create=true;dbname=perfdb;dbuser=guest;dbpasswd=guest"/>
+ <property name="perf.config" value="-Declipse.perf.config=build=${perf.buildID};host=localhost;jvm=sun"/>
+ <condition property="perf.baseBuild" value="-Declipse.perf.assertAgainst=build=${perf.baseBuildID};host=localhost;jvm=sun" else="">
+ <and>
+ <isset property="perf.baseBuildID"/>
+ <not>
+ <equals arg1="${perf.baseBuildID}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+<arg line="-Dvmargs='${perf.memory} ${perf.db} ${perf.config} ${perf.baseBuild}'"/>
+
+
+
+ /space/java/sdk/jdk1.6.0_21/bin/java
+ -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:33469
+ -Dosgi.requiredJavaVersion=1.5
+ -XX:MaxPermSize=256m
+ -Xms256m
+ -Xmx384m
+ -Dusage_reporting_enabled=false
+ -Dsetup.override.vmArgs=Xms256m;Xmx512m;XX:-UseParallelGC;XX:+AggressiveOpts;XX:-UseConcMarkSweepGC
+ -Dsetup.debug=true
+ -DXXXsetup.override.systemProperties=usage_reporting_enabled=false;Xverify=none
+ -Declipse.perf.dbloc=/tmp/db;create=true;dbname=perfdb;dbuser=guest;dbpasswd=guest
+ -Declipse.perf.config=build=3.2_201009010247_201009010247;host=localhost;jvm=sun
+ -Declipse.perf.assertAgainst=build=3.2_201009010240_201009010240;host=localhost;jvm=sun
+ -Dsetup.override.systemProperties=usage_reporting_enabled=false
+ -Declipse.pde.launch=true
+ -Declipse.p2.data.area=(a)config.dir/p2
+ -Dfile.encoding=UTF-8
+ -classpath /home/lukas/latest/beta1/eclipse/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
+ org.eclipse.equinox.launcher.Main
+ -os linux
+ -ws gtk
+ -arch x86
+ -nl en_US
+ -consoleLog
+ -version 3
+ -port 38219
+ -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader
+ -loaderpluginname org.eclipse.jdt.junit4.runtime
+ -classNames org.jboss.tools.tests.perf.startup.JBDSStartupTest
+ -application org.eclipse.pde.junit.runtime.uitestapplication
+ -product com.jboss.jbds.product.product
+ -data /home/lukas/work/aworkspace/../junit-workspace
+ -configuration file:/home/lukas/work/aworkspace/.metadata/.plugins/org.eclipse.pde.core/pde-junit/
+ -dev file:/home/lukas/work/aworkspace/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties
+ -testpluginname org.jboss.tools.tests.perf
+
+ */
+public class JBDSStartupTest extends TestCase {
+ public static Test suite() {
+ System.setProperty("setup.debug", "true");
+ System.setProperty("setup.override.systemProperties", "usage_reporting_enabled=false");
+ TestSuite ts = new TestSuite("sample");
+ ts.addTest(new UIPerformanceSessionTestSuite(Activator.PLUGIN_ID, 4, UIStartupTest.class));
+ return ts;
+ }
+
+}
+
+
+/*
+Command line: [
+ /space/java/sdk/jdk1.6.0_22/jre/bin/java
+ -classpath
+ /home/lukas/latest/jbdevstudio/studio/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
+ -Dorg.eclipse.update.reconcile=false
+ -Dorg.eclipse.ui.testsWaitForEarlyStartup=false
+ -Declipse.consoleLog=true
+ org.eclipse.core.launcher.Main
+ -install
+ /home/lukas/latest/jbdevstudio/studio/
+ -port
+ 51776
+ -vm
+ /space/java/sdk/jdk1.6.0_22/jre/bin/java
+ -os
+ linux
+ -testpluginname
+ org.jboss.tools.tests.performance
+ -application
+ org.eclipse.pde.junit.runtime.uitestapplication
+ -arch
+ x86
+ -dev
+ file:/home/lukas/work/wsperf/.metadata/.plugins/org.eclipse.pde.core/pde-junit/dev.properties
+ -test
+ org.jboss.tools.tests.performance.startup.UIStartupTest:testUIApplicationStartup
+ -data
+ /tmp/workspace
+ -ws
+ gtk
+ -version
+ 3
+ -configuration
+ file:/home/lukas/work/wsperf/.metadata/.plugins/org.eclipse.pde.core/pde-junit/
+ -nl
+ en_US
+]
+*/
\ No newline at end of file
Added: trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/UIStartupTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/UIStartupTest.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.tests.performance/src/org/jboss/tools/tests/performance/startup/UIStartupTest.java 2011-03-01 09:44:41 UTC (rev 29402)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.tests.performance.startup;
+
+import junit.framework.*;
+import org.eclipse.test.performance.*;
+
+public class UIStartupTest extends TestCase {
+
+ public static Test suite() {
+ return new TestSuite(UIStartupTest.class);
+ }
+
+ public UIStartupTest(String methodName) {
+ super(methodName);
+ }
+
+ public void testUIApplicationStartup() {
+ PerformanceMeter meter = Performance.getDefault().createPerformanceMeter(getClass().getName() + '.' + getName());
+ try {
+ meter.stop();
+ Performance performance = Performance.getDefault();
+ performance.tagAsGlobalSummary(meter, "Core UI Startup", Dimension.ELAPSED_PROCESS);
+ meter.commit();
+ performance.assertPerformanceInRelativeBand(meter, Dimension.ELAPSED_PROCESS, -50, 5);
+ System.out.println("sleeping....");
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException ie) {
+
+ }
+ } finally {
+ meter.dispose();
+ }
+ }
+}
13 years, 1 month
JBoss Tools SVN: r29401 - in trunk/bpel/plugins/org.jboss.tools.bpel.runtimes: src/org/jboss/tools/bpel/runtimes/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-03-01 01:02:24 -0500 (Tue, 01 Mar 2011)
New Revision: 29401
Modified:
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml
trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
Log:
JBIDE-8465: make the bpel perspective opened when finishing creating bpel project
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml 2011-03-01 03:59:47 UTC (rev 29400)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/plugin.xml 2011-03-01 06:02:24 UTC (rev 29401)
@@ -26,6 +26,8 @@
category="org.eclipse.bpel.wizards"
project="true"
class="org.jboss.tools.bpel.runtimes.ui.wizards.NewBPELProjectWizard"
+ finalPerspective="org.eclipse.bpel.ui.perspective"
+ preferredPerspectives="org.eclipse.bpel.ui.perspective"
id="org.jboss.tools.bpel.runtimes.wizards.newBPELProject">
<description>%NEW_BPEL_PROJECT_DESCRIPTION</description>
</wizard>
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java 2011-03-01 03:59:47 UTC (rev 29400)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.runtimes/src/org/jboss/tools/bpel/runtimes/ui/wizards/NewBPELProjectWizard.java 2011-03-01 06:02:24 UTC (rev 29401)
@@ -103,4 +103,8 @@
protected IWizardPage createFirstPage() {
return new NewBPELProjectWizardPage1(model, "newBPELProject"); // $NON-NLS-1$
}
+
+ protected String getFinalPerspectiveID() {
+ return "org.eclipse.bpel.ui.perspective"; //$NON-NLS-1$
+ }
}
13 years, 1 month
JBoss Tools SVN: r29400 - trunk/bpel/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-02-28 22:59:47 -0500 (Mon, 28 Feb 2011)
New Revision: 29400
Modified:
trunk/bpel/docs/reference/en-US/detail.xml
Log:
General Documentation Updates
Modified: trunk/bpel/docs/reference/en-US/detail.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/detail.xml 2011-03-01 03:33:41 UTC (rev 29399)
+++ trunk/bpel/docs/reference/en-US/detail.xml 2011-03-01 03:59:47 UTC (rev 29400)
@@ -197,9 +197,9 @@
</figure>
</listitem>
<listitem>
- <para>Open the file "<property>HelloWorldArtifacts.wsdl</property>" in the "<property>HelloWorld</property>" project by double-clicking the file. Right-click the WSDL editor and select
- <property>Add Service</property>. A new service should appear in the editor. Name it <property>HelloWorldProcessService</property>. It has the Port
- named <property>NewPort</property>. Select it, right-click on it and rename it to <property>HelloWorldProcessPort</property> in the Properties
+ <para>Open the file <filename>HelloWorldArtifacts.wsdl</filename> in the <filename>HelloWorld</filename> project by double-clicking the file. Right-click the WSDL editor and select
+ <property>Add Service</property>. A new service should appear in the editor. Name it <filename>HelloWorldProcessService</filename>. It has the Port
+ named <property>NewPort</property>. Select it, right-click on it and rename it to <filename>HelloWorldProcessPort</filename> in the Properties
view.
</para>
<figure>
13 years, 1 month