CN112765041B - Game automation testing method and device and electronic equipment - Google Patents

Game automation testing method and device and electronic equipment Download PDF

Info

Publication number
CN112765041B
CN112765041B CN202110157733.6A CN202110157733A CN112765041B CN 112765041 B CN112765041 B CN 112765041B CN 202110157733 A CN202110157733 A CN 202110157733A CN 112765041 B CN112765041 B CN 112765041B
Authority
CN
China
Prior art keywords
game
tested
test
page
terminal
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.)
Active
Application number
CN202110157733.6A
Other languages
Chinese (zh)
Other versions
CN112765041A (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.)
Shanghai Hard Link Network Technology Co ltd
Original Assignee
Shanghai Hard Link Network 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 Shanghai Hard Link Network Technology Co ltd filed Critical Shanghai Hard Link Network Technology Co ltd
Priority to CN202110157733.6A priority Critical patent/CN112765041B/en
Publication of CN112765041A publication Critical patent/CN112765041A/en
Application granted granted Critical
Publication of CN112765041B publication Critical patent/CN112765041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/3684Test management for test design, e.g. generating new test cases
    • 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

Abstract

The application discloses a game automation test method, a game automation test device and electronic equipment, wherein the method comprises the following steps: receiving a selection instruction of a test flow; acquiring each game page to be tested corresponding to the selected test flow according to the selection instruction; after matching each piece of test operation information corresponding to each game page to be tested one by one according to each game page to be tested, generating each test case according to each game page to be tested and each piece of test operation information, wherein each test case comprises the game page to be tested and the corresponding test operation information; and controlling the first terminal to execute the test operation of each game page to be tested according to each test case.

Description

