Game interface testing method, device, electronic device and storage medium

CN114817056BActive Publication Date: 2025-09-16NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210511603.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-11
Publication Date
2025-09-16
Estimated Expiration
2042-05-11

Smart Images

  • Figure CN114817056B_ABST
    Figure CN114817056B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and storage medium for game interface testing, which relates to the field of game technology. The method includes: obtaining the game interface of the game to be tested, determining the current interface state of the game interface and the set of operation actions corresponding to the current interface state; based on the current interface state and the corresponding interface test constraint threshold, determining the target operation action in the set of operation actions through a reinforcement learning model; executing the target operation action in the current interface state, obtaining a test reward for executing the target operation action, updating the parameters of the reinforcement learning model based on the test reward, and performing interface testing on the game to be tested through the reinforcement learning model with updated parameters. The present application improves the test coverage of operable objects in the game, thereby improving the game interface testing effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game technology, and in particular to a method, device, electronic device and storage medium for testing a game interface. Background Art

[0002] Currently, when testing games, common methods include selecting a test area and manually testing only the selected part; or, testing based on automated testing tools (such as Airtest) or manually written scripts. For large-scale games, related technologies use player action decisions based on relevant status data of game characters (such as the position of players and enemy players, item status, number of player kills, etc.) to test the player's operating functions during game battles. However, the current testing method cannot guarantee comprehensive coverage of the test scenarios and may ignore some important functions, resulting in poor test results. Summary of the Invention

[0003] The purpose of the present invention is to provide a method, device, electronic device and storage medium for game interface testing, which improves the test coverage of operable objects in the game and thereby improves the game interface testing effect.

[0004] In a first aspect, the present invention provides a method for testing a game interface, the method comprising: obtaining a game interface of a game to be tested, determining a current interface state of the game interface and a set of operation actions corresponding to the current interface state; based on the current interface state and the corresponding interface test constraint threshold, determining a target operation action in the operation action set through a reinforcement learning model; executing the target operation action in the current interface state to obtain a test reward for executing the target operation action; updating the parameters of the reinforcement learning model based on the test reward, and performing an interface test on the game to be tested through the reinforcement learning model after the updated parameters.

[0005] In an optional embodiment, determining the set of operation actions corresponding to the current interface state includes: determining the set of operation actions corresponding to the current interface state according to the game type of the game to be tested; wherein the game types include mobile games, terminal games and web games.

[0006] In an optional implementation, the operation actions in the operation action set are atomic actions.

[0007] In an optional embodiment, based on the current interface state and the interface test constraint threshold, a target operation action is determined in the operation action set through a reinforcement learning model, including: determining the executable action set of the current interface state based on the interface test constraint threshold corresponding to the current interface state; the executable action set is a subset of the operation action set; the current interface state and the executable action set are input into the reinforcement learning model, and the target operation action is output through the reinforcement learning model.

[0008] In an optional implementation, the interface test constraint threshold includes an execution count threshold corresponding to the operation action, an execution duration threshold corresponding to the operation action, and a stay duration threshold of the current interface state.

[0009] In an optional embodiment, the executable action set for the current interface state is determined based on the interface test constraint threshold corresponding to the current interface state, including: obtaining historical test data corresponding to the current interface state; wherein the historical test data includes at least one of the following: the number of times the operation action in the operation action set is executed, the total execution time of the operation action, and the total time the operation action is tested in the current interface state; based on the historical test data and the interface test constraint threshold, the executable action set for the current interface state is determined in the operation action set.

[0010] In an optional embodiment, the operation actions in the operation action set include interface jump-out actions and / or interface exploration actions; executing the target operation action in the current interface state includes: executing the target operation action in the current interface state, if the target operation action is an interface jump-out action, jumping to the next game interface; if the target operation action is an interface exploration action, jumping from the current interface state to the next interface state in the game interface.

