计算机科学 ›› 2017, Vol. 44 ›› Issue (4): 234-240.doi: 10.11896/j.issn.1002-137X.2017.04.050

• 软件与数据库技术 • 上一篇    下一篇

基于PEFSM行为模型的黑盒测试用例生成方法

梁浩然,周宽久,崔凯,潘杰,侯刚   

  1. 大连理工大学软件学院 大连116620,大连理工大学软件学院 大连116620;大连理工大学软件评测中心 大连116620,大连理工大学软件学院 大连116620,大连理工大学软件学院 大连116620,大连理工大学软件学院 大连116620
  • 出版日期:2018-11-13 发布日期:2018-11-13
  • 基金资助:
    本文受国家自然科学基金(61402073)资助

Black-box Test Case Generation Method Based on PEFSM Behavioral Model

LIANG Hao-ran, ZHOU Kuan-jiu, CUI Kai, PAN Jie and HOU Gang   

  • Online:2018-11-13 Published:2018-11-13

摘要: 随着计算机软件在医疗、航天、金融等领域的广泛应用,人们对软件系统可靠性的要求越来越严格。软件测试是保证软件安全可靠的有效手段,测试用例的优劣会直接影响测试效果及测试成本。针对嵌入式系统黑盒测试问题,提出了基于概率扩展有限状态机(PEFSM)行为模型的测试用例生成方法,通过两个假设给出了该方法的适用场景,设计了正则表达式转化和展开算法,并将该方法应用于Android智能电视的黑盒测试。该方法的特点是:1)根据用户对待测系统各类操作的使用频率信息,优先测试用户常用操作,从而缩减测试用例的数量和长度;2)可人为指定测试用例的初始状态和结束状态,设置闭包循环次数和迁移之间的等待时长,从而保证测试方法的灵活性和适用性。对比实验结果表明,该方法能够降低软件测试成本,提高测试用例的错误探测效率。

关键词: 可信验证,PEFSM,正则表达式,自动化测试

Abstract: With the wide application of computer software in medicine,spaceflight,finance and other fields,people proposed stricter requirements for the reliability of the software system.Software testing is an effective method to ensure the security and reliability of software,whereas the quality of test cases will directly influence the testing efficiency and cost.To solve black-box testing problems about embedded systems,a test case generation method based on PEFSM (Probabilistic Extended Finite State Machine) behavioral model was proposed.The applicable scenarios of this method are illuminated with two assumptions.The algorithms for converting and unwrapping RE (regular expression) are designed,and this method is applied to conduct black-box testing towards a smart television based on Android operating system.The features of this method are as follows:1)users’ common operations on IUT (Implementation Under Test) can be tested preferentially by utilizing different frequencies of various operations.In this way,it is possible to reduce the number and length of the test cases.2)testers can specify the initial and final states of test cases.In addition,they can also set cyclic numbers of closures and the waiting time between transitions.Therefore,this method makes the testing flexible and applicable.The experimental results show that this method can not only reduce the software testing cost,but also improve the error-detecting efficiency of test cases.

Key words: Credible verification,PEFSM,Regular expression,Automated testing

[1] BERTOLINO A.Software testing research:Achievements,challenges,dreams[C]∥Future of Software Engineering.IEEE,2007:85-103.
[2] LEE D,YANNAKAKIS M.Principles and methods of tes-ting finite state machines-a survey[J].Proceedings of the IEEE,1996,84(8):1090-1123.
[3] PRADHAN S N,CHOUDHURY P.Low power and high testable Finite State Machine synthesis[C]∥2015 International Conference and Workshop on Computing and Communication (IEMCON).Vancouver,Canada:IEEE Press,2015:1-5.
[4] GOMES CABRAL F,MOREIRA M V,DIENE O,et al.A Petri net diagnoser for discrete event systems modeled by finite state automata[J].IEEE Transactions on Automatic Control,2015,60(1):59-71.
[5] FUJIWARA S,BOCHMANN G V,KHENDEK F,et al.Testselection based on finite state models[J].IEEE Transactions on Software Engineering,1991,17(6):591-603.
[6] LIU P,MIAO H K,ZENG H W,et al.FSM-based testing:Theory,method and evaluation[J].Chinese Journal of Computers,2011,34(6):965-984.(in Chinese) 刘攀,缪淮扣,曾红卫,等.基于 FSM 的测试理论,方法及评估[J].计算机学报,2011,34(6):965-984.
[7] CHOW T S.Testing software design modeled by finite-statemachines[J].IEEE Transactions on Software Engineering,1978(3):178-187.
[8] SABNANI K,DAHBURA A.A protocol test generation procedure[J].Computer Networks and ISDN systems,1988,15(4):285-297.
[9] AMMANN P,OFFUTT J.Introduction to software testing[M].Cambridge,UK:Cambridge University Press,2008.
[10] BOCHMANNAND G V,GECSEI J.A unified method for the spectification and verification of protocols[C]∥IFIP Congress,1977.Toronto,Canada:IEEE,1977:229-234.
[11] PETRENKO A,BORODAY S,GROZ R.Confirming configurations in EFSM testing[J].IEEE Transactions on Software Engineering,2004,30(1):29-42.
[12] DERDERIAN K,HIERONS R M,H ARMAN M,et al.Estimating the feasibility of transition paths in extended finite state machines[J].Automated Software Engineering,2010,17(1):33-56.
[13] YANG R,CHEN Z,ZHANG Z,et al.EFSM-Based Test Case Generation:Sequence,Data,and Oracle[J].International Journal of Software Engineering and Knowledge Engineering,2015,25(4):633-667.
[14] WALKINSHAW N,TAYLOR R,DERRICK J.Inferring ex-tended finite state machine models from software executions[J].Empirical Software Engineering,2016,21(3):811-853.
[15] HUANG C M,JANG M Y,LIN Y C.Executable EFSM-based data flow and control flow protocol test sequence generation using reachability analysis[J].Journal of the Chinese Institute of Engineers,1999,22(5):593-615.
[16] ZHANG J,YANG R,CHEN Z,et al.Automated EFSM-based test case generation with scatter search[C]∥International Workshop on Automation of Software Test (AST).IEEE Press,2012:76-82.
[17] GAROFALAKIS M N,RASTOGI R,SHIM K.SPIRIT:Se-quential pattern mining with regular expression constraints:VLDB,1999[C]∥Edinburgh.Scotland:Morgan Kaufmann Publishers,1999:7-10.
[18] LIU P,MIAO H.Theory of Test Modeling Based on RegularExpressions [M]∥Structured Object-oriented Formal Lanuage and Method.2013:17-31 .
[19] BELLI F,GROSSPIETSCH K E.Specification of fault-tolerant system issues by predicate/transition nets and regular expressions-approach and case study[J].IEEE Transactions on Software Engineering,1991,17(6):513-526.

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!