Game automation testing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for automatically testing a game, and an electronic device.
Background
Currently, to improve game playability, the game is updated periodically or aperiodically. In the event of a game update, it will typically involve an update of the game page, i.e. an iteration of the game page. While game pages may affect other functions or processes of the game after iteration, corresponding function or flow tests of the game are often required after the game page is iterated.
The existing automatic game test mode is to perform full-flow test from the starting flow of the game according to the association relation among various flows or functions of the game. However, when the whole flow of the game is longer, a great amount of test time is required, and when the game service with a certain update iteration period faces the service main body flow stably, the test efficiency is too low.
Disclosure of Invention
The purpose of the application is to at least solve one of the technical problems existing in the prior art, and provide a game automation testing method, a game automation testing device and electronic equipment, so that the testing efficiency of game automation testing is improved.
The embodiment of the application provides a game automation testing method, which comprises the following steps:
receiving a selection instruction of a test flow;
acquiring each game page to be tested corresponding to the selected test flow according to the selection instruction;
after matching each piece of test operation information corresponding to each game page to be tested one by one according to each game page to be tested, generating each test case according to each game page to be tested and each piece of test operation information, wherein each test case comprises the game page to be tested and the corresponding test operation information;
And controlling the first terminal to execute the test operation of each game page to be tested according to each test case.
Further, the matching each piece of test operation information corresponding to each game page to be tested one by one according to each game page to be tested includes:
acquiring a page image of the game page to be tested, matching the page image with a control image material library, and determining the control type of a control in the game page to be tested;
and according to the control type, matching test operation information corresponding to the control type.
Further, the controlling the first terminal to execute the test operation of each game page to be tested according to each test case includes:
displaying the game page to be tested on the first terminal;
searching a coverage area of the control in the game page to be detected on the display screen of the first terminal;
and controlling the first terminal to execute corresponding test operation on the control according to the test case according to the coverage area.
Further, the controlling the first terminal to execute the test operation of each game page to be tested according to each test case includes:
displaying a plurality of game pages to be tested on the first terminal, and controlling the first terminal to simultaneously execute test operations of the game pages to be tested according to a plurality of test cases.
Further, the test operation information includes test decision information;
after the first terminal executes the test operation of each game page to be tested according to each test case, the first terminal further comprises:
and determining a test result of the game page to be tested according to the test judgment information.
Further, in an embodiment of the present application, the game automation test method further includes:
and forwarding the test results of the game pages to be tested to a second terminal.
Further, each test case is independent from each other.
Further, in an embodiment of the present application, the game automation test method further includes:
when detecting that the test operation of the game page to be tested is abnormal, controlling the first terminal to skip the corresponding test case.
Further, in an embodiment of the present application, there is also provided a game automation testing device, including:
the instruction receiving module is used for receiving a selection instruction of the test flow;
the page acquisition module is used for acquiring each game page to be tested corresponding to the selected test flow according to the selection instruction;
the data generation module is used for generating test cases according to the game pages to be tested and the test operation information after matching the test operation information corresponding to the game pages to be tested one by one, wherein the test cases comprise the game pages to be tested and the corresponding test operation information;
The page test module is used for controlling the first terminal to execute the test operation of each game page to be tested according to each test case.
Further, an embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed implements the game automation test method as described in the above embodiments.
Further, embodiments of the present application provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the game automation test method according to the above embodiments.
Compared with the prior art, the embodiment obtains the game page to be tested corresponding to the selected test flow according to the selection instruction of the test flow, matches the operation information corresponding to the game page to be tested according to the game page to be tested, generates the test case according to the game page to be tested and the operation information, controls the first terminal to execute the test operation of the game page to be tested according to the test case, does not need to test the whole flow of the game, reduces the required test time and improves the test efficiency.
According to the embodiment, the page image of the game page to be tested is obtained, the page image is matched with the control image material library to determine the control type of the control in the game page to be tested, the test operation information can be automatically obtained according to the test operation information corresponding to the control type matched control, the obtaining process is faster, and the obtaining result is more accurate.
According to the embodiment, the to-be-tested game page is displayed on the first terminal, and the coverage area of the control in the to-be-tested game page on the display screen of the first terminal is searched, so that the first terminal is controlled to execute corresponding test operation on the control in the coverage area, the test process can be applied to different types of first terminals, and the game automation test is more convenient to conduct.
According to the embodiment, the plurality of game pages to be tested are displayed on the first terminal, and the first terminal is controlled to simultaneously execute the test operation of the plurality of game pages to be tested, so that the test operation of the plurality of game pages to be tested can be run in parallel, and the efficiency of automatic game test is further improved.
After the test operation of the game page to be tested is executed in the embodiment, the test result of the game page to be tested is determined according to the test judgment information, so that the test result can be obtained more quickly and directly.
According to the embodiment, after the test result of the game page to be tested is determined, the test result is forwarded to the second terminal, so that the test result can be effectively monitored from other terminal equipment.
The test cases in the embodiment are mutually independent, so that the test cases are not interfered with each other, other game page errors to be tested or waste of test time caused by errors of a certain test case are effectively avoided, and automatic test can be performed more efficiently.
According to the embodiment, when the abnormal operation of the game page to be tested is detected, the first terminal is controlled to skip the corresponding test case, the operation of other test cases is not affected, and the efficiency of game automation test is further improved.
Drawings
The present application is further described below with reference to the drawings and examples;
FIG. 1 is a diagram of an application environment for a game automation test method in one embodiment;
FIG. 2 is a flow diagram of a method of automated game testing in one embodiment;
FIG. 3 is a diagram of an application environment for a game automation test method in another embodiment;
FIG. 4 is a block diagram of a game automation testing device in one embodiment;
fig. 5 is a block diagram of a computer device in one embodiment.
Detailed Description
Reference will now be made in detail to the present embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein the purpose of the accompanying drawings is to supplement the description of the written description section with figures, so that one can intuitively and intuitively understand each technical feature and overall technical scheme of the present application, but not to limit the scope of protection of the present application.
Currently, to improve game playability, the game is updated periodically or aperiodically. In the event of a game update, it will typically involve an update of the game page, i.e. an iteration of the game page. While game pages may affect other functions or processes of the game after iteration, corresponding function or flow tests of the game are often required after the game page is iterated.
The existing automatic game test mode is to perform full-flow test from the starting flow of the game according to the association relation among various flows or functions of the game. However, when the whole flow of the game is longer, a great amount of test time is required, and when the game service with a certain update iteration period faces the service main body flow stably, the test efficiency is too low. The test of the game functions or flows after the game page iteration generally tests whether the corresponding functions or flows can be normally realized after the game page iteration, and certain association relations exist among all the flows or functions in the game, for example, a login function is needed to be performed first and then a recharging function is needed to be performed, so that the existing game automatic test mode needs to test the functions or flows according to the order of the association relations.
In order to solve the above technical problem, as shown in fig. 1, an application environment diagram of a game automation test method in one embodiment is shown. Referring to fig. 1, the game automation test system includes a first terminal 110 and a server 120. The first terminal 110 and the server 120 are connected through a network. The first terminal 110 may be implemented as an independent terminal or a terminal cluster formed by a plurality of terminals. The server 120 may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers. The server 120 obtains a game page to be tested corresponding to the selected test procedure according to the selection instruction of the test procedure, matches operation information corresponding to the game page to be tested according to the game page to be tested, generates a test case according to the game page to be tested and the operation information, and controls the first terminal 110 to execute test operation of the game page to be tested according to the test case.
The game automation test method provided in the embodiments of the present application will be described and illustrated in detail below by means of several specific embodiments.
As shown in FIG. 2, in one embodiment, a game automation test method is provided. The embodiment is mainly exemplified by the method applied to computer equipment. The computer device may be specifically the server 120 of fig. 1 described above.
Referring to fig. 2, the game automation test method specifically includes the following steps:
s11, receiving a selection instruction of the test flow.
In this embodiment, the server receives a selection instruction of a test flow, where the test flow is a function of automatically testing a game or a process of running the game after the game page iterates. The functions may be one or more functions and the process may be part of a process. For example, after the game page of "song in cloud city" is updated, a process of implementing the login function of the game page or a process of verifying and receiving input login information and performing page skip during operation of "song in cloud city" is required to be tested. The selection instruction refers to an instruction for specifying a test flow to be tested, and the selection instruction may be in the form of a flag or a link. For example, the selection instruction is "ysczg-loadtest", which indicates that the implementation process of selecting the "song in cloud city" webpage login function is a test flow. In this embodiment, the selection instruction of the test procedure may be input to the server by the user, or may be automatically generated by the first terminal or other terminals other than the first terminal and then sent to the server.
S12, acquiring each game page to be tested corresponding to the selected test flow according to the selection instruction.
In this embodiment, the server obtains each game page to be tested corresponding to the selected test flow according to the test flow selected by the received selection instruction. The game pages to be tested are one or more pages corresponding to the test flow, for example, two game pages are needed for realizing the login function of 'song in the cloud city', and the two game pages comprise a login information input page and a game page which is jumped after the login information is verified successfully, namely a webpage 1 and a webpage 2. At this time, game pages corresponding to the implementation process of the login function of the 'song in the city of cloud' selected by the instruction are selected, namely two game pages to be tested are selected.
In this embodiment, the test flow selected by the selection instruction may include links or identifiers of the game pages to be tested corresponding to the test flow. For example, the game "song in the city of cloud" includes a process 1, a process 2 and a process 3, wherein the implementation process of the login function includes a process 1, and the identifiers "web1" and "web2" of the web page 1 and the web page 2 are stored in the process 1, and at this time, the test process, that is, the web pages of the game to be tested corresponding to the implementation process of the login function are the web page 1 and the web page 2. If the test flow includes flow 1 and flow 2, flow 2 includes identifications "web3" and "web4" for web page 3 and web page 4. At this time, the game web pages to be tested corresponding to the test flow are web page 1, web page 2, web page 3 and web page 4.
The server determines and acquires each game page to be tested corresponding to the test flow according to the identification or the link in the selected test flow.
S13, after matching each piece of test operation information corresponding to each game page to be tested one by one according to each game page to be tested, each test case is generated according to each game page to be tested and each piece of test operation information, wherein each test case comprises the game page to be tested and the corresponding test operation information.
In this embodiment, the server matches each piece of test operation information corresponding to each piece of game page to be tested according to each piece of game page to be tested corresponding to the selected test flow. The test operation information is an information set of operations to be performed on each corresponding game page to be tested in the test flow, and information corresponding to each operation in the information set can be in a parameter or identification form. And the corresponding relation between the game pages to be tested and the test operation information is one-to-one correspondence. For example, the game page to be tested is a webpage 1 and a webpage 2 with login functions realized in the 'song in the cloud' and the webpage 1 corresponds to test operation information 1, the test operation information 1 comprises information a and information b, and the information a and the information b respectively correspond to 2 input operations and 1 sliding operation; the webpage 2 corresponds to the test operation information 2, the test operation information 2 comprises information c, and the information c corresponds to 3 clicking operations.
In this embodiment, after matching each piece of test operation information corresponding to each piece of game page to be tested according to each piece of game page to be tested corresponding to the selected test flow, the server generates each test case according to each piece of game page to be tested and each piece of test operation information. The test case is used for displaying files of all the game pages to be tested and corresponding test operation information, the files can be in the form of tables, texts or folders, the files can contain the game pages to be tested and the test operation information corresponding to the game pages to be tested, and the files can contain the marks, links, original files or copied files of the game pages to be tested and the corresponding test operation information. The method of generating the test case according to the game page to be tested and the corresponding test operation information can be that the links of the game page to be tested and the identifiers of the corresponding test operation information are stored in a table, and the table is the test case of the game page to be tested and the corresponding test operation information; or storing the file of the game page to be tested and the file of the corresponding test operation information into a folder, wherein the folder is the test case of the game page to be tested and the corresponding test operation information.
For example, the game page to be tested is a webpage 1 and a webpage 2 with login functions realized in the 'song in the cloud' and the webpage 1 corresponds to test operation information 1, the test operation information 1 comprises information a and information b, and the information a and the information b respectively correspond to input operation and sliding operation; the web page 2 corresponds to the test operation information 2, the test operation information 2 includes information c, the information c corresponds to the clicking operation, then page links of the page 1 and the page 2, and corresponding input operation, sliding operation and click operation identifiers "input x 2", "slide x 1" and "click x 3" in the information a, the information b and the information c can be recorded into the table 1, and in the table 1, the links of the page 1 correspond to the input operation and the sliding operation identifiers "input x 2" and "slide x 1", the links of the page 2 correspond to the clicking operation identifiers "click x 3", and at this time the table 1 is a test example generated according to the login function to be tested game page and the corresponding test operation information realized in the song on cloud.
In one embodiment, according to each game page to be tested, matching each piece of test operation information corresponding to each game page to be tested one by one includes:
and acquiring a page image of the game page to be tested, matching the page image with a control image material library, and determining the control type of the control in the game page to be tested.
And according to the control type, matching test operation information corresponding to the control type.
In this embodiment, after acquiring a page image of a game page to be tested, the server matches the page image with a control image material library to determine a space type in the game page to be tested. The page image of the game page to be tested can be obtained in a page screenshot mode or a page source code obtaining mode. For matching the page image with the control image material library, the control image material library refers to a database storing images of various types of controls, the database can be a database in the server or a database in other servers, the controls refer to elements capable of operating in a webpage, and specifically can be areas capable of inputting fields and texts, buttons capable of clicking and selecting, sliding bars capable of sliding, and the like. And the server compares the page image with each control image in the control image material library, and confirms the control and the control type in the game page to be tested. In this embodiment, the control types include a chinese input type control, a digital input type control, a double click type control, a single click type control, a slide type control, and the like. The image expression forms of the control are input boxes, click buttons, sliding bars and the like, and the image expression forms of different types of controls are different, for example, the image expression forms of the double-click control and the single-click control are both click buttons, the double-click control is a circular click button, and the single-click control is a rectangular click button. Therefore, the server can acquire the page image of the game page to be tested in a page screenshot mode, then match with the input frame image, the click button image and the sliding bar image in the control image material library, and determine which control types of controls exist in the game page to be tested and the number of the control types of controls. In addition, the server can also acquire the page image of the game page to be tested by acquiring the page source code, at this time, the control image contained in the control image material library can be in the form of the source code, and the server compares the source code of the page image with the source code of each control image, so that the types of the controls contained in the game page to be tested and the quantity of the types of the controls are determined. In the present embodiment, the control type and the image expression form of the control type are not particularly limited.
After determining the control type of the control in the game page to be tested, the server matches test operation information corresponding to the control type according to the control type of the control. The control types and the test operation information have a one-to-one correspondence, for example, the test operation information corresponding to the double-click control is that the control is clicked for 2 times, and the test operation information corresponding to the single-click button is that the control is clicked for 1 time. In the present embodiment, the correspondence between the control type and the test operation information may be recorded in a table and the table is stored in the present server.
In the embodiment, the page image of the game page to be tested is obtained, the page image is matched with the control image material library to determine the control type of the control in the game page to be tested, the test operation information can be automatically obtained according to the test operation information corresponding to the control type matched control, the obtaining process is faster, and the obtaining result is more accurate.
S14, controlling the first terminal to execute the test operation of each game page to be tested according to each test case.
In this embodiment, the server sends each game page to be tested, each piece of test operation information corresponding to each game page to be tested, and each generated test case to the first terminal, and the server controls the first terminal to execute the test operation of each game page to be tested according to each test case after sending. The server can only send the generated test cases to the first terminal, and the server controls the first terminal to execute the test operation of each game page to be tested according to the test cases after sending. The first terminal may be an independent terminal or a terminal cluster formed by a plurality of terminals. The server controls the first terminal to execute the test operation of each test page, and the specific control mode can be that the server sends related pages and information and sends execution instructions, wherein the execution instructions are used for enabling the first terminal to execute the test operation of each game page to be tested. The execution instruction comprises a test operation to be executed and a game page to be tested corresponding to the test operation, and the test operation to be executed and the game page to be tested corresponding to the test operation contained in the execution instruction can be the test operation and the identification of the game page to be tested corresponding to the test operation or the test operation information and the game page file to be tested corresponding to the test operation. The server controls the first terminal to execute the test operation of each test page, and the server remotely controls the first terminal to execute the test operation of each test page in a specific control mode. Remote control is prior art and is not specifically limited herein.
In one embodiment, controlling the first terminal to execute a test operation of each game page to be tested according to each test case includes:
displaying a game page to be tested on a first terminal;
searching a coverage area of a control in a game page to be detected on a display screen of a first terminal;
and controlling the first terminal to execute corresponding test operation on the control according to the test case according to the coverage area.
In this embodiment, the server makes the to-be-tested game page display on the first terminal, and specifically, the server sends the to-be-tested game page, the test operation information corresponding to the to-be-tested game page, and the generated test case to the first terminal, and then the server sends a display instruction to control the first terminal to display the to-be-tested game page, where the display instruction may include the name or the identifier of the to-be-tested game page, and parameters of the display size and the display duration of the to-be-tested game page. For example, the display instruction is "show-web1-1280 x 960-20", which means that the first terminal is caused to display page 1, the display size is 1280 x 960, and display is performed for 20 seconds.
After the server controls the first terminal to display the game page to be tested, the server searches the coverage area of the control in the game page to be tested on the display screen of the first terminal. The server can identify and search the coverage area of each control type control in the game page to be detected on the first terminal display screen through an image identification mode, and the image identification mode identifies and searches part of the content in the image to belong to the prior art and is not repeated here. In this embodiment, the coverage area refers to coordinates of the control in the game page to be tested, for example, the coordinates of the four endpoints of the input box, the click button and the sliding bar can be searched to determine the coverage area where the control is located, and for constructing the coordinate axis with the game page to be tested, any position in the image can be used as the origin of coordinates to construct, and generally, the lower left corner or the center point of the page to be tested is used as the origin of coordinates.
After the server searches coverage areas of the controls in the game page to be tested, the server controls the first terminal to execute corresponding test operation on the controls according to the test operation information corresponding to the controls in the test case according to the coverage areas. The server controls the first terminal to execute the test operation of the controls in the test page, and the specific control mode can be that the server sends a control execution instruction, wherein the control execution instruction is used for enabling the first terminal to execute the test operation of each control in the game page to be tested. The control execution instruction comprises a test operation to be executed and a control corresponding to the test operation, and the test operation to be executed and the control corresponding to the test operation contained in the control execution instruction are test operations and coverage areas of the control corresponding to the test operations, namely coordinates of the control.
In the embodiment, the first terminal is controlled to execute the corresponding test operation on the control of the coverage area by displaying the game page to be tested on the first terminal and searching the coverage area of the control in the game page to be tested on the display screen of the first terminal, so that the test process can be suitable for the first terminals of different types, and the game automation test is more convenient to carry out.
In one embodiment, controlling the first terminal to execute a test operation of each game page to be tested according to each test case includes:
displaying a plurality of game pages to be tested on a first terminal, and controlling the first terminal to simultaneously execute the test operation of the game pages to be tested according to the test cases.
In this embodiment, the server makes the plurality of game pages to be tested display on the first terminal, and specifically, after the server sends the game pages to be tested, the test operation information corresponding to the game pages to be tested, and the generated test cases to the first terminal, the server sends a multi-page display instruction to control the first terminal to display the plurality of game pages to be tested, where the plurality of game pages to be tested are displayed in a split screen in a display screen of the first terminal, and the split screen mode is in the prior art and is not specifically limited herein. The multi-page display instruction may include the names or the identifiers of the plurality of game pages to be displayed, the display sizes and the parameters of the display time duration of the plurality of game pages to be displayed. For example, the display instruction is "show-web1-1280 x 480-20-web2-1280-480-20", which means that the first terminal is caused to display page 1 and page 2, the display sizes of the two pages are 1280 x 480, and the display time of the two pages is 20 seconds.
After the server controls the first terminal to display a plurality of game pages to be tested, the server controls the first terminal to execute the test operation of the game pages to be tested according to the test cases corresponding to the game pages to be tested. The server controls the first terminal to simultaneously execute the test operation in the plurality of test pages, and the specific control mode can be that the server sends a multi-page execution instruction, wherein the multi-page execution instruction is used for enabling the first terminal to execute the test operation of the plurality of game pages to be tested in a parallel mode. The multi-page execution instruction comprises a plurality of test game pages to be executed and test operations corresponding to the test game pages, and the multi-page execution instruction comprises identifiers of the plurality of test game pages to be executed and information of the test operations corresponding to the test game pages.
In this embodiment, by displaying a plurality of game pages to be tested on the first terminal and controlling the first terminal to simultaneously execute the test operations of the plurality of game pages to be tested, the test operations of the plurality of game pages to be tested can be run in parallel, thereby further improving the efficiency of automatic game test.
In one embodiment, the test operation information includes test decision information;
After the first terminal is controlled to execute the test operation of each game page to be tested according to each test case, the method further comprises the following steps:
and determining a test result of the game page to be tested according to the test judgment information.
In this embodiment, the test determination information is used to determine whether the result output after the first terminal executes the test operation of each game page to be tested is consistent with the expected output result. The test judgment information comprises expected output results after test operation of the game page to be tested is executed, and the test judgment information can be expressed in a program or code form. For example, the test determination information is a program for determining whether clicking a button after inputting login information will jump from page 1 to page 2. After the server controls the first terminal to execute the login information input of the page 1 and the test operation of clicking the button, the server compares whether the page 1 has a jump and whether the page after the jump is the page 2, if the jump is the page 2, the test result of the page 1 is normal, otherwise, the test result is abnormal.
In this embodiment, after the test operation of the game page to be tested is performed, the test result of the game page to be tested is determined according to the test determination information, so that the test result can be obtained more quickly and directly.
In one embodiment, as shown in fig. 3, an application environment diagram of the game automation test method in this embodiment is shown. Referring to fig. 3, the game automation test system includes a second terminal 130 in addition to the first terminal 110 and the server 120. The first terminal 110, the second terminal 130 and the server 120 are all connected through a network. The first terminal 110 may be implemented as an independent terminal or a terminal cluster formed by a plurality of terminals. The server 120 may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers. The second terminal 130 may be implemented as an independent terminal or a terminal cluster composed of a plurality of terminals. The server 120 obtains a game page to be tested corresponding to the selected test procedure according to the selection instruction of the test procedure, matches operation information corresponding to the game page to be tested according to the game page to be tested, generates a test case according to the game page to be tested and the operation information, and controls the first terminal 110 to execute test operation of the game page to be tested according to the test case. The second terminal 130 receives the test results of each game page to be tested forwarded by the server 120.
In this embodiment, the game automation test method further includes:
And forwarding the test results of the game pages to be tested to the second terminal.
The above-described game automation test method is applied to a computer device, which may be specifically the server 120 in fig. 3 described above.
In this embodiment, after determining the test results of the game pages to be tested, the server forwards the test results of the game pages to be tested to the second terminal. The second terminal may be an independent terminal or a terminal cluster formed by a plurality of terminals. The test results may be parameters, codes or files. The manner in which the server forwards the parameters, codes or files belongs to the prior art and is not described in detail herein.
In this embodiment, after determining the test result of the game page to be tested, the test result is forwarded to the second terminal, so that the test result can be effectively monitored from other terminal devices.
In one embodiment, the test cases are independent of each other.
In this embodiment, the test cases are independent of each other, that is, in the process that the server controls the first terminal to execute the test operation of each game page to be tested according to each test case, when an error occurs in a game page to be tested or the test operation in a certain test case, the process that the server executes the test operation of other game pages to be tested according to other test cases is not affected, and in the process that the server executes the test operation of other game pages to be tested according to other test cases, the test operation corresponding to the game page to be tested for which the error occurs or the test operation for the game page to be tested for which the error occurs is not executed.
In the embodiment, the test cases are mutually independent, so that the test cases are not interfered with each other, other game pages to be tested are effectively prevented from being in error or the test time is wasted due to the fact that a certain test case is in error, and the automatic test can be performed more efficiently.
In one embodiment, the game automation test method further comprises:
when detecting that the test operation of the game page to be tested is abnormal, controlling the first terminal to skip the corresponding test case.
In this embodiment, during the process of executing the test operation of the game page to be tested according to the case to be tested, the server detects the test operation of the game page to be tested, and when detecting that the test operation of the game page to be tested is abnormal, controls the first terminal to skip the corresponding test case. The server controls the first terminal to skip the corresponding test case, and the specific control mode can send an execution adjustment instruction to the server, where the execution adjustment instruction is used to make the first terminal stop executing the test operation of the current game page to be tested and start executing the test operation of other game pages to be tested. The execution adjustment instruction comprises a current test game page needing to stop executing the test operation and a game page to be tested needing to start executing the test operation, and the execution adjustment instruction comprises an identification of the current test game page needing to stop executing the test operation and an identification of the game page to be tested needing to start executing the test operation. For example, the server controls the first terminal to sequentially execute the test operations of the to-be-tested game page 1, the to-be-tested game page 2 and the to-be-tested game page 3, in the process of executing the test operation of the to-be-tested game page 1, wherein the test operation of the to-be-tested game page 1 is that a click button is clicked 4 times, when the server detects that the test operation of the to-be-tested game page 1 becomes that a slide bar is clicked 4 times, the server sends an execution adjustment instruction "stop-game web1-to-game web2" to the first terminal, and controls the first terminal to stop executing the test operation of the to-be-tested game page 1, and then starts executing the test operation of the to-be-tested game page 2. In this embodiment, the detection of the occurrence of an abnormality in the content of the test operation or the occurrence of an abnormality in the executed test operation by the server belongs to the prior art, and will not be described herein.
In the embodiment, when abnormal test operation of the game page to be tested is detected, the first terminal is controlled to skip the corresponding test case, the operation of other test cases is not affected, and the efficiency of automatic game test is further improved.
In the above embodiment, the game page to be tested corresponding to the selected test procedure is obtained according to the selection instruction of the test procedure, the operation information corresponding to the game page to be tested is matched according to the game page to be tested, and the test case is generated according to the game page to be tested and the operation information, so that the first terminal is controlled to execute the test operation of the game page to be tested according to the test case, the whole procedure of the game is not required to be tested, the required test time is reduced, and the test efficiency is improved.
In one embodiment, as shown in FIG. 4, there is provided a game automation test device comprising:
the instruction receiving module 101 is configured to receive a selection instruction of a test procedure.
The page obtaining module 102 is configured to obtain each game page to be tested corresponding to the selected test procedure according to the selection instruction.
The data generating module 103 is configured to generate each test case according to each to-be-tested game page and each test operation information after matching each test operation information corresponding to each to-be-tested game page one by one, where the test case includes the to-be-tested game page and the corresponding test operation information.
The page test module 104 is configured to control the first terminal to execute a test operation of each game page to be tested according to each test case.
In one embodiment, the data generation module 103 is further configured to:
acquiring a page image of a game page to be tested, matching the page image with a control image material library, and determining a control type of a control in the game page to be tested;
and according to the control type, matching test operation information corresponding to the control type.
In one embodiment, the data generation module 103 is further configured to:
displaying the game page to be tested on a first terminal;
searching a coverage area of a control in a game page to be detected on a display screen of a first terminal;
and controlling the first terminal to execute corresponding test operation on the control according to the test case according to the coverage area.
In one embodiment, the page test module 104 is further configured to:
displaying a plurality of game pages to be tested on a first terminal, and controlling the first terminal to simultaneously execute the test operation of the game pages to be tested according to the test cases.
In one embodiment, the test operation information includes test decision information.
The page test module 104 is further configured to:
after the first terminal is controlled to execute the test operation of each game page to be tested according to each test case, the test result of the game page to be tested is determined according to the test judgment information.
In one embodiment, the page test module 104 is further configured to:
and forwarding the test results of the game pages to be tested to the second terminal.
In one embodiment, the test cases are independent of each other.
In one embodiment, the page test module 104 is further configured to:
when detecting that the test operation of the game page to be tested is abnormal, controlling the first terminal to skip the corresponding test case.
In one embodiment, a computer apparatus is provided, as shown in FIG. 5, comprising a processor, a memory, a network interface, an input device, and a display screen connected by a system bus. The memory includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a game automation test method. The internal memory may also store a computer program that, when executed by the processor, causes the processor to perform the game automation test method. It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the game automation test device provided herein may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 5. The memory of the computer device may store the various program modules that make up the game automation test device. The computer program of each program module causes the processor to execute the steps in the game automation test method of each embodiment of the present application described in the present specification.
In one embodiment, there is provided an electronic device including: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed performs the steps of the game automation test method described above. The steps of the game automation test method herein may be the steps of the game automation test method of the above embodiments.
In one embodiment, a computer-readable storage medium is provided that stores computer-executable instructions for causing a computer to perform the steps of the game automation test method described above. The steps of the game automation test method herein may be the steps of the game automation test method of the above embodiments.
While the foregoing is directed to the preferred embodiments of the present application, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the present application, such changes and modifications are also intended to be within the scope of the present application.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.

