计算机科学 ›› 2021, Vol. 48 ›› Issue (5): 16-24.doi: 10.11896/jsjkx.201000048

• 计算机软件* 上一篇    下一篇

一种面向形式化表格需求模型的测试用例生成方法

汪文轩1,2, 胡军1,2, 胡建成1,2, 康介祥3, 王辉3, 高忠杰3   

  1. 1 南京航空航天大学计算机科学与技术学院 南京211106
    2 软件新技术与产业化协同创新中心 南京211107
    3 中国航空无线电电子研究所软件部 上海200233
  • 收稿日期:2020-10-10 修回日期:2021-03-20 出版日期:2021-05-15 发布日期:2021-05-09
  • 通讯作者: 胡军(hujun@nuaa.edu.cn)
  • 基金资助:
    国家重点基础研究发展计划(973计划)项目(2014CB744900)

Test Case Generation Method Oriented to Tabular Form Formal Requirement Model

WANG Wen-xuan1,2, HU Jun1,2, HU Jian-cheng1,2, KANG Jie-xiang3, WANG Hui3, GAO Zhong-jie3   

  1. 1 College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 211106,China
    2 Collaborative Innovation Center of Novel Software Technology and Industrialization,Nanjing 211107,China
    3 Department of Software,China National Aeronautic Radio Electronics Research Institute,Shanghai 200233,China
  • Received:2020-10-10 Revised:2021-03-20 Online:2021-05-15 Published:2021-05-09
  • About author:WANG Wen-xuan,born in 1997,M.S candidate.His main research interests include software safety analysis and software test,etc.(wangwengx.1997@nuaa.edu.cn)
    HU Jun,born in 1973,Ph.D, associate professor,is a member of China Computer Federation.His main research interests include model-based safety analysis, software verification and embedded system design,etc.
  • Supported by:
    National Key Basic Research Development Plan(973)(2014CB744900).

摘要: 现代安全关键性系统的软件规模和复杂性的快速增长给这类安全关键性软件系统的开发带来了很多挑战。传统文本文档的需求描述方法无法保证此类系统的开发进度和系统可靠性要求。为此文中提出了一种兼具可读性和可自动分析的形式化表格需求建模方法。文中介绍了一种针对这种表格模型测试用例的自动生成方法,工作包括对该形式化需求表格模型展开语义分析,建立需求模型的控制树结构,得到其测试等价类;为了减少不必要的测试,定义了不同安全级别的软件需求模型的测试覆盖标准,并针对不同覆盖率准则分别给出基于控制树结构的测试路径约束选择方法;对于每条路径约束测试等价类,提出了基于域错误的测试用例选择方法,能够自动生成所需的检测域错误的测试用例集。最后,通过一个需求模型实例展示了所提方法的有效性。

关键词: 安全关键性系统, 表格需求模型, 测试用例生成, 形式化需求模型

Abstract: The rapid growth of the software size and complexity of modern safety-critical systems has brought many challenges to the development of such safety-critical software systems.Traditional text documents cannot guarantee the development progress and system reliability requirements.For this reason,this paper proposes a formal form requirement modeling method with both readability and automatic analysis.This paper introduces a method for automatically generating test cases for this tabular model.The work includes semantic analysis of the formal requirements tabular model,establishing the control tree structure of the requirements model,and obtaining its test equivalence classes.In order to reduce unnecessary testing,test path constraint selection methods are proposed based on those criteria.Through performing domain error test case selection,test cases are generated for each path constraint selected,which makes up a test case set for the requirement.At last,to demonstrate how we generate test cases form a requirement model,a case study is given.

Key words: Formal requirement model, Safety-critical system, Tabular requirement model, Test case generation

中图分类号: 

  • TP311.5
