高级检索
    卓欣欣, 白晓颖, 许静, 李恩鹏, 刘喻, 康介恢, 宋文莉. 服务接口测试自动化工具的研究[J]. 计算机研究与发展, 2018, 55(2): 358-376. DOI: 10.7544/issn1000-1239.2018.20160721
    引用本文: 卓欣欣, 白晓颖, 许静, 李恩鹏, 刘喻, 康介恢, 宋文莉. 服务接口测试自动化工具的研究[J]. 计算机研究与发展, 2018, 55(2): 358-376. DOI: 10.7544/issn1000-1239.2018.20160721
    Zhuo Xinxin, Bai Xiaoying, Xu Jing, Li Enpeng, Liu Yu, Kang Jiehui, Song Wenli. A Tool for Automatic Service Interface Testing[J]. Journal of Computer Research and Development, 2018, 55(2): 358-376. DOI: 10.7544/issn1000-1239.2018.20160721
    Citation: Zhuo Xinxin, Bai Xiaoying, Xu Jing, Li Enpeng, Liu Yu, Kang Jiehui, Song Wenli. A Tool for Automatic Service Interface Testing[J]. Journal of Computer Research and Development, 2018, 55(2): 358-376. DOI: 10.7544/issn1000-1239.2018.20160721

    服务接口测试自动化工具的研究

    A Tool for Automatic Service Interface Testing

    • 摘要: 在面向服务的架构中,软件功能通常被封装为服务,并以开放可编程接口的方式提供应用.因此,服务接口的正确性和可靠性对于服务理解、重用和集成至关重要.随着软件即服务的思想被广为认可,互联网上越来越多的软件应用以服务接口方式提供开放式访问.面对众多的服务接口,如何进行高效且有效的测试是一个亟待解决的问题.为此,提出了一种基于模型驱动的自动化测试方法,首先采用接口语义契约模型对被测服务接口建模,然后基于接口模型和测试覆盖率需求为单个服务和组合服务生成测试数据和测试用例.在此基础上,设计并实现了AutoTest自动化测试工具,该工具采用多种算法用于优化测试用例生成,且支持图形化测试计划编排和跨语言测试代码生成.实验结果表明,AutoTest能够有效支持大批量测试用例的设计和生成,根据OED(正交实验设计)算法生成的测试用例与IPO组合算法得到的用例相比,具有更为理想的测试覆盖率.

       

      Abstract: In SaaS (software-as-a-service), software functions are encapsulated as independent and self-contained services, and users can access these services through well-defined interface. The correctness and reliability of service interfaces are critical for service understanding, reuse and integration. With the increasing acceptance of SaaS, more and more software expose interfaces for Internet-based open access. API testing for service interfaces is thus getting increasing attentions. To this end, a model-driven automatic testing method is presented to facilitate efficient and effective service interfaces testing. A model called ISC (interface semantic contract) is defined for modeling services with domain knowledge. Following the model-driven approach, tests are generated from ISC at three levels: test data, test cases for individual services and for composite services. Test cases are then translated to target programming languages through a kind of meta-model defined for test cases. An automatic testing tool (AutoTest) has been designed and implemented, which integrates various algorithms to optimize test generation. What’s more, the tool supports design test plan in graphical form and generates test cases in multiple programming languages, for example, C++ or Java. Experimental results demonstrate that AutoTest can support design and generation of large quantities of test cases effectively and efficiently, and test cases generated by OED (orthogonal experimental design) algorithm have more satisfactory test coverage than those by pairwise IPO (in parameter order) algorithm.

       

    /

    返回文章
    返回