We should check for 405 as well because we handle it specially and consider
it a valid endpoint because 405 means HEAD is not supported but the
endpoint exists.

Thanks,
NuwanD.

On Fri, Jul 3, 2015 at 10:15 AM, Nuwan Dias <[email protected]> wrote:

> Hi,
>
> We (Saneth, Myself and TharinduA) had a chat and this is what we came up
> with to test this usecase.
>
> 1. Deploy a jax-rs backend which has endpoints which would return 2xx,
> 3xx, 4xx and 5xx responses for HTTP HEAD.
>
> 2. The endpoint validity button should say valid for the 2xx and 3xx
> responses but say invalid for the 4xx and 5xx responses.
>
> Thanks,
> NuwanD.
>
> On Thu, Jul 2, 2015 at 5:08 PM, Sanjeewa Malalgoda <[email protected]>
> wrote:
>
>>
>>
>> On Thu, Jul 2, 2015 at 4:56 PM, Saneth Dharmakeerthi <[email protected]>
>> wrote:
>>
>>> Hi Sanjeewa,
>>>
>>> 1) Doesn't this "Test" functionality confuse because it return
>>> as "invalid" for the wikipedia  endpoint that is used in APIM samples [1]
>>> ?. But sample is working correctly with out any issue.
>>>
>>> 2) Backend automation of APIM-29 [2] is blocked due to this, what is the
>>> correct and recommended approach to test the functionality of "Test" button
>>> ?
>>>
>> Provide URL which return 2XX or 3XX result for http head method. Base
>> server URL should return that response.
>> We cannot test each and every resource client define. What we do here is
>> validate base server url.
>> When you invoke service you may append different path,query parameters
>> and it may dispatch to different resource and you may get correct response
>> that is why sample works.
>> Hope this is clear.
>>
>> Thanks,
>> sanjeewa,
>>
>>>
>>>
>>> [1]
>>> https://docs.wso2.com/display/AM160/Deploying+and+Testing+Wikipedia+API
>>> [2]
>>> https://testlink.wso2.com/linkto.php?tprojectPrefix=APIM&item=testcase&id=APIM-29
>>>
>>>
>>> Thanks and Best Regards,
>>>
>>> Saneth Dharmakeerthi
>>> Senior Software Engineer
>>> WSO2, Inc.
>>> Mobile: +94772325511
>>>
>>> On Tue, Jun 30, 2015 at 11:42 AM, Sanjeewa Malalgoda <[email protected]>
>>> wrote:
>>>
>>>> In test method what we do is HTTP head call to back end(standard
>>>> approach for check service availability).
>>>> And it should return 2XX or 3XX response for that. Otherwise it will
>>>> fail.
>>>>
>>>> Thanks,
>>>> sanjeewa.
>>>>
>>>> On Tue, Jun 30, 2015 at 11:38 AM, Lasitha Deergawansa <[email protected]
>>>> > wrote:
>>>>
>>>>> Hi APIM Team,
>>>>>
>>>>> Is there any reason for this behavior of this test button?
>>>>>
>>>>> Regards,
>>>>> Lasitha.
>>>>>
>>>>> On Tue, Jun 23, 2015 at 12:44 PM, Lasitha Deergawansa <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I have created the Wikipedia API manually which was in sample[1]  and
>>>>>> it is working fine. After I clicked on "Edit" and try to validate "Test"
>>>>>> button in "Production end point" in API implementation page it gives as
>>>>>> "invalid".
>>>>>> Endpoint: http://en.wikipedia.org/w/api.php
>>>>>>
>>>>>>
>>>>>> [1]-
>>>>>> https://docs.wso2.com/display/AM160/Deploying+and+Testing+Wikipedia+API
>>>>>>
>>>>>> Regards,
>>>>>> Lasitha.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Sanjeewa Malalgoda*
>>>> WSO2 Inc.
>>>> Mobile : +94713068779
>>>>
>>>>  <http://sanjeewamalalgoda.blogspot.com/>blog
>>>> :http://sanjeewamalalgoda.blogspot.com/
>>>> <http://sanjeewamalalgoda.blogspot.com/>
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>>
>> *Sanjeewa Malalgoda*
>> WSO2 Inc.
>> Mobile : +94713068779
>>
>>  <http://sanjeewamalalgoda.blogspot.com/>blog
>> :http://sanjeewamalalgoda.blogspot.com/
>> <http://sanjeewamalalgoda.blogspot.com/>
>>
>>
>>
>
>
> --
> Nuwan Dias
>
> Technical Lead - WSO2, Inc. http://wso2.com
> email : [email protected]
> Phone : +94 777 775 729
>



-- 
Nuwan Dias

Technical Lead - WSO2, Inc. http://wso2.com
email : [email protected]
Phone : +94 777 775 729
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to