axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Perry2 <PERR...@uk.ibm.com>
Subject New Ant test framework proposal
Date Fri, 22 Oct 2004 20:51:32 GMT




I've been thinking with my fingers and come up with an idea based upon an
xml file for each test. The test properties xml file example is as follows,
but can easily be expanded.

<test>
    <name>CalculatorDoc</name>
    <description>A simple client server test to an IBM WebSPhere Java
server</description>
    <clientLang>cpp</clientLang>
    <clientCode>CalculatorDocClient.cpp</clientCode>
    <wsdl>CalculatorDoc.wsdl</wsdl>
    <expected>
        <output>
            CalculatorDoc.cpp.out
        </output>
        <request>
            CalculatorDoc.request
        </request>
    </expected>
    <handler>
        <directory>
            handler_chain
        </directory>
       <service>
           Calculator
       </service>
    </handler>
    <endpoint>
        http://localhost:9080/Calculator/services/Calculator
    </endpoint>
</test>

I'm sure that this can be expanded, and I'll create a proper schema soon.

When loaded into an Ant script these will converted to properties:

   test.name - For info only, possibly used for simple documentation
   test.description - For info only, possibly used for simple documentation
   test.clientLang - Language of the test, passed to wsdl2ws
   test.clientCode - The name of the client source file in the
   clients/test.clientLang directory
   test.wsdl - The name of the wsdl to pass to wsdl2ws
   test.expected.output - The test expected output file for comparison
   test.expected.request* - The client request expected output file for
   comparison. Mainly for handler tests.
   test.handler.directory* - All source for handler chains in the
   directory. See below.
   test.handler.service* - Name of test service enter into client.wsdd
   test.endpoint* - The endpoint URL

* = optional

If no endpoint is specified then the client or WSDL default url will be
used.

For the handlers I propose a new directory under the
test/auto_build/testcases directory called handlers, with a sub-directory
of the name of the handler chain to create. This will have sub-directories
which will be the name handler libraries to create, without any library
prefix (lib on linux) or suffix (.so on linux). The source code for each
handler will go in these directories.

e.g.
tests/auto_build/testcases/handlers/handler_chain/testhandler/THandler.h
tests/auto_build/testcases/handlers/handler_chain/testhandler/THandler.cpp
tests/auto_build/testcases/handlers/handler_chain/testhandler/TestHandler.cpp

will create a client.wsdd file with a handler chain of 1 library called
libtesthandler.so (on linux)


A new directory called tests/auto_build/testcases/tests will have all the
new test xml files in it, 1 xml file for each test. The Ant script will
cycle through all files in the directory with the name of the xml files
determining the order the tests are run in, but otherwise having no other
relevance. This means that the same test can be run multiple times with
different endpoints, different wsdls and with or without handlers, with
each test having its own xml file.

I have written and tested this today, and unless anybody objects I would
like to remove the existing test.xml file and implement the changes I have
suggested. I have not created an xml file for all of the current tests yet,
but will try to automate this. Also full user document to follow describing
the framework and showing how to implement new tests.

This will have no effect upon the script based test framework if people
want to use that.

Regards

Andrew Perry
Clients for Web Service Stack
perryan@uk.ibm.com
Mail Point 127
IBM UK Laboratories. Hursley Park, Winchester, Hants. SO21 2JN
Tel. Internal 249828  External + 44 (0)1962 819828
Fax. + 44(0)1962 818080


Mime
View raw message