WSDL And WADL — PushToTest
Personal tools
You are here: Home The Cohen Blog WSDL And WADL

WSDL And WADL

by Frank Cohen — last modified Mar 30, 2008 12:06 PM

PushToTest version 5 is coming along nicely and I've been doing some thinking about how a non-technical user could use the test scenario XML files to build a test. Imagine a user that needs to test a simple Web site for scalability. The site has a home page, a log-in feature, a search feature, and a log-out feature. Consider the following test scenario:

<usecase name="CheckMySite">

<setup name="login" testclass="com.pushtotest.tool.webtest.http"
method="post" langtype="java">
<argument name="http.url" value="http://examples.pushtotest.com"/>
<argument name="id" value="frank"/>
<argument name="password" value="mypassword"/>
<argument name="http.response.assertequals" value="200"/>
</setup>

<test>
<run name="test_search" testclass="com.pushtotest.tool.webtest.http"
method="get" langtype="java">
<argument name="http.url" value="http://examples.pushtotest.com"/>
<argument name="searchterm" value="widgets"/>
<argument name="http.response.body.assertcontains" value="widget7"/>
</run>

...etc...

</test>

<teardown name="logout" testclass="com.pushtotest.tool.webtest.http"
method="get" langtype="java">
<argument name="http.url" value="http://examples.pushtotest.com/logout"/>
<argument name="http.response.assertequals" value="200"/>
</setup>

</usecase>

The above scenario works once the TOOL protocol handler library is amended with the com.pushtotest.tool.webtest package to handle get/post commands in an http context.

The test would log-in using the setup method. It would then repeat a call to the search function for the duration of the test. Once the test is over the log-out method ends the session with the target host.

I asked for feedback from Ilya Sterin, the software architect's architect, and he pointed me to Marc Hadley's WADL project. With all the XML over HTTP (aka REST) interfaces being released by Google, Amazon, and pleanty of others, Marc posits that WSDL won't cut it among developers.

WADL appears to have a nice definition for the standard GET/POST commands found in Web service and remote procedure architectures. I'm looking into it now as the basis for the webtest definition.

-Frank


Document Actions