CN109985387A - Automated testing method and device - Google Patents

Automated testing method and device Download PDF

Info

Publication number
CN109985387A
CN109985387A CN201910227885.1A CN201910227885A CN109985387A CN 109985387 A CN109985387 A CN 109985387A CN 201910227885 A CN201910227885 A CN 201910227885A CN 109985387 A CN109985387 A CN 109985387A
Authority
CN
China
Prior art keywords
mode
client
virtual objects
game
virtual
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.)
Granted
Application number
CN201910227885.1A
Other languages
Chinese (zh)
Other versions
CN109985387B (en
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201910227885.1A priority Critical patent/CN109985387B/en
Publication of CN109985387A publication Critical patent/CN109985387A/en
Application granted granted Critical
Publication of CN109985387B publication Critical patent/CN109985387B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present invention provides a kind of automated testing method and device, this method comprises: obtaining the agreement log generated when the first game of operation from game client, obtain the first mode of operation of virtual objects in virtual client, according to the first mode of operation and agreement log, determine whether virtual objects being adjusted to the second mode of operation by the first mode of operation, second mode of operation is next state of the first mode of operation, if, virtual objects are adjusted to the second mode of operation by the first mode of operation, to complete the automatic test to the first game using virtual client, improve testing efficiency.

Description

Automated testing method and device
Technical field
The present embodiments relate to automatization testing technique field more particularly to a kind of automated testing methods and device.
Background technique
In development of games iterative process, the verifying and test of game function be it is essential, using automatic test It can be improved the testing efficiency of game, wherein automatic test is the behavioral test taking human as driving to be converted into machine execution A kind of process.
In current game automatic test scheme, the icon in AirTest identification game is generallyd use, operation is preparatory The click logic set completes some simple tests, however, for some first person shooting game (First- Person Shooting, FPS), due to these game can not by simply clicking, sliding mode complete, be difficult to pass through Preset script carries out automatic test, therefore is unable to complete automatic test using AirTest.
Summary of the invention
The embodiment of the present invention provides a kind of automated testing method and device, for realizing automatic test, improves game Testing efficiency.
In a first aspect, the embodiment of the present invention provides a kind of automated testing method, comprising:
The agreement log generated when the first game of operation is obtained from game client;
Obtain the first mode of operation of virtual objects in the virtual client;
According to the first mode of operation and agreement log, it is determined whether be adjusted to virtual objects by first mode of operation Second mode of operation, second mode of operation are next state of first mode of operation;
If so, the virtual objects are adjusted to second mode of operation by first mode of operation.
Optionally, which is characterized in that described according to first mode of operation and the agreement log, it is determined whether by institute It states virtual objects and the second mode of operation is adjusted to by first mode of operation, comprising:
According to first mode of operation and the agreement log, the second mode of operation of virtual objects is determined;
According to first mode of operation and second mode of operation, it is determined whether by the virtual objects by described One mode of operation is adjusted to second mode of operation.
Optionally, described according to first mode of operation and second mode of operation, it is determined whether will be described virtual Object is adjusted to second mode of operation by first mode of operation, comprising:
First mode of operation is sent to server, and receives the first message that the server returns, described the One message includes the dbjective state of the check results and the virtual objects to first mode of operation;
If the check results instruction verification passes through, and the dbjective state is consistent with second mode of operation, determines The virtual objects are adjusted to second mode of operation by first mode of operation.
Optionally, further includes:
If check results instruction verification do not pass through and/or the dbjective state and second mode of operation it is different It causes, keeping the state of the virtual objects is first mode of operation.
Optionally, after the agreement log generated when acquisition first game of operation from game client, further includes:
According to default resolution rules, the agreement log is parsed, the agreement log after obtaining parsing.
Optionally, the basis presets resolution rules, parses to the agreement log, the agreement day after obtaining parsing After will, the method also includes:
The corresponding virtual objects of agreement log according to the operation logic of first game, after obtaining the parsing Mode of operation, the operation logic is used to characterize the operation order of first game.
Optionally, the operation logic according to first game, the agreement log after obtaining the parsing are corresponding After the mode of operation of the virtual objects, further includes:
According to preset test case and the mode of operation of the virtual objects, to the agreement log after the parsing into Row, which is sorted out, to be divided.
Second aspect, the embodiment of the present invention provide a kind of automated testing method, comprising:
Receive the first mode of operation of the virtual objects that virtual client is sent;
Verification is carried out to first mode of operation and obtains check results, and determines the dbjective state of the virtual objects;
First message is sent to the virtual client, the first message includes the verification to first mode of operation As a result with the dbjective state of the virtual objects.
Optionally, the method also includes:
First mode of operation is sent to client of watching.
The third aspect, the embodiment of the present invention provide a kind of automated testing method, comprising:
Obtain the agreement log generated when the first game of operation;
The first request sent according to virtual client, is sent to virtual client for the agreement log.
Fourth aspect, the embodiment of the present invention provide a kind of virtual client, comprising:
Module is obtained, for obtaining the agreement log generated when the first game of operation from game client;
The acquisition module is also used to obtain the first mode of operation of virtual objects in the virtual client;
Determining module, for according to the first mode of operation and agreement log, it is determined whether by virtual objects by described first Mode of operation is adjusted to the second mode of operation, and second mode of operation is next state of first mode of operation;
Processing module, for if so, the virtual objects are adjusted to second operation by first mode of operation State.
Optionally, the determining module, is specifically used for:
According to first mode of operation and the agreement log, the second mode of operation of virtual objects is determined;
According to first mode of operation and second mode of operation, it is determined whether by the virtual objects by described One mode of operation is adjusted to second mode of operation.
Optionally, the determining module, is specifically used for:
First mode of operation is sent to server, and receives the first message that the server returns, described the One message includes the dbjective state of the check results and the virtual objects to first mode of operation;
If the check results instruction verification passes through, and the dbjective state is consistent with second mode of operation, determines The virtual objects are adjusted to second mode of operation by first mode of operation.
Optionally, the determining module, is specifically used for:
If check results instruction verification do not pass through and/or the dbjective state and second mode of operation it is different It causes, keeping the state of the virtual objects is first mode of operation.
Optionally, the acquisition module, is also used to:
According to default resolution rules, the agreement log is parsed, the agreement log after obtaining parsing.
Optionally, the acquisition module, is also used to:
The corresponding virtual objects of agreement log according to the operation logic of first game, after obtaining the parsing Mode of operation, the operation logic is used to characterize the operation order of first game.
The processing module, is also used to:
According to preset test case and the mode of operation of the virtual objects, to the agreement log after the parsing into Row, which is sorted out, to be divided.
5th aspect, the embodiment of the present invention provide a kind of server, comprising:
Receiving module, the first mode of operation of the virtual objects for receiving virtual client transmission;
Determining module obtains check results for carrying out verification to first mode of operation, and determining described virtual right The dbjective state of elephant;
Sending module, for sending first message to the virtual client, the first message includes to described first The dbjective state of the check results of mode of operation and the virtual objects.
Optionally, the sending module, is also used to:
First mode of operation is sent to client of watching, so that the client of watching operates shape for described first State is shown.
6th aspect, the embodiment of the present invention provide a kind of game client, comprising:
Module is obtained, for obtaining the agreement log generated when the first game of operation;
Sending module, the first request for being sent according to virtual client, is sent to virtual visitor for the agreement log Family end.
7th aspect, the embodiment of the present invention provide a kind of terminal, comprising: memory and processor;
The memory, for storing program code;
The processor, for calling the automated testing method of said program code execution as described in relation to the first aspect.
Eighth aspect, the embodiment of the present invention provide a kind of server, comprising: memory and processor;
The memory, for storing program code;
The processor, for calling said program code to execute the automated testing method as described in second aspect.
9th aspect, the embodiment of the present invention provide a kind of terminal, comprising: memory and processor;
The memory, for storing program code;
The processor, for calling said program code to execute the automated testing method as described in the third aspect.
Tenth aspect, the embodiment of the present invention provide a kind of readable storage medium storing program for executing, meter are stored on the readable storage medium storing program for executing Calculation machine program;The computer program when executed, realizes automated testing method as described in relation to the first aspect.
Tenth on the one hand, and the embodiment of the present invention provides a kind of readable storage medium storing program for executing, is stored on the readable storage medium storing program for executing Computer program;The computer program when executed, realizes the automated testing method as described in second aspect.
12nd aspect, the embodiment of the present invention provide a kind of readable storage medium storing program for executing, are stored on the readable storage medium storing program for executing Computer program;The computer program when executed, realizes the automated testing method as described in the third aspect.
The embodiment of the present invention provides a kind of automated testing method and device, this method comprises: obtaining from game client The agreement log generated when the first game is operated, the first mode of operation of virtual objects in virtual client is obtained, according to first Mode of operation and agreement log, it is determined whether virtual objects are adjusted to the second mode of operation, the second behaviour by the first mode of operation Make next state that state is the first mode of operation, if so, virtual objects are adjusted to the second operation by the first mode of operation State, to complete to improve testing efficiency to the automatic test of the first game using virtual client.
Detailed description of the invention
Fig. 1 is the application scenarios schematic diagram for the automatization test system that one embodiment of the invention provides;
Fig. 2 is the flow chart for the automated testing method that one embodiment of the invention provides;
Fig. 3 be another embodiment of the present invention provides automated testing method flow chart;
Fig. 4 is the schematic diagram for the virtual client that one embodiment of the invention provides;
Fig. 5 is the flow chart for the automated testing method that further embodiment of this invention provides;
Fig. 6 is the structural schematic diagram for the virtual client that one embodiment of the invention provides;
Fig. 7 be another embodiment of the present invention provides terminal structural schematic diagram;
Fig. 8 is the structural schematic diagram for the server that one embodiment of the invention provides;
Fig. 9 be another embodiment of the present invention provides server structural schematic diagram;
Figure 10 is the structural schematic diagram for the game client that one embodiment of the invention provides;
Figure 11 be another embodiment of the present invention provides terminal structural schematic diagram.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Currently, AirTest is a kind of very common test method in the automatic test scheme of game, specifically, Using the icon in AirTest identification game, pre-set click logic is run, some simple tests are completed, still, For FPS game instantly, can not by simply clicking, sliding mode completes, therefore is difficult through preset script Carry out automatic test.
In addition, providing the method for two kinds of reproduction BUG, one is record by video in current automatic test scheme All operations of virtual objects processed then observe playback video location BUG after there is BUG, and another kind is that game is added in log The log of operation, the process that monitoring BUG occurs, and then position BUG.But for game, occur during the test BUG is difficult to stablize reproduction, therefore infeasible using the method for the first reproduction BUG;The log of game running is added in log, The operational efficiency of code is not only influenced, but also it is very big log amount when BUG in game occur, needs to clear all programmed logics Then the precondition occurred with BUG removes reproduction BUG according to these preconditions, this also increases workload, and it is multiple to reduce BUG Existing efficiency.
To solve the above-mentioned problems, the embodiment of the invention provides a kind of automated testing method, this method may include: The agreement log generated when the first game of operation is obtained from game client, according to default resolution rules, analysis protocol log is obtained Agreement log after taking parsing obtains the first mode of operation of virtual objects in virtual client, according to the first mode of operation, with And the agreement log after parsing, determine that the second mode of operation of virtual objects, the second mode of operation are under the first mode of operation One state, according to the first mode of operation and the second mode of operation, it is determined whether adjust virtual objects by the first mode of operation For the second mode of operation, to complete to improve testing efficiency, together to the automatic test of the first game using virtual client When realize reproduction to BUG.
Technical term of the present invention is explained first.
Game client agreement log: game is communicated with server according to the agreement of agreement in the process of running, visitor The protocol informations such as the protocol name of transmitting, parameter list are recorded in log by family end, which is known as game client agreement day Will.
Virtual client: game client includes game engine, fine arts resource and logical code etc., and virtual client only wraps Most simplified logical code has been included, for being communicated with server, has completed the basic procedure of game.In the embodiment of the present invention, Virtual client is communicated by client protocol log, simulation client with server foundation.
It watches: a kind of function of observing the operation of other virtual objects of being provided in FPS game.
It watches client: the client for other virtual objects operation that can watch, for example, virtual right with virtual client Client as where A in the virtual objects B in same office's game.
Fig. 1 is the application scenarios schematic diagram for the automatization test system that one embodiment of the invention provides, as shown in Figure 1, this The automatization test system of embodiment may include: virtual client, server, game client, client of watching.It needs Bright, although the quantity of various pieces shown in Fig. 1 is one, the present embodiment is not limited to this, and can be at least one It is a.Wherein, virtual client may operate in any terminal, for example, computer, game client and client of watching can pacify It fills at the terminal, for example, mobile phone, computer etc..
Wherein, user can pass through game client respectively, client of watching logs in game and plays game, and user can be with Game is loaded onto virtual client, and is run on computers.User can be by the virtual objects A for client of watching and game visitor Virtual objects B in the end of family is matched in same office's game, so as to watch to virtual objects B in virtual client.
It will be appreciated by those skilled in the art that a series of game can only be run in running game on virtual client Logical code can not show entire interface.In addition, the game in the embodiment of the present invention can be any in online game Money game.
Wherein, game client is stored in client protocol log library operating the client protocol log generated when game In.
The technical solution of the above embodiment of the present invention is described in detail using several specific embodiments below.
Fig. 2 is the flow chart for the automated testing method that one embodiment of the invention provides, as shown in Fig. 2, the present embodiment Method may include:
S201, virtual client obtain the agreement log generated when the first game of operation from game client.
Since many operations of virtual objects are all the confirmations for needing to obtain server, game client can obtain Server confirmed just execute relevant operation, therefore, server return agreement be only game client played certain animations or Person has carried out the reason of certain operation.In the present embodiment, when user successfully logins to the first game using game client, and When operating the first game (playing the first game), it can be interacted with server, generate the agreement log with server.
For example, in the present embodiment, game client gets the agreement log generated when the first game of operation, will The agreement log is sent to virtual client, alternatively, virtual client sends acquisition request to game client, to receive game The agreement log generated when the first game of operation that client is sent.Those skilled in the art can realize void in any manner Quasi- client obtains the agreement log generated when the first game of operation from game client, and details are not described herein again.
Wherein, the log of game client agreement can be exports sequentially in time, including protocol name, design parameter Information etc..
It should be noted that user is successfully logged onto the first game by game client, the first game can be network Any money game in game, the quantity of game client are not limited to one.
S202, virtual client obtain the first mode of operation of virtual objects in virtual client.
For virtual client unlike game client, user logs in the first game, game visitor by game client Show the corresponding interface of the first game on the end of family, and only included on virtual client simplified logical code for and Server communication, that is to say, that interface can not be shown on virtual client.In the present embodiment, the first mode of operation is When loading the first game on virtual client, the current state of virtual objects in virtual client, the first mode of operation can be with Including blood volume information, location information, action message etc., wherein virtual objects are the virtual role in the first game.
For example, the first mode of operation can be the original state of virtual objects in virtual client, for example, a certain A position, movement are upright, correspondingly, in the available virtual client of virtual client virtual objects original state.
S203, virtual client are according to the first mode of operation and agreement log, it is determined whether by virtual objects by the first behaviour The second mode of operation is adjusted to as state.Second mode of operation is next state of the first mode of operation.
It in the present embodiment, can be according to the operation logic of the first game, the i.e. fortune of the first game after obtaining agreement log Row sequence, for example, being introduced into Games Lobby, enters back into game, obtains the mode of operation that each agreement log represents, then looks into The first mode of operation is found in inquiry, determines the second mode of operation of virtual objects.
Next, first mode of operation and second mode of operation of the virtual client according to virtual objects, it is determined whether will Virtual objects are adjusted to the second mode of operation by the first mode of operation, and virtual client determines whether to be permitted virtual objects by first The realization process that mode of operation is adjusted to the second mode of operation is similar with the realization process of the prior art, and details are not described herein again.
S204, if so, virtual objects are adjusted to the second mode of operation by the first mode of operation by virtual client.
If it is determined that virtual objects are adjusted to the second mode of operation by the first mode of operation, then by virtual objects by the first behaviour It is adjusted to the second mode of operation as state, for example, current blood volume is increased to 100% by 10%.In the present embodiment, by that will work as Preceding blood volume increases to 100% by 10%, realizes and completes automatic test using virtual client, and in this operation, not There is BUG.
S205, if it is not, keep virtual objects state be the first mode of operation.
If it is determined that virtual objects are not adjusted to the second mode of operation by the first mode of operation, the state of virtual objects is kept For the first mode of operation, then show that there are BUG in current automatic test, can not execute next operation, test crash.It is optional , the message of test crash is pushed to user, so that user understands test case in time, while also achieving and BUG is answered It is existing.
Automated testing method provided in this embodiment obtains the agreement generated when the first game of operation from game client Log obtains the first mode of operation of virtual objects in virtual client, and according to the first mode of operation and agreement log, determination is No that virtual objects are adjusted to the second mode of operation by the first mode of operation, the second mode of operation is the next of the first mode of operation A state, if so, virtual objects are adjusted to the second mode of operation by the first mode of operation, to complete using virtual client To the automatic test of the first game, testing efficiency is improved, while realizing the reproduction to BUG.
Fig. 3 be another embodiment of the present invention provides automated testing method flow chart, as shown in figure 3, the present embodiment Method may include:
S301, game client obtain the agreement log generated when the first game of operation.
In the present embodiment, the collection that the agreement log generated when the first game is the corresponding agreement log of different operation is operated It closes.The specific implementation process of S301 may refer to the associated description of embodiment illustrated in fig. 2, and details are not described herein again.
The first request that S302, game client are sent according to virtual client, is sent to virtual client for agreement log End.
In the present embodiment, the first request that game client is sent according to virtual client, agreement log is sent to Virtual client, correspondingly, virtual client obtains the agreement log generated when the first game of operation from game client.
S303, virtual client parse agreement log according to default resolution rules, the agreement day after obtaining parsing Will.
In the present embodiment, analysis protocol log purpose is, filters out the log unrelated with the agreement log, is solved Agreement log after analysis only includes transmitting-receiving agreement log related with server in the agreement log after parsing.Association after parsing Discuss includes protocol name, design parameter information etc. in log.Specific resolving is similar with the parsing of the prior art, herein not It repeats again.
It is corresponding virtual to obtain the agreement log after parsing according to the operation logic of the first game for S304, virtual client The mode of operation of object.Operation logic is used to characterize the operation order of the first game.
In the present embodiment, since the agreement log after parsing respectively corresponds different modes of operation, then according to the first trip The time that the operation logic of play and agreement log generate, the operation of the corresponding virtual objects of agreement log after obtaining parsing State.
For example, for example the operation logic of the first game is to be introduced into game main interface and then open fire, jump again Umbrella can obtain the corresponding mode of operation of each agreement log according to the time that every agreement log generates, for example, the first association The corresponding mode of operation of view log is into game main interface, the corresponding mode of operation of second protocol log be open fire, the The corresponding mode of operation of three agreement logs is parachute jumping.
S305, virtual client are according to preset test case and the mode of operation of virtual objects, to the association after parsing View log carries out classification division.
The present embodiment is specifically described below with reference to Fig. 4.
Fig. 4 is the schematic diagram for the virtual client that one embodiment of the invention provides, as shown in figure 4, virtual client includes Frame per second analog module and protocol resolution module, wherein frame per second analog module includes processing network protocol event module, analog frame mould Block, frame logic processing module.
Protocol resolution module is responsible for carrying out context resolution logic to the agreement in agreement log.Protocol resolution module includes Test case module, parsing module and filtering module, wherein test case module be used for by agreement log according to test case into Row divides, and the classification of test case is carried out to each agreement log;Parsing module is for parsing agreement log;Filter module Block is for being filtered agreement log, to obtain transmitting-receiving agreement log related with server.
In the present embodiment, the test case module in Fig. 4 is for carrying out classification division, Ying Li to the agreement log after parsing Solution, the corresponding test case of at least one agreement log.
For example, the mode of operation of virtual objects include running, parachute jumping, running of the virtual objects in the first game and It parachutes and corresponds to a test case, it is determined that corresponding agreement log of running is tested with corresponding one of corresponding agreement log of parachuting Use-case.Certainly, corresponding agreement log of running and parachute can also respectively correspond a test case, totally two test cases.
Those skilled in the art carry out the agreement log after parsing it is to be understood that for according to preset test case Sort out and divide, can include but is not limited to aforesaid way.
S306, virtual client obtain the first mode of operation of virtual objects in virtual client.
In the present embodiment, the implementation procedure of S306 is similar with the implementation procedure of step 202 shown in Fig. 2, no longer superfluous herein It states.
In addition, S306 can be executed before S301, can also be executed after S301, the present embodiment does not limit this It is fixed.
S307, virtual client according to the first mode of operation and sort out the agreement log divided, determine the of virtual objects Two modes of operation.
For example, in the present embodiment, the first mode of operation includes including shooting, in sorting out the agreement log divided The corresponding agreement log of shooting is inquired, then determines the next agreement log for shooting corresponding agreement log, for example, running With corresponding agreement log of parachuting, then the second mode of operation of virtual objects includes running and parachute jumping.
First mode of operation is sent to server by S308, virtual client.
S309, virtual client receive the first message that server returns.
Specifically, the first mode of operation of virtual objects is sent to server by virtual client, server receive this One mode of operation, and verification is carried out to first mode of operation and obtains check results, while determining the dbjective state of virtual objects. For example, if the first mode of operation includes 10% blood volume, server need to veritify 10% blood volume whether be lower than it is default Blood volume, if passing through lower than default blood volume verification;When server determines that 10% blood volume is lower than default blood volume simultaneously, it is determined that the The dbjective state of one mode of operation, the dbjective state include 100% blood volume.
Correspondingly, server sends first message to virtual client, which includes to the first mode of operation The dbjective state of check results and virtual objects.
If the instruction verification of S310, check results passes through, and dbjective state is consistent with second mode of operation, virtual client End, which is determined, is adjusted to the second mode of operation by the first mode of operation for virtual objects.
If check results instruction verification passes through, and the dbjective state of the virtual objects of server determination and the second operation shape State is consistent, then virtual client, which is determined, by virtual objects is adjusted to the second mode of operation by the first mode of operation, for this plus Blood operation, is successfully tested.
If S311, check results instruction verification do not pass through and/or dbjective state and the second mode of operation it is inconsistent, keep The state of virtual objects is the first mode of operation.
If check results instruction verification do not pass through and/or dbjective state and the second mode of operation it is inconsistent, keep virtual right The state of elephant is the first mode of operation, BUG, test crash occurs in this operation.Optionally, disappearing for test crash is pushed to user Breath.
Automated testing method provided in this embodiment, game client obtain the agreement day generated when the first game of operation Will, virtual client parse agreement log according to default resolution rules, the agreement log after obtaining parsing, virtual visitor Operation logic of the family end according to the first game, the mode of operation of the corresponding virtual objects of agreement log after obtaining parsing, virtually Client sort out to the agreement log after parsing and be drawn according to preset test case and the mode of operation of virtual objects Point, virtual client obtains the first mode of operation of virtual objects in virtual client, and virtual client is according to the first operation shape State and the agreement log for sorting out division, determine that the second mode of operation of virtual objects, virtual client send out the first mode of operation Server is given, and receives the first message of server return, if check results instruction verification passes through, and dbjective state and described Second mode of operation is consistent, and virtual client, which is determined, is adjusted to the second mode of operation by the first mode of operation for virtual objects, if Check results instruction verification passes through, and dbjective state is consistent with second mode of operation, and virtual client determines will be virtual right As being adjusted to the second mode of operation by the first mode of operation, if check results instruction verification does not pass through and/or dbjective state and the Two modes of operation are inconsistent, and keeping the state of virtual objects is the first mode of operation, to be completed using virtual client to the The automatic test of one game improves testing efficiency, while realizing the reproduction to BUG.
Fig. 5 is the flow chart for the automated testing method that further embodiment of this invention provides, as shown in figure 5, the present embodiment Method may include:
S401, game client obtain the agreement log generated when the first game of operation.
The first request that S402, game client are sent according to virtual client, is sent to virtual client for agreement log End.
S403, virtual client parse agreement log according to default resolution rules, the agreement day after obtaining parsing Will.
It is corresponding virtual to obtain the agreement log after parsing according to the operation logic of the first game for S404, virtual client The mode of operation of object.
S405, virtual client are according to preset test case and the mode of operation of the virtual objects, after parsing Agreement log carry out classification division.
S406, virtual client obtain the first mode of operation of virtual objects in virtual client.
S407, virtual client determine the second mode of operation of virtual objects according to the first mode of operation and agreement log.
First mode of operation is sent to server by S408, virtual client.
First mode of operation is sent to client of watching by S409, server.
In the present embodiment, for the BUG on game picture, server can turn the first mode of operation of virtual objects Client of watching is issued, so as to show the performance situation of virtual objects in virtual client in client of watching.Optionally, it watches Client saves the performance of virtual objects in virtual client in a manner of prefixed time interval screenshot, alternatively, user is watching Client observes the performance of virtual objects in virtual client.Further, server virtual client can also be sent the Two modes of operation are transmitted to client of watching.
For example, it is had occurred when virtual objects hit building using carrier in virtual client and wears mould phenomenon, used Existing BUG reappears scheme, and one kind is difficult to reappear BUG out, and a kind of BUG reappears low efficiency, and in the present solution, virtual client Simulation client establishes communication by agreement log and server, and by client of watching to empty in virtual client Quasi- object is watched, and BUG reproduction efficiency is improved.
Those skilled in the art are it is to be understood that be illustratively above is referred to the first mode of operation and the second mode of operation Illustrate realization process of the invention, in practical applications, virtual client needs to repeat to send to server according to agreement log Mode of operation repeats the above process, until the agreement log is sent completely, that is, completes automatic test.
In the present embodiment, the specific implementation process of S401-S408 may refer to the associated description of embodiment illustrated in fig. 3, separately Above-mentioned S309-S311 can be executed after outer S409, details are not described herein again.
Automated testing method provided in this embodiment, game client obtain the agreement day generated when the first game of operation Will, virtual client parse agreement log according to default resolution rules, the agreement log after obtaining parsing, virtual visitor Operation logic of the family end according to the first game, the mode of operation of the corresponding virtual objects of agreement log after obtaining parsing, virtually Client sort out to the agreement log after parsing and be drawn according to preset test case and the mode of operation of virtual objects Point, virtual client obtains the first mode of operation of virtual objects in virtual client, and virtual client is according to the first operation shape State and the agreement log for sorting out division, determine that the second mode of operation of virtual objects, virtual client send out the first mode of operation Server is given, and receives the first message of server return, if check results instruction verification passes through, and dbjective state and described Second mode of operation is consistent, and virtual client, which is determined, is adjusted to the second mode of operation by the first mode of operation for virtual objects, if Check results instruction verification passes through, and dbjective state is consistent with second mode of operation, and virtual client determines will be virtual right As being adjusted to the second mode of operation by the first mode of operation, if check results instruction verification does not pass through and/or dbjective state and the Two modes of operation are inconsistent, and keeping the state of virtual objects is the first mode of operation, to be completed using virtual client to the The automatic test of one game, improves testing efficiency;Meanwhile by watch client to virtual objects in virtual client into Row is watched, and BUG reproduction efficiency is improved.
Fig. 6 is the structural schematic diagram for the virtual client that one embodiment of the invention provides, as shown in fig. 6, the present embodiment Virtual client 60 includes: to obtain module 601, determining module 602, processing module 603.
Module 601 is obtained, for obtaining the agreement log generated when the first game of operation from game client;
The acquisition module 601, is also used to obtain the first mode of operation of virtual objects in the virtual client;
Determining module 602, for according to the first mode of operation and agreement log, it is determined whether by virtual objects by described the One mode of operation is adjusted to the second mode of operation, and second mode of operation is next state of first mode of operation;
Processing module 603, for if so, the virtual objects are adjusted to second behaviour by first mode of operation Make state.
Optionally, the determining module 602, is specifically used for:
According to first mode of operation and the agreement log, the second mode of operation of virtual objects is determined;
According to first mode of operation and second mode of operation, it is determined whether by the virtual objects by described One mode of operation is adjusted to second mode of operation.
Optionally, the determining module 602, is specifically used for:
First mode of operation is sent to server, and receives the first message that the server returns, described the One message includes the dbjective state of the check results and the virtual objects to first mode of operation;
If the check results instruction verification passes through, and the dbjective state is consistent with second mode of operation, determines The virtual objects are adjusted to second mode of operation by first mode of operation.
Optionally, the determining module 602, is specifically used for:
If check results instruction verification do not pass through and/or the dbjective state and second mode of operation it is different It causes, keeping the state of the virtual objects is first mode of operation.
Optionally, the acquisition module 601, is also used to:
According to default resolution rules, the agreement log is parsed, the agreement log after obtaining parsing.
Optionally, the acquisition module 601, is also used to:
The corresponding virtual objects of agreement log according to the operation logic of first game, after obtaining the parsing Mode of operation, the operation logic is used to characterize the operation order of first game.
The processing module 603, is also used to:
According to preset test case and the mode of operation of the virtual objects, to the agreement log after the parsing into Row, which is sorted out, to be divided.
The virtual client of the present embodiment can be used for executing the technical side of virtual client in above-mentioned each method embodiment Case, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Fig. 7 be another embodiment of the present invention provides terminal structural schematic diagram, as shown in fig. 7, the terminal of the present embodiment 70 may include: memory 701 and processor 702.Wherein, memory 701 can for example be connected with processor 702 by bus It connects.
The memory 701, for storing program code;
The processor 702, for calling said program code to execute virtual client in above-mentioned each method embodiment Technical solution.
Fig. 8 is the structural schematic diagram for the server that one embodiment of the invention provides, as shown in figure 8, the service of the present embodiment Device 80 includes: receiving module 801, determining module 802, sending module 803.
Receiving module 801, the first mode of operation of the virtual objects for receiving virtual client transmission;
Determining module 802 obtains check results for carrying out verification to first mode of operation, and determines described virtual The dbjective state of object;
Sending module 803, for sending first message to the virtual client, the first message includes to described the The dbjective state of the check results of one mode of operation and the virtual objects.
Optionally, the sending module 803, is also used to:
First mode of operation is sent to client of watching, so that the client of watching operates shape for described first State is shown.
The server of the present embodiment can be used for executing the technical solution of server in above-mentioned each method embodiment, in fact Existing principle is similar with technical effect, and details are not described herein again.
Fig. 9 be another embodiment of the present invention provides server structural schematic diagram, as shown in figure 9, the clothes of the present embodiment Business device 90 may include: memory 901 and processor 902.Wherein, memory 901 and processor 902 can for example pass through bus Connection.
The memory 901, for storing program code;
The processor 902, for calling said program code to execute the technology of server in above-mentioned each method embodiment Scheme.
Figure 10 is the structural schematic diagram for the game client that one embodiment of the invention provides, as shown in Figure 10, the present embodiment Game client 100 include: obtain module 101, sending module 102.
Module 101 is obtained, for obtaining the agreement log generated when the first game of operation;
Sending module 102, the first request for being sent according to virtual client, the agreement log is sent to virtually Client.
The game client of the present embodiment can be used for executing the technical side of game client in above-mentioned each method embodiment Case, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Figure 11 be another embodiment of the present invention provides terminal structural schematic diagram, as shown in figure 11, the end of the present embodiment End 110 may include: memory 111 and processor 112.Wherein, memory 111 and processor 112 can for example pass through bus Connection.
The memory 111, for storing program code;
The processor 112, for calling said program code to execute game client in above-mentioned each method embodiment Technical solution.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes: read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various It can store the medium of program code.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (19)

1. a kind of automated testing method, which is characterized in that be applied to virtual client, comprising:
The agreement log generated when the first game of operation is obtained from game client;
Obtain the first mode of operation of virtual objects in the virtual client;
According to the first mode of operation and agreement log, it is determined whether virtual objects are adjusted to second by first mode of operation Mode of operation, second mode of operation are next state of first mode of operation;
If so, the virtual objects are adjusted to second mode of operation by first mode of operation.
2. the method according to claim 1, wherein described according to first mode of operation and the agreement day Will, it is determined whether the virtual objects are adjusted to the second mode of operation by first mode of operation, comprising:
According to first mode of operation and the agreement log, the second mode of operation of virtual objects is determined;
According to first mode of operation and second mode of operation, it is determined whether grasp the virtual objects by described first Second mode of operation is adjusted to as state.
3. according to the method described in claim 2, it is characterized in that, described grasp according to first mode of operation with described second Make state, it is determined whether the virtual objects are adjusted to second mode of operation by first mode of operation, comprising:
First mode of operation is sent to server, and receives the first message that the server returns, described first disappears Breath includes the dbjective state of the check results and the virtual objects to first mode of operation;
If the check results instruction verification passes through, and the dbjective state is consistent with second mode of operation, determines institute It states virtual objects and second mode of operation is adjusted to by first mode of operation.
4. according to the method described in claim 3, it is characterized by further comprising:
If check results instruction verification do not pass through and/or the dbjective state and second mode of operation it is inconsistent, protect The state for holding the virtual objects is first mode of operation.
5. according to the method described in claim 4, it is characterized in that, it is described from game client obtain operation the first game when produce After raw agreement log, further includes:
According to default resolution rules, the agreement log is parsed, the agreement log after obtaining parsing.
6. according to the method described in claim 5, it is characterized in that, the basis presets resolution rules, to the agreement log It is parsed, after the agreement log after obtaining parsing, the method also includes:
According to the operation logic of first game, the behaviour of the corresponding virtual objects of agreement log after obtaining the parsing Make state, the operation logic is used to characterize the operation order of first game.
7. according to the method described in claim 6, it is characterized in that, the operation logic according to first game, obtains After the mode of operation of the corresponding virtual objects of agreement log after the parsing, further includes:
According to preset test case and the mode of operation of the virtual objects, the agreement log after the parsing is returned Class divides.
8. a kind of automated testing method, which is characterized in that be applied to server, comprising:
Receive the first mode of operation of the virtual objects that virtual client is sent;
Verification is carried out to first mode of operation and obtains check results, and determines the dbjective state of the virtual objects;
First message is sent to the virtual client, the first message includes the check results to first mode of operation With the dbjective state of the virtual objects.
9. according to the method described in claim 8, it is characterized in that, the method also includes:
First mode of operation is sent to client of watching.
10. a kind of automated testing method, which is characterized in that be applied to game client, comprising:
Obtain the agreement log generated when the first game of operation;
The first request sent according to virtual client, is sent to virtual client for the agreement log.
11. a kind of virtual client characterized by comprising
Module is obtained, for obtaining the agreement log generated when the first game of operation from game client;
The acquisition module is also used to obtain the first mode of operation of virtual objects in the virtual client;
Determining module, for according to the first mode of operation and agreement log, it is determined whether operate virtual objects by described first State is adjusted to the second mode of operation, and second mode of operation is next state of first mode of operation;
Processing module, for if so, the virtual objects are adjusted to second mode of operation by first mode of operation.
12. a kind of server characterized by comprising
Receiving module, the first mode of operation of the virtual objects for receiving virtual client transmission;
Processing module obtains check results for carrying out verification to first mode of operation, and determines the virtual objects Dbjective state;
Sending module, for sending first message to the virtual client, the first message includes to first operation The dbjective state of the check results of state and the virtual objects.
13. a kind of game client characterized by comprising
Module is obtained, for obtaining the agreement log generated when the first game of operation;
Sending module, the first request for being sent according to virtual client, is sent to virtual client for the agreement log.
14. a kind of terminal characterized by comprising memory and processor;
The memory, for storing program code;
The processor, for calling said program code to execute the automatic test as described in claim 1-7 any one Method.
15. a kind of server characterized by comprising memory and processor;
The memory, for storing program code;
The processor, for calling said program code to execute automated testing method as claimed in claim 8 or 9.
16. a kind of terminal characterized by comprising memory and processor;
The memory, for storing program code;
The processor, for calling said program code to execute automated testing method as claimed in claim 10.
17. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program on the readable storage medium storing program for executing;The meter Calculation machine program when executed, realizes the automated testing method as described in claim 1-7 any one.
18. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program on the readable storage medium storing program for executing;The meter Calculation machine program when executed, realizes automated testing method as claimed in claim 8 or 9.
19. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program on the readable storage medium storing program for executing;The meter Calculation machine program when executed, realizes automated testing method as claimed in claim 10.
CN201910227885.1A 2019-03-25 2019-03-25 Automatic testing method and device Active CN109985387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910227885.1A CN109985387B (en) 2019-03-25 2019-03-25 Automatic testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910227885.1A CN109985387B (en) 2019-03-25 2019-03-25 Automatic testing method and device

Publications (2)

Publication Number Publication Date
CN109985387A true CN109985387A (en) 2019-07-09
CN109985387B CN109985387B (en) 2022-10-04

Family

ID=67131399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910227885.1A Active CN109985387B (en) 2019-03-25 2019-03-25 Automatic testing method and device

Country Status (1)

Country Link
CN (1) CN109985387B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732576A (en) * 2021-01-08 2021-04-30 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface
CN113485924A (en) * 2021-07-01 2021-10-08 网易(杭州)网络有限公司 Game testing method, device, equipment and storage medium
CN112732576B (en) * 2021-01-08 2024-06-04 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721239A (en) * 2016-01-18 2016-06-29 网易(杭州)网络有限公司 Game test method, device and game system
CN107678970A (en) * 2017-10-20 2018-02-09 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
CN108111464A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 A kind of data verification method and device
CN108255727A (en) * 2018-01-18 2018-07-06 网易(杭州)网络有限公司 Data receiver, sending method and device test system, storage medium
US20180276111A1 (en) * 2017-03-23 2018-09-27 Electronic Arts Inc. Mock services for software infrastructures

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721239A (en) * 2016-01-18 2016-06-29 网易(杭州)网络有限公司 Game test method, device and game system
CN108111464A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 A kind of data verification method and device
US20180276111A1 (en) * 2017-03-23 2018-09-27 Electronic Arts Inc. Mock services for software infrastructures
CN107678970A (en) * 2017-10-20 2018-02-09 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment
CN108255727A (en) * 2018-01-18 2018-07-06 网易(杭州)网络有限公司 Data receiver, sending method and device test system, storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732576A (en) * 2021-01-08 2021-04-30 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface
CN112732576B (en) * 2021-01-08 2024-06-04 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface
CN113485924A (en) * 2021-07-01 2021-10-08 网易(杭州)网络有限公司 Game testing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109985387B (en) 2022-10-04

Similar Documents

Publication Publication Date Title
CN108763012A (en) Interim card information acquisition method, device and terminal
CN107018191B (en) Method and device for controlling game
CN110555028A (en) data display method and device
CN110013672B (en) Method, device, apparatus and computer-readable storage medium for automated testing of machine-run games
CN109445949A (en) A kind of data collection system and collecting method
CN108228444B (en) Test method and device
CN105263128B (en) A kind of method and apparatus of Batch sending short message
CN106201854A (en) A kind of server load method of testing based on socket and system
CN105975396A (en) Generating method and system for automated testing case
CN109062807B (en) Method and device for testing application program, storage medium and electronic device
CN112799925A (en) Data acquisition method and device, electronic equipment and readable storage medium
CN115510454A (en) Game testing method and device, electronic equipment and storage medium
CN110362460A (en) A kind of application program capacity data processing method, device and storage medium
CN113342515A (en) Method, device and equipment for selecting server-free computing resources and storage medium
CN109985387A (en) Automated testing method and device
CN113064816B (en) Testing device and testing method for programmable logic device software
CN114064465A (en) Stability testing method based on Linux cloud platform
CN113238935A (en) Application testing method, system, device, medium, and computer program product
CN111752837A (en) View base system test method, device, equipment and storage medium
CN110737900A (en) Webpage function testing method and device, server and computer readable storage medium
CN110008107A (en) Test method, device and the computer readable storage medium of application
CN114185773A (en) Program testing method, program testing device, electronic equipment and computer readable storage medium
CN108829824B (en) Resource processing method and device in internet operation activity
CN112087347A (en) Game server testing method and system
CN111930608A (en) Automatic testing device and method based on process control

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
GR01 Patent grant
GR01 Patent grant