Testing
May 15, 2008
Selenium's Ajax limitations and new designs
From TestMaker's perspective a Selenium test is a unit test of a Web application or Ajax application. TestMaker already provides Test Runners for TestGen4Web, soapUI, and the Java 6 ScriptEngine support for unit tests written in Java, Jython, JRuby, Groovy, and a bunch of others.
It seems to me that the forum members have already hit upon some of Selenium's limitations and design problems:
a) Selenium was not really developed for Ajax, and vice versa. Ajax frameworks like Appcelerator implement their own eventing mechanism and Selenium has no idea of how this works. For instance, when an Appcelerator log-in page changes the DOM to reveal site content Selenium IDE does not notice the change. Selenium IDE will sometimes record a 'click' when 'clickAndWait' is appropriate. I find myself adding 'waitForElementPresent' commands that look for the logout element in the user interface to appear to signal that we've successfully logged-in. As a tester I need to resolve the differences between the Selenese model of my application and the actual application state. This is not fun, error prone, and difficult to teach. Appcelerator does a good job of providing quality element ID values. Consequently I find myself in Firebug and Firefox a lot more than I should to get my Selenium test to run properly.
b) Selenium has no apparent way to provide a test with operational data. I am in the process of writing Data Production Libraries (DPLs) for Selenium IDE as a user extension. My first DPL reads from comma-separated-value (csv) flat files. The DPL opens a file and provides getNext and getPrevious methods to retrieve data from the csv file. I had to write this entirely in JavaScript and it was not fun. I will contribute these to the Selenium project in the next few weeks.
c) Selenium IDE recorded test scripts need to be exported into a scripting language format to implement business test flows. Conditionals, looping, and branching are possible using community contributions. For example, the Selenium Wiki includes a flow control extension.
For the past month I have been working on a design that enables TestMaker to operate Selenium tests. Here is what we have in mind:
1) Browser compatibility tests using Selenium IDE and Selenium RC.
2) Load and performance testing using Selenese scripts and TestMaker.
3) Service monitoring using Selenese scripts and TestMaker.
If this interests you then please participate! The enhancement ticket at design notes for Selenium in TestMaker are at http://bugs.pushtotest.com/ticket/136
-Frank
May 11, 2008
JavaOne Pavilion Finds
Krugle is a source code search engine. It spiders your organizations source code repositories and lets you track code definitions. For instance, when you fix a bug in a well used, and shared, code library Krugle shows the other projects that use the same bug-laden code.
Style Intelligence has 101+ dashboards, reports, scorecards, and other visualizations of data.
Skyway Software makes an open-source application development environment. You build everything in their Eclipse plug-in. It's wonderfully well design user interface makes construction of apps very easy. I'm going to look into this one with the hope that I can build a bunch of sample code for PushToTest TestMaker users quickly.
Determyne is an open-source transaction-level performance monitoring solution for JEE applications. I'll be investigating this to incorporate into TestMaker.
-Frank
May 08, 2008
JavaOne 2008 Report
http://www.theserverside.com/news/thread.tss?thread_id=49332
-Frank
May 03, 2008
Building and Testing Ajax applications
http://www.sys-con.tv/read/540772.htm
-Frank
May 01, 2008
Unconference, Unconference, Unconference
Last year's Unconference was terrific. Instead of going to another track planned by Sun to hear from their marketing folks or a JavaOne conference sponsor, the Unconference topics are proposed by attendees and the selection is made by a democratic vote at the beginning of the day. The Unconference worked out splendidly. I am very much looking forward to the Unconference!
Please join me and I will be happy to take you around and introduce you to everyone I know.
-Frank
Apr 22, 2008
TIBCO TUCON keynote
If you are attending TUCON then please let me know and I will be glad to meet with you personally.
-Frank
Apr 11, 2008
The Reviews Are In
They like me, they really like me.
Harry Wood attended my talk and posted a blog entry about his experience at http://www.harrywood.co.uk/blog/2008/04/11/unit-testing-soa-and-mule-talks
-Frank
Learning More About ESBs and SOA Development at Mulecon
Last week I attended the first day Mulecon, the Mule user conference.
The presentations varied between Mule staff talking about Mule and the product roadmap and customers talking about their use of Mule. The Mule staff seemed to be singing from the same songbook: Mule claims 13,000 deployments of Mule ESB, Mule 2.0 is not compatible with 1.4 but the migration should not be too difficult as the concepts are the same, Mule Enterprise Edition, Saturn and Mule HQ releases coming late this year.
A Room Full of Architects
It did not take long for me to realize that Mulecon delegates are mostly software architects. Typical questions I heard goes like this:"Your company inherits a big bank and needs to decide between JMS and Advanced Message Queue Protocol (AMQP) for a universal protocol for your bank. Which would you pick?"
and
"How do you empirically come to a model that will let you uncover the performance characteristics and measurements?"
These are the kinds of discussions that make my wife immediately yawn and roll her eyes! Geeks, there's a lot of 'em in this room.
ESB, Grid, AMQP Approaches
Conversations about hub-and-spoke, virtual circuits, and bus architecture seem to be over. Just about everyone I met expects a heterogeneous architecture where parts of a system are hub-and-spoke and others are bus-based. Easy service interfaces now exist between each type of architecture using daemons and local brokers. Jahan Moreh, VP of Engineering at U1, had a very basic message "Provided the underlying products are good you won't have a problem."Jahan was more sanguine about guaranteed deliver and performance. In essence "performance and guaranteed delivery are in conflict." Choose one but don't expect both. I very much want to do primary research to determine a standards way to profile performance in a guaranteed delivery setting. Hopefully one of our customers will commission a PushToTest study. (hint, hint.)
I learn about AMQP at Mulecon. AMQP is a protocol-level standards initiative to provide a messaging infrastructure. Jahan told me "AMQP tries to do something very important but may not be attainable. Because they are at the protocol level they may wind up being extensions on the side. I would bet on the JMS side."
POJOs Rule, But Where Is BPM?
Eugene Ciurana of LeapFrog gave a talk about LeapFrog's use of Mule. I just saw Eugene at TheServerSide.com Java Symposium in Las Vegas last week. Boy does Eugene get around!LeapFrog is marketing a child's toy that features downloadable content – not bad for products that must cost less than a few dollars to manufacture! The backend system to support this effort uses ESB technology to provide flexibility to LeapFrog's software developers and reliability in operating the service and applications.
Many of the question-and-answer sessions at Mulecon include a question on Business Process Management (BPM) such as: "What are you doing for BPM in your architecture?" Eugene took one of these.
This question echoes what I had learned in Las Vegas: Java architects and developers are frustrated looking for Business Process Management (BPM) standards and tools. Brian Sletten's talk at TSSJS was titled "Avoiding ESBs" but could have been better described as "I'm sick and tired of waiting for vendors to give me a decent Business Process Management (BPM) platform!"
At Mulecon, Rory dela Pax of Biogen Idec, told me that "Mule is good at doing some workflow. But, all of us are struggling with BPM. We do a separation of skills strategy rather than overloading the ESB with these tasks."
Over the years I have seen most of the platform vendors try to provide the Java development community with set of products, best practices, framework, and code to implement applications that deliver business flows. I am specifically remembering the failures of JBI, JEMs, BPEL, SCA, and WS-*. None have come together to offer a standard. I sense a lot of anger and disappointment at all the failed attempts. Mostly disappointment from me.
Eugene answered the BPM question by telling the delegates that LeapFrog pushes all of its development to Plain Old Java Objects (POJOs.) They actively separate every application from each other. LeapFrog then uses Mule routers to define the inputs and outputs. Eugene said "We are not doing any transactional data at Leapfrog. Our support is for the toy devices." He added that Leapfrog has a separate side of the IT house for Oracle tools and BPEL.
Mule and Clustering
Rory dela Pax of Biogen Idec gave a brief talk on their migration from BEA WebLogic Integration (WLI) to Mule. The migration came about like many companies adopting an open-source project: A developer mentioned it during a water break conversation. The environment was ripe: Biogen Idec found WLI to be "a bit on the heavy side, unstable, and has not scaled well." They were also leery of the rumors of the Oracle buy-out since late 2006. They found that Mule has a one-for-one match in capabilities, plus they see Mule as lightweight, stable, and scalable.I can understand lightweight and stable, but the scalability claim seemed to need some proof. Rory tells me they achieve scalability by using WebLogic Server (WLS) 8.1 SP6's clustering. They deploy their Mule application as a WAR file in a cluster of JVMs in WLS. There are no separate JVMs in their environment. I imagine the gaul the WLI product manager must feel at being swapped out. :-)
Still, there is a lot that Biogen Idec needs to learn about clustering. They still need to define the best way to cluster. Rory told the delegates "We don't know how to do that." They would like to define clustering methods in environments where message sizes grow larger. Right now their application uses simple verb+link combinations. The incoming request is to approve an invoice and the response contains a link to bring the user's browser into the application.
Rory told me some of the downsides to using this WLS clustering approach. For example, they use Quartz as a scheduler. In this WLS clustering set-up changing the Quartz schedules means redeploying the application to the cluster.
Moving Up To Mule 2.0
Mule 1.4 uses DTDs to define pretty much everything – settings, configuration, deployments. Mule 2.0 delivers XML Schema based configuration that leverages Spring's "Extensible XML Authoring." The result is less cumbersome class names because of namespace support. They are updating their Eclipse support to provide auto-completion and context-specific help. Mule 2.0 features transport-specific endpoints and connectors and now everything is done through typed properties. There is a lot of extensibility because each module/transport comes with its own schema. Mule 2.0 lets you implemtn your own schema too.Some additional changes in Mule 2.0: CXF supercedes XFire (XFire is still available,) there is a new expression evaluator framework, streaming improvements, auto-transformation, and lots of bug fixes. Plus, Mule 2.0 has 30% more unit tests over 1.4. Mule uses Spring to implement Beans. Mule uses session and entity (data) beans inside the Mule container or through proxies to external data services.
Mulecon left me a few questions:
- How important was the Spring-based approach to building services to Mule's popularity and success?
- Is anyone, I mean anyone on Earth, using OpenESB from Sun? None of the Mule users had any experience with it.
- How are Mule and Mule users testing Mule for scalability and performance? Mule 2 provides hundreds of unit tests but apparently no performance tests, at least none that I could find.
- What are the tradeoffs of an ESB versus Gigispaces, Tangosol and other grid environments?
-Frank
Apr 07, 2008
HTMLUnit turns 2.0
Congratulations are due for the HTMLUnit team. HTMLUnit turned 2.0 today!
I'm happy to spread the news that the HTMLUnit team release version 2.0 today!
The Change Log notes many improvements and bug fixes, including migration to Java 5, implementation of org.w3c.dom.*, better support for incorrect html code, large improvements in JavaScript support (GWT 1.4 tests now pass, and a bunch of bug fixes.
I opened an enhancement ticket to upgrade PushToTest to HTMLUnit 2.0.
Congratulations HTMLUnit team!
-Frank
End To End Testing
An example of using soapUI, TestGen4Web and PushToTest to automate a test of a Web service and Web application functional test.

PushToTest orchestrates a Functional test by defining the operating parameters and use cases in a TestScenario document in XML format, as illustrated above.
The test identifies a PushToTest Data Production Library (DPL) that will be the exchange medium between the soapUI TestCase and the TestGen4Web recorded test. The soapUI TestCase reads the data value for the SOAP request from a Properties file in the soapUI project. The soapUI TestCase receives the SOAP response and saves the response parameter to the DPL.
The TestScenario instructs PushToTest to then run the recorded TestGen4Web unit test. The test uses the DPL data from the soapUI test to make an HTTP Get request to the Web host. That concludes the functional test.
I am happy to make the above example available for immediate free download at http://downloads.pushtotest.com/tm5/EndToEndTestExample.zip
You will need the latest TestMaker 5.2 (pre-alpha) version to operate the example. See the faq for instructions on getting the code.
Enjoy.
-Frank
Apr 02, 2008
Testing Flash - Possible but with some extra work
I recently received an email asking:
"Is it possible to use PushtoTest to build a test of a
Web Application that uses Flash?"
It is possible to test Flash applications using PushToTest. We are currently helping FordDirect.com do this. It does not come without some extra work. For instance, by itself there is no record/playback capability to build tests of Flash animations. However, there is a programmatic way to discover the content of ActionScript variables and to activate functions by doing the equivalent of pressing a button or using Flash controls. PushToTest professional support services will instruct you on the approach, how to instrument your Flash animations for testing, and teach our test methodology and testing platform.
-Frank
The Next Step in Unit Testing, Java, and SOA
I'm giving a free presentation at Skills Matter in London, UK, on Monday night
The session is free and I will be happy to answer your questions. For details and directions
see: http://www.skillsmatter.com/event/java-jee/the-next-step-in-unit-testing-and-java
Mar 28, 2008
Screencast of SOA Knowledge Kit Presentation
Now available, a screencast of my Webcast on the research, findings, and lessons-learned from the new SOA Knowledge Kit. The Kit compares building SOA applications using TIBCO, IBM, BEA, and Oracle.
Over the past year PushToTest observed a trend among the 160,000 people in our open-source community: Software developers, QA testers, and IT managers are looking for a better way to develop, orchestrate, deploy, and manage services. The Composition Approach to Building Large-Scale SOA introduces a new service composition approach to building SOA services, explains composition, and provides a methodology and test kit to evaluate today's tools for developer productivity and ease of deployment/management.
Last week, TIBCO hosted me on a Webcast to talk about Service Virtualization, Service Composition, and the SOA Knowledge Kit. The Webcast is now available at:
http://media.tibco.com/video/tibco_031808/index.html
-Frank
Feb 23, 2008
Selenium and PushToTest Plans
PushToTest version 5.2 (which should be out this Spring) will feature Selenium integrated into the PushToTest test automation platform. See http://bugs.pushtotest.com/ticket/136 for details.) Selenium users will create functional tests of Web and Ajax applications using the Selenium plug-in to MS Internet Explorer, Firefox, Mozilla, and other browsers. PushToTest users have two choices to run Selenium tests in the PushToTest test automation environment:
1) PushToTest 5.2 will include a Selenium test runner. This runner instantiates a Web browser in a TestNode (our distributed test environment,) operates the Selenium test, and reports the results. This is a powerful choice to run Selenium tests as functional and regression tests, and business service monitors.
2) PushToTest 5.2 includes a Selenium-to-Java and Selenium-to-Jython transformation utility. The utility creates a Java class (or Jython script) that implements the test steps using the HTMLUnit framework. HTMLUnit acts like a browser, including operating Ajax applications using Rhino (the JavaScript engine from the Apache Mozilla/Firefox browsers.) The is a powerful choice to run Selenium tests as load and performance tests.
For both of the above options, Selenium tests receive dynamic operational data at runtime from PushToTest Data Production Libraries (DPLs.) For instance, a Selenium test that operates a sign-in page receives the account number and password from a DPL that accesses data from a comma-separated-value file (or a relational database or custom DPL.)
Additionally, Selenium tests produce results data that PushToTest Results Analysis engine renders into hundreds of charts. And, these charts correlate Selenium test operation to resource utilization (CPU, Network, Memory, Threads) in the back-end server.
We have an "alpha" quality version of the Selenium-to-Jython transformation utility to give to you today. This is from a contribution from Dominique and Olivier at Denali. All you need to do is ask.
-Frank
Feb 20, 2008
Root Cause Analysis and PushToTest
<test> <run name="Open Account" testclass="com.pushtotest.WebAppTest" method="testOpenAccount" langtype="java" />In the above test PushToTest operates four steps: Open Account, Transfer Funds, Check Transfer, and Close Account. PushToTest keeps track of the total transaction time and the time for each step. The time of each transaction and step is stored in the transaction log file. When a particular step takes longer than expected you can break open the transaction logs for the application server and learn what was going on at that point in time. We have been hard at work over the past two months building an Enhanced Results Analysis engine. The new feature will appear in PushToTest version 5.2. It is already working and we are happy to provide it to anyone that "asks", http://www.pushtotest.com/ask_a_question. The new engine makes it much easier to visualize broken functions and hot spots to performance. Consider the Step Report that visually charts the average duration of each step across 10 equal periods of time of a test.
<run name="Transfer Funds" testclass="com.pushtotest.WebAppTest" method="testTransfer" langtype="java" />
<run name="Check Transfer" testclass="com.pushtotest.WebAppTest" method="testValidateTransfer" langtype="java" />
<run name="Close Account" testclass="com.pushtotest.WebAppTest" method="testCloseAccount" langtype="java" />
</test>
The reporting is great but that still leaves the correlation effort up to a software engineer. And, it is a manual process to go from PushToTest logs to the application server logs. Our planned solution is to incorporate "Glassbox", http://www.glassbox.com into PushToTest version 5.2. Glassbox watches a Java application server for performance hotspots as a test operates and identifies the objects and database connection level issues causing the hotspots of performance. "Click here", http://bugs.pushtotest.com/ticket/61 to learn about the integration project. To learn more about Glassbox "click here", http://www.glassbox.com/glassbox/Download.do?mediaItemId=173 to read the Glassbox user guide.
One final question I usually hear goes like this: "Where exactly are your developers located? In other words when you leverage out-of-country developers, where are they and if the customer wanted US based developers can you accommodate that."
PushToTest outsources its customer engineering to our Costa Rica-based partner "Avantica", http://www.avantica.net. Costa Rica is a 4-5 hour flight to the United States and Canada. The country is on Central Time (GMT -6) and their English is very good. We normally need about one week to plan for our engineers to be in your office.
-Frank
Feb 19, 2008
Comparing Oracle, IBM, BEA, and TIBCO for SOA
This morning I am glad to introduce you to a new set of resources to help surface scalability and performance issues in Service Oriented Architecture (SOA.) The SOA Knowledge and Performance Kit is a free open-source resource to show you what it really takes to build services using today's leading SOA development platforms.
The Kit delivers an SOA use case design, source code to the implementations of the use case on Oracle, IBM, BEA, and TIBCO platforms, developer journals describing our experiences step-by-step, a Total Cost of Ownership (TCO) calculator, and performance and scalability tests that leverage the PushToTest test automation platform.
PushToTest looked below the surface-level marketing claims to understand the skill sets, domain expertise, and specialization that it takes to be successful. We discovered a wide variety of experiences: some highly successful and others rife with challenges. We measured the amount of developer effort to implement an SOA use case and summarize the findings in the following total cost of ownership (TCO) comparison chart.

