Hi Lakshman, Will try and let you know. Thanks.
Thanks, Suhan On Thu, Jan 29, 2015 at 2:24 PM, Lakshman Udayakantha <[email protected]> wrote: > Hi Suhan, > > Seems like curl command is not supported for any search parameter numbers > behaviour. UI also not providing feature to search with several commands. > Ex: name and provider together. Anyway you can do a selenium ui test. Arn't > you? > > Thanks > > On Thu, Jan 29, 2015 at 12:04 PM, Suhan Dharmasuriya <[email protected]> > wrote: > >> Hi, >> >> Currently I'm writing test cases for API Manager: API Visibility (search >> behaviour). >> I'm referring following documentation [1]. >> I tried the "Get an API" section [1] curl command and it was successful. >> >> Suhans-MacBook-Pro:integration suhanr$ *curl -X POST -b cookies >> http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag >> <http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag> -d >> "action=getAPI&name=APILifeCycleTestAPI&version=1.0.0&provider=admin"* >> {"error" : false, "api" : {"name" : "APILifeCycleTestAPI", "version" : >> "1.0.0", "description" : "This is test API create by API manager >> integration test", "endpoint" : "", "wsdl" : >> "/registry/resource/_system/governance/apimgt/applicationdata/wsdls/admin--APILifeCycleTestAPI1.0.0.wsdl", >> "tags" : "updated", "availableTiers" : "Gold", "status" : "PUBLISHED", >> "thumb" : null, "context" : "/testAPI", "lastUpdated" : "1422445208156", >> "subs" : 1, "templates" : [["/*", "GET", "Application", "Unlimited"]], >> "sandbox" : "", "tierDescs" : "Allows 20 request(s) per minute.", >> "bizOwner" : "", "bizOwnerMail" : "", "techOwner" : "", "techOwnerMail" : >> "", "wadl" : "", "visibility" : "restricted", "roles" : "admin", "tenants" >> : "", "epUsername" : "", "epPassword" : "", "endpointTypeSecured" : >> "false", "provider" : "admin", "transport_http" : "checked", >> "transport_https" : "checked", "apiStores" : null, "inSequence" : "", >> "outSequence" : "", "subscriptionAvailability" : "", "subscriptionTenants" >> : "", "endpointConfig" : >> "{\"production_endpoints\":{\"config\":null,\"url\":\" >> http://gdata.youtube.com/feeds/api/standardfeeds\"},\"endpoint_type\":\"http\"}", >> "responseCache" : "Disabled", "cacheTimeout" : "300", >> "availableTiersDisplayNames" : "Gold", "faultSequence" : "", >> "destinationStats" : "Disabled", "resources" : >> "[{\"http_verbs\":{\"GET\":{\"auth_type\":\"Application >> \",\"throttling_tier\":\"Unlimited\"}},\"url_pattern\":\"\\/*\"}]", >> "scopes" : "[]", "isDefaultVersion" : "false", "implementation" : >> "ENDPOINT", "hasDefaultVersion" : false, "currentDefaultVersion" : >> null}}Suhans-MacBook-Pro:integration suhanr$ >> >> Publisher front end API search behaviour is as follows. >> *sample url: https://10.100.5.175:9443/publisher/site/pages/index.jag >> <https://10.100.5.175:9443/publisher/site/pages/index.jag>* >> >> Search Options >> By API Name [Default] or >> By API Provider [Syntax - provider:xxxx ] or >> By API Version [Syntax - version:xxxx ] or >> By Context [Syntax - context:xxxx ] or >> By Status [Syntax - status:xxxx ] or >> By Description [Syntax - description:xxxx ] or >> By Subcontext [Syntax - subcontext:xxxx ] or >> By Documentation Content [Syntax - doc:xxxx ] >> >> To simulate above search options, I tried the following and it failed. >> >> Suhans-MacBook-Pro:integration suhanr$ curl -X POST -b cookies >> http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag >> -d "action=getAPI&*name=APILifeCycleTestAPI&provider=admin"* >> {"error" : true, "message" : " Invalid number of parameters or their >> types."}Suhans-MacBook-Pro:integration suhanr$ >> >> Suhans-MacBook-Pro:integration suhanr$ curl -X POST -b cookies >> http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag >> -d "action=getAPI&*version=1.0.0&provider=admin"* >> {"error" : true, "message" : " Invalid number of parameters or their >> types."}Suhans-MacBook-Pro:integration suhanr$ >> >> >> - How can I modify the curl command to search APIs by other means >> (search by: provider/description/context/documentation content) ? >> >> >> - To automate above search behaviour, do I have to modify (e.g.: >> overload getApi method) the >> >> wso2am-1.9.0/1.9.0/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/am/integration/test/utils/publisher/utils/ >> *APIPublisherRestClient*.java? >> - If so how can I find the search behaviour/number of parameters >> implemented in service? >> >> [1] https://docs.wso2.com/display/AM180/Publisher+APIs >> >> Thanks, >> Suhan >> >> -- >> Suhan Dharmasuriya >> Software Engineer - Test Automation >> >> *WSO2, Inc. * >> >> lean . enterprise . middleware >> Tel: +94 112 145345 >> Mob: +94 779 869138 >> Blog: http://suhan-opensource.blogspot.com/ >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Lakshman Udayakantha > WSO2 Inc. www.wso2.com > lean.enterprise.middleware > Mobile: *0711241005* > > -- Suhan Dharmasuriya Software Engineer - Test Automation *WSO2, Inc. * lean . enterprise . middleware Tel: +94 112 145345 Mob: +94 779 869138 Blog: http://suhan-opensource.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