[0011] In a second aspect, the present invention provides a device for testing a game interface, the device comprising: a determination module for obtaining a game interface of a game to be tested, determining a current interface state of the game interface and a set of operation actions corresponding to the current interface state; a reinforcement learning module for determining a target operation action in the operation action set through a reinforcement learning model based on the current interface state and a corresponding interface test constraint threshold; an action execution module for executing the target operation action in the current interface state and obtaining a test reward for executing the target operation action; and an update test module for updating parameters of the reinforcement learning model based on the test reward, and performing interface testing on the game to be tested through the reinforcement learning model after the updated parameters.

[0012] In a third aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any one of the methods in the aforementioned embodiments.

[0013] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement any one of the methods of the aforementioned implementation methods.

[0014] The method, apparatus, electronic device, and storage medium for game interface testing provided by the embodiments of the present invention first obtain the game interface of the game to be tested, determine the current interface state of the game interface and the set of operation actions corresponding to the current interface state, then, based on the current interface state and the corresponding interface test constraint threshold, determine the target operation action from the set of operation actions through a reinforcement learning model, execute the target operation action in the current interface state, obtain a test reward for executing the target operation action, further update the parameters of the reinforcement learning model based on the test reward, and perform interface testing on the game to be tested using the reinforcement learning model with updated parameters. This method uses the interface test constraint threshold corresponding to the current interface state as a reference standard when determining the target operation action through reinforcement learning. This method can avoid tending to test interface states with higher test rewards, repeatedly testing interface states with higher test rewards, or even cyclically testing on the interface state. Moreover, after the behavior of executing the target operation action in the current interface state exceeds the interface test constraint threshold, other operation actions and / or other interface states of the interface state can be tested. Thus, operation actions can be selected and tested for all interface states in the game, thereby improving the test coverage of the game interface and thus improving the test effect of the game interface.

[0015] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flowchart of a method for testing a game interface provided by an embodiment of the present invention;

[0019] Figure 2 A schematic diagram of a jump operation provided by an embodiment of the present invention;

[0020] Figure 3 A schematic diagram of a jump operation provided by an embodiment of the present invention;

[0021] Figure 4 A flowchart of a method for testing a game interface provided by an embodiment of the present invention;

[0022] Figure 5 A structural diagram of a device for testing a game interface provided by an embodiment of the present invention;

[0023] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0025] In order to ensure the quality of the game and to minimize problems, a large amount of manpower is needed to test each version of the game. Current game testing methods generally include manual testing, automated testing tool testing, and making decisions about player actions based on the relevant status of the game character, thereby testing the player's operating functions during the game. However, this type of testing method has the problem of being unable to guarantee comprehensive coverage of the test scenarios, resulting in poor test results. Based on this, an embodiment of the present invention provides a method, device, electronic device, and storage medium for game interface testing, which can select and test operational actions for the global interface status of the game, thereby improving the test coverage of the game interface, and thus improving the test effect of the game interface.

[0026] To facilitate understanding of this embodiment, a method for testing a game interface disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method mainly includes the following steps:

[0027] Step S102: obtaining a game interface of the game to be tested, and determining a current interface state of the game interface and a set of operation actions corresponding to the current interface state.

[0028] The games to be tested can include both competitive and non-competitive games. For competitive games, the game interface of the game to be tested can include the game interface during the competitive scene, and can also include other interfaces before entering the game, such as the task collection interface, the game viewing interface, and the player interaction interface. For non-competitive games, the game interface of the game to be tested can include the task collection interface and the task execution interface. In other words, regardless of whether the game is competitive or non-competitive, the game interface mentioned in this embodiment refers to the various interfaces displayed after the game is launched.

[0029] The current state of the game interface is used to represent state information obtained after state abstraction of the game interface. In one embodiment, the current state can be determined by extracting features from the game interface. The extracted features can include at least objects in the game interface that can be operated by the player, such as operable controls, triggerable areas, and clickable virtual objects. A unique game interface can be determined based on all the interface features in the game interface.

[0030] Each interface state requires certain actions to advance the game interface. The action set corresponding to the current interface state is the set of actions executed for that state. A game interface consists of at least one interface state, and each state corresponds to at least one action. Therefore, an action set always includes at least one action.

