CN109885481A - A kind of the recording and playback test method and device of the game NGUI based on Unity technology - Google Patents

A kind of the recording and playback test method and device of the game NGUI based on Unity technology Download PDF

Info

Publication number
CN109885481A
CN109885481A CN201910033317.8A CN201910033317A CN109885481A CN 109885481 A CN109885481 A CN 109885481A CN 201910033317 A CN201910033317 A CN 201910033317A CN 109885481 A CN109885481 A CN 109885481A
Authority
CN
China
Prior art keywords
operational controls
path
ngui
game
unity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910033317.8A
Other languages
Chinese (zh)
Inventor
李星
孙亚文
杨明邦
张强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Xishan Mobile Game Technology Co Ltd
Zhuhai Kingsoft Online Game Technology Co Ltd
Original Assignee
Zhuhai Xishan Mobile Game Technology Co Ltd
Zhuhai Kingsoft Online Game Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Xishan Mobile Game Technology Co Ltd, Zhuhai Kingsoft Online Game Technology Co Ltd filed Critical Zhuhai Xishan Mobile Game Technology Co Ltd
Priority to CN201910033317.8A priority Critical patent/CN109885481A/en
Publication of CN109885481A publication Critical patent/CN109885481A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to the recording and playback test methods and device of a kind of game NGUI based on Unity technology.It the described method comprises the following steps: A, on the backstage of game terminal access NGUI, monitoring the action event of input equipment object;B, the path of one or more operational controls is triggered in editing machine record user, and path is saved in file;C, using the lookup function in Unity tool storage room, according to the main object of the corresponding operational controls of the path searching;D, simulated operation instruction is sent to the main object for the operational controls found, and is operated with reappearing UI.Wherein described device includes reservoir and processor, for implementing the above method.

Description