[1]TARHAN A,DEMIRORS O.Investigating the effect of variations in the test development process:A case from a safety-critical system[J].Software Quality Journal,2017,19(4):615-642.
[2]FRANZ T,LüDTKE,D,MAIBAUM O,et al.Model-based software engineering for an optical navigation system for spacecraft[J].Ceas Space Journal,2018,10(2):147-156.
[3]PATCAS L M,LAWFORD M,MAIBAUM T.implementability of Requirements in the Four-Variable Model[J].Science of Computer Programming,2015,111(1PT.2):339-362.
[4]BROSGOL B.Do-178c[J].ACM SIGAda Ada Letters,2019,11(4):127-136.
[5]WANG R,KRISTENSEN L M,MELING H,et al.Automated Test Case Generation for the Paxos Single-decree Protocol using a Coloured Petri Net Model[J].The Journal of Logic and Algebraic Programming,2019,104(APR.):254-273.
[6]EISENMANN U,ALLEN J L.New Requirement-Definition and Verification Techniques According to DO-178C,DO-331,and DO-333[C]//AIAA Infotech @ Aerospace.2016:134-140.
[7]BRÜCKNER I,WEHRHEIM H.Slicing an Integrated Formal Method for Verification[M]//Formal Methods and Software Engineering.Springer Berlin Heidelberg,2018.
[8]SAHOO R,RAY M.PSO based test case generation for critical path using improved combined fitness function[J].Journal of King Saud University-Computer and Information Sciences,2020,32(4):479-490.
[9]SANFORD F.A practical guide to SysML:the systems modeling language(2nd ed)[M].Morgan Kaufmann,2019.
[10]AITOR A,AGIRRE J A,SAGARDUI G.Seeding strategies for multi-objective test case selection:an application on simulation-based testing[C]//Genetic and Evolutionary Computation Conference 2020(GECCO'20).2020:45-54.
[11]CHAO T,JUNWEI F,LING X,et al.Application of MBSEMethod During Landing Gear System Design for Civil Aircraft[J].Civil Aircraft Design & Research,2015,12(2):345-361.
[12]LAILY H N,DAWOOD Y S.A Review on Test Case Generation Methods Using UML Statechart[C]//2019 4th International Conference and Workshops on Recent Advances and Innovations in Engineering (ICRAIE).IEEE,2020:38-46.
[13]ZHENG Y L,MA L H,ZHANG L Y,et al.On the convergence analysis and parameter selection in particle swarm optimization[C]//International Conference on Machine Learning & Cybernetics.IEEE,2003:61-72.
[14]YUE-HUA D,XIN F U,XIAO-NING Z.Convergence Analysis of FEM Model Based on Semi-circular Bending Test[J].Wes-tern China Communications Science & Technology,2019,11(2):145-167.
[15]WANG J M,WANG X H,MA Y Y,et al.Hierarchical Combination Design Method of Test Cases Based on Conditional Constraints[C]//IEEE International Conference on Software Quality.IEEE,2017:80-90.
[16]WU J L,H S F,D H N.Integration test case generating method based on UML[J].Computer Engineering and Design,2018,23(2):231-245.
[17]DASH S,PANDA N,ACHARYA A A.Model-based test case prioritization using UML activity diagram and design level attributes[J].Advances in Intelligent Systems and Computing,2018,672(8):380-390.
[18]WANG R,LI Z,JIANG S,et al.Regression Test Case Prioritization Based on Fixed Size Candidate Set ART Algorithm[J].International Journal of Software Engineering and Knowledge Engineering,2020,345(2):246-266.
[19]VERMA R P,GOPAL B,BEG M R.Data Structure & Algo-rithm for Combination Tree to Generate Test Case[J].International Journal of Computer Science Issues,2015,8(3):330-350.
[20]ANDRES N,FINGERHUT A K J,et al.p4pktgen:Automated Test Case Generation for P4 Programs[C]//Symposium.2018:88-96.
[21]NIKOLETA A,YANNIS S,FAUSTO B,et al.A DSM Test Case Applied on an End-to-End System,from Consumer to Energy Provider[J]. Sustainability, 2020,10(4):935-958.
[22]CARVALHO G,FALCAO D,BARROS F,et al.Test case generation from natural language requirements based on SCR specifications[J].Science of Computer Programming,2018,95(3):275-297.
[1] 吉顺慧, 张鹏程.
基于支配关系的数据流测试用例生成方法
Test Case Generation Approach for Data Flow Based on Dominance Relations
计算机科学, 2020, 47(9): 40-46. https://doi.org/10.11896/jsjkx.200700021
[2] 黄钊,黄曙光,邓兆琨,黄晖.
基于SEH的漏洞自动检测与测试用例生成
Automatic Vulnerability Detection and Test Cases Generation Method for Vulnerabilities Caused by SEH
计算机科学, 2019, 46(7): 133-138. https://doi.org/10.11896/j.issn.1002-137X.2019.07.021
[3] 张娜,滕赛娜,吴彪,包晓安.
基于粒子群优化算法的测试用例生成方法
Test Case Generation Method Based on Particle Swarm Optimization Algorithm
计算机科学, 2019, 46(7): 146-150. https://doi.org/10.11896/j.issn.1002-137X.2019.07.023
[4] 包晓安, 熊子健, 张唯, 吴彪, 张娜.
一种基于改进遗传算法的路径测试用例生成方法
Approach for Path-oriented Test Cases Generation Based on Improved Genetic Algorithm
计算机科学, 2018, 45(8): 174-178. https://doi.org/10.11896/j.issn.1002-137X.2018.08.031
[5] 杨红, 洪玫, 屈媛媛.
基于模型检测技术的变异测试用例生成方法
Approach of Mutation Test Case Generation Based on Model Checking
计算机科学, 2018, 45(11A): 488-493.
[6] 黄钰尧,李凤英,常亮,孟瑜.
基于符号零压缩二叉决策图的组合测试用例生成方法
Symbolic ZBDD-based Generation Algorithm for Combinatorial Testing
计算机科学, 2018, 45(1): 255-260. https://doi.org/10.11896/j.issn.1002-137X.2018.01.045
[7] 陈洁琼,姜淑娟,张争光.
基于数据流准则的测试用例生成方法
Approach for Test Case Generation Based on Data Flow Criterion
计算机科学, 2017, 44(2): 107-111. https://doi.org/10.11896/j.issn.1002-137X.2017.02.015
[8] 张雄,李舟军.
模糊测试技术研究综述
Survey of Fuzz Testing Technology
计算机科学, 2016, 43(5): 1-8. https://doi.org/10.11896/j.issn.1002-137X.2016.05.001
[9] 张卫祥,刘文红.
基于故障树分析与组合测试的测试用例生成方法
Test Suite Generation Based on Interaction Testing and Fault Tree Analysis
计算机科学, 2014, 41(Z11): 375-378.
[10] 侯超凡,吴际,刘超.
基于测试需求的互操作性测试用例生成方法
Interoperability Test Case Generation Based on Testing Requirements
计算机科学, 2014, 41(11): 162-168. https://doi.org/10.11896/j.issn.1002-137X.2014.11.032
[11] 孙昌爱,程庆顺.
基于故障的布尔表达式测试技术综述
Survey on Fault-based Testing Techniques for Boolean Expressions
计算机科学, 2013, 40(3): 16-23.
[12] 于博,姜淑娟,张艳梅.
基于复杂系统遗传算法的多路径覆盖测试用例生成方法
Multiple Paths Test Case Generation Based on Complex System Genetic Algorithm
计算机科学, 2012, 39(4): 139-141.
[13] 李 颖,许 蕾.
基于OWL-S文档的Web服务测试用例生成
Test Case Generation for Web Services Based on OWL-S Documents
计算机科学, 2012, 39(10): 131-135.
[14] 彭树深,顾庆,陈道蓄.
Web应用测试用例生成研究
Study of Test Case Generation for Web Applications
计算机科学, 2010, 37(6): 159-163.
[15] 马臻 陈天 李元 孙苗 郭锐.
基于免疫算法的HLR软件系统测试用例生成

计算机科学, 2008, 35(12): 244-246.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!