Game testing method and device, electronic equipment, computer readable storage medium and program product
By binding test robots to functional modules and dynamically executing game functions, the limitations of existing game testing technologies are solved, achieving an efficient and flexible testing method that improves testing efficiency and coverage.
Patent Information
- Application Number
- CN202511736210.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-27
AI Technical Summary
Existing game testing methods have limitations in terms of cost control, scene coverage, system scalability, and maintainability, making it difficult to meet the complex testing needs of modern online games.
By binding the target test robot to the target functional module and controlling the target test robot to execute the target functional module to achieve the corresponding game function, a flexible mapping relationship is established, and a dynamic binding and execution mechanism is adopted to realize the on-demand configuration and automated execution of test tasks.
It improves the efficiency and coverage of game testing, reduces the maintenance complexity of game code, and enhances the flexibility and scalability of the testing process.
Smart Images

Figure CN121579353A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of game testing, in particular to a game testing method and device, electronic equipment, computer readable storage medium and program product. BACKGROUND
[0002] Before a new version or new function of a game product is officially put online, it needs to be systematically tested to find potential defects and fix them in time to ensure that it meets the online quality standards. Currently, game testing mainly uses human testing, function-specific robot testing or full-function integrated robot testing. Among them, human testing refers to manual testing by real players, which can accurately simulate the actual user experience, but has problems such as high testing cost, long cycle, and difficulty in effectively reproducing extreme scenarios such as high concurrency and high load, and the testing coverage is limited by the size of manpower and available resources.
[0003] Function-specific robot testing refers to designing special automated testing robots (such as task robots, chat robots) for specific function modules, which can improve the testing efficiency of some scenarios, but in complex business processes or comprehensive scenarios, it is limited by the number of robots that a single device can carry, and has insufficient scalability. Full-function integrated robot testing refers to a single robot integrating all testing logic (such as movement, combat, social interaction, etc.), which has the ability to perform multiple types of game tasks and has a wide coverage, but its internal function modules are highly coupled, making system maintenance difficult and iteration inflexible, which is not conducive to long-term evolution and function expansion.
[0004] The existing testing methods have certain limitations in cost control, scenario coverage, system scalability and maintainability, so there is an urgent need for more efficient, flexible and scalable testing technical solutions to meet the increasingly complex testing needs of modern network games. SUMMARY
[0005] Therefore, the purpose of the present application is to provide a game testing method, device, electronic equipment, computer readable storage medium and program product, which can improve the efficiency and coverage of game testing.
[0006] To achieve the above purpose, the technical solutions adopted by the embodiments of the present application are as follows: In a first aspect, the present application provides a game testing method, which comprises: binding a target testing robot with a target function module according to a game testing instruction; the function module corresponds one-to-one to a game function; controlling the target testing robot to execute the target function module to realize the game function corresponding to the target function module.
[0007] In an optional implementation, the game test instruction carries an identifier of the target test robot and an identifier of a target game function to be executed by the target test robot; and the binding of the target test robot and the target function module according to the game test instruction comprises: loading a corresponding target function module according to the identifier of the target game function; binding the target test robot and the corresponding target function module according to the identifier of the target test robot and the identifier of the corresponding target game function.
[0008] In an optional implementation, the loading of the corresponding target function module according to the identifier of the target game function comprises: if the target function module does not exist in the memory, obtaining a target function script from a script library according to the identifier of the target game function; the function script corresponds to a game function one-to-one; generating the target function module according to the target function script.
[0009] In an optional implementation, the method further comprises: when a game version is updated, analyzing a version update log and obtaining an updated game function; updating the script library based on the updated game function.
[0010] In an optional implementation, the updating of the script library based on the updated game function comprises: if the updated game function is a newly-added game function, generating a first function script corresponding to the newly-added game function and adding the first function script to the script library; if the updated game function is a deleted game function, determining a function script corresponding to the deleted game function as a second function script and deleting the second function script from the script library; if the updated game function is a modified game function, determining a function script corresponding to the modified game function as a third function script and modifying the third function script in the script library.
[0011] In an optional implementation, the game test instruction carries an identifier of the target test robot and an identifier of a target game function to be executed by the target test robot; and after the binding of the target test robot and the target function module according to the game test instruction, the method further comprises: if the target function module is multiple, searching for a preset dependency relationship according to the identifier of the target game function to determine whether each target function module has an execution dependency; if each target function module has an execution dependency, generating an event-driven condition according to the identifier of the target game function and the preset dependency relationship. The control of the target test robot to execute the target function module comprises: The control of the target test robot to execute the target function module according to the event-driven condition.
[0012] In a second aspect, the present application provides a game testing device, which comprises: A processing module is configured to bind a target test robot with a target function module according to a game testing instruction; the function module corresponds to a game function one by one. A testing module is configured to control the target test robot to execute the target function module, so as to realize the game function corresponding to the target function module.
[0013] In a third aspect, the present application provides an electronic device, which comprises a processor and a memory, wherein the memory stores a computer program capable of being executed by the processor, and the processor is capable of executing the computer program to realize the game testing method according to any one of the preceding embodiments.
[0014] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the game testing method according to any one of the preceding embodiments.
[0015] In a fifth aspect, the present application provides a program product, which is executed by a processor to realize the game testing method according to any one of the preceding embodiments.
[0016] Compared with the prior art, the game testing method, device, electronic device, computer readable storage medium and program product provided by the embodiments of the present application bind a target test robot with a target function module, and control the target test robot to execute the target function module, so as to realize the corresponding game function, thereby establishing a flexible mapping relationship between the test robot and the specific game function. The target test robot is no longer limited to the preset fixed task flow, but is driven by the dynamic binding relationship to execute the test operation of the specific game function in a targeted manner. The dynamic binding and execution mechanism realizes the on-demand configuration and automatic execution of the test task, improves the flexibility and scalability of the test process, helps to improve the efficiency and coverage of the game testing, and reduces the maintenance complexity of the game code.
[0017] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as limiting the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0019] Figure 1 A flow diagram of the game testing method provided by the embodiments of the present application is shown.
[0020] Figure 2 Another flow diagram of the game testing method provided by the embodiments of the present application is shown.
[0021] Figure 3 A block diagram of the game testing device provided by the embodiments of the present application is shown.
[0022] Figure 4 A block diagram of the electronic device provided by the embodiments of the present application is shown. DETAILED DESCRIPTION
[0023] The technical solutions of the embodiments of the present application will be described clearly and completely in the following with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0024] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of the present application.
[0025] It should be noted that the relational terms such as "first" and "second" and the like are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations exist in any such actual relationship or order. Moreover, the terms "comprise", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device including the element.
[0026] In the test stage before a large-scale massively multiplayer online role-playing game (MMORPG) is developed and put into operation, in order to reduce the labor cost, a real player's game behavior needs to be simulated by an automatic test robot to verify the functional integrity of the game system and the performance stability of the server. The test robot can perform typical operations such as character movement, task completion, copy battle, social interaction, etc., so as to effectively detect system defects (bugs), evaluate the service carrying capacity under high concurrency scenarios, and improve the test coverage and efficiency.
[0027] The inventor has found that the existing test robots are usually divided into function-specific robots and full-function integrated robots. The function-specific robot can only perform a single function type preset, and cannot dynamically switch tasks. The full-function integrated robot supports performing multiple tasks, for example, an integrated robot based on a multi-user virtual space (MUSH) framework, and any logical modification needs to reconfigure the whole code, which has a high maintenance cost.
[0028] Based on this, the embodiments of the present application provide a game test method, device, electronic equipment, computer readable storage medium and program product, which binds a target test robot with a target function module, and controls the target test robot to execute the target function module to realize the corresponding game function, thereby establishing a flexible mapping relationship between the test robot and the specific game function. The target test robot is no longer limited to the preset fixed task flow, but is driven by the dynamic binding relationship to execute the test operation of the specific game function. The dynamic binding and execution mechanism realizes the on-demand configuration and automatic execution of the test task, improves the flexibility and scalability of the test process, helps to improve the efficiency and coverage of the game test, and reduces the maintenance complexity of the game code.
[0029] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0030] Please refer to Figure 1 , Figure 1 A flowchart of a game test method provided by the embodiments of the present application is shown. The method comprises the following steps: Step S10, binding a target test robot with a target function module according to a game test instruction; the function module corresponds to a game function one by one.
[0031] In the embodiment of the present application, the tester needs to compile corresponding atomized function scripts according to specific behavior types in the game before testing the game, each function script encapsulates an independent game function, for example, the function scripts corresponding to operations such as path finding move.lua and processing combat logic combat.lua.
[0032] These function scripts are implemented in a lightweight, embeddable scripting language Lua language, and are stored in a unified script library (such as directory $robot / dev / ) according to the agreed specification. By separating the function scripts from the version control system of the game client, the independent evolution and centralized management of the test logic are realized, providing a data basis for subsequent dynamic binding.
[0033] When the tester inputs a game test instruction to the electronic device for testing the game, the electronic device parses the game test instruction, identifies the target game function to be executed, and obtains the target function module corresponding to the target game function and injects it into the execution context of the target test robot for execution, thereby completing the dynamic binding between the two.
[0034] The above dynamic binding does not depend on static linking in the compilation phase, but is bound according to test requirements in the running phase, so that the same target test robot can flexibly switch the executed function module in different test phases, significantly improving the adaptability and resource allocation efficiency of the test task.
[0035] Step S40, controlling the target test robot to execute the target function module to realize the game function corresponding to the target function module.
[0036] In the embodiment of the present application, the target test robot that has completed the binding calls the execution interface defined in the target function module associated therewith to start the preset behavior sequence and simulate the game actions of a real player. For example, when the target function module is a combat module, the target test robot will sequentially perform operations such as moving to a target position, locking an enemy unit, and casting a skill, and completely reproduce the user behavior path under a specific game function. The entire execution process is driven by the internal logic of the target function module, and the target test robot only serves as an execution carrier, responsible for context maintenance and network interaction, to ensure the authenticity and timing accuracy of the test behavior.
[0037] It should be noted that the embodiment of the present application proposes a distributed game function execution framework to realize efficient batch control of large-scale test robots, for example, supporting control of multiple test robots in a specified ID interval (such as [1, 500]) as a unified operation unit, and only one instruction is needed to inject the same function module into the test robots in the ID interval to realize dynamic binding, avoiding the inefficient process of individual configuration and control in the traditional way, and greatly improving the stress testing efficiency.
[0038] To sum up, the game testing method provided by the embodiment of the application establishes a flexible mapping relationship between the test robot and the specific game function by binding the target test robot with the target function module and controlling the target test robot to execute the target function module to realize the corresponding game function, so that the target test robot is no longer limited to the preset fixed task flow, but is driven to perform the test operation of the specific game function in a targeted manner through the dynamic binding relationship. The on-demand configuration and automatic execution of the test task are realized through the dynamic binding and execution mechanism, the flexibility and scalability of the test process are improved, the efficiency and coverage of the game test are improved, and the maintenance complexity of the game code is reduced.
[0039] Optionally, the game testing instruction carries the identifier of the target test robot and the identifier of the target game function to be executed by the target test robot, and the following provides a possible implementation manner for how to bind the target test robot and the target function module. Figure 1 The sub-step of step S10 can include: Step S100, loading the corresponding target function module according to the identifier of the target game function.
[0040] In the embodiment of the application, the two independent but associated identifier information carried by the game testing instruction makes it possible to determine the execution subject and the execution content of the test task. The identifier of the target test robot is used to uniquely identify the automated test instance participating in the test task, and the identifier of the target game function is used to indicate the specific game behavior that the test robot needs to simulate or verify. This design realizes the decoupling of the test task configuration.
[0041] When the target function module corresponding to the identifier of the target game function needs to be loaded, it is first determined whether the target function module already exists in the current running memory (i.e., the current running environment). If the target function module already exists in the running memory, it is directly referenced. If the target function module does not exist in the running memory, the target function module is loaded into the running memory to ensure that the corresponding executable logic entity is prepared for the game function to be executed, and to provide the actual callable behavior module for the target test robot.
[0042] Step S110, binding the target test robot and the corresponding target function module according to the identifier of the target test robot and the identifier of the corresponding target game function.
[0043] In the embodiment of the application, the binding relationship between the target test robot and the corresponding target function module is established according to the identifier of the target test robot and the identifier of the target game function that has been determined. After the binding relationship is determined, the target test robot is endowed with the ability to call and execute the specific target function module, forming a mapping structure of “executor-function”.
[0044] It should be understood that the binding relationship between the target test robot and the target functional module is dynamically established at runtime, without relying on a preset fixed configuration, thereby supporting flexible task allocation and resource scheduling in multi-task concurrent scenarios, and improving the adaptability and scalability of the test system.
[0045] Optionally, regarding how to bind the target test robot and the target functional module, the following is a possible implementation method. The sub-steps of step S100 may include: If the target function module does not exist in memory, the target function script is obtained from the script library based on the identifier of the target game function; the function script corresponds one-to-one with the game function; the target function module is generated based on the target function script.
[0046] In this embodiment of the invention, if it is determined that the target functional module does not exist in memory, a query request is initiated to the script library based on the identifier of the target game function to obtain the target functional script that matches the identifier of the target game function. The script library is a centralized collection of functional scripts, each corresponding one-to-one with a specific game function and containing executable code or instruction sequences describing the logic of the test behavior. Extracting the required script from the script library through identifier matching ensures the accuracy and traceability of the data source, enabling rapid location and retrieval of functional scripts.
[0047] After obtaining the target function script, it is parsed and instantiated to generate a functional module object that can be directly called in the test environment, i.e., the target function module. The dynamic loading process transforms the script file into an executable unit, completing the transformation from static resources to dynamic components, which can support flexible expansion and on-the-spot construction of test functions.
[0048] As one possible implementation, assuming the target functional script is a mobile script and the target test bot's ID is 101-102, the functional script is injected into the test bot's runtime environment using the `MakeModule()` function. This enables runtime loading and hot updating of the Lua script, decoupling the game functionality (i.e., test logic) from the test bot. The `BindScript()` function is then used to dynamically bind the functional module to the test bot. The dynamic binding process is as follows: local module = { name = "move", file = {"$robot / dev / move.lua"} } / / Dynamically load modules lua_core.MakeModule(module); / / bind coordinate moving function robotMgr:GetRobotPlayer(101):BindScript("move.MoveTo(x,y)"); robotMgr:GetRobotPlayer(102):BindScript("move.MoveTo(x,y)"); It can be seen that the embodiment of the application realizes the delayed loading and dynamic creation of the function module by the script calling and module generation function based on the identifier, effectively reduces the memory occupation when the test environment is initially run, improves the resource utilization efficiency, and enhances the flexibility and maintainability of the test, so as to adapt to the changing test task requirements.
[0049] Optionally, the following provides a possible implementation manner for how to update the script library. The method further includes the following steps: Step S80, when the game version is updated, the version update log is analyzed, and the updated game function is obtained.
[0050] Step S90, the script library is updated based on the updated game function.
[0051] In the embodiment of the application, the version update log is provided by the game development side, and records the function change content involved in this update, including the added, deleted or adjusted game function entries. The version adaptive interface is provided, and the updated game function set is extracted by analyzing the version update log (for example, using a semantic log analyzer).
[0052] Next, the script library is dynamically updated according to the actual change of the game function (that is, the updated game function set), so as to ensure that the test system has adaptive ability when facing version iteration, avoid test failure or missing test problems caused by function change, improve the continuous availability and maintenance efficiency of the test system, and reduce the maintenance cost.
[0053] Optionally, the following provides a possible implementation manner for how to update the script library. The step of step S90 can include: Step S900, if the updated game function is an added game function, a first function script corresponding to the added game function is generated, and the first function script is added to the script library.
[0054] In the embodiment of the present application, if the new game function, the technical characteristics of the new game function are defined, the corresponding function script (i.e. the first function script) is generated, and it is ensured that the first function script can drive the test robot to complete the related game operation. The newly generated first function script is inserted into the script library as an atomic behavior node, which realizes the timely supplement of the test resource to the new function and ensures that the subsequent test task can automatically test the new game function.
[0055] In step S910, if the updated game function is a deleted game function, the function script corresponding to the deleted game function is determined as a second function script, and the second function script is deleted from the script library.
[0056] In the embodiment of the present application, the function script corresponding to the deleted game function is identified as a second function script, the identification of the deleted game function is obtained from the game version log, the second function script uniquely associated with the identification is searched from the script library, and the second function script is deleted from the script library. This avoids that the expired or invalid script is mistakenly called in the script library, thereby improving the accuracy of script management and the stability of the running environment, and preventing the test abnormality caused by executing the non-existing game function.
[0057] In step S920, if the updated game function is a modified game function, the function script corresponding to the modified game function is determined as a third function script, and the third function script in the script library is modified.
[0058] In the embodiment of the present application, the function script corresponding to the modified game function is determined as a third function script, the modification content is obtained from the game version log, and the instruction sequence, the parameter configuration and the logic judgment condition of the third function script are adjusted according to the modification content, so that the third function script is adapted to the behavior mode of the adjusted game function. This ensures that the function script can accurately reflect the game mechanism of the current version, maintains the effectiveness of the test case, supports the test system to continuously match the product iteration rhythm, and keeps the reliability of the test result.
[0059] It should be noted that the function script supports runtime reloading after being updated, and the test robot does not need to be restarted, for example, the ReloadModule() is used to take effect immediately.
[0060] It can be seen that, in the embodiment of the present application, the consistency between the script library content and the game function version is maintained by distinguishing the update types and performing the corresponding script adding, deleting and modifying operations, the accuracy and the automation level of the test script management are improved, and the continuous effectiveness and stability of the test system are ensured.
[0061] Optionally, the game test instruction carries the identification of the target test robot and the identification of the target game function to be executed by the target test robot. As to how to execute the target function module, a possible implementation manner is provided as follows. Please refer toFigure 2 The method further comprises the following steps: In step S30, if there are multiple target function modules, a preset dependency relationship is searched according to the identification of the target game function, and it is determined whether there is an execution dependency among the target function modules.
[0062] In the embodiment of the application, if there is only one target function module, the target test robot is directly controlled to execute the target function module. If there are multiple target function modules, the multiple target function modules may have an execution order dependency. According to the identification of the target game function, a preset dependency relationship data is searched to determine whether there is a logical execution dependency among the target function modules.
[0063] The preset dependency relationship refers to a rule set defined in the test task planning stage and reflecting the operation sequence constraint among the function modules. Through the searching process, it can be determined whether the function modules need to be executed in a specific order.
[0064] In step S60, if there is an execution dependency among the target function modules, an event-driven condition is generated according to the identification of the target game function and the preset dependency relationship.
[0065] In the embodiment of the application, when there is an execution dependency among the target function modules, the corresponding event-driven condition is automatically generated according to the identification of the target game function and the preset dependency relationship among the function modules, thereby realizing the orderly cooperation among multiple game functions.
[0066] Specifically, first, a group of target function modules participating in the test task and the execution order constraint thereof are retrieved from the preset dependency relationship (for example, a preset function dependency configuration table) based on the unique identification of the target game function (such as movement, attack, etc.), and the event-driven condition is constructed according to the execution dependency, supporting task chain triggering (for example, movement → battle → resource collection), so as to realize the cooperative test of multiple game functions.
[0067] In step S70, the target test robot is controlled to execute the target function module according to the event-driven condition.
[0068] In the embodiment of the application, the event bus communication mechanism (i.e., the event-driven condition) is used to realize the cooperation of multiple game functions. The target function module uses the message queue to deliver events, supports the automatic triggering of a complex task chain, and controls the target test robot to execute the target function according to the relationship order of the execution dependency.
[0069] For example, in a copy opening test scene, a same test robot is bound to multiple function modules corresponding to game functions, including entering a copy, BOSS battle, and reward pickup. The execution dependency is that the reward pickup can be activated only after the BOSS dies.
[0070] First, set up a test bot: robot:BindScript("move.EnterDungeon(101)"); / / Enter the copy robot:BindScript("combat.FightBoss('boss01')"); / / BOSS battle robot:BindScript("loot.CollectItem('reward')") ; / / Reward pickup Next, set the event-driven conditions: OnEvent("DungeonCleared", function() robot:ActivateScript("loot"); By listening for the "DungeonCleared" event via OnEvent, and automatically executing the callback function to activate the picked-up functional module after the "DungeonCleared" event is broadcast by BroadcastEvent, a cross-functional module communication mechanism is built using BroadcastEvent() and OnEvent() to achieve orderly collaboration and dynamic response between functional modules, ensuring the continuity and automation of the testing process.
[0071] As can be seen, the embodiments of the present invention, by introducing an event-driven mechanism, ensure that functional modules with dependencies can be executed in a predetermined logical order, thereby achieving refined control over the collaborative testing process of multifunctional modules, improving the accuracy, adaptability and automation level of the testing process, effectively avoiding test failures or result deviations caused by improper execution timing, and overcoming the problems of collaboration difficulties and resource competition caused by deploying multiple types of robots in the prior art.
[0072] To more clearly illustrate the game testing method provided in the embodiments of the present invention, an example of a collaborative testing scenario for MMORPG dungeons will be used: This invention operates within a three-layer architecture, comprising an execution layer, a logic layer, and a scheduling layer. The execution layer includes, but is not limited to, a basic robot cluster used to simulate real player logins, state synchronization, and behavior execution. The logic layer includes, but is not limited to, a Lua script engine with a MakeModule() dynamic loading mechanism used to parse and execute independent Lua test scripts. The scheduling layer includes, but is not limited to, dynamically bound controllers, an event bus, and version adaptation interfaces used to control script injection, trigger task chains, and enable cross-script communication.
[0073] First, during the functional script development phase, testers create atomic functional scripts. For example, they create the file: `$robot / dev / pk.lua`. local pk = {} function pk:Execute(robot, target_id) robot: MoveTo(GetNPC(target_id).pos) / / Call the basic movement API robot:CastSkill("Fireball", target_id) / / Release skill If CheckHP (robot) < 30%, then BroadcastEvent("NeedHeal", robot.id) / / Triggers the healing event end end return pk Upon receiving a test command for the PK game functionality, the corresponding script is dynamically loaded to generate the game's functional modules. The test command is: bash # Command format: / bind_script [robot ID range] [script name][function name] [parameters].
[0074] / bind_script 101-105 pk Execute enemy_123 The dynamic loading function is: function MakeModule(module) local f, err = loadfile(module.file[1]) if not f then error("Load failed: "..err) end _G[module.name] = f() / / Inject global namespace end The binding command is parsed, the ID range of the test robot is obtained as 101-105, the MakeModule function is executed, the pk function script is dynamically loaded into the memory, the pk function module is obtained, after obtaining the pk function module, the target test robot and the pk function module are dynamically bound, the Execute function reference is obtained, the coro execution function is created for each test robot, and the target test robot is controlled to execute the pk function module. Through dynamic binding and event-driven cooperation, the runtime reconstruction of the test logic is realized, which is suitable for the high-frequency iteration characteristics of MMORPG.
[0075] The execution function of the test robot is: function Robot:ExecuteScript(func_name,...) local fn = _G[self.script][func_name] / / get the bound function coroutine.wrap(fn)(self,...) / / coroutine execution end Compared with the traditional scheme, the script maintenance cost, complex scene coverage, pressure test scale and development cooperation efficiency of the embodiment of the application are significantly improved, as shown in Table 1.
[0076] Table 1
[0077] It can be seen that, by decoupling the robot basic function and the test logic, the embodiment of the application adopts a script dynamic binding mechanism, so that the same robot can flexibly load different test scripts at runtime, thereby overcoming the function rigidity problem caused by the hard binding of scripts and robots in the prior art, and significantly improving the coverage ability of the test scene; by constructing an event-driven multi-script cooperation framework, the triggering of the task chain and the cross-robot cooperation (such as moving→fighting→resource collection) are supported, the behavior linkage and resource competition simulation in a complex interactive scene are realized, the problems of independent running of multiple robots and low efficiency of cooperation are effectively solved, and the simulation ability of real game interaction logic is enhanced; by introducing a version adaptive interface, the existing script or a new atomic node can be automatically matched when the game is updated, the script rewriting caused by protocol or interface changes is avoided, the maintenance cost is greatly reduced, and the test iteration period is shortened; at the same time, the system architecture optimization supports larger-scale robot concurrent running, improves the authenticity and accuracy of the pressure test, and overcomes the distortion problem of the pressure test result caused by the limitation of single machine deployment quantity.
[0078] Based on the same inventive concept, the basic principle and the generated technical effects of the game testing device provided by the embodiments of the present application are the same as those of the above-mentioned embodiments. For brevity, some parts of the present embodiment are not mentioned in the above-mentioned embodiments.
[0079] Please refer to Figure 3 , Figure 3 A block schematic diagram of the game testing device 400 provided by the embodiments of the present application is shown. The game testing device 400 includes a processing module 410 and a testing module 420.
[0080] The processing module 410 is configured to bind the target testing robot with the target function module according to the game testing instruction; the function module corresponds to the game function one-to-one.
[0081] The testing module 420 is configured to control the target testing robot to execute the target function module, so as to realize the game function corresponding to the target function module.
[0082] In summary, the game testing device provided by the embodiments of the present application binds the target testing robot with the target function module, and controls the target testing robot to execute the target function module, so as to realize the corresponding game function, thereby establishing a flexible mapping relationship between the testing robot and the specific game function. The target testing robot is no longer limited to the preset fixed task flow, but is driven by the dynamic binding relationship to execute the test operation of the specific game function. The dynamic binding and execution mechanism realizes the on-demand configuration and automatic execution of the test task, improves the flexibility and scalability of the test process, helps to improve the efficiency and coverage of the game test, and reduces the maintenance complexity of the game code.
[0083] Optionally, the game testing instruction carries the identifier of the target testing robot and the identifier of the target game function to be executed by the target testing robot. The processing module 410 is specifically configured to load the corresponding target function module according to the identifier of the target game function; and bind the target testing robot and the corresponding target function module according to the identifier of the target testing robot and the identifier of the corresponding target game function.
[0084] Optionally, the processing module 410 is specifically configured to acquire the target function script from the script library according to the identifier of the target game function if the target function module does not exist in the memory; the function script corresponds to the game function one-to-one; and generate the target function module according to the target function script.
[0085] Optionally, the processing module 410 is further configured to analyze the version update log and acquire the updated game function when the game version is updated; and update the script library based on the updated game function.
[0086] Optionally, the processing module 410 is specifically configured to: if the updated game function is a newly added game function, generate a first function script corresponding to the newly added game function, and add the first function script to the script library; if the updated game function is a deleted game function, determine a function script corresponding to the deleted game function as a second function script, and delete the second function script from the script library; and if the updated game function is a modified game function, determine a function script corresponding to the modified game function as a third function script, and modify the third function script in the script library.
[0087] Optionally, the game test instruction carries an identifier of the target test robot and an identifier of a target game function to be executed by the target test robot. The test module 420 is specifically configured to: if the target function module is multiple, find a preset dependency relationship according to the identifier of the target game function, and determine whether the target function modules exist execution dependency; if the target function modules exist execution dependency, generate an event-driven condition according to the identifier of the target game function and the preset dependency relationship; and control the target test robot to execute the target function module according to the event-driven condition.
[0088] Please refer to Figure 4 A block schematic diagram of an electronic device 500 is provided for the embodiments of the present application. The electronic device 500 includes, but is not limited to, a personal computer (PC), a Personal Digital Assistant (PDA), a notebook computer, a tablet computer, and a server. The electronic device 500 includes a memory 510, a processor 520, and a communication module 530. The memory 510, the processor 520, and the communication module 530 are directly or indirectly electrically connected to each other to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines.
[0089] The memory 510 is configured to store programs or data. The memory 510 can be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electric Erasable Programmable Read-Only Memory (EEPROM), etc.
[0090] The processor 520 is configured to read / write the data or program stored in the memory 510, and perform corresponding functions. For example, when the computer program stored in the memory 510 is executed by the processor 520, the game testing method disclosed in the above embodiments can be implemented.
[0091] The communication module 530 is configured to establish a communication connection between the electronic device 500 and other communication terminals through a network, and configured to receive / transmit data through the network.
[0092] It should be understood that, Figure 4 The structure shown is only a structural schematic diagram of the electronic device 500, and the electronic device 500 can further include more or less components than those shown in the figures, or have a different configuration from that shown in the figures. Figure 4 The components shown in the figures can be implemented in hardware, software or a combination thereof. Figure 4 The components shown in the figures can be implemented in hardware, software or a combination thereof. Figure 4 The components shown in the figures can be implemented in hardware, software or a combination thereof.
[0093] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program, and the computer program is executed by the processor 520 to implement the game testing method disclosed in the above embodiments.
[0094] The embodiments of the present application further provide a program product, and the program product is executed by the processor 520 to implement the game testing method disclosed in the above embodiments.
[0095] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can also be implemented by other manners. The apparatus embodiments described above are only schematic, and for example, the flowcharts and block diagrams in the drawings show the possible implementation architectures, functions and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a segment or a portion of code which comprises one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions shown in the blocks can occur in different orders from those shown in the figures. For example, two blocks shown in succession can actually be executed substantially concurrently or in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0096] In addition, each functional module in various embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0097] If the functions are realized in the form of software functional modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and various media that can store program codes.
[0098] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A game testing method characterized by comprising: The method comprises: binding a target test robot with a target function module according to a game test instruction; the function module corresponds to a game function one by one; controlling the target test robot to execute the target function module to realize the game function corresponding to the target function module.
2. The game testing method of claim 1, wherein, The game test instruction carries an identifier of the target test robot and an identifier of a target game function to be executed by the target test robot; the binding of the target test robot with the target function module according to the game test instruction comprises: loading a corresponding target function module according to the identifier of the target game function; binding the target test robot and the corresponding target function module according to the identifier of the target test robot and the identifier of the corresponding target game function.
3. The game testing method of claim 2, wherein, The loading of the corresponding target function module according to the identifier of the target game function comprises: if the target function module does not exist in the memory, obtaining a target function script from a script library according to the identifier of the target game function; the function script corresponds to a game function one by one; generating the target function module according to the target function script.
4. The game testing method of claim 3, wherein, The method further comprises: when a game version is updated, analyzing a version update log and obtaining an updated game function; updating the script library based on the updated game function.
5. The game testing method of claim 4, wherein, The updating of the script library based on the updated game function comprises: if the updated game function is a newly added game function, generating a first function script corresponding to the newly added game function and adding the first function script to the script library; if the updated game function is a deleted game function, determining a function script corresponding to the deleted game function as a second function script and deleting the second function script from the script library; if the updated game function is a modified game function, determining a function script corresponding to the modified game function as a third function script and modifying the third function script in the script library.
6. The game testing method of claim 1, wherein, The game test instruction carries an identifier of the target test robot and an identifier of a target game function to be executed by the target test robot; after the binding of the target test robot with the target function module according to the game test instruction, the method further comprises: if the target function module is multiple, searching for a preset dependency relationship according to the identifier of the target game function to determine whether each target function module has an execution dependency; if each target function module has an execution dependency, generating an event-driven condition according to the identifier of the target game function and the preset dependency relationship; The controlling of the target test robot to execute the target function module comprises: controlling the target test robot to execute the target function module according to the event-driven condition.
7. A game testing apparatus, characterized by comprising: The device comprises: a processing module configured to bind a target test robot with a target function module according to a game test instruction; the function module corresponds to a game function one by one; a test module configured to control the target test robot to execute the target function module to realize the game function corresponding to the target function module.
8. An electronic device, comprising: A computer program product comprising a computer readable medium having stored thereon computer program means which, when executed by a processor, cause the processor to implement the game testing method according to any one of claims 1-6.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the game testing method according to any one of claims 1-6.
10. A program product, characterized by The program product is executed by a processor to implement the game testing method according to any one of claims 1-6.