Claims (9)

1. A method for automated testing of games, comprising:
receiving a selection instruction of a test flow, wherein one test flow corresponds to a part of a game running process; the selection instruction is used for designating a test flow to be tested;
acquiring each game page to be tested corresponding to the selected test flow according to the selection instruction;
After matching each piece of test operation information corresponding to each game page to be tested one by one according to each game page to be tested, generating each test case according to each game page to be tested and each piece of test operation information, wherein each test case comprises the game page to be tested and the corresponding test operation information;
controlling a first terminal to execute test operation of each game page to be tested according to each test case;
the first terminal executing test operation of each game page to be tested according to each test case comprises the following steps:
after sending the to-be-tested game pages, the test operation information corresponding to the to-be-tested game pages and the generated test cases to the first terminal, sending a multi-page display instruction, controlling the first terminal to display the to-be-tested game pages, wherein the multi-page display instruction comprises names or identifications of the to-be-tested game pages, parameters of display sizes and display time of the to-be-tested game pages, and the first terminal is controlled to display the to-be-tested game pages, and then sending a multi-page execution instruction, wherein the multi-page execution instruction is used for enabling the first terminal to execute the test operation of the to-be-tested game pages in a parallel mode, the multi-page execution instruction comprises the to-be-executed test operation corresponding to the to-be-tested game pages, and the identification of the to-be-tested game pages and the information of the test operation corresponding to the to-be-tested game pages.
2. The automated game testing method of claim 1, wherein the matching each piece of test operation information corresponding to each game page to be tested according to each game page to be tested comprises:
acquiring a page image of the game page to be tested, matching the page image with a control image material library, and determining the control type of a control in the game page to be tested;
and according to the control type, matching test operation information corresponding to the control type.
3. The automated game testing method of claim 2, wherein the controlling the first terminal to execute the test operation of each game page to be tested according to each test case comprises:
displaying the game page to be tested on the first terminal;
searching a coverage area of the control in the game page to be detected on the display screen of the first terminal;
and controlling the first terminal to execute corresponding test operation on the control according to the test case according to the coverage area.
4. A game automation test method according to any one of claims 1 to 3, wherein the test operation information includes test decision information;
After the first terminal executes the test operation of each game page to be tested according to each test case, the first terminal further comprises:
and determining a test result of the game page to be tested according to the test judgment information.
5. The automated game testing method of claim 4, further comprising:
and forwarding the test results of the game pages to be tested to a second terminal.
6. The automated game testing method of claim 1, wherein each of the test cases is independent of the other test cases.
7. The automated game testing method of claim 6, further comprising:
when detecting that the test operation of the game page to be tested is abnormal, controlling the first terminal to skip the corresponding test case.
8. An automated game testing apparatus, comprising:
the instruction receiving module is used for receiving a selection instruction of a test flow, and one test flow corresponds to a part of game running process; the selection instruction is used for designating a test flow to be tested;
the page acquisition module is used for acquiring each game page to be tested corresponding to the selected test flow according to the selection instruction;
The data generation module is used for generating test cases according to the game pages to be tested and the test operation information after matching the test operation information corresponding to the game pages to be tested one by one, wherein the test cases comprise the game pages to be tested and the corresponding test operation information;
the page test module is used for sending the to-be-tested game pages, the test operation information corresponding to the to-be-tested game pages and the generated test cases to the first terminal, sending a multi-page display instruction, controlling the first terminal to display the to-be-tested game pages, wherein the multi-page display instruction comprises names or identifications of the to-be-tested game pages, parameters of display sizes and display time of the to-be-tested game pages, and the first terminal is controlled to display the to-be-tested game pages, and then sending a multi-page execution instruction, wherein the multi-page execution instruction is used for enabling the first terminal to execute the test operation of the to-be-tested game pages in a parallel mode, the multi-page execution instruction comprises the to-be-tested game pages and the test operation corresponding to each to-be-tested game page, and the identification of the to-be-tested game pages and the information of the test operation corresponding to each to-be-tested game page.
9. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the game automation test method according to any one of claims 1 to 7 when executing the program.
CN202110157733.6A 2021-02-04 2021-02-04 Game automation testing method and device and electronic equipment Active CN112765041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110157733.6A CN112765041B (en) 2021-02-04 2021-02-04 Game automation testing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110157733.6A CN112765041B (en) 2021-02-04 2021-02-04 Game automation testing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112765041A CN112765041A (en) 2021-05-07
CN112765041B true CN112765041B (en) 2024-04-05

