主权项 |
1. A method of testing a RESTful web service using a testing framework that includes a client, comprising:
defining a test case that describes a plurality of RESTful operations on a resource object and associated input data in a test case configuration file, the test case configuration file comprising application program interfaces (APIs) corresponding to one or more of said RESTful operations on the resource object, associated input data and mappings of API's to test parameters of said test case, the test case configuration file having an alias reference identification of said resource object in place of a real identification that is randomly assigned to the resource object during run time processing of said test case; providing the test case configuration file to a client and to an expected result generator comprising a resource object processor, the client automatically generating testing requests to said web service at run time while said test case is processing based upon said APIs, said associated input data of said test case configuration file and upon receiving in response to actual responses to said testing requests received from said web service during said run time processing, said automatically generating comprising dynamically updating during run time said alias reference identification in said test case configuration file with said assigned real identification in response to said actual responses; automatically creating by the resource object processor expected results generator, at run time while said test case is processing, expected responses to the testing requests based upon said APIs, said updated alias identification, and said associated input data and parameters of said test case configuration file; and comparing said actual received responses with said expected responses. |