[0031] In one example, it is assumed that the current interface state in the game interface includes an operable control A, a triggerable area B and a clickable virtual object C, the operation actions corresponding to the operable control A include a click action a1, the operation actions corresponding to the triggerable area B are a click action b1 and a sliding action b2, and the operation actions corresponding to the clickable virtual object C include a click operation c1 and a drag operation c2. The current interface state corresponding to the game interface is determined by the operable control A, the triggerable area B and the clickable virtual object C, and the operation action set includes {a1, b1, b2, c1, c2}.

[0032] Step S104 : Based on the current interface state and the corresponding interface test constraint threshold, a target operation action is determined in the operation action set through a reinforcement learning model.

[0033] The interface test constraint threshold is used to constrain the interface state and / or the number of times an action is performed to prevent the reinforcement learning decision-making results from preferring to test a certain action, resulting in a reduction in the number of tests for other actions, or even the inability to test other actions. The interface test constraint threshold includes at least one of the following: a threshold for the number of executions corresponding to the action, a threshold for the execution duration corresponding to the action, and a threshold for the duration of the current interface state.

[0034] When the reinforcement learning model determines the target operation action, the current interface state can be input into the reinforcement learning model, and the target operation action can be decided from the operation action set through the exploration strategy of reinforcement learning.

[0035] By constraining the test with the above-mentioned interface test constraint threshold, it can be ensured that the reinforcement learning model will not always tend to test the interface state with higher test rewards or the corresponding operation actions when the test reward of the same interface state is higher. Therefore, other interface states in the game interface or other operation actions in the same interface state can also be tested, thereby improving the coverage of the test interface test.

[0036] Step S106: Execute the target operation action in the current interface state to obtain a test reward for executing the target operation action.

[0037] The test reward for a target action represents the return on the overall game interface test during the test. When interacting with the game interface, the agent inputs the current interface state and outputs a target action based on its own strategy. The reward from executing the target action in the current interface state adjusts its exploration strategy to maximize rewards.

[0038] In one example, the operating actions corresponding to the current interface state A include a1, a2, a3 and a4. For example, executing atomic action a1 through the current interface state A better meets the test requirements of the current interface state than executing atomic action a2, then the test reward value corresponding to executing a1 is greater than the test reward value corresponding to executing a2; for another example, executing operating action a3 on the current interface state A may not be beneficial to the test requirements, then the test reward value corresponding to executing a3 may be a smaller value; for another example, executing action a4 on the current interface state A may cause bugs or other impacts in the test, then the obtained test reward value is a negative value.

[0039] Step S108: updating the parameters of the reinforcement learning model based on the test reward, and performing interface testing on the game to be tested using the reinforcement learning model with updated parameters.

[0040] After receiving the test reward, the parameters of the reinforcement learning model can be adjusted using the test reward to update the reinforcement learning model's exploration strategy. Since the target operation is determined by the reinforcement learning model in conjunction with the interface test constraint threshold, the test reward obtained after executing the target operation is feedback after the interface test constraint threshold is applied. The updated parameters of the reinforcement learning model using the test reward can make the updated reinforcement learning model more suitable for full interface coverage testing.

[0041] The method for testing the game interface provided by the embodiment of the present invention uses the interface test constraint threshold corresponding to the current interface state as a reference standard when determining the target operation action through reinforcement learning. This can avoid tending to test the interface state with a higher test reward, and perform multiple tests on the interface state with a higher test reward, or even stay on the interface state for a loop test. Moreover, after the behavior of performing the target operation action for testing in the current interface state exceeds the interface test constraint threshold, other operation actions and / or other interface states of the interface state can be tested, so that operation actions can be selected and tested for all interface states in the game, thereby improving the test coverage of the game interface and thereby improving the test effect of the game interface.

[0042] To ensure that the testing method of the present invention can be applied to different types of games, in an optional embodiment, the above-mentioned determination of the set of operating actions corresponding to the current interface state can be specifically implemented based on the game type to be tested, where game types include mobile games, PC games, and web games. The operating actions include at least one or a combination of click, double-click, slide, drag, long press, and keyboard input.