A kind of the recording and playback test method and device of the game NGUI based on Unity technology
Technical field
The present invention relates to the recording and playback test methods and device of a kind of game NGUI based on Unity technology, belong to trip Play software field.
Background technique
Game test is a software test for guaranteeing quality in electronic game exploitation as a part of development of games Process, its premiere feature be discovery and recording game exploitation in it is possible that defect and bug.
In the game of Unity technical enabler exploitation, UI module in occupation of very big specific gravity, and test-based examination UI whether Effective work also become it is more complicated with it is heavy.
Summary of the invention
The present invention provides the recording and playback test method and device of a kind of game NGUI based on Unity technology, can subtract Lack the workload of tester and be able to ascend testing efficiency and reduces test error.
Technical solution of the present invention first aspect is the recording and playback test side of game NGUI based on Unity technology a kind of Method comprising step:
A, on the backstage of game terminal access NGUI, the action event of input equipment object is monitored;
B, the path of one or more operational controls is triggered in editing machine record user, and path is saved in file;
C, using the lookup function in Unity tool storage room, according to the main body of the corresponding operational controls of the path searching Object;
D, simulated operation instruction is sent to the main object for the operational controls found, and is operated with reappearing UI.
Further, the step A includes: the input object during games activity-stimulat is monitored on the backstage of NGUI Onclick event.
Further, the step B includes: the path that acted operational controls are recorded in editing machine, and path is saved Into the memory file of game terminal.
Further, the step C includes: to utilize GameObject.Find () function lookup in the operation of game terminal platform To corresponding operational controls object, wherein the parameter for searching function is the operational controls path saved in the step B.
Further, the step D includes: to execute SendMessage (" OnClick ") method, to reappear in the volume Collect user action operation when device in all UI.
Further, the operational controls include the button in game running UI.
It further, include: click event and/or sliding thing to the monitoring users action event of the operational controls in NGUI Part.
Further, the method further include: by the result of the UI of the playback result operated and currently practical operational controls It compares, generates batch testing data.
Technical solution of the present invention second aspect is a kind of computer installation, including memory, processor and being stored in is deposited On reservoir and the computer program that can run on a processor, the processor realize above-mentioned side when executing described program Method.
The technical solution of the present invention third aspect is a kind of computer readable storage medium, stores computer journey thereon Sequence, the computer program realize above-mentioned method when being executed by processor.
The invention has the benefit that
Prior art problem is overcome, proposes the recording and playback test side of the improved game NGUI based on Unity technology Method and device;The events such as click, sliding by monitoring NGUI, and button routing information is collected, it is looked at runtime by object It calls in inquire and thinks corresponding button, and send click event finally to reach the function of playback, can effectively reduce artificial Operation reduces test error.
Detailed description of the invention
Fig. 1 show overview flow chart according to the method for the present invention.
Specific embodiment
It is carried out below with reference to technical effect of the embodiment and attached drawing to design of the invention, specific structure and generation clear Chu, complete description, to be completely understood by the purpose of the present invention, scheme and effect.
NGUI technical principle
NGUI is the Unity plug-in unit for following strictly KISS principle and being write with C#, and it is logical to provide powerful UI system and event Know frame.Its code is succinct, and most classes are less than 200 line codes.This means that programmer can easily extend the function of NGUI It can or adjust functional.For every other user, it means that higher performance, lower learning difficulty and more added with Interest.It is fully integratible into Inspector panel.Result can be checked by not needing click Play button.See in scene view Be exactly obtained in game view (What You See Is What You Get).Component-based, modular characteristic: your interface control is allowed What does, only need to add corresponding behavior for it, without encoding.IOS/Android and Flash is supported comprehensively.Flexibly Event system.Complicated UIs can be allowed to only take up a draw call.
Button click can all listen in fact in NGUI, as long as we click event (OnClick) prison to it It listens, and records the path of its Button, then we can pass through GameObject.Find () letter of Unity at runtime Then number is clicked by simulation to carry out inquiring corresponding Button, that is, can reach the effect of playback.
Therefore, with reference to Fig. 1, according to the method for the present invention during development of games, the UI example of operation is mainly executed Following steps:
A, the Onclick event of NGUI Button is monitored on the backstage of game terminal platform;
B, the path of click button is recorded in editing machine, and path is saved in file;
C, utilize GameObject.Find () function lookup to obj pairs of corresponding button in the operation of game terminal platform As the button path that parameter saves when being second step;
D, obj.SendMessage (" OnClick ") method is executed, all UI in editing machine can be completely reproduced up and clicked Operation.
In addition, still the above method can be implemented in the mobile phone games specifically developed, steps are as follows.
Step 1: editing machine starts game and all opens all UI.
Step 2: being clicked one by one to UI, its path UI is collected, and be saved in file.
Step 3: mobile phone prototype runs playback function, the UI path file being collected into before server downloading automatically.
Step 4: executing playback test according to the UI path file of downloading.
It should be appreciated that the embodiment of the present invention can be by computer hardware, the combination of hardware and software or by depositing The computer instruction in non-transitory computer-readable memory is stored up to be effected or carried out.Standard volume can be used in the method Journey technology.Each program can be realized with the programming language of level process or object-oriented to communicate with computer system.So And, if desired, the program can be realized with compilation or machine language.Under any circumstance, which can be compiling or explanation Language.In addition, the program can be run on the specific integrated circuit of programming for this purpose.
In addition, the operation of process described herein can be performed in any suitable order, unless herein in addition instruction or Otherwise significantly with contradicted by context.Process described herein (or modification and/or combination thereof) can be held being configured with It executes, and is can be used as jointly on the one or more processors under the control of one or more computer systems of row instruction The code (for example, executable instruction, one or more computer program or one or more application) of execution, by hardware or its group It closes to realize.The computer program includes the multiple instruction that can be performed by one or more processors.
Further, the method can be realized in being operably coupled to suitable any kind of computing platform, wrap Include but be not limited to PC, mini-computer, main frame, work station, network or distributed computing environment, individual or integrated Computer platform or communicated with charged particle tool or other imaging devices etc..Each aspect of the present invention can be to deposit The machine readable code on non-transitory storage medium or equipment is stored up to realize no matter be moveable or be integrated to calculating Platform, such as hard disk, optical reading and/or write-in storage medium, RAM, ROM, so that it can be read by programmable calculator, when Storage medium or equipment can be used for configuration and operation computer to execute process described herein when being read by computer.This Outside, machine readable code, or part thereof can be transmitted by wired or wireless network.When such media include combining microprocessor Or other data processors realize steps described above instruction or program when, invention as described herein including these and other not The non-transitory computer-readable storage media of same type.When methods and techniques according to the present invention programming, the present invention It further include computer itself.
Computer program can be applied to input data to execute function as described herein, to convert input data with life At storing to the output data of nonvolatile memory.Output information can also be applied to one or more output equipments as shown Device.In the preferred embodiment of the invention, the data of conversion indicate physics and tangible object, including the object generated on display Reason and the particular visual of physical objects are described.
The above, only presently preferred embodiments of the present invention, the invention is not limited to above embodiment, as long as It reaches technical effect of the invention with identical means, all within the spirits and principles of the present invention, any modification for being made, Equivalent replacement, improvement etc., should be included within the scope of the present invention.Its technical solution within the scope of the present invention And/or embodiment can have a variety of different modifications and variations.

