Abstract:
Web services (WS) have emerged over the last decade as the standard format of description that solves the problems of integration and inter-operability between heterogeneous applications over the Web. This is achieved through the standard protocols for describing, publishing and invoking the web services. Web services are described using WSDL, published using UDDI and invoked using SOAP protocols. Since these protocols are based on XML, which is accepted as a standard language the web services can be discovered, selected, ranked and composed on the run-time. These are called the web service tasks. Although the web services solved the problems of integration and inter-operability, however, due to the lack of semantics, the automation of web service tasks remains still a challenge. To overcome this problem, web services have been described semantically using ontology languages. These are called the Semantic Web Services (SWS). Many different frameworks, e.g., Web Ontology Language for Services (OWL-S) and Web Service Modeling Ontology (WSMO) etc., have been proposed since the past decade to add the semantics to the present web services. Since the SWS are still emerging, there is little research in the area of SWS testing to-date. The lack of the research in this area is also due to the nature of SWS that brings challenges to the testing tasks, e.g., the unavailability of source code, dynamic nature and grounding mechanism. Keeping this in mind, we aimed to contribute in the area of semantic web service testing by nding and addressing a suitable research gaps. The literature survey reveals the approaches proposed to-date only test the semantic web services from a provider's observation. Moreover, in SWS frameworks, e.g., WSMO, the provider's speci cation is independent from the user's speci cation. Due to this reason, the present techniques may not necessarily ensure that a semantic web service tested using the traditional approach can ful ll or satisfy all the user requirements. We believe this is a major limitation in the area of SWS testing, since the future generation of Web, i.e., semantic web and semantic web services, will be more as a user-oriented environment, inspired from the AI based problem solving techniques. In this thesis, we proposed a novel approach, namely the goal based testing of semantic web services, which is based on the WSMO framework of SWS to lay down our research. The goal speci cation in WSMO represents a template for the generic user requirements. WSMO is an emerging framework for SWS development, mainly based on the loose coupling principle. It uses the four top level elements to describe the SWS, i.e., the ontology to de ne the meaning of the terms, the web service, to describe a web service's behavior and pro le, goal, that to describe how user represents his request, and nally the mediator to resolve the mismatches between di erent entities. To demonstrate the proposed approach of SWS testing, we present three main steps in the testing of SWS, i.e., test case generation from goal speci cations, test case execution, and evaluation of the generated test cases. For the generation of test cases, we proposed a framework for test case generation from goal speci cation using formal methods. We applied model checking technique for this purpose, where the goal speci cation de ned in WSMO was translated into the formal B speci cation and a model checker tool was used to violate the trap properties for generating the counterexamples. Finally, the counterexamples were translated back to the WSML instances to represent the concrete test cases. For translation between WSMO to B and vice versa, we proposed a translation mechanism which contains a set of well-de ned mapping rules. To execute the concrete test cases we used the Web Service Execution Environment (WSMX) engine. We implemented a tool to automate the execution of test cases and collect the results. In addition, to evaluate the generated test cases, we investigated coverage based approach as a preliminary technique. Whereas, to perform the actual evaluation of test cases in a more realistic and most importantly independent from the test case generation process, we proposed the mutation based framework for test cases evaluation. We implemented the tool to automate the steps of mutant generation, mutant execution and comparing outputs of original and mutated SWS. The tool does not only provide the evaluation of test cases based on mutation but also performs the further analysis such as determining the number of mutants killed by each test case, the most e ective test cases, the least e ective test case, redundant test cases, and nally the reduced test suite. We demonstrate the viability of the approach of test case generation and evaluation on the real world case study, the Amazon E-Commerce Service (ECS) web service. We implemented Amazon ECS as a semantic web service and generated the set of test cases from the goal speci cation for Amazon ECS. The generated test cases for Amazon ECS were evaluated using the proposed framework and tool. The result show that the approach is scalable and can be applied on real world examples. All the steps of the testing proposed in the thesis, i.e., test case generation, execution and evaluation can be combined into a coherent environment for achieving the user based testing of SWS. We believe that our work brings a novel and practical solution in the area of semantic web services testing.