Game test case generation method and device, electronic equipment and storage medium
By acquiring user operation parameters and generating monitoring instructions, the problem of existing testing tools being unable to accurately test game combat effects has been solved, achieving high efficiency and comprehensiveness in game testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-02-17
- Publication Date
- 2026-07-21
AI Technical Summary
Existing testing tools cannot meet the accuracy requirements of game testing, especially in the numerical judgment of game combat effects, resulting in excessive manpower consumption for regression testing.
By acquiring user operation parameters in the target scenario, testing tools are used to replicate the interactive events of virtual game objects, and monitoring instructions are generated according to the testing requirements of different interactive events, thereby generating test cases.
It improves the accuracy and comprehensiveness of game testing, reduces the manpower required for regression testing, and meets the testing needs of different interactive events.
Smart Images

Figure CN116244192B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing technology, and in particular to methods, apparatus, electronic devices and storage media for generating game test cases. Background Technology
[0002] During game development, with each iteration of the game, test engineers need to conduct extensive functional regression testing to ensure that new features meet expectations while also ensuring that older features and processes are error-free. As game products become increasingly feature-rich and the coupling between modules becomes more severe, a significant amount of manpower is required for regression testing each time.
[0003] Currently, testing can generally be done using some testing tools. However, existing testing tools are generally used for testing the overall game process, and their application scenarios are mostly UI automation testing. However, the game as a whole is composed of a large number of numerical values. In particular, whether the performance of game combat effects is normal is mostly judged by numerical values. UI automation testing alone cannot meet the needs of game testing. How to generate test cases that can accurately test the game has become an urgent problem to be solved. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method, apparatus, electronic device, and storage medium for generating game test cases. This method utilizes testing tools to acquire user operation parameters on virtual objects in a target scenario, replicates virtual interactive events of virtual game objects in the target scenario, and generates at least one monitoring instruction based on different interactive event testing requirements. Test cases are generated based on the operation parameters and the at least one monitoring instruction. This not only generates test cases that can test virtual interactive events in the game, improving the accuracy of game testing, but also satisfies different interactive event testing requirements, further enhancing the comprehensiveness of test case generation and game testing.
[0005] Firstly, embodiments of this application provide a method for generating game test cases, the method comprising:
[0006] Obtain the user's operation parameters for virtual game objects in the target scenario;
[0007] Using testing tools, the virtual interactive events of the virtual game object in the target scene are replicated according to the operating parameters, and the virtual interactive events are monitored according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events.
[0008] Test cases are generated based on the operating parameters and the at least one monitoring instruction.
[0009] Secondly, embodiments of this application also provide a device for generating game test cases, the device comprising:
[0010] The parameter acquisition module is used to acquire the user's operation parameters for virtual game objects in the target scenario;
[0011] The instruction generation module is used to replicate the virtual interactive events of the virtual game object in the target scene according to the operation parameters using a testing tool, and to monitor the virtual interactive events according to different interactive event testing requirements, so as to generate at least one monitoring instruction for the virtual interactive events.
[0012] The test case generation module is used to generate test cases based on the operation parameters and the at least one monitoring instruction.
[0013] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the game test case generation method as described in any of the first aspects.
[0014] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the game test case generation method as described in any of the first aspects.
[0015] The game test case generation method, apparatus, electronic device, and storage medium provided in this application embodiment acquire user operation parameters for virtual game objects in a target scene; use a testing tool to replicate virtual interaction events of the virtual game objects in the target scene according to the operation parameters; monitor the virtual events according to different interaction event testing requirements; generate at least one monitoring instruction for the virtual interaction events; and then generate test cases based on the operation parameters and at least one monitoring instruction. In this way, by using a testing tool to acquire user operation parameters for virtual objects in a target scene, replicate virtual interaction events of virtual game objects in the target scene, and generate at least one monitoring instruction according to different interaction event testing requirements, and generate test cases based on the operation parameters and at least one monitoring instruction, test cases are generated. This not only improves the accuracy of game testing by generating test cases that can test virtual interaction events in the game, but also meets the testing requirements of different interaction events, further enhancing the comprehensiveness of test case generation and game testing.
[0016] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating a method for generating game test cases provided in an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of the process for obtaining operation parameters provided in an embodiment of this application;
[0020] Figure 3 This is one of the structural schematic diagrams of a game test case generation device provided in an embodiment of this application;
[0021] Figure 4 A second schematic diagram of a device for generating game test cases provided in an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0024] First, let me introduce the terms used in this application:
[0025] (1) Target scenario
[0026] The target scene refers to the game scene (virtual scene), which is the game scene displayed (or provided) when the application runs on a terminal or server. Optionally, the game scene is a simulation environment of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. The game scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The game scene can be the sky, land, ocean, etc., where the land includes environmental elements such as deserts and cities. Among them, the game scene is the scene in which the user controls virtual objects and completes the game logic. For example, in a sandbox 3D shooting game, the game scene is a 3D game world for players to control virtual objects to fight. Instance game scenes can include at least one element among mountains, plains, rivers, lakes, oceans, deserts, skies, plants, buildings, and vehicles. For example, in a 2D or 2.5D card game, the game scene is the scene for displaying and releasing cards or displaying the virtual objects corresponding to the cards. Instance game scenes can include arenas, battlegrounds, or other "field" elements or other elements that can display the card battle status. For a 2D or 2.5D multiplayer online tactical competitive game, the game scene is a 2D or 2.5D terrain scene for virtual objects to fight. Instance game scenes can include elements such as canyon-style mountains, lines, rivers, classrooms, desks and chairs, and podiums.
[0027] (2) Virtual game objects
[0028] A virtual game object refers to a controllable dynamic object within a virtual scene. Optionally, this dynamic object can be a virtual character, virtual animal, anime character, etc. This virtual object is a character controlled by the player through an input device, or an artificial intelligence (AI) trained and set up for battle in a virtual environment, or a non-player character (NPC) set up for battle in a virtual scene. Optionally, this virtual game object is a virtual character competing in a virtual scene. Optionally, the number of virtual game objects in the virtual scene battle is preset or dynamically determined based on the number of clients joining the battle; this application embodiment does not limit this. In one possible implementation, the user can control the virtual game object to move within the virtual scene, for example, controlling the virtual game object to run, jump, crawl, etc., and can also control the virtual game object to use skills, virtual items, etc., provided by the application to fight against other virtual objects.
[0029] Secondly, the applicable application scenarios of this application are introduced. This application can be applied to the field of testing technology.
[0030] During game development, with each iteration of the game, test engineers need to conduct extensive functional regression testing to ensure that new features meet expectations while also ensuring that older features and processes are error-free. As game products become increasingly feature-rich and the coupling between modules becomes more severe, a significant amount of manpower is required for regression testing each time.
[0031] Currently, testing can generally be done using some testing tools. However, existing testing tools are generally used for testing the overall game process, and their application scenarios are mostly UI automation testing. However, the game as a whole is composed of a large number of numerical values. In particular, whether the performance of game combat effects is normal is mostly judged by numerical values. UI automation testing alone cannot meet the needs of game testing. How to generate test cases that can accurately test the game has become an urgent problem to be solved.
[0032] Based on this, embodiments of this application provide a method for generating game test cases to improve the accuracy of game testing, as well as the comprehensiveness of test case generation and game testing.
[0033] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for generating game test cases provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the method for generating game test cases includes:
[0034] S101. Obtain the user's operation parameters for virtual game objects in the target scenario.
[0035] S102. Using a testing tool, the virtual interactive events of the virtual game object in the target scene are replicated according to the operating parameters, and the virtual interactive events are monitored according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events.
[0036] S103. Generate test cases based on the operating parameters and the at least one monitoring instruction.
[0037] The game test case generation method provided in this application embodiment utilizes testing tools to obtain user operation parameters of virtual objects in a target scene, replicates virtual interactive events of virtual game objects in the target scene, and generates at least one monitoring instruction according to different interactive event testing requirements. Test cases are generated based on the operation parameters and the at least one monitoring instruction. In addition to generating test cases that can test virtual interactive events in the game and improving the accuracy of game testing, the generated test cases can also meet the testing requirements of different interactive events, further improving the comprehensiveness of test case generation and game testing.
[0038] The exemplary steps of the embodiments of this application are described below:
[0039] S101. Obtain the user's operation parameters for virtual game objects in the target scenario.
[0040] In this embodiment of the application, during game development, with each version iteration, test engineers need to conduct extensive functional regression testing to ensure that new features of the game product meet expectations, while also ensuring that older features and processes are error-free. As the game's operating time increases, the game product's features become more numerous, and the coupling between various modules becomes more severe, resulting in a significant amount of manpower required for regression testing each time. The game as a whole is composed of a large number of numerical values, especially the performance of effects in combat, which is largely judged through numerical values. Therefore, numerical testing is also a crucial task in regression testing. To save manpower costs, tools are needed to automate numerical testing during combat.
[0041] Specifically, during the testing process, test cases need to be generated first. The test cases generated by this application can not only provide test instructions for testing, but also conform to virtual interactive events in the game scenario, so as to intuitively present the game process to the testers.
[0042] In one possible implementation, a basic set of operation parameters (combat cases) needs to be generated before generating test cases. Subsequent test cases can be expanded using the pre-generated basic set of operation parameters.
[0043] Specifically, the step "obtaining user operation parameters for virtual game objects in the target scenario" includes:
[0044] a1: Use the aforementioned testing tool to control the client to interact in the same game scene.
[0045] a2: Determine the target time period during which the virtual interactive event in the target scene occurs during the game interaction.
[0046] a3: Determine the operation parameters based on multiple operation commands given by the user on the client within the target time period.
[0047] In this embodiment, the user can be a test engineer participating in game testing. When there are multiple test engineers, please refer to [link to relevant documentation]. Figure 2 , Figure 2 This is a schematic diagram of the process for obtaining operation parameters provided in an embodiment of this application, such as... Figure 2 As shown, different game clients (such as...) were launched by multiple test engineers. Figure 2As shown, game client 1, game client 2, and game client 3 join the same game scene to conduct virtual interactive events. An automated testing tool is started to connect all clients. After the game ends, the game interaction events that occur during the game are captured, parsed, and intercepted to obtain operation parameters, and then a battle case is generated.
[0048] In one possible implementation, the virtual interactive event is a combat event within the target scene.
[0049] In one possible implementation, taking virtual interactive events as an example, multiple clients are launched to join the same battle event. When different test engineers participate in the battle, they will control different virtual game objects in the game to perform different game behaviors. At this time, it is necessary to parse the operation instructions of the test engineers when they operate the virtual game objects to perform game behaviors to obtain the underlying operation parameters.
[0050] Specifically, the operating parameters include at least one of the following:
[0051] The user's operation trajectory parameters for the skill controls, the user's operation duration parameters in the target scenario, and the user's operation frequency parameters in the target scenario.
[0052] In one possible implementation, the skill control can be a movement control, an attack control, a view control, etc. It can parse the test engineer's operation on the virtual game object into the operation parameters of the game control, or it can be an operation on the attack control. After the skill is released, the skill release range is recorded as the operation parameter; or it can be a view control, recording the number of times the view is switched and the frequency, etc.
[0053] It is worth noting that when recording the operation parameters, they are distinguished by the tester or the virtual game object controlled by the tester, and recorded separately.
[0054] For example, two test engineers control virtual game objects A and B in combat using different game clients. They need to record the control parameters for virtual game object A and virtual game object B respectively. This allows for subsequent game replication using the different control parameters for each virtual game object.
[0055] In one possible implementation, in order to reduce the number of game operation parameters recorded, improve the efficiency of recording operation parameters, and save storage space, it is also possible to record the time period of the virtual interactive events to be tested as needed, filter the operation parameters generated during the game, and only record the operation parameters corresponding to the virtual interactive events.
[0056] For example, if you need to test the normal movement speed of a virtual game object J, you only need to parse the operation parameters of the virtual game object J during the period when it moves normally in the game.
[0057] In one possible implementation, when multiple test engineers execute the same virtual interactive event through different clients, it is necessary to record not only the operation parameters performed by each test engineer on different virtual game objects, but also the interaction parameters between different virtual game objects. This is so that by cooperating with multiple virtual game objects, some skill coupling and interaction replication test situations can be reproduced.
[0058] Specifically, when there are multiple users, the generation method further includes:
[0059] b1: Obtain the interaction operation parameters of multiple users controlling different virtual game objects to interact in the target scene, as well as the behavior overlap parameters between different virtual game objects, so as to use the testing tool to replicate the virtual interaction events of virtual game objects in the target scene based on the interaction operation parameters, the behavior overlap parameters, and the operation parameters.
[0060] In this embodiment of the application, when there are multiple users, it is necessary to obtain the interaction operation parameters of multiple users controlling different virtual game objects to interact in the target scene, as well as the behavior overlap parameters between multiple virtual game objects. When replicating the virtual interaction events of virtual objects in the target scene according to the operation parameters, it is also necessary to replicate the interaction operations between different virtual game objects through the interaction operation parameters and the behavior overlap parameters.
[0061] Specifically, the interaction operation parameters that control the interaction between different virtual game objects can be the timing and number of operations of the respective skill controls during the combination of skills between different users; they can also control the combat interaction between different virtual game objects, and in addition to recording the timing and number of operations of the respective skill controls, they can also record the skill release range and skill damage result; the behavior overlap parameters between different virtual game objects can be the repeated part of the movement trajectory of different virtual game objects and the number of repetitions, or the collision parameters (collision timing, collision location and collision result) when different virtual game objects (which can be between different virtual characters, or between a virtual character and other virtual objects in the game) collide.
[0062] For example, collision detection between virtual characters and objects such as virtual cabinets and virtual motors, and detection of virtual game objects hit by virtual character skills.
[0063] Furthermore, after at least one test engineer executes the same virtual interactive event through different clients, the corresponding operation parameters are executed through test tools to replicate the virtual interactive event of the virtual game object in the target scene, and the virtual event is monitored at the appropriate time according to the interactive event test requirements, thereby generating monitoring instructions that can be inserted.
[0064] S102. Using a testing tool, the virtual interactive events of the virtual game object in the target scene are replicated according to the operating parameters, and the virtual interactive events are monitored according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events.
[0065] In this embodiment, the testing tool obtains the operation parameters, automatically acquires multiple clients during the operation process based on these parameters, creates a corresponding number of virtual game objects, and automatically joins the battle. Each virtual game object, according to its own game object, parses the corresponding operation parameters to control the game client, reproducing the virtual interaction events of the virtual game objects in the target scene.
[0066] In one possible implementation, when there are multiple users, there are also multiple game clients. In this case, since multiple clients cooperate to reproduce virtual interactive events, some complex situations of skill coupling and interaction can also be reproduced during the reproduction.
[0067] Furthermore, when simulating interactive events using testing tools, monitoring instructions need to be inserted during the replication process to generate test cases using the monitoring instructions and operation parameters.
[0068] In one possible implementation, the interactive event testing requirements include virtual game object testing requirements and / or object interaction monitoring requirements.
[0069] Specifically, the testing requirements for virtual game objects are generally for the invisible values of virtual game objects during the game process (such as the movement speed of virtual game objects during the game); the requirements for object interaction monitoring are for detecting the interaction (collision) between different virtual game objects.
[0070] Specifically, the step "monitoring the virtual interactive events according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events" includes:
[0071] c1: Based on the monitoring object and monitoring requirements indicated by the virtual game object testing requirements, during the process of replicating the virtual interaction events of the virtual game object in the target scene, at the time node when the monitoring object executes the monitoring requirements, after adding the corresponding virtual game object testing requirements, a monitoring instruction for the virtual interaction event is generated; or,
[0072] c2: Based on the object interaction monitoring requirement, multiple interactive virtual objects are added during the process of the multiple interactive virtual objects performing virtual game interaction behavior, and monitoring instructions for virtual interaction events are generated.
[0073] In this embodiment of the application, based on the monitoring object and monitoring requirements indicated by the virtual game object testing requirements, the time node at which the corresponding monitoring object executes the corresponding monitoring requirements during the process of replicating the virtual interactive events of the virtual game object in the target scene is determined, and then the corresponding virtual game object testing requirements are added at the corresponding time node to generate monitoring instructions for the virtual interactive events.
[0074] For example, a virtual game object test requirement indicates the test of the normal movement speed of virtual game object J. The test requirement needs to be inserted at a point in time during the normal movement of virtual game object J. The test requirement could be "whether the speed of virtual game object J is equal to 50".
[0075] Furthermore, the testing requirements for virtual game objects can also be for the linkage testing between multiple virtual game objects. This requires multiple interactive virtual objects as indicated by the object interaction monitoring requirements, and in the process of the virtual game objects performing virtual game interaction behaviors in the replicated target scene, the corresponding object interaction monitoring requirements are added to generate monitoring instructions for virtual interaction time events.
[0076] For example, the above monitoring instructions can be inserted at the time points specified in the test requirements to test collision detection between virtual objects in the game, the hit rate of virtual character skills in the game, and timed tests of speed changes, thereby generating the corresponding monitoring instructions.
[0077] In one possible implementation, after determining the operating parameters and monitoring instructions, the two can be combined to generate test cases.
[0078] S103. Generate test cases based on the operating parameters and the at least one monitoring instruction.
[0079] In this application embodiment, a test case refers to a description of a testing task for a specific software product (in this application embodiment, it is for a game APP). It embodies the test plan, method, technology, and strategy. That is, in this application, by replicating the virtual interactive events of virtual game objects in the target scene, the virtual interactive events are monitored at different test nodes according to different interactive event test requirements to generate at least one monitoring instruction for the virtual interactive events, which is inserted into the process of executing the virtual interactive events. Then, after generating test cases according to the operation parameters and the at least one monitoring instruction, by executing the test cases, not only can the test requirements be executed to obtain test results, but the process of virtual game objects performing virtual interactive events can also be reproduced to accurately determine the test nodes and test results in the game process, and thus accurately determine the test problems.
[0080] In one possible implementation, after generating test cases, the test cases can be easily extended to enrich the types and diversity of test cases.
[0081] In one possible implementation, the expansion can be achieved by adding new virtual interactive event requirements. These new virtual interactive event requirements extend the test cases. For example, new virtual interactive events can be added to the existing set of acquired operation parameters. The specific additions and testing methods are determined by the test requirements.
[0082] In one possible implementation, the generation method further includes:
[0083] d1: Determine the new operation parameters corresponding to the new requirements of virtual interactive events.
[0084] d2: Using the testing tool, execute the new interactive event in the target scenario according to the new operation parameters, and during the execution of the new interactive event, write the corresponding new interactive monitoring requirements and generate new monitoring instructions for the virtual interactive event.
[0085] d3: Add the new operation parameters and the new monitoring instructions to the test cases to obtain the expanded test cases.
[0086] In this embodiment, virtual interactive events can also be identified outside the basic set of operation parameters. In this case, it is necessary to determine the new operation parameters corresponding to the new requirements of the virtual interactive events. The new operation parameters are used to simulate the corresponding virtual interactive events when the client executes the new operation parameters. Then, after adding the new operation parameters and the new monitoring instructions to the test cases, the expanded test cases are obtained. Thus, the expansion of the test cases can be completed quickly without having to replicate the process of virtual interactive events of virtual game objects in the target scene.
[0087] For example, if you need to insert test instructions for acceleration skills, you need to first add new operation parameters for the acceleration skill control to simulate the implementation process of acceleration skills.
[0088] Furthermore, after simulating the corresponding new virtual interactive events based on the new operation parameters, the new interactive events are executed in the target scenario according to the detection timing indicated by the virtual interactive events using a testing tool, and corresponding test instructions are inserted during the execution of the new interactive events to generate new monitoring instructions for the virtual interactive events.
[0089] In the example above, after testing the normal movement speed of the virtual game object J, it is necessary to add an acceleration control process to the virtual game object J. Then, the operation parameters of the acceleration skill can be inserted into the normal movement process of the virtual game object J, and then the monitoring command "Is the speed of the virtual game object J equal to 50 and the speed increased to 60" can be used.
[0090] Specifically, adding a new monitoring command can be adding a monitoring command other than the existing monitoring command for the same virtual game object; it can also be adding a new virtual game object for monitoring for the same monitoring command.
[0091] For example, if the generated test case is to test the normal movement speed of virtual game object J, then, for testing virtual game object J, inserting a combat event of releasing an acceleration skill into the generated test case can generate a new test case to test the movement speed of virtual game object J when releasing a skill (with acceleration effect); or, inserting an instruction to change game characters in the game at the beginning of the test case can form a new test case to test the normal movement speed of other virtual game objects.
[0092] In one possible implementation, after generating test cases, the testing tool can be started periodically to test the game's functionality using different test cases.
[0093] Specifically, the generation method is also used for:
[0094] e1: Using the testing tool, execute the test cases according to the preset test time nodes, and generate game test results based on the execution results of the test cases.
[0095] In one possible implementation, testing tools are used to execute test cases according to preset test time nodes, and the game test results are used to indicate the game's adjustment strategy.
[0096] Specifically, during test case execution, the testing tool filters the game logs, extracts the corresponding actual game combat values, and compares them with the values at the numerical test points. If the overall numerical results are consistent with the preset values, then this test case can be placed in the regression task. If the overall numerical results are inconsistent with the preset values, then the overall game logic needs to be modified.
[0097] Furthermore, the testing tool records the test results of the numerical points of all combat regression test cases in the regression test task. When all regression test cases have been tested, an HTML format test report can be generated to notify the test engineer to conduct the acceptance of this regression test.
[0098] The game test case generation method provided in this application embodiment obtains user operation parameters for virtual game objects in a target scene; uses a testing tool to replicate virtual interaction events of the virtual game objects in the target scene according to the operation parameters; monitors the virtual events according to different interaction event testing requirements; generates at least one monitoring instruction for the virtual interaction events; and then generates test cases based on the operation parameters and at least one monitoring instruction. In this application embodiment, by using a testing tool to obtain user operation parameters for virtual objects in a target scene, the virtual interaction events of the virtual game objects in the target scene are replicated. Simultaneously, at least one monitoring instruction is generated according to different interaction event testing requirements. Test cases are generated based on the operation parameters and the at least one monitoring instruction. This method not only generates test cases that can test virtual interaction events in the game, improving the accuracy of game testing, but also meets the testing requirements of different interaction events, further enhancing the comprehensiveness of test case generation and game testing.
[0099] Based on the same inventive concept, this application also provides a device for generating game test cases corresponding to the method for generating game test cases. Since the principle of the device in this application is similar to the method for generating game test cases described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0100] Please see Figure 3 , Figure 4 , Figure 3This is one of the structural schematic diagrams of a game test case generation device provided in an embodiment of this application. Figure 4 This is a second schematic diagram of a device for generating game test cases provided in an embodiment of this application. Figure 3 As shown, the generating apparatus 300 includes:
[0101] The parameter acquisition module 310 is used to acquire the user's operation parameters for virtual game objects in the target scene;
[0102] The instruction generation module 320 is used to replicate the virtual interactive events of the virtual game object in the target scene according to the operation parameters using a testing tool, and to monitor the virtual interactive events according to different interactive event testing requirements, so as to generate at least one monitoring instruction for the virtual interactive events.
[0103] The test case generation module 330 is used to generate test cases based on the operation parameters and the at least one monitoring instruction.
[0104] In one possible implementation, such as Figure 4 As shown, the number of users is one or more; when the number of users is multiple, the generating device 300 further includes a parameter determining module 340, the parameter determining module 340 being used for:
[0105] The system acquires interaction parameters of multiple users controlling different virtual game objects in a target scene, as well as behavioral overlap parameters between different virtual game objects, so as to use the testing tool to replicate the virtual interaction events of virtual game objects in the target scene based on the interaction parameters, the behavioral overlap parameters, and the operation parameters.
[0106] In one possible implementation, such as Figure 4 As shown, the use case extension module 350 is used for:
[0107] Determine the new operation parameters corresponding to the new requirements for virtual interactive events;
[0108] Using the aforementioned testing tool, new interactive events are executed in the target scenario according to the newly added operation parameters. During the execution of these new interactive events, corresponding new interaction monitoring requirements are written, generating new monitoring instructions for the virtual interactive events.
[0109] The newly added operation parameters and the newly added monitoring instructions are added to the test cases to obtain the expanded test cases.
[0110] In one possible implementation, such as Figure 4As shown, the generating device 300 further includes a test result determination module 360, which is used for:
[0111] The test tools are used to execute the test cases according to preset test time nodes, and game test results are generated based on the execution results of the test cases.
[0112] In one possible implementation, the operating parameters include at least one of the following:
[0113] The user's operation trajectory parameters for the skill controls, the user's operation duration parameters in the target scenario, and the user's operation frequency parameters in the target scenario.
[0114] In one possible implementation, the interactive event testing requirements include virtual game object testing requirements and / or object interaction monitoring requirements; when the instruction generation module 320 monitors the virtual interactive events according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events, the instruction generation module 320 is used to:
[0115] Based on the monitoring objects and monitoring requirements indicated by the virtual game object testing requirements, during the process of replicating the virtual interaction events of the virtual game objects in the target scene, at the time node when the monitoring object executes the monitoring requirements, after adding the corresponding virtual game object testing requirements, a monitoring instruction for the virtual interaction events is generated; or,
[0116] Based on the object interaction monitoring requirement, multiple interactive virtual objects are used to perform virtual game interaction behaviors. After adding the corresponding object interaction monitoring requirement, a monitoring instruction for the virtual interaction event is generated.
[0117] In one possible implementation, when the parameter acquisition module 310 is used to acquire user operation parameters for virtual game objects in a target scene, the parameter acquisition module 310 is used to:
[0118] The testing tool was used to control the client to interact in the same game scene;
[0119] Determine the target time period during which the virtual interactive event in the target scene occurs during the game interaction;
[0120] The operation parameters are determined based on multiple operation commands given by the user on the client within the target time period.
[0121] In one possible implementation, the virtual interactive event is a combat event within the target scene.
[0122] The game test case generation device provided in this application embodiment obtains user operation parameters for virtual game objects in a target scene; uses a testing tool to replicate virtual interaction events of the virtual game objects in the target scene according to the operation parameters; monitors the virtual events according to different interaction event testing requirements; generates at least one monitoring instruction for the virtual interaction events; and then generates test cases based on the operation parameters and at least one monitoring instruction. In this application embodiment, by using a testing tool to obtain user operation parameters for virtual objects in a target scene, replicating virtual interaction events of the virtual game objects in the target scene, and generating at least one monitoring instruction according to different interaction event testing requirements, and generating test cases based on the operation parameters and the at least one monitoring instruction, this device not only generates test cases that can test virtual interaction events in the game, improving the accuracy of game testing, but also meets the testing requirements of different interaction events, further enhancing the comprehensiveness of test case generation and game testing.
[0123] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 500 includes a processor 510, a memory 520, and a bus 530.
[0124] The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 communicates with the memory 520 via the bus 530, causing the processor 510 to execute the following instructions during operation:
[0125] Obtain the user's operation parameters for virtual game objects in the target scenario;
[0126] Using testing tools, the virtual interactive events of the virtual game object in the target scene are replicated according to the operating parameters, and the virtual interactive events are monitored according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events.
[0127] Test cases are generated based on the operating parameters and the at least one monitoring instruction.
[0128] In one possible implementation, the operating parameters include at least one of the following:
[0129] The user's operation trajectory parameters for the skill controls, the user's operation duration parameters in the target scenario, and the user's operation frequency parameters in the target scenario.
[0130] In one possible implementation, the number of users is one or more; when the number of users is multiple, the instructions executed by the processor 510 further include:
[0131] The system acquires interaction parameters of multiple users controlling different virtual game objects in a target scene, as well as behavioral overlap parameters between different virtual game objects, so as to use the testing tool to replicate the virtual interaction events of virtual game objects in the target scene based on the interaction parameters, the behavioral overlap parameters, and the operation parameters.
[0132] In one possible implementation, the interactive event testing requirements include virtual game object testing requirements and / or object interaction monitoring requirements; the instructions executed by the processor 510, wherein monitoring the virtual interactive events according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events, includes:
[0133] Based on the monitoring objects and monitoring requirements indicated by the virtual game object testing requirements, during the process of replicating the virtual interaction events of the virtual game objects in the target scene, at the time node when the monitoring object executes the monitoring requirements, after adding the corresponding virtual game object testing requirements, a monitoring instruction for the virtual interaction events is generated; or,
[0134] Based on the object interaction monitoring requirement, multiple interactive virtual objects are used to perform virtual game interaction behaviors. After adding the corresponding object interaction monitoring requirement, a monitoring instruction for the virtual interaction event is generated.
[0135] In one possible implementation, the instructions executed by the processor 510 further include:
[0136] Determine the new operation parameters corresponding to the new requirements for virtual interactive events;
[0137] Using the aforementioned testing tool, new interactive events are executed in the target scenario according to the newly added operation parameters. During the execution of the new interactive events, corresponding new interactive monitoring requirements are written, and new monitoring instructions for virtual interactive events are generated.
[0138] The newly added operation parameters and the newly added monitoring instructions are added to the test cases to obtain the expanded test cases.
[0139] In one possible implementation, the instructions executed by the processor 510, including obtaining the user's operation parameters for the virtual game object in the target scene, include:
[0140] The testing tool was used to control the client to interact in the same game scene;
[0141] Determine the target time period during which the virtual interactive event in the target scene occurs during the game interaction;
[0142] The operation parameters are determined based on multiple operation commands given by the user on the client within the target time period.
[0143] In one possible implementation, the virtual interactive event is a combat event within the target scene.
[0144] In one possible implementation, the instructions executed by the processor 510 further include:
[0145] The test tools are used to execute the test cases according to preset test time nodes, and game test results are generated based on the execution results of the test cases.
[0146] By utilizing the above method, testing tools acquire user operation parameters on virtual objects in a target scenario, replicating virtual interactive events of virtual game objects in that scenario. Simultaneously, at least one monitoring instruction is generated based on different interactive event testing requirements. Test cases are generated based on the operation parameters and the at least one monitoring instruction. This not only improves the accuracy of game testing by generating test cases that can test virtual interactive events in the game, but also satisfies different interactive event testing needs, further enhancing the comprehensiveness of test case generation and game testing. Furthermore, when acquiring user operation parameters for virtual game objects, the time period of the tested virtual interactive event is recorded as needed, and operation parameters generated during the game are filtered, recording only those corresponding to the virtual interactive events. This helps improve the efficiency of operation parameter acquisition and saves storage space. Additionally, after generating test cases, they can be easily expanded to enrich the types and diversity of test cases.
[0147] This application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the following instructions:
[0148] Obtain the user's operation parameters for virtual game objects in the target scenario;
[0149] Using testing tools, the virtual interactive events of the virtual game object in the target scene are replicated according to the operating parameters, and the virtual interactive events are monitored according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events.
[0150] Test cases are generated based on the operating parameters and the at least one monitoring instruction.
[0151] In one possible implementation, the operating parameters include at least one of the following:
[0152] The user's operation trajectory parameters for the skill controls, the user's operation duration parameters in the target scenario, and the user's operation frequency parameters in the target scenario.
[0153] In one possible implementation, the number of users is one or more; when the number of users is multiple, the instructions executed by the computer-readable storage medium further include:
[0154] The system acquires interaction parameters of multiple users controlling different virtual game objects in a target scene, as well as behavioral overlap parameters between different virtual game objects, so as to use the testing tool to replicate the virtual interaction events of virtual game objects in the target scene based on the interaction parameters, the behavioral overlap parameters, and the operation parameters.
[0155] In one possible implementation, the interactive event testing requirements include virtual game object testing requirements and / or object interaction monitoring requirements; the instructions executable by the computer-readable storage medium, wherein monitoring the virtual interactive events according to different interactive event testing requirements to generate at least one monitoring instruction for the virtual interactive events, includes:
[0156] Based on the monitoring objects and monitoring requirements indicated by the virtual game object testing requirements, during the process of replicating the virtual interaction events of the virtual game objects in the target scene, at the time node when the monitoring object executes the monitoring requirements, after adding the corresponding virtual game object testing requirements, a monitoring instruction for the virtual interaction events is generated; or,
[0157] Based on the object interaction monitoring requirement, multiple interactive virtual objects are used to perform virtual game interaction behaviors. After adding the corresponding object interaction monitoring requirement, a monitoring instruction for the virtual interaction event is generated.
[0158] In one possible implementation, the instructions executed by the computer-readable storage medium further include:
[0159] Determine the new operation parameters corresponding to the new requirements for virtual interactive events;
[0160] Using the aforementioned testing tool, new interactive events are executed in the target scenario according to the newly added operation parameters. During the execution of the new interactive events, corresponding new interactive monitoring requirements are written, and new monitoring instructions for virtual interactive events are generated.
[0161] The newly added operation parameters and the newly added monitoring instructions are added to the test cases to obtain the expanded test cases.
[0162] In one possible implementation, the instructions executed by the computer-readable storage medium, wherein obtaining user operation parameters for virtual game objects in a target scenario, includes:
[0163] The testing tool was used to control the client to interact in the same game scene;
[0164] Determine the target time period during which the virtual interactive event in the target scene occurs during the game interaction;
[0165] The operation parameters are determined based on multiple operation commands given by the user on the client within the target time period.
[0166] In one possible implementation, the virtual interactive event is a combat event within the target scene.
[0167] In one possible implementation, the instructions executed by the computer-readable storage medium further include:
[0168] The test tools are used to execute the test cases according to preset test time nodes, and game test results are generated based on the execution results of the test cases.
[0169] By utilizing the above method, testing tools acquire user operation parameters on virtual objects in a target scenario, replicating virtual interactive events of virtual game objects in that scenario. Simultaneously, at least one monitoring instruction is generated based on different interactive event testing requirements. Test cases are generated based on the operation parameters and the at least one monitoring instruction. This not only improves the accuracy of game testing by generating test cases that can test virtual interactive events in the game, but also satisfies different interactive event testing needs, further enhancing the comprehensiveness of test case generation and game testing. Furthermore, when acquiring user operation parameters for virtual game objects, the time period of the tested virtual interactive event is recorded as needed, and operation parameters generated during the game are filtered, recording only those corresponding to the virtual interactive events. This helps improve the efficiency of operation parameter acquisition and saves storage space. Additionally, after generating test cases, they can be easily expanded to enrich the types and diversity of test cases.
[0170] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0172] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0173] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0174] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0175] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for generating game test cases, characterized in that, The generation method includes: Obtain the user's operation parameters for virtual game objects in the target scenario; Using testing tools, virtual interaction events of virtual game objects in the target scene are replicated according to the operating parameters. These virtual interaction events are then monitored according to different testing requirements to generate at least one monitoring instruction for each event. The testing requirements for these interaction events include virtual game object testing requirements and / or object interaction monitoring requirements. The virtual game object testing requirements are for detecting invisible values of the virtual game objects during the game process. The object interaction monitoring requirements are for detecting interactions between different virtual game objects. Based on the virtual interaction events of the virtual game object in the target scene, a basic set of operation parameters is generated; Test cases are generated based on the operating parameters and at least one monitoring instruction; For new interactive events beyond the basic set of operation parameters, the test tool executes the new interactive events based on the new operation parameters corresponding to the new requirements. After adding the new operation parameters and new monitoring instructions to the test cases, the test cases are expanded without having to replicate the process of virtual interactive events of virtual game objects in the target scene.
2. The generation method according to claim 1, characterized in that, The operating parameters include at least one of the following: The user's operation trajectory parameters for the skill controls, the user's operation duration parameters in the target scenario, and the user's operation frequency parameters in the target scenario.
3. The generation method according to claim 1, characterized in that, The number of users can be one or more; when the number of users is multiple, the generation method further includes: The system acquires interaction parameters of multiple users controlling different virtual game objects in a target scene, as well as behavioral overlap parameters between different virtual game objects, so as to use the testing tool to replicate the virtual interaction events of virtual game objects in the target scene based on the interaction parameters, the behavioral overlap parameters, and the operation parameters.
4. The generation method according to claim 1, characterized in that, The monitoring of the virtual interactive events according to different interactive event testing requirements, to generate at least one monitoring instruction for the virtual interactive events, includes: Based on the monitoring objects and monitoring requirements indicated by the virtual game object testing requirements, during the process of replicating the virtual interaction events of the virtual game objects in the target scene, at the time node when the monitoring object executes the monitoring requirements, after adding the corresponding virtual game object testing requirements, a monitoring instruction for the virtual interaction events is generated; or, Based on the object interaction monitoring requirement, multiple interactive virtual objects are used to perform virtual game interaction behaviors. After adding the corresponding object interaction monitoring requirement, a monitoring instruction for the virtual interaction event is generated.
5. The generation method according to claim 1, characterized in that, The process of executing the new interactive event based on the new operation parameters corresponding to the new requirements using the testing tool, and adding the obtained new operation parameters and new monitoring instructions to the test cases, expands the test cases without having to replicate the process of virtual interactive events of virtual game objects in the target scene. This includes: Determine the new operation parameters corresponding to the new requirements for virtual interactive events; Using the aforementioned testing tool, new interactive events are executed in the target scenario according to the newly added operation parameters. During the execution of the new interactive events, corresponding new interactive monitoring requirements are written, and new monitoring instructions for virtual interactive events are generated. The newly added operation parameters and the newly added monitoring instructions are added to the test cases to obtain the expanded test cases.
6. The generation method according to claim 1, characterized in that, The acquisition of user operation parameters for virtual game objects in the target scenario includes: The testing tool was used to control the client to interact in the same game scene; Determine the target time period during which the virtual interactive event in the target scene occurs during the game interaction; The operation parameters are determined based on multiple operation commands given by the user on the client within the target time period.
7. The generation method according to claim 1, characterized in that, The virtual interactive events are combat events within the target scenario.
8. The generation method according to claim 1, characterized in that, After generating test cases based on the operating parameters and the at least one monitoring instruction, the generation method further includes: The test tools are used to execute the test cases according to preset test time nodes, and game test results are generated based on the execution results of the test cases.
9. A device for generating game test cases, characterized in that, The generating apparatus includes: The parameter acquisition module is used to acquire the user's operation parameters for virtual game objects in the target scenario; The instruction generation module is used to replicate virtual interaction events of virtual game objects in the target scene using testing tools according to the operation parameters, and to monitor the virtual interaction events according to different interaction event testing requirements, so as to generate at least one monitoring instruction for the virtual interaction events; wherein, the interaction event testing requirements include virtual game object testing requirements and / or object interaction monitoring requirements; the virtual game object testing requirements are the requirements for detecting invisible values of the virtual game objects in the game process; the object interaction monitoring requirements are the requirements for detecting interactions between different virtual game objects; The test case generation module is used to generate test cases based on the operation parameters and the at least one monitoring instruction. The generating device is also used to: generate a basic set of operation parameters based on the virtual interactive events of the virtual game object in the target scene; For new interactive events beyond the basic set of operation parameters, the test tool executes the new interactive events based on the new operation parameters corresponding to the new requirements. After adding the new operation parameters and new monitoring instructions to the test cases, the test cases are expanded without having to replicate the process of virtual interactive events of virtual game objects in the target scene.
10. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for generating game test cases as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method for generating game test cases as described in any one of claims 1 to 8.