Family

ID=75704981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110157733.6A Active CN112765041B (en) 2021-02-04 2021-02-04 Game automation testing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112765041B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114463730B (en) * 2021-07-15 2023-07-14 荣耀终端有限公司 Page identification method and terminal equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016095554A1 (en) * 2014-12-19 2016-06-23 广州博冠信息科技有限公司 Test method, device and system for application
CN107861862A (en) * 2017-06-27 2018-03-30 陆金所(上海)科技服务有限公司 UI automated testing methods, device and computer-readable recording medium
CN109446069A (en) * 2018-09-26 2019-03-08 平安普惠企业管理有限公司 Compatibility test method, device, computer equipment and medium
KR101996009B1 (en) * 2018-11-22 2019-07-03 넷마블 주식회사 Method for supporting composing testcase, server and user terminal for performing the same
CN110013672A (en) * 2019-04-19 2019-07-16 腾讯科技(成都)有限公司 Method, unit and the computer readable storage medium of the automatic test of game for machine operation
CN110457200A (en) * 2018-05-08 2019-11-15 腾讯科技(上海)有限公司 A kind of method for generating test case and its equipment, storage medium, electronic equipment
CN110457218A (en) * 2019-08-07 2019-11-15 Oppo广东移动通信有限公司 Game engine test method, device, storage medium and electronic equipment
CN111400184A (en) * 2020-03-17 2020-07-10 腾讯科技(深圳)有限公司 Game testing method, device, system, equipment and cloud platform
CN111782317A (en) * 2020-06-12 2020-10-16 京东数字科技控股有限公司 Page testing method and device, storage medium and electronic device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7316006B2 (en) * 2003-12-18 2008-01-01 International Business Machines Corporation Embedding keys into test data
US20130263090A1 (en) * 2012-03-30 2013-10-03 Sony Online Entertainment Llc System and method for automated testing
US10783057B2 (en) * 2018-11-21 2020-09-22 Sony Interactive Entertainment LLC Testing as a service for cloud gaming

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016095554A1 (en) * 2014-12-19 2016-06-23 广州博冠信息科技有限公司 Test method, device and system for application
CN107861862A (en) * 2017-06-27 2018-03-30 陆金所(上海)科技服务有限公司 UI automated testing methods, device and computer-readable recording medium
CN110457200A (en) * 2018-05-08 2019-11-15 腾讯科技(上海)有限公司 A kind of method for generating test case and its equipment, storage medium, electronic equipment
CN109446069A (en) * 2018-09-26 2019-03-08 平安普惠企业管理有限公司 Compatibility test method, device, computer equipment and medium
KR101996009B1 (en) * 2018-11-22 2019-07-03 넷마블 주식회사 Method for supporting composing testcase, server and user terminal for performing the same
CN110013672A (en) * 2019-04-19 2019-07-16 腾讯科技(成都)有限公司 Method, unit and the computer readable storage medium of the automatic test of game for machine operation
CN110457218A (en) * 2019-08-07 2019-11-15 Oppo广东移动通信有限公司 Game engine test method, device, storage medium and electronic equipment
CN111400184A (en) * 2020-03-17 2020-07-10 腾讯科技(深圳)有限公司 Game testing method, device, system, equipment and cloud platform
CN111782317A (en) * 2020-06-12 2020-10-16 京东数字科技控股有限公司 Page testing method and device, storage medium and electronic device

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
Web软件探索性增量式测试方案的研究与实践;王朝;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20160315(第03期);I138-2589 *
Wuji: Automatic Online Combat Game Testing Using Evolutionary Deep Reinforcement Learning;Yan Zheng等;《2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)》;20200109;771-784 *
某网络游戏自动化测试工具的设计与实现;陈明霞;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20150615(第06期);I138-86 *
网页游戏自动化测试框架的研究与实现;高欣;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20190815(第08期);I138-579 *
远程游戏自动化测试系统的设计与实现;康怡琳;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20080315(第03期);I138-181 *
面向Android手机应用的功能测试软件的设计与实现;万木林;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20160215(第02期);I138-857 *

