skip to main content
10.1145/3321707.3321815acmconferencesArticle/Chapter ViewAbstractPublication PagesgeccoConference Proceedingsconference-collections
research-article

Resource-based test case generation for RESTful web services

Published:13 July 2019Publication History

ABSTRACT

Nowadays, RESTful web services are widely used for building enterprise applications. In this paper, we propose an enhanced search-based method for automated system test generation for RESTful web services. This method exploits domain knowledge on the handling of HTTP resources, and it is integrated in the Many Independent Objectives (MIO) search algorithm. MIO is an evolutionary algorithm specialized for system test case generation with the aim of maximizing code coverage and fault finding. Our approach builds on top of the MIO by implementing a set of effective templates to structure test actions, based on the semantics of HTTP methods, used to manipulate the web services' resources. We propose four novel sampling strategies for the test cases that can use one or more of these test actions. The strategies are further supported with a set of new, specialized mutation operators that take into account the use of these resources in the generated test cases. We implemented our approach as an extension to the EvoMaster tool, and evaluated it on seven open-source RESTful web services. The results of our empirical study show that our novel, resource-based sampling strategies obtain a significant improvement in performance over the baseline MIO (up to +42% coverage).

References

  1. S. Ali, L.C. Briand, H. Hemmati, and R.K. Panesar-Walawege. 2010. A systematic review of the application and empirical investigation of search-based test-case generation. IEEE Transactions on Software Engineering (TSE) 36, 6 (2010), 742--762. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Subbu Allamaraju. 2010. Restful web services cookbook: solutions for improving scalability and simplicity. " O'Reilly Media, Inc.".Google ScholarGoogle Scholar
  3. Mohammad Alshraideh and Leonardo Bottaci. 2006. Search-based software test data generation for string data using program-specific search operators. Software Testing, Verification, and Reliability 16, 3 (2006), 175--203. Google ScholarGoogle ScholarCross RefCross Ref
  4. Andrea Arcuri. 2018. EvoMaster: Evolutionary Multi-context Automated System Test Generation. In IEEE International Conference on Software Testing, Verification and Validation (ICST). IEEE.Google ScholarGoogle Scholar
  5. Andrea Arcuri. 2018. Test suite generation with the Many Independent Objective (MIO) algorithm. Information and Software Technology (IST) 104 (2018), 195--206.Google ScholarGoogle ScholarCross RefCross Ref
  6. Andrea Arcuri. 2019. RESTful API Automated Test Case Generation with Evo-Master. ACM Transactions on Software Engineering and Methodology (TOSEM) 28, 1 (2019), 3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Arcuri and L. Briand. 2011. Adaptive Random Testing: An Illusion of Effectiveness?. In ACM Int. Symposium on Software Testing and Analysis (ISSTA). 265--275. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Arcuri and L. Briand. 2014. A Hitchhiker's Guide to Statistical Tests for Assessing Randomized Algorithms in Software Engineering. Software Testing, Verification and Reliability (STVR) 24, 3 (2014), 219--250. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Mustafa Bozkurt, Mark Harman, and Youssef Hassoun. 2013. Testing and verification in service-oriented architecture: a survey. Software Testing, Verification and Reliability (STVR) 23, 4 (2013), 261--313.Google ScholarGoogle ScholarCross RefCross Ref
  10. Gerardo Canfora and Massimiliano Di Penta. 2009. Service-oriented architectures testing: A survey. In Software Engineering. Springer, 78--105. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Sujit Kumar Chakrabarti and Prashant Kumar. 2009. Test-the-rest: An approach to testing restful web-services. In Future Computing, Service Computation, Cognitive, Adaptive, Content, Patterns, 2009. COMPUTATIONWORLD'09. Computation World:. IEEE, 302--308. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Sujit Kumar Chakrabarti and Reswin Rodriquez. 2010. Connectedness testing of restful web-services. In Proceedings of the 3rd India software engineering conference. ACM, 143--152. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Droste, T. Jansen, and I. Wegener. 1998. On the Optimization of Unimodal Functions with the (1 + 1) Evolutionary Algorithm. In Proceedings of the International Conference on Parallel Problem Solving from Nature. 13--22. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Tobias Fertig and Peter Braun. 2015. Model-driven Testing of RESTful APIs. In Proceedings of the 24th International Conference on World Wide Web. ACM, 1497--1502. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Roy Thomas Fielding. 2000. Architectural styles and the design of network-based software architectures. Ph.D. Dissertation. University of California, Irvine.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Mark Harman, S Afshin Mansouri, and Yuanyuan Zhang. 2012. Search-based software engineering: Trends, techniques and applications. ACM Computing Surveys (CSUR) 45, 1 (2012), 11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Pablo Lamela Seijas, Huiqing Li, and Simon Thompson. 2013. Towards property-based testing of RESTful web services. In Proceedings of the twelfth ACM SIGPLAN workshop on Erlang. ACM, 77--78. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Pedro Victor Pontes Pinheiro, Andre Takeshi Endo, and Adenilso Simao. 2013. Model-Based Testing of RESTful Web Services Using UML Protocol State Machines. In Brazilian Workshop on Systematic and Automated Software Testing.Google ScholarGoogle Scholar
  19. José Miguel Rojas, Mattia Vivanti, Andrea Arcuri, and Gordon Fraser. 2017. A detailed investigation of the effectiveness of whole test suite generation. Empirical Software Engineering (EMSE) 22, 2 (2017), 852--893. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Sergio Segura, José A Parejo, Javier Troya, and Antonio Ruiz-Cortés. 2017. Metamorphic testing of RESTful web APIs. IEEE Transactions on Software Engineering (TSE) (2017).Google ScholarGoogle Scholar

Index Terms

  1. Resource-based test case generation for RESTful web services

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        GECCO '19: Proceedings of the Genetic and Evolutionary Computation Conference
        July 2019
        1545 pages
        ISBN:9781450361118
        DOI:10.1145/3321707

        Copyright © 2019 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 13 July 2019

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate1,669of4,410submissions,38%

        Upcoming Conference

        GECCO '24
        Genetic and Evolutionary Computation Conference
        July 14 - 18, 2024
        Melbourne , VIC , Australia

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader