Game testing method and device, electronic equipment, storage medium and program product
By building a test script into the game client to obtain in-game data and generate control instructions to simulate user input, the problem of insufficient realism in existing game testing methods is solved, and more efficient and accurate game testing is achieved to adapt to the dynamic changes of modern games.
Patent Information
- Application Number
- CN202510947726.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-17
AI Technical Summary
Existing game testing methods are insufficient in terms of realism and are difficult to adapt to the dynamic changes and high-realism testing requirements of modern games, resulting in insufficient test coverage, high false positive rate, and high maintenance costs.
The game client uses a test script built into the game client to obtain in-game data, generate control instructions to simulate user input, and perform game match testing based on the in-game data. The round data is obtained to generate test results, thereby accurately obtaining the internal state of the game and simulating real user operations.
It improves the realism of game testing, reduces the false positive rate, improves test coverage and stability, and reduces maintenance costs.
Smart Images

Figure CN120803940A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of game development, and particularly relates to a game testing method and device, an electronic device, a storage medium and a program product. BACKGROUND
[0002] With the rapid development of game development technology, the complexity and iteration speed of game testing are also constantly improving. The traditional manual testing method is difficult to meet the efficient and accurate game testing demand, and therefore the automatic testing method has become an important link in the game development process. At present, the automatic testing method includes an automatic testing method based on image recognition, an automatic testing method based on recording and playback, and an automatic testing method for server logic. However, the current automatic testing method still has technical limitations in the fidelity of game testing, and it is urgent to optimize the game automatic testing method. SUMMARY
[0003] Therefore, the present disclosure provides a game testing method, device, electronic device, storage medium and program product to solve the problem of insufficient fidelity of game testing in the related art.
[0004] In a first aspect, the present disclosure provides a game testing method, which comprises:
[0005] obtaining in-game data through a test script built in a game client;
[0006] generating a control instruction based on the in-game data, and operating the game client to perform a game match test through the control instruction; the control instruction is used to simulate user input;
[0007] obtaining round data, which is used to generate a game test result.
[0008] In a second aspect, the present disclosure provides a game testing device, which comprises:
[0009] an obtaining module, configured to obtain in-game data through a test script built in a game client;
[0010] a control module, configured to generate a control instruction based on the in-game data, and to operate the game client to perform a game match test through the control instruction; the control instruction is used to simulate user input;
[0011] a test module, configured to obtain round data, which is used to generate a game test result.
[0012] In a third aspect, the present disclosure provides an electronic device, comprising a memory and a processor, which are communicatively connected with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the game testing method according to the first aspect or any one of the corresponding embodiments thereof.
[0013] In a fourth aspect, the present disclosure provides a computer readable storage medium, which stores computer instructions for causing a computer to perform the game testing method according to the first aspect or any one of the corresponding embodiments thereof.
[0014] In a fifth aspect, the present disclosure provides a computer program product, which comprises computer instructions for causing a computer to perform the game testing method according to the first aspect or any one of the corresponding embodiments thereof.
[0015] In the game testing method provided by the embodiments of the present disclosure, the in-game data of the game is obtained through the test script built in the game client, the internal state of the game is accurately obtained, the control instructions for simulating the user input are automatically generated according to the in-game data, the game client is operated through the control instructions to perform the game match test, the real user operation is simulated, and the game test result is generated. Compared with the method of relying on external observation or fixed input simulation which cannot directly access the internal logic data of the game, the embodiments of the present disclosure can deeply integrate the internal state of the game, thereby obviously improving the fidelity of the game test, better adapting to the dynamic changes and high-fidelity test requirements of modern games, reducing the game test misjudgment rate, improving the game test coverage rate and improving the game test stability, and reducing the maintenance cost of the game. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the specific embodiments or related art of the present disclosure, the drawings needed to be used in the specific embodiments or related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0017] Figure 1 is an architecture schematic diagram of a game testing system according to an embodiment of the present disclosure;
[0018] Figure 2 is a first flow schematic diagram of a game testing method according to an embodiment of the present disclosure;
[0019] Figure 3 is a second flow schematic diagram of a game testing method according to an embodiment of the present disclosure;
[0020] Figure 4is a schematic diagram of injury maximization in a preset decision influencing factor according to an embodiment of the present disclosure;
[0021] Figure 5 is a schematic diagram of survival target in a preset decision influencing factor according to an embodiment of the present disclosure;
[0022] Figure 6 is a schematic diagram of victory target in a preset decision influencing factor according to an embodiment of the present disclosure;
[0023] Figure 7 is a schematic diagram of show purpose in a preset decision influencing factor according to an embodiment of the present disclosure;
[0024] Figure 8 is an AI (Artificial Intelligence) decision tree schematic diagram according to an embodiment of the present disclosure;
[0025] Figure 9 is a third flow schematic diagram of a game testing method according to an embodiment of the present disclosure;
[0026] Figure 10 is a schematic diagram of input parameters of a test case according to an embodiment of the present disclosure;
[0027] Figure 11 is a workflow schematic diagram of a game testing system according to an embodiment of the present disclosure;
[0028] Figure 12 is a structural block diagram of a game testing device according to an embodiment of the present disclosure;
[0029] Figure 13 is a hardware structure schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present disclosure.
[0031] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario and the like of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.
[0032] The terms "first", "second", etc. are used only for descriptive purposes and should not be construed as implying or suggesting relative importance or an indicated number of the technical features. Thus, the features defined with "first", "second", etc. can include one or more of the features explicitly or implicitly. In the description of the present disclosure, the meaning of "a plurality" is two or more, unless otherwise explicitly and specifically limited.
[0033] In the image recognition-based automated testing method, the UI (User Interface) elements in the game are identified by computer vision or AI model, and the user operation is simulated. In the implementation process, the identification target needs to be defined in advance, such as buttons, blood bars, task prompts, etc., and a feature library or an AI model is constructed for matching, and then a preset operation path is executed, such as executing A1 corresponding to A after identifying A, and executing B1 corresponding to B after identifying B. However, this method only relies on screen pixel information, which cannot read the internal data of the game, resulting in insufficient test coverage. Moreover, in the case of frequent iteration of UI involved in each version update, activity interface adjustment, etc., each change needs to retrain the model or adjust the feature library, which is a large maintenance workload. For the case of relying on the feature library defined by artificial, it is difficult to cope with the dynamic changes of UI such as special effects and light changes, and there is a high problem of misrecognition rate. Moreover, the logic defined by artificial cannot adapt to the changes of game logic, and the test case reuseability is low; for the case of relying on AI model, there is a problem of high calculation delay in the scene with high real-time requirement, and a large amount of labeled data is needed to train the model, resulting in high test cost. In addition, the decision-making process of the AI model is often difficult to explain, and when the test fails, it is difficult to determine whether it is a game logic problem or an AI model recognition error, and the debugging difficulty is high.
[0034] In the recording and playback-based automated testing method, the game needs to be operated by artificial and the input sequence is recorded to record the user operation, and the input is accurately played back according to the fixed time sequence during testing. However, in the case that the frame rate of the test device and the input delay difference may cause the operation time sequence to be disordered, the operation may fail. In the case of network delay, network fluctuation may cause the operation time sequence during recording to be inconsistent with the actual environment, resulting in test failure. Moreover, the operation mode of recording and playback is often highly consistent, such as fixed coordinate clicking or the same time interval, which is easy to be judged as "robot behavior" by the game anti-cheat mechanism, resulting in account ban or test interruption. In addition, if random events such as monster position refreshing and random prop dropping occur in the game, the recording script may fail, and this method cannot handle branch logic such as dialogue options and random tasks, and can only handle linear processes. It can be seen that this method cannot adapt to dynamic content.
[0035] The automatic testing method for server logic, i.e., the automatic testing method based on a protocol level, directly communicates with the game server by the testing device, simulates a client protocol request, and verifies the game server logic. The method needs to parse the game communication protocol, construct a test case, and then send it to the game server to verify whether the response of the game server is as expected. The testing device used in the method directly sends a protocol package representing an "attack instruction" or a "movement request" operation to the game server, which skips the UI rendering, operation feedback, and other front-end links, and thus cannot verify the front-end logic error problems such as button click non-response, cannot verify the problems such as skill special effect loss or animation frame loss, and cannot verify the problem that the client data of the testing device is not synchronized with the game server. It can be seen that the method cannot simulate real user behavior. Moreover, the method can only verify the game server logic and cannot cover the user experience problems such as operation delay caused by client frame rate reduction or touch area adaptation error or UI performance inconsistency of multiple terminals (including PC terminal / mobile terminal / host terminal). The method cannot verify the logic executed by the local client, for example, cannot verify whether the battle damage calculation is as expected. It can be seen that the range of the method is relatively narrow. In addition, the game communication protocol is frequently updated, so the method needs to continuously parse the protocol structure provided by the server, and has problems such as high maintenance cost.
[0036] In summary, the related art often needs to rely on external observation or fixed input simulation, which belongs to "external" testing, cannot directly access the internal logic data of the game, causes the testing process to be inconsistent with the real user experience, is difficult to find front-end interaction problems, has insufficient testing coverage, is easy to misjudge, has poor dynamic adaptability, is difficult to cope with the random changes of game content, and needs frequent manual adjustment of testing logic, which has high long-term maintenance cost. Therefore, the game testing method provided by the related art is difficult to adapt to the dynamic changes and high-fidelity testing requirements of modern games.
[0037] As an optional application scenario of the embodiments of the present disclosure, as Figure 1As shown, the game testing system includes at least one computer 102, at least one terminal 103 and at least one server 104. The computer 102 and the terminal 103 are connected to the server 104 through a network respectively, and the computer 102 and the terminal 103 are also connected through a network. The network involved in the embodiments of the present disclosure can be a wireless network and / or a wired network, examples of which include but are not limited to an intranet, a local area network, the Internet, a wide area network, a mobile communication network and a combination thereof. The computer 102 and the terminal 103 can be collectively referred to as terminal equipment, which can be specifically a smart phone, a tablet computer, a notebook computer, a palm computer, or a desktop computer, a game console, a smart television, a smart wearable device, a vehicle-mounted terminal, a VR (Virtual Reality) device, an AR (Augmented Reality) device, etc. The server 104 can be a stand-alone physical server, a server cluster or a distributed system, or a cloud server providing cloud services. In the embodiments of the present disclosure, the tester 101 operates the computer 102, so that the tester 101 can issue a test task and check a running state to the terminal 103 through the computer 102. In the embodiments, the computer 102 and the terminal 103 can specifically communicate through an intranet HTTP (Hypertext Transfer Protocol) for RPC (Remote Procedure Call) communication. The terminal 103 is configured to report test data to the server 104 according to an executed test task. The computer 102 communicates with the server 104 to confirm a test task state, access test data and generate a test report through the computer 102.
[0038] According to the embodiments of the present disclosure, a game testing method is provided. It should be noted that the steps shown in the flowchart can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.
[0039] In the embodiments, a game testing method is provided, which can be used in the terminal, Figure 1 is a flowchart of a game testing method according to the embodiments of the present disclosure, as Figure 2 shown, the flow includes the following steps:
[0040] In step S201, in-game data is obtained through a test script embedded in a game client.
[0041] Specifically, the game client obtains the in-game data through a test script built in the game client in response to a test case sent by the game control terminal. The game client is arranged on the terminal, i.e., the current test device, and the game control terminal is arranged on the computer. The test case can be sent to the game client by the game control terminal or other electronic devices. The number of test cases can be one or more.
[0042] Before the game test is performed, the test script is built in the installation package of the game to be tested. After the game is successfully installed on the terminal, the game client is obtained. At this time, the test script is built in the game client. The game control terminal can assign test tasks to multiple game clients. The game control terminal assigns test tasks by sending corresponding test cases to the game client. The test case is used to trigger the test script to execute. If the game is not started, the game client is triggered to start and enter the corresponding level of the target to be tested. If the game has started, the game is triggered to enter the corresponding level of the target to be tested. The in-game data is specifically the internal data of the game, for example, including but not limited to character attribute data, task status, and battle value.
[0043] In step S202, control instructions are generated based on the in-game data, and the game client is operated by the control instructions to perform the game match test. The control instructions are used to simulate user input.
[0044] After the game enters a match in the game in the embodiment, the control instructions are generated based on the optimal solution of the game victory from the user's perspective according to the current in-game data. The control instructions operate the game client to perform the game match test, which is equivalent to the user input control process of the game, i.e., the battle operation.
[0045] The user involved in the present disclosure can be considered as a player. The user input simulated by the control instructions can specifically include but is not limited to player screen clicking, player screen sliding, mouse clicking, or keyboard input, and other operations that can be performed by the player on the game.
[0046] In step S203, round data is obtained. The round data is used to generate a game test result.
[0047] In the embodiment, the terminal can obtain the round data from the game client or receive the round data returned by the game client, and report the round data to the game server. The game server arranged in the game server can be used to generate a game test result based on the analysis of the round data.
[0048] In a complete intra-game battle, i.e., a game match, a plurality of rounds are included, and after the decision of each round is completed and the simulation of user input is completed, the round data is saved, the round data includes battle data, and the battle data includes but is not limited to decision operation related data, simulation input operation related data, and caused result related data, etc. The game test result represents the verification result of the function test corresponding to the current test case, for example, whether the life of the character is less than 30% to automatically trigger the life-saving skill, the number of attacks required to defeat the BOSS (boss) or a certain target, etc.
[0049] The game server is used for rapid defect positioning and attribution, and can generate a game test report through the game server or the game control terminal, for example, through the game server to display the test case that runs an error in a separate file list, and through the file number to quickly locate how many times the defect occurs in ten thousand test cases.
[0050] The embodiment provides a game automatic test method, which no longer depends on external observation or fixed input simulation, but obtains intra-game data through a test script built in a game client, realizes accurate acquisition of an internal state of the game, automatically generates control instructions for simulating user input according to the intra-game data, and executes a game match test through the control instructions to operate the game client, realizes simulation of real user operation, uploads round data to a game server for analysis and generation of a game test result. Compared with a method that depends on external observation (such as a screen image) or fixed input simulation and cannot directly access game internal logic data, the embodiment of the disclosure can deeply integrate the internal state of the game, has higher test accuracy and efficiency, obviously improves the fidelity of game testing, better adapts to dynamic changes of modern games and high-fidelity test requirements, and can obviously reduce a game test misjudgment rate, improve a game test coverage rate, improve game test stability, and reduce a game maintenance cost.
[0051] In the embodiment, a game test method is provided, which can be used for the terminal, Figure 3 is a flowchart of the game test method according to the embodiment of the disclosure, as Figure 3 shown, the flowchart includes the following steps:
[0052] Step S301, intra-game data is obtained through a test script built in a game client. For details, refer to step S201 of the embodiment shown in Figure 2 , which will not be described here again.
[0053] Step S302, control instructions are generated based on the intra-game data, and a game match test is executed through the control instructions to operate the game client; the control instructions are used to simulate user input.
[0054] Specifically, the above step S302 includes:
[0055] Step S3021, generating a plurality of decision paths according to the in-game data, the decision paths representing the selectable operations of the user.
[0056] The selectable operations refer to the game operations that the user can select or is allowed to select, and each decision path corresponds to one or more control instructions.
[0057] Based on directly reading the in-game data to determine the game operations that the user can select or is allowed to select, and then performing game testing, the logic can be accurately verified, for example, the "accumulation value of secret skill" and "board elimination state" in a certain match-3 game, wherein the "accumulation value of secret skill" refers to the value of energy or resources accumulated by the user in the game through the use of a specific behavior or skill, which is used to release a special skill (e.g., "secret skill"), and the "board elimination state" refers to the different input possibilities that can achieve the elimination of three or more same colored pieces in a continuous manner in a match-3 game based on the current layout of the board; therefore, the decision algorithm for determining the control instructions in the embodiment can be based on real data, rather than the transcribed results based on image recognition in the related art, and the decision efficiency and stability are improved, and the code amount is saved by more than 70% compared to the code design based on image recognition.
[0058] Step S3022, determining the score of each decision path in the plurality of decision paths.
[0059] For the plurality of decision paths, the same preset rules are generally used to score to determine the score of each decision path. The preset rules may, for example, include but are not limited to rules based on maximum damage, rules based on victory targets, rules based on survival targets, or combinations of at least two rules, etc. If the rules based on maximum damage are taken as an example, the damage value caused by the control instructions corresponding to each decision path is analyzed, and the greater the damage value, the higher the score, or in some embodiments, the damage value is directly used as the score, and the score determination manner based on the rules based on victory targets and the rules based on survival targets uses similar logic.
[0060] In some optional embodiments, the above step S3022 includes determining the score of each decision path on one preset decision influencing factor, or the average value or weighted average value of the scores on a plurality of preset decision influencing factors.
[0061] The preset decision influencing factor refers to a factor influencing the task target of the game character, and the preset decision influencing factor includes one or more of damage maximization, survival target, victory target, and performance purpose. For the score of each decision path, the embodiment can consider one preset decision influencing factor, or can consider at least two preset decision influencing factors. The performance purpose refers to a factor influencing user operation, such as a game playing mechanism, team cooperation, or audio-visual experience.
[0062] As shown in Figure 4 For example, taking damage maximization as an example, the damage formula design of the actual game to be tested needs to be considered, for example, for a three-in-a-row game, when considering damage maximization according to the size of the chessboard eliminated by the user, the three-in-a-row operation with the largest number of eliminations in the current chessboard and the movement mode of the chess pieces in the chain elimination need to be found out, and the character skill is released at the right time according to the order of buff (gain effect) and the charging efficiency of the secret skill, that is, the decision path with the highest score is determined, so that the user decision input can be simulated from a higher and more user-oriented perspective, rather than mechanically or recordedly performing invalid battle test.
[0063] As shown in Figure 5 For example, taking the survival target (HP, Health Points) as an example, the damage formula design of the actual game to be tested also needs to be considered, for example, for a three-in-a-row game, when considering the survival target, the movement mode of the chess piece with the largest generation possibility needs to be found out, and the decision path with the highest score is determined by comprehensively considering the trigger timing of the healing skill, so as to realize simulation from a more realistic user input perspective and improve the fidelity of the battle test.
[0064] As shown in Figure 6 For example, taking the victory target as an example, for a three-in-a-row game, the movement mode of the chess piece with the largest possibility can be determined from the number of rounds and the three-in-a-row elimination state, that is, the decision path with the highest score is determined, to be closer to the input of the real user.
[0065] As shown in Figure 7 For example, taking the performance purpose as an example, for a three-in-a-row game, the movement mode of the chess piece with the largest possibility can be determined from the perspective of triggering a specific character action and combining a specific character arrangement, that is, the decision path with the highest score is determined, to be closer to the input of the real user.
[0066] As shown in Figure 8 In some optional embodiments, the AI decision tree is built according to the decision path of the user, and the decision path of the user is generally based on the above Figures 4 to 7The selectable AI types in this embodiment include damage-maximizing AI, inefficient AI, and performance AI. The parameters for selecting the AI type can be sent from the game controller to the game client during the RPC call process. Damage-maximizing AI uses complex calculations to achieve optimal damage output. Inefficient AI uses simple logic processing, prioritizing ultimate skills over other random selections. Performance AI can use a balanced strategy to prioritize ultimate skills and focus on ultimate skill recharge efficiency.
[0067] In some optional implementations, taking a match-3 game as an example, after a round starts in the game client, if the selected AI type is a damage-maximizing AI, the character type is first determined based on the ultimate damage variable, for example, life type or attack type, and the score of each decision path is calculated, that is, the value corresponding to each elimination method is calculated. The calculation method that can be used in this embodiment is: ultimate charge % × (damage amount / character attribute value), where the character attribute value = life value (life type) or attack power (attack type), so that the solution with the maximum product value can be selected, that is, the decision path with the largest score is selected. Among them, Ultimate Charge % refers to the percentage of preparation progress of the ultimate skill (ultimate skill), which indicates the filling degree of the player's energy tank or charge tank; Damage Amount refers to a numerical indicator that measures the impact of attacks, skills or environmental hazards on the target; Character Attribute Value refers to a set of quantitative values that describe the inherent characteristics and abilities of game characters, which are used to determine the performance and interaction results of the characters in the game; Health Value (Life Type) refers to a numerical indicator used in the game to quantify the survivability of characters or units, representing the total amount of damage that the individual can withstand before being eliminated, or can be described as a survival target; Attack Power (Attack Type) is usually defined in the game as a numerical attribute, which indicates the potential or strength of a character, unit or weapon to cause damage to the enemy when attacking.
[0068] In some optional implementations, taking the match-3 game as an example, if the selected AI type is low-efficiency AI, it is determined whether there is a secret skill. If there is a secret skill, the secret skill is released. If there is no secret skill, the elimination method is randomly selected.
[0069] In some optional implementations, taking the match-3 game as an example, if the selected AI type is performance AI, it is determined whether there is a secret skill. If there is a secret skill, the secret skill is released. If there is no secret skill, the elimination method with the most charged secret skills is selected.
[0070] For different target users, different decision difficulties can be used in the embodiment, for example, for novice users, the maximum damage can be maximized as the main decision influencing factor, and for veteran users, the survival target and the victory target can be considered as the main decision influencing factor. In specific implementation, the related parameters for difficulty decision can be passed to the test script through test cases, so that the game test is more targeted; when simulating the user input decision tree, that is, the AI decision tree, the optimal solution of each target is explored from the perspective of actual user decision, so that when the test cases input different test cases corresponding to different target user groups, the corresponding decision tendency is made.
[0071] The process of determining the decision path in the embodiment is more in line with the thinking process of real users, and can intelligently respond to the occurrence of game environment changes such as game random events or network delays, for example, game random events such as chessboard refreshing, differences between the charging properties of the role and the skill characteristics of the field affecting the release timing of part of the role's big moves, or changes in game UI content caused by network delays, and can adapt to game logic changes. It can be seen that the dynamic adaptability of the embodiment is stronger, can adapt to dynamic UI content, and has high reusability of test cases; compared with the situation that the test method based on image recognition needs to continuously adjust the feature library or train the AI model, compared with the situation that the test method based on recording and playback needs to re-record the script, and compared with the situation that the test method for server logic needs to be reverse engineered, the embodiment can better adapt to the rapid iteration of the game, thereby significantly reducing the maintenance cost.
[0072] In step S3023, the decision path with the highest score is selected from the plurality of decision paths, and a control instruction corresponding to the decision path with the highest score is generated.
[0073] In the embodiment, the decision path with the highest score represents the action that is currently optimal from the perspective of real users, and is used to further implement the function of simulating user input.
[0074] Assuming that the control instruction is represented by a function FuncA, and taking a mobile game as an example, compared with the way of triggering the single-click action function FuncA after the user clicks the device screen, the embodiment can directly call the function FuncA according to the decision path, that is, generate the control instruction corresponding to the decision path, realize unified input interface design and in-terminal script control, the operation is consistent with the real user behavior, avoids interference of the anti-cheating mechanism, and thereby solves the problem of weak game state perception ability caused by the "external hanging" test in the related art.
[0075] In this embodiment, the script for decision-making and generating control instructions is built into the game client, which is an intelligent decision engine and can directly access the game data in the game session through object access or memory access. The intelligent decision engine can adjust the strategy in real time according to the game state, for example, the strategy of "putting down when the spell is full" and the strategy of "releasing the spell of the healing role according to the blood volume of the teammates in proportion". Therefore, the intelligent decision engine can have higher role intelligence and be more consistent with the operation link of advanced players. When the game UI changes, the content of the in-game battle decision of this embodiment will not be affected, and the interface level user input simulation is based. Compared with the conventional scheme, the image feature library does not need to be adjusted or the script needs to be re-recorded, so the maintenance cost of this embodiment can be significantly reduced.
[0076] Compared with the game automatic test method relying on image recognition or recording playback and other external simulation inputs, the game test method provided in this embodiment can more accurately match and conform to the real user operation based on the selection of the decision path consistent with the user's thinking habit and the generation of the corresponding control instruction, and the operation mode is highly consistent with the user input, thereby avoiding the problem of being easily disturbed by the anti-cheating system and even misjudged as "robot behavior" to the greatest extent.
[0077] It can be seen that the decision-making process of this embodiment needs to refer to part of the in-game data, such as buff, spell charge value, and chessboard style. Since the decision-making script of this embodiment is also built into the game client, the game state of the single game can be directly obtained through the data structure access and encryption and decryption mechanism of the single process itself, so as to avoid the situation that it is difficult to obtain the game state in the "peripheral" automatic code writing mode in the related art and the semantic translation error caused by the image recognition mode. Compared with the game test method based on image recognition, the image processing performance consumption is obviously saved, and the decision-making efficiency is greatly improved. In this embodiment, the decision-making parameter is obtained by using the data of the in-game process, which only needs a millisecond-level response, and the data error situation is avoided, thereby significantly improving the stability and program response rate of the game test.
[0078] In step S303, round data is obtained, and the round data is used to generate a game test result. For details, please refer to Figure 2 The step S203 of the embodiment shown will not be described here.
[0079] In this embodiment, a game test method is provided, which can be used for the terminal, Figure 9 is a flowchart of the game test method according to the embodiment of the disclosure, as Figure 9 shown, the flowchart includes the following steps:
[0080] In step S901, in-game data is obtained through a test script built into a game client.
[0081] The step S901 includes:
[0082] The step S9011, under the local network environment, receives the test case based on the mode of remote procedure call, and calls the target application programming interface of the game client according to the test case.
[0083] Specifically, the test case includes instruction parameters, which can be used to call the target application programming interface, and indicate the occurrence of a game event, so as to indicate the corresponding executable game operation. The game event can include a game start event, an event of entering a target level after the game starts, etc. The test case also includes scene parameters for testing, which match the target game scene corresponding to the test case. The scene parameters are necessary parameters in the game testing process, and will not be described in detail in this embodiment.
[0084] The local network environment is specifically a wireless local network environment, and the terminal running the game client and the computer running the game control terminal communicate through a wireless network. Specifically, the target API (Application Programming Interface, Application Programming Interface) can be called by the instruction parameters configured in the test case, that is, the input interface is called. The target API can specifically include but is not limited to game client startup, game running core battle play, game operation (such as releasing a big move, etc.) in the game running battle process, and other functional interfaces that can be triggered by an automated test script.
[0085] This embodiment is adapted in the game client, including integrating a unified input interface and an open internal data access API for test script calling. Specifically, the test script and the game code support operation instruction issuing and state returning. The game client accepts the internal network RPC call of the game control terminal, so that the call can be made under the condition that the device is determined and the input is trusted, thereby avoiding the influence of unsafe factors such as test code externalization and untrusted device attacks; the decision engine in the test script can generate corresponding operation strategies according to the AI level, which is used to simulate the operation thinking and decision-making of users in the actual game playing process.
[0086] The step S9012 uses the test script to obtain the local data through the target application programming interface.
[0087] The test script is built into the game client, so that the API of the game internal data is opened to the test script, that is, the target application programming interface is opened to the test script, and the test script obtains the local data of the game through the target API.
[0088] The game control terminal in the embodiment can realize low-delay and high-realistic remote control based on the RPC calling mode, support dynamic adjustment of test strategies, and control the game client to obtain in-room data through a target API. It can be seen that the embodiment can directly obtain internal game data, has better realism in the game test process, has higher game test coverage, and more accurate game verification. The game state sensing capability of the embodiment is strong, and the game test effect is good. In addition, if a single game control terminal is used to manage a large number of game clients through a traditional method, a virtual machine or a multi-device input stream needs to be used in the game client to overcome the problem of IO (Input Output) quantity limitation. However, this method has high code complexity, and often requires high computing power of the game control terminal, which is easy to reach the performance bottleneck of the game control terminal. The game control terminal in the embodiment does not need to perform complex logical operations, and a game control terminal can efficiently manage the automatic test tasks of a large number of game clients. It can be seen that the embodiment can support multi-device concurrent test function, has higher game test efficiency, and the test efficiency is improved by more than 5 times compared with the traditional scheme due to the improvement of code performance efficiency of decision and interaction. The local area network provided in the embodiment is an internal network local area network, and can be equipped with an internal network judgment filtering mechanism to avoid the situation that the corresponding RPC interface is actually accessed by external users, improve the security, and ensure the stability of the game test process.
[0089] In some optional embodiments, before step S9011, the game test method further includes: converting the test case in the original format into a test case in a target format, and sending the test case in the target format to the game client.
[0090] Specifically, when the game control terminal schedules game clients on different terminals to perform game testing through the RPC mode, the test case in the target format issued by the game control terminal is specifically an automatic case execution statement. The test case in the original format is convenient for game developers or related personnel to edit or adjust.
[0091] The game control terminal can convert the test case in the original format into a test case in the target format. The embodiment can realize the advantage that the control code and the RPC link are platform-independent, can support PC, platforms with Android or iOS operating systems, is convenient for expanding testing of games on different device terminals, and has the advantages of strong expansibility and the like.
[0092] In some optional embodiments, the test case in the original format is an Excel file.
[0093] When designing test cases, relevant parameter contents can be input into the table according to actual needs of game testing, such as "character formation", "character attribute", "level ID (Identity Document)", and the like.
[0094] As shown in Figure 10 , the input to the game control terminal is an Excel case, which can include but is not limited to the following sub-items: level ID, resource ID (Identity Document) used, character / team details, enemy configuration, and part of the test switch, and the like. According to the test points needed in a battle, the parameters of the variables can be parameterized, and then the parameterized variables are used as columns input in the Excel case, for example, Figure 10 each column illustrates the level ID, character list (such as character 1, character 2, character 3, character 4), level (such as level 1, level 2, level 3, level 4), and star number (such as star number 1, star number 2, star number 3, star number 4), and a "click to add a bar" control is set, thereby realizing fast, formulaic, and comparative input or output of case rows. The game control terminal is used to analyze the tabular data, that is, to analyze the Excel case, for example, the table database of Python (Paisen) can be used to read the parameters in the Excel case and serialize, for example, format into Lua statements, and through the way of internal network RPC call, convert into parameters in the calling statement of the game client RPC interface, thereby calling the RPC interface. For the game client, the total number of execution times input by the game control terminal for a single test task can be accepted.
[0095] The embodiment saves the test case through the table file, uses the efficient table management and formula management mode, improves the efficiency of test case design, and can quickly create a case copy, and the parameter content is what you see is what you get, and the time consumption of case maintenance is shortened from 8 hours / once update in the traditional scheme to 0.5 hours / once update. Moreover, the tabular case management mode supports non-technical personnel to participate in test case design, for example, game planning related personnel to participate in test case design, thereby reducing the communication cost between technical personnel and non-technical personnel. Based on the input or output mode of the table file, the embodiment of the disclosure can be compatible with the existing tool chain (Jenkins) in the game industry, and is convenient for integration into the CI / CD (Continuous Integration, continuous integration; Continuous Delivery / Deployment, continuous delivery or deployment) process of software development.
[0096] In step S902, a control instruction is generated based on the local data, and the game client is operated to execute the game session test through the control instruction. The control instruction is used to simulate user input. For details, please refer to Figure 3Step S302 of the illustrated embodiment, which will not be repeated here.
[0097] Step S903, obtaining round data, the round data being used to generate the game test result. For details, please refer to Figure 3 Step S303 of the illustrated embodiment, which will not be repeated here.
[0098] In some optional embodiments, after the game match ends, the game test method further comprises: obtaining game result data, and analyzing the round data and the game result data to generate the game test result.
[0099] Optionally, after the game match ends, the game client reports the game result data to the game server, and the game server is used to analyze the round data and the game result data to generate the game test result.
[0100] Among them, at the end of the match, the game client will additionally upload the overall data of the entire match to the game server, and the overall data of the entire match can include the game result data, which can include but is not limited to battle victory result data, battle failure result data, etc.
[0101] The game server involved in the embodiments of the present disclosure is an automatic test server, which can be used to analyze the round data and the game result data generated during the game test process, verify whether the game execution logic meets the expectation, and analyze the test result combined with the game result, so that the test effect is more comprehensive and more accurate.
[0102] In some optional embodiments, after the game client is operated by the control instruction to execute the game match test, the game test method further comprises:
[0103] Step a1, obtaining a target log, the target log being used to record the generation process, execution process and triggering result of the control instruction and the called process of the game client.
[0104] Step a2, analyzing the round data, the game result data and the target log to generate the game test result.
[0105] The game client reports the target log to the game server, and the target log is used to record and store the generation process, execution process and triggering result of the control instruction and the process of the RPC call of the game client by the game control end; the game server is used to analyze the round data, the game result data and the target log to generate the game test result.
[0106] Specifically, the game server obtains round data reported at each step in the execution process of the game client, and obtains target logs generated in the execution process of the game client, so that the game client state (whether alive) and the instruction corresponding state (whether stuck) can be determined according to the round data and the target logs in combination with the game result data, to facilitate quick review and bug discovery, and generate game test results. For example, the bug type and cause can be determined through regular search and feature search of the logs.
[0107] Compared with the time consumption problem caused by manual intervention in bug defect analysis and ticket submission, the embodiment can use the combination judgment mode of log related features and game state features in the process of judging game running abnormities, so as to realize the basic bug automatic classification function. The embodiment can also realize the analysis of error information, error time point, error account and operation record and the like on this basis.
[0108] In some optional embodiments, the game test method further includes:
[0109] Step b1, based on the way of remote procedure call, the screen recording instruction is recorded, and the interface of the game client is recorded to obtain video data.
[0110] The game client responds to the screen recording instruction sent by the game control terminal through remote procedure call, and records the interface of the game client to obtain video data.
[0111] The screen recording instruction is a RPC instruction, and the game control terminal controls the game client or the terminal where the game client is located to perform a screen recording action through the internal network RPC, so as to record the game interface in the game test process and obtain video data.
[0112] Step b2, analyzing the video data and target logs to identify errors occurring in the game test process.
[0113] The game client sends the video data to the game control terminal, and / or sends the video data to the game server.
[0114] After the game client records the game interface and obtains the recording data, the game client can send the video data to the game server and / or the game control terminal for storage and use. The game control terminal and / or the game server jointly analyze the video data and the target logs, so as to determine the time point of error occurrence, the performance before error occurrence and the previous operation steps through the combination of video monitoring and log fishing. The game test effect is good. The game client can delete the local recording data to reduce the storage space occupation.
[0115] In some optional embodiments, the game testing method further comprises: assembling the start-related parameters into a remote procedure call instruction, the remote procedure call instruction being used to reproduce the game testing process.
[0116] The remote procedure call instruction refers to a parameter combination script statement required to start a defined game battle.
[0117] The game control end is configured to assemble the start-related parameters into a remote procedure call instruction according to the game client start.
[0118] In the game client start, the start-related parameters are saved and assembled into a callable statement, for example, an RPC statement. The start-related parameters include but are not limited to specific user ID or level setting, running environment, graphic rendering parameter, and network configuration parameter.
[0119] In the embodiment, the RPC statement can be saved, and the saved RPC statement can be sent to the game service end for storage.
[0120] Through the saving of the RPC instruction, the consistency of the test parameters (for example, the test number of times, the test level ID, the test card ID, the timeout time, the level, the star level, the attack, the defense, the blood volume, and the attribute of all battle uses of the spell charging of each role) and the consistency of the intermediate process version are ensured, so as to reproduce the same operation path and test content. For the game client, the socket (socket) listening can be opened on a specific port of the game client, and the instruction code text can be accepted by using the socket plus the self-owned internal network permission verification mode, and the received remote code call can be run in the string conversion command (Dostring) mode of the Lua statement. Thus, the embodiment can reproduce the RPC call process, and achieve the technical purposes of reproducing the same operation steps and error scene.
[0121] In some optional embodiments, the game testing method further comprises: analyzing the game testing results corresponding to the preset number of test cases to determine the test cases with running errors and display the test cases with running errors through a preset mode, the preset mode including a table form and / or a webpage form.
[0122] The game client can be configured to send the game testing results corresponding to the preset number of test cases to the game service end, and the game service end can be configured to analyze the preset number of game testing results and display the test cases with running errors through a preset mode.
[0123] The preset number can be several thousand or even tens of thousands, and is configured according to the specific game testing scene.
[0124] This embodiment can generate a game test report for representing the game test results, quickly display the defect content through the game test report in table form and web page form, quickly classify the defects, and process data through pivot tables and other methods to improve data processing efficiency.
[0125] In some optional implementations, video recording, logs, tabular result display, and RPC reproduction methods can be combined to quickly locate defects, achieve a higher degree of automation, and improve game testing results.
[0126] like Figure 11 As shown, the game control terminal involved in the embodiment of the present disclosure is a Python automation script control terminal, and can be run on a PC configured with a Python environment, for scheduling RPC instructions of game clients of different execution devices, thereby issuing automated use case execution statements corresponding to Excel. The game client runs on a terminal, which can be a mobile terminal equipped with an Android operating system or an iOS operating system, or the terminal can be a PC, using an intranet test package containing customized scripts, and the decision algorithm used in the aforementioned embodiment and the open function of RPC that simulates user input are built into the game client. The game server of this embodiment is a Python server, and can be deployed on a server containing a Redis (Remote Dictionary Server, remote dictionary service) database. The server is a device equipped with a Linux operating system, which is used to receive the round data reported by the game client and store it in the database.
[0127] Taking the three-elimination game as an example, the game control terminal is used to receive Excel use case input and format the Excel use case into Lua statements. The game control terminal serves as an automated test console and sends Lua statements as test cases to the game client via the intranet RPC method. One game control terminal can generally support 30 or more game clients. In the software code design itself, this embodiment adopts the solution of Python automated unittest (an automated unit testing framework). According to the design rules of unit testing, a test case class Base (base class) is abstracted. After that, the test case class on three platforms (PC, iOS, Android) can inherit this Base class. The functions implemented in Base can include RPC calls, polling confirmation status, function before use case execution, function after use case execution, log upload and analysis, battle data statistics and analysis, and error cause analysis. Among them, the test case can be used to limit the specific scenarios and specific parameters of the test script running as an automatic battle script, and can be used for testers to clearly define the object of the current test and the expected test points.
[0128] The game client is configured to receive a test script sent by the game control terminal through an internal network RPC call, so that the test script in the script layer enters a battle interface. The test script is configured to judge an elimination state, save an elimination step and result, obtain in-game detailed data, execute a decision tree algorithm, call a player-level input interface, and then report round data to a game server as an automated test server. The test script is configured to provide and expose relevant API interfaces, which specifically include but are not limited to a round data uploading interface, a battle entering interface, a round data log statistical interface, a chessboard state obtaining interface, a current in-game data obtaining interface, an optimal operation chess piece calculating interface, and a simulated operation chess piece interface. The test script is configured to obtain in-game data after the game enters a battle state, make an operation decision, control and promote a battle process, and save and upload round data and battle data. For an elimination game, the test script needs to move chess pieces to form an eliminable state according to a current chessboard style. For example, a decision scheme used can have the following logic: preferentially releasing a character's divine skill, preferentially using special chess pieces (bombs, crosses, etc.), and preferentially eliminating a three-elimination that can cause more chess pieces to be eliminated. The decision steps can be: analyzing a current chessboard state, finding a path that can be operated by a user through the chessboard state, for example, coordinate A can be clicked, coordinates B and C can be exchanged to trigger a three-elimination, and character D can release a divine skill. Then, according to a decision priority, the highest-scoring action in the operable path can be selected (such as releasing D's divine skill). Next, the player-level input interface is called, the game is operated by executing a control instruction, for example, clicking a chess piece, dragging and exchanging chess pieces, clicking to release a divine skill, clicking to release a burst mode or switching a target enemy, etc.
[0129] The game server receives the round data reported by the game client through the data processing interface and performs data warehousing, for example, saves the received round data to the Redis database. The game client can also be used for battle result reporting. The game server receives the battle result reported by the game client through the data processing interface and performs data warehousing, for example, the received battle result data is operated in the Redis database. Since the game itself is also a kind of software, its life cycle is controlled by the running device system itself. Once software flashback or software process logic deadlock occurs, the control right of the in-process script will be lost. Therefore, in addition to relying on the automatic testing of the client-side script, the game control terminal can also be used to measure the health degree of the current game running state in dimensions such as polling, video monitoring, data timeout detection, and process monitoring. Different candidate values of the above indicators can be used to judge the abnormal state classification of the current game software running, such as "stuck", "flashback", "battle failure", or "data loading error". Thus, the basic Bug classification can be automatically obtained, and the human consumption and post-processing of manual Bug classification are reduced. For example, the game control terminal is used for polling result waiting to judge whether the round data is timed out. If it is timed out, the game client is notified to report the bottom data to the game server. If it is not timed out, the polling result waiting continues. The game client can query the data of the Redis database of the game server. As an automatic test console, the game control terminal can be used to poll the data of the automatic test server. If it is judged that the program termination state is terminated, the game client is instructed to report the bottom data and the log to the automatic test server when the RPC calls the game client to end. The polling scheme can be realized by accessing the Redis database realized by the automatic test console. Since each normal decision round related data is uploaded to the database for warehousing, the update interval of the database for the task can be judged by updating the upload time corresponding to the test task ID in the data processing interface. If the update interval is too long and there is still no update, it can be judged that there is a decision exception or game crash or game flashback, so that the game control terminal can actively exit the polling and start the abnormal processing process. The game control terminal stores the battle result to the Redis database, ends the current use case, and then judges whether there is an exception. If there is an exception, the game client is notified to report the bottom data to the game server and perform post-processing such as alarm, log analysis, restart, and the next test case in the use case group composed of multiple test cases is started. In addition, the video monitoring scheme of the embodiment can be realized by using the dual mode of adb screenrecord (screen recording command) and PC screen recording to ensure that there is a video that can be traced back when running on multiple platforms.Among them, the mode of adbscreenrecord is encapsulated in the base class of use case execution, started in the pre-execution step of an automated use case, and the command process of the game control terminal is used to issue adb screenrecord operation commands in the form of a multi-process command line, start recording according to appropriate video compression rate parameters, and ensure that the process is closed in the post-processing process of the test case. After the video is synchronized back to the game control terminal, it is deleted, and of course it can also be stored in the Redis database, so as to ensure that the video recording process covers all test cases and does not occupy too much storage space of the terminal (such as smart phones, tablets, PCs, etc.).
[0130] Therefore, the embodiments of the present disclosure can provide an automatic game testing method based on Python outer control script and game client script interaction to simulate player operation. The core improvement of the embodiments of the present disclosure includes unified input interface and test script control in the terminal, and the RPC control of the input interface is opened for intranet LAN calling, so as to realize efficient acquisition of intranet information in the intranet for data processing and decision making, and the player terminal input mode is simulated by the unified input interface, so as to realize the difference between the actual operation and decision making of the player and the system call of the system screen touch, and avoid anti-cheating detection. The embodiments of the present disclosure can also automatically judge and identify Bug state by combining video, log and other multi-dimensional investigations, so as to quickly locate the defect problem and reason.
[0131] In the embodiments, a game testing device is also provided, which is used to implement the above embodiments and preferred embodiments, and will not be described herein. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.
[0132] The embodiments provide a game testing device, as shown in Figure 12 , comprising:
[0133] The acquisition module 1201 is configured to acquire intranet data by a test script built in the game client.
[0134] The control module 1202 is configured to generate a control instruction based on the intranet data, and to operate the game client to perform a game session test by the control instruction; and the control instruction is used to simulate user input.
[0135] The test module 1203 is configured to acquire round data, and the round data is used to generate a game test result.
[0136] In some optional embodiments, the control module 1202 comprises:
[0137] a path generation unit configured to generate a plurality of decision paths according to the local data, the decision paths representing optional operations of the user.
[0138] a score determination unit configured to determine a score of each of the plurality of decision paths.
[0139] an instruction generation unit configured to select a decision path with a highest score from the plurality of decision paths, and generate a control instruction corresponding to the decision path with the highest score.
[0140] In some optional embodiments, the score determination unit is specifically configured to determine the score of each decision path on a preset decision influencing factor, or an average value or a weighted average value of scores of the plurality of preset decision influencing factors.
[0141] The preset decision influencing factor refers to a factor influencing a task target of the game character.
[0142] In some optional embodiments, the obtaining module 1201 includes:
[0143] an interface calling unit configured to receive the test case based on a remote procedure calling manner in a local area network environment, and configured to call a target application programming interface of the game client according to the test case.
[0144] a data obtaining unit configured to obtain the local data through the target application programming interface by using a test script.
[0145] In some optional embodiments, the game testing apparatus further includes:
[0146] a format conversion module configured to convert a test case in an original format into a test case in a target format, and send the test case in the target format to the game client.
[0147] In some optional embodiments, the test case in the original format is a table file.
[0148] In some optional embodiments, the game testing apparatus further includes:
[0149] a result testing module configured to obtain game result data, and analyze the round data and the game result data to generate a game testing result.
[0150] In some optional embodiments, the game testing apparatus further includes:
[0151] a log obtaining module configured to obtain a target log, the target log being used to record a generation process, an execution process and a triggering result of the control instruction, and a called process of the game client.
[0152] The comprehensive analysis module is configured to analyze the round data, the game result data and the target log to generate a game test result.
[0153] In some optional embodiments, the game test apparatus further comprises:
[0154] The screen recording module is configured to record the interface of the game client based on the remote procedure call to obtain video data.
[0155] The video analysis module is configured to analyze the video data and the target log to identify errors occurring in the game test process.
[0156] In some optional embodiments, the game test apparatus further comprises:
[0157] The instruction assembly module is configured to assemble the starting related parameters into a remote procedure call instruction, and the remote procedure call instruction is used to reproduce the game test process.
[0158] In some optional embodiments, the game test apparatus further comprises:
[0159] The result analysis module is configured to analyze the game test results corresponding to the preset number of test cases to determine the test case with a running error and display the test case through a preset manner, and the preset manner includes a table form and / or a webpage form.
[0160] The game test apparatus provided by the embodiments of the present disclosure can execute the game test method provided by any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of the execution method. The further function description of each of the above modules and units is the same as that of the corresponding embodiments, and will not be repeated here.
[0161] Figure 13 FIG. 1 shows a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.
[0162] Reference will be made below in detail to Figure 13 FIG. 1 shows a structural schematic diagram of an electronic device suitable for implementing the electronic device in the embodiments of the present disclosure. The electronic device can include a processor (such as a central processor, a graphics processor, etc.) 1301, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1302 or loaded from a storage 1308 into a random access memory (RAM) 1303. In the RAM 1303, various programs and data required for the operation of the electronic device are also stored. The processor 1301, the ROM 1302, and the RAM 1303 are connected to each other through a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.
[0163] In general, the following devices can be connected to the I / O interface 1305: input devices 1306, including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 1307, including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage devices 1308, including, for example, a magnetic tape, a hard disk, and the like; and communication devices 1309. The communication devices 1309 can allow the electronic device to communicate wirelessly or via a wire with other devices to exchange data. Although Figure 13 An electronic device having various devices is shown, but it is understood that all of the shown devices are not required and more or fewer devices can be implemented instead.
[0164] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 1309, or installed from the storage devices 1308, or installed from the ROM 1302. When the computer program is executed by the processor 1301, the above-described functions defined in the game testing method of embodiments of the present disclosure are performed.
[0165] Figure 13 The electronic device shown is merely an example and should not impose any limitation on the functions and scope of use of embodiments of the present disclosure.
[0166] Embodiments of the present disclosure also provide a computer-readable storage medium, the above-mentioned method according to embodiments of the present disclosure can be implemented in hardware, firmware, or as computer code recorded in a storage medium, or as computer code originally stored in a remote storage medium or non-transitory machine-readable storage medium and downloaded through a network and to be stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general-purpose computer, a special-purpose processor, or programmable or special-purpose hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc.; further, the storage medium can also include a combination of the above types of storage. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, processor or hardware, the game testing method shown in the above embodiments is implemented.
[0167] Part of the present disclosure can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present disclosure can be invoked or provided. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0168] Although the embodiments of the present disclosure are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present disclosure, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A game testing method, characterized in that: The method comprises: Obtain in-game data through test scripts built into the game client; generating control instructions based on the in-game data, and operating the game client to perform game match testing using the control instructions; the control instructions are used to simulate user input; Obtain round data, where the round data is used to generate a game test result.
2. The method according to claim 1, characterized in that The generating of the control instruction based on the intra-office data includes: generating a plurality of decision paths according to the in-office data, wherein the decision paths represent optional operations of the user; determining a score for each of the plurality of decision paths; A decision path with the highest score is selected from the multiple decision paths, and the control instruction corresponding to the decision path with the highest score is generated.
3. The method according to claim 2, characterized in that Determining the score of each decision path in the plurality of decision paths comprises: Determining a score of each decision path on a preset decision influencing factor, or an average or weighted average of the scores on multiple preset decision influencing factors; Among them, the preset decision-making influencing factors refer to factors that affect the game character's task objectives.
4. The method according to any one of claims 1 to 3, characterized in that The in-game data is obtained through the test script built into the game client, including: In a local area network environment, receiving a test case based on a remote procedure call, and calling a target application programming interface of the game client according to the test case; The test script is used to obtain the internal data through the target application programming interface.
5. The method according to claim 4, characterized in that Before receiving the test case, the method further includes: The test case in the original format is converted into a test case in the target format, and the test case in the target format is sent to the game client.
6. The method according to claim 5, characterized in that The test case in the original format is a table file.
7. The method according to claim 1, characterized in that After the game is over, the method further includes: Obtain game result data, and analyze the round data and the game result data to generate the game test result.
8. The method according to claim 7, characterized in that After operating the game client to perform the game match test through the control instruction, the method further includes: Obtaining a target log, wherein the target log is used to record the generation process, execution process, and triggering result of the control instruction and the calling process of the game client; The round data, the game result data and the target log are analyzed to generate the game test result.
9. The method according to claim 8, characterized in that The method further comprises: Receiving a screen recording instruction based on a remote procedure call, recording the interface of the game client, and obtaining video data; The video recording data and the target log are analyzed to identify errors that occurred during the game testing process.
10. The method according to any one of claims 1 to 3 or 7 to 9, characterized in that The method further comprises: The startup related parameters are assembled into a remote procedure call instruction, and the remote procedure call instruction is used to reproduce the game testing process.
11. The method according to claim 4, characterized in that The method further comprises: Analyze the game test results corresponding to a preset number of the test cases to determine the test cases that have run into errors and display them in a preset manner, which includes a table format and / or a web page format.
12. A game testing device, characterized in that: The device comprises: The acquisition module is used to obtain in-game data through the test script built into the game client; A control module, configured to generate control instructions based on the in-game data, and to operate the game client to perform game match testing using the control instructions; the control instructions are used to simulate user input; The test module is used to obtain round data, and the round data is used to generate game test results.
13. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the game testing method according to any one of claims 1 to 11 by executing the computer instructions.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the game testing method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The game testing method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the game testing method according to any one of claims 1 to 11.