The focus on the Web services continue to grow with the emergence of Service Oriented Architecture (SOA) because of its reuse, loose coupled nature and agility it adds to business processes.
Similar to typical software application life cycle, web service testing also assumes the equal significance. Rapid creation and deployment of complex web services offer challenges to the developers and QA teams as well during testing.
Web service testing typically has the following tasks:
· Creating Test Clients based on the WSDL
· Invoking the Web service using the test clients by sending the requests.
· Verifying that the actual response is similar to that of expected response.
In some of the cases where the end system is unavailable we need to create the stubs to simulate service provider behavior.
Parasoft SOA Test is a testing tool used in the Webservice Testing that can be used to perform all of the above activities.
This post assumes the basic working knowledge of SOA Test 6.2 in creating the stubs and will discuss the case of simulating the fault from the service provider.
Settings to do for Fault Case in SOA Test stubs:
– Double click on the stub in Test Case Explorer that brings up the screen similar to the below one. Copy the SOAP fault that you want to receive from the service provider in the Response tab as shown below.
– Go to the Service Options tab and click on ‘Return Status’ in the options available at the left side of the screen as shown below. Enter the ‘Return Status’ and ‘Return Message’ fields as shown in below screen.
As per WS Basic Profile, HTTP status code 500 has to be sent to the consumer of the service when service provider sends the fault response. That’s why we are setting the value as 500 here.
0 Responses to “Using SOA Test to Simulate Fault Scenarios”