Testing Web Services with TestComplete

Web Services are specific applications that use XML-based standards and protocols to exchange information. Unlike web server applications, web services do not have the graphical interface because they are not intended for human interaction. Moreover, web service provides definition of the methods and interfaces available for a call. This information is published in a WSDL (Web Service Definition Language) format.

As all we know, Testcomplete provide robust features to perform functional testing of web services. This includes the following steps:

• Analyzing and Planning the test.
• Exploring methods and objects provided by the tested web service in TestComplete.
• Creating script code for calling object methods and verifying the returned values.

Steps :

a) Create or Load your project in TestComplete.

b) Right-click the project’s node in the Project Explorer panel and select Add New Item from the context menu. This will open the Create Project Item dialog.

c) Use this dialog to add the Web Services item to your project. The added item will be displayed in the Project Explorer. To perform TC functional testing of web services, use the Web Services project item. It lets us explore the web service’s methods and objects and call them from scripts.

(Note : This functionality is available only if the Web Services and Web Services Editor plug-ins are installed in TestComplete.)



d) Now, Right-click the Web Services node in the Project Explorer and choose Add New Item from the context menu. After adding the Web Service element to our project, we can specify its properties.

e) This Web Service test editor displays information on methods of a Web Service and on the objects that are used by these methods as parameters. Please see the underneath Project example for comprehending web service and on the objects that are used by these methods as parameters.



To specify web service, whose data will be displayed in the editor, do the following:

• Press Select button. This will call the Select Web Service dialog.
• In the dialog, specify the location of the WSDL document, select the desired web service and the version of the SOAP protocol that will be used for testing.



f) The web service’s methods are displayed under the Methods node in the type and methods tree. Web service methods can use parameters of an object or array types. To call these methods from script, we need to create the appropriate object and assign values to its properties.

g) Sub sequent to create Script suite, we can execute this Web Service verification scripts by calling object methods and verifying the returned values.

Comments

0 Responses to "Testing Web Services with TestComplete"

Post a Comment