An Automatic Generation Strategy for Test Cases Based on Constraints

  • Dandan He
  • Lijuan Wang
  • Ruijie Liu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7996)


We propose an automatic generation strategy for test cases. We use the Unified Modeling Language (UML) use cases to describe system requirements, as it can serve as a good basis of the test case generation. Meanwhile, in order to ensure that the test cases can automatically be generated, sequence diagram is used to describe the scene because of its superiority on message transferring between systems. A formal description of the sequence diagram is given, in order to achieve the automated generation of test cases. However, due to the characteristics of the use case description, the internal demands of the system are ignored, leading to inaccurate and rough test cases directly generated by use cases. In order to effectively control such adverse effects, we adopt contraction method that formal constraints demands described by the use cases and keep the constraints through the sequence diagram. This contraction method can not only enhance the test scene accuracy, but also ensure the final generated test cases more accurate with more detailed coverage.


Test case Test Scenario Sequence Diagram 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Meyer, B.: Applying Design by Contract. IEEE Computer (1992) Google Scholar
  2. 2.
    Klaeren, H., Pulvermüller, E., Rashid, A., Speck, A.: Aspect composition applying the design by contract principle. In: Butler, G., Jarzabek, S. (eds.) GCSE 2000. LNCS, vol. 2177, pp. 57–69. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  3. 3.
    Hanna, S., Munro, M.: An Approach for Specification-based Test Case Generation for Web Services. In: 2007. IEEE/ACS International Conference on Computer Systems and Applications, pp. 16–23. IEEE Press, Amman (2007)CrossRefGoogle Scholar
  4. 4.
    Fraiki, F., Leonhardt, T.: SeDiTeC-testing based on sequence diagrams. In: 17th IEEE International Conference on Automated Software Engineering, pp. 261–266. IEEE Press (2002)Google Scholar
  5. 5.
    Tsiolakis, A.: Semantic Analysis and Consistency Checking of UML Sequence Diagrams, Diplomm’beit, TU-Berlin (2001) Google Scholar
  6. 6.
    Monalisa, S., Debasish, K., Rajib, M.: Automatic Test Case Generation from UML Sequence Diagram. In: ADCOM 2007, International Conference on Advanced Computing and Communications, pp. 60–67. IEEE Press, Guwahati (2007)Google Scholar
  7. 7.
    Gnesi, S., Latella, D., Massink, M.: Formal Test-case Generation for UML Statecharts. In: Ninth IEEE International Conference on Engineering Complex Computer Systems, pp. 75–84. IEEE Press (2004)Google Scholar
  8. 8.
    Cartaxo, E.G., Neto, F.G.O., Machado, P.L.: Test Case Generation by means of UML Sequence Diagrams and Labeled Transition Systems. In: IEEE International Conference on Systems, Man and Cybernetics, pp. 1292–1297. IEEE Press, Montreal (2007)Google Scholar
  9. 9.
    Kuball, S., Hughes, G., Gilchrist, I.: Scenario-Based Unit Testing For Reliability. In: Annual on Reliability and Maintainability Symposium, pp. 222–227. IEEE Press, Seattle (2002)Google Scholar
  10. 10.
    Baker, P., Bristow, P., Jervis, C., King, D., Mitchell, B.: Automatic generation of conformance tests from message sequence charts. In: Sherratt, E. (ed.) SAM 2002. LNCS, vol. 2599, pp. 170–198. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  11. 11.
    Jorgensen, P.: Software Testing: A Craftsman’s Approach. CRC Press (2002)Google Scholar
  12. 12.
    Kaschner, K., Lohmann, N.: Automatic Test Case Generation for Interacting Services. In: Feuerlicht, G., Lamersdorf, W. (eds.) ICSOC 2008. LNCS, vol. 5472, pp. 66–78. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  13. 13.
    Bai, X.Y., Dong, W.L., Tsai, W.T., Chen, Y.N.: WSDL-based automatic test case generation for Web services testing. In: IEEE International Conference on Service-Oriented System Engineering, pp. 207–212. IEEE Press (2005)Google Scholar
  14. 14.
    Beyer, M., Dulz, W., Zhen, F.: Automated TTCN-3 test case generation by means of UML sequence diagrams and Markov chains. In: 12th Asian Conference on Test Symposium, pp. 102–105 (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Dandan He
    • 1
  • Lijuan Wang
    • 1
  • Ruijie Liu
    • 1
  1. 1.Dalian Institute of Science and TechnologyDalianChina

Personalised recommendations