Abstract
Algorithms which seek global optima are computationally expensive. Alternatively, heuristic methods have been proposed to find approximate solutions. Because heuristic algorithms do not always deliver exact solutions it is difficult to verify the computed solutions. Such a problem is known as the oracle problem. In this paper, we propose to apply Metamorphic Testing (MT) in such situations because MT is designed to alleviate the oracle problem and can be automated. We demonstrate the failure detection capability of MT on testing a heuristic method, called the Greedy Algorithm (GA), applied to solve the set covering problem (SCP). The experimental results show that MT is an effective method to test GA.
Chapter PDF
Similar content being viewed by others
References
Johnson, D.S.: Application of algorithms for combinatorial problems. Journal of Computer and System Science 9(3), 256–278 (1974)
Bodorik, P., Riordon, J.S.: Heuristic algorithms for distributed query processing. In: Proceedings of the First International Symposium on Databases in Parallel and Distributed Systems, DPDS’88. IEEE Computer Society Press, Los Alamitos (2000)
Cheng, H., Liu, Q., Jia, X.: Heuristic algorithms for real-time data aggregation in wireless sensor networks. In: Proceedings of the 2006 International Conference on Wireless Communication and Mobile Computing, pp. 1123–1128 (2006)
Chen, T.Y., Cheung, S.C., Yiu, S.M.: Metamorphic testing: a new approach for generating next test cases. Technical Report HKUST-CS98-01, Department of Computer Science, Hong Kong University of Science and Technology, Hong Kong (1998)
Weyuker, E.J.: On testing non-testable programs. The Computer Journal 25(4), 465–470 (1982)
Chan, W.K., Cheung, S.C., Leung, K.R.P.H.: Towards a metamorphic testing methodology for service-oriented software applications. In: Proceedings of the 5th International Conference on Quality Software(QSIC 2005), pp. 470–476. IEEE Computer Society Press, Los Alamitos (2005)
Chan, W.K., Cheung, S.C., Leung, K.R.P.H.: A metamorphic testing approach for online testing of service-oriented software applications. A Special Issue on Service Engineering of International Journal of Web Services Research 4(2), 60–80 (2007)
Chen, T.Y., Feng, J., Tse, T.H.: Metamorphic testing of programs on partial differential equations: a case study. In: Proceedings of the 26th Annual International Computer Software and Applications Conference (COMPSAC), pp. 327–333. IEEE Computer Society Press, Los Alamitos (2002)
Chen, T.Y., Huang, D., Tse, T.H., Zhou, Z.Q.: Case studies on the selection of useful relations in metamorphic testing. In: Proceedings of the 4th Ibero-American Symposium on Software Engineering and Knowledge Engineering (JIISIC), Polytechnic University of Madrid, pp. 569–583. Polytechnic University of Madrid (2004)
Chen, T.Y., Tse, T.H., Zhou, Z.Q.: Semi-proving: an integrated method based on global symbolic evaluation and metamorphic testing. In: Proceedings of the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA), pp. 191–195. ACM Press, New York (2002)
Chen, T.Y., Tse, T.H., Zhou, Z.Q.: Fault-based testing without the need of oracles. Information and Software Technology 45(2), 1–9 (2003)
Gotlieb, A.: Exploiting symmetries to test programs. In: Proceedings of the 14th International Symposium on Software Reliability Engineering, ISSRE (2003)
Chan, W.K., Chen, T.Y., Lu, H., Tse, T.H., Yau, S.S.: Integration testing of context-sensitive middleware-based applications: a metamorphic approach. International Journal of Software Engineering and Knowledge Engineering 16(5), 677–703 (2006)
Garey, M.R., Johnson, D.S.: Computers and Interactibility: A Guide to the Theory of NP-Completeness. W.H. Freeman, New York (1979)
Cormen, T.H., Leisevsen, C.E., Rivest, R.L.: Introduction to Algorithms. MIT Press, Cambridge (1990)
Do, H., Rothermel, G., Kinneer, A.: Prioritizing JUnit Test Cases: An Empirical Assessment and Cost-Benefits Analysis. An International Journal Empirical Software Engineering 11(1), 33–70 (2006)
Agrawal, H., DeMillo, R.A., Hathaway, R., Hsu, W., Hsu, W., Krauser, E.W., Martin, R.J., Mathur, A.P., Spafford, E.H.: Design of mutant operators for the C programming language. Technical Report SERC-TR-41-P, Software Engineering Research Center, Purdue University, West Lafayette, Indiana, USA (March 1989)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 IFIP International Federation for Information Processing
About this paper
Cite this paper
Barus, A.C., Chen, T.Y., Grant, D., Kuo, F.C., Lau, M.F. (2011). Testing of Heuristic Methods: A Case Study of Greedy Algorithm. In: Huzar, Z., Koci, R., Meyer, B., Walter, B., Zendulka, J. (eds) Software Engineering Techniques. CEE-SET 2008. Lecture Notes in Computer Science, vol 4980. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22386-0_19
Download citation
DOI: https://doi.org/10.1007/978-3-642-22386-0_19
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22385-3
Online ISBN: 978-3-642-22386-0
eBook Packages: Computer ScienceComputer Science (R0)