Testing in Web services and SOA environment can be far more distributed in comparison with testing stand-alone or traditional applications. This is because such systems are composed of several hybrid components. These include Web servers and their related components, server side applications, communication services, and client side Web services. In this chapter, the authors focus on challenges and opportunities for software testing in SOA environment. They divide testing activities based on three classifications: testing activities that are going to be similar to those in traditional software development environments, testing activities that will be less usable or popular in SOA, and testing activities that will evolve significantly to adapt to the new environment. The authors believe that most generic testing activities are going to stay in any new software development environment. However, their importance, significance, challenges, and difficulties are going to be dependent on the subject environment. Some tasks will be easier to implement and test and others will either be un-applicable or difficult to test and implement in comparison with testing in traditional software development environments.
TopIntroduction
The recent evolution of the Internet includes continuous expansion of what is called Web services. Traditional software applications are offered to users to download or acquire from storage media such as: CDs, DVDs, etc. On the contrary, Web services are available at their server hosts and can be called by clients or users through the network or the Internet. Users get real time access and connection to those services. This form of distribution system is continuously expanding specially with the continuous growth of the Internet. It is envisioned that in future most of software applications will be delivered to customers through Web services. This is largely dependent on the expansion of the Internet with fast speed, large bandwidth, and disk availability. This means that future computers of users will carry much less amount of software components given that the majority of the components will be on the server side. This is usually referred to as thin clients. Such lightweight or mobility approach helps users to access services from anywhere and using and platform or environment (e.g. desktop, smart phone, Windows, Unix, etc.). To software companies, the major advantage of such software marketing policy is that piracy can be significantly reduced. On the other hand, and since software service will be provided in real time, a continuous challenge, risk, and effort is expected from those companies to be able to provide services with the a high quality standard. Software companies may also need to depend on several third party components, which will complicate both the development and testing processes. One more challenge for testing in such environments which is different from traditional environments is that since services are provided in a very generic reusable format, service providers can expect a wide spectrum of ways on how to use such service from the client side. While such isolation is very good for reusability, however, it may complicate the testing process.
In software testing, test cases are created and executed with the goal of trying to find possible errors in the developed programs. It is hoped to deploy software applications to users with the least possible errors. Testing activities tried to find errors no matter of their cause or origin. In one category, testing can be largely divided into black box and white box testing. In black box testing, the program is tested as a black box based on the requirements or expected services. Assertions are created for each test case and comparison is conducted between expected and actual test case results. In white box testing approach, which is usually conducted by testers not developers, developers can see the internal structure of the code. In another high level testing classification, testing can be divided into functional and non functional testing. Similar to black box testing, functional testing checks to see if the developed software performs all required services, from the users’ perspective, correctly (i.e. based on users’ or requirements’ preferences). On the other hand, non functional testing test the high level quality attributes that are applied to the software in general and not a specific part of component of it. Examples of quality attributes that are tested for non functional testing include: performance, reliability, security, usability, etc.
The general trend in testing is that the main activities and original testing stage occur after the coding stage to test the code whether black or white box testing, functional, or non functional testing. However, there are some other portions or approaches for testing. For example, in Test Driven Development (TDD), test cases are written before the existence of the code (i.e. based on the requirements) and then executed and verified on the code. In some other cases, the software design, before the code, can be tested using some formal method approaches to possibly detect errors before even writing the code.
Service Oriented Architecture (SOA) is a relatively new software architecture that is continuously evolving and expanding with Web services’ evolution. While in Object Oriented Architecture (OOA) software design is built based on finding objects or entities from the problem and solution domains for the subject software, the core in SOA is the service. A service is a user visible software functionality. This functionality is built or implemented on the server side and then called or used by users from the client side.