Advertisement

Bytecode Testability Transformation

  • Yanchuan Li
  • Gordon Fraser
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6956)

Abstract

Bytecode as produced by modern programming languages is well suited for search-based testing: Different languages compile to the same bytecode, bytecode is available also for third party libraries, all predicates are atomic and side-effect free, and instrumentation can be performed without recompilation. However, bytecode is also susceptible to the flag problem; in fact, regular source code statements such as floating point operations might create unexpected flag problems on the bytecode level. We present an implementation of state-of-the-art testability transformation for Java bytecode, such that all Boolean values are replaced by integers that preserve information about branch distances, even across method boundaries. The transformation preserves both the original semantics and structure, allowing it to be transparently plugged into any bytecode-based testing tool. Experiments on flag problem benchmarks show the effectiveness of the transformation, while experiments on open source libraries show that although this type of problem can be handled efficiently it is less frequent than expected.

Keywords

Nest Predicate Test Data Generation Testability Transformation Branch Instruction Open Source Library 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Arcuri, A.: It really does matter how you normalize the branch distance in search-based software testing. Software Testing, Verification and Reliability (2011)Google Scholar
  2. 2.
    Arcuri, A., Briand, L.: A practical guide for using statistical tests to assess randomized algorithms in software engineering. In: IEEE International Conference on Software Engineering, ICSE (2011)Google Scholar
  3. 3.
    Arcuri, A., Yao, X.: Search based software testing of object-oriented containers. Information Sciences 178(15), 3075–3095 (2008)CrossRefGoogle Scholar
  4. 4.
    Baresel, A., Binkley, D., Harman, M., Korel, B.: Evolutionary testing in the presence of loop-assigned flags: a testability transformation approach. In: Proceedings of the 2004 ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2004, pp. 108–118. ACM Press, New York (2004)CrossRefGoogle Scholar
  5. 5.
    Binkley, D.W., Harman, M., Lakhotia, K.: Flagremover: A testability transformation for transforming loop assigned flags. ACM Transactions on Software Engineering and Methodology 2(3), 110–146 (2009)Google Scholar
  6. 6.
    Fraser, G., Arcuri, A.: Evolutionary generation of whole test suites. In: International Conference On Quality Software, QSIC (2011)Google Scholar
  7. 7.
    Fraser, G., Zeller, A.: Mutation-driven generation of unit tests and oracles. In: ISSTA 2010: Proceedings of the ACM International Symposium on Software Testing and Analysis, pp. 147–158. ACM, New York (2010)Google Scholar
  8. 8.
    Harman, M., Hu, L., Hierons, R., Wegener, J., Sthamer, H., Baresel, A., Roper, M.: Testability transformation. IEEE Trans. Softw. Eng. 30, 3–16 (2004)CrossRefGoogle Scholar
  9. 9.
    Lindholm, T., Yellin, F.: Java Virtual Machine Specification, 2nd edn. Addison-Wesley Longman Publishing Co., Inc., Amsterdam (1999)Google Scholar
  10. 10.
    McMinn, P.: Search-based software test data generation: a survey: Research articles. Software Testing Verification Reliability 14(2), 105–156 (2004)CrossRefGoogle Scholar
  11. 11.
    McMinn, P., Binkley, D., Harman, M.: Testability transformation for efficient automated test data search in the presence of nesting. In: Proceedings of the 3rd UK Software Testing Research Workshop (UKTest 2005), Sheffield, UK, September 5-6, pp. 165–182 (2005)Google Scholar
  12. 12.
    Ribeiro, J.C.B.: Search-based test case generation for object-oriented Java software using strongly-typed genetic programming. In: GECCO 2008: Proceedings of the 2008 GECCO Conference Companion on Genetic and Evolutionary Computation, pp. 1819–1822. ACM, New York (2008)CrossRefGoogle Scholar
  13. 13.
    Tonella, P.: Evolutionary testing of classes. In: ISSTA 2004: Proceedings of the ACM International Symposium on Software Testing and Analysis, pp. 119–128. ACM, New York (2004)CrossRefGoogle Scholar
  14. 14.
    Vargha, A., Delaney, H.D.: A critique and improvement of the CL common language effect size statistics of McGraw and Wong. Journal of Educational and Behavioral Statistics 25(2), 101–132 (2000)Google Scholar
  15. 15.
    Wappler, S., Baresel, A., Wegener, J.: Improving evolutionary testing in the presence of function-assigned flags. In: Proceedings of the Testing: Academic and Industrial Conference Practice and Research Techniques - MUTATION, pp. 23–34. IEEE Computer Society Press, Washington, DC, USA (2007)Google Scholar
  16. 16.
    Wappler, S., Lammermann, F.: Using evolutionary algorithms for the unit testing of object-oriented software. In: GECCO 2005: Proceedings of the 2005 Conference on Genetic and Evolutionary Computation, pp. 1053–1060. ACM, New York (2005)Google Scholar
  17. 17.
    Wappler, S., Wegener, J., Baresel, A.: Evolutionary testing of software with function-assigned flags. J. Syst. Softw. 82, 1767–1779 (2009)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Yanchuan Li
    • 1
  • Gordon Fraser
    • 1
  1. 1.Saarland UniversitySaarbrueckenGermany

Personalised recommendations