Author: ldimaggio
Date: 2012-01-22 21:52:00 -0500 (Sun, 22 Jan 2012)
New Revision: 38021
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/editor/action/Notifier.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
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldAction.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
Log:
Modified ESB tests to resolve - JBQA-5832 - issues of tests generating intermittent
invalid output due to re-use of JMS queue names
Extended email notification tests for tests/editor/action/Notifier.java
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 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -20,9 +20,10 @@
bot.text(1).setText(TestConfigurator.currentConfig.getServer().runtimeHome);
bot.sleep (3000l, "3 sleeping - " +
TestConfigurator.currentConfig.getEsb().runtimeHome + " " +
TestConfigurator.currentConfig.getEsb().version + " " +
bot.comboBox().selection().toString());
+ System.out.println ("DEBUG - " +
TestConfigurator.currentConfig.getServer().version);
System.out.println ("DEBUG - " +
configuredState.getServer().bundledESBVersion);
- System.out.println ("DEBUG - " +
TestConfigurator.currentConfig.getServer().version);
-
+ System.out.println ("DEBUG - " + bot.comboBox().selection().toString());
+
assertTrue("Version was not automatically selected by setting ESB home
dir",bot.comboBox().selection().equals(configuredState.getServer().bundledESBVersion));
/* ldimaggi - Oct 2011 */
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/action/Notifier.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/action/Notifier.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/action/Notifier.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -70,6 +70,9 @@
Assertions.assertXmlContentExists(editor.toTextEditor().getText(), xpath);
}
private void addEmail(SWTBotEditor editor,String xpath,String... path) {
+
+ String xpathOrig = xpath;
+
SWTBotTreeItem item = SWTEclipseExt.selectTreeLocation(editor.bot(), path);
ContextMenuHelper.prepareTreeItemForContextMenu(editor.bot().tree(),item);
ContextMenuHelper.clickContextMenu(editor.bot().tree(), IDELabel.Menu.NEW,"Notify
Email...");
@@ -81,7 +84,36 @@
editor.save();
xpath+="/target[@class='NotifyEmail' and @from='a' and
@sendTo='b' and @subject='c']";
Assertions.assertXmlContentExists(editor.toTextEditor().getText(), xpath);
+
+ /* ldimaggi */
+ System.out.println ("DEBUG1");
+ org.jboss.tools.ui.bot.ext.SWTUtilExt.displayAllBotWidgets(bot);
+ System.out.println ("DEBUG1");
+
+ bot.textWithLabel("Host:").setText("redhat.com");
+ bot.textWithLabel("Port:").setText("25");
+ bot.textWithLabel("Username:").setText("QEuser");
+ bot.textWithLabel("Password:").setText("thepas$w0rd");
+ bot.textWithLabel("Auth:").setText("LDAP");
+
+ System.out.println ("DEBUG " + bot.section("Target Notify
Email").getText());
+ //expandBarWithLabel("Target Notify Email").expandedItemCount() );
+
+ System.out.println (editor.toTextEditor().getText());
+
+ xpathOrig+="/target[@auth='LDAP' and @class='NotifyEmail' and
@from='a' and @host='redhat.com' and @password='thepas$w0rd' and
@port='25' and @sendTo='b' and @subject='c' and
username='QEuser']";
+ //Assertions.assertXmlContentExists(editor.toTextEditor().getText(), xpath);
+
+//// <target auth="LDAP" class="NotifyEmail"
from="a"
+//// host="redhat.com" password="thepas$w0rd"
port="25" sendTo="b"
+//// subject="c" username="QEuser"/>
+//
+ editor.save();
+ bot.sleep(60000l);
+
}
+
+
private void addSQL(SWTBotEditor editor,String xpath,String... path) {
SWTBotTreeItem item = SWTEclipseExt.selectTreeLocation(editor.bot(), path);
ContextMenuHelper.prepareTreeItemForContextMenu(editor.bot().tree(),item);
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 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -7,6 +7,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.ExampleTest;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -145,6 +146,7 @@
util.waitForNonIgnoredJobs();
}
protected void assertProblemsView() {
+ //bot.sleep(60000l);
SWTBotTreeItem errors = ProblemsView.getErrorsNode(bot);
assertNull("Project still contain problems
:"+SWTEclipseExt.getFormattedTreeNode(errors),errors);
}
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 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
@@ -32,5 +33,7 @@
assertNotNull("Calling ESB Send message failed, nothing appened to server
log",text);
assertTrue("Calling ESB Send message failed, unexpected server output
:"+text,text.contains("hello world esb"));
+ SWTTestExt.servers.removeAllProjectsFromServer();
+
}
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldAction.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldAction.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldAction.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
@@ -21,6 +22,7 @@
super.executeExample();
String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.helloworldaction.test","SendJMSMessage.java");
assertNotNull("Calling JMS Send message failed, nothing appened to server
log",text);
- assertTrue("Calling JMS Send message failed, unexpected server output
:"+text,text.contains("Hello World Action ESB invoked!"));
+ assertTrue("Calling JMS Send message failed, unexpected server output
:"+text,text.contains("Hello World Action ESB invoked!"));
+ SWTTestExt.servers.removeAllProjectsFromServer();
}
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorldFileAction.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
@@ -17,6 +18,7 @@
}
@Override
protected void executeExample() {
+ SWTTestExt.servers.removeAllProjectsFromServer();
fail("Example execution not yet implemented");
}
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksCSV2XML.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
@@ -19,6 +20,7 @@
protected void executeExample() {
super.executeExample();
String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformcsv2xml","SendJMSMessage.java");
+ SWTTestExt.servers.removeAllProjectsFromServer();
assertNotNull("Calling Send message failed, nothing appened to server
log",text);
assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("<csv-set>"));
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2POJO.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
@@ -24,6 +25,7 @@
assertNotNull("Calling Send message failed, nothing appened to server
log",text);
assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("Order Items"));
text =
executeClient(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformxml2pojo.test","ReceiveJMSMessage.java");
+ SWTTestExt.servers.removeAllProjectsFromServer();
assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("Order Items"));
}
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLDateManipulation.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
@@ -20,6 +21,7 @@
super.executeExample();
String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformxml2xmldatemanipulation.test","SendJMSMessage.java");
bot.sleep(Timing.time3S());
+ SWTTestExt.servers.removeAllProjectsFromServer();
assertNotNull("Calling Send message failed, nothing appened to server
log",text);
assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("OrderDate"));
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/SmooksXML2XMLSimple.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
@@ -20,6 +21,7 @@
super.executeExample();
String text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.transformxml2xmlsimple.test","SendJMSMessage.java");
bot.sleep(Timing.time3S());
+ SWTTestExt.servers.removeAllProjectsFromServer();
assertNotNull("Calling Send message failed, nothing appened to server
log",text);
assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("<Order"));
}
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceConsumer1.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
@@ -22,6 +23,7 @@
assertTrue("Calling JMS Send message failed, unexpected server output
:"+text,text.contains("Hello World Greeting for"));
text = null;
text =
executeClientGetServerOutput(getExampleClientProjectName(),"src","org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test","SendEsbMessage.java");
+ SWTTestExt.servers.removeAllProjectsFromServer();
assertNotNull("Calling ESB Send message failed, nothing appened to server
log",text);
assertTrue("Calling ESB Send message failed, unexpected server output
:"+text,text.contains("Hello World Greeting for"));
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java 2012-01-22
18:05:50 UTC (rev 38020)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java 2012-01-23
02:52:00 UTC (rev 38021)
@@ -1,5 +1,6 @@
package org.jboss.tools.esb.ui.bot.tests.examples;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
@@ -18,6 +19,7 @@
protected void executeExample() {
super.executeExample();
String text =
executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","jms");
+ SWTTestExt.servers.removeAllProjectsFromServer();
assertNotNull("Calling Send message failed, nothing appened to server
log",text);
assertTrue("Calling Send message failed, unexpected server output
:"+text,text.contains("Goodbye!!"));
fail("testing method http not yet implemented");