计算机与现代化 ›› 2022, Vol. 0 ›› Issue (11): 111-118.

• 网络与通信 • 上一篇    下一篇

基于NSGA-II的信息物理系统RESTful API测试套件最小化#br#

  

  1. (南京航空航天大学计算机科学与技术学院,江苏南京211100)
  • 出版日期:2022-11-30 发布日期:2022-11-30
  • 作者简介:燕嘉诚(1997—),男,江苏泰兴人,硕士研究生,研究方向:软件工程,E-mail: yanjc@nuaa.edu.cn; 印凯欧(1996—),男,江苏盐城人,硕士研究生,研究方向:软件工程,E-mail: 251734495@qq.com。
  • 基金资助:
    国家自然科学基金资助项目(61872182)

Minimization of Test Suite of RESTful API in Cyber-Physical System Based on NSGA-Ⅱ

  1. (College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 21110, China)
  • Online:2022-11-30 Published:2022-11-30

摘要: 测试最小化技术旨在识别和消除测试套件中的冗余测试用例,以减少要执行的测试用例总数,从而提高测试效率。在将计算、通信和过程控制技术紧密结合的信息物理系统中,使用RESTful架构编写的接口,能够轻松实现跨平台跨语言调用。但缺乏对RESTful API测试工作的研究,给信息物理系统中RESTful API的测试以及测试用例的优化带来了挑战。最小化测试套件需要在尽可能覆盖所有测试需求的同时保持较高的故障检测能力。本文使用NSGA-Ⅱ和Random Search来最小化用于测试信息物理系统中RESTful API的测试套件,实验结果表明使用NSGA-Ⅱ优化后的测试套件性能明显优于使用Random Search以及原始的测试套件。

关键词: 信息物理系统, RESTful API, 测试套件最小化, 多目标优化

Abstract: Test minimization techniques aim at identifying and eliminating redundant test cases from test suites in order to reduce the total number of test cases to execute, thereby improving the efficiency of testing. Cyber-physical System combines computing, communication and process control technologies. The interface written with RESTful architecture can easily realize cross-platform and cross-language calls. The lack of research on RESTful API testing brings challenges to the test and the optimization work. Minimizing the test suite needs to cover all test requirements as much as possible while maintaining high fault detection capability. In this paper, we use NSGA-Ⅱ and Random Search to minimize the test suite which is used to test the RESTful API in the cyber-physical system. Experimental results show that the performance of the test suite optimized by NSGA-Ⅱ is significantly better than that of random search and the original test suite.

Key words: cyber-physical system, RESTful API, test suite minimization, multi-objective optimization