Skip to main content
Log in

Automatic generation of built-in contract test drivers

  • Regular Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

Automatic generation of platform-independent and -dependent built-in contract test drivers that check pairwise interactions between client and server components is presented, focusing on the built-in contract testing (BIT) method and the model-driven testing approach. Components are specified by UML diagrams that define the contract between client and server, independent of a specific platform. MDA approaches are applied to formalize and perform automatic transformations from a platform-independent model to a platform-independent test architecture according to a BIT profile. The test architecture is mapped to Java platform models and then to test code. All these transformations are specified by a set of transformation rules written in the Atlas Transformation Language (ATL) that are automatically performed by the ATL engine. The solution named the MoBIT tool is applied to case studies in order to investigate the expected benefits and challenges to be faced.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

Notes

  1. http://sites.google.com/a/computacao.ufcg.edu.br/mobit/.

  2. http://sites.google.com/a/computacao.ufcg.edu.br/mobit/.

References

  1. Aboulsamh, M., Davies, J.: Towards a model-driven approach to information system evolution. In: Information Systems Development, pp. 269–280. Springer, Berlin (2011)

  2. AMMA Project: Atlas transformation language (2005). http://www.sciences.univ-nantes.fr/lina/atl/

  3. Ammann, P., Offutt, J.: Introduction to Software Testing. Cambridge University Press, Cambridge (2008)

    Book  MATH  Google Scholar 

  4. Atkinson, C., Bayer, J., Bunse, C., Kamsties, E., Laitenberger, O., Laqua, R., Muthig, D., Paech, B., Wüst, J., Zettel, J.: Component-based Product Line Engineering with UML. Component Software Series. Addison-Wesley, Boston (2002)

  5. Atkinson, C., Gross, H.G.: Built-in contract testing in model-driven, component-based development. In: Proceedings of ICSR—Workshop on Component-Based Development Processes (2002)

  6. Baker, P., Dai, Z.R., Grabowski, J., Haugen, O., Samuelsson, E., Schieferdecker, I., Williams, C.E.: The UML 2.0 Testing Profile. In: Proceedings of the ‘8th Conference on Quality Engineering in Software Technology 2004’ (CONQUEST 2004) in Nuremberg (Germany), pp. 181-189. ASQF e.V., Erlangen, September 22–24, 2004. ISBN 3-9809145-1-8

  7. Baker, P., Grabowski, J., Haugen, O., Schieferdecker, I., Williams, C.: Model-Driven Testing: Using the UML Testing Profile, 1 edn. Springer, Berlin (2007)

    Google Scholar 

  8. Barbero, M.: Javaabstractsyntax (2006). http://www.eclipse.org/

  9. Barbosa, D.L., Lima, H.S., Machado, P.D.L., Figueiredo, J.C.A., Juca, M.A., Andrade, W.L.: Automating functional testing of components from UML specifications. Int. J. Softw. Eng. Knowl. Eng. 17, 339–358 (2007)

    Article  Google Scholar 

  10. Belinfante, A.: JTorX: a tool for on-line model-driven test derivation and execution. In: Tools and Algorithms for the Construction and Analysis of Systems, vol. 6015, pp. 266–270. Springer, Berlin (2010)

  11. Berger, B., Abuelbassal, M., Hossain, M.: Model driven testing. Tech. rep., DNA Enterprises, Inc (1997)

  12. Born, M., Schieferdecker, I., Gross, H.G., Santos, P.: Model-driven development and testing—a case study. In: Proceedings of First European Workshop on Model Driven Architecture with Emphasis on Industrial Application, pp. 97–104. University of Twente, Enschede (2004)

  13. Briand, L.C., Labiche, Y., Sówka, M.M.: Automated, contract-based user testing of commercial-off-the-shelf components. In: ICSE ’06: Proc. of the 28th Int. Conference on Software Engineering, pp. 92–101. ACM Press, New York (2006)

  14. Budinsky, F., Brodsky, S.A., Merks, E.: Eclipse Modeling Framework. Pearson Education, Upper Saddle River (2003)

    Google Scholar 

  15. Cheesman, J., Daniels, J.: UML Components—A Simple Process for Specifying Component-Based Software. Component Software Series. Addison-Wesley, Boston (2001)

    Google Scholar 

  16. Dai, Z.R.: Model-driven testing with UML 2.0. In: Proceedings of Second European Workshop on Model Driven Architecture (MDA) with an Emphasis on Methodologies and Transformations. Canterbury, England (2004)

  17. Dias Neto, A., Subramanyan, R., Vieira, M., Travassos, G.: A survey on model-based testing approaches: a systematic review. In: Proceedings of the 1st ACM international workshop on Empirical assessment of software engineering languages and technologies: held in conjunction with the 22nd IEEE/ACM International Conference on Automated Software Engineering (ASE) 2007, pp. 31–36. ACM (2007)

  18. Dueñas, J.C., Mellado, J., Cerón, R., Arciniega, J.L., Ruiz, J.L., Capilla, R.: Model driven testing in product family context. In: Proceedings of First European Workshop on Model Driven Architecture with Emphasis on Industrial Application. University of Twente, Enschede (2004)

  19. Eiselt, H., Gendreau, M., Laporte, G.: Arc routing problems, part I: the Chinese postman problem. Oper. Res. 43(2), 231–242 (1995)

    Google Scholar 

  20. Engels, G., Guldali, B., Lohmann, M.: Towards model-driven unit testing. In: Proceedings of Workshops and Symposia at MoDELS 2006, LNCS, vol. 4364 (2006)

  21. Gross, H.G., Atkinson, C., Barbier, F.: Component integration through built-in contract testing. In: A. Cechich, M. Piattini, A. Vallcillo (eds.) Component-Based Software Quality . Lecture Notes in Computer Science 2693, 159–183 (2003)

  22. Gross, H.G., Schieferdecker, I., Din, G.: Modeling and implementation of built-in contract tests. In: Beydeda, S., Gruhn, V. (eds.) Testing Commercial-off-the-Shelf Components and Systems. Springer, Heidelberg (2005)

    Google Scholar 

  23. Heckel, R., Lohmann, M.: Towards model-driven testing. Electron. Notes Theor. Comput. Sci. 82(6) (2003)

  24. Kim, Y., Hong, H., Bae, D., Cha, S.: Test cases generation from uml state diagrams. In: Software, IEE Proceedings-, vol. 146, pp. 187–192. IET (1999)

  25. Kleppe, A., Warmer, J., Bast, W.: MDA explained: the model driven architecture: practice and promise. Addison-Wesley Longman Publishing Co., Inc., Boston (2003)

    Google Scholar 

  26. Kruchten, P.: The Rational Unified Process: An Introduction, 3rd edn. Addison-Wesley, Boston (2003)

    Google Scholar 

  27. Ledo, A., Ramalho, F., Pires, W., Melo, N.: JavaCG—a java code generator for the javaabstractsyntax metamodel (2008). http://code.google.com/p/java-cg/

  28. Lima, H., Ramalho, F., Machado, P., Galdino, E.: Automatic Generation of Platform Independent Built-in Contract Testers. In: Brazilian Symposium of Components, Architectures and Software Reuse, Campinas, pp. 47–60 (2007)

  29. Liuying, L., Zhichang, Q.: Test selection from uml statecharts. In: Technology of Object-Oriented Languages and Systems, 1999. TOOLS 31. Proceedings, pp. 273–279. IEEE (1999)

  30. Lohmann, M., Heckel, R.: A model-driven approach to discovery, testing and monitoring of web services. In: Baresi, L., Nitto, E.D. (eds.) Test and Analysis of Web Services, pp. 173–204. Springer, Berlin (2007)

    Chapter  Google Scholar 

  31. Meyer, B.: Object-oriented Software Construction. Prentice Hall, Upper Saddle River (1997)

    MATH  Google Scholar 

  32. Mlynarski, M.: Holistic model-based testing for business information systems. In: Software Testing, Verification and Validation (ICST), 2010 Third International Conference on, pp. 327–330 (2010)

  33. Mlynarski, M., Güldali, B., Späth, M., Engels, G.: From design models to test models by means of test ideas. In: Proceedings of the 6th International Workshop on Model-Driven Engineering, Verification and Validation, MoDeVVa ’09, pp. 7:1–7:10. ACM, New York (2009)

  34. Murthy, P.V., Anitha, P.C., Mahesh, M., Subramanyan, R.: Test ready UML statechart models. In: Proceedings of the 2006 international workshop on Scenarios and state machines: models, algorithms, and tools, SCESM ’06, pp. 75–82. ACM, New York (2006)

  35. Object Management Group: OCL 2.0 specification. Tech. Rep. ptc/2005-06-06, OMG (2005). http://www.omg.org/docs/ptc/05-06-06.pdf

  36. Object Management Group: UML testing profile. Tech. Rep. formal/05-07-07, OMG (2005). http://www.omg.org/cgi-bin/doc?formal/05-07-07

  37. Object Management Group: Meta object facility (MOF) core, v2.0. Tech. Rep. formal/06-01-01, OMG (2006). http://www.omg.org/cgi-bin/doc?formal/2006-01-01

  38. Object Management Group: Meta object facility (mof) 2.0 query/view/transformation specification. Tech. Rep. Final Adopted Specification ptc/07-07-07, OMG (2007). http://www.omg.org/cgi-bin/doc?ptc/2007-07-07

  39. Object Management Group: UML superstructure, v2.1.1. Tech. Rep. formal/07-02-05, OMG (2007). http://www.omg.org/cgi-bin/doc?formal/07-02-05

  40. Pretschner, A., Slotosch, O., Aiglstorfer, E., Kriebel, S.: Model-based testing for real. Int. J. Softw. Tools for Technol. Transf. (STTT) 5(2), 140–157 (2004)

    Article  Google Scholar 

  41. Rocha, A.C.O., Machado, P., Ramalho, F.: Automating inspection of design models guided by test cases. In: Proceedings of 22 IFIP International Conference on Testing Software and Systems (2010)

  42. Shafique, M., Labiche, Y.: A systematic review of model based testing tool support. Tech. rep., Carleton University, Technical, Report SCE-10-04 (2010)

  43. Siegl, S., Hielscher, K.S., German, R., Berger, C.: Formal specification and systematic model-driven testing of embedded automotive system. In: Proceedings of the Conference on Design, Automation and Test in Europe (2011)

  44. Tretmans, J.: Model-based testing and some steps towards test-based modelling. In: Proceedings of 11th International School on Formal Methods for the Design of Computer, Communication and Software Systems, SFM 2011—Advanced Lectures, vol. 6659, pp. 297–326 (2011)

  45. Utting, M., Legeard, B.: Practical Model Based Testing: A Tools Approach. Elsevier, Amsterdam (2007)

    Google Scholar 

  46. Weißleder, H.D.S.: Test models and coverage criteria for automatic model-based test generation with UML state machines. Ph.D. thesis, Humboldt University, Berlin (2010)

  47. Weißleder, S.: Simulated satisfaction of coverage criteria on uml state machines. In: Software Testing, Verification and Validation (ICST), 2010 Third International Conference on, pp. 117–126 (2010)

Download references

Acknowledgments

This work was supported by CNPq/Brazil grants 484643/2011-8 and 560014/2010-4. Also, this work was partially supported by the National Institute of Science and Technology for Software Engineering http://www.ines.org.br, funded by CNPq/Brasil, grant 573964/2008-4. First author was supported by CAPES/Brazil, grant RH-TVD 024/2008.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Patricia D. L. Machado.

Additional information

Communicated by Prof. James Bieman.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Alves, E.L.G., Machado, P.D.L. & Ramalho, F. Automatic generation of built-in contract test drivers. Softw Syst Model 13, 1141–1165 (2014). https://doi.org/10.1007/s10270-012-0282-8

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-012-0282-8

Keywords

Navigation