Model-Driven Integration Testing of Hypermedia Systems

  • Henry Vu PENTASYS AG, Rüdesheimer Str. 9, 80686 Munich, Germany University of Applied Sciences Würzburg-Schweinfurt, Würzburg, Germany
  • Tobias Fertig PENTASYS AG, Rüdesheimer Str. 9, 80686 Munich, Germany University of Applied Sciences Würzburg-Schweinfurt, Würzburg, Germany
  • Peter Braun PENTASYS AG, Rüdesheimer Str. 9, 80686 Munich, Germany University of Applied Sciences Würzburg-Schweinfurt, Würzburg, Germany
Keywords: REST, Integration Testing, RESTful API, Hypermedia Testing, MDSD, MDE, MDT, Model-Driven Testing

Abstract

The proper design of Representational State Transfer (REST) APIs is not trivial because developers have to deal with a flood of recommendations and best practices, especially the proper application of the hypermedia constraint requires some decent experience. Furthermore, testing RESTful APIs is a missing topic within literature. Especially hypermedia testing is not mentioned at all. Manual hypermedia testing is time-consuming and hard to maintain. Testing a hypermedia API requires many test cases that have similar structure, especially when different user roles and error cases are considered. In order to tackle this problem, we proposed a Model-Driven Testing (MDT) approach for hypermedia systems using the metamodel within our existing Model Driven Software Development (MDSD) approach. This work discusses challenges and results of hypermedia testing for RESTful APIs using MDT techniques that were discovered within our research. MDT allows white-box testing, hence covering complete program structure and behavior of the generated application. By doing this, we are able to achieve a high automated test coverage. Moreover, any runtime behavior deviated from the metamodel reveals bugs within the generators.

Downloads

Download data is not yet available.

Author Biographies

Henry Vu, PENTASYS AG, Rüdesheimer Str. 9, 80686 Munich, Germany University of Applied Sciences Würzburg-Schweinfurt, Würzburg, Germany

Henry Vu is a software engineer and consultant. He attended the University of Applied Sciences Würzburg-Schweinfurt Germany (FHWS) where he received his B.Eng. in Computer Science in 2015 and his M.Sc. in Information Systems in 2017. After completing his master’s degree, he was employed as a research associate and lecturer at the FHWS until 2018. During this time, he has published several papers about Model-Driven Engineering of systems with REST architecture. He is currently a software consultant at PENTASYS AG Germany where he is working for big names in the automobile industry (Porsche, BMW) in innovative topics such as autonomous driving and virtual reality.

Tobias Fertig, PENTASYS AG, Rüdesheimer Str. 9, 80686 Munich, Germany University of Applied Sciences Würzburg-Schweinfurt, Würzburg, Germany

Tobias Fertig completed his bachelor’s degree at the University of Applied Sciences Würzburg-Schweinfurt (FHWS). He was the best of year and also scholarship holder. He then switched to the Friedrich-Alexander-University Erlangen-Nürnberg (FAU) to do his master’s degree in Computer Science. As part of his master’s thesis, he dealt with the offline support of RESTful Systems. Since his graduation, Tobias has been employed as a research associate and lecturer at the FHWS. He teaches programming, software engineering and operating systems. In addition to his work as a research assistant, he is a Ph.D. student in cooperation with FAU. In his dissertation he is focusing on the automated measurement of information security awareness within companies. Before starting his dissertation, he was researching in Model-Driven software development and low-code platforms. In addition, Tobias advises companies on blockchain technology and is author of the german book “Blockchain for Developers”.

Peter Braun, PENTASYS AG, Rüdesheimer Str. 9, 80686 Munich, Germany University of Applied Sciences Würzburg-Schweinfurt, Würzburg, Germany

Peter Braun is software architect, computer scientist, and entrepreneur. He works as Professor of Computer Science at the University of Applied Sciences Würzburg-Schweinfurt. Before, he was Head of Technology (CTO) of match2blue in Jena, Germany. The company develops and markets complex mobile information systems. Besides match2blue, Peter has co-founded two other companies in the area of mobile solutions. Peter earned a doctorate degree (Ph.D.) in software engineering from University of Jena. He is co-author of about 40 peer-reviewed papers and author of the first text-book about mobile software agents.

References

Mike Amundsen. RESTful Web Clients – Enabling Reuse Through Hypermedia. Sebastopol: O’Reilly Media, 2017. ISBN: 978-1491-92190-6.

Joshua Bloch. How to design a good API and why it matters. http://static. googleusercontent.com/media/research.google.com/ en/pubs/archive/32713.pdf. Last accessed on May 23, 2018. 2014.

