Chapter 6. Multilayer Test Automation Using SoapUI and Selenium

In SOA-world, we have services which are tied up with the frontend. The front end is tied up with the service, which takes care of the business process and orchestration. So in order to validate the end to end flow from UI to service and then to the legacy systems or backend, we will need to test the integration between all the layers and check the connectivity from technical and functional perspectives across applications.

In this chapter we look at the following things:

  • Multilayer testing
  • Integrating Selenium and SoapUI
  • Locators identification for UI
  • Automating multilayer test cases using Selenium and SoapUI together

Also when we go ahead testing an end to end flow in an enterprise application we often see that some of the third-party or legacy services are not exposed to us because of security concerns and we have to invoke it through the UI in order to complete the end to end flow.

Let's see an example of business flow - a sample orchestration flow:

  1. Service 1.
  2. Service 2.
  3. Invoke UI, copy the newly generated ID from the UI.
  4. Invoke service 3, pass the ID from step 3 to step 4, request.
  5. Invoke service 4.
  6. Invoke UI, complete, process, submit order.

So as we can see in the preceding example we have four calls that are to be invoked using service and two calls which are invoked using the UI.

So in order to test this flow manually we would need to run services and the UI and check the validation points.

Now how do we automate it? We know that SoapUI isn't capable of UI test automation and other tools, like Selenium or QTP, could invoke a service directly.

The preceding question makes it clear to us that we need a single tool with the capability of the UI as well as service automation.

Multilayer Test Automation Using SoapUI and Selenium

We know that SoapUI is the most used tool for Web services so let's test automation and let's have a look at UI test automation tools.

UI test automation tools

Let's have a look at some of the famous test automation tools:

  • VSTS Ultimate: Visual Studio Test System is a testing tool bundled with Visual Studio Ultimate. There are various add-ons available to support the testing of various types of applications.
  • QTP: Quick Test Professional is a functional testing tool from HP and it supports various applications including the .NET applications with the help of the .NET Extensibility add-on.
  • Selenium: Selenium is a portable software testing framework for web applications. Selenium provides two versions, the IDE (browser plugin) and the Webdriver. The best and the latest today is Web driver which addresses most of the challenges of the previous versions and enables multibrowser test automation. It also provides a test domain-specific language (Selenese) to write tests in a number of popular programming languages, including C#, Java, Groovy, Perl, PHP, Python, and Ruby. The client API runs on the webdriver and the Grid is an additional tool.
  • Ranorex: Ranorex is a Windows GUI test automation framework for testing many different application types including Web 2.0 applications, Win32, MFC, WPF, Flash/Flex, .NET, and Java (SWT).
  • Test Complete: Test Complete is an automated testing tool, developed by SmartBear Software which aims to allow testers to create software quality tests. Test Complete is used for testing many different application types including Web, Windows, WPF, Flash, Flex, Silverlight, .NET, and Java.

In all the preceding tools, Selenium and Ranorex are open source. Whereas the rest are paid and commercial tools.

The only one of the preceding tool above which partially supports both UI and Service automation is VSTS but it is too costly and doesn't have a variety of functionality supported when it comes to automation of web services.

So to enable SoapUI and Selenium to work under a single umbrella, we need to integrate them together to achieve Multilayer test automation.

Let's have a look at how to do this in the following section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset