Bertrand Delacretaz wrote:

Le Vendredi, 7 nov 2003, � 08:17 Europe/Zurich, Upayavira a �crit :

...3) The remaining thing I dislike is the need to have some code in the sitemap to accept the requests from CocoonUnit)

Thinking wildly about point 3, maybe I could write a unit test servlet and set it up in web.xml to answer requests to /cocoon-unit. Then you wouldn't need code in your sitemap. Hmm....


Why not use sitemap definitions to let CocoonUnitClient (HttpUnit extension) talk to CocoonUnitServer (Cocoon Generator)?

<map:match pattern="/CocoonUnitControl/*/*">
  <map:generate type="cocoon-unit">
    <map:parameter name="test-context-id" value="{1}"/>
    <map:parameter name="operation" value="{2}"/>
  </map:generate>
  <map:serialize type="xml"/>
</map:match>

The Generator would then take care of all interactions between the client-side CocoonUnit classes and the server-side instrumentation stuff: creating test contexts, retrieving pipeline stages, etc, in a RESTish way.

-Bertrand

Yup, that's what I had in mind. But I don't like having to add something to the sitemap for testing purposes.


At least I can make the generator return <testing-not-available/> if the cocoon-unit-enable is set to off.

Regards, Upayavira




Reply via email to