基于LSTM的S7协议模糊测试用例生成方法  被引量:4

LSTM-based Fuzzy Test Case Generation Method for S7 Protocol

在线阅读下载全文

作  者:姜亚光 陈曦[1,2] 李建彬 闫靖晨 刘曙元 李坤昌 JIANG Yaguang;CHEN Xi;LI Jianbin;YAN Jingchen;LIU Shuyuan;LI Kunchang(China Software Testing Center,Beijing 100044,China;School of Software and Microelectronics,Peking University,Beijing 102600,China;School of Control and Computer Engineering,North China Electric Power University,Beijing 100026,China;China Energy Information&Control Co.,Ltd.,Beijing 100039,China)

机构地区:[1]中国软件评测中心,北京100044 [2]北京大学软件与微电子学院,北京102600 [3]华北电力大学控制与计算机工程学院,北京100026 [4]国能信控互联技术有限公司,北京100039

出  处:《计算机工程》2021年第7期183-188,共6页Computer Engineering

基  金:北京市科委计划项目(Z181100005118016);国家电网公司工作部科技项目(5700-201914241A-0-0-00)。

摘  要:基于传统模糊测试框架的S7协议模糊测试技术存在构造困难和代码覆盖率低的问题,对测试效率和质量产生很大影响。借助神经网络模型对数据较强的学习能力和预测能力,提出一种基于长短期记忆(LSTM)神经网络的S7协议模糊测试用例生成方法。将S7协议中的特征值字段分为可变字段和不可变字段,对可变字段进行模糊处理,对不可变字段做固定值操作,进而利用局部模糊实现对S7协议帧各字段的模糊分析,生成有效的测试用例。经过学习,模型可以提取到西门子S7协议的特征,自动产生满足协议结构的测试用例。实验对不同字段进行局部模糊,结果表明,该方法预测出的数据具备真实测试用例的特征,可生成大量对特征字段关联性较大的有效测试用例,提高代码覆盖率。The fuzzy test technology for S7 protocol based on the traditional fuzzy test framework is limited by the difficulty in construction and low code coverage,which has a great impact on the test efficiency and quality.Exploiting the strong learning and prediction ability of the neural network model,a Long Short-Term Memory(LSTM)neural network-based method of generating fuzzy test cases for S7 protocol is proposed.The feature value fields in the S7 protocol are categorized into the mutable fields and the immutable fields.The mutable fields are blurred,and the immutable fields are specified with fixed values.And then local fuzzy is used to perform fuzzy analysis on each field of the S7 protocol frame to generate effective test cases.The learned model can extract the features of the Siemens S7 protocol and automatically generate test cases conforming to the protocol structure.Local fuzzy is performed on different fields for experiments,and the results show that the generated data has the features of real test cases.The method can provide a large number of effective test cases with strong correlation with the feature fields,improving the code coverage.

关 键 词:长短期记忆神经网络 S7协议 模糊测试 测试用例 字段 

分 类 号:TP391.1[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象