Mule

The test namespace should be used for configuring test services

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.0-RC2
  • Fix Version/s: 2.0.2
  • Component/s: Core: Configuration
  • Labels:
    None
  • User impact:
    High
  • Similar Issues:
    MULE-3903 Add support for the TestServiceComponent in the test namespace
    MULE-3540 Document use of test namespace
    MULE-3877 Add transport-specific endpoints to the 'test' namespace
    MULE-477 All integration tests should use an embedded server for testing
    MULE-517 Support Spring 2.0 configuration using Namespace Handlers
    MULE-1852 SpringAutowireConfigBuilder tests fail
    MULE-3148 Migrate usages of FunctionalTestComponent to <test:component>
    MULE-2939 Acegi Authentication Namespace Test Useless
    MULE-4348 The servlet endpoints should have a path attribute
    MULE-4836 Using AXIS transport in chaining-router causes web service namespace resolution problem

Description

Right now there is a "test" transport and test schema as part of the TCK. However, we should use the test namespace to configure elements useful for testing. i.e.

FuctionalTestComponent should be configured using something like:

<test:component throw-exception="true"/>

or

<test:component>
    <test:return-data file="data/whatever.txt"/>
</test:component>

Also, I think we should include an event generator component i.e.

<service>
    <test:event-generator frequency="10" messages="1000">
        <test:event-data file="data/whatever.txt"/>
    </test:component>
    <outbound>
        <outbound-pass-through-router>
            <outbound-endpoint address="vm://whatever"/>
       </outbound>
</service>

The event generator could be wrapped up in the test transport and added just by adding an inbound endpoint i.e.

<service>
    <inbound>
        <test:inbound-endpoint eventData="data/whatever.txt" frequency="10" messages="1000"/>
    <component class="org.foo.MyComponent"/>
    <outbound>
        <outbound-pass-through-router>
            <outbound-endpoint address="vm://whatever"/>
       </outbound>
</service>

Of course you could apply inbound transformers here to randomise the data

Activity

Hide
Ross Mason added a comment - 12/Jun/08 04:02 AM

All tasks complete

Show
Ross Mason added a comment - 12/Jun/08 04:02 AM All tasks complete

People

Vote (0)
Watch (0)

Dates

  • Created:
    17/Mar/08 08:50 AM
    Updated:
    12/Jun/08 04:02 AM
    Resolved:
    12/Jun/08 04:02 AM