This morning we opened the doors on a new center within the PushToTest Web site for you to learn more about SOA, learn about the new composition approach to SOA development and deployment, and download the kits.
SOA Knowledge and Performance Kit
-Frank
Feb 05, 2008
soapUI + PushToTest Moves Java Developers Towards The Grid
Last year PushToTest built a test runner for soapUI and bundled soapUI in the PushToTest version 5 distribution. The advantage to Java developers is three fold:
1) soapUI test suites run in a distributed PushToTest test environment - a grid of test machines each turning out SOAP requests to your application.
2) The PushToTest environment dynamically provides operational data to the soapUI test suites. For instance, the data could be sign-in information or product part numbers. The data production libraries (DPLs) get data from a relational database, from a comma-separated-value file, and from service calls dynamically.
3) PushToTest provides a results analysis engine and performance comparison utility to identify problem test suite performance and problem service calls. Additionally, while the test suites operate the PushToTest Monitor watches CPU, Network, and Memory utilization of the test machines and the target hosting the application and correlates these back to the test suite operation to surface the problem datacenter components.
We increasingly see upper management at our customers look at consumer hits like Facebook, Flikr, Google Maps, and tell their engineers "We want that!" At the same time Java developers in 2008 have good tools to service enable their classes. The interface may be SOAP, or any number of others including REST, Ajax, JMS to a message queue, RMI, etc.
We are seeing customers use PushToTest in service environments. They tend to start service enabling a few classes and wind-up with a grid of interconnected services. While soapUI by itself is a terrific tool for working with individual services, the nature of service enabling Java classes means most organizations need a test methodology, patterns, and tools that work in a grid of services.
Customer success at testing in a grid environment is the motivation behind a new partnership that eviware and PushToTest announced this week. Java developers benefit when two open-source 100% Java projects partner to solve service testing challenges and help us test in a grid environment.
-Frank
Feb 04, 2008
New PushToTest Datasheet and Whitepaper
We are getting very close to the PushToTest 5.1 release - hopefully this week! New datasheet and white paper downloads are available to explain PushToTest and open-source test automation:
PushToTest White Paper: The Importance of Test Automation
Both are in Adobe Acrobat (PDF) format.
-Frank
Jan 29, 2008
soapUI, Selenium, PushToTest Bootcamp
A lot of QA testers are coming to the realization that testing applications built on Java, Database, and Application Server tools can't get them from here-to-there when using the old-and-trusted record/playback test tools. The problem often starts when a database instance needs to service client Web interfaces with dynamic data at the same time as the middle tier is serving Ajax (XML, String, and JSON) data for rich browser interfaces, and REST and SOAP interfaces with transactional data.
New tools have emerged over the past year - such as soapUI, Selenium, and PushToTest - that are designed for Web application, Web service, and Ajax testing. Pulling these tools and platforms together into something that the average database developer, application engineer, and tester can use requires a lot of effort.
To meet this need, PushToTest is now offering a Bootcamp to train technical folks how to leverage soapUI, Selenium, and PushToTest. Details are found at http://bootcamp.pushtotest.com
-Frank
Jan 24, 2008
I Have Drunk The Eclipse Coolaid
Todd Bradfute on September 6, 2007 wrote to me:
I've drunk the Eclipse cool-aid. What do you think about having a PushToTest plug-in to Eclipse? Maybe it's not the top priority for your engineers, but that IDE feels so much cleaner than the Netbeans Interface that PushToTest v5 uses.
Then earlier this month a medium-size prospective customer sent us a request-for-proposal that includes using PushToTest as an Eclipse plug-in. There is nothing quite like the scent of a sale to get us motivated! :-)
William Martinez drafted a good first design of a PushToTest Eclipse Plugin. You will find the document at:
http://downloads.pushtotest.com/tm5/PushToTest_EclipsePlugin_Design.pdf
We are seeking your feedback on the design, our assumptions, and how this new plug-in would make you more productive.
-Frank


