You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org> on 2011/03/29 08:51:05 UTC

[jira] [Created] (SYNAPSE-746) Implement a Automation Framework for Synapse Samples

Implement a Automation Framework for Synapse Samples
----------------------------------------------------

                 Key: SYNAPSE-746
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
             Project: Synapse
          Issue Type: New Feature
          Components: Core, Documentation
            Reporter: Hiranya Jayathilaka
             Fix For: FUTURE


Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: [jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by Amila Manoj <am...@gmail.com>.
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
<hi...@gmail.com>wrote:

> Hi Amila,
>
> On Tue, Apr 26, 2011 at 3:03 AM, Amila Manoj <am...@gmail.com> 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 <am...@gmail.com>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 <
>>> hiranya911@gmail.com> 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 <am...@gmail.com>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: hiranya@wso2.com;  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: hiranya@wso2.com;  Mobile: +94 77 633 3491
> Blog: http://techfeast-hiranya.blogspot.com
>

-- 
Thanks & Regards,
Amila.

Re: [jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Amila,

On Tue, Apr 26, 2011 at 3:03 AM, Amila Manoj <am...@gmail.com> 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 <am...@gmail.com> 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 <
>> hiranya911@gmail.com> 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 <am...@gmail.com>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: hiranya@wso2.com;  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: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Re: [jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by Amila Manoj <am...@gmail.com>.
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.

On Fri, Apr 8, 2011 at 12:58 AM, Amila Manoj <am...@gmail.com> 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 <hi...@gmail.com>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 <am...@gmail.com> 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: hiranya@wso2.com;  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/

Re: [jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by Amila Manoj <am...@gmail.com>.
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 <hi...@gmail.com>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 <am...@gmail.com> 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: hiranya@wso2.com;  Mobile: +94 77 633 3491
> Blog: http://techfeast-hiranya.blogspot.com
>



-- 
Thanks & Regards,
Amila Manoj
email: amilamanoj@gmail.com
IM: amilamanoj (gtalk)
blog: http://amilamanoj.blogspot.com/

Re: [jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
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)

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.

3. I found some details are slightly redundant in the abstract and the
description. Better to clean those bits up.

Thanks,
Hiranya

On Thu, Apr 7, 2011 at 2:11 AM, Amila Manoj <am...@gmail.com> 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: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com

Re: [jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by Amila Manoj <am...@gmail.com>.
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

On Mon, Apr 4, 2011 at 10:51 AM, Amila Manoj <am...@gmail.com> wrote:

> Hi Hiranya,
>
>
> On Mon, Apr 4, 2011 at 10:29 AM, Hiranya Jayathilaka (JIRA) <
> jira@apache.org> wrote:
>
>>
>>    [
>> https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015281#comment-13015281]
>>
>> Hiranya Jayathilaka commented on SYNAPSE-746:
>> ---------------------------------------------
>>
>> Hi Amila,
>>
>> Welcome to the Synapse community.
>
> Thanks :)
>
>> I think as the first step you should checkout the Synapse source code,
>> build the binary distro and try out some samples manually to get a feel of
>> it.
>
> I've checked out the source code of Synapse, built the binary distro.
>
>>  Samples generally involve running an Axis2 server, starting up Synapse
>> with a given configuration and then running a WS client. Relevant
>> documentation can be found at [1].
>
> Thanks, I'm now going through the documentation and trying out the samples
> (currently trying out SimpleStockQuoteService)
>
>> I think we'll have to use some frameworks like JUnit, Ant and Maven2 for
>> this and hence it might be a good idea to get familiar with these
>> technologies a little bit too.
>>
> I'm already somewhat familiar with Maven2, Ant, JUnit and Axis2. Hope to
> read more on those technologies.
>
>>
>> Please subscribe to the mailing list and lets use that for future
>> conversations.
>>
> Done. I'll be in touch.
>
>>
>> Thanks,
>> Hiranya
>>
>> [1] - http://synapse.apache.org/Synapse_Samples.html
>>
>> > Implement an Automation Framework for Synapse Samples
>> > -----------------------------------------------------
>> >
>> >                 Key: SYNAPSE-746
>> >                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>> >             Project: Synapse
>> >          Issue Type: New Feature
>> >          Components: Core, Documentation
>> >            Reporter: Hiranya Jayathilaka
>> >              Labels: gsoc2011
>> >             Fix For: FUTURE
>> >
>> >
>> > Currently we have to manually setup and run all the Synapse samples.
>> This is a very tedious and time consuming process. We need an automation
>> framework which can handle all these for the developers. This should be able
>> to run a single sample, a selected set of samples and all the samples as
>> requested by the user. The framework should be capable of setting up the
>> environment, running the sample and verifying the results and preferably
>> generate a report as well. JUnit, Apache ANT or Maven2 can be used for
>> automating certain elements of this.
>>
>> --
>> This message is automatically generated by JIRA.
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>> For additional commands, e-mail: dev-help@synapse.apache.org
>>
>>
>
> --
> Thanks & Regards,
> Amila Manoj
> email: amilamanoj@gmail.com
> IM: amilamanoj (gtalk)
> blog: http://amilamanoj.blogspot.com/
>
>


-- 
Thanks & Regards,
Amila Manoj
email: amilamanoj@gmail.com
IM: amilamanoj (gtalk)
blog: http://amilamanoj.blogspot.com/

Re: [jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by Amila Manoj <am...@gmail.com>.
Hi Hiranya,

On Mon, Apr 4, 2011 at 10:29 AM, Hiranya Jayathilaka (JIRA) <jira@apache.org
> wrote:

>
>    [
> https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015281#comment-13015281]
>
> Hiranya Jayathilaka commented on SYNAPSE-746:
> ---------------------------------------------
>
> Hi Amila,
>
> Welcome to the Synapse community.

Thanks :)

> I think as the first step you should checkout the Synapse source code,
> build the binary distro and try out some samples manually to get a feel of
> it.

I've checked out the source code of Synapse, built the binary distro.

>  Samples generally involve running an Axis2 server, starting up Synapse
> with a given configuration and then running a WS client. Relevant
> documentation can be found at [1].

Thanks, I'm now going through the documentation and trying out the samples
(currently trying out SimpleStockQuoteService)

> I think we'll have to use some frameworks like JUnit, Ant and Maven2 for
> this and hence it might be a good idea to get familiar with these
> technologies a little bit too.
>
I'm already somewhat familiar with Maven2, Ant, JUnit and Axis2. Hope to
read more on those technologies.

>
> Please subscribe to the mailing list and lets use that for future
> conversations.
>
Done. I'll be in touch.

>
> Thanks,
> Hiranya
>
> [1] - http://synapse.apache.org/Synapse_Samples.html
>
> > Implement an Automation Framework for Synapse Samples
> > -----------------------------------------------------
> >
> >                 Key: SYNAPSE-746
> >                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
> >             Project: Synapse
> >          Issue Type: New Feature
> >          Components: Core, Documentation
> >            Reporter: Hiranya Jayathilaka
> >              Labels: gsoc2011
> >             Fix For: FUTURE
> >
> >
> > Currently we have to manually setup and run all the Synapse samples. This
> is a very tedious and time consuming process. We need an automation
> framework which can handle all these for the developers. This should be able
> to run a single sample, a selected set of samples and all the samples as
> requested by the user. The framework should be capable of setting up the
> environment, running the sample and verifying the results and preferably
> generate a report as well. JUnit, Apache ANT or Maven2 can be used for
> automating certain elements of this.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>

-- 
Thanks & Regards,
Amila Manoj
email: amilamanoj@gmail.com
IM: amilamanoj (gtalk)
blog: http://amilamanoj.blogspot.com/

Re: [jira] [Updated] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by Amila Manoj <am...@gmail.com>.
Hi,

On Wed, Jul 13, 2011 at 1:42 AM, Amila Manoj Silva (JIRA)
<ji...@apache.org>wrote:

>
>     [
> https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Amila Manoj Silva updated SYNAPSE-746:
> --------------------------------------
>
>     Attachment: samples_repo_dirs_patch_2.zip
>                gsoc_sample_automation_2.patch
>

This patch includes all the work done so far.
As of now, following samples are automated:
Message mediation samples - 0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16
Advanced mediation with endpoints - 50,51,52,53,54,55,56,57,58,59
ProxyService samples - 150,151,152,153,154,155

Most notable change from the previous patch is ability to start multiple
axis2 servers on specified ports.
Changed the sample descriptor file structure to meet this requirement.
Specified ports are set during startup by Axis2BackEndServerController.

A descriptor file for a sample that requires 3 axis2 servers running is as
follows,

<synapseSample>
    <sampleID>52</sampleID>
    <sampleName>Session-less load balancing between 3 endpoints</sampleName>

    <synapseConfig>
        <axis2Repo>repository</axis2Repo>

<axis2Xml>repository/samples/synapseConfigs/synapseAxis2/axis2_0.xml</axis2Xml>


<synapseXml>repository/samples/synapseConfigs/synapse_sample_52.xml</synapseXml>

    </synapseConfig>
    <axis2Config>
        <axis2Server id='1'>
            <axis2Repo>repository/samples/axis2Configs</axis2Repo>
            <axis2Xml>repository/samples/axis2Configs/axis2_0.xml</axis2Xml>

        <httpPort>9001</httpPort>
        <httpsPort>9005</httpsPort>
        </axis2Server>
        <axis2Server id='2'>
            <axis2Repo>repository/samples/axis2Configs</axis2Repo>
            <axis2Xml>repository/samples/axis2Configs/axis2_0.xml</axis2Xml>

        <httpPort>9002</httpPort>
        <httpsPort>9006</httpsPort>
        </axis2Server>
        <axis2Server id='3'>
            <axis2Repo>repository/samples/axis2Configs</axis2Repo>
            <axis2Xml>repository/samples/axis2Configs/axis2_0.xml</axis2Xml>

        <httpPort>9003</httpPort>
        <httpsPort>9007</httpsPort>
        </axis2Server>
    </axis2Config>
    <clientConfig>
    <clientRepo>repository/samples/client_repo</clientRepo>
    </clientConfig>
</synapseSample>


The directory structure for samples repository is basically the same. Added
a temp directory.

Several Endpoint samples(eg.55) requires shutting down an axis2 service
while the client is running. For that purpose, executed the client in a
separate thread.
Some samples require client execution to fail and get an exception. Checked
exception type and matched the description of the received exception is
those cases.

Setting a name for a Axis2 server is needed in certain examples, to see
which response came from which server. In current implementation, this is
done by setting a system property from ant script, retrieving it by the LB
service and creating the response. But here, since all servers are run in a
single process, system properties get replaced.
As a solution to this, I set a property "server_name" in
ConfigurationContext when starting axis2 server. Modified LBService1 to read
the value and create the response. (attached zip file includes the modified
LBService)

Had some trouble with getting Sample 57 to work.
Entry for clustering configuration in axis2.xml for synapse is written as:
<cluster class="org.apache.axis2.clustering.tribes.TribesClusterManager"
enable="false">
When it is enabled, during startup, synapse does not identify the tag name
"cluster", but changing it to "clustering" works.
There is no class named TribesClusterManager at
org.apache.axis2.clustering.tribes in provided axis2 lib. Had to change it
to TribesClusteringAgent. (Posted this separately to dev list)
<loadBalancer enable="true">
            <applicationDomain name="apache.axis2.app.domain"
handler="org.apache.axis2.clustering.DefaultLoadBalanceEventHandler"/>
</loadBalancer>-->
isn't also identified. Had to change this to
<groupManagement enable="true">
            <applicationDomain
agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent"
description="Axis2 group" name="apache.axis2.app.domain"/>
</groupManagement>
In order for clustering to work, we have to provide the ip address. Since
this differs, put a placeholder ${replace.me} for respective locations in
axis2.xml.
when test initialize stage, programatically obtained an ip (avoided loopback
interfaces, gave preference to ipv4), loaded the xml and did a string
replace, saved to repository/temp and used it to start synapse (similarly
axis2 servers)
Was able to automate this sample. However, this seems to fail sometimes
randomly. Going to look into that.

In addition, briefly tried WS-Security samples. Got a
MethodNotFoundException from org.apache.neethi.Policy

Next immediate step is to complete QoS samples.
Then hope to move into transport samples.


>
> Hi,
>
> Attached the second patch.
> Please find the description in the relevant thread at Dev ML.
>

> Thanks,
> Amila
>
> > Implement an Automation Framework for Synapse Samples
> > -----------------------------------------------------
> >
> >                 Key: SYNAPSE-746
> >                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
> >             Project: Synapse
> >          Issue Type: New Feature
> >          Components: Core, Documentation
> >            Reporter: Hiranya Jayathilaka
> >              Labels: gsoc2011
> >             Fix For: FUTURE
> >
> >         Attachments: gsoc_sample_automation_1.patch,
> gsoc_sample_automation_2.patch, samples_repo_dirs.zip,
> samples_repo_dirs_patch_2.zip
> >
> >
> > Currently we have to manually setup and run all the Synapse samples. This
> is a very tedious and time consuming process. We need an automation
> framework which can handle all these for the developers. This should be able
> to run a single sample, a selected set of samples and all the samples as
> requested by the user. The framework should be capable of setting up the
> environment, running the sample and verifying the results and preferably
> generate a report as well. JUnit, Apache ANT or Maven2 can be used for
> automating certain elements of this.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>
-- 
Regards,
Amila Manoj

[jira] [Issue Comment Edited] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by "Amila Manoj Silva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015185#comment-13015185 ] 

Amila Manoj Silva edited comment on SYNAPSE-746 at 4/3/11 5:54 PM:
-------------------------------------------------------------------

Hi,

My Name is Amila Manoj. I'm a 3rd year undergraduate student from University of Moratuwa, Sri Lanka. I would like to work on this feature as my GSoC 2011 project. I'm currently studying about Synapse and trying out the existing samples. Additional details and suggestions on the approach I have to take / material I should follow are very much appreciated. 

Thanks & Regards.

      was (Author: amilamanoj):
    Hi,

My Name is Amila Manoj. I'm a 3rd year undergraduate student from Univerisity of Moratuwa, Sri Lanka. I would like to work on this feature as my GSoC 2011 project. I'm currently studying about Synapse and trying out the existing samples. Additional details and suggestions on the approach I have to take / material I should follow are very much appreciated. 

Thanks & Regards.
  
> Implement an Automation Framework for Synapse Samples
> -----------------------------------------------------
>
>                 Key: SYNAPSE-746
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Documentation
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2011
>             Fix For: FUTURE
>
>
> Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by "Amila Manoj Silva (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Manoj Silva updated SYNAPSE-746:
--------------------------------------

    Attachment: samples_repo_dirs.zip
                gsoc_sample_automation_1.patch

Hi,
Here's the first patch. (should be applied to top level directory.)
I've sent a description to the ML thread.

Thanks,
Amila

> Implement an Automation Framework for Synapse Samples
> -----------------------------------------------------
>
>                 Key: SYNAPSE-746
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Documentation
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2011
>             Fix For: FUTURE
>
>         Attachments: gsoc_sample_automation_1.patch, samples_repo_dirs.zip
>
>
> Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by "Amila Manoj Silva (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Manoj Silva updated SYNAPSE-746:
--------------------------------------

    Attachment: samples_repo_dirs_patch_2.zip
                gsoc_sample_automation_2.patch

Hi,

Attached the second patch.
Please find the description in the relevant thread at Dev ML.

Thanks,
Amila

> Implement an Automation Framework for Synapse Samples
> -----------------------------------------------------
>
>                 Key: SYNAPSE-746
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Documentation
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2011
>             Fix For: FUTURE
>
>         Attachments: gsoc_sample_automation_1.patch, gsoc_sample_automation_2.patch, samples_repo_dirs.zip, samples_repo_dirs_patch_2.zip
>
>
> Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiranya Jayathilaka updated SYNAPSE-746:
----------------------------------------

    Summary: Implement an Automation Framework for Synapse Samples  (was: Implement a Automation Framework for Synapse Samples)

> Implement an Automation Framework for Synapse Samples
> -----------------------------------------------------
>
>                 Key: SYNAPSE-746
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Documentation
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2011
>             Fix For: FUTURE
>
>
> Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by "Hiranya Jayathilaka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015281#comment-13015281 ] 

Hiranya Jayathilaka commented on SYNAPSE-746:
---------------------------------------------

Hi Amila,

Welcome to the Synapse community. I think as the first step you should checkout the Synapse source code, build the binary distro and try out some samples manually to get a feel of it.  Samples generally involve running an Axis2 server, starting up Synapse with a given configuration and then running a WS client. Relevant documentation can be found at [1]. I think we'll have to use some frameworks like JUnit, Ant and Maven2 for this and hence it might be a good idea to get familiar with these technologies a little bit too.

Please subscribe to the mailing list and lets use that for future conversations.

Thanks,
Hiranya

[1] - http://synapse.apache.org/Synapse_Samples.html

> Implement an Automation Framework for Synapse Samples
> -----------------------------------------------------
>
>                 Key: SYNAPSE-746
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Documentation
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2011
>             Fix For: FUTURE
>
>
> Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by "Amila Manoj Silva (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Manoj Silva updated SYNAPSE-746:
--------------------------------------

    Attachment: samples_repo_dirs_patch_3.zip
                gsoc_sample_automation_3.patch

Hi,

Attached the third patch.
Please find the description in the relevant thread at dev ML.

Thanks,
Amila 

> Implement an Automation Framework for Synapse Samples
> -----------------------------------------------------
>
>                 Key: SYNAPSE-746
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Documentation
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2011
>             Fix For: FUTURE
>
>         Attachments: gsoc_sample_automation_1.patch, gsoc_sample_automation_2.patch, gsoc_sample_automation_3.patch, samples_repo_dirs.zip, samples_repo_dirs_patch_2.zip, samples_repo_dirs_patch_3.zip
>
>
> Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Updated] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by "Amila Manoj (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Manoj updated SYNAPSE-746:
--------------------------------

    Attachment: synapse-746-samples-17,153.patch

Hi,
Added the test for sample 17 and fixed sample 153 (by adding a test policy file)
The patch should goto https://svn.apache.org/repos/asf/synapse/trunk/java

Thanks
                
> Implement an Automation Framework for Synapse Samples
> -----------------------------------------------------
>
>                 Key: SYNAPSE-746
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Documentation
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2011
>             Fix For: FUTURE
>
>         Attachments: gsoc_sample_automation_1.patch, gsoc_sample_automation_2.patch, gsoc_sample_automation_3.patch, samples_repo_dirs.zip, samples_repo_dirs_patch_2.zip, samples_repo_dirs_patch_3.zip, synapse-746-samples-17,153.patch
>
>
> Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] [Commented] (SYNAPSE-746) Implement an Automation Framework for Synapse Samples

Posted by "Amila Manoj Silva (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015185#comment-13015185 ] 

Amila Manoj Silva commented on SYNAPSE-746:
-------------------------------------------

Hi,

My Name is Amila Manoj. I'm a 3rd year undergraduate student from Univerisity of Moratuwa, Sri Lanka. I would like to work on this feature as my GSoC 2011 project. I'm currently studying about Synapse and trying out the existing samples. Additional details and suggestions on the approach I have to take / material I should follow are very much appreciated. 

Thanks & Regards.

> Implement an Automation Framework for Synapse Samples
> -----------------------------------------------------
>
>                 Key: SYNAPSE-746
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-746
>             Project: Synapse
>          Issue Type: New Feature
>          Components: Core, Documentation
>            Reporter: Hiranya Jayathilaka
>              Labels: gsoc2011
>             Fix For: FUTURE
>
>
> Currently we have to manually setup and run all the Synapse samples. This is a very tedious and time consuming process. We need an automation framework which can handle all these for the developers. This should be able to run a single sample, a selected set of samples and all the samples as requested by the user. The framework should be capable of setting up the environment, running the sample and verifying the results and preferably generate a report as well. JUnit, Apache ANT or Maven2 can be used for automating certain elements of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org