[0043] In one example, when the game type is a mobile game, the operation actions may at least include clicking, double-clicking, sliding, dragging and long pressing; when the game type is a terminal game or a web game, the operation actions may at least include clicking, double-clicking, sliding, dragging and long pressing input by the mouse, triggering actions input by the keyboard, and a combination of actions input by the mouse and the keyboard.

[0044] The actions in the aforementioned action set are atomic actions, which are executed by the device and are not interrupted by the application scheduling mechanism. In one embodiment, the aforementioned actions determined by game type can be abstracted to obtain universal atomic actions. This approach is more suitable for automated testing of game interfaces, improving the efficiency of game interface testing.

[0045] Furthermore, based on the current interface state and the interface test constraint threshold, determining the target operation action in the operation action set through the reinforcement learning model may include the following steps:

[0046] Step 1.1) Determine the executable action set for the current interface state based on the interface test constraint threshold corresponding to the current interface state; the executable action set is a subset of the operation action set.

[0047] In step 1.2), the current interface state and the set of executable actions are input into the reinforcement learning model, and the target operation action is output through the reinforcement learning model.

[0048] With respect to step 1.1), since the interface test constraint threshold includes a threshold for the number of executions corresponding to the operation action, a threshold for the execution duration corresponding to the operation action, and a threshold for the duration of the current interface state, it is possible to first obtain historical test data corresponding to the current interface state, and then determine the set of executable actions for the current interface state from the operation action set based on the historical test data and the interface test constraint threshold. The historical test data includes at least one of the following: the number of executions corresponding to the operation action in the operation action set, the total execution duration corresponding to the operation action, and the total duration of the operation action being tested in the current interface state.

[0049] In one implementation, historical test data can be compared with the interface test constraint threshold corresponding to the current interface state, and objects or actions that exceed the threshold in the action set that can be operated by the player can be eliminated to obtain the executable action set. This approach can avoid lingering on or repeatedly executing a specific object or action that can be operated by the player, and instead favors testing untested or less frequently tested objects or actions that can be operated by the player, thereby improving test coverage for the entire game.

[0050] The above-mentioned historical test data is the test data from the start of the test to the current moment. During the test process of this embodiment, there may be a situation where the game interface jumps to other game interfaces, but the test data is still the cumulative data from the start of the game interface test to the current moment. For example, in terms of the number of executions, the number of executions of a certain atomic action corresponding to a certain operable object in a certain game interface is continuously accumulated as the test progresses.

[0051] Regarding step 1.2), if this is the first time the target action is determined, the reinforcement learning model is the initial model. If this is not the first time the target action is determined, the reinforcement learning model is the model after its parameters are updated based on test rewards. As the testing process progresses, the set of executable actions is continuously narrowed, and the reinforcement learning model continuously updates its parameters based on the test rewards fed back after executing the action, thereby continuously improving the accuracy of the reinforcement learning model's action decisions.

[0052] In one embodiment, in order to be able to conduct a comprehensive coverage test on the game interface, the operation actions in the operation action set can be classified, which can include interface pop-up actions that help users advance the game process and interface exploration actions used to improve the test coverage scenario. The interface pop-up action can include operation actions corresponding to controls such as "return", "next level", "enter", etc., and the interface exploration action can include operation actions corresponding to "click area", "click game character", "click scene object", etc. Therefore, in one embodiment, the operation actions in the operation action set include interface pop-up actions and / or interface exploration actions. For a specific game interface, since the game interface usually includes at least one of controls, game characters, scene objects, etc., there will be different corresponding operation action sets, such as some interfaces only include interface pop-up actions, some interfaces only include interface exploration actions, and some game interfaces include both interface pop-up actions and interface exploration actions.

[0053] Correspondingly, when executing the target operation action in the current interface state, if the target operation action is an interface jump-out action, it will jump to the next game interface; if the target operation action is an interface exploration action, it will jump from the current interface state to the next interface state in the game interface.

