skip to main content
10.1145/2786805.2803204acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article

Inner oracles: input-specific assertions on internal states

Published:30 August 2015Publication History

ABSTRACT

Traditional test oracles are defined on the outputs of test executions, and cannot assert internal states of executions. Traditional assertions are common to all test execution, and are usually more difficult to construct than on oracle for one test input. In this paper we propose the concept of inner oracles, which are assertions on internal states that are specific to one test input. We first motivate the necessity of inner oracles, and then show that it can be implemented easily using the available programming mechanisms. Next, we report two initial empirical studies on inner oracles, showing that inner oracles have a significant impact on both the fault-detection capability of tests and the performance of test suite reduction. Finally, we highlight the implications of inner oracles on several research and practical problems.

References

  1. E. T. Barr, M. Harman, P. McMinn, M. Shahbaz, and S. Yoo. The oracle problem in software testing: A survey. IEEE TSE, 41(5):507–525, 2014.Google ScholarGoogle Scholar
  2. K. Beck. Test-driven development: by example. Addison-Wesley Professional, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H. Do, S. Elbaum, and G. Rothermel. Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact. ESE, 10(4):405–435, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Fang, Z. Chen, and B. Xu. Comparing logic coverage criteria on test case prioritization. SCIENCE CHINA Information Sciences, 55(12):2826–2840, 2012.Google ScholarGoogle ScholarCross RefCross Ref
  5. R. G. Hamlet. Testing programs with the aid of a compiler. IEEE TSE, 3(4):279–290, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Hao, L. Zhang, M. Liu, H. Li, and J. Sun. Test-data generation guided by static defect detection. JCST, 24(2):284–293, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Hao, L. Zhang, L. Zhang, G. Rothermel, and H. Mei. A unified test-case prioritization approach. ACM TOSEM, 24(2):1–31, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. W. E. Howden. Weak mutation testing and completeness of test sets. IEEE TSE, 8(4):371–379, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. Springer, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  10. P. McMinn. Search-based software test data generation: A survey. STVR, 14(2):105–156, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. H. Mei, D. Hao, L. Zhang, L. Zhang, J. Zhou, and G. Rothermel. A static approach to prioritizing JUnit test cases. IEEE TSE, 38(6):1258–1275, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. Pinto, S. Sinha, and A. Orso. Understanding myths and realities of test-suite evolution. In Proc. FSE, pages 1–11, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Schuler and A. Zeller. Javalanche: Efficient mutation testing for Java. In Proc. FSE, pages 297–298, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Staats, M. W. Whalen, and M. P. Heimdahl. Programs, tests, and oracles: The foundations of testing revisited. In Proc. ICSE, pages 391–400, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. M. Voas. PIE: A dynamic failure-based technique. IEEE TSE, 18(8):717–727, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Xie. Augmenting automatically generated unit-test suites with regression oracle checking. In Proc. ECOOP, pages 380–403. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Zhang, J. Chen, D. Hao, Y. Xiong, B. Xie, L. Zhang, and H. Mei. Search-based inference of polynomial metamorphic relations. In ASE, pages 701–712, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. L. Zhang, D. Marinov, L. Zhang, and S. Khurshid. An empirical study of junit test-suite reduction. In Proc. ISSRE, pages 170–179, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. H. Zhong, L. Zhang, and H. Mei. An experimental study of four typical test suite reduction techniques. IST, 50(6):534–546, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. H. Zhu. A formal analysis of the subsume relation between software test adequacy criteria. IEEE TSE, 22(4):248–255, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Inner oracles: input-specific assertions on internal states

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ESEC/FSE 2015: Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering
      August 2015
      1068 pages
      ISBN:9781450336758
      DOI:10.1145/2786805

      Copyright © 2015 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 30 August 2015

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate112of543submissions,21%

      Upcoming Conference

      FSE '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader