Skip to main content

Supporting Java Array Data Type in Constraint-Based Test Case Generation for Black-Box Method-Level Unit Testing

  • Conference paper
  • First Online:
New Trends in Computer Technologies and Applications (ICS 2018)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1013))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Beck, K., Gamma, E.: JUnit. http://junit.org. Accessed 10 Oct 2018

  2. Bezier, B.: Software Testing Techniques, 2nd edn. Van Nostrand, New York (1990)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. DeMillo, R.A., Offutt, A.J.: Constraint-based automatic test data generation. IEEE Trans. Softw. Eng. 17(9), 900–910 (1991)

    Article  Google Scholar 

  5. 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)

    Google Scholar 

  6. Apt, K.R., Wallace, M.G.: Constraint Logic Programming Using ECLiPSe. Cambridge University Press, Cambridge (2007)

    MATH  Google Scholar 

  7. Parr, T.: The Definitive ANTLR 4 Reference. 2nd edn. Pragmatic Bookshelf (2013)

    Google Scholar 

  8. PIT Mutation Testing. http://pitest.org. Accessed 10 Oct 2018

  9. 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)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Nai-Wei Lin .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics