HI,

The same pattern has used in APIM test cases as well[1].

[1]
https://github.com/wso2-dev/product-apim/blob/master/modules/integration/tests/src/test/java/org/wso2/carbon/am/tests/sample/APIApplicationLifeCycleITestCase.java




On Thu, Sep 4, 2014 at 6:40 AM, Rushmin Fernando <rush...@wso2.com> wrote:

> I think the "apps which has been published are invokable" test scenario
> should be divided into  following sub scenarios.
>
> 1. Published apps are shown in the store
> 2. A user who can sign in to the store can subscribe to apps in store
> 3. Apps which are visible in my subscriptions section are invokable.
>
> I think this way its much more cleaner and is an end to end test. WDYT?
> On Sep 4, 2014 5:36 AM, "Dinusha Senanayaka" <dinu...@wso2.com> wrote:
>
>> Hi Kasun,
>>
>>
>> On Wed, Sep 3, 2014 at 10:25 PM, Kasun Dissanayake <kas...@wso2.com>
>> wrote:
>>
>>> Hi All,
>>>
>>> I was working on [1] and tested it. The way I've done it, is, hit the
>>> gateway URL and check the response code is 302. But I realize that was
>>> wrong when the gateway url is once hit it will redirect to IS and it will
>>> always give me 302.
>>>
>>> Since the gateway URL is handled by SAML and cookies for the following
>>> flow, the test case will be very lengthy.
>>>
>>> *Create app => publish app => login to store => Subscribe the app =>
>>> test weather the gateway url is hit*
>>>
>>> or
>>>
>>> *=> unpublish the app => test weather the app is hit*.
>>>
>>> My suggestion is to do as follow.
>>>
>>> 1)* Create app => login store => test the app is visible in the store
>>> (App is visible only the app is published)*
>>> 2) *=> publish app = > login to store => test the app can be
>>> subscribed.*
>>> 3) *Change the state to unpublish (this will cover other states as
>>> well) => login to store => test the app is visible in the store*
>>>
>>
>> Above mentioned scenarios are fine. Chamila/Thilini/Roshan/Jena has
>> written test cases to create -> publish and subscribe an app. You should be
>> able to reuse them for [1], [2]. In addition to checking whether particular
>> app appears/removed on store once app is in publish/unpublish state, we
>> need to validate whether the invocation is success or not as well. This is
>> to ensure, synapse api get deployed properly in-addition to  saving wep
>> -app artifacts into registry and db in each lifecycle state.
>>
>> Regadrs,
>> Dinusha.
>>
>>>
>>> Over all three test cases will be covered as for LifyCycleTest class.
>>>
>>> WDYT ?
>>>
>>> [1] https://wso2.org/jira/browse/APPM-125
>>>
>>> Cheers
>>>
>>>
>>> --
>>> Kasun Dissanayake
>>> Software Engineer
>>> WSO2 Inc.
>>> Lean | Enterprise | Middleware
>>> Tel - +94 77 086 2860
>>> Skype - kasun.dissanayake4
>>> LinkedIn - lk.linkedin.com/in/kasundis/
>>>
>>
>>
>>
>> --
>> Dinusha Dilrukshi
>> Senior Software Engineer
>> WSO2 Inc.: http://wso2.com/
>> Mobile: +94725255071
>> Blog: http://dinushasblog.blogspot.com/
>>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Waruna Perera
Senior Software Engineer - Test Automation
Mobile: +94 77 3867037
WSO2, Inc.; http://wso2.com/
lean . enterprise . middlewear.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to