A.Askaruinisa et al. / (IJCSE) International Journal on Computer Science and Engineering Vol. 02, No. 03, 2010, 566-576 Test Case Reduction Technique for Semantic Based Web Services A. Askaruinisa Department of Computer Science and Engineering Thiagarajar College of Engineering, Affiliated to Anna University Tirunelveli Madurai, India A.M. Abirami Department of Computer Science and Engineering Raja College of Engineering, Affiliated to Anna University Tirunelveli Madurai, India Abstract—Web Services (WS) are the basic building blocks for every e-business applications. They provide efficient reusability mechanism, thereby reducing the development time and cost. Web services can be identified by Uniform Resource Identifier (URI). The interfaces and bindings of Web Services can be discovered, defined and described as XML artifacts according to Web Service Description Language (WSDL). WSDL can be used to describe web service operations including input, output and exceptions. It cannot identify pre and post conditions of web services. But Semantic WSDL (WSDL-S) identifies the pre and post conditions of web services to generate optimal number of test cases. This paper presents an approach for generating web service test cases using WSDL-S and Object Constraint Language (OCL), while the test case generation technique is Orthogonal Array Testing (OAT). We have developed a prototype namely Semantic Web Services Test Case Generator (SWSTCG) which can be viewed in the web site http://www.tcetesting.webs.com .We have generated WSDL of web service to be tested using NetBeans IDE and converted into WSDL-S by giving OCL references, where pre and post conditions are defined. Test data, using OAT, with different factors, levels and strengths are generated and documented in XML based test files called Web Service Test Specifications (WSTS) and executed. The proposed method is compared with the Pair-Wise Testing (PWT) method. We have conducted testing on various web service applications and the results have shown that the proposed method is effective in generating minimal test cases with maximum test case effectiveness. Keywords- web services testing, semantics, test case generation, Orthogonal Testing, Pair-Wise Testing, test case reduction, test case effectiveness I. INTRODUCTION Web services are an enabling technique for Service Oriented Computing (SOC) which provides W3C standard based mechanism and open platform for integrating distributed autonomous service components [25]. The quality of services is a key issue for developing service-based software systems and testing is necessary for evaluating the functional correctness, performance and reliability of individual as well as composite services. However, the development of web services is particularly a difficult task due to the complexity of environment in which they must function. One of the most difficult aspects of web service development is the complexity involved in conducting the effective system testing. The semantic web is an evolving development of the World Wide Web (WWW) in which the meaning (semantics) of information and services on the web is defined, making it possible for the web to understand and satisfy the requests of people and machines to use the web content. The current WSDL standard operates at the syntactic level and lacks the semantic expressivity needed to represent the requirements and capabilities of web services. Also WSDL cannot identify pre and post conditions, logical sequence and constraints of web services. Semantics can improve software reuse and discovery, significantly facilitate composition of web services and enable integration of legacy applications as part of business process integration which can be added through WSDL-S. With respect to web services testing, semantics enable us to reuse test data, thereby reducing the number of test cases to be generated, which in turn reduces test cost and execution time during regression testing. In order to perform complete testing, Factorial Design Technique or All Combinations Testing (ACT) technique requires more number of test cases. For example, if the application takes 4 parameters and each parameter takes 3 different values, totally we need 3 4 = 81 test cases. Many combinatorial testing techniques have been evolved to reduce the number of tests. The benefits of combinatorial testing include: dramatically increased test execution efficiency, better quality, better phase containment, increased speed to market and reduced cost of both testing and bug fixing. Earlier work [1] done on this area considered the PWT technique based on the theory that most software faults are caused by a relatively few combinations of input parameters. Combination strategies are test-case selection methods where test cases are identified by combining values of the different input parameters. An N-way testing technique is defined as a set of tests for N parameters, so that every combination of their valid values is covered by at least one test case. In this paper, we have generated test cases for Web Services using WSDL-S and OCL with OAT technique. We have generated WSDL of Web Service to be tested using NetBeans IDE and converted into WSDL-S by giving OCL references, where pre and post conditions are defined. Test data, using OAT, with different factors, levels and strengths are generated and documented in XML based test files WSTS and executed. The proposed method is compared with the PWT