计算机科学 ›› 2017, Vol. 44 ›› Issue (11): 232-239.doi: 10.11896/j.issn.1002-137X.2017.11.035

• 第六届全国软件分析测试与演化学术会议 • 上一篇    下一篇

模型驱动的移动应用测试方法

冯谷,李尼格   

  1. 全球能源互联网研究院信息通信研究所 南京210003信息网络安全国网重点实验室 南京210003,全球能源互联网研究院信息通信研究所 南京210003信息网络安全国网重点实验室 南京210003
  • 出版日期:2018-12-01 发布日期:2018-12-01
  • 基金资助:
    本文受国网公司科技项目:面向电力移动终端的应用测试技术研究(5455HT150029)资助

Model-driven Testing for Mobile Applications

FENG Gu and LI Ni-ge   

  • Online:2018-12-01 Published:2018-12-01

摘要: 移动互联网时代,移动智能终端和移动应用已经成为各领域竞相采用的祖尧解决方案。与此同时,移动终端硬件和平台的多样性和异构性,造成了移动应用开发和测试中存在大量工作冗余以及难以复用的情况,带来了跨平台问题,成为了学术界和工业界研究和实践的热点。文中提出使用模型驱动的移动应用测试方法。首先,使用UML状态机模型刻画移动应用的行为;然后,基于移动应用的行为模型,自动生成平台无关的测试用例;最后,将与平台无关的测试用例映射到多个移动平台,产生可执行的自动化测试用例。在此基础上,选择形如掌上电力的应用作为案例,分别实现IOS和Android平台上的自动化测试,验证了模型驱动移动应用测试方法在解决跨平台问题时的有效性。

关键词: 移动应用, 移动终端,跨平台,模型驱动,测试用例,平台无关,自动化测试

Abstract: In mobile Internet,the intelligent mobile terminal and mobile applications are widely used in all fields.At the same time,the diversity and heterogeneity of the mobile terminal hardware and platform have caused redundant work in mobile application development and testing.Cross platform issues arise and it becomes a hot area for study and practice in academic and industry.This paper proposed model driven testing for mobile applicaitons.Firstly,the method uses UML state machine to describe the behaviour of the application.Secondly,based on the behaviour model,the method generates platform independent test cases automatically.Lastly,the method maps the test cases which are unrelated to platform to multiple platforms and generates executable test cases.This paper chose a power application as an example and realized the automation test in both IOS and Android.The validity of the model driven testing method was verified in solving the cross platform problem.

Key words: Mobile application,Mobile terminal,Cross platform,Model-driven,Test case,Platform independent,Auto-testing

[1] 中国互联网信息中心.第37次《中国互联网络发展状况统计报告》.http://www.cnnic.net.cn/hlwfzyj/hlwxzbg.
[2] LUO Z J,WU W J,YANG M.Mobile Internet:Terminal Device,Networks and Service[J].Chinese Journal of Computer,2011,4(11):2029-2051.(in Chinese) 罗军舟,吴文甲,杨明.移动互联网:终端,网络与服务[J].计算机学报,2011,34(11):2029-2051.
[3] ATKINSON C,KUHNE T.Model-driven development:a metamodeling foundation[J].IEEE Software,2003,20(5):36-41.
[4] MELLOR S J,CLARK T,FUTAGAMI T.Model-driven deve-lopment:guest editors’ introduction[J].IEEE Software,2003,20(5):14-18.
[5] BALASUBRAMANIAN K,GOKHALE A,K ARSAI G,et al.Developing applications using model-driven design environments[J].Computer,2006,39(2):33-40.
[6] BUTLER M.Android:Changing the mobile landscape[J].Pervasive Computing,IEEE,2011,10(1):4-7.
[7] GOADRICH M H,ROGERS M P.Smart smartphone development:iOS versus Android[C]∥Proceedings of the 42nd ACM Technical Symposium on Computer Science Education.ACM,2011:607-612.
[8] KOCHAN S G.Programming in Objective-C[M].Addison-Wesley Professional,2011.
[9] ABOGHARAF A,PALIT R,NAIK K,et al.A methodology for energy performance testing of smartphone applications[C]∥2012 7th International Workshop on Automation of Software Test (AST).IEEE,2012:110-116.
[10] ANAND S,NAIK M,HARROLD M J,et al.Automated conco-lic testing of smartphone apps[C]∥Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering.ACM,2012:1-11.
[11] ZADGAONKAR H.Robotium Automated Testing for Android[M].Packt Publishing Ltd,2013.
[12] AMALFITANO D,FASOLINO A R,TRAMONTANA P,etal.Using GUI ripping for automated testing of Android applications[C]∥Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.ACM,2012:258-261.
[13] HU C,NEAMTIU I.Automating GUI testing for Android applications[C]∥Proceedings of the 6th International Workshop on Automation of Software Test.ACM,2011:77-83.
[14] MORZAEO N,MALEK S,PSREANU C S,et al.TestingAndroid apps through symbolic execution[J].ACM SIGSOFT Software Engineering Notes,2012,37(6):1-5.
[15] BORMAN M.Developing,and testing,a theoretical framework for inter-organisational systems (IOS) as infrastructure to aid future IOS design[J].Information Systems and e-Business Ma-nagement,2006,4(4):343-360.
[16] PENN J.Test iOS Apps with UI Automation:Bug HuntingMade Easy[M].Pragmatic Bookshelf,2013.
[17] MELLOR S J,BALCER M,FOREWORD B J I.Executable UML:A foundation for model-driven architectures[M].Addison-Wesley Longman Publishing Co.,Inc.,2002.
[18] LODDERSTEDT T,BASIN D,DOSER J.Secure UML:AUML-based modeling language for model-driven security[M]∥《UML》 2002—The Unified Modeling Language.Springer Berlin Heidelberg,2002:426-441.
[19] JENSEN C S,PRASAD M R,MLLER A.Automated testing with targeted event sequence generation[C]∥Proceedings of the 2013 International Symposium on Software Testing and Analysis.ACM,2013:67-77.
[20] SKIENA S.Implementing discrete mathematics:combinatorics and graph theory with Mathematica[M].Addison-Wesley Longman Publishing Co., Inc.,1991.
[21] TARJAN R E.Fast algorithms for solving path problems[J].Journal of the ACM (JACM),1981,28(3):594-614.
[22] TARJAN R E.A unified approach to path problems[J].Journal of the ACM (JACM),1981,28(3):577-593.
[23] LEI B,WANG L Z,BU L,et al.Robustness Testing for Components Based on State Machine Model[J].Journal of Software,2010,1(5):930-941.(in Chinese) 雷斌,王林章,卜磊,等.基于状态机模型的构件健壮性测试[J].Journal of Software,2010,21(5):930-941.

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!