Hi Sajith, Thanks for the feedback. We did some recent changes to data driven module to support body asserts using jsonpath/regex pairs. Please have a look at [1]. We should add multi part form data support as well. That is essential in testing REST API operations like thumbnail uploads. Thanks for the suggestion.
Thanks! Malintha [1] https://github.com/wso2/product-apim/blob/master/modules/integration/tests-integration/tests-backend/src/test/resources/rest-api-test-data/APIMANAGER4877CreateAPIWithScopesAndUpdateTemplateTestCase.txt#L54 On Fri, Aug 19, 2016 at 10:14 AM, Sajith Abeywardhana <[email protected]> wrote: > Hi Malintha, > > Initially, we got the data driven test framework from the APIM code base. > When we were writing the test based on the data driven util framework I > found some limitation as below. > > 1. We can't test the body-asserts[1] using the framework. > 2. We can't do a POST method with the payload as form-data when we use > mime type as "application/octet-stream". > > [1]. https://github.com/wso2/product-apim/blob/master/ > modules/integration/tests-integration/tests-backend/src/ > test/resources/rest-api-test-data/APITestCase.txt#L52 > > Thanks, > Sajith. > > On Fri, Aug 19, 2016 at 8:58 AM, Sanjeewa Malalgoda <[email protected]> > wrote: > >> +1. My suggestion is to improve and use data driven test utility we >> already implemented. >> When all other products move ahead with REST APIs we need to have well >> define protocol to implement tests for them like we do in API >> implementation. >> With this approach even person who do not familiar with coding stuff can >> still implement test cases using JSON test case. >> >> Thanks, >> sanjeewa. >> >> On Thu, Aug 18, 2016 at 10:39 PM, Malintha Amarasinghe < >> [email protected]> wrote: >> >>> Hi All, >>> >>> We are working on modifying the existing test cases based on old jaggery >>> APIs which is deprecated to use the new REST APIs based on CXF. Since the >>> new REST APIs are designed using swagger based, we can generate client >>> libraries for each publisher/store and admin REST APIs using swagger and >>> use them in test cases. >>> >>> *Objectives of this task:* >>> 1. Jaggery APIs are deprecated so we need to gradually move the code we >>> are using them to use the new REST API. >>> 2. Find the limitations of the REST APIs and fix them while we are >>> writing the tests which will help REST APIs to stabilize. >>> >>> On a separate note, we can also consider improving the existing data >>> driven tests module for the REST APIs. >>> >>> 1. Remove hardcoded payloads and use a proper way since its difficult to >>> maintain them when API changes happens (need to change many duplicated >>> places where payloads hardcoded). [1] >>> 2. Proper assertion handling. >>> >>> @Praminda, please add anything if I have missed. >>> >>> Appreciate your thoughts on this. >>> >>> Thanks, >>> Malintha >>> >>> [1] https://github.com/wso2/product-apim/blob/master/modules >>> /integration/tests-integration/tests-backend/src/test/resour >>> ces/rest-api-test-data/APITestCase.txt >>> -- >>> Malintha Amarasinghe >>> Software Engineer >>> *WSO2, Inc. - lean | enterprise | middleware* >>> http://wso2.com/ >>> >>> Mobile : +94 712383306 >>> >> >> >> >> -- >> >> *Sanjeewa Malalgoda* >> WSO2 Inc. >> Mobile : +94713068779 >> >> <http://sanjeewamalalgoda.blogspot.com/>blog >> :http://sanjeewamalalgoda.blogspot.com/ >> <http://sanjeewamalalgoda.blogspot.com/> >> >> >> >> _______________________________________________ >> Architecture mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > *Sajith Abeywardhana* | Software Engineer > WSO2, Inc | lean. enterprise. middleware. > #20, Palm Grove, Colombo 03, Sri Lanka. > Mobile: +94772260485 > Email: [email protected] | Web: www.wso2.com > -- Malintha Amarasinghe Software Engineer *WSO2, Inc. - lean | enterprise | middleware* http://wso2.com/ Mobile : +94 712383306
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
