Author: ljelinko
Date: 2012-05-17 07:37:44 -0400 (Thu, 17 May 2012)
New Revision: 41109
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/DetectEAP4.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/OperateEAP4.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/DetectEAP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/OperateEAP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/DetectEAP6.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/OperateEAP6.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/DetectEPP4.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/OperateEPP4.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/DetectEPP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/OperateEPP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/DetectEWP5.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/OperateEWP5.java
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/runtimes.properties
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/AllTestsSuite.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/OperateServerTemplate.java
Log:
Initial tests commit.
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch 2012-05-17
11:36:43 UTC (rev 41108)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch 2012-05-17
11:37:44 UTC (rev 41109)
@@ -6,7 +6,13 @@
<booleanAttribute key="M2_OFFLINE" value="false"/>
<stringAttribute key="M2_PROFILES" value=""/>
<listAttribute key="M2_PROPERTIES">
-<listEntry value="jboss-as-7-1=${folder_prompt:JBoss AS 7.1 installation
folder}"/>
+<listEntry value="jboss-as-7=${folder_prompt:JBoss AS 7 installation
folder}"/>
+<listEntry value="jboss-eap-6=${folder_prompt:EAP 6 installation
folder}"/>
+<listEntry value="jboss-eap-5=${folder_prompt:EAP 5 installation
folder}"/>
+<listEntry value="jboss-eap-4=${folder_prompt:EAP 4 installation
folder}"/>
+<listEntry value="jboss-epp-5=${folder_prompt:EPP 5 installation
folder}"/>
+<listEntry value="jboss-epp-4=${folder_prompt:EPP 4 installation
folder}"/>
+<listEntry value="jboss-ewp-5=${folder_prompt:EWP 5 installation
folder}"/>
</listAttribute>
<stringAttribute key="M2_RUNTIME"
value="/home/ljelinko/programs/apache-maven-3.0.3"/>
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/runtimes.properties
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/runtimes.properties 2012-05-17
11:36:43 UTC (rev 41108)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/resources/template/runtimes.properties 2012-05-17
11:37:44 UTC (rev 41109)
@@ -1 +1,7 @@
-jboss-as-7.1.1.Final=${jboss-as-7-1}
\ No newline at end of file
+jboss-as-7.1.1.Final=${jboss-as-7}
+jboss-eap-6.0=${jboss-eap-6}
+jboss-eap-5.1=${jboss-eap-5}
+jboss-eap-4.3=${jboss-eap-4}
+jboss-epp-5.2=${jboss-epp-5}
+jboss-epp-4.3=${jboss-epp-4}
+jboss-ewp-5.1=${jboss-ewp-5}
\ No newline at end of file
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/AllTestsSuite.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/AllTestsSuite.java 2012-05-17
11:36:43 UTC (rev 41108)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/AllTestsSuite.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -1,5 +1,17 @@
package org.jboss.tools.runtime.as.ui.bot.test;
+import org.jboss.tools.runtime.as.ui.bot.test.eap4.DetectEAP4;
+import org.jboss.tools.runtime.as.ui.bot.test.eap4.OperateEAP4;
+import org.jboss.tools.runtime.as.ui.bot.test.eap5.DetectEAP5;
+import org.jboss.tools.runtime.as.ui.bot.test.eap5.OperateEAP5;
+import org.jboss.tools.runtime.as.ui.bot.test.eap6.DetectEAP6;
+import org.jboss.tools.runtime.as.ui.bot.test.eap6.OperateEAP6;
+import org.jboss.tools.runtime.as.ui.bot.test.epp4.DetectEPP4;
+import org.jboss.tools.runtime.as.ui.bot.test.epp4.OperateEPP4;
+import org.jboss.tools.runtime.as.ui.bot.test.epp5.DetectEPP5;
+import org.jboss.tools.runtime.as.ui.bot.test.epp5.OperateEPP5;
+import org.jboss.tools.runtime.as.ui.bot.test.ewp5.DetectEWP5;
+import org.jboss.tools.runtime.as.ui.bot.test.ewp5.OperateEWP5;
import org.jboss.tools.runtime.as.ui.bot.test.jboss71.DetectJBoss71;
import org.jboss.tools.runtime.as.ui.bot.test.jboss71.OperateJBoss71;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
@@ -9,7 +21,19 @@
@RunWith(RequirementAwareSuite.class)
@Suite.SuiteClasses({
DetectJBoss71.class,
- OperateJBoss71.class
+ OperateJBoss71.class,
+ DetectEAP6.class,
+ OperateEAP6.class,
+ DetectEAP5.class,
+ OperateEAP5.class,
+ DetectEAP4.class,
+ OperateEAP4.class,
+ DetectEPP4.class,
+ OperateEPP4.class,
+ DetectEPP5.class,
+ OperateEPP5.class,
+ DetectEWP5.class,
+ OperateEWP5.class
})
public class AllTestsSuite {
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java 2012-05-17
11:36:43 UTC (rev 41108)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -33,6 +33,11 @@
return new SearchingForRuntimesDialog();
}
+ public void removePath(final String path){
+ SWTBotFactory.getBot().table().click(0, 0);
+ SWTBotFactory.getBot().button("Remove").click();
+ }
+
public void ok(){
SWTBotFactory.getBot().button("OK").click();
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java 2012-05-17
11:36:43 UTC (rev 41108)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -3,16 +3,25 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
+import org.jboss.tools.ui.bot.ext.logging.WidgetsLogger;
public class SearchingForRuntimesDialog {
public List<Server> getServers(){
List<Server> servers = new ArrayList<Server>();
- SWTBotTree tree = SWTBotFactory.getBot().tree();
+ WidgetsLogger.log();
+ SWTBot bot = SWTBotFactory.getBot().shell("Searching for
runtimes...").bot();
+ bot.waitUntil(new RuntimeSearchedFinished(bot), TaskDuration.LONG.getTimeout());
+ SWTBotTree tree = bot.tree();
+
for (int i = 0; i < tree.rowCount(); i++){
Server server = new Server();
server.setName(tree.cell(i, 0));
@@ -27,4 +36,32 @@
public void ok(){
SWTBotFactory.getBot().button("OK").click();
}
+
+ private static class RuntimeSearchedFinished implements ICondition {
+
+ private SWTBot bot;
+
+ public RuntimeSearchedFinished(SWTBot bot) {
+ this.bot = bot;
+ }
+
+ @Override
+ public void init(SWTBot bot) {
+ }
+
+ @Override
+ public boolean test() throws Exception {
+ try {
+ bot.label("Searching runtimes is finished.");
+ return true;
+ } catch (WidgetNotFoundException e){
+ return false;
+ }
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return "The runtime search has not finished in the specified amount of
time";
+ }
+ }
}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/DetectEAP4.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/DetectEAP4.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/DetectEAP4.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,25 @@
+package org.jboss.tools.runtime.as.ui.bot.test.eap4;
+
+import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+
+public class DetectEAP4 extends DetectServerTemplate {
+
+ public static final String SERVER_ID = "jboss-eap-4.3";
+
+ @Override
+ protected String getServerID() {
+ return SERVER_ID;
+ }
+
+ @Override
+ protected Server getExpectedServer() {
+ Server server = new Server();
+ server.setName(getServerID());
+ server.setType("EAP");
+ server.setVersion("4.3");
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ return server;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/OperateEAP4.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/OperateEAP4.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap4/OperateEAP4.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,11 @@
+package org.jboss.tools.runtime.as.ui.bot.test.eap4;
+
+import org.jboss.tools.runtime.as.ui.bot.test.template.OperateServerTemplate;
+
+public class OperateEAP4 extends OperateServerTemplate {
+
+ @Override
+ protected String getServerName() {
+ return DetectEAP4.SERVER_ID;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/DetectEAP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/DetectEAP5.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/DetectEAP5.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,25 @@
+package org.jboss.tools.runtime.as.ui.bot.test.eap5;
+
+import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+
+public class DetectEAP5 extends DetectServerTemplate {
+
+ public static final String SERVER_ID = "jboss-eap-5.1";
+
+ @Override
+ protected String getServerID() {
+ return SERVER_ID;
+ }
+
+ @Override
+ protected Server getExpectedServer() {
+ Server server = new Server();
+ server.setName(getServerID());
+ server.setType("EAP");
+ server.setVersion("5.1");
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ return server;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/OperateEAP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/OperateEAP5.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap5/OperateEAP5.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,11 @@
+package org.jboss.tools.runtime.as.ui.bot.test.eap5;
+
+import org.jboss.tools.runtime.as.ui.bot.test.template.OperateServerTemplate;
+
+public class OperateEAP5 extends OperateServerTemplate {
+
+ @Override
+ protected String getServerName() {
+ return DetectEAP5.SERVER_ID;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/DetectEAP6.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/DetectEAP6.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/DetectEAP6.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,25 @@
+package org.jboss.tools.runtime.as.ui.bot.test.eap6;
+
+import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+
+public class DetectEAP6 extends DetectServerTemplate {
+
+ public static final String SERVER_ID = "jboss-eap-6.0";
+
+ @Override
+ protected String getServerID() {
+ return SERVER_ID;
+ }
+
+ @Override
+ protected Server getExpectedServer() {
+ Server server = new Server();
+ server.setName(getServerID());
+ server.setType("EAP");
+ server.setVersion("6.0");
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ return server;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/OperateEAP6.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/OperateEAP6.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/eap6/OperateEAP6.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,11 @@
+package org.jboss.tools.runtime.as.ui.bot.test.eap6;
+
+import org.jboss.tools.runtime.as.ui.bot.test.template.OperateServerTemplate;
+
+public class OperateEAP6 extends OperateServerTemplate {
+
+ @Override
+ protected String getServerName() {
+ return DetectEAP6.SERVER_ID;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/DetectEPP4.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/DetectEPP4.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/DetectEPP4.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,25 @@
+package org.jboss.tools.runtime.as.ui.bot.test.epp4;
+
+import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+
+public class DetectEPP4 extends DetectServerTemplate {
+
+ public static final String SERVER_ID = "jboss-epp-4.3";
+
+ @Override
+ protected String getServerID() {
+ return SERVER_ID;
+ }
+
+ @Override
+ protected Server getExpectedServer() {
+ Server server = new Server();
+ server.setName(getServerID());
+ server.setType("EPP");
+ server.setVersion("4.3");
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ return server;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/OperateEPP4.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/OperateEPP4.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp4/OperateEPP4.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,16 @@
+package org.jboss.tools.runtime.as.ui.bot.test.epp4;
+
+import org.jboss.tools.runtime.as.ui.bot.test.template.OperateServerTemplate;
+
+public class OperateEPP4 extends OperateServerTemplate {
+
+ @Override
+ protected String getServerName() {
+ return DetectEPP4.SERVER_ID;
+ }
+
+ @Override
+ protected void assertNoException(String message) {
+ // do not check the exception - it will be there
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/DetectEPP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/DetectEPP5.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/DetectEPP5.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,25 @@
+package org.jboss.tools.runtime.as.ui.bot.test.epp5;
+
+import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+
+public class DetectEPP5 extends DetectServerTemplate {
+
+ public static final String SERVER_ID = "jboss-epp-5.2";
+
+ @Override
+ protected String getServerID() {
+ return SERVER_ID;
+ }
+
+ @Override
+ protected Server getExpectedServer() {
+ Server server = new Server();
+ server.setName(getServerID());
+ server.setType("EPP");
+ server.setVersion("5.2");
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ return server;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/OperateEPP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/OperateEPP5.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/epp5/OperateEPP5.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,11 @@
+package org.jboss.tools.runtime.as.ui.bot.test.epp5;
+
+import org.jboss.tools.runtime.as.ui.bot.test.template.OperateServerTemplate;
+
+public class OperateEPP5 extends OperateServerTemplate {
+
+ @Override
+ protected String getServerName() {
+ return DetectEPP5.SERVER_ID;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/DetectEWP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/DetectEWP5.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/DetectEWP5.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,25 @@
+package org.jboss.tools.runtime.as.ui.bot.test.ewp5;
+
+import org.jboss.tools.runtime.as.ui.bot.test.RuntimeProperties;
+import org.jboss.tools.runtime.as.ui.bot.test.entity.Server;
+import org.jboss.tools.runtime.as.ui.bot.test.template.DetectServerTemplate;
+
+public class DetectEWP5 extends DetectServerTemplate {
+
+ public static final String SERVER_ID = "jboss-ewp-5.1";
+
+ @Override
+ protected String getServerID() {
+ return SERVER_ID;
+ }
+
+ @Override
+ protected Server getExpectedServer() {
+ Server server = new Server();
+ server.setName(getServerID());
+ server.setType("EWP");
+ server.setVersion("5.1");
+ server.setLocation(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
+ return server;
+ }
+}
Added:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/OperateEWP5.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/OperateEWP5.java
(rev 0)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ewp5/OperateEWP5.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -0,0 +1,11 @@
+package org.jboss.tools.runtime.as.ui.bot.test.ewp5;
+
+import org.jboss.tools.runtime.as.ui.bot.test.template.OperateServerTemplate;
+
+public class OperateEWP5 extends OperateServerTemplate {
+
+ @Override
+ protected String getServerName() {
+ return DetectEWP5.SERVER_ID;
+ }
+}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java 2012-05-17
11:36:43 UTC (rev 41108)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/DetectServerTemplate.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -35,7 +35,7 @@
preferences.open();
preferences.addPath(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
searchingForRuntimesDialog = preferences.search();
-
+
assertThat(searchingForRuntimesDialog.getServers().size(), is(1));
assertThat(searchingForRuntimesDialog.getServers().get(0), new
ServerMatcher(getExpectedServer()));
}
@@ -43,6 +43,7 @@
@After
public void closePreferences(){
searchingForRuntimesDialog.ok();
+ preferences.removePath(RuntimeProperties.getInstance().getRuntimePath(getServerID()));
preferences.ok();
}
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/OperateServerTemplate.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/OperateServerTemplate.java 2012-05-17
11:36:43 UTC (rev 41108)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/OperateServerTemplate.java 2012-05-17
11:37:44 UTC (rev 41109)
@@ -23,41 +23,46 @@
protected abstract String getServerName();
@Test
- public void startJBoss71(){
+ public void operateServer(){
+ startServer();
+ restartServer();
+ stopServer();
+ deleteServer();
+ }
+
+ public void startServer(){
serversView.startServer(getServerName());
-
- assertNoException();
- assertServerState("Started");
+
+ assertNoException("Starting server");
+ assertServerState("Starting server", "Started");
+
}
- @Test
- public void restartJBoss71(){
+ public void restartServer(){
serversView.restartServer(getServerName());
- assertNoException();
- assertServerState("Started");
+ assertNoException("Restarting server");
+ assertServerState("Restarting server", "Started");
}
- @Test
- public void stopJBoss71(){
+ public void stopServer(){
serversView.stopServer(getServerName());
- assertNoException();
- assertServerState("Stopped");
+ assertNoException("Stopping server");
+ assertServerState("Stopping server", "Stopped");
}
- @Test
- public void deleteJBoss71(){
+ public void deleteServer(){
serversView.deleteServer(getServerName());
- assertFalse(serversView.serverExists(getServerName()));
+ assertFalse("Deleting server", serversView.serverExists(getServerName()));
}
- private void assertNoException() {
- assertThat("Exception:", not(new ConsoleOutputMatcher()));
+ protected void assertNoException(String message) {
+ assertThat(message, "Exception:", not(new ConsoleOutputMatcher()));
}
- private void assertServerState(String state) {
- assertThat(serversView.getServerStatus(getServerName()), is(state));
+ protected void assertServerState(String message, String state) {
+ assertThat(message, serversView.getServerStatus(getServerName()), is(state));
}
}