Abstract
Test case generation for arrays is more sophisticated than scalars. It involves the generation of both the size of an array and the values of the array elements. This issue is more challenging in black-box testing than in white-box testing because the specification usually does not describe how arrays are processed in the program. This paper proposes a constraint-based approach to generate test cases for Java arrays in black-box method-level unit testing. The constraint-based framework in this paper uses Object Constraint Language as the specification language. The constraint-based specification is then converted into a constraint-based test model, called constraint logic graph. A constraint logic graph is a succinct representation of the disjunctive normal form of the specification. Test case generation is formulated as a set of constraint satisfaction problems generated from the constraint logic graph. These constraint satisfaction problems are then solved using the constraint logic programming to generate the test cases.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Beck, K., Gamma, E.: JUnit. http://junit.org. Accessed 10 Oct 2018
Bezier, B.: Software Testing Techniques, 2nd edn. Van Nostrand, New York (1990)
Chang, C.-K., Lin, N.-W.: A constraint-based framework for test case generation in method-level black-box unit testing. J. Inform. Sci. Eng. 32(2), 365–387 (2016)
DeMillo, R.A., Offutt, A.J.: Constraint-based automatic test data generation. IEEE Trans. Softw. Eng. 17(9), 900–910 (1991)
Gotlieb, A., Botella, B., Rueher, M.: Automatic test data generation using constraint solving techniques. In: International Symposium on Software Testing and Analysis, pp. 53–62 (1998)
Apt, K.R., Wallace, M.G.: Constraint Logic Programming Using ECLiPSe. Cambridge University Press, Cambridge (2007)
Parr, T.: The Definitive ANTLR 4 Reference. 2nd edn. Pragmatic Bookshelf (2013)
PIT Mutation Testing. http://pitest.org. Accessed 10 Oct 2018
Braione, P., Denaro, G., Mattavelli, A., Pezze, M.: SUSHI: a test generator programs with complex structured inputs. In: International Conference on Software Engineering, pp. 21–24 (2018)
Acknowledgments
This paper was partially supported by Ministry of Science and Technology of R.O.C. under grant number 106-2221-E-194-023.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Wang, CL., Lin, NW. (2019). Supporting Java Array Data Type in Constraint-Based Test Case Generation for Black-Box Method-Level Unit Testing. In: Chang, CY., Lin, CC., Lin, HH. (eds) New Trends in Computer Technologies and Applications. ICS 2018. Communications in Computer and Information Science, vol 1013. Springer, Singapore. https://doi.org/10.1007/978-981-13-9190-3_79
Download citation
DOI: https://doi.org/10.1007/978-981-13-9190-3_79
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-13-9189-7
Online ISBN: 978-981-13-9190-3
eBook Packages: Computer ScienceComputer Science (R0)