[0054] Take the target action as the interface pop-up action as an example, see Figure 2 As shown, when the interface pop-up action is a click operation on the "Next Level" control, after the click operation is executed, the current game interface (the interface corresponding to the first level) jumps to the next game interface indicated by the "Next Level" control (the interface corresponding to the second level).

[0055] When a click operation is performed on the "Next Level" control, it should normally jump to the next game interface indicated by the "Next Level" control. If a corresponding jump is performed after the click operation is performed, the test result can be determined as a normal test. If there is no response or other unexpected results occur, the test result can be determined as an abnormal test.

[0056] Take the target operation action as an example of interface exploration action, see Figure 3 As shown, when the interface exploration action is to click on the item to be claimed in the game interface, the item can be claimed by clicking on it, the "Item to be claimed" icon is removed, and the number of items in the backpack increases by 1. During this process, the game interface does not jump, only the interface state changes.

[0057] After clicking on the item, under normal circumstances, the item can be added to the player's backpack or used (which can be determined according to the rules built into the game). If the expected result is displayed after execution, the test result can be determined as a normal test. If there is no response or other unexpected results appear, the test result can be determined as an abnormal test.

[0058] Furthermore, when jumping to the next game interface, the interface test constraint threshold corresponding to the next game interface is determined to determine the set of executable actions in the next game interface. The operation of determining the set of executable actions is the same as the method described above, and can be determined by comparing the interface test constraint threshold with the historical test data corresponding to the next game interface. At the same time, the historical test data of the game interface before the jump needs to be updated, that is, the number of times the operation action corresponding to the operation action set corresponding to the game interface before the jump is executed, the total execution time of the operation action, and the total time the operation action is tested in the current interface state are updated.

[0059] When the game interface jumps to the next interface state, the historical test data corresponding to the current interface state of the game interface is updated. If no interface jump occurs at this time, the number of times the operation action corresponding to the operation action set of the game interface is executed, the total execution time of the operation action corresponding to the operation action, and the total time the operation action is tested in the current interface state can be updated. Furthermore, the updated historical test data can be compared with the interface test constraint threshold to re-determine the executable action set corresponding to the next interface state after the jump.

[0060] In order to be able to test other interfaces in the game, the probability of executing the operation action of jumping out of the current game interface can be set when the stay time threshold of the current interface state is exceeded. This is so that after executing the test action for a certain length of time on the current interface, you can turn to testing other game interfaces. It will not be limited to repeated testing of a certain interface, but will test all interfaces of the entire game, thereby improving the comprehensiveness and coverage of the test.

[0061] See also Figure 4 FIG. 4 shows another method for testing a game interface, comprising the following steps:

[0062] S401, start.

[0063] S402, enter the game interface. The game interface entered is also the current game interface in the above embodiment.

[0064] S403: Abstract the game interface to extract the state S corresponding to the game interface. In this embodiment, the interface image is used as a low-level feature, and the state S (i.e., the operable object) extracted from the interface image is used as a high-level feature. The abstraction process can be feature extraction. By performing feature extraction on the game interface, the state S that uniquely identifies the game interface can be obtained.

[0065] S404: Analyze the state S to generate an executable action set A in this state. The executable action set A is also the aforementioned atomic action set, which will not be described in detail here.

[0066] S405 : Based on the state S and the executable action set A, output the executed atomic action.

[0067] S406, executing the atomic action in the game for testing, and re-executing S202 after the test.

[0068] This method can be executed by the intelligent agent in the game, and the intelligent agent continuously interacts in the game (that is, the testing process) and dynamically adjusts the selection strategy of the test reward and test threshold according to the obtained test data (the specific selection process is described in the above embodiment and will not be repeated here), so as to achieve the purpose of covering the widest range of game interface test scenarios.

[0069] In view of the above-mentioned method for testing the game interface, an embodiment of the present invention provides a device for testing the game interface, see Figure 5 As shown, the device includes the following parts:

[0070] Determination module 502, for obtaining the game interface of the game to be tested, determining the current interface state of the game interface and the set of operation actions corresponding to the current interface state;

