SOA Testing Tutorial:
In this article, we are going to discuss the testing techniques for an SOA architecture.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
Current day software are so versatile and prone to handle changing user expectations every now then, a standalone model is not useful.
There is where SOA fits right in as the solution.
That’s the reason why, a lot of companies are adapting or trying to adapt the SOA approach because of its advantages such as; Cost cutting, Business agility, easy maintenance etc. With the upcoming market full of SOA architecture, it becomes necessary for the Modern day testers to get a fair idea on the SOA testing.
In this article, we will cover the basics of SOA with examples of it.
This would give the readers a basic idea on SOA. That would be followed by the web services approach of implementation. Finally, we will get into the testing process which can be followed for a SOA architecture model.
What You Will Learn:
What is SOA?
SOA or Sevice-Oriented-Architecture is a flexible/agile/efficient method of integrating various applications/services so as to achieve certain Business needs.
- Unlike other complicated systems, SOA comprises of smaller components/services/micro services tied together so as to meet the business needs.
- The services are the units that make the system whole and when there is a need for a change, rather than changing the whole system, the specific service is modified.
- A service is a component which is capable of performing a task.
- This architecture is more sellable than the legacy system as the End-User gets only the needed services to meet his needs. He doesn’t have to get the whole system.
- The services/micro-services are loosely coupled, Reusable, Stateless which make the system even more robust.
- This model is highly cost efficient in terms of deployment, development, and maintenance.
Examples of SOA
Business need: An application to which a User can login and search for Restaurants based on Geolocation, Download the restaurant details and Menu from the server once the search is complete and finally a payment can be done for placing the order.
This business need can be achieved by the implementation of SOA.
There can be services/micro-services as follows so as to perform various tasks:
- During logging in, the service that would be used is ‘Authentication service’
- Searching of restaurants would be done by ‘Geo-locator service’
- Downloading menu should be done by the ‘Menu Downloader service’
- Finally, payment would be done by ‘Payment service’
Each of the above-mentioned service does something unique so as to make the system work and deliver what it is supposed to do. Now, if a customer needs to only see the restaurant and its menu but doesn’t need a Payment Gateway interface, he would only purchase/deploy the first three services.
This makes the job simple for development, Deployment, Sales, Maintenance and after all the customer/End user.
- These are APIs [Application programming Interfaces] which facilitates the interaction between different software programs.
- There is a service provider which hosts the service on the Web. As part of the hosting, a WSDL is hosted by the provider.
- When the Client sends a request message to the service provider, the communication is established with the use of the URL/WSDL.
- In the below given example, the Geolocation server hosts a Web service which is used by the Service requester.
SOA Testing Process
Every product, model, infrastructure needs to go under the Testing phase so as to satisfy the end user in terms of a good quality product. SOA testing is not only limited to a layer’s testing/Web service protocol testing. This is the overall testing of the architecture and every minute part of it.
The testing approach can be similar to that of the normal testing process. i.e.
- Requirement review process
- Test Planning
- Test design
- Environment Setup
- Execution phase
- Reporting Phase
SOA Testing process revolves around 3 layers in the architecture:
- Service consumers
- Process Layers
- Service layers
Going with the same example above, we can have our layers as follows:
- Service consumer’s layer helps in consumer interaction. This helps in reading the input from the end user and return the appropriate response for the request received. In other words, this basically has the UI interface.
- This is the layer which focuses on the implementation front. This layer in our example will have methods of authentication, the creation of a user etc.
- Service layers are the business functions in terms of services. All the services those are actually called when a specific task is performed are in this layer.
The testing can basically be divided into 4 different stages;
1) Service Level Testing:
- Each service involved in the system is tested individually based on a Request and response method.
- This test is mandatory and very important to proceed with other testing processes.
2) Functional Testing:
- The test is conducted for services on their business needs to find if the response that is received is correct.
- The business needs are first converted into the test cases and the request statements are formed.
- Then the request statements are processed to see if the obtained responses are correct.
- In case of invalid input data, proper error code should be thrown or proper error message should be triggered.
- The formats of the response, as well as the negative scenarios, have to be executed.
3) Security Testing:
- Whenever it comes to a web service, Security testing plays a key role in the success of the Testing process.
- Authentication gateways, Payment gateways etc. should be encrypted when the data is parsed.
- When it comes to XML, vulnerabilities such as CSRF, SQL injection should be verified.
4) Performance Testing:
- Services used in the architecture are hosted so that a lot of other applications can make use of it. Performance testing makes sure the credibility of those services.
- The testing of the services should be done to find out the following sets of result;
- To determine the stability of the services.
- To validate the scalability of the services.
- Service behavior under Peak load conditions
- To find the response times across services
1) Process Testing:
- This process involves the testing of various business processes.
- This should comprise of the integration scenarios of the Web services and application covering the business requirements
- Usage of simulators should be done to generate sample input data and validation should be done for the respective outputs.
- Data flow from different layers should be performed to prove smooth functioning of the system when it is integrated.
1) End to End Testing:
- This phase is meant to validate the business requirements both functionally and non-functionally.
- UI of the application is validated.
- The business process involved is tested.
- The end-to-end data flow is validated in this phase.
- Working with all services when the services are integrated to each other is validated.
1) Regression Testing:
- The stability of the system in incremental build releases is validated by this testing.
- This can be achieved either by Manual Testing/Automation Testing.
Challenges in SOA Testing
Someone rightly said, “Bigger the mesh; Bigger is the mess!”. SOA can become a really complex child hungry for attention.
In other words, with so many minute parts constituting the SOA architecture, it becomes a real tough job to certify it in Testing.
- Tough to simulate the testing environments to carry forward the testing process.
- The products involved in the model can be of same technology/vendor. But, they also can be different. More problems?
- Testing combinations shoot UP with the number of services/components involved.
- Complexity in the model
- Issue reproduction/testing is a tough job.
- Unlike other models, the primary focus of testing should be on the business scope rather than the service and its feature.
SOA Testing Tools
There are numerous applications for SOA testing. SOA Testing tools are selected based on their accurate results and better productivity.
- SoapUI: This is a free tool aimed at Web service testing. SoapUI is capable of doing Functional testing, Performance testing, and Load testing
- Apache Jmeter: This is also an OPEN SOURCE utility which is used for analyzing the performance of SOAP invocation.
- JProfiler: This is used to stop or detect the memory leak, finding bottlenecks in performance etc.
- HP Service test: This is integrated to HP QC. This is a functional testing tool, which also supports UI and shared service testing
Through this article, we have understood the singularity of the model. This is very much different from the legacy model and the article gives a good idea on it. This article also throws some light on SOA procedure and ways to proceed with the testing.
About the author: This is a guest post by Subhasis. He is working as a team lead with over 8 years of corporate experience working for Fortune 500 IT companies.
Post your SOA testing related queries/comments below.
All the best!