What is SOA Testing? Tutorial with Example

What is SOA Testing?

SOA (Service Oriented Architecture) Testing is a Testing of SOA architectural style in which the application components are designed to communicate via communication protocols typically over a network.

In this tutorial, you will learn-

What is SOA?

SOA is a method of integrating business applications and processes together so as to meet the business needs.

In Software Engineering, SOA provides agility and flexibility to business processes. The changes to the process or application can be directed to a particular component without affecting the whole system.

The software developers in SOA either develop or buy chunks of programs called SERVICES.

What is Service?

Learn SOA Testing

Web Services

Web services are independent application components, which are available over the web.

They can be published, found and can be used on the web. They can communicate through the internet.

Learn SOA Testing

Learn SOA Testing

  1. The Service Provider publishes the service to the internet.
  2. The Client searches for a particular web service from the Web Service Registry
  3. A URL and the WSDL for the required web service is returned.

    >> Using the WSDL and the URL, the communication between the service provider and the requestor happens through SOAP messages. <<

  4. When a consumer calls a web service, an HTTP connection will be established to the provider.

    A SOAP message is created to instruct the provider for invoking the required web service logic.

  5. The response received from the provider is a SOAP message which will be embedded into the HTTP response. This HTTP response is the data format which is understandable by the consumer application.

Example

A home page of a Website and a Search Engine displays everyday weather report. Instead of coding the weather report section all over, a Service of weather report can be bought from a vendor and integrated into the pages.

Learn SOA Testing

SOA Testing

SOA consists of various technologies. Applications built using SOA has various services which are loosely coupled.

Learn SOA Testing

SOA Testing should focus on 3 system layers

Services Layer

This layer consists of the services, services exposed by a system derived from business functions.

For example –

Consider a Wellness Website which consists of

  1. Weight Tracker
  2. Blood Sugar Tracker
  3. Blood Pressure Tracker

Trackers display the respective data and date they are entered. Services layer consists of the services which gets the respective data from the Database–

Process Layer

Process Layer consists the processes, collection of services which are part of a single functionality.

The processes might be a part of user interface (for ex – A search engine), a part of an ETL tool (for getting data from the database).

The main focus in this layer will be in user interfaces and process.

The user interface of the weight tracker and its integration with the Database is the primary focus.

Below functions will be of consideration

  1. Adding new data
  2. Editing existing data
  3. Creating new tracker
  4. Deleting data

Consumer Layer

This layer mainly comprises of user interfaces.

Learn SOA Testing

Based on the layer, the testing of an SOA application is distributed into three levels.

  1. Service level
  2. Interface level
  3. End to End level

Strategy for SOA Testing

Test Planning Approach,

Test Execution Approach

SOA Testing Methods

1) Business scenario driven data based testing,

2) Stubs

3) Regression testing

4) Service Level Testing

Service Level Testing includes testing the component for functionality, security, performance and interoperability.

Each and Every Service needs to be first tested independently.

5) Functional Testing

Functional Testing should be done on each service to

6) Security Testing

Security testing of the web service is an important aspect during service level testing of the SOA application; this ensures the safety of the application.

The following factors need to be covered during testing:

7) Performance Testing

Performance Testing of the service needs to be done since the services are reusable and multiple applications might be using the same service.

The following factors are considered during testing:

9) Integration level testing

10) End to End testing

This phase ensures that the application confirms to the business requirements both functionally and non-functionally.

The below items are ensured to be tested during the end to end testing

Challenges in SOA testing

SOA Testing Tools

There are many SOA testing tools available in the market to help testers in testing SOA applications. Here are some of the popular SOA Testing Tools:

1) SOAP UI

"SOAP UI" is an open source Functional testing tool for Services and API Testing.

  • Desktop application
  • Supports multiple protocols – SOAP, REST, HTTP, JMS, AMF, JDBC
  • Web services can be developed, inspected and invoked.
  • Can also use for load testing, Automation Testing, and security testing
  • Stubs can be created by MockServices
  • Web Service requests and tests can be generated automatically through its web service client.
  • Have inbuilt reporting tools
  • Developed by SmartBear

2) iTKO LISA

"LISA" is a product suite which provides a functional testing solution for distributed systems like SOA.

  • Can also use for regression, integration, load and Performance Testing.
  • Developed by iTKO (CA Technologies)
  • Can be used to design and execute tests.

3) HP Service Test

"Service Test" is a functional testing tool, which supports both UI and shared services testing

  • Both functional and performance test of services can be done by a single script.
  • Integrated with HP QC.
  • The massive amount of service and data can be managed.
  • Supports interoperability testing by simulating JEE, AXIS, and DotNet client environments.
  • Developed by HP.

4) Parasoft SOA Test

SOA Test is a testing and analysis tool suite developed for API and API applications testing.

  • Supports Web Services, REST, JSON, MQ, JMS, TIBCO, HTTP, XML technologies.
  • Functional, Unit, Integration, Regression, Security, Interoperability, Compliance and Performance Testing are possible.
  • Stubs can be created using Parasoft Virtualize, which are intelligent than SOAP UI.
  • Developed by ParaSoft

SOA Testing Use Cases

Consider an e-commerce Website, which contains the below functions and Sub-functions:

Order Processing

Learn SOA Testing

PHASE 1

In the first phase of SOA testing i.e. Test Strategy Phase, the application is broken into Services and business functions.

Let us consider below are the Services in the application.

Business functions being the same as the functions of the Website.

Note: The test strategy document would contain the list of the service and the functions which have to be tested.

PHASE 2

Test Planning phase. Test cases are written for each level.

  1. End to End level. The test cases are written for each business use case and flow.

    Below are the example of test cases

    • Create an order with the active user.
    • Create an order with an inactive user.
    • Create an order with the available product with order quantity < available quantity.
    • Create an order with the available product with order quantity > available quantity.
    • Create an order with multiple items
    • Cancel an order completely.
    • Cancel order partially.
  2. Integration level. Test cases are written for integration of database and user interface.

    Below are example test cases.

    • Create a new order with a single item. Verify that the order is created on the database.
    • Create a new order with a single item. Verify that the price calculated for the order is correct.
    • Create a new order with a single item. Verify that the quantity of the available product is less by the order amount.
    • Verify that the status of the order displayed on the UI is same as that on the database.
    • Cancel the order and verify that the status of the order is modified on the database.
    • For the first time payment, verify that the payment details entered on the UI is saved on the database.
    • For returning payments, verify that the payment details on the database are displayed on the UI.
  3. Service level. Each service is tested for all the data conditions.

Below are a few examples.

No. Order Details Order Condition
1 Create Order. No. of Items = 1 Quantity on order < Quantity on database
2 Create Order. No. of Items > 1 Quantity on Order < Quantity on database.
3 Create Order No. of Items = 1 Quantity on Order > Quantity on database
4 Check Order status Status on database = Active
5 Check Order status Status on database = Shipped
6 Check Order status Status on database = Cancelled
7 Check Order status Order id = Invalid
8 Check product availability Quantity of product >0
9 Check product availability Quantity of product =0
10 Check product availability Product id = invalid

PHASE 3 – Test Execution

Test Execution uses bottom-up approach i.e. service level testing is done first, then Integration level and at last End to End testing.

1) Service level

Let us consider that Soapui tool is considered for testing the application.

The WSDL and URL are browsed into the test window of SOAP.

The request for each service will be displayed on the request window.

By modifying the data as per the service level test cases, requests are created for each test case.

Test Case

Request

Expected response

Create Order. No. of Items = 1Quantity on order < Quantity on db

<productid>x2</productid><quantity>2</quantity>

<orderid>o3251</orderid><message>Successful</message>

Create Order.No. of Items > 1Quantity on Order < Quantity on db

<productid>y1</productid><quantity>1</quantity><productid>y2</productid><quantity>3</quantity>

<orderid>o3251</orderid><message>Successful</message>

Create OrderNo. of Items = 1Quantity on Order > Quantity on db

<productid>x23</productid><quantity>200</quantity>

<orderid>null</orderid><message>Unsuccessful</message>

Check Order statusStatus on database = Active

<orderid>o9876</orderid>

<status>Active</active><message>Successful</message>

Check Order statusStatus on database = Shipped

<orderid>o9656</orderid>

<status>Shipped</active><message>Successful</message>

Check Order statusOrder id = Invalid

<orderid>y5686</orderid>

<status>null</active><message>Unsuccessful</message>

Check product availabilityQuantity of product >0

<productid>d34</productid>

<quantity>34</quantity><available>yes</available><message>Successful</message>

Check product availabilityQuantity of product =0

<productid>y34</productid>

<quantity>0</quantity><available>no</available><message>Successful</message>

Check product availabilityProduct id = invalid

<productid>sder</productid>

<message>Unsuccessful</message>

2) Integration Level

The integration level test cases are executed on the User interface and database.

3) End to End level

The business flows and use cases are executed on the User interface.

Conclusion:

By sketching the right strategy for testing, resources, tools, and compliance to provide good service, SOA testing can deliver completely and perfectly tested application.

 

YOU MIGHT LIKE: