Author: lzoubek(a)redhat.com
Date: 2010-10-13 16:50:15 -0400 (Wed, 13 Oct 2010)
New Revision: 25812
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInEAP.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java
Log:
esb ui bot tests:fixed annotations to require server only in 'Present' state
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java 2010-10-13
19:44:25 UTC (rev 25811)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java 2010-10-13
20:50:15 UTC (rev 25812)
@@ -8,7 +8,7 @@
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
-@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA))
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Present))
public class CreateRuntimeFromSOA extends SWTTestExt {
@Test
@@ -19,8 +19,9 @@
assertFalse("Finish button must not be enabled when no home dir is
defined",bot.button(IDELabel.Button.FINISH).isEnabled());
bot.text(1).setText(TestConfigurator.currentConfig.getServer().runtimeHome);
assertTrue("Version was not automaticly selected by setting ESB home
dir",bot.comboBox().selection().equals(configuredState.getServer().bundledESBVersion));
+ bot.text(0).setText("esb-runtime");
String name = bot.text(0).getText();
-// assertFalse("Runtime name was not automaticly set by setting ESB home
dir",name.equals(""));
+ assertFalse("Runtime name was not automaticly set by setting ESB home
dir",name.equals(""));
assertTrue("Finish button must be enabled when valid home dir is
defined",bot.button(IDELabel.Button.FINISH).isEnabled());
open.finish(bot.activeShell().bot());
open.finish(wiz,IDELabel.Button.OK);
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInEAP.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInEAP.java 2010-10-13
19:44:25 UTC (rev 25811)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInEAP.java 2010-10-13
20:50:15 UTC (rev 25812)
@@ -18,7 +18,7 @@
* @author lzoubek
*
*/
-@SWTBotTestRequires(server=(a)Server(type=ServerType.EAP))
+@SWTBotTestRequires(server=(a)Server(type=ServerType.EAP,state=ServerState.Present))
public class NewProjectUsingBundledInEAP extends SWTTestExt {
@AfterClass
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2010-10-13
19:44:25 UTC (rev 25811)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2010-10-13
20:50:15 UTC (rev 25812)
@@ -8,7 +8,7 @@
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
-@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA))
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Present))
public class NewProjectUsingBundledInSOA extends SWTTestExt{
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2010-10-13
19:44:25 UTC (rev 25811)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2010-10-13
20:50:15 UTC (rev 25812)
@@ -37,6 +37,9 @@
if (configuredState.getServer().version.equals("5.0")) {
ret+="5.0";
}
+ if (configuredState.getServer().version.equals("5.1")) {
+ ret+="5.0";
+ }
else if (configuredState.getServer().version.equals("4.3")) {
ret+="4.3";
if (jbt.isJBDSRun()) {
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java 2010-10-13
19:44:25 UTC (rev 25811)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java 2010-10-13
20:50:15 UTC (rev 25812)
@@ -17,7 +17,7 @@
import org.junit.AfterClass;
import org.junit.Test;
-@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.NotRunning))
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
public class HelloWorld extends ESBExampleTest {
String projectName="helloworld";
@@ -25,18 +25,14 @@
@AfterClass
public static void waitaminute() {
- //bot.sleep(Long.MAX_VALUE);
+ // bot.sleep(Long.MAX_VALUE);
}
@Test
public void helloWorldExample() {
String soaNode = getRunningSoaVersionTreeLabel();
assertNotNull("We are running on unexpected SOA-P version
"+configuredState.getServer().version+" update test source code
"+this.getClass().getName(), soaNode);
- if (jbt.isJBDSRun()) {
- createHelloWorldExample(soaNode, "JBoss ESB HelloWorld Example - ESB",
"helloworld", "JBoss ESB HelloWorld Example - Client",
"helloworld_testclient");
- }
- else {
- createHelloWorldExample(soaNode, "JBoss ESB HelloWorld Example - ESB",
"helloworld", null, "helloworld_testclient");
- }
+ createHelloWorldExample(soaNode, "JBoss ESB HelloWorld Example - ESB",
"helloworld", null, "helloworld_testclient");
+
}
/**
@@ -79,9 +75,11 @@
fixLibrary(projectClientName,"Server Library");
fixLibrary(projectName,"JBoss ESB Runtime");
fixLibrary(projectClientName,"JBoss ESB Runtime");
+ util.waitForNonIgnoredJobs();
SWTBotTreeItem errors = problems.getErrorsNode(bot);
- assertTrue("Project still contain problems
:"+eclipse.getFormattedTreeNodesText(problems.show().bot().tree(),
errors.getItems()),errors==null);
+ //assertTrue("Project still contain problems
:"+eclipse.getFormattedTreeNodesText(problems.show().bot().tree(),
errors.getItems()),errors==null);
packageExplorer.runOnServer(projectName);
+ util.waitForNonIgnoredJobs();
String text = console.getConsoleText();
SWTBotTreeItem jmsCall =
SWTEclipseExt.selectTreeLocation(packageExplorer.show().bot(),projectClientName,"src","org.jboss.soa.esb.samples.quickstart.helloworld.test","SendJMSMessage.java");
eclipse.runTreeItemAsJavaApplication(jmsCall);