Forum Discussion

dgross's avatar
dgross
Occasional Contributor
14 years ago

TestSuite not created when adding WADL

I'm using soapUI pro 4.0.1.

Created a project
Add WADL
Type in WADL location and check Create TestSuite box

The project is populated with the APIs, but no TestSuite is created.

-- Dave

6 Replies

  • Hi Dave,

    hmm.. do you get any errors in the error log? Can you share the WADL?

    regards!

    /Ole
    SmartBear Software
  • dgross's avatar
    dgross
    Occasional Contributor
    There were no errors in the error log. I was able to get it to work by right clicking on the project and selecting Generate TestSuite.
  • dgross's avatar
    dgross
    Occasional Contributor
    Here is a WADL file that fails to create a TestSuite:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <application xmlns="http://wadl.dev.java.net/2009/02">
    <resources base="api">
    <resource path="businesses">
    <method name="POST">
    <request>
    <param xmlns:xs="http://www.w3.org/2001/XMLSchema" name="BusinessId" style="query" type="xs:long"/>
    <representation mediaType="application/xml"/>
    <representation mediaType="application/json"/>
    </request>
    <response status="200">
    <representation mediaType="application/xml"/>
    <representation mediaType="application/json"/>
    </response>
    </method>
    <method name="GET">
    <request>
    <param xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Federation" style="query" type="xs:boolean" default="false"/>
    </request>
    <response status="200">
    <representation mediaType="text/xml"/>
    <representation mediaType="application/json"/>
    </response>
    </method>
    <resource path="/{businessID}/export">
    <param name="businessID" style="template"/>
    <method name="GET">
    <response status="200">
    <representation mediaType="text/plain"/>
    </response>
    </method>
    </resource>
    <resource path="{businessID}">
    <param name="businessID" style="template"/>
    <method name="GET">
    <response status="200">
    <representation mediaType="application/json"/>
    <representation mediaType="text/xml"/>
    </response>
    </method>
    </resource>
    <resource path="{businessID}/apis">
    <param name="businessID" style="template"/>
    <method name="POST">
    <request>
    <representation mediaType="application/json"/>
    <representation mediaType="application/xml"/>
    </request>
    <response status="200">
    <representation mediaType="application/json"/>
    <representation mediaType="application/xml"/>
    </response>
    </method>
    </resource>
    </resource>
    </resources>
    </application>
  • dgross's avatar
    dgross
    Occasional Contributor
    One thing I noticed is that since my WADL specifies a relative path for the "base" attribute, the test cases do not work by setting an endpoint on the service properties and then selecting it for all test cases via the URL button on the TestSuite editor. The problem is it does not append the path portion of the resource to the endpoint.

    For example, if I set the endpoint to http://mydomain.com/ and I try to run the test case for businesses (GET), it doesn't try to connect to http://mydomain.com/api/businesses, it tries to connect to http://mydomain.com/.

    Why is this and how do I correct it?

    Thanks,
    -- Dave
  • dgross's avatar
    dgross
    Occasional Contributor
    Yes, the nightly build fixed the endpoint path problem.

    Thanks,
    -- Dave