Also Published As

Publication number Publication date
CN112765041A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
CN108959059B (en) Test method and test platform
CN109800258B (en) Data file deployment method, device, computer equipment and storage medium
US8978009B2 (en) Discovering whether new code is covered by tests
CN105468529A (en) Accurate traversal method and apparatus for UI controls of android application
CN106326120B (en) Regression testing method and device for application software and electronic equipment
CN102567565B (en) Cable parameter processing method and system utilizing same
CN106326116B (en) The method and apparatus of product test
CN107678948B (en) Test case generation method, terminal and storage medium
CN107426041B (en) Method and device for analyzing command
CN107080945B (en) Method and device for testing artificial intelligence behaviors in game and electronic equipment
CN110554962A (en) Regression testing process covering method, server and computer readable storage medium
CN109101410B (en) Risk drive testing method and device and computer readable storage medium
CN105183658A (en) Software code testing method and device
US20170161181A1 (en) Testing support system, and testing support method
CN112765041B (en) Game automation testing method and device and electronic equipment
CN110990285A (en) UI automation test method and device
KR20210036167A (en) Test automation of application
CN112905441A (en) Test case generation method, test method, device and equipment
CN112988568A (en) Game testing method and device and electronic equipment
CN106557419B (en) Program testing method and device
CN115098362B (en) Page test method, page test device, electronic equipment and storage medium
CN113094257B (en) Application testing method and device and electronic equipment
CN112463596B (en) Test case data processing method, device and equipment and processing equipment

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