Hi Ayesha,

Yes I'm using ES version 2.0.0  so it's available. Thanks for the
information and samples, now it is clear.

Thanks & Regards,

Himasha

On Tue, Jan 13, 2015 at 10:16 PM, Ayesha Dissanayaka <aye...@wso2.com>
wrote:

> Hi Himasha,
>
> Yes, you can add test cases for both publisher and store.
>
> What is the ES version you are working on?
> From ES-2.0.0- M4 release onwards, jaggery-test module is available under
> *<ES_HOME>/modules*. So you do not need to include anything there.
>
> In [1] there are test cases written to test the ES-Publisher REST-API.
> There you can see that test cases are written in <spec>.js fiiles. (Files
> other than executor.jag). Hope you can get an idea how to write test cases
> by looking into sample .js files in [1].
> Further you can refer http://jasmine.github.io as a guidline to write
> jaggery-tests.
>
> So, if you are using ES-2.0.0- M4, you can simply add your test specs for
> publisher into
> <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/test directory.
>
> For the store you will have to create a directory "test" in
> <ES_HOME>/repository/deployment/server/jaggeryapps/store, copy the content
> from[2] to a file named executor.jag into this newly created "test"
> directory and add your tests specs files there.
>
> Then add below mapping to
> <ES_HOME>/repository/deployment/server/jaggeryapps/store/jaggery.conf .
> {
> "url":"/test/*",
> "path":"/test/executer.jag"
> }
>
> In
> <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/jaggery.conf[3]
> this is already available.
>
> Restart the ES server.
> You may now list the publisher tests at
> http://localhost:9763/publisher/test and store tests at
> http://localhost:9763/store/test
>
> [1]
> https://github.com/wso2-dev/product-es/tree/master/modules/apps/publisher/test
> [2]
> https://github.com/wso2-dev/product-es/blob/master/modules/apps/publisher/test/executer.jag
> [3]
> https://github.com/wso2-dev/product-es/blob/master/modules/apps/publisher/jaggery.conf
>
> If you need further help on this, let me know.
>
> Thanks!
> - Ayesha
>
>
> On Tue, Jan 13, 2015 at 6:50 PM, Himasha Guruge <himas...@wso2.com> wrote:
>
>> Hi All,
>>
>> I need to write some test cases for an asset extension implemented in ES.
>> I went through the following link[1] but I'm not clear on following points.
>>
>> 1. Can we add test cases for both publisher and store side?
>> 2.  What exactly do we need to add under ES(version)/ modules?
>> 3.  What other files should be listed in a created test folder other than
>> executor.jag?
>>
>> Some additional examples/ articles will be really helpful.
>>
>> [1]
>> http://madhukaudantha.blogspot.com/2013/12/how-to-user-jaggery-test-framework-in.html
>>
>> Thanks & Regards,
>>
>> Himasha Guruge
>> *Software Engineer*
>> WS*O2* *Inc.*
>> Mobile: +94 777459299
>> himas...@wso2.com
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Ayesha Dissanayaka*
> Software Engineer,
> WSO2, Inc : http://wso2.com
> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg>
> 20, Palmgrove Avenue, Colombo 3
> E-Mail: aye...@wso2.com <ayshsa...@gmail.com>
>



-- 
Himasha Guruge
*Software Engineer*
WS*O2* *Inc.*
Mobile: +94 777459299
himas...@wso2.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to