[0071] A reinforcement learning module 504 is configured to determine a target operation action from the operation action set using a reinforcement learning model based on the current interface state and the corresponding interface test constraint threshold;

[0072] The action execution module 506 is used to execute the target operation action in the current interface state and obtain a test reward for executing the target operation action;

[0073] The update test module 508 is used to update the parameters of the reinforcement learning model based on the test reward, and perform interface testing on the game to be tested using the reinforcement learning model with updated parameters.

[0074] The device for testing the game interface provided by an embodiment of the present invention uses the interface test constraint threshold corresponding to the current interface state as a reference standard when determining the target operation action through reinforcement learning. This can avoid tending to test interface states with higher test rewards, and multiple tests can be performed on the interface state with higher test rewards, or even stay on the interface state for loop testing. Moreover, after the behavior of executing the target operation action for testing in the current interface state exceeds the interface test constraint threshold, other operation actions and / or other interface states of the interface state can be tested, so that operation actions can be selected and tested for all interface states in the game, thereby improving the test coverage of the game interface and thereby improving the test effect of the game interface.

[0075] In some embodiments, the determination module 502 is further used to: determine a set of operation actions corresponding to the current interface state according to the game type of the game to be tested; wherein the game types include mobile games, terminal games and web games.

[0076] In some implementations, the operation actions in the operation action set are atomic actions.

[0077] In some embodiments, the reinforcement learning module 504 is also used to: determine the executable action set of the current interface state based on the interface test constraint threshold corresponding to the current interface state; the executable action set is a subset of the operation action set; input the current interface state and the executable action set into the reinforcement learning model, and output the target operation action through the reinforcement learning model.

[0078] In some implementations, the interface test constraint threshold includes an execution count threshold corresponding to the operation action, an execution duration threshold corresponding to the operation action, and a stay duration threshold for the current interface state.

[0079] In some embodiments, the reinforcement learning module 504 is further used to: obtain historical test data corresponding to the current interface state; wherein the historical test data includes at least one of the following: the number of times the operation action in the operation action set is executed, the total execution time of the operation action, and the total time the operation action is tested in the current interface state; determine the executable action set for the current interface state in the operation action set based on the historical test data and the interface test constraint threshold.

[0080] In some embodiments, the operation actions in the operation action set include interface jump-out actions and / or interface exploration actions; the action execution module 506 is also used to: execute the target operation action in the current interface state; if the target operation action is an interface jump-out action, jump to the next game interface; if the target operation action is an interface exploration action, jump from the current interface state to the next interface state in the game interface.

[0081] In some embodiments, it also includes: when jumping to the next game interface, determining the interface test constraint threshold corresponding to the next game interface to determine the set of executable actions in the next game interface; when jumping to the next interface state in the game interface, updating the historical test data corresponding to the current interface state of the game interface.

[0082] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference can be made to the corresponding content in the aforementioned method embodiment.

[0083] An embodiment of the present invention provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned embodiments.

[0084] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected via the bus 62; the processor 60 is used to execute an executable module stored in the memory 61, such as a computer program.

[0085] The memory 61 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. The system network element communicates with at least one other network element via at least one communication interface 63 (which may be wired or wireless), and may utilize the Internet, a wide area network, a local area network, a metropolitan area network, or the like.

[0086] The bus 62 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0087] Among them, the memory 61 is used to store programs, and the processor 60 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 60 or implemented by the processor 60.

[0088] The processor 60 may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method may be performed by hardware integrated logic circuits or software instructions within the processor 60. The processor 60 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention may be directly executed by a hardware decoding processor or by a combination of hardware and software modules within the decoding processor. The software modules may be located in storage media well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or the like. The storage medium is located in the memory 61 , and the processor 60 reads the information in the memory 61 and completes the steps of the above method in combination with its hardware.

[0089] The computer program product of the method, device, electronic device and storage medium for testing the game interface provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. For specific implementation, please refer to the method embodiments and will not be repeated here.

[0090] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0091] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0092] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0093] In the description of the present invention, it should be noted that the terms "first", "second" and "third" are only used for descriptive purposes and should not be understood as indicating or implying relative importance.