S.K. Chakrabarti and P. Kumar. “Test-the-REST: An Approach to Testing REST-ful Web-Services”. In: Future Computing, Service Computation, Cognitive, Adaptive, Content, Patterns, 2009. COMPUTATIONWORLD ’09. Computation World: Nov. 2009, pp. 302–308.

Edsger W. Dijkstra. “The Humble Programmer”. In: Commun. ACM 15.10 (Oct. 1972), pp. 859–866. ISSN: 0001-0782. DOI: 10.1145/355604.361591. URL: http://doi.acm.org/10.1145/ 355604.361591.

Tobias Fertig and Peter Braun. “Model-driven Testing of RESTful APIs”. In: Proceedings of the 24th International Conference on World Wide Web Companion. WWW ’15 Companion. Florence, Italy: International World Wide Web Conferences Steering Committee, 2015, pp. 1497–1502. ISBN: 978-1-4503-3473-0. DOI: 10.1145/2740908.2743045. URL: http://dx.doi.org/10.1145/2740908.2743045.

Roy T. Fielding. WTF is a “REST endpoint”. https://twitter.com/ fielding/status/324448353180061696. Last accessed on May 22, 2018. 2013.

R.T. Fielding. RESTAPIs must be hyper-text driven. http://roy.gbiv. com/ untangled/2008/rest-apis-must-be-hypertext-driven. Last accessed on May 23, 2018. Oct. 2008.

R.T. Fielding. “REST: Architectural Styles and the Design of Network-based Software Architectures”. Doctoral dissertation. University of California, Irvine, 2000.

R.T. Fielding, UC Irvine, and J. Gettys. Hypertext Transfer Protocol – HTTP/1.1. https://tools.ietf.org/html/rfc2616. Last accessed on May 22, 2018. 1999.

Nicolas Frankel. Integration Testing from the Trenches. Leanpub, 2015. ISBN: 978-2-955-02143-9.

Carlos A. González and Jordi Cabot. “Test Data Generation for Model Transformations Combining Partition and Constraint Analysis”. In: Theory and Practice of Model Transformations. Ed. by Davide Di Ruscio and Dániel Varró. Cham: Springer International Publishing, 2014, pp. 25–41. ISBN: 978-3-319-08789-4.

Peter Liggesmeyer. Software-Qualität – Testen, Analysieren und Verifizieren von Software. 2. Aufl. Berlin Heidelberg: Springer Science and Business Media, 2009. ISBN: 978-3-827-42056-5.

The Selenium Project. Selenium. https://www.seleniumhq.org/. Last accessed on May 24, 2018. 2018.

L. Richardson, M. Amundsen, and S. Ruby. RESTful Web APIs. O’Reilly Media, 2013. ISBN: 9781449359737. URL: https://books.google.de/books?id= ZXDGAAAAQBAJ.

Leonard Richardson. The Maturity Heuristic. https://www.crummy.com/writing/speaking/2008-QCon/act3.html. Last accessed on May 16, 2018. 2009.

V. Schreibmann and P. Braun. “Model-Driven Development of RESTful APIs”. In: Proceedings of the 11th International Conference of Web Information Systems and Technologies. (Lisbon, Portugal). INSTICC. SciTePress, May 2015.

Inc. Square. JavaPoet. https://github.com/square/javapoet. Last accessed on May 23, 2018. 2017.

Inc. Square. OkHttp. http://square.github.io/okhttp/. Last accessed on May 23, 2018. 2017.

Antero Taivalsaari and Tommi Mikkonen. “The Web as a Software Platform: Ten Years Later”. In: Proceedings of the 13th International Conference of Web Information Systems and Technologies. (Porto, Portugal). INSTICC. SciTePress, May 2017.

H. Vu, T. Fertig, and P. Braun. “Towards model-driven hypermedia testing for RESTful systems”. In: WEBIST 2017 – Proceedings of the 13th International Conference on Web Information Systems and Technologies. 2017.

Henry Vu, Tobias Fertig, and Peter Braun. “Verification of Hypermedia Characteristic of RESTful Finite-State Machines”. In: Companion Proceedings of the The Web Conference 2018. WWW ’18. Lyon, France: International World Wide Web Conferences Steering Committee, 2018, pp. 1881–1886. ISBN: 978-1-4503-5640-4. DOI: 10.1145/3184558.3191656. URL: https://doi.org/10.1145/3184558.3191656.

Jim Webber, Savas Parastatidis, and Ian Robinson. REST in Practice – Hypermedia and Systems Architecture. Sebastopol: “O’Reilly Media, Inc.”, 2010. ISBN: 978-1-449-39702-9.

David Wright. Finite State Machines. http://www4.ncsu.edu/∼drwrigh3/docs/courses/csc216/fsm–notes.pdf. Last accessed on May 16, 2018. 2005.

Section
Articles