Skip to main content

Japex 1.0.3 available at

Posted by spericas on March 17, 2006 at 12:08 PM PST

Japex 1.0.3 is out with a number of very cool features. Since I didn't have a chance to blog about the features in version 1.0.2, I'll use this opportunity to talk about all the features that were added in the last few weeks. This include support for XInclude, test case groups, parameter groups, new formulas for computing latency and throughput in multi-threading tests and much more!

Let us start with XInclude, test case groups and parameter groups. Paul Sandoz already blogged about test case groups. These groups are useful to define parameters that are common to a set of tests, such as a JAXB context path that can be used to unmarshall several XML instances as shown in Paul's blog. Parameter groups are used to write well-formed XML documents that simply define a set of parameters to be included via XInclude. For example:

<?xml version="1.0" encoding="UTF-8"?>
<paramGroup xmlns="">
  <param name="japex.classPath" value="./build/classes/cvs/client"/>
  <param name="japex.classPath" value="${JAXWS_HOME}/lib/*.jar"/>
  <param name="japex.classPath" value="${XWSS_HOME}/lib/*.jar"/>

This example is useful if the same class path is share between multiple drivers. Assuming the XML file above is called 'classpath-cvs.xml', you can then include it in an XML file that describes a Japex driver as follows:

<?xml version="1.0" encoding="UTF-8"?>
<driver name="TestServiceXMLDriver-cvs" normal="true"
  <param name="japex.driverClass" value="com.sun.wspex.TestServiceXMLDriver"/>
  <param name="description" value="TestService XML driver using JAX-WS from CVS"/>
  <param name="endpoint" value="http://localhost:8080/WSpex-cvs/TestService"/>

  <xi:include href="classpath-cvs.xml"/> 

Creating modules (i.e., XML files) for each type of driver makes it very easy to assemble new configuration files for Japex. For example, the following configuration file --from an internal Web services benchmark called WSpex-- is built by including drivers and test cases from external XML files:

<?xml version="1.0" encoding="UTF-8"?>
<testSuite name="WSpex" xmlns=""
  <param name="japex.warmupTime" value="10"/>
  <param name="japex.runTime" value="10"/>
  <param name="japex.runsPerDriver" value="2"/>
  <param name="japex.reportsDirectory" value="./reports/non-periodic/"/>

  <xi:include href="TestServiceXMLDriver-jaxrpc.xml"/>
  <xi:include href="TestServiceXMLDriver-as.xml"/>
  <xi:include href="TestServiceXMLDriver-cvs.xml"/>

  <xi:include href="all-tests.xml"/>

The XML document 'all-tests.xml' is defined in a similar manner but using instead. Note how each file that is included via xi:include is self contained; in particular, note how each file contains all the necessary namespace declarations.

Creating modules for quickly assembling Japex configuration files has proven to be very useful, and using XInclude is easier and more powerful than using external entities. But remember that you must use the latest Japex in order to take advantage of this new functionality.

There are other interesting features in Japex 1.0.3, some of which deserve their own blog entry! Let's wait until the a next installment then. And, as always, happy benchmarking!

Related Topics >>