[0094] Finally, it should be noted that the above embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for testing a game interface, characterized in that: The method comprises: Obtaining a game interface of the game to be tested, performing feature extraction on the game interface, and determining a current interface state corresponding to the game interface based on the extracted interface features, wherein the current interface state is used to represent state information obtained after state abstraction of the game interface; Parsing the current interface state to generate an operation action set corresponding to the current interface state, where the operation actions in the operation action set are atomic actions, which are operation actions executed by the device and will not be interrupted by an application scheduling mechanism; Based on the current interface state and the corresponding interface test constraint threshold, a target operation action is determined in the operation action set through a reinforcement learning model, wherein the interface test constraint threshold is used to constrain the interface state and / or the number of times the operation action is performed; Execute the target operation in the current interface state to obtain a test reward for executing the target operation, wherein the test reward for the target operation is used to represent the test return brought by executing the target operation to the entire game interface test during the test process; The parameters of the reinforcement learning model are updated based on the test reward, and the interface test of the game to be tested is performed using the reinforcement learning model with updated parameters.

2. The method according to claim 1, characterized in that Determining the set of operation actions corresponding to the current interface state includes: Determining, based on the game type of the game to be tested, a set of operation actions corresponding to the current interface state; Among them, the game types include mobile games, PC games and web games.

3. The method according to claim 1, characterized in that The determining of a target operation action from the operation action set by using a reinforcement learning model based on the current interface state and the interface test constraint threshold includes: Determining an executable action set for the current interface state based on an interface test constraint threshold corresponding to the current interface state; the executable action set is a subset of the operation action set; The current interface state and the executable action set are input into the reinforcement learning model, and the target operation action is output through the reinforcement learning model.

4. The method according to claim 1, wherein The interface test constraint threshold includes an execution count threshold corresponding to the operation action, an execution duration threshold corresponding to the operation action, and a stay duration threshold of the current interface state.

5. The method according to claim 4, characterized in that The determining of the executable action set for the current interface state based on the interface test constraint threshold corresponding to the current interface state includes: Obtaining historical test data corresponding to the current interface state; wherein the historical test data includes at least one of the following: the number of times an operation action in the operation action set is executed, the total execution time of the operation action, and the total time the operation action is tested in the current interface state; An executable action set for the current interface state is determined in the operation action set based on the historical test data and the interface test constraint threshold.

6. The method according to claim 1, characterized in that The operation actions in the operation action set include interface jump actions and / or interface exploration actions; Executing the target operation action in the current interface state includes: Execute the target operation action in the current interface state. If the target operation action is the interface jump-out action, jump to the next game interface. If the target operation action is the interface exploration action, jump from the current interface state to the next interface state in the game interface.

7. A device for testing a game interface, characterized in that: The device comprises: a determination module configured to obtain a game interface of a game to be tested, extract features of the game interface, and determine a current interface state corresponding to the game interface based on the extracted interface features, wherein the current interface state is used to represent state information obtained after state abstraction of the game interface; parse the current interface state to generate a set of operation actions corresponding to the current interface state, wherein the operation actions in the operation action set are atomic actions, which are operation actions executed by the device and will not be interrupted by the application scheduling mechanism; a reinforcement learning module, configured to determine a target operation action from the set of operation actions using a reinforcement learning model based on the current interface state and a corresponding interface test constraint threshold, wherein the interface test constraint threshold is used to constrain the interface state and / or the number of times the operation action is performed; An action execution module, configured to execute the target operation action in the current interface state and obtain a test reward for executing the target operation action, wherein the test reward for the target operation action is used to represent the test return brought by executing the target operation action to the entire game interface test during the test process; An update test module is used to update the parameters of the reinforcement learning model based on the test reward, and perform interface testing on the game to be tested using the reinforcement learning model with updated parameters.

8. An electronic device, characterized in that, The method comprises a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method for game interface testing according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the method for testing the game interface according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Application program testing method and device, electronic equipment and medium

    CN111694755A