RAML-Based Mock Service Generator for Microservice Applications Testing

  • Nikita Ashikhmin
  • Gleb Radchenko
  • Andrei Tchernykh
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 793)

Abstract

The automation capabilities and flexibility of computing resource scaling in cloud environments require novel approaches to application design. The microservice architectural style, which has been actively developing in recent years, is an approach to design a single application as a suite of small services. Continuous integration approach demands transition from manual testing methods to fully automated methods. The mocking is one of the methods to simplify development and testing of microservice applications. The mock service can be considered as an extension of mock object concept. It simulates the behavior of a web service based on a description of its interface. However, developers need to spend additional efforts on development and support of these mock services. We propose a method that would make it easier to generate mocks for REST services by using RAML specifications of services. Using this approach, we propose an implementation, which provides mock services generation and deployment as Docker containers.

Keywords

Microservice Testing Docker REST RAML Mocking container 

Notes

Acknowledgment

The work was supported by the RFBR research project No. 15-29-07959 and by Act 211 Government of the Russian Federation, contract No. 02.A03.21.0011.

References

  1. 1.
    Savchenko, D., Radchenko, G.: Microservices validation: methodology and implementation. In: 1st Ural Workshop on Parallel, Distributed, and Cloud Computing for Young Scientists (Ural-PDC 2015). CEUR Workshop Proceedings, vol. 1531, Yekaterinburg, Russia, pp. 21–28 (2015)Google Scholar
  2. 2.
    Pahl, C.: Containerization and the PaaS cloud. IEEE Cloud Comput. 2, 24–31 (2015)CrossRefGoogle Scholar
  3. 3.
    Newman, S.: Learning Building Microservices. O’Reilly Media, Inc., Sebastopol (2015)Google Scholar
  4. 4.
    Kim, T., Park, C., Wu, C.: Mock object models for test driven development. In: Fourth International Conference on Software Engineering Research, Management and Applications, pp. 221–228. IEEE (2006)Google Scholar
  5. 5.
    Soltesz, S., Potzl, H., Fiuczynski, M., Bavier, A., Peterson, L.: Container-based operating system virtualization: a scalable, high-performance alternative to hypervisors. ACM SIGOPS Oper. Syst. Rev. 41(3), 275–287 (2007)CrossRefGoogle Scholar
  6. 6.
    Fielding, R.: Representational state transfer. In: Architectural Styles and the Design of Network-based Software Architecture, pp. 76–85 (2000)Google Scholar
  7. 7.
    Haupt, F.: A framework for the structural analysis of REST APIs. In: IEEE International Conference on Software Architecture (ICSA), pp. 55–58 (2017)Google Scholar
  8. 8.
    Cloves, C., Schmelmer, T.: Defining APIs. In: Microservices from Day One, pp. 59–74. Apress, New York (2016)Google Scholar
  9. 9.
    Surwase, V.: REST API modeling languages-a developer’s perspective. IJSTE Int. J. Sci. Technol. Eng. 2(10), 634–637 (2016)Google Scholar
  10. 10.
    API Blueprint. http://apiblueprint.com. Last accessed 15 Apr 2017
  11. 11.
    Voegler, J., Bornschein, J., Weber, G.: Markdown – a simple syntax for transcription of accessible study materials. In: Miesenberger, K., Fels, D., Archambault, D., Peňáz, P., Zagler, W. (eds.) ICCHP 2014, Part I. LNCS, vol. 8547, pp. 545–548. Springer, Cham (2014).  https://doi.org/10.1007/978-3-319-08596-8_85 CrossRefGoogle Scholar
  12. 12.
    Mountebank - over the wire test doubles. http://www.mbtest.org. Last accessed 15 Apr 2017
  13. 13.
    Azzam, S., Al-Kabi, M.N., Alsmadi, I.: Web services testing challenges and approaches. In: Proceedings of the 1st Taibah University International Conference on Computing and Information Technology, pp. 291–296 (2012)Google Scholar
  14. 14.
    Tsouroplis, R., Petychakis, M., Alvertis, I., Biliri, E., Askounis, D.: Community-based API builder to manage APIs and their connections with cloud-based services. In: CAiSE Forum, pp. 17–23 (2015)Google Scholar
  15. 15.
    Merkel, D.: Docker: lightweight Linux containers for consistent development and deployment. Linux J. 2014(239), 2 (2014)Google Scholar
  16. 16.
    JSON Schema: syntax and semantics. http://cswr.github.io/JsonSchema/. Last accessed 15 Apr 2017
  17. 17.
    Grinberg, M.: Flask Web Development: Developing Web Applications with Python. O’Reilly Media, Inc., Sebastopol (2014)Google Scholar
  18. 18.
    Elizabeth. http://elizabeth.readthedocs.io/en/latest/. Last accessed 15 Apr 2017
  19. 19.
    Ramlification, Python parser for RAML. https://github.com/spotify/ramlfications. Last accessed 15 Apr 2017
  20. 20.
    Naumen Service Desk. http://www.naumen.ru/products/service_desk/. Last accessed 15 Apr 2017
  21. 21.
    Raml-mock-service. https://github.com/veor12/raml-mock-service. Last accessed 15 Apr 2017

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Nikita Ashikhmin
    • 1
  • Gleb Radchenko
    • 1
  • Andrei Tchernykh
    • 1
    • 2
  1. 1.South Ural State UniversityChelyabinskRussia
  2. 2.CICESE Research CenterEnsenadaMexico

Personalised recommendations