Hi,
Here's there progress update on the project so far.
I've attached the initial patch at [2].
As per the discussion, I used JUnit 4.8 for the implementation.
The basic structure of the framework is as follows.
There are two interfaces named *ProcessController* and *
BackEndServerController*.
Those specify the operations associated with controlling synapse and the
axis2 server - starting up and shutting down.
*SynapseProcessController* and *Axis2BackEndServerController* are their
respective implementations.
These are responsible for programatically starting up and shutting down a
synapse server instance and an axis2 server instance in order to run a
sample test.
They start servers in a separate thread and wait until test are finished.
They report back of any error is encountered whlile starting a server
instance.
Configuration information that are required to run a test (id, description,
server configuration information, client configuration information) are
stored in a descriptor file (xml). There is a separate descriptor file for
each sample.
As of now, a descriptor file looks like this:
*<synapseSample>
<sampleID>0</sampleID>
<sampleName>Introduction to Synapse</sampleName>
<synapseConfig>
<axis2Repo>repository</axis2Repo>
<axis2Xml>repository/samples/synapseConfigs/synapseAxis2/axis2_0.xml</axis2Xml>
<synapseXml>repository/samples/synapseConfigs/synapse_sample_0.xml</synapseXml>
</synapseConfig>
<axis2Config>
<axis2Repo>repository/samples/axis2Configs</axis2Repo>
<axis2Xml>repository/samples/axis2Configs/axis2_0.xml</axis2Xml>
</axis2Config>
<clientConfig>
<clientRepo>repository/samples/client_repo</clientRepo>
</clientConfig>
</synapseSample>*
*SynapseTestCase* is the class from which all tests derive.
It loads and stores necessary configuration information from descriptor
files.
Once loaded, the information is stored in *SampleConfiguration*.
Starts the mediation engine and back-end server before each test.
Shuts down running servers after a test is complete.
*StockQuoteClient* is the client which sends sample requests and reports
back the results for testing.
Currently, it requests standard quotes from the server.
*SynapseSamplesTestSuite* specifies the set of test cases to be run.
In this patch, running and testing of *first five samples* are automated.
To run the test suite, following directory structure have to be present in
the working directory.
repository/
`-- samples
|-- axis2Configs
| |-- axis2_0.xml
| |-- conf
| | `-- axis2.xml
| |-- modules
| | |-- addressing.mar
| | |-- rampart.mar
| | `-- sandesha2.mar
| `-- services
| `-- SimpleStockQuoteService.aar
|-- client_repo
| |-- conf
| | `-- axis2.xml
| `-- modules
| |-- addressing.mar
| |-- rampart.mar
| `-- sandesha2.mar
|-- sample0.xml
|-- sample1.xml
|-- sample2.xml
|-- sample3.xml
|-- sample4.xml
|-- sample5.xml
`-- synapseConfigs
|-- synapseAxis2
| `-- axis2_0.xml
|-- synapse_sample_0.xml
|-- synapse_sample_1.xml
|-- synapse_sample_2.xml
|-- synapse_sample_3.xml
|-- synapse_sample_4.xml
`-- synapse_sample_5.xml
If the working directory is synapse home, the directory "samples", along
with its contents, should be copied inside $SYNAPSE_HOME/repository.
I've attached these as a zip file along with the patch.
After adding JUnit and other libs required for synapse and axis2 to the
classpath, I was able to run the test suite from inside the IDE. :)
Next step would be to add the ability to specify server ports and starting
multiple axis2 servers, which is required for load balancing samples.
Feedback / suggestions are much appreciated.
[2] - https://issues.apache.org/jira/browse/SYNAPSE-746
On Tue, Apr 26, 2011 at 10:16 AM, Hiranya Jayathilaka
<[email protected]>wrote:
> Hi Amila,
>
> On Tue, Apr 26, 2011 at 3:03 AM, Amila Manoj <[email protected]> wrote:
>
>> Hi,
>>
>> I'm very happy that I got accepted as a GSoC 2011 student. I'm sure this
>> will be very interesting time and great learning experience for me.
>> I'd like to thank all the folks here, specially my mentor Hiranya, for all
>> your help so far, with ideas and suggestions.
>> I've been getting more familiarized with Synapse past few days and started
>> thinking of the design of the framework. I'll update soon with the progress.
>> As always, any directions are very much appreciated. :)
>> I'll keep in touch.
>>
>
> Congratulations. Looking forward to work with you more closely on this in
> the days to come. I'll send a separate note on the next steps. In the
> meantime you can get cracking with the design and documenting it so the team
> here can review it.
>
> Thanks,
> Hiranya
>
>
>>
>>
>> On Fri, Apr 8, 2011 at 12:58 AM, Amila Manoj <[email protected]>wrote:
>>
>>> Thanks a lot for taking time to read through the proposal and providing
>>> suggestions. I've improved the proposal according to the suggestions and
>>> submitted my proposal to GSoC site. :)
>>>
>>> On Thu, Apr 7, 2011 at 1:01 PM, Hiranya Jayathilaka <
>>> [email protected]> wrote:
>>>
>>>> Hi Amila,
>>>>
>>>> Overall this looks pretty good. I like the structure of the proposal. It
>>>> also appears that you have done some research around this. Here are some
>>>> areas to improve:
>>>>
>>>> 1. I would like to see more technical content in the proposal. One of
>>>> the key problems we'll have to address in this project is designing and
>>>> implementing the sample life cycle. A very simple life cycle would be setup
>>>> -> run -> cleanup. We'll need more phases depending on the complexity of
>>>> the
>>>> sample execution process. It would be great if you can mention some info
>>>> about this in the proposal. Also some implementation details of the life
>>>> cycle would add more value to the proposal. (I believe we can implement
>>>> this
>>>> based on junit)
>>>>
>>> Added details about sample life cycle, implementation.
>>>
>>>>
>>>> 2. Some information on how you are planning to implement reporting
>>>> features would be great. I think we'll end up having to use Junit and Maven
>>>> Surefire for this. Also another key aspect is logging. We need to capture
>>>> logs generated by various applications (Synapse, Axis2, Client etc) and
>>>> present them through the report.
>>>>
>>> Added about implementing report and logging features.
>>>
>>>>
>>>> 3. I found some details are slightly redundant in the abstract and the
>>>> description. Better to clean those bits up.
>>>>
>>> Removed redundant details.
>>>
>>> Thanks,
>>>> Hiranya
>>>>
>>>>
>>>> On Thu, Apr 7, 2011 at 2:11 AM, Amila Manoj <[email protected]>wrote:
>>>>
>>>>> Hi,
>>>>> I've prepared my GSoC proposal [1]. I'd appreciate any suggestions to
>>>>> improve it.
>>>>>
>>>>> [1]
>>>>> https://docs.google.com/document/d/1lA_JhqPPjFMNqs3-haubcCLro681BaiQOB29yr1HywE/edit?hl=en&authkey=CLfk2bwI
>>>>>
>>>>>
>>>> --
>>>> Hiranya Jayathilaka
>>>> Senior Software Engineer;
>>>> WSO2 Inc.; http://wso2.org
>>>> E-mail: [email protected]; Mobile: +94 77 633 3491
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>
>>>
>>>
>>> --
>> Thanks & Regards,
>> Amila Manoj Silva
>> Dept. of Computer Science & Engineering,
>> University of Moratuwa.
>>
>> blog: http://amilamanoj.blogspot.com/
>>
>>
>
>
> --
> Hiranya Jayathilaka
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.org
> E-mail: [email protected]; Mobile: +94 77 633 3491
> Blog: http://techfeast-hiranya.blogspot.com
>
--
Thanks & Regards,
Amila.