Towards efficient measuring of web services API coverage
2011, Proceeding of the 3rd international workshop on Principles of engineering service-oriented systems - PESOS '11
https://doi.org/10.1145/1985394.1985398Abstract
We address the problem of interface-based test coverage for Web services. We suggest an approach to analyze the Application Programming Interface (API) of Web services, calculate the number of possible input combinations and compare it to the number of actual historical invocations. Such API coverage metrics are an indicator to which extent the service has been used. Measuring API coverage is a key concern for assessing the significance of Verification and Validation (V&V) techniques; on the other hand, API coverage metrics can also yield interesting usage reports for a service-based system in production use. The coverage metrics rely on the exact specification of service interfaces, and we provide a mechanism to specify restrictions for data types in the Java Web services framework (JAX-WS). As full enumeration of all possible inputs is often infeasible, we allow the definition of custom coverage metrics by means of domain partitioning: the user divides domain ranges into subsets, and a coverage of 100% means that the logged invocations contain at least one sample for each subset. Based on a prototype implementation, we evaluate different aspects of our approach.
References (19)
- X. Bai, W. Dong, W.-T. Tsai, and Y. Chen. WSDL-based au- tomatic test case generation for Web services testing. In Int. Workshop Service-Oriented Syst. Eng., pages 215-220, 2005.
- X. Bai, Y. Wang, G. Dai, W.-T. Tsai, and Y. Chen. A frame- work for contract-based collaborative verification and vali- dation of web services. In CBSE '10, pages 258-273, 2007.
- L. Baresi and E. D. Nitto. Test and Analysis of Web Services. Springer-Verlag New York, Inc., 2007.
- C. Bartolini, A. Bertolino, S. Elbaum, and E. Marchetti. Whitening SOA Testing. In ESEC/SIGSOFT FSE '09, 2009.
- C. Bartolini, A. Bertolino, E. Marchetti, and A. Polini. WS-TAXI: A WSDL-based Testing Tool for Web Services. In ICST 2009, pages 326-335, 2009.
- B. Beizer. Software testing techniques (2nd ed.). Van Nostrand Reinhold Co., New York, USA, 1990.
- A. Bertolino, J. Gao, E. Marchetti, and A. Polini. Automatic Test Data Generation for XML Schema-based Partition Testing. In Int. Workshop Automation of Software Test, 2007.
- R. V. Binder. Testing object-oriented systems: models, patterns, and tools. Addison-Wesley Longman, 1999.
- G. Canfora and M. Di Penta. Testing Services and Service-Centric Systems: Challenges and Opportunities. IT Professional, 8(2):10-17, 2006.
- J. Garcïa-fanjul, J. Tuya, and C. D. L. Riva. Generating Test Cases Specifications for BPEL Compositions of Web Services Using SPIN. In WS-MaTe 2006, pages 83-94, 2006.
- W. Hummer, O. Raz, O. Shehory, P. Leitner, and S. Dustdar. Test coverage of data-centric dynamic compositions in service-based systems. In 4th IEEE International Conference on Software Testing, Verification and Validation, 2011.
- A. Jorgensen and J. Whittaker. An API Testing Method. In STAREAST Conf. on Softw. Testing Analysis & Review, 2000.
- D. Lübke, L. Singer, and A. Salnikow. Calculating BPEL Test Coverage Through Instrumentation. In Int. Workshop on Automation of Software Test, pages 115-122, 2009.
- L. Mei, W. Chan, and T. Tse. Data flow testing of service-oriented workflow applications. In ICSE, 2008.
- M. P. Papazoglou, P. Traverso, S. Dustdar, and F. Leymann. Service-Oriented Computing: State of the Art and Research Challenges. Computer, 40(11):38-45, 2007.
- J. O. Paul Ammann. Introduction to Software Testing. Cambridge University Press, 2008.
- W. T. Tsai, Y. Chen, R. Paul, N. Liao, and H. Huang. Coop- erative and Group Testing in Verification of Dynamic Com- posite Web Services. In COMPSAC, pages 170-173, 2004.
- World Wide Web Consortium (W3C). XML Path Language (XPath). http://www.w3.org/TR/xpath/, 1999.
- W. Xu, J. Offutt, and J. Luo. Testing Web Services by XML Perturbation. In 16th IEEE Int. Symposium on Software Reliability Engineering, pages 257-266, 2005.