Claims (10)

1. a kind of recording and playback test method of the game NGUI based on Unity technology, which is characterized in that the method includes with Lower step:
A, on the backstage of game terminal access NGUI, the action event of input equipment object is monitored;
B, the path of one or more operational controls is triggered in editing machine record user, and path is saved in file;
C, using the lookup function in Unity tool storage room, according to the main object of the corresponding operational controls of the path searching;
D, simulated operation instruction is sent to the main object for the operational controls found, and is operated with reappearing UI.
2. the method according to claim 1, wherein the step A includes:
The Onclick event of input object during games activity-stimulat is monitored on the backstage of NGUI.
3. the method according to claim 1, wherein the step B includes:
The path of acted operational controls is recorded in editing machine, and path is saved in the memory file of game terminal.
4. the method according to claim 1, wherein the step C includes:
It runs in game terminal platform using GameObject.Find () function lookup to corresponding operational controls object, The middle parameter for searching function is the operational controls path saved in the step B.
5. method according to claim 1 or 4, which is characterized in that the step D includes:
SendMessage (" the OnClick ") method of execution, to reappear the user action behaviour in the editing machine in all UI Make.
6. the method according to claim 1, wherein the operational controls include in game running UI by Button.
7. the method according to claim 1, wherein to the monitoring users action event of the operational controls in NGUI It include: click event and/or slip event.
8. the method according to claim 1, wherein further include:
The result of the UI of the playback result and currently practical operational controls operated is compared, batch testing data are generated.
9. a kind of computer installation, can run on a memory and on a processor including memory, processor and storage Computer program, which is characterized in that the processor is realized as described in any one of claims 1 to 8 when executing described program Method.
10. a kind of computer readable storage medium, stores computer program thereon, the computer program is executed by processor Shi Shixian method for example described in any item of the claim 1 to 8.
CN201910033317.8A 2019-01-14 2019-01-14 A kind of the recording and playback test method and device of the game NGUI based on Unity technology Pending CN109885481A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910033317.8A CN109885481A (en) 2019-01-14 2019-01-14 A kind of the recording and playback test method and device of the game NGUI based on Unity technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910033317.8A CN109885481A (en) 2019-01-14 2019-01-14 A kind of the recording and playback test method and device of the game NGUI based on Unity technology

Publications (1)

Publication Number Publication Date
CN109885481A true CN109885481A (en) 2019-06-14

Family

ID=66925905

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910033317.8A Pending CN109885481A (en) 2019-01-14 2019-01-14 A kind of the recording and playback test method and device of the game NGUI based on Unity technology

Country Status (1)

Country Link
CN (1) CN109885481A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444091A (en) * 2020-03-23 2020-07-24 北京字节跳动网络技术有限公司 Test case generation method and device
CN111935534A (en) * 2020-07-30 2020-11-13 视伴科技(北京)有限公司 Method and device for playing back recorded video
CN112817585A (en) * 2021-02-26 2021-05-18 厦门极致互动网络技术股份有限公司 Cocos2dx UI interface building method based on Unity editor
CN113392007A (en) * 2021-06-17 2021-09-14 网易(杭州)网络有限公司 Compatibility testing method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699617A (en) * 2015-03-31 2015-06-10 成都优聚软件有限责任公司 Automated testing method for games
CN106095666A (en) * 2016-06-02 2016-11-09 腾讯科技(深圳)有限公司 Game automated testing method and relevant apparatus
CN107025165A (en) * 2017-03-07 2017-08-08 腾讯科技(深圳)有限公司 Game automated testing method and relevant apparatus
CN108255729A (en) * 2018-01-24 2018-07-06 珠海金山网络游戏科技有限公司 A kind of mobile phone games automated testing method and system based on Unity platforms
CN108280026A (en) * 2018-01-23 2018-07-13 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
CN108345531A (en) * 2017-01-23 2018-07-31 阿里巴巴集团控股有限公司 A kind of test method, apparatus and system
CN108923999A (en) * 2018-05-31 2018-11-30 苏州蜗牛数字科技股份有限公司 A kind of net surfing server automatic performance test method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699617A (en) * 2015-03-31 2015-06-10 成都优聚软件有限责任公司 Automated testing method for games
CN106095666A (en) * 2016-06-02 2016-11-09 腾讯科技(深圳)有限公司 Game automated testing method and relevant apparatus
CN108345531A (en) * 2017-01-23 2018-07-31 阿里巴巴集团控股有限公司 A kind of test method, apparatus and system
CN107025165A (en) * 2017-03-07 2017-08-08 腾讯科技(深圳)有限公司 Game automated testing method and relevant apparatus
CN108280026A (en) * 2018-01-23 2018-07-13 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
CN108255729A (en) * 2018-01-24 2018-07-06 珠海金山网络游戏科技有限公司 A kind of mobile phone games automated testing method and system based on Unity platforms
CN108923999A (en) * 2018-05-31 2018-11-30 苏州蜗牛数字科技股份有限公司 A kind of net surfing server automatic performance test method and system

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
JUARESAN: "NGUI点击Click事件", 《HTTPS://BLOG.CSDN.NET/JUARESAN/ARTICLE/DETAILS/52701896》 *
LAZERYVTIAN: "Unity获取场景gameobject的路径", 《HTTPS://BLOG.CSDN.NET/LIULEI199079/ARTICLE/DETAILS/50750909》 *
TENCENT: "GAutomator是一个针对Unity手游的UI自动化测试框架", 《HTTP://WWW.VOIDCC.COM/PROJECT/GAUTOMATOR》 *
优美缔软件(上海)有限公司: "《虚拟仿真与游戏开发实用教程》", 30 April 2015, 上海交通大学出版社 *
侯津等: "基于控件路径的跨设备UI自动化测试方法", 《计算机***应用》 *
欧阳元东: "基于Android平台下Button控件单击事件和***的五种编写", 《电子制作》 *
路朝龙: "《Unity权威指南 Unity 3D与Unity 2D全实例讲解》", 31 May 2014, 北京:中国青年出版社 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111444091A (en) * 2020-03-23 2020-07-24 北京字节跳动网络技术有限公司 Test case generation method and device
CN111935534A (en) * 2020-07-30 2020-11-13 视伴科技(北京)有限公司 Method and device for playing back recorded video
CN112817585A (en) * 2021-02-26 2021-05-18 厦门极致互动网络技术股份有限公司 Cocos2dx UI interface building method based on Unity editor
CN113392007A (en) * 2021-06-17 2021-09-14 网易(杭州)网络有限公司 Compatibility testing method and device
CN113392007B (en) * 2021-06-17 2023-09-08 网易(杭州)网络有限公司 Compatibility testing method and device

Similar Documents

Publication Publication Date Title
CN109885481A (en) A kind of the recording and playback test method and device of the game NGUI based on Unity technology
CN108255729B (en) Mobile phone game automatic testing method and system based on Unity platform
CN105094783B (en) method and device for testing stability of android application
CN104699598B (en) Automated testing method, device, equipment and system
US9465718B2 (en) Filter generation for load testing managed environments
CN109408105A (en) Acquisition method, device, computing device and the storage medium of user behavior data
CN107894889A (en) Bury point methods, equipment and computer-readable recording medium
CN106201846A (en) Method for monitoring performance in automatic test and device
CN110007921B (en) Code publishing method and device
CN103577309A (en) Automatic test method and device
CN110013672A (en) Method, unit and the computer readable storage medium of the automatic test of game for machine operation
CN113268243B (en) Memory prediction method and device, storage medium and electronic equipment
CN108139961A (en) Telemetering defines system
CN114003451B (en) Interface testing method, device, system and medium
CN108874470A (en) A kind of information processing method and server, computer storage medium
CN113590454A (en) Test method, test device, computer equipment and storage medium
CN111679982A (en) Automatic testing method for REST API (representational State transfer) interface software
CN112749083A (en) Test script generation method and device
CN108509348A (en) A kind of test method and mobile terminal of system aging
CN109876446B (en) Method and device for detecting occupation distribution of game map and grid in memory
CN109542444A (en) Monitoring method, device, server and the storage medium of JAVA application
CN111382424A (en) Mobile application sensitive behavior detection method and system based on controlled environment
CN111078533A (en) Automatic testing method and device, computer equipment and storage medium
CN109947466A (en) A kind of reverse method and device thereof for obtaining UE4 global object table
CN103778048A (en) Mobile terminal test method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190614

RJ01 Rejection of invention patent application after publication