The invention discloses a method and device for generating a web game test script. The method includes: selecting the address of one or more web games that need to be tested; opening one or more page games with the address of the test software and one or more pages of the page game, and starting the test script of the test software System function; in the process of one or more web games described by user operation, the user's operation action is recorded into the test script by the test software, one or more initial test scripts for web games are obtained; the initial test script of the page game is replayed, and the pages are swam to the page during the playback process. The initial test script is modified to get one or more web game test scripts for real-time testing of web games. The invention can provide test results, and can automatically execute test scripts according to user settings, thereby improving user experience.
【技术实现步骤摘要】
一种网页游戏测试脚本生成方法
本专利技术涉及游戏测试
,特别涉及一种网页游戏测试脚本生成方法及装置。
技术介绍
目前大部分的HTML5游戏使用浏览器中的Canvas(画布)来呈现游戏画面,使用JavaScript语言来执行游戏的逻辑控制。由于大部分的HTML5游戏使用Canvas而不是普通的DOM(DocumentObjectModel,文档对象模型)元素来展现游戏界面。这就使得传统的HTML测试工具和测试方法不再适用于HTML5游戏。HTML应用的测试方案。HTML应用的测试一般分为几个步骤:1、录制或编写测试脚本,记录用户操作;2、回放测试脚本,模拟用户进行操作;3、根据脚本执行情况,生成测试结果。现有HTML应用测试的方法不能够适用于游戏这种基于Canvas渲染的情况,因为canvas作为一个HTML元素,内部不再有可供检测的结构,这就使得传统的测试工具无法记录用户的操作,也就无法回放和提供测试结果。
技术实现思路
本专利技术的目的在于提供一种网页游戏测试脚本生成方法及装置,解决了现有技术在游戏中无法记录用户的操作和无法回放测试及无法提供测试结果的问题。根据本专利技术的一个方面,提供了一种网页游戏测试脚本生成方法,包括以下步骤:选择需要测试的一个或多个网页游戏的地址;利用测试软件和所述一个或多个网页游戏的地址打开所述一个或多个网页游戏,并启动测试软件的测试脚本的录制功能;在用户操作所述一个或多个网页游戏过程中,通过所述测试软件将用户的操作动作录制到所述测试脚本中,得到一个或多个网页游戏初始测试脚本;回放所述网页游戏初始测试脚本,并在所述回放过程中对 ...
【技术保护点】
1.一种网页游戏测试脚本生成方法,其特征在于,包括以下步骤: 选择需要测试的网页游戏的地址;利用测试软件和所述网页游戏的地址打开网页游戏,并启测试软件的测试脚本的录制功能;在用户操作网页游戏过程中,通过所述测试软件将用户的操作动作录到所述测试脚本中,得到网页游戏初始测试脚本;回放所述网页游戏初始测试脚本,并在所述回放过程中对所述网页游戏初始测试脚本修改,得到用于对网页游戏进行实时测试网页游戏测试脚本。
【技术特征摘要】
1.一种网页游戏测试脚本生成方法,其特征在于,包括以下步骤:选择需要测试的网页游戏的地址;利用测试软件和所述网页游戏的地址打开网页游戏,并启测试软件的测试脚本的录制功能;在用户操作网页游戏过程中,通过所述测试软件将用户的操作动作录到所述测试脚本中,得到网页游戏初始测试脚本;回放所述网页游戏初始测试脚本,并在所述回放过程中对所述网页游戏初始测试脚本修改,得到用于对网页游戏进行实时测试网页游戏测试脚本。2.根据权利要求1所述的方法,其特征在于,所述回放所述网页游戏初始测试脚本包括回放所述网页游戏的多个初始测试脚本和回放所述网页游戏的一个初始测试脚本。3.根据权利要求2所述的方法,其特征在于,当需要全面测...
【专利技术属性】
技术研发人员:张辉,
申请(专利权)人:合肥黑钻科技有限公司,
类型:发明
国别省市:安徽,34
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。