Here it is:
http://soa.dzone.com/articles/works-great-right-out-box
Wednesday, September 16, 2009
Tuesday, September 15, 2009
New SOA Platform Blog Post
I just finished this new post to the SOA Platform blog:
http://jboss-soa-p.blogspot.com/2009/09/works-great-right-out-of-box.html
It's a great thing when a product works "right out of the box!" ;-)
http://jboss-soa-p.blogspot.com/2009/09/works-great-right-out-of-box.html
It's a great thing when a product works "right out of the box!" ;-)
Thursday, July 23, 2009
Running Eclipse Plugin Tests with SWTBot in Headless Mode
This is a followup to my previous post on SWTBot. Headless mode is very useful in running tests outsode of eclipse through Ant or from the command line.
Headless?
Well, it's not exactly headless. A better title would be "running Eclipse Plugin Tests with SWTBot with Ant or From The Command Line." The tests are not run from an Eclipse workbench, but they require Eclipse, and actually open up a workbench when they are run.
Install
Here's the place to start: http://wiki.eclipse.org/SWTBot/Ant
Download the "Headless Testing Framework" from here: http://www.eclipse.org/swtbot/downloads.php and install it into your eclipse /plugins dir. You need to install both the junit4.headless and optional.junit4 files. For example:
org.eclipse.swtbot.eclipse.junit4.headless_2.0.0.371-dev-e34
org.eclipse.swtbot.ant.optional.junit4_2.0.0.371-dev-e34.jar
Important note: Be sure to install only these files for either JUnit3 or JUnit4. If you install the files for both versions of JUnit, you'll see many class cast exceptions.
Configuration
Be sure to define a class to serve as a test suite for your tests. For example;
Export your plugin tests (as a plugin) and install it into the /plugins directory of your eclipse installation.
Running with Ant
Build a build.xml file that looks like this:
os: win32/linux/macosx
ws: win32/wpf/gtk/cocoa/carbon
arch: x86/x86_64
Important note: Be sure to specify a non-existent workspace name for temp-workspace as this will be overwritten when the test is run.
Running from the CLI
export ECLIPSE_HOME=/opt/local/eclipse_swtbot/eclipse
export TEST_CLASS=org.company.test.AllTests
java -Xms128M -Xmx368M -XX:MaxPermSize=256M -DPLUGIN_PATH= -classpath $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar org.eclipse.core.launcher.Main -application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication -data workspace formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,$ECLIPSE_HOME/$TEST_CLASS.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter -testPluginName org.jboss.qa.guvnor.egt -className $TEST_CLASS -os linux -ws gtk -arch x86 -consoleLog -debug
Test Output
It can be hard to find in all the output, but it's there:
Testcase: checkPerspective took 3.529 sec
Testcase: canConnectToRepo took 5.784 sec
Testcase: goIntoBackHomePropertiesTest took 34.526 sec
Testcase: doubleClickTest took 51.74 sec
Testcase: cannotConnectBadPath took 6.701 sec
Testcase: cannotConnectBadPassword took 7.747 sec
Other Useful Links
Ketan added some movies to the SWTBot site in July 2009. Here's one on running SWTBot from Ant: http://download.eclipse.org/technology/swtbot/docs/videos/beginners/SWTBotHeadlessTestingForNovices
Headless?
Well, it's not exactly headless. A better title would be "running Eclipse Plugin Tests with SWTBot with Ant or From The Command Line." The tests are not run from an Eclipse workbench, but they require Eclipse, and actually open up a workbench when they are run.
Install
Here's the place to start: http://wiki.eclipse.org/SWTBot/Ant
Download the "Headless Testing Framework" from here: http://www.eclipse.org/swtbot/downloads.php and install it into your eclipse /plugins dir. You need to install both the junit4.headless and optional.junit4 files. For example:
org.eclipse.swtbot.eclipse.junit4.headless_2.0.0.371-dev-e34
org.eclipse.swtbot.ant.optional.junit4_2.0.0.371-dev-e34.jar
Important note: Be sure to install only these files for either JUnit3 or JUnit4. If you install the files for both versions of JUnit, you'll see many class cast exceptions.
Configuration
Be sure to define a class to serve as a test suite for your tests. For example;
package org.company.test;Setup
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses( { TestPositive.class, TestNegative.class })
public class AllTests {
}
Export your plugin tests (as a plugin) and install it into the /plugins directory of your eclipse installation.
Running with Ant
Build a build.xml file that looks like this:
Important note: The supported values for os, ws (workspace) and arch are:
<?xml version="1.0" encoding="UTF-8" ?>
<project name="testsuite" default="run" basedir=".">
<property name="eclipse-home" value="/opt/local/eclipse_swtbot/eclipse" />
<property name="plugin-name" value="org.company.test" />
<property name="test-classname" value="org.company.test.AllTests" />
<property name="library-file" value="${eclipse-home}/plugins/org.eclipse.swtbot.eclipse.junit4.headless_2.0.0.371-dev-e34/library.xml" />
<target name="suite">
<property name="jvmOption" value=""></property>
<property name="temp-workspace" value="workspaceJuly23" />
<delete dir="${temp-workspace}" quiet="true" />
<ant target="swtbot-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${temp-workspace}" />
<property name="plugin-name" value="${plugin-name}" />
<property name="os" value="linux" />
<property name="ws" value="gtk" />
<property name="arch" value="x86" />
<property name="classname" value="${test-classname}" />
<property name="vmargs" value="-Xms128M -XX:MaxPermSize=512m -Xmx512M" />
</ant>
</target>
<target name="cleanup" />
<target name="run" depends="suite,cleanup">
</target>
</project>
os: win32/linux/macosx
ws: win32/wpf/gtk/cocoa/carbon
arch: x86/x86_64
Important note: Be sure to specify a non-existent workspace name for temp-workspace as this will be overwritten when the test is run.
Running from the CLI
export ECLIPSE_HOME=/opt/local/eclipse_swtbot/eclipse
export TEST_CLASS=org.company.test.AllTests
java -Xms128M -Xmx368M -XX:MaxPermSize=256M -DPLUGIN_PATH= -classpath $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar org.eclipse.core.launcher.Main -application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication -data workspace formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,$ECLIPSE_HOME/$TEST_CLASS.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter -testPluginName org.jboss.qa.guvnor.egt -className $TEST_CLASS -os linux -ws gtk -arch x86 -consoleLog -debug
Test Output
It can be hard to find in all the output, but it's there:
Testcase: checkPerspective took 3.529 sec
Testcase: canConnectToRepo took 5.784 sec
Testcase: goIntoBackHomePropertiesTest took 34.526 sec
Testcase: doubleClickTest took 51.74 sec
Testcase: cannotConnectBadPath took 6.701 sec
Testcase: cannotConnectBadPassword took 7.747 sec
Other Useful Links
Ketan added some movies to the SWTBot site in July 2009. Here's one on running SWTBot from Ant: http://download.eclipse.org/technology/swtbot/docs/videos/beginners/SWTBotHeadlessTestingForNovices
Another DZone post!
The recent post on Gateways and Notifiers in the SOA Platform was just reposted to DZone here:
http://soa.dzone.com/news/soa-platform-gateways-and
http://soa.dzone.com/news/soa-platform-gateways-and
Monday, July 20, 2009
A new post for the SOA Platform blog
Just added a new post here: http://jboss-soa-p.blogspot.com/2009/07/soa-platform-gateways-and-notifiers.html
Listeners and notifiers are very useful things to integrate apps together through the platform. They are actually easy to use, and are very powerful too!
Listeners and notifiers are very useful things to integrate apps together through the platform. They are actually easy to use, and are very powerful too!
Monday, July 13, 2009
My first post to DZone!
And - the nice folks at DZone picked up the Content Based Routing post too:
http://soa.dzone.com/news/when-content-knows-way-content?mz=3006-jboss
http://soa.dzone.com/news/when-content-knows-way-content?mz=3006-jboss
Thursday, July 9, 2009
Another post to the Red Hat / JBoss SOA Platform Blog
I just finished my 2nd post to the SOA Platform blog here:
http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html
The diagram towards the end would have really helped me understand content based routing when I first heard of it. Maybe this will help some other newbies along the way... ;-)
http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html
The diagram towards the end would have really helped me understand content based routing when I first heard of it. Maybe this will help some other newbies along the way... ;-)
Subscribe to:
Posts (Atom)