Hi all,

Apache Synapse is the core mediation engine of WSO2 ESB. Synapse
configuration language is used in WSO2 ESB to build integration scenarios.

One of the major limitations we have in WSO2 ESB is, it doesn't provide a
built-in way to execute a unit test against a given synapse configuration
artifact (ex. A sequence).

My project is about delivering a framework for executing unit tests for
Synapse artifacts. The process of the testing framework can be briefly
described as follows.

A XML descriptor file which describe a test case is parsed to the testing
framework and a Java model for a test case is built according to the
configurations defined in the descriptor file.

The test descriptor file consists of,

   -

   Inputs (payload, properties, etc.)
   -

   Definitions of mock services
   -

   Pointers to synapse artifacts
   -

   Assertions


The input payload is taken from the descriptor file and message context is
populated with that. Synapse engine is started in background by the
framework and the synapse artifacts referred in the descriptor are deployed
to the engine. Then the generated message context is sent to this deployed
artifacts and it is mediated through the sequences and mock endpoints are
also get called when required. Finally the envelope and the property values
of the output message is asserted with the expected values defined in the
descriptor file.

The high- level architecture diagram of the project is attached herewith.

Regards,
Hirushi Ekanayake
Software Engineering Intern | WSO2

Email : [email protected]
Mobile : +94767880119
Web : http://wso2.com

<http://wso2.com/signature>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to