Use case processing method and apparatus, storage medium, and electronic device
Patent Information
- Application Number
- CN202210716041.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-06-22
AI Technical Summary
[0005]本公开的目的在于提供一种用例处理方法、用例处理装置、计算机可读存储介质以及电子设备,进而至少在一定程度上克服由于相关技术的限制和缺陷而导致的用例处理效率较低的问题
[0074]本公开实施例提供的一种用例处理方法,一方面,通过对对录制用例进行回合切片,得到多个单回合的切片用例;然后根据单回合的切片用例中包括的用例属性信息,生成用例标签;最后基于用例标签对单回合的切片用例进行标识,实现了根据用例标签对单回合的切片用例进行管理,解决了现有技术中由于无法对单回合的切片用例进行管理进而导致的用例管理效率较低的问题;另一方面,由于可以基于用例标签对单回合的切片用例进行标识,进而使得在后期需要进行用例测试或者用例回放时,可以直接根据用例标签匹配对应的单回合切片用例,提高了用例的匹配效率,进而提升了用例的测试效率或者用例的回放效率。
Smart Images

Figure CN115203020B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of automated testing technology in games, and more specifically, to a test case processing method, a test case processing device, a computer-readable storage medium, and an electronic device. Background Technology
[0002] In some automated testing methods, this can be achieved as follows: First, record the operation sequences and random number seeds for each character; then, modify the random number generation part of the game logic (ensuring that the same random number seed generates the same random number sequence) to achieve the effect that the same input operation sequence and the same random number seed can produce the same output; furthermore, the differences between the output results can be judged by repeatedly running the same operation sequence and random number seed, and then potential problems can be analyzed based on the differences.
[0003] However, in the above testing methods, since a test case often contains multiple rounds and multiple test points, as well as coupling and propagation between different rounds, it is impossible to manage the recorded test cases for a single round, which results in low test case management efficiency.
[0004] It should be noted that the information in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this disclosure is to provide a use case processing method, use case processing apparatus, computer-readable storage medium, and electronic device, thereby overcoming, at least to some extent, the problem of low use case processing efficiency caused by limitations and defects in related technologies.
[0006] According to one aspect of this disclosure, a use case processing method is provided, comprising:
[0007] Obtain recorded test cases and slice the recorded test cases into rounds to obtain multiple single-round slice test cases;
[0008] Based on the test case attribute information included in the sliced test cases of the single round, generate test case tags;
[0009] The sliced use cases of the single round are identified based on the use case tags.
[0010] In one exemplary embodiment of this disclosure, before acquiring the recorded use case, the use case processing method further includes:
[0011] The combat data generated by the virtual object in the current combat scenario is recorded to obtain recording test cases, and the recording test cases are stored in the recording test case database.
[0012] In one exemplary embodiment of this disclosure, combat data generated by virtual objects in the current combat scenario is recorded to obtain a recording use case, including:
[0013] In a first preset scenario, combat data generated by the virtual object in the current combat scenario is recorded based on a random number seed, a first random number sequence generated according to the random number seed, and a second random number sequence obtained by editing the first random number sequence, to obtain a recording test case; wherein, the first preset scenario is a test scenario for testers; and / or
[0014] In the second preset scenario, based on a random number seed and a first random number sequence generated according to the random number seed, the combat data generated by the virtual object in the current combat scenario is recorded to obtain a recording example; wherein, the second preset scenario is a player's actual combat scenario.
[0015] In one exemplary embodiment of this disclosure, combat data generated by the virtual object in the current combat scenario is recorded based on a random number seed, a first random number sequence generated according to the random number seed, and a second random number sequence obtained by editing the first random number sequence, to obtain a recording use case, including:
[0016] S10, responding to the touch event of the tester acting on the preset interactive control, initializes the current battle scene and obtains the random number seed under the current battle scene;
[0017] S20, initialize the current round of battle in the current battle scene, and obtain the first character state of the virtual object and the first environmental state of the virtual object in the current battle scene;
[0018] S30, based on the random number seed, generate a first random number sequence for the current round, and in response to the current operation command of the tester acting on the virtual object in the current round, control the virtual object to execute the current operation command, and display the first target battle scene in the current round according to the first random number in the first random number sequence and the preset triggering conditions;
[0019] S40, calculate the second character state and the second environment state of the virtual object after it has completed the execution of the current operation command in the first target combat scene, and determine whether the second character state and the second environment state meet the expected execution result;
[0020] S50, if the expected execution result is met, then S60 is executed; if the expected execution result is not met, then in response to the tester's editing operation on the first random number sequence, a second random number sequence is obtained, and a second role state and a second environment state that meet the expected execution result are generated under the second random number sequence.
[0021] S60, repeat S20-S50 until all battle rounds in the current battle scenario end, and generate the recording test case based on the random number seed, the first character state, the first environment state, the current operation command, the first random number sequence and / or the second random number sequence, the second character state, and the second environment state.
[0022] In one exemplary embodiment of this disclosure, determining whether the second role state and the second environment state meet the expected execution result includes:
[0023] Determine whether the second role state and the second environment state are consistent with the expected role state and the expected environment state.
[0024] In one exemplary embodiment of this disclosure, generating a second role state and a second environment state that satisfy the expected execution result under a second random number sequence includes:
[0025] In response to the current operation command of the tester on the virtual object in the current round, the virtual object is controlled to execute the current operation command, and the target battle scene is displayed in the current round according to the second random number in the second sub-sequence and the preset triggering conditions;
[0026] Calculate the second character state and second environment state of the virtual object after it has completed the execution of the current operation command in the second target combat scenario, so as to generate a second character state and second environment state that meet the expected execution result.
[0027] In one exemplary embodiment of this disclosure, obtaining a second random number sequence in response to the tester's editing operation on the first random number sequence includes:
[0028] In response to the tester's editing operation on the first random number sequence, a second random number is generated based on a preset random number list and a random number builder;
[0029] The first random number in the first random number sequence corresponding to the editing operation is replaced by the second random number to obtain the second random number sequence.
[0030] In one exemplary embodiment of this disclosure, under a second preset scenario, combat data generated by the virtual object in the current combat scenario is recorded based on a random number seed and a first random number sequence generated according to the random number seed, resulting in a recording use case, including:
[0031] S10' responds to the player's touch event on the preset interactive control, initializes the current battle scene, and obtains the random number seed for the current battle scene;
[0032] S20', Initialize the current round of battle in the current battle scene, and obtain the first character state of the virtual object and the first environmental state of the virtual object in the current battle scene;
[0033] S30', Based on the random number seed, generate the first random number sequence for the current round, and in response to the player's current operation command on the virtual object in the current round, control the virtual object to execute the current operation command, and display the first target battle scene in the current round according to the first random number in the first random number sequence and the preset triggering conditions;
[0034] S40', Calculate the second character state and second environment state that the virtual object has after executing the current operation command in the first target combat scene;
[0035] S50', repeat S20'-S40' until all battle rounds in the current battle scenario end, and generate the recording test case based on the random number seed, the first character state, the first environment state, the current operation command, the first random number sequence, the second character state, and the second environment state.
[0036] In one exemplary embodiment of this disclosure, generating the recording use case based on the random number seed, the first role state, the first environment state, the current operation instruction, the first random number sequence and / or the second random number sequence, the second role state, and the second environment state includes:
[0037] Based on the current operation instruction and the input order of the current operation instruction, an operation instruction sequence is obtained;
[0038] Based on the first role state and the second role state, obtain role process state data, and based on the first environment state and the second environment state, obtain environment process state data;
[0039] The recording test case is generated based on the random number seed, the operation instruction sequence, the first random number sequence and / or the second random number sequence, the role process state data, and the environmental process state data.
[0040] In one exemplary embodiment of this disclosure, the recorded use cases are sliced into rounds to obtain multiple single-round sliced use cases, including:
[0041] Based on the combat rounds of the virtual object in the current combat scenario, the operation instruction sequence, first random number sequence and / or second random number sequence, character process state data and environmental process state data included in the recorded case are sliced to obtain multiple single-round operation instruction slices, single-round first random number sequence and / or second random number sequence, single-round initial state slices and single-round process state slices.
[0042] Based on the single-round operation instruction slice, the single-round first random number sequence and / or second random number sequence, the single-round initial state slice, and the single-round process state slice, generate the slice use cases for each single round.
[0043] In one exemplary embodiment of this disclosure, the use case attribute information includes instruction content and status content;
[0044] Specifically, based on the use case attribute information included in the sliced use cases of the single round, use case tags are generated, including:
[0045] Based on the instruction content included in the single-round operation instruction slice, generate single-round instruction content tags, and based on the state content included in the single-round process state slice, generate single-round state content tags.
[0046] Generate single-round use case tags based on the instruction content tags and status content tags.
[0047] In one exemplary embodiment of this disclosure, generating slice use cases for each of the single rounds based on the single round's operation instruction slice, the single round's first random number sequence and / or second random number sequence, the single round's initial state slice, and the single round's process state slice includes:
[0048] The initial state data for a single round is generated based on the initial state slices of the environment and the character, which are included in the initial state slice of the single round.
[0049] Based on the environmental process state slice and the role process state slice included in the single-round process state slice, generate single-round process state data.
[0050] The single-round operation instruction slice, the single-round first random number sequence and / or second random number sequence, the single-round initial state data, and the single-round process state data are combined to obtain the single-round slice use case.
[0051] In one exemplary embodiment of this disclosure, the use case processing method further includes:
[0052] Based on the use case tags of the single-round slice use cases, obtain the single-round slice use cases to be replayed;
[0053] Perform test case replay on the slice test cases of the single round to obtain the replay test cases of the single round.
[0054] In one exemplary embodiment of this disclosure, the single-round slice use case to be replayed is replayed to obtain the single-round replay use case, including:
[0055] In response to a touch event acting on a preset interactive control, the current battle scene is initialized, and a random number seed for the current battle scene is loaded from the slice of the single round to be replayed.
[0056] Load the initial state data of the virtual object in the current round corresponding to the slice use case of the single round to be replayed from the slice use case of the single round to be replayed, and initialize the current round according to the initial state data;
[0057] Load the sequence of operation instructions of the virtual object in the current round corresponding to the slice use case of the single round to be replayed, as well as the first random number sequence and / or the second random number sequence of the current battle scene in the current round from the slice use case of the single round to be replayed.
[0058] Control the virtual object to execute the current operation instruction, and display the first target battle scene and / or the second target battle scene in the current round according to the first random number sequence and / or the second random number sequence and the preset triggering conditions;
[0059] Calculate the process state data of the virtual object after it has completed the execution of the current operation command in the first target battle scenario and / or the second target battle scenario, and generate the replay use case for the single round based on the process state data.
[0060] In one exemplary embodiment of this disclosure, the use case processing method further includes:
[0061] The differences between the playback status data included in the single-round playback use case and the recording status data included in the single-round slice use case are analyzed.
[0062] In one exemplary embodiment of this disclosure, the use case processing method further includes:
[0063] If the difference analysis result is that the playback status data and the recording status data are inconsistent, then the inconsistent single-round slice use cases are located according to the use case sequence of the single-round slice use cases to obtain the abnormal slice use cases.
[0064] An anomaly alarm message is generated based on the anomaly slice use case, and the anomaly alarm message is displayed.
[0065] According to one aspect of this disclosure, a use case processing apparatus is provided, comprising:
[0066] The test case slicing module is used to acquire recorded test cases and slice the recorded test cases into rounds to obtain multiple single-round sliced test cases;
[0067] The use case tag generation module is used to generate use case tags based on the use case attribute information included in the sliced use cases of the single round;
[0068] The use case identification module is used to identify the sliced use cases of the single round based on the use case tags.
[0069] According to one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the use case processing method described in any of the preceding claims.
[0070] According to one aspect of this disclosure, an electronic device is provided, comprising:
[0071] Processor; and
[0072] Memory for storing the executable instructions of the processor;
[0073] The processor is configured to execute any of the above-described use case processing methods by executing the executable instructions.
[0074] This disclosure provides a test case processing method. On one hand, it involves slicing recorded test cases into rounds to obtain multiple single-round slice test cases. Then, test case tags are generated based on the test case attribute information included in the single-round slice test cases. Finally, the single-round slice test cases are identified based on the test case tags, thereby enabling the management of single-round slice test cases based on test case tags. This solves the problem of low test case management efficiency caused by the inability to manage single-round slice test cases in the prior art. On the other hand, since single-round slice test cases can be identified based on test case tags, when test case testing or test case replay is required later, the corresponding single-round slice test cases can be directly matched based on the test case tags, improving the test case matching efficiency and thus improving the test case testing efficiency or test case replay efficiency.
[0075] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0076] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0077] Figure 1 The illustration shows an example scenario of regression testing in a game.
[0078] Figure 2 A flowchart illustrating a use case processing method according to an example embodiment of the present disclosure is shown schematically.
[0079] Figure 3 A flowchart illustrating a method for generating a second random number sequence according to an exemplary embodiment of the present disclosure is shown.
[0080] Figure 4 This diagram illustrates an example of the recording process for a recording use case according to an exemplary embodiment of this disclosure.
[0081] Figure 5 The illustration shows an example scenario of generating a recording use case according to an example embodiment of the present disclosure.
[0082] Figure 6 The diagram schematically illustrates an example slicing process for a single-round slicing use case according to an exemplary embodiment of this disclosure.
[0083] Figure 7 The diagram illustrates an example scenario for generating a single-round slice use case according to an exemplary embodiment of the present disclosure.
[0084] Figure 8 The flowchart illustrates a method for replaying a single-round slice of a use case to be replayed, according to an exemplary embodiment of the present disclosure.
[0085] Figure 9 The diagram illustrates an example of a playback process for a single-round slice use case according to an exemplary embodiment of the present disclosure.
[0086] Figure 10 The diagram illustrates a scenario example of a playback process for a single-round slice use case according to an exemplary embodiment of the present disclosure.
[0087] Figure 11A block diagram of a use case processing apparatus according to an example embodiment of the present disclosure is shown schematically.
[0088] Figure 12 An electronic device for implementing the above-described use case processing method is illustrated according to an example embodiment of the present disclosure. Detailed Implementation
[0089] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0090] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0091] Mobile games have become an increasingly popular form of entertainment, and the game market continues to expand. Among various game genres, turn-based MMOs (Massive Multiplayer Online Games) hold one of the largest market shares and are very common in the market.
[0092] MMOs, with their unique turn-based combat, are beloved by a wide range of players. This also means that turn-based combat is often the core of these games, serving as the primary vehicle for other gameplay elements and systems. Therefore, development often involves significant additions to the combat and skill systems, from daily activities and advanced PvP battles to new expansions. Furthermore, as the game continues to operate, the logical complexity of the combat and skill systems increases exponentially, leading to a surge in testing. Relying solely on manual testing for each requirement adjustment often only covers newly added logic, leaving related changes and regression testing less covered, posing a significant risk to product quality. Therefore, developing an efficient automated regression testing solution for combat skills is essential.
[0093] To address the aforementioned issues, three common regression testing strategies are used for turn-based games' combat skill systems: dummy testing, AI behavior tree-driven test cases, and regression testing based on recording and playback. Among these:
[0094] The specific implementation process of the "stupid doll test" is as follows: A character resembling a stupid doll is set up in the game. This character cannot retaliate and has unlimited health, meaning it cannot die. Then, logical verification is performed using pre-defined operation commands. The advantage of this test is its simple logic setup and ease of construction; however, its disadvantages are also quite obvious: it can only cover very basic numerical data types or simple logical judgments; for example, the damage of skill A against a large stupid doll, or the health reduction of stupid doll A, etc., and cannot test more complex games.
[0095] The specific implementation process of AI behavior tree-driven testing is as follows: Based on the stake test, behavior trees are added to both parties being tested, allowing them to behave according to the designer's intentions. Then, the actual operation results are compared with the expected values to confirm whether there are any anomalies. The advantage of this method is that it can cover complex test cases, but because the writing of AI behavior trees is generally very complex and time-consuming, it places very high demands on testers.
[0096] The specific implementation process of recording and playback is as follows: The operation sequences and random number seeds for each character are recorded. Then, the random number generation part of the game logic is modified (ensuring that the same random number seed generates the same random number sequence), achieving the effect that the same input + random number seed yields the same output. By repeatedly running the same sequence and seed, differences in results are judged to identify potential problems. This approach is also a relatively common regression testing method in the industry, but it also has many limitations.
[0097] For details, please refer to Figure 1As shown, during test case recording, testers input the necessary instructions into the test cases, and the game logic processes the content normally until the logic (battle) ends. The tester's "operation sequence" and the current battle's "random number seed" are saved sequentially, along with the battle result. During test case replay, the saved "operation sequence" and "random number seed" are input into the game logic until the logic (battle) ends. The replayed "battle result" is compared and analyzed with the recorded "battle result" to confirm whether any anomalies exist. However, this automated regression testing solution based on "recording and replay" primarily relies on repeated runs with a fixed random number seed and operation sequence to determine if there are differences in results and thus discover potential problems. This approach has the following issues:
[0098] On the one hand, test case construction is complex: using a fixed random number seed for test case recording means that once the random number seed is fixed, the generated random number sequence is also determined. However, when dealing with random elements in the logic, to obtain satisfactory results, there are generally two methods: one is to achieve the desired effect through repeated retries (i.e., constantly refreshing the random number seed) under a pure black-box approach. This method has relatively low requirements for the tester's skills, but predictably, it is very inefficient. The other method is to achieve the desired effect through white-box analysis, breaking down the logic code, and manually modifying some parts of the logic. This method can guarantee a certain level of efficiency, but because it requires a very thorough understanding of the business code, it places higher demands on the tester's skills.
[0099] On the other hand, test case expansion is inefficient: As mentioned above, the combat and skill systems in turn-based games are often very complex and require consideration of many coupling situations. In other words, full coverage would require a lot of regression test cases. Therefore, relying solely on testers to manually record test cases one by one is inefficient, requires a long test case recording time and a lot of recording manpower, and cannot keep up with the testing needs of rapid and agile development of game products.
[0100] On the other hand, test case maintenance is difficult: based on the recording and playback method, in order to ensure the efficiency of test case recording and execution, a test case, i.e. a battle, often contains multiple rounds, covering multiple test points, and there will be a strong coupling relationship between rounds; when the design requirements are adjusted, such as the balance value adjustment or protocol change, the coupling between rounds will cause the entire test case to need to be re-recorded, making the overall test case maintenance difficult.
[0101] Furthermore, the location of anomalies is unclear: As mentioned above, a test case often contains multiple rounds and multiple test points, as well as coupling and propagation between different rounds. This makes it difficult to immediately identify the specific anomaly when it occurs. It can only be confirmed that one or more test points in this test case have problems, which still requires manual intervention to sort out, resulting in low efficiency.
[0102] Based on this, this exemplary embodiment first provides a use case processing method, which can run on terminal devices, servers, server clusters, or cloud servers, etc. Of course, those skilled in the art can also run the method disclosed herein on other platforms as needed, and this exemplary embodiment does not impose any special limitations on this. Specifically, refer to... Figure 2 As shown, the use case processing method may include the following steps:
[0103] Step S210. Obtain recorded test cases and perform round-based slicing on the recorded test cases to obtain multiple single-round sliced test cases;
[0104] Step S220. Generate use case tags based on the use case attribute information included in the single-round slice use cases;
[0105] Step S230. Identify the sliced use cases of the single round based on the use case tags.
[0106] In the above-described test case processing method, on the one hand, by slicing the recorded test cases into rounds, multiple single-round slice test cases are obtained; then, test case tags are generated based on the test case attribute information included in the single-round slice test cases; finally, the single-round slice test cases are identified based on the test case tags, realizing the management of single-round slice test cases based on test case tags, solving the problem of low test case management efficiency caused by the inability to manage single-round slice test cases in the prior art; on the other hand, since single-round slice test cases can be identified based on test case tags, when test case testing or test case replay is required later, the corresponding single-round slice test cases can be directly matched based on the test case tags, improving the test case matching efficiency, thereby improving the test case testing efficiency or test case replay efficiency.
[0107] The following will provide a detailed explanation and description of the example embodiment use case processing method of this disclosure in conjunction with the accompanying drawings.
[0108] First, the terms used in the example embodiments of this disclosure will be explained and described:
[0109] Turn-based combat: The basic unit is the "turn". Each character can only act once in each "turn" (for example, in mahjong, each player completes one round of drawing and discarding a card). Each character has an attribute that determines the order of play, such as "speed" (and this attribute can change during combat).
[0110] Battle Process: The battle process is generally divided into the following stages: round preparation (initialization of some logic, status judgment, etc.) → command issuance (each character decides the command to be made in this round) → command execution stage (execute commands in sequence according to "speed" and calculate the results) → round end (determine whether the battle is over, if not, start a new round).
[0111] Turn-based combat logic: First, combat logic can be understood as the main framework of the entire battle, controlling the switching of combat phases, the determination of victory or defeat, etc.; second, skill logic refers to the execution logic of specific commands, such as the effect of skill A, the effect of skill B, etc.; turn-based combat is mainly composed of combat logic and skill logic. Adjusting the logic of any part may lead to changes in the subsequent results (such as increasing the damage of skill A, adjusting the rules for determining victory or defeat, etc.), so regression testing is mainly focused on these two parts of the logic;
[0112] Random number generation: Common computer random number generation methods typically employ pseudo-randomness, using a deterministic function (often linear or congruent) and a seed (often a clock). Therefore, if the seed is determined, the subsequent random number sequence can be obtained.
[0113] Secondly, the inventive objectives of the exemplary embodiments disclosed herein will be explained and described.
[0114] To address the aforementioned technical issues, the test case processing method described in this disclosure primarily focuses on the following: Firstly, a test case recording method based on random number sequences: Firstly, for the random number generation module, it does not only fix the random number seed but also provides customized random number sequence writing, supporting modifications to any individual values, and each random number is independent and will not affect others; for example, if the original sequence is [1,6,3,9,8], the fourth sequence can be customized to 7, changing the sequence to [1,6,3,7,8] without affecting the generation of other random numbers; secondly, when recording test cases, the function call stack is used to explicitly indicate the source of the random number call; through this method, testers can modify the target random number return value in a black-box state when recording test cases, without involving combat logic code, thereby improving construction efficiency while significantly reducing the difficulty of test case construction.
[0115] On the other hand, the random logic of combat is modified to be independent: the existing combat system is modified to separate the random number generation logic for each battle, ensuring that random factors between battles do not affect each other; at the same time, key logic is instrumented, such as the issuance of operation commands and the generation of random numbers; furthermore, the operation sequences and random number sequences of players' actual combat on external game servers are saved as part of the regression test cases, that is, external game server combat data is introduced to expand the test case library, which can significantly improve the efficiency of test case expansion; at the same time, execution is test cases, using the actual behavior of players to generate a massive number of regression test cases.
[0116] On the other hand, by using instrumentation information, external real-world data can be automatically categorized and tagged. For example, if skill A is triggered in a certain use case, the use case can be tagged with skill A. Then, by combining the tags, testers can quickly filter out target use cases.
[0117] Furthermore, the recorded test cases are automatically sliced using combat rounds as units: First, an automated slicing tool is built to split multi-round, multi-test-point regression test cases into rounds, with each round being independent and decoupled; in this way, a composite test case with multiple rounds and multiple test points can be quickly split into multiple single-round, single-test-point test cases; second, a rapid recovery module is built in the combat logic, which can quickly restore the state of the target round based on the slicing results, then execute the operation instructions of the target round, and compare and analyze the results to determine whether there are any anomalies.
[0118] Based on the above description, it can be seen that in the test case processing method provided in the example embodiments of this disclosure, the entire test case recording process is transparent to the test case recording personnel, so it will not affect their recording efficiency. Furthermore, since slicing and recovery tools are provided, the unit of the test case is smaller, which can greatly reduce the impact of requirement changes on the test case library. Any change in requirements only affects the test case in a single round and will not cause the entire test case to be re-recorded. At the same time, since the test case unit is smaller after slicing, exception reporting can be more accurate, directly locating the specific test point in a specific round, reducing manual intervention and improving efficiency.
[0119] Furthermore, the specific generation process of the first random number sequence and the second random number sequence involved in the exemplary embodiments of this disclosure will be explained and described. Specifically, refer to... Figure 3 As shown, the method for generating the first random number sequence and / or the second random number sequence described in the exemplary embodiments of this disclosure may include the following steps:
[0120] Step S301: Call a random number;
[0121] Step S302: Obtain a random number seed, and generate a first random number based on the random number generation algorithm and the random number seed;
[0122] Step S303: Obtain a list of random numbers and determine whether the first random number exists in the list; if it exists, proceed to step S304; if it does not exist, proceed to step S306.
[0123] Step S304: Generate a second random number based on the random number constructor, and replace the first random number with the second random number;
[0124] Step S305, return the second random number;
[0125] Step S306: Return the first random number;
[0126] Step S307: Generate a first random number sequence based on the returned first random number, and generate a second random number sequence based on the returned second random number.
[0127] It should be further explained here that the generation process of the first and second random number sequences described in this disclosure involves a random number generator and a random number constructor. The random number generator may include a current "random number seed" and a random number generation algorithm. Each time the combat logic initiates a random number call, the current random number seed is transmitted to the "generation algorithm" part to generate a new random number result (the first random number). Furthermore, the random number constructor may include a "result replacement" part. After the random number generator generates a first random number result, it will determine whether the current sequence number (the currently generated first random number) is in the random sequence (random number list). If it is, a second random number will be generated through the constructor, and the first random number will be replaced with the second random number. The replaced result (the second random number) will then be returned. This method enables independent modification of each initial random number in the random number sequence, avoiding the inefficiency of existing technologies that rely on constantly refreshing new random number seeds in a purely black-box environment. It also avoids the cumbersome testing process of manually modifying logic parts during white-box analysis. Furthermore, because the random number module provides custom random sequence editing, it eliminates the need for repeatedly recording randomization to the expected result or delving into the white-box layer to analyze code logic. Testers can record test cases as needed while in a black-box environment, significantly reducing the complexity of test case construction.
[0128] It is worth noting that in practical applications, since players are in real-world scenarios, they can execute the corresponding commands based on the first random number sequence generated. However, in test scenarios, sometimes to achieve specific test effects (such as needing a certain instance to appear in a certain scenario or not needing a certain instance to appear in a certain scenario), it is necessary to modify the first random number sequence to a second random number sequence. For example, if the random number list includes the random number 9, the corresponding test result cannot be achieved after the number 9 appears, so it is modified to meet the corresponding test result.
[0129] Furthermore, in a use case processing method provided in the exemplary embodiments of this disclosure:
[0130] In step S210, recorded use cases are obtained, and the recorded use cases are sliced into rounds to obtain multiple single-round slice use cases.
[0131] In this example embodiment, firstly, recording test cases can be obtained from the database where the recording test cases are located. These recording test cases can be generated as follows: combat data generated by virtual objects in the current combat scenario is recorded to obtain recording test cases, and then the recording test cases are stored in the recording test case database.
[0132] Specifically, recording combat data generated by a virtual object in the current combat scenario to obtain recording test cases can be achieved in two ways: One is to record the combat data generated by the virtual object in the current combat scenario under a first preset scenario, based on a random number seed, a first random number sequence generated from the random number seed, and a second random number sequence obtained by editing the first random number sequence; wherein the first preset scenario is a test scenario for testers. The other is to record the combat data generated by the virtual object in the current combat scenario under a second preset scenario, based on a random number seed and a first random number sequence generated from the random number seed; wherein the second preset scenario is a player's actual combat scenario. That is, the recording test cases described in this application can be either game data generated by external players in actual combat or game data recorded by testers in a test scenario. This method solves the problem in existing technologies where turn-based game combat and skill systems are often very complex and involve many coupling scenarios. To achieve full coverage, a large number of regression test cases are needed. Relying solely on testers to manually record each case is inefficient, requires a long recording time and a large amount of manpower, and cannot keep up with the testing needs of rapid and agile game product development.
[0133] In one example embodiment, under a first preset scenario, based on a random number seed, a first random number sequence generated according to the random number seed, and a second random number sequence obtained by editing the first random number sequence, the combat data generated by the virtual object in the current combat scenario is recorded to obtain a recording test case. This may include: S10, initializing the current combat scenario in response to a touch event of a tester acting on a preset interactive control, and obtaining a random number seed for the current combat scenario; S20, initializing the current round of combat in the current combat scenario, obtaining a first character state of the virtual object and a first environmental state of the virtual object in the current combat scenario; S30, generating a first random number sequence for the current round based on the random number seed, and in response to the current operation command of the tester acting on the virtual object in the current round, controlling the virtual object to execute the current operation command, and according to the first random number sequence... The first random number in the sequence and the preset triggering conditions are used to display the first target battle scene in the current round; S40, calculate the second character state and the second environment state of the virtual object after executing the current operation command in the first target battle scene, and determine whether the second character state and the second environment state meet the expected execution result; S50, if the expected execution result is met, then execute S60, if the expected execution result is not met, then in response to the tester's editing operation on the first random number sequence, obtain the second random number sequence, and generate the second character state and the second environment state that meet the expected execution result under the second random number sequence; S60, repeat S20-S50 until all battle rounds in the current battle scene end, and generate the recorded test case according to the random number seed, the first character state, the first environment state, the current operation command, the first random number sequence and / or the second random number sequence, the second character state and the second environment state.
[0134] In one embodiment, determining whether the second role state and the second environment state meet the expected execution result can be achieved by: determining whether the second role state and the second environment state are consistent with the expected role state and the expected environment state. That is, it can be achieved by checking whether the second role state and the second environment state are consistent with the expected role state and the expected environment state; this method can quickly achieve the intended testing objective.
[0135] In one embodiment, generating a second character state and a second environment state that satisfy the expected execution result under a second random number sequence can be achieved as follows: First, in response to the current operation command performed by the tester on the virtual object in the current round, the virtual object is controlled to execute the current operation command, and the target battle scene is displayed in the current round according to the second random number in the second sub-sequence and a preset trigger condition; second, the second character state and the second environment state that the virtual object has after executing the current operation command in the second target battle scene are calculated to generate a second character state and a second environment state that satisfy the expected execution result. That is, if the second character state and the second environment state are inconsistent with the expected character state and the expected environment state, the expected character state and the expected environment state can be achieved by changing the second random number; and here, only the first random number needs to be changed once to achieve the expected character state and the expected environment state, without the need for multiple changes. This method can improve the recording efficiency of test cases.
[0136] In one embodiment, the second random number sequence is obtained in response to the tester's editing operation on the first random number sequence. This can be achieved as follows: First, in response to the tester's editing operation on the first random number sequence, a second random number is generated based on a preset random number list and a random number constructor; second, the first random number in the first random number sequence corresponding to the editing operation is replaced based on the second random number to obtain the second random number sequence. This method can improve the generation efficiency of the second random number sequence without repeated modifications; the second random number sequence can be displayed as follows: [3] = 9, where [3] represents the position of the first random number to be replaced in the first random number sequence, and 9 represents the replaced first random number (i.e., the second random number); the second random number sequence may include one replaced random number or multiple replaced first random numbers, and this example does not impose any special restrictions on this; however, each replaced first random number needs to indicate its position in the first random number sequence.
[0137] In one embodiment, the recording test case is generated based on the random number seed, the first role state, the first environment state, the current operation instruction, the first random number sequence and / or the second random number sequence, the second role state, and the second environment state. This can be achieved as follows: First, an operation instruction sequence is obtained based on the current operation instruction and its input order; second, role process state data is obtained based on the first role state and the second role state, and environment process state data is obtained based on the first environment state and the second environment state; finally, the recording test case is generated based on the random number seed, the operation instruction sequence, the first random number sequence and / or the second random number sequence, the role process state data, and the environment process state data.
[0138] The following, combined with Figure 4 as well as Figure 5 This section explains and illustrates the specific recording process of test cases in the aforementioned test scenarios. Specifically, during the generation of recorded test cases, test case recorders (who can also be game testers) can record test cases according to actual operational scenarios in the actual game environment; during the recording process, refer to... Figure 4 As shown, the test case recording personnel (QA) record test cases according to the established goals. This involves operating the character on the game client (inputting operation commands corresponding to the virtual object), editing the random number return value (for parts that do not meet test expectations, the first random number generated by the random number generator can be modified, thus returning a second random number modified by the random constructor); furthermore, data instrumentation is required during the recording process. The purpose of data instrumentation is to modify the combat logic, instrument key data, and record the data needed for error test cases. This mainly includes the character's operation sequence, the initial environment of the entire battle in each round, and the process state of each round, etc. After recording is complete, the output data can include two parts: one part is the "random number seed" related to random numbers and the "first random number sequence and / or second random number sequence" edited by the recording personnel, which is used to restore the random state during test case replay; the other part is the "operation sequence," "initial state," and "process state" of the entire battle. The "operation sequence" and "initial state" are used for environment restoration and operation reproduction during test case replay, while the "process state" is used for result assertion.
[0139] The following, combined with Figure 5 The specific application process of the above data instrumentation will be explained and illustrated. For details, please refer to [link / reference]. Figure 5 As shown, the main purpose of data instrumentation is to instrument key points in the combat logic to obtain the data needed for use case recording. For example, in Figure 5The left half of the diagram represents a simplified version of the turn-based combat logic, mainly divided into the sections shown in the diagram. After "Combat Initialization" is completed, the logic for each turn begins. Each turn is divided into "Turn Initialization," "Command (Operation Command) Input," "Command Execution (Logical Calculation)," and "Turn End Logic Processing." At the end of each turn, it checks whether the combat end conditions have been met. If not, it returns to the initialization logic and starts a new turn. Data instrumentation involves recording and processing data at these logic points. The main components of data instrumentation include: Data Instrumentation - Random Seed: Records the random number seed for the current battle after combat initialization; Data Instrumentation - Character Status: Records the status information of all user characters after turn initialization; Data Instrumentation - Environment Status: Records the environment information for the current battle after turn initialization (excluding character-related information, such as the current...). (Round count, scene state, etc.); Data Instrumentation - User Operation Command Sequence: After the user completes the command input, the command information of the currently input operation command is recorded. Generally, a command information includes the command initiator (the virtual object that releases the operation command), the command target (the virtual object attacked by the operation command), and command details (such as skill ID, item ID, etc.); Data Instrumentation - User Edited Random Sequence: In addition to receiving the user's input commands, it also receives the random sequence edited by the user, so the edited random sequence is also recorded here; Data Instrumentation - Process State: Data is recorded at each logic settlement point and integrated into a process state data; Among them, the process state data can be composed of multiple lines of text, which can be understood as a text version of the combat process, recording information such as A using skill X on B, causing damage Y, adding status Z, etc.
[0140] It's worth noting that during the test case recording process, the source of the current random number can be identified based on a pre-defined function call stack. This method allows testers to modify the target random number's return value in a black-box state during test case recording, without involving combat logic code. This improves build efficiency while significantly reducing the difficulty of test case construction. Simultaneously, the data instrumentation module automatically records the commands, combat process, and results entered by the recording personnel; each execution constitutes a test case. No additional tools are required; anyone who can "play" the game can record test cases, further reducing the personnel requirements for test case recording.
[0141] In one example embodiment, under a second preset scenario, based on a random number seed and a first random number sequence generated according to the random number seed, the combat data generated by the virtual object in the current combat scenario is recorded to obtain a recording example. This can be implemented as follows: S10', in response to a touch event of the player acting on a preset interactive control, the current combat scenario is initialized, and a random number seed under the current combat scenario is obtained; S20', the current round of combat under the current combat scenario is initialized, and the first character state of the virtual object and the first environmental state of the virtual object in the current combat scenario are obtained; S30', a first random number sequence under the current round is generated based on the random number seed, and... In response to the player's current operation command applied to the virtual object in the current round, the virtual object is controlled to execute the current operation command. Based on the first random number in the first random number sequence and a preset trigger condition, a first target battle scene is displayed in the current round. In step S40', the second character state and second environment state of the virtual object after executing the current operation command in the first target battle scene are calculated. In step S50', steps S20'-S40' are repeated until all battle rounds in the current battle scene end, and the recording test case is generated based on the random number seed, the first character state, the first environment state, the current operation command, the first random number sequence, the second character state, and the second environment state. That is, in the player's actual combat scenario, there is no need to edit the first random number sequence; the corresponding recording test case can be obtained by directly executing the corresponding operation command based on the generated first random number sequence.
[0142] Furthermore, once the recorded test cases are obtained, they can be sliced into rounds to obtain multiple single-round sliced test cases. Specifically, the process of slicing the recorded test cases obtained by the tester in the test scenario can be implemented as follows: First, based on the combat rounds of the virtual object in the current combat scenario, the operation instruction sequence, the first random number sequence and / or the second random number sequence, the character process state data, and the environment process state data included in the recorded test cases are sliced to obtain multiple single-round operation instruction slices, single-round first random number sequences and / or second random number sequences, single-round initial state slices, and single-round process state slices; Second, based on the single-round operation instruction slices, single-round first random number sequences and / or second random number sequences, single-round initial state slices, and single-round process state slices, each single-round sliced test case is generated. The specific implementation method for slicing the recorded test cases obtained by the player in the actual combat scenario is the same as the above method and will not be repeated here.
[0143] For details, please refer to Figure 6 As shown, after the test case recording is completed, the output content needs to be sliced into rounds using a slicing tool. During test case slicing, the input data to the slicing tool includes the output content generated during recording, including a "random number seed," a "random sequence (which may include a first random number sequence and / or a second random number sequence)," an "operation sequence," an "initial state," and a "process state." The slicing tool then slices the input data according to the battle rounds, decoupling the correlation between rounds and ensuring that each round's test cases are independent. After slicing, the output data obtained by the slicing tool includes a "random number seed" and "test case data for a single round." Since the "random number seed" is used throughout the entire battle, only one copy needs to be retained. The "test case data for a single round" includes all the data needed for replaying and asserting test cases in each round, mainly including the "sequence of round X," the "operation sequence of round X," the "initial state of round X," and the "process state of round X."
[0144] It should be noted here that, during the process of slicing the input data according to the combat rounds, the specific determination process for each combat round is as follows: if, within a certain round, all virtual objects in the current game scene can and can only act once, that is, if within a certain round, all virtual objects in the current game scene release a certain skill, and release that skill only once, then that round is determined to be a combat round; the order in which each virtual object releases its skill within that round can be determined based on the speed attribute included in the virtual object's own attribute information.
[0145] In step S220, use case tags are generated based on the use case attribute information included in the single-round slice use cases.
[0146] In this example embodiment, the aforementioned use case attribute information may include instruction content and status content; wherein, the instruction content may include a specific skill name, such as skill A or skill B, etc.; the status content may include a specific status name or mechanism name, etc.; for example, status C or mechanism D, etc. Specifically, the use case tag generation process can be implemented in the following way: First, based on the instruction content included in the single-round operation instruction slice, generate a single-round instruction content tag, and based on the status content included in the single-round process status slice, generate a single-round status content tag; second, generate a single-round use case tag based on the instruction content tag and the status content tag.
[0147] The following, combined with Figure 7The process of generating use case tags is explained and described. Specifically, in the process of slicing recorded use cases into rounds, the main steps are to split and reorganize the data included in the recorded use cases, and slice the data instrumentation results into single-round slice use cases according to the expected results. After obtaining the slice use cases, it is also necessary to generate instruction content tags (such as using skill A, using skill B, etc.) based on the content of the operation instructions; then, state content tags (such as triggering state C, triggering mechanism D, etc.) are generated based on the content of the process state; finally, use case tags are generated based on the instruction content tags and state content tags.
[0148] At this point, data can be clustered according to combat rounds based on random sequence slices, character & environment state slices, process state slices, and use case labels, forming sliced use cases for a single round. The specific implementation process may include: generating initial state data for a single round based on the environment initial state slice and character initial state slice included in the initial state slice of the single round; generating process state data for a single round based on the environment process state slice and character process state slice included in the process state slice of the single round; and combining the operation instruction slice of the single round, the first and / or second random number sequence of the single round, the initial state data of the single round, and the process state data of the single round to obtain the sliced use cases for the single round. In other words, in the specific clustering process, firstly, the "user-edited random sequence" (random number sequence) can be split according to the battle round to obtain a random number slice for a single round; then, the "character state" and "environment state" can be split according to the battle round and assembled into "round initial state" (initial state data for a single round); further, the "process state" can be split according to the battle round and assembled into process state data for a single round; finally, the operation instruction slice, random number slice, initial state data, and process state data for a single round are combined to obtain the slice use cases for a single round.
[0149] It should be further explained here that the data instrumentation and state recovery module described in the above embodiments is compatible with the combat logic of external servers and can directly use the real combat data of external server players as regression test cases, which greatly enriches the base of test data. In addition, the turn slicing module will divide the combat data into tags when slicing, so it can accurately find the required regression test cases from the massive amount of external server data and save them into the test case library, which greatly improves the efficiency of test case expansion.
[0150] In step S230, the sliced use cases of the single round are identified based on the use case tags.
[0151] Specifically, once the use case tag is obtained, the sliced use cases of a single round can be identified based on the tag, and then the identified sliced use cases of a single round can be stored in the sliced use case database. This allows for subsequent filtering and / or searching of sliced use cases of a single round based on the use case tag. This method solves the problem in existing technologies where, due to the use case recording method based on recording and playback, to ensure the efficiency of use case recording and execution, a single use case (i.e., a battle) often contains multiple rounds, covering multiple test points, and there is strong coupling between rounds. When planning requirements are adjusted, such as balance adjustments or protocol changes, the coupling between rounds necessitates the re-recording of the entire use case, making overall use case maintenance difficult. This disclosure identifies and stores sliced use cases of a single round based on use case tags. When a problem occurs in a particular round, the use cases for that round can be directly re-recorded, thus greatly improving the efficiency of use case management (recording).
[0152] Figure 8 This schematically illustrates a flowchart of a method for playing back recorded use cases according to an exemplary embodiment of this disclosure. Specifically, refer to... Figure 8 As shown, the following steps may be included:
[0153] Step S810: Obtain the single-round slice test case to be replayed based on the test case tag of the single-round slice test case;
[0154] Step S820: Play back the single-round slice test cases to be replayed to obtain multiple single-round replay test cases.
[0155] The following will explain and illustrate steps S810 and S820. Specifically, when it is necessary to replay one or more single-round recorded test cases, the single-round slice test cases to be replayed can be obtained according to the test case tags of the single-round slice test cases, and then the specific replay action can be executed. In the test scenario of the tester, during the replay of the single-round slice test cases to be replayed, it can be implemented in the following way: responding to a touch event acting on a preset interactive control, the current battle scene is initialized, and a random number seed under the current battle scene is loaded from the single-round slice test cases to be replayed; the initial state data of the virtual object in the current round corresponding to the single-round slice test case to be replayed is loaded from the single-round slice test cases to be replayed, and the current round is initialized according to the initial state data; the initial state data of the virtual object in the current round corresponding to the single-round slice test case to be replayed is loaded from the single-round slice test cases to be replayed, and the current round is initialized according to the initial state data; the initial state data of the virtual object in the current round corresponding to the single-round slice test case to be replayed is loaded from the single-round slice test cases to be replayed. The single-round slice use case corresponds to the sequence of operation instructions in the current round and the first random number sequence and / or second random number sequence of the current battle scene in the current round; control the virtual object to execute the current operation instruction, and display the first target battle scene and / or the second target battle scene in the current round according to the first random number sequence and / or the second random number sequence and the preset trigger conditions; calculate the process state data that the virtual object has after executing the current operation instruction in the first target battle scene and / or the second target battle scene, and generate the single-round replay use case according to the process state data.
[0156] The following, combined with Figure 9 as well as Figure 10 This section explains and illustrates the specific replay process for single-round sliced test cases. Specifically, once slicing is complete, the test case replay operation can be performed. Generally, target test cases will be automatically replayed in batches according to specific regression requirements; see reference. Figure 9As shown, during the playback of a specific single-round slice test case, the input data is the unit data for completing the slice, i.e., "random number seed" + "single-round test case data (slice test case)". During playback, the random number generator can receive the "random number seed" and generate a random sequence according to a predetermined sequence; the random number constructor can receive the "random number sequence of round X" and replace the parts that need to be replaced in the sequentially generated random numbers; the data recovery-operation playback module can receive the "operation sequence of round X" and reproduce the operations of each character as needed; the data recovery-environment recovery module can receive the "initial state of round X" and restore the initial state of the combat environment before the round; the data recovery-state recovery module can receive the "initial state of round X" and restore the initial state of each character before the round; when the playback of the single-round slice test case ends, the output data obtained is: the "process state of round X" in the playback state; the method for obtaining the process state data of round X can be based on a data instrumentation method similar to the method for obtaining process state data recorded in the test case recording process described above.
[0157] Further reference Figure 10 As shown, during the actual test case replay process, you can refer to... Figure 10 Perform the steps shown. Specifically, in Figure 10 In the process, the following parameters are defined: Random Seed: Before battle initialization, the "random seed" provided in the test case is loaded and provided to the "random number module" to generate random numbers according to the sequence; Round X Initial State: Before round initialization, the "round X initial state" data in the test case is loaded to restore the start state of the round, ensuring that its state is consistent with that at the time of recording; Round X Operation Sequence: During the input command phase, the "round X operation sequence" in the test case is loaded to replace the operation commands that need to be manually input, ensuring that its operation sequence is consistent with that at the time of recording; Round X Random Sequence: Before executing commands to calculate the battle process, the "round X random sequence" in the test case is loaded and provided to the "random number module" to replace the generated random sequence; Round X Process State: After the battle process calculation is completed and the round ends, the "round X process state" is output and provided to the "assertion module" for result judgment.
[0158] It's worth noting that during test case replay, the "Round X Initial State" ensures that the initial state of each round in the replay is consistent with that during recording, and is not affected by previous rounds; the "Round X Process State" ensures that its process state is only related to the current round and is not affected by previous rounds; furthermore, the round slicing module breaks down multi-round, multi-test-point composite test cases into single-round, single-test-point slice test cases, severing the coupling between each round; when facing requirement changes, it can more accurately update test cases, rather than updating the entire composite test case.
[0159] Furthermore, after playback is completed, the use case processing method may also include: analyzing the differences between the playback status data included in the single-round playback use case and the recording status data included in the single-round slice use case.
[0160] In this example embodiment, continue to refer to Figure 9 as well as Figure 10 As shown, after the playback of the single-round slice test case to be replayed is completed, the "round X process state" in the playback state can be compared and analyzed with the recorded "round X process state" to confirm whether there are any inconsistencies (generally speaking, except for the expected logical modifications, the two results should be consistent).
[0161] Furthermore, if the difference analysis result indicates that the replay status data and the recorded status data are inconsistent, then the inconsistent single-round slice test cases are located according to the test case sequence of the single-round slice test cases to obtain abnormal slice test cases; an abnormal alarm message is generated based on the abnormal slice test cases and displayed. That is, if there is no abnormality, it means that the logic corresponding to the test case is not abnormal, and the process ends directly; if there is an inconsistency, an error analysis is automatically performed first to locate the inconsistent output; then, an abnormal alarm is triggered to notify the responsible personnel. Through this method, the abnormal parts can be accurately located; and since the round slice module provides slice test cases for a single round and a single test point, and the state recovery and assertion module provides a comparative analysis of the "process state" of a single round; therefore, the problem can be controlled within a single round, and the "process state" will record the battle process in sequence, thus accurately comparing and analyzing the specific operation where the problem occurred (such as command A in round X), greatly improving the accuracy of problem location.
[0162] It should be noted that when comparing the differences between the replay status data in a replayed single-round test case and the recording status data in a slice test case of the same replayed single-round, the comparison can be performed directly by text or by images. However, when comparing by images, attributes that cannot be displayed on the screen, such as the physical resistance of virtual objects, cannot be compared using image comparison. Image comparison is used to test content with visible differences (such as skill effects, character models, etc.), but it is not very practical for complex logic such as combat. Therefore, in the specific difference comparison process, the specific difference comparison method can be selected according to actual needs, and this example does not impose any special restrictions on it.
[0163] This disclosure also provides an example embodiment of a use case processing apparatus. (See reference...) Figure 11As shown, the use case processing device may include a use case slicing module 1110, a use case tag generation module 1120, and a use case identification module 1130. Wherein:
[0164] The test case slicing module 1110 can be used to acquire recorded test cases and slice the recorded test cases into rounds to obtain multiple single-round sliced test cases;
[0165] The use case tag generation module 1120 can be used to generate use case tags based on the use case attribute information included in the sliced use cases of the single round;
[0166] The use case identification module 1130 can be used to identify the slice use cases of the single round based on the use case tags.
[0167] In one exemplary embodiment of this disclosure, the use case processing apparatus further includes:
[0168] The test case recording module can be used to record combat data generated by virtual objects in the current combat scenario, obtain recorded test cases, and store the recorded test cases in the recorded test case database.
[0169] In one exemplary embodiment of this disclosure, combat data generated by virtual objects in the current combat scenario is recorded to obtain a recording use case, including:
[0170] In a first preset scenario, combat data generated by the virtual object in the current combat scenario is recorded based on a random number seed, a first random number sequence generated according to the random number seed, and a second random number sequence obtained by editing the first random number sequence, to obtain a recording test case; wherein, the first preset scenario is a test scenario for testers; and / or
[0171] In the second preset scenario, based on a random number seed and a first random number sequence generated according to the random number seed, the combat data generated by the virtual object in the current combat scenario is recorded to obtain a recording example; wherein, the second preset scenario is a player's actual combat scenario.
[0172] In one exemplary embodiment of this disclosure, combat data generated by the virtual object in the current combat scenario is recorded based on a random number seed, a first random number sequence generated according to the random number seed, and a second random number sequence obtained by editing the first random number sequence, to obtain a recording use case, including:
[0173] S10, responding to the touch event of the tester acting on the preset interactive control, initializes the current battle scene and obtains the random number seed under the current battle scene;
[0174] S20, initialize the current round of battle in the current battle scene, and obtain the first character state of the virtual object and the first environmental state of the virtual object in the current battle scene;
[0175] S30, based on the random number seed, generate a first random number sequence for the current round, and in response to the current operation command of the tester acting on the virtual object in the current round, control the virtual object to execute the current operation command, and display the first target battle scene in the current round according to the first random number in the first random number sequence and the preset triggering conditions;
[0176] S40, calculate the second character state and the second environment state of the virtual object after it has completed the execution of the current operation command in the first target combat scene, and determine whether the second character state and the second environment state meet the expected execution result;
[0177] S50, if the expected execution result is met, then S60 is executed; if the expected execution result is not met, then in response to the tester's editing operation on the first random number sequence, a second random number sequence is obtained, and a second role state and a second environment state that meet the expected execution result are generated under the second random number sequence.
[0178] S60, repeat S20-S50 until all battle rounds in the current battle scenario end, and generate the recording test case based on the random number seed, the first character state, the first environment state, the current operation command, the first random number sequence and / or the second random number sequence, the second character state, and the second environment state.
[0179] In one exemplary embodiment of this disclosure, determining whether the second role state and the second environment state meet the expected execution result includes:
[0180] Determine whether the second role state and the second environment state are consistent with the expected role state and the expected environment state.
[0181] In one exemplary embodiment of this disclosure, generating a second role state and a second environment state that satisfy the expected execution result under a second random number sequence includes:
[0182] In response to the current operation command of the tester on the virtual object in the current round, the virtual object is controlled to execute the current operation command, and the target battle scene is displayed in the current round according to the second random number in the second sub-sequence and the preset triggering conditions;
[0183] Calculate the second character state and second environment state of the virtual object after it has completed the execution of the current operation command in the second target combat scenario, so as to generate a second character state and second environment state that meet the expected execution result.
[0184] In one exemplary embodiment of this disclosure, obtaining a second random number sequence in response to the tester's editing operation on the first random number sequence includes:
[0185] In response to the tester's editing operation on the first random number sequence, a second random number is generated based on a preset random number list and a random number builder;
[0186] The first random number in the first random number sequence corresponding to the editing operation is replaced by the second random number to obtain the second random number sequence.
[0187] In one exemplary embodiment of this disclosure, under a second preset scenario, combat data generated by the virtual object in the current combat scenario is recorded based on a random number seed and a first random number sequence generated according to the random number seed, resulting in a recording use case, including:
[0188] S10' responds to the player's touch event on the preset interactive control, initializes the current battle scene, and obtains the random number seed for the current battle scene;
[0189] S20', Initialize the current round of battle in the current battle scene, and obtain the first character state of the virtual object and the first environmental state of the virtual object in the current battle scene;
[0190] S30', Based on the random number seed, generate the first random number sequence for the current round, and in response to the player's current operation command on the virtual object in the current round, control the virtual object to execute the current operation command, and display the first target battle scene in the current round according to the first random number in the first random number sequence and the preset triggering conditions;
[0191] S40', Calculate the second character state and second environment state that the virtual object has after executing the current operation command in the first target combat scene;
[0192] S50', repeat S20'-S40' until all battle rounds in the current battle scenario end, and generate the recording test case based on the random number seed, the first character state, the first environment state, the current operation command, the first random number sequence, the second character state, and the second environment state.
[0193] In one exemplary embodiment of this disclosure, generating the recording use case based on the random number seed, the first role state, the first environment state, the current operation instruction, the first random number sequence and / or the second random number sequence, the second role state, and the second environment state includes:
[0194] Based on the current operation instruction and the input order of the current operation instruction, an operation instruction sequence is obtained;
[0195] Based on the first role state and the second role state, obtain role process state data, and based on the first environment state and the second environment state, obtain environment process state data;
[0196] The recording test case is generated based on the random number seed, the operation instruction sequence, the first random number sequence and / or the second random number sequence, the role process state data, and the environmental process state data.
[0197] In one exemplary embodiment of this disclosure, the recorded use cases are sliced into rounds to obtain multiple single-round sliced use cases, including:
[0198] Based on the combat rounds of the virtual object in the current combat scenario, the operation instruction sequence, first random number sequence and / or second random number sequence, character process state data and environment process state data included in the recorded case are sliced to obtain multiple single-round operation instruction slices, single-round first random number sequence and / or second random number sequence, single-round initial state slices and single-round process state slices.
[0199] Based on the single-round operation instruction slice, the single-round first random number sequence and / or second random number sequence, the single-round initial state slice, and the single-round process state slice, generate the slice use cases for each single round.
[0200] In one exemplary embodiment of this disclosure, the use case attribute information includes instruction content and status content;
[0201] Specifically, based on the use case attribute information included in the sliced use cases of the single round, use case tags are generated, including:
[0202] Based on the instruction content included in the single-round operation instruction slice, generate single-round instruction content tags, and based on the state content included in the single-round process state slice, generate single-round state content tags.
[0203] Generate single-round use case tags based on the instruction content tags and status content tags.
[0204] In one exemplary embodiment of this disclosure, generating slice use cases for each of the single rounds based on the single round's operation instruction slice, the single round's first random number sequence and / or second random number sequence, the single round's initial state slice, and the single round's process state slice includes:
[0205] The initial state data for a single round is generated based on the initial state slices of the environment and the character, which are included in the initial state slice of the single round.
[0206] Based on the environmental process state slice and the role process state slice included in the single-round process state slice, generate single-round process state data.
[0207] The single-round operation instruction slice, the single-round first random number sequence and / or second random number sequence, the single-round initial state data, and the single-round process state data are combined to obtain the single-round slice use case.
[0208] In one exemplary embodiment of this disclosure, the use case processing apparatus further includes:
[0209] The single-round slice test case acquisition module can be used to acquire the single-round slice test cases to be replayed based on the test case tags of the single-round slice test cases.
[0210] The single-round slice test case replay module can be used to replay single-round slice test cases to obtain single-round replay test cases.
[0211] In one exemplary embodiment of this disclosure, the single-round slice use case to be replayed is replayed to obtain a single-round replay use case, including:
[0212] In response to a touch event acting on a preset interactive control, the current battle scene is initialized, and a random number seed for the current battle scene is loaded from the slice of the single round to be replayed.
[0213] Load the initial state data of the virtual object in the current round corresponding to the slice use case of the single round to be replayed from the slice use case of the single round to be replayed, and initialize the current round according to the initial state data;
[0214] Load the sequence of operation instructions of the virtual object in the current round corresponding to the slice use case of the single round to be replayed, as well as the first random number sequence and / or the second random number sequence of the current battle scene in the current round from the slice use case of the single round to be replayed.
[0215] Control the virtual object to execute the current operation instruction, and display the first target battle scene and / or the second target battle scene in the current round according to the first random number sequence and / or the second random number sequence and the preset triggering conditions;
[0216] Calculate the process state data of the virtual object after it has completed the execution of the current operation command in the first target battle scenario and / or the second target battle scenario, and generate the replay use case for the single round based on the process state data.
[0217] In one exemplary embodiment of this disclosure, the use case processing apparatus further includes:
[0218] The data difference analysis module can be used to analyze the differences between the playback status data included in the single-round playback use case and the recording status data included in the single-round slice use case.
[0219] In one exemplary embodiment of this disclosure, the use case processing apparatus further includes:
[0220] The abnormal slice test case generation module can be used to locate the inconsistent single-round slice test cases according to the test case sequence of the single-round slice test cases if the difference analysis result is that the playback status data and the recording status data are inconsistent, and obtain abnormal slice test cases.
[0221] The alarm message generation module can be used to generate abnormal alarm messages based on the abnormal slice use cases, and to display the abnormal alarm messages.
[0222] The specific details of each module in the above-mentioned use case processing device have been described in detail in the corresponding use case processing methods, so they will not be repeated here.
[0223] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0224] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0225] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.
[0226] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0227] The following reference Figure 12 To describe an electronic device 1200 according to such an embodiment of the present disclosure. Figure 12 The electronic device 1200 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0228] like Figure 12 As shown, the electronic device 1200 is manifested in the form of a general-purpose computing device. The components of the electronic device 1200 may include, but are not limited to: at least one processing unit 1210, at least one storage unit 1220, a bus 1230 connecting different system components (including storage unit 1220 and processing unit 1210), and a display unit 1240.
[0229] The storage unit stores program code that can be executed by the processing unit 1210, causing the processing unit 1210 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 1210 can perform actions such as... Figure 2 The steps shown are as follows: Step S210: Obtain recorded use cases and slice the recorded use cases into rounds to obtain multiple single-round slice use cases; Step S220: Generate use case tags based on the use case attribute information included in the single-round slice use cases; Step S230: Identify the single-round slice use cases based on the use case tags.
[0230] Storage unit 1220 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 12201 and / or cache memory 12202, and may further include a read-only memory (ROM) 12203.
[0231] Storage unit 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0232] Bus 1230 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0233] Electronic device 1200 can also communicate with one or more external devices 1300 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 1200, and / or with any device that enables electronic device 1200 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1250. Furthermore, electronic device 1200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1260. As shown, network adapter 1260 communicates with other modules of electronic device 1200 via bus 1230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0234] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0235] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of this disclosure described in the "Exemplary Methods" section above.
[0236] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0237] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0238] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0239] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0240] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0241] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0242] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not invented by this disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A use case processing method, characterized in that, include: Record the combat data generated by the virtual object in the current combat scenario to obtain recording test cases; The recording test cases include recording test cases under a first preset scenario, and / or recording test cases under a second preset scenario, wherein the first preset scenario is a test scenario for testers; Obtain recorded test cases and slice the recorded test cases into rounds to obtain multiple single-round slice test cases; Based on the test case attribute information included in the sliced test cases of the single round, generate test case tags; The single-round slice test cases are identified based on the test case tags; wherein, the recorded test cases under the first preset scenario are obtained in the following manner: S10, in response to the touch event of the tester acting on the preset interactive control, the current battle scene is initialized, and the random number seed under the current battle scene is obtained; S20, the current round battle under the current battle scene is initialized, and the first character state of the virtual object and the first environment state of the virtual object in the current battle scene are obtained; S30, the first random number sequence under the current round is generated based on the random number seed, and in response to the current operation command of the tester acting on the virtual object in the current round, the virtual object is controlled to execute the current operation command, and the first random number in the first random number sequence and the preset trigger condition are used to display the first random number in the current round. S40: Calculate the second character state and second environment state of the virtual object after executing the current operation command in the first target battle scenario, and determine whether the second character state and second environment state meet the expected execution result; S50: If the expected execution result is met, proceed to S60; if the expected execution result is not met, respond to the tester's editing operation on the first random number sequence to obtain a second random number sequence, and generate a second character state and second environment state that meet the expected execution result under the second random number sequence; S60: Repeat S20-S50 until all battle rounds in the current battle scenario end, and generate recording test cases based on the random number seed, first character state, first environment state, current operation command, first random number sequence and / or second random number sequence, second character state and second environment state.
2. The use case processing method according to claim 1, characterized in that, The use case processing method further includes: The recorded test cases are stored in the recorded test case database.
3. The use case processing method according to claim 2, characterized in that, Record the combat data generated by the virtual object in the current combat scenario to obtain recording test cases, including: In the second preset scenario, based on a random number seed and a first random number sequence generated according to the random number seed, the combat data generated by the virtual object in the current combat scenario is recorded to obtain a recording example; wherein, the second preset scenario is a player's actual combat scenario.
4. The use case processing method according to claim 1, characterized in that, Determine whether the second role state and the second environment state meet the expected execution result, including: Determine whether the second role state and the second environment state are consistent with the expected role state and the expected environment state.
5. The use case processing method according to claim 1, characterized in that, Generate a second role state and a second environment state that meet the expected execution result under the second random number sequence, including: In response to the current operation command of the tester on the virtual object in the current round, the virtual object is controlled to execute the current operation command, and the second target battle scene is displayed in the current round according to the second random number in the second sub-sequence and the preset triggering conditions; Calculate the second character state and second environment state of the virtual object after it has completed the execution of the current operation command in the second target combat scenario, so as to generate a second character state and second environment state that meet the expected execution result.
6. The use case processing method according to claim 1, characterized in that, In response to the tester's editing operation on the first random number sequence, a second random number sequence is obtained, including: In response to the tester's editing operation on the first random number sequence, a second random number is generated based on a preset random number list and a random number builder; The first random number in the first random number sequence corresponding to the editing operation is replaced by the second random number to obtain the second random number sequence.
7. The use case processing method according to claim 3, characterized in that, In a second preset scenario, based on a random number seed and a first random number sequence generated according to the random number seed, combat data generated by the virtual object in the current combat scenario is recorded to obtain recording examples, including: S10' responds to the player's touch event on the preset interactive control, initializes the current battle scene, and obtains the random number seed for the current battle scene; S20', Initialize the current round of battle in the current battle scene, and obtain the first character state of the virtual object and the first environmental state of the virtual object in the current battle scene; S30', Based on the random number seed, generate the first random number sequence for the current round, and in response to the player's current operation command on the virtual object in the current round, control the virtual object to execute the current operation command, and display the first target battle scene in the current round according to the first random number in the first random number sequence and the preset triggering conditions; S40', Calculate the second character state and second environment state that the virtual object has after executing the current operation command in the first target combat scene; S50', repeat S20'-S40' until all battle rounds in the current battle scenario end, and generate the recording test case based on the random number seed, the first character state, the first environment state, the current operation command, the first random number sequence, the second character state, and the second environment state.
8. The use case processing method according to claim 1, characterized in that, Based on the random number seed, the first role state, the first environment state, the current operation command, the first random number sequence and / or the second random number sequence, the second role state, and the second environment state, the recording use case is generated, including: Based on the current operation instruction and the input order of the current operation instruction, an operation instruction sequence is obtained; Based on the first role state and the second role state, obtain role process state data, and based on the first environment state and the second environment state, obtain environment process state data; The recording test case is generated based on the random number seed, the operation instruction sequence, the first random number sequence and / or the second random number sequence, the role process state data, and the environmental process state data.
9. The use case processing method according to claim 1, characterized in that, The recorded test cases are sliced into rounds to obtain multiple single-round sliced test cases, including: Based on the combat rounds of the virtual object in the current combat scenario, the operation instruction sequence, first random number sequence and / or second random number sequence, character process state data and environmental process state data included in the recorded case are sliced to obtain multiple single-round operation instruction slices, single-round first random number sequence and / or second random number sequence, single-round initial state slices and single-round process state slices. Based on the single-round operation instruction slice, the single-round first random number sequence and / or second random number sequence, the single-round initial state slice, and the single-round process state slice, generate the slice use cases for each single round.
10. The use case processing method according to claim 9, characterized in that, The use case attribute information includes instruction content and status content; Specifically, based on the use case attribute information included in the sliced use cases of the single round, use case tags are generated, including: Based on the instruction content included in the single-round operation instruction slice, generate single-round instruction content tags, and based on the state content included in the single-round process state slice, generate single-round state content tags. Generate single-round use case tags based on the instruction content tags and status content tags.
11. The use case processing method according to claim 10, characterized in that, Based on the single-round operation instruction slice, the single-round first random number sequence and / or second random number sequence, the single-round initial state slice, and the single-round process state slice, generate slice use cases for each of the single rounds, including: The initial state data for a single round is generated based on the initial state slices of the environment and the character, which are included in the initial state slice of the single round. Based on the environmental process state slice and the role process state slice included in the single-round process state slice, generate single-round process state data. The single-round operation instruction slice, the single-round first random number sequence and / or second random number sequence, the single-round initial state data, and the single-round process state data are combined to obtain the single-round slice use case.
12. The use case processing method according to claim 1, characterized in that, The use case processing method further includes: Based on the use case tags of the single-round slice use cases, obtain the single-round slice use cases to be replayed; Perform test case replay on the slice test cases of the single round to obtain the replay test cases of the single round.
13. The use case processing method according to claim 12, characterized in that, Perform test case replay on the slice test cases of the single round to be replayed to obtain the replay test cases of the single round, including: In response to a touch event acting on a preset interactive control, the current battle scene is initialized, and a random number seed for the current battle scene is loaded from the slice of the single round to be replayed. Load the initial state data of the virtual object in the current round corresponding to the slice use case of the single round to be replayed from the slice use case of the single round to be replayed, and initialize the current round according to the initial state data; Load the sequence of operation instructions of the virtual object in the current round corresponding to the slice use case of the single round to be replayed, as well as the first random number sequence and / or the second random number sequence of the current battle scene in the current round from the slice use case of the single round to be replayed. Control the virtual object to execute the current operation instruction, and display the first target battle scene and / or the second target battle scene in the current round according to the first random number sequence and / or the second random number sequence and the preset triggering conditions; Calculate the process state data of the virtual object after it has completed the execution of the current operation command in the first target battle scenario and / or the second target battle scenario, and generate the replay use case for the single round based on the process state data.
14. The use case processing method according to claim 12, characterized in that, The use case processing method further includes: The differences between the playback status data included in the single-round playback use case and the recording status data included in the single-round slice use case are analyzed.
15. The use case processing method according to claim 14, characterized in that, The use case processing method further includes: If the difference analysis result shows that the playback status data and the recording status data are inconsistent, then the inconsistent single-round slice use cases are located according to the use case sequence of the single-round slice use cases to obtain the abnormal slice use cases. An anomaly alarm message is generated based on the anomaly slice use case, and the anomaly alarm message is displayed.
16. A use case processing apparatus, characterized in that, include: The test case recording module is used to record the combat data generated by the virtual object in the current combat scenario to obtain recorded test cases; The recording test cases include recording test cases under a first preset scenario, and / or recording test cases under a second preset scenario, wherein the first preset scenario is a test scenario for testers; The test case slicing module is used to acquire recorded test cases and slice the recorded test cases into rounds to obtain multiple single-round sliced test cases; The use case tag generation module is used to generate use case tags based on the use case attribute information included in the sliced use cases of the single round; The test case identification module is used to identify the sliced test cases of the single round based on the test case tags; wherein, the recorded test cases under the first preset scenario are obtained in the following manner: S10, in response to the touch event of the tester acting on the preset interactive control, the current battle scene is initialized and the random number seed of the current battle scene is obtained; S20, the current round battle under the current battle scene is initialized, and the first character state of the virtual object and the first environment state of the virtual object in the current battle scene are obtained; S30, the first random number sequence of the current round is generated based on the random number seed, and in response to the current operation command of the tester acting on the virtual object in the current round, the virtual object is controlled to execute the current operation command, and according to the first random number in the first random number sequence and the preset triggering conditions, in the current round... S40: Display the first target battle scene; calculate the second character state and second environment state of the virtual object after executing the current operation command in the first target battle scene, and determine whether the second character state and second environment state meet the expected execution result; S50: if the expected execution result is met, execute S60; if the expected execution result is not met, respond to the tester's editing operation on the first random number sequence to obtain the second random number sequence, and generate the second character state and second environment state that meet the expected execution result under the second random number sequence; S60: repeat S20-S50 until all battle rounds in the current battle scene end, and generate recording test cases according to the random number seed, first character state, first environment state, current operation command, first random number sequence and / or second random number sequence, second character state and second environment state.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the use case processing method according to any one of claims 1-15.
18. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the use case processing method according to any one of claims 1-15 by executing the executable instructions.
Citation Information
Patent Citations
Data recording method and device based on virtual scene, equipment, medium and product
CN114344918A