Game testing method and device, electronic equipment and computer readable storage medium
By executing test commands directly on the server side through a game testing website, the problems of high cost and low efficiency in existing game testing technologies are solved, and efficient game testing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-04-25
- Publication Date
- 2026-06-19
Smart Images

Figure CN118838800B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the Internet field, and includes, but is not limited to, a game testing method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] During game development, developers typically release new feature versions of the game client continuously to iterate and optimize it. Games are usually complex projects with numerous interdependent systems. After developing a new feature, it often needs to be tested and validated within the game. This new feature may depend on other systems, meaning that triggering it requires certain prerequisites.
[0003] Currently, during game testing, testers typically modify data in the database or negotiate with the server to develop corresponding game control commands (GMs) to ensure that multiple interdependent systems meet the testing conditions.
[0004] However, modifying data in the database is costly and insecure. Developing GM commands through client-server negotiation is also costly in terms of communication and development. Furthermore, using GM commands for functional testing requires triggering the client pipeline to compile and generate a new mobile installation package, a time-consuming process. Therefore, all relevant game testing methods suffer from high testing costs and significant development workloads, resulting in low efficiency in game testing. Summary of the Invention
[0005] This application provides a game testing method, apparatus, electronic device, and computer-readable storage medium, which can be applied to at least the game field and the game testing field, and can reduce the cost of game testing and improve the efficiency of game testing.
[0006] The technical solution of this application embodiment is implemented as follows:
[0007] This application provides a game testing method applied to a game server, comprising: responding to a game testing operation input through a game testing website, receiving at least one test instruction for a target function in a target game, each test instruction including at least one test parameter; querying a processing function for each test instruction from a game management instruction executor; if a processing function for any test instruction is found in the game management instruction executor, executing the processing function based on the test parameters in the test instruction to obtain a test result; and returning the test result to the game testing website.
[0008] This application provides a game testing device, comprising: a test instruction generation module, configured to receive at least one test instruction for a target function in a target game in response to a game testing operation input through a game testing website, each test instruction including at least one test parameter; a function query module, configured to query a processing function for each test instruction from a game management instruction executor; a function execution module, configured to execute the processing function based on the test parameters in the test instruction if a processing function for any test instruction is found in the game management instruction executor, thereby obtaining a test result; and a sending module, configured to return the test result to the game testing website.
[0009] In some embodiments, the test instruction generation module is further configured to: after completing trusted identity authentication on the game testing website, input game testing operations through the game testing website, the game testing operations including a selection operation for the game server and an input operation for the test account; the game server receives an account query request for the test account sent by the game testing website; in response to the account query request, queries a unique identifier corresponding to the test account from the character database; and returns the unique identifier to the game testing website; wherein, after obtaining the unique identifier, the game testing website receives input test parameters for a target function in the target game, and generates at least one test instruction for the target function in the target game based on the test parameters; and receives the at least one test instruction.
[0010] In some embodiments, the apparatus further includes: a help instruction receiving module, configured to receive a help instruction sent by the game testing website; an instruction information acquisition module, configured to acquire instruction information of each game management instruction that the game server can support in response to the help instruction; and an instruction information sending module, configured to return the instruction information of each game management instruction to the game testing website, and display the instruction information corresponding to each game management instruction on the current page of the game testing website.
[0011] In some embodiments, the instruction information acquisition module is further configured to: in response to the help instruction, determine whether the test account corresponding to the unique identifier is online; if the test account corresponding to the unique identifier is currently online, query the game management instruction executor for multiple game management instructions that the game server can support; and obtain the command string and instruction description information of each game management instruction from the game management instructions; the command string and instruction description information constitute the instruction information of the game management instruction.
[0012] In some embodiments, the apparatus further includes: a status recording module, configured to record the online status of the test account in an online registration server after the test account successfully logs into the game server; the instruction information acquisition module is further configured to: query the online registration server to see if the test account corresponding to the unique identifier is online.
[0013] In some embodiments, the at least one test instruction is request data in a first format; the apparatus further includes: an interface calling module, configured to call a data representation interface to convert the request data in the first format into a second format request data; wherein the request data in the first format is request data in a read-write format; and the request data in the second format is memory structure data.
[0014] In some embodiments, the game server includes at least a message forwarding server, an online registration server, and a game lobby server; the online registration server is used to record the online status of test accounts and the address of the game lobby server where the test account is logged in; the function query module is further used for: the message forwarding server querying the online registration server to see if the current test account is online, and querying the address of the game lobby server corresponding to the test account; the message forwarding server, in response to the test account being online, forwarding each test instruction to the game lobby server based on the address of the game lobby server; and querying the processing function of each test instruction from the game management instruction executor through the game lobby server.
[0015] In some embodiments, the game management instruction executor includes a structure array, which includes multiple structure elements, each of which corresponds to a game management instruction; each structure element includes a command string, an execution function, and permission information for the corresponding game management instruction; the function query module is further configured to: obtain a function identifier of a target function corresponding to each test instruction through the game lobby server; the at least one test instruction corresponds to one or more target functions; query a first target structure element corresponding to the function identifier from the multiple structure elements; obtain the execution function of the target function from the first target structure element; and determine the execution function of the target function as the processing function of the test instruction corresponding to the target function.
[0016] In some embodiments, the game management instruction executor includes a structure array, which includes multiple structure elements, each structure element corresponding to a game management instruction; each structure element includes a command string, an execution function, and permission information for the corresponding game management instruction; the function query module is further configured to: obtain the instruction content of each test instruction through the game lobby server; if the test instruction is determined to conform to a preset format based on the instruction content, then obtain the test command string from the test instruction; query the game management instruction executor for a second target structure element corresponding to the test command string; obtain the execution function of the target function from the second target structure element; and determine the execution function of the target function as the processing function of the test instruction corresponding to the target function.
[0017] In some embodiments, the function execution module is further configured to: obtain test permission information from the instruction content; determine a target account with permissions corresponding to the test permission information based on the test permission information in the test instruction; perform permission analysis on the target account based on the permission information in the second target structure element to obtain permission analysis results; and, in response to the permission analysis result indicating that the test account corresponding to the target account has test permissions, execute the processing function based on the test parameters in the test instruction to obtain the test results of the test account.
[0018] In some embodiments, the data format of the test result is a second format; the sending module is further configured to: send the test result to the message forwarding server through the game lobby server; encapsulate the test result in the second format into a test result in the first format through the message forwarding server; and return the test result in the first format to the game testing website; wherein, the first format is a read-write format; and the second format is a memory structure format.
[0019] In some embodiments, the apparatus further includes: an environment determination module, configured to determine the execution environment of each test instruction; and a function call module, configured to, if the execution environment is a server other than the game lobby server, call a forwarding interface function to forward the test instruction to the other server, so that the other server can execute the processing function based on the test parameters in the test instruction to obtain the test result.
[0020] This application provides an electronic device, including: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the above-described game testing method.
[0021] This application provides a computer program product, which includes executable instructions stored in a computer-readable storage medium; wherein, when the processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the above-mentioned game testing method is implemented.
[0022] This application provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the above-described game testing method.
[0023] The embodiments of this application have the following beneficial effects: The game server responds to a game test operation input through a game test website, receiving at least one test instruction for a target function in the target game. Each test instruction includes at least one test parameter. Then, it queries the processing function for each test instruction from the game management instruction executor. If a processing function for any test instruction is found in the game management instruction executor, the processing function is executed based on the test parameters in the test instruction to obtain the test result. Thus, since the game test operation input through the provided game test website triggers test instructions for the target function in the target game during game testing, without needing to download and install the target game on the terminal before testing, or without requiring the client and game server to negotiate and develop test instructions, the workload of client development is greatly reduced, thereby significantly improving the effectiveness of server-side new function testing. Furthermore, since the processing function for each test instruction is queried in the game management instruction executor during game testing, the processing function corresponding to each target function's test instruction can be pre-written by the target function's developers without needing to negotiate with client developers, further reducing the development workload for testing, lowering the cost of game testing, and improving the efficiency of game testing. Attached Figure Description
[0024] Figure 1A and Figure 1B This is a schematic diagram of the game operation interface where game systems depend on each other, provided in an embodiment of this application.
[0025] Figure 2 This is a schematic diagram illustrating the implementation process of modifying data in a database in related technologies;
[0026] Figure 3 This is a schematic diagram illustrating the implementation process of GM instructions in related technologies, where the client and server negotiate to develop corresponding functions.
[0027] Figure 4 This is a diagram of the GM command interface in related technologies;
[0028] Figure 5This is a diagram of the pipeline packaging interface in related technologies;
[0029] Figure 6 This is an optional architecture diagram of the game testing system provided in this application embodiment;
[0030] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0031] Figure 8 This is an optional flowchart illustrating the game testing method provided in this application embodiment;
[0032] Figure 9 This is another optional flowchart illustrating the game testing method provided in the embodiments of this application;
[0033] Figure 10 This is a schematic diagram illustrating the implementation process of obtaining instruction information for each game management instruction provided in an embodiment of this application;
[0034] Figure 11 This is another optional flowchart illustrating the game testing method provided in the embodiments of this application;
[0035] Figure 12 This is a schematic diagram illustrating the implementation flow of the processing function for querying each test instruction provided in an embodiment of this application;
[0036] Figure 13 This is a screenshot of the web entry page for the game testing method provided in this application embodiment;
[0037] Figure 14 This is a screenshot of the web interface of GM after the test is started, provided in an embodiment of this application.
[0038] Figure 15 This is a page diagram of the combined GM instructions provided in the embodiments of this application;
[0039] Figure 16 This is the intent of the web application provided in this embodiment to display detailed help information.
[0040] Figure 17 This is a game interface image of the current test account at level 16 provided in this application embodiment;
[0041] Figure 18 This is a screenshot of a web interface for setting player levels and experience using GM commands, provided in an embodiment of this application.
[0042] Figure 19 This is a game interface diagram showing the player's level changing to 17, provided in an embodiment of this application.
[0043] Figure 20This is a schematic diagram of the overall structure of the web-based interactive game GM framework provided in the embodiments of this application;
[0044] Figure 21 This is a schematic diagram of the XML format request data received by GameIdipSvr according to an embodiment of this application;
[0045] Figure 22 This is a schematic diagram of the return information indicating that the test account is offline, provided in an embodiment of this application.
[0046] Figure 23 This is a schematic diagram of the GM command processing flow of a web website provided in the embodiments of this application;
[0047] Figure 24 This is a schematic diagram illustrating the information of each element in the structure array provided in the embodiments of this application;
[0048] Figure 25 This is a flowchart illustrating the processing of GM instructions by ZoneSvr according to an embodiment of this application. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0050] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit the application.
[0051] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0052] Before explaining the game testing method in the embodiments of this application, the technical terms involved in the embodiments of this application will be explained first.
[0053] (1) OpenID: refers to an open account of third-party login software (e.g., instant messaging application). When a player uses an instant messaging application to authorize login to the game application, the game application will not obtain the player's instant messaging application account, but rather the OpenID.
[0054] (2) OpenID: is an identifier composed of numbers, letters and characters, such as o7RXXX_XKa_389XXXXXXl71k.
[0055] (3) RoleID: refers to the unique identifier ID generated by the game server for each account.
[0056] (4) Trusted Identity Authentication: This refers to the process by which testers, through test terminals, access the web-based interactive game GM framework of this application embodiment, granting access permissions based on trusted identity, trusted devices, trusted applications, and trusted links. All access must be authenticated, authorized, and encrypted, thereby enabling enterprise employees to securely access authorized resources to handle any business regardless of their location, time, or device. In this application embodiment, trusted identity authentication relies on the zero-trust concept, providing secure terminal access capabilities and IT office service capabilities. It leverages the three core capabilities of trusted terminals, trusted identities, and trusted applications to achieve a solution for enterprise employee terminals to securely, stably, and efficiently access enterprise resources and data in any network environment.
[0057] (5) Game lobby server (ZoneSvr): A game server that can provide functions such as player account login, data caching and business logic processing.
[0058] (6) Online Registration Server (OnlineSvr): Used to improve player online registration and message forwarding services. It mainly provides players' online status query and registers the ZoneSvr process where online players are located. When it is necessary to forward messages to online players, it can correctly forward messages to the process where the player is located.
[0059] (7) Message forwarding server (GameIdipSvr): This is the game-side server used to parse and process requests from the game test website (web).
[0060] (8) Data representation interface: refers to the semantic interface used to implement operations such as displaying, describing and automating data. In this embodiment, the data representation interface can be called to convert the data format of the request data of different data formats.
[0061] The methods in the relevant technologies are explained below.
[0062] Games are complex projects with numerous interdependent systems. For example, in a certain mobile game, players can only participate in ranked matches if they reach level 10 and own 16 or more heroes (including free-to-play heroes). Figure 1A and Figure 1B The diagram shown is a schematic representation of the game operation interface where game systems depend on each other, as provided in an embodiment of this application. Figure 1A As shown, on the current interface of the game application, players can select to view the "Ranked Mode Rules," such as... Figure 1B As shown, on the current interface of the game application, players can select and view the "Intimacy Relationship Rules." The game systems are interdependent, meaning the growth system, collection system, and matchmaking system are interdependent; in-game currency can be used to purchase heroes, meaning the payment system and item system are interdependent; intimacy can be increased through team matches, gifting heroes or skins, etc. Figure 1A and Figure 1B As shown, the team system, collection system, and social system are interdependent.
[0063] After developing new game features, in-game testing and acceptance are often required. These new features may depend on other systems, meaning certain prerequisites are needed to trigger them. For example, developing ranked match-related features requires an account to reach level 10 and own at least 16 heroes to enable ranked matches for testing. Following the normal game flow, the test account would need to play many matches to reach level 10 and might also need to spend real money to purchase enough heroes. This requires a significant amount of time to meet the testing conditions, making the process inflexible, inefficient, and unsuitable for testing needs.
[0064] To solve problems like those mentioned above, there are generally two solutions in related technologies: (1) modifying the data in the database; (2) the client and server negotiate to develop GM commands with corresponding functions.
[0065] For methods of modifying database data, such as Figure 2 The diagram illustrates the implementation process of modifying database data in related technologies. Developers read the relevant code to determine which data needs to be modified and which tables in the database store this data. Then, they use a terminal or script to establish a database connection and modify the relevant data. After that, the developers begin testing the game's functionality.
[0066] However, this approach is costly: since new features may depend on systems managed by other server developers, it's necessary to read the source code and understand the functionality of the dependent systems to determine the data to be modified. For complex systems, a considerable amount of time is required to familiarize oneself with the relevant functions and data storage locations. Furthermore, this approach has poor security: directly modifying database data without application-layer system checks can easily lead to invalid data (e.g., changing an account's reputation level to 6 when the game has a level 5 cap); simultaneously, data may be interconnected, and incomplete modifications could lead to unknown behaviors on the client side (e.g., changing an account's reputation level requires corresponding adjustments to the associated reputation score).
[0067] For solutions involving client-server negotiation to develop corresponding GM commands, such as... Figure 3 The diagram illustrates the implementation process of GM commands (Game Mastery commands) in related technologies, where the client and server negotiate and develop corresponding functionalities. During requirements communication, server and client developers negotiate the corresponding GM command functionality. After completing the functional development, the server and client developers create the GM commands. Then, the server developers trigger the server pipeline to update the test environment server to release the new feature. The client developers trigger the client pipeline to compile and generate a new mobile installation package. Afterward, the server and client developers install the game on the test phone and use the GM commands to perform functional testing, such as... Figure 4 The image shown is a diagram of the GM command interface in related technologies. Figure 4 The GM command interface shown includes multiple GM command interface contents 401. Testers can open and display multiple GM command interface contents 401 by clicking the button 402 to open the GM command interface.
[0068] However, the approach of having the client and server negotiate the development of GM commands for corresponding functions requires collaboration between server and client developers for each GM command, resulting in high communication and development costs. In most cases, GM commands are primarily used to add, delete, modify, and query account data, thereby assisting in efficient testing of game functions. Account data is stored in the server's database, so server developers are responsible for developing the functional logic of GM commands, while client developers are responsible for displaying them in the GM panel (e.g., ...). Figure 4 (As shown) Add a corresponding trigger button; however, when using GM commands for functional testing, it is necessary to trigger the client pipeline to compile and generate a new mobile installation package, a process that takes a long time (generally more than 3 hours), such as Figure 5 The diagram shown illustrates the pipeline packaging interface. The packaging process for multiple mobile phone installation packages 501 takes a relatively long time.
[0069] Based on at least one of the aforementioned problems in related technologies, this application proposes a game testing method. This method is a web-interactive game GM framework design scheme. Server developers can add GM command processing logic for new functions to the game GM framework, and then send GM commands from the website to test the new functions. There is no need for client-side GM panel development, thereby reducing communication costs between server and client developers and reducing the workload of client developers. At the same time, it does not require pipeline compilation to generate new mobile installation packages, which greatly improves the efficiency of server function testing.
[0070] The game testing method provided in this application is applied to a game server. First, in response to a game testing operation input through a game testing website, at least one test instruction for a target function in the target game is received, and each test instruction includes at least one test parameter. Then, the processing function for each test instruction is queried from the game management instruction executor. If the processing function for any test instruction is found in the game management instruction executor, the processing function is executed based on the test parameters in the test instruction to obtain the test result. Finally, the test result is returned to the game testing website. Thus, since game testing is conducted by inputting game testing operations through the provided game testing website, test instructions for the target functions in the target game are triggered without needing to download and install the target game on the terminal before testing, or without the client and game server negotiating and developing test instructions. This significantly reduces the workload of client development, thereby greatly improving the effectiveness of server-side new function testing. Furthermore, since the processing function for each test instruction is queried in the game management instruction executor during game testing, the processing function corresponding to the test instruction for each target function can be pre-written by the developers of the target function without needing to negotiate with client developers. This further reduces the development workload associated with testing, lowers the cost of game testing, and improves the efficiency of game testing.
[0071] Here, we first describe an exemplary application of the game testing device in this application embodiment. This game testing device is an electronic device used to implement a game testing method. In one implementation, the game testing device (i.e., electronic device) provided in this application embodiment can be implemented as a terminal or as a server. In one implementation, the game testing device provided in this application embodiment can be implemented as any terminal with game running and testing functions, such as a laptop, tablet, desktop computer, mobile phone, portable music player, personal digital assistant, dedicated messaging device, portable game device, intelligent robot, smart home appliance, and smart vehicle device. In another implementation, the game testing device provided in this application embodiment can also be implemented as a server, wherein the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in this application embodiment. The following will describe an exemplary application when the game testing device is implemented as a server.
[0072] See Figure 6 , Figure 6 This is an optional architecture diagram of the game testing system provided in this application embodiment. This application embodiment illustrates the application of the game testing method to any type of game application. When game developers develop new features for a game application, they need to perform efficient game testing on these new features. During game testing, the web-interactive game GM framework constructed in this application embodiment can be used to test the new game features. In this application embodiment, the game testing system 10 includes at least a game testing website 100, a network 200, and a game server 300. The game server 300 can be the server of the game application. The game server 300 can constitute the game testing device in this application embodiment. The terminal 100 connects to the game server 300 through the network 200, which can be a wide area network (WAN), a local area network (LAN), or a combination of both.
[0073] In this embodiment, when testing a new game feature, the game testing website 100 receives game testing operations input by testers and generates at least one test instruction for the target feature (i.e., the new game feature) in the target game based on the received game testing operations. Each test instruction includes at least one test parameter. Then, the game testing website 100 sends the at least one test instruction to the game server 300 via the network 200. After receiving the at least one test instruction, the game server 300, in response to each test instruction, queries the processing function of each test instruction from the game management instruction executor. If a processing function for any test instruction is found in the game management instruction executor, the processing function is executed based on the test parameters in the test instruction to obtain the test result. After obtaining the test result of the target feature, the game server 300 returns the test result of the target feature to the game testing website 100. The game testing website 100 displays the test result of the target feature on the current page for testers to view.
[0074] In some embodiments, the game testing website 100 and the game server 300 constitute a web-based interactive game GM framework according to this application embodiment. In this framework, server developers can add processing logic for GM commands for new functions, and then send GM commands from the website to test the new functions. This eliminates the need to develop a GM panel on the client side, reducing communication costs between server and client developers, as well as the workload of client developers; simultaneously, it eliminates the need to generate new mobile installation packages through pipeline compilation, greatly improving the efficiency of server functional testing.
[0075] The game testing method provided in this application embodiment can also be implemented based on a cloud platform and through cloud technology. For example, the game server 300 mentioned above can be a cloud server. The cloud server receives at least one test instruction for a target function in the target game, or queries the processing function of each test instruction from the game management instruction executor, and executes the processing function based on the test parameters in the test instruction.
[0076] In some embodiments, a cloud storage system may also be included, which can store the processing functions of different test instructions in the game management instruction executor, or the test results of the target function. This way, when a game test request is received, the game management instruction executor and the processing functions of different test instructions can be retrieved from the cloud storage, improving the efficiency of game testing.
[0077] It's important to clarify that cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied in the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can be achieved through cloud computing.
[0078] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Figure 7 The illustrated electronic device may be a game testing device, which includes at least one processor 310, a memory 350, at least one network interface 320, and a user interface 330. The various components in the game testing device are coupled together via a bus system 340. It is understood that the bus system 340 is used to implement communication between these components. In addition to a data bus, the bus system 340 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 7 The general labeled all buses as Bus System 340.
[0079] The processor 310 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0080] User interface 330 includes one or more output devices 331 that enable the presentation of media content, and one or more input devices 332.
[0081] Memory 350 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. Memory 350 may optionally include one or more storage devices physically located remote from processor 310. Memory 350 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 350 described in this application embodiment is intended to include any suitable type of memory. In some embodiments, memory 350 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as illustrated below.
[0082] Operating system 351 includes system programs for handling various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; network communication module 352 is used to reach other computing devices via one or more (wired or wireless) network interfaces 320, exemplary network interfaces 320 include: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.; input processing module 353 is used to detect and translate one or more user inputs or interactions from one or more input devices 332.
[0083] In some embodiments, the apparatus provided in this application may be implemented in software. Figure 7 A game testing device 354 stored in memory 350 is shown. This game testing device 354 can be a game testing device in an electronic device, and can be software in the form of programs and plugins. It includes the following software modules: a test instruction generation module 3541, a function query module 3542, a function execution module 3543, and a sending module 3544. These modules are logically connected and can therefore be arbitrarily combined or further separated according to the functions they implement. The functions of each module will be described below.
[0084] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the game testing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0085] The game testing methods provided in the embodiments of this application can be executed by an electronic device, wherein the electronic device can be a game server, that is, the game testing methods in the embodiments of this application can be executed by a game server.
[0086] Figure 8 This is an optional flowchart illustrating the game testing method provided in this application embodiment. The following will combine... Figure 8 The steps shown are explained as follows: Figure 8 As shown, the method includes the following steps S101 to S104:
[0087] Step S101: In response to a game test operation entered through a game test website, receive at least one test instruction for a target function in the target game, each test instruction including at least one test parameter.
[0088] Here, the game testing website is the testing website developed in this application embodiment. The testing website is used to interact with the game server, and by interacting with the game testing website, the game testing process can be triggered, and a test parameter input channel for the game test can be provided. In other words, the game testing website provides a web page interactive interface. On this interface, testers can intuitively see the functions tested by different test commands, and can input test parameters related to the current game testing process for different test commands.
[0089] In this embodiment of the application, the game testing website and the game server communicate with each other. Through the game testing website, the function code of different functions in the game server can be called and run, so as to realize the operation and testing of the functions related to the function code.
[0090] The game testing website is an interactive website, which can have multiple different pages, each corresponding to different operational functions. For example, the game testing website can have a login page where testers can perform trusted identity authentication and log in to their website accounts after successful authentication. It should be noted that because the game testing website can call and run function code for different functions in the game server, this game testing website cannot be publicly disclosed. That is to say, only those with pre-authenticated website accounts can log in to the game testing website and conduct game testing. As another example, the game testing website can have test function selection and test parameter input pages. On this page, testers can select test commands for different test functions and can also customize the test parameters in the test commands, thereby enabling testing of the selected target function based on the test parameters.
[0091] The game testing process includes selecting the game server and inputting information for the test account.
[0092] The game server selection process involves choosing the server to be tested, i.e., selecting the server for the target game. Since different games correspond to different servers, and the same game can also have different servers (e.g., a beta server and a live server), you can select the server to be tested by entering a selection command on the game testing website. After selecting the server, the target game is determined. At this point, you can further select the target function to be tested, i.e., select the target function within the target game. When selecting a target function, you can choose from multiple test commands displayed on the game testing website page. Since each test command corresponds to a test function, and the same test function corresponds to at least one test command, selecting a test command effectively selects the target function.
[0093] The input operation for test accounts refers to entering the test account to be tested. This test account is a valid account on the game server, such as an account registered and logged into on the game server. The difference between a test account and a website account is that a test account is a unique identifier generated by the game server for the player, used to log in to the game server; a website account is a unique identifier generated by the game testing website for the tester, used to log in to the game testing website.
[0094] Each test command includes at least one test parameter. When a tester selects a test command, a parameter input component corresponding to that command is provided on the game testing website. Testers can input at least one test parameter for that command through this component. This allows the system to respond to the test command based on the input parameters, thus enabling accurate testing of the target game's intended functions.
[0095] Step S102: Query the processing function of each test instruction from the game management instruction executor.
[0096] In this embodiment of the application, after receiving a test instruction, the game server needs to query the processing function corresponding to each test instruction. Here, the processing function refers to the execution function of the functional logic that completes the target function.
[0097] The game management command executor can essentially be an array of structures, which contains multiple structure elements, each corresponding to a game management command. Each structure element includes the command string, execution function, and permission information of the corresponding game management command.
[0098] When querying the processing function for each test instruction, the test instruction can be parsed first to obtain the command string. Then, the corresponding structure element can be found through the command string, and the execution function within that structure element can be identified as the processing function for the test instruction. Alternatively, each structure element can also include help information for the corresponding game management instruction. This help information describes the functional module corresponding to the game management instruction. In this way, when querying the processing function for each test instruction, the function identifier of the target function corresponding to the test instruction can be obtained first. Simultaneously, based on the help information in each structure element in the structure array, the functional module corresponding to each game management instruction in the structure array can be determined. Then, the functional module with the same target function as the function identifier, along with the structure element of that functional module, can be identified, and the execution function within that structure element can be identified as the processing function for the test instruction.
[0099] Step S103: If the processing function of any test instruction is found in the game management instruction executor, the processing function is executed based on the test parameters in the test instruction to obtain the test result.
[0100] In this embodiment of the application, if the processing function of any test instruction can be found in the game management instruction executor, it indicates that the test instruction is a normal instruction that can be tested. Therefore, the queried test function is executed based on the test parameters in the test instruction to realize the response to the corresponding test instruction and obtain the test result.
[0101] In some embodiments, since there may be one or more target functions, and each target function corresponds to at least one test instruction, during testing, the processing functions of multiple test instructions for the same target function can be executed simultaneously, or the processing functions of multiple test instructions for the same target function can be executed separately. The specific implementation process can determine the execution mode of these multiple processing functions based on the functional logic of the target function and the functional relationship between the multiple processing functions.
[0102] In some embodiments, each test instruction includes one or more test parameters. When executing the processing function of any test instruction, the relevant processing function can be executed based on all the test parameters of the test instruction to obtain the test result.
[0103] Step S104: Return the test results to the game testing website.
[0104] In this embodiment, the test results include a first type of test result indicating successful execution of the processing function and a second type of test result indicating failed execution of the processing function. When the test result is the first type of test result, the successful first type of test result can be encapsulated in the response packet information and returned to the game testing website. When the test result is the second type of test result, the error message identifier corresponding to the execution failure can be encapsulated in the response packet information and returned to the game testing website. The error message identifier is used to identify the reason and type of execution failure.
[0105] In some embodiments, if the test result is a second type of test result, when returning the response information containing the encapsulated error information, the help information in the structure element of the test instruction can also be queried from the game management instruction executor, and the help information and the response information can be sent to the game test website at the same time so that the help information can be displayed on the game test website.
[0106] The game testing method provided in this application involves a game server responding to a game testing operation input through a game testing website, receiving at least one test instruction for a target function in the target game, each test instruction including at least one test parameter; then, querying the processing function for each test instruction from a game management instruction executor; if a processing function for any test instruction is found in the game management instruction executor, executing the processing function based on the test parameters in the test instruction to obtain the test result. Thus, since the game testing operation input through the provided game testing website triggers test instructions for the target function in the target game, without needing to download and install the target game on the terminal before testing, or without requiring the client and game server to negotiate and develop test instructions, the workload of client development is greatly reduced, thereby significantly improving the effectiveness of server-side new function testing. Furthermore, since the processing function for each test instruction is queried from the game management instruction executor during game testing, the processing function corresponding to each target function's test instruction can be pre-written by the target function's developers without needing to negotiate with client developers, further reducing the development workload for testing, lowering the cost of game testing, and improving the efficiency of game testing.
[0107] In some embodiments, the game testing system includes at least a game testing website and a game server. Through information exchange between the game testing website and the game server, testers can be provided with a testing framework that allows normal testing to be triggered based on the game testing website.
[0108] Figure 9 This is another optional flowchart illustrating the game testing method provided in the embodiments of this application, such as... Figure 9 As shown, the method includes the following steps S201 to S216:
[0109] Step S201: Testers perform trusted identity authentication on the game testing website.
[0110] Here, trusted identity authentication refers to an authentication method based on the zero-trust principle, providing secure terminal access and IT office services. It relies on three core capabilities: trusted terminals, trusted identities, and trusted applications, enabling enterprise employees to securely, stably, and efficiently access enterprise resources and data in any network environment. In implementation, when testers perform trusted identity authentication on the game testing website, they can be performing enterprise identity authentication. In other words, the game testing website provides trusted enterprise employee identity authentication; only employees of a specific company can perform trusted identity authentication on the game testing website.
[0111] In this embodiment of the application, since the game testing website can call the function code of different functions in the game server to run, the game testing website cannot be limited to website accounts with pre-authenticated corporate employees who can log in to the game testing website and conduct game testing on the game testing website.
[0112] Step S202: After successful trusted identity authentication, the game testing website receives game testing operations input by the testers. These operations include selecting a game server and inputting information about the test account.
[0113] Here, after the testers complete and pass the trusted identity authentication, the game testing website can receive input from the testers regarding the selection of the game server and the input of the test account.
[0114] The game server selection operation refers to choosing the server to be tested, i.e., selecting the server of the target game. Since different games correspond to different servers, and the same game can also have different servers, the server to be tested can be selected through the selection operation on the game testing website. The test account input operation refers to entering the test account to be tested. This test account refers to a valid account on the game server, such as an account registered and logged into on the game server.
[0115] In step S203, the game server receives an account query request for the test account sent by the game test website.
[0116] In this embodiment, when a player logs into the game server through a third-party login platform, such as an instant messaging application, their game account is not the same as their account on the third-party login platform. If the player's account ID on the third-party login platform is A, the game server will not directly obtain account A upon login. Instead, the third-party login platform will generate an OpenID for the player upon first login, such as OpenID B. This OpenID B is mapped to the player's account A on the third-party login platform. Thus, when the player logs into the game server again through the third-party login platform, the account assigned to the player in the game will still be account B. In other words, OpenID is a unique identifier generated by the third-party login platform for the player. This unique identifier is different from the player's account on the third-party login platform and can be a string. The third-party login platform can determine the player's account on the third-party login platform based on this string.
[0117] In addition, the game server generates a unique identifier (RoleID) for each account B to uniquely identify the player's character. That is, after a player logs into the game server through a third-party login platform, the platform generates an OpenID for the player, and the game server also generates a RoleID for that player. This RoleID maps to the player's OpenID. The RoleID can also be a string of characters. Thus, the player's unique identity on the game server can be determined through this RoleID.
[0118] In this embodiment of the application, the account query request may carry the player's OpenID. When the game server receives the account query request for the test account sent by the game test website, since the test account is logged in through a third-party login platform, the test account has a RoleID and an OpenID. Therefore, the RoleID corresponding to the OpenID in the account query request can be queried.
[0119] In step S204, the game server responds to the account query request by retrieving the unique identifier corresponding to the test account from the character database.
[0120] Here, the character database stores each player's RoleID and the OpenID mapped to that RoleID. When responding to an account query request, the mapping relationship between RoleID and OpenID can be used to query the RoleID corresponding to the OpenID in the account query request, thereby obtaining the unique identifier RoleID corresponding to the test account.
[0121] In some embodiments, the character database may be a RoleKeyDB table, which stores each player's RoleID and the OpenID mapped to that RoleID.
[0122] In step S205, the game server returns a unique identifier to the game testing website.
[0123] In some embodiments, after receiving the unique identifier RoleID, the game testing website can also send a test account nickname query request to the game server. This query request may include the player's RoleID. Upon receiving the query request, the game server responds by querying the character nickname database based on the RoleID. This database can be a RoleInDB table, which stores the mapping relationship between each test account's nickname and the player's RoleID.
[0124] After retrieving the test account's nickname from the RoleInDB table, the nickname can be returned to the game testing website so that testers can use it to assess the accuracy of the website account displayed on the current game testing website.
[0125] In step S206, after obtaining the unique identifier, the game testing website sends a help command to the game server.
[0126] Here, the help command can be a type of game management command (GM command). The help command is used to request all GM commands supported by the game server. Among all the GM commands supported by the game server, each GM command can be a modification command such as adding, deleting, modifying, or querying, or it can be any type of game management command related to game operation or game logic, such as test command, query command, operation command, or control command.
[0127] In step S207, the game server responds to the help command by obtaining instruction information for each game management command that the game server can support.
[0128] In some embodiments, see Figure 10 , Figure 10 The instruction information for obtaining each game management instruction in step S207 is shown, which can be achieved through the following steps S2071 to S2073:
[0129] Step S2071: In response to the help instruction, determine whether the test account corresponding to the unique identifier is online.
[0130] In some embodiments, after a test account successfully logs into the game server, its online status can be recorded in an online registration server, which can be one type of game server. This way, when determining whether a test account corresponding to a unique identifier is online, the system can directly query the online registration server to check if the test account is online, thereby improving the efficiency of the analysis.
[0131] Step S2072: If the test account corresponding to the unique identifier is currently online, query the game management command executor for multiple game management commands that the game server can support.
[0132] Here, when querying the multiple game management commands that a game server can support, you can query all the game management commands corresponding to that game server to obtain the multiple game management commands that the game server can support.
[0133] Step S2073: Obtain the command string and command description information of each game management command from the game management commands; the command string and command description information constitute the command information of the game management command.
[0134] In this embodiment, the game management instruction executor can essentially be a structure array, which includes multiple structure elements, each corresponding to a game management instruction. Each structure element includes the command string, execution function, permission information, and instruction description information of the corresponding game management instruction. The instruction description information can be the help information of the corresponding game management instruction. That is, in the structure element corresponding to each game management instruction, the help information records the instruction description information of the game management instruction (i.e., the overview information of the game management instruction) and also records the functional module corresponding to the game management instruction.
[0135] In this way, when querying the game management command executor for multiple game management commands that the game server can support, the structure array of the game management command executor can also be used to query the structure element corresponding to each game management command that the game server can support, thereby obtaining the command string and command description information of the game management command from the queried structure element.
[0136] In step S208, the game server returns the instruction information for each game management command to the game testing website.
[0137] Step S209: Display the instruction information corresponding to each game management instruction on the current page of the game testing website.
[0138] In this embodiment, the instruction information corresponding to each game management instruction can be displayed in tabular form on the current page of the game testing website. For example, the table can display the command string and instruction description information for each game management instruction. In this way, testers can learn about the functional module corresponding to each game management instruction by reading the table displayed on the current page of the game testing website, and thus accurately select the game management instruction with the target function from the table.
[0139] Step S210: The game testing website receives test parameters for the target function in the target game, input by the testers.
[0140] In this embodiment of the application, after the tester determines at least one game management instruction corresponding to the target function in the target game based on the table displayed on the current page of the game testing website, the tester can select the target game management instruction from these at least one game management instructions, and determine the test parameters for testing the target function by reading the information in the table displayed on the current page of the game testing website, and then input at least one test parameter for the target function in the target game on the game testing website.
[0141] In step S211, the game testing website generates at least one test instruction for a target function in the target game based on the test parameters. Each test instruction includes at least one test parameter.
[0142] In this embodiment of the application, after obtaining the test parameters input by the testers, the game testing website encapsulates the test parameters and the corresponding target game management instruction functions into a test instruction. This test instruction is used to request game testing of the target function in the target game.
[0143] In step S212, the game testing website sends at least one test instruction for the target function in the target game to the game server.
[0144] In some embodiments, at least one test instruction sent by the game testing website is request data in a first format.
[0145] In step S213, the game server calls the data representation interface to convert the request data in the first format to obtain the request data in the second format.
[0146] Here, the data representation interface refers to the semantically corresponding interface used to implement operations such as data presentation, description, and automation. In this embodiment, the data representation interface can be called to convert request data of different formats. The first format of request data is readable and writable request data; the second format of request data is memory structure data.
[0147] In step S214, the game server queries the processing function of each test instruction from the game management instruction executor.
[0148] In this embodiment of the application, after receiving a test instruction, the game server needs to query the processing function corresponding to each test instruction. Here, the processing function refers to the execution function of the functional logic that completes the target function.
[0149] When querying the processing function for each test instruction, the test instruction can be parsed first to obtain the command string. Then, the corresponding structure element can be found through the command string, and the execution function within that structure element can be identified as the processing function for the test instruction. Alternatively, each structure element can also include help information for the corresponding game management instruction. This help information describes the functional module corresponding to the game management instruction. In this way, when querying the processing function for each test instruction, the function identifier of the target function corresponding to the test instruction can be obtained first. Simultaneously, based on the help information in each structure element in the structure array, the functional module corresponding to each game management instruction in the structure array can be determined. Then, the functional module with the same target function as the function identifier, along with the structure element of that functional module, can be identified, and the execution function within that structure element can be identified as the processing function for the test instruction.
[0150] Step S215: If the processing function of any test instruction is found in the game management instruction executor, the game server executes the processing function based on the test parameters in the test instruction to obtain the test result.
[0151] In this embodiment of the application, if the processing function of any test instruction can be found in the game management instruction executor, it indicates that the test instruction is a normal instruction that can be tested. Therefore, the queried test function is executed based on the test parameters in the test instruction to realize the response to the corresponding test instruction and obtain the test result.
[0152] Step S216: The game server returns the test results to the game testing website.
[0153] The game testing method provided in this application, after completing trusted identity authentication and account query, obtains a unique identifier corresponding to the test account. At this point, a help command is sent to the game server. This help command requests all GM commands supported by the game server. The game server responds to the help command, queries all GM commands supported by the game server, and returns them to the game testing website, thereby displaying these game management commands supported by the game server on the game testing website. In this way, by displaying the command information of these game management commands, testers can quickly select the game management command corresponding to the target function and accurately input test parameters based on the displayed information. This ensures accurate testing of the target function of the target game without requiring testers to consult the source code of the target function, thus further improving testing efficiency and operability and reducing testing difficulty.
[0154] In some embodiments, the game testing system includes at least a game testing website and a game server. The game server includes at least a message forwarding server, an online registration server, and a game lobby server. The online registration server records the online status of test accounts and the address of the game lobby server where the test accounts are logged in. Through information exchange between the game testing website and the message forwarding server, online registration server, and game lobby server, testers can be provided with a testing framework that allows normal testing to be triggered based on the game testing website.
[0155] Figure 11 This is another optional flowchart illustrating the game testing method provided in the embodiments of this application, such as... Figure 11 As shown, the method includes the following steps S301 to S328:
[0156] Step S301: Testers perform trusted identity authentication on the game testing website.
[0157] Step S302: After successful trusted identity authentication, the game testing website receives game testing operations input by the testers. These operations include selecting a game server and inputting information about the test account.
[0158] Step S303: The message forwarding server receives an account query request for the test account sent by the game test website.
[0159] Here, the game forwarding server is a server used for interconnecting information with the game testing website. Since the instructions sent by the game testing website are third-party requests, the game forwarding server is used to receive third-party requests and send response messages to the third-party website (i.e., the game testing website).
[0160] Account query requests can include a player's OpenID. When the game server receives an account query request for a test account from the game testing website, since the test account is logged in through a third-party login platform, it has a RoleID and an OpenID. Therefore, it can query the RoleID corresponding to the OpenID in the account query request. The concepts of RoleID and OpenID have already been explained above and will not be repeated here.
[0161] In step S304, the message forwarding server responds to the account query request by retrieving the unique identifier corresponding to the test account from the role database.
[0162] Here, the character database stores each player's RoleID and the OpenID mapped to that RoleID. When responding to an account query request, the mapping relationship between RoleID and OpenID can be used to query the RoleID corresponding to the OpenID in the account query request, thereby obtaining the unique identifier RoleID corresponding to the test account.
[0163] In step S305, the message forwarding server returns a unique identifier to the game testing website.
[0164] In step S306, after obtaining the unique identifier, the game testing website sends a help command to the message forwarding server.
[0165] Here, help commands can be a type of game management command, used to request all GM commands supported by the game server.
[0166] In step S307, the message forwarding server sends the help instruction to the online registration server.
[0167] In some embodiments, after a test account successfully logs into the game server, its online status can be recorded in the online registration server. This way, upon receiving help instructions (also a type of GM instruction) from the game testing website, the online registration server can be used to check if the test account is online. Only if the test account is online can subsequent steps be executed and the help instructions from the game testing website be responded to.
[0168] Step S308: The online registration server queries whether the test account corresponding to the unique identifier is online.
[0169] In this embodiment of the application, when determining whether the test account corresponding to the unique identifier is online, the online registration server can be used to directly query whether the test account corresponding to the unique identifier is online, thereby improving the analysis efficiency when analyzing whether the test account corresponding to the unique identifier is online.
[0170] If the test account corresponding to the unique identifier cannot be found, it indicates that the test account is not online. Therefore, a description message is sent to the message forwarding server to explain that the test account is not online. If the test account corresponding to the unique identifier can be found, it indicates that the test account is online. Therefore, step S309 is executed.
[0171] Step S309: The online registration server obtains the address of the game lobby server registered by the online registration server when the test account logs in.
[0172] In some embodiments, after a test account successfully logs into the game lobby server within the game server, the online status of the test account can be recorded in the online registration server, and the address of the game lobby server can also be recorded in the online registration server. Thus, if the online registration server determines that the test account is online, it can also obtain the address of the game lobby server recorded by the online registration server.
[0173] In step S310, the online registration server sends a help instruction to the game lobby server corresponding to the address of the game lobby server.
[0174] After determining the address of the game lobby server, the online registration server will send a help instruction to the game lobby server corresponding to that address.
[0175] In step S311, the game lobby server responds to the help command and obtains the command information for each game management command that the game lobby server can support.
[0176] Here, the game lobby server actually responds to the help commands. First, it queries the game management command executor to find the multiple game management commands that the game lobby server can support. Then, it retrieves the command string and command description information for each game management command from the game management commands. The command string and command description information constitute the command information of the game management command.
[0177] In step S312, the game lobby server sends the instruction information of each game management command to the message forwarding server.
[0178] In step S313, the message forwarding server returns the instruction information of each game management command to the game testing website.
[0179] Step S314: Display the instruction information corresponding to each game management instruction in a table format on the current page of the game testing website.
[0180] Step S315: The game testing website receives test parameters for the target function in the target game, input by the testers.
[0181] In this embodiment of the application, after the tester determines at least one game management instruction corresponding to the target function in the target game based on the table displayed on the current page of the game testing website, the tester can select the target game management instruction from these at least one game management instructions, and determine the test parameters for testing the target function by reading the information in the table displayed on the current page of the game testing website, and then input at least one test parameter for the target function in the target game on the game testing website.
[0182] Step S316: The game testing website generates at least one test instruction for a target function in the target game based on the test parameters. Each test instruction includes at least one test parameter.
[0183] In this embodiment of the application, after obtaining the test parameters input by the testers, the game testing website encapsulates the test parameters and the corresponding target game management instruction functions into a test instruction. This test instruction is used to request game testing of the target function in the target game.
[0184] In step S317, the game testing website sends at least one test instruction for the target function in the target game to the message forwarding server.
[0185] In step S318, the message forwarding server sends at least one test instruction for the target function in the target game to the online registration server.
[0186] Step S319: The online registration server checks whether the current test account is online and queries the address of the game lobby server corresponding to the test account.
[0187] In this embodiment, after the test account successfully logs into the game server, its online status can be recorded in the online registration server. Each time a GM command is received, it is necessary to determine whether the test account is currently online. Since the help command sent by the aforementioned game testing website is a GM command, the test command sent by the game testing website is also a GM command. Therefore, it is necessary to determine whether the test account is currently online upon receiving both help and test commands.
[0188] Here, when determining whether the current test account is online, it can be directly queried from the online registration server, thereby improving the efficiency of the analysis when determining whether the current test account is online.
[0189] In this embodiment, if the test account cannot be found, it indicates that the test account is not online. Therefore, a description message is sent to the message forwarding server to explain that the test account is not online. If the test account can be found, it indicates that the test account is online. Therefore, the address of the game lobby server corresponding to the test account can be queried, and step S320 can continue to be executed.
[0190] In step S320, the online registration server forwards each test instruction to the game lobby server based on the address of the game lobby server.
[0191] Step S321: The game lobby server queries the processing function of each test instruction from the game management instruction executor.
[0192] In this embodiment, the game management instruction executor includes a structure array, which contains multiple structure elements, each corresponding to a game management instruction. Each structure element includes the command string, execution function, permission information, and instruction description information of the corresponding game management instruction. The instruction description information may be help information for the corresponding game management instruction. That is, in the structure element corresponding to each game management instruction, the help information records the instruction description information of the game management instruction (i.e., the overview information of the game management instruction), and may also record the functional module corresponding to the game management instruction.
[0193] In some embodiments, see Figure 12 , Figure 12 This illustrates one implementation of the processing function for querying each test instruction in step S321, including the following steps S3211 to S3214:
[0194] Step S3211: Obtain the function identifier of the target function corresponding to each test instruction through the game lobby server; at least one test instruction corresponds to one or more target functions.
[0195] Here, one test command can correspond to one target function, and the same target function can have multiple test commands. Each target function has a function identifier. When generating a test command, the function identifier of the target function corresponding to that test command can be added to the command content of that test command. The command content can be a string corresponding to that test command. In this way, the game lobby server can parse the test command to obtain the function identifier of the target function corresponding to that test command.
[0196] Step S3212: From multiple structure elements, query the first target structure element corresponding to the function identifier.
[0197] Here, since each structure element in the structure array includes the command string, execution function, permission information, and instruction description information of the game management instruction, the functional module corresponding to each game management instruction is determined by analyzing the instruction description information of each game management instruction in the structure array. Then, the functional module corresponding to the function identifier is queried, and the structure element corresponding to the functional module is determined as the first target structure element corresponding to the function identifier.
[0198] Step S3213: Obtain the execution function of the target function from the first target structure element.
[0199] After identifying the first target structure element, the execution function within the first target structure element is extracted and used as the execution function for the target function.
[0200] Step S3214: Determine the execution function of the target function as the processing function of the test instruction corresponding to the target function.
[0201] Please continue reading Figure 12 , Figure 12 Another implementation of the processing function for querying each test instruction in step S321 is also shown, including the following steps S3215 to S3219:
[0202] Step S3215: Obtain the instruction content of each test instruction through the game lobby server.
[0203] Here, the instruction content can be a string corresponding to the test instruction.
[0204] Step S3216: If the test instruction conforms to the preset format based on the instruction content, then the test command string in the test instruction is obtained from the instruction content.
[0205] The preset format rules can specify that the string corresponding to the instruction content must begin or end with a specific format. In this embodiment, the test instruction conforming to the preset format rules can be that the string corresponding to the instruction content begins with " / / ". If the test instruction conforms to the preset format, the test command string in the test instruction is obtained from the instruction content.
[0206] In some embodiments, a portion of the string corresponding to the instruction content can be retrieved starting from a preset position, and this portion of the string can be determined as the test command string in the test instruction. For example, the characters after " / / " can be filtered until the first space is encountered; then the portion of the string after " / / " and before the space is the test command string of the test instruction.
[0207] Step S3217: Query the second target structure element corresponding to the test command string from the game management command executor.
[0208] Here, since each structure element in the structure array includes the command string, execution function, permission information, and instruction description information of the game management instructions, by analyzing the command string of each game management instruction in the structure array, the command string that is the same as the test command string is found, and the structure element corresponding to the command string is determined as the second target structure element.
[0209] Step S3218: Obtain the execution function of the target function from the second target structure element.
[0210] After identifying the elements of the second target structure, the execution function within the second target structure element is extracted and used as the execution function of the target function.
[0211] Step S3219: Determine the execution function of the target function as the processing function of the test instruction corresponding to the target function.
[0212] Step S322: If the processing function of any test instruction is found in the game management instruction executor, the game lobby server obtains the test permission information in the test instruction from the instruction content.
[0213] Here, by parsing the string corresponding to the instruction content, the test permission information in the test instruction can be determined, and based on this test permission information, the permissions of the test instruction can be determined. Specifically, the permissions of the test instruction refer to the target account that executes the processing function of the test instruction.
[0214] In step S323, the game lobby server determines the target account with permissions corresponding to the test permission information based on the test permission information in the test instruction.
[0215] In this embodiment of the application, the permissions of the test instruction can be determined based on the test permission information. By determining the permissions of the test instruction, it is possible to determine who will run the processing function of the test instruction, that is, to determine the target account with the permissions corresponding to the test permission information, so as to realize the game test of the target function through the target account.
[0216] For example, we can determine whether the string of the test command contains the permission character "destuin" (case-insensitive). If the permission character is present, it means that the test command was executed by another account. In this case, we can further obtain the string after the permission character, convert this string into a RoleID, and set the converted RoleID as the target account of the test command. If the permission character is not present, it means that the test command was executed for this test account. In this case, we can set the RoleID of this test account as the target account of the test command.
[0217] In step S324, the game lobby server analyzes the target account based on the permission information in the second target structure element to obtain the permission analysis result.
[0218] In this embodiment, after identifying the target account, it can be determined whether the target account has permission to execute the processing function based on the permission information in the second target structure element, thus obtaining the permission analysis result. The permission analysis result includes two possibilities: the target account has permission to execute the function, and the target account does not have permission to execute the function.
[0219] It should be noted that in each structure element of the structure array, the permission information includes two types. The first type is whether the user (i.e., the account that triggered the game management command) is allowed to execute the game management command. The second type is whether other users (i.e., accounts that did not trigger the game management command) are allowed to execute the game management command.
[0220] After obtaining the target account with permissions corresponding to the test permission information, if the target account is the test account, the first type of permission information in the second target structure element can be determined. If the first type of permission information allows the user to execute the game management command, the permission analysis result is that the target account has permission to execute; if the first type of permission information does not allow the user to execute the game management command, the permission analysis result is that the target account does not have permission to execute.
[0221] After obtaining the target account with permissions corresponding to the test permission information, if the target account is another account, the second type of permission information in the second target structure element can be determined. If the second type of permission information allows others to execute the game management command, the permission analysis result is that the target account has permission to execute; if the first type of permission information does not allow others to execute the game management command, the permission analysis result is that the target account does not have permission to execute.
[0222] In step S325, the game lobby server responds to the permission analysis result that the test account corresponding to the target account has test permissions, executes the processing function based on the test parameters in the test instruction, and obtains the test result of the test account.
[0223] Here, if the permission analysis result indicates that the test account corresponding to the target account has test permissions, then the target account executes the processing function based on the test parameters in the test command to obtain the test result of the test account. Specifically, if the target account is the test account, the obtained test result is the test result of the target account; if the target account is another account, the obtained test result is the test result of the test account.
[0224] In some embodiments, the test results are in a second format.
[0225] In step S326, the game lobby server sends the test results to the message forwarding server.
[0226] In step S327, the message forwarding server encapsulates the test result in the second format into the test result in the first format.
[0227] Here, the test results can be formatted. The first format is a readable and writable format, such as XML format; the second format is a memory structure format.
[0228] Test results in memory structure format can be converted into a readable and writable format, ensuring that the game testing website can recognize the test results after they are sent to the game testing website. In other words, data compatibility between the game server and the game testing website can be guaranteed.
[0229] In step S328, the message forwarding server returns the test results in the first format to the game testing website.
[0230] In some embodiments, after the message forwarding server receives at least one test instruction for a target function in the target game, it can further determine the execution environment of each test instruction. If it is determined that the execution environment of any test instruction is a server other than the game lobby server mentioned above, that is, if any test instruction is not executed by the game lobby server, then the game lobby server can call the forwarding interface function to forward the test instruction to the determined other server, so that the other server can execute the processing function based on the test parameters in the test instruction to obtain the test result.
[0231] It should be noted that the process by which other servers respond to and execute test commands is the same as the process by which the game lobby server responds to and executes test commands, and will not be described again in this application embodiment.
[0232] In this embodiment, a forwarding interface function call function can be added to the test instruction processing function. If it is determined that the execution environment of the test instruction is a server other than the game lobby server, the game lobby server can call the forwarding interface function based on the forwarding interface function call function to forward the test instruction to the determined other server. In other words, when the game lobby server receives the test instruction and determines that the execution environment of the test instruction is a server other than itself, it can forward the test instruction to the other server in the queried test instruction processing function.
[0233] In this way, effective execution of different types of test commands is achieved, and different test commands can be executed in parallel on the game lobby server and other servers. That is, the game lobby server triggers the main process to execute part of the test commands, and the main process is uniformly managed by the game lobby server, which manages all test commands of the entire game server. Other servers trigger the remote distribution process to execute other test commands. That is, when any test command needs to be executed on other servers, the game lobby server can accurately forward the test command, thereby ensuring the true functional logic of the entire game testing process and the smooth and orderly progress of the game testing process.
[0234] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0235] This application provides a game testing method, which is a web-interactive game GM framework that enables special modifications or execution management of game servers and game characters beyond the scope of general game content during the development phase. This facilitates functional testing and code debugging during the development phase without relying on client-side functional development and triggering.
[0236] Figure 13 This is an image of the entry page of the web website (i.e., the game testing website) for the game testing method provided in this application embodiment. When executing game management commands (i.e., GM commands) using the web website, the following three steps are required:
[0237] S1, Select the server to be tested. The server to be tested has the function to be tested (i.e. the target function mentioned above) and the corresponding GM command.
[0238] S2, Enter the test account. This account needs to be logged into the server under test. There are multiple ways to log in. For example, you can log in to the server under test through the game app on the test phone; or you can log in to the server under test using the server's testclient tool. The testclient tool is a test tool that simulates client development on the server. It constructs interaction data between the client and the server and sends it to the server for functional testing.
[0239] S3, click the "Bind Account" button on the web page to start the feature test. After starting the test, the GM's web interface will look like this: Figure 14 As shown, the following are displayed: game nickname 141, tester 142, single GM command 143, combined GM command 144, test function module 145, test time 146, and GM command execution result 147.
[0240] In the upper right corner of the web page, the test account's nickname and the name of the tester who has passed trusted identity verification will be displayed. The web website supports testing individual GM commands as well as testing combined GM commands (i.e., multiple GM commands are combined together and executed sequentially). Figure 15 The image shown is a page diagram of the combined GM commands provided in an embodiment of this application. After the GM commands are executed, the test commands, time, and result data returned by the game server will be displayed.
[0241] In some embodiments, the use of GM commands, taking setting player levels as an example, assuming the current test account is level 16, such as... Figure 16 and Figure 17 As shown, after selecting the corresponding GM command on the website, clicking the ExecGM button will display detailed help information for that command (161). Figure 17 The player's level was displayed as 171 before the level setting was implemented. Then, following the GM command instructions for "Set Player Level and Experience," after filling in the parameters and clicking the "ExecGM" button, the player's level changed to 17. Figure 18 This application provides a web interface diagram for setting player levels and experience using GM commands, as shown in the embodiments of this application. Figure 19 This is a game interface diagram showing the player's level changing to 17, provided in an embodiment of this application. It shows the GM command 181 indicating the player's level has reached 17, and the level display 191 indicating the player's level has reached 17. Please continue to refer to... Figure 18 The GM web page will also display detailed information about the currently executed GM command:
[0242] Command string: setlevelxp;
[0243] Instruction execution time: 2023-03-01 11:14:17;
[0244] The game server returned the following information: set level
[16] ->
[17] ;
[0245] The complete command is: / / setlevelxp 17 1000.
[0246] The following describes the web-based interactive game GM framework provided in the embodiments of this application.
[0247] Figure 20 This is a schematic diagram of the overall structure of the web-based interactive game GM framework provided in this application embodiment, as shown below. Figure 20 As shown (where, Figure 20The step of GameIdipSvr returning a message to the GM's website is omitted, and the following steps S401 to S412 are included:
[0248] Step S401: Server developers use a mobile client or testclient tool to log in to the game lobby server (ZoneSvr) of the game server.
[0249] In step S402, after the test account successfully logs into ZoneSvr, ZoneSvr will report the test account to the online registration server (OnlineSvr) for online registration.
[0250] Here, OnlineSvr records the address of the ZoneSvr where the test account is located, which is convenient for forwarding messages later.
[0251] At this point, server developers can begin using the web-based interactive game GM framework to conduct functional testing.
[0252] Step S403: Use trusted identity authentication to authenticate the enterprise identity, and then access GM's website, such as... Figure 13 As shown.
[0253] Step S404: On the GM website, enter the server to be tested and the OpenID of the test account logged in above to enter the official GM test interface, as shown below. Figure 14 As shown.
[0254] Step S405: From the GM test interface, select the target function to be tested, fill in the GM command parameters (i.e. test parameters), and then execute the GM command.
[0255] In step S406, the GM command sent from the GM's website will be received by the message forwarding server (GameIdipSvr). GameIdipSvr will call the data representation interface to convert the received request data in Extensible Markup Language (XML) format into memory structure data.
[0256] like Figure 21 The diagram shown is a schematic of the XML-formatted request data (i.e., server logs) received by GameIdipSvr according to an embodiment of this application.
[0257] In step S407, GameIdipSvr encapsulates the data of the GM command and sends the GM command to OnlineSvr.
[0258] Step S408: OnlineSvr determines whether the test account that triggered the GM command is online. If the test account is offline, it informs GameIdipSvr that the test account is offline. Figure 22 As shown, it can return a 221 message if the test account is offline, indicating that the GM command cannot be executed; if the test account is online, it will continue to execute.
[0259] In step S409, OnlineSvr queries the address of the ZoneSvr where the test account is located and forwards the GM command received from GameIdipSvr to that ZoneSvr.
[0260] In step S410, after receiving the GM command, ZoneSvr queries the GM command executor (i.e., the game management command executor) for the GM command. If it is not found, it directly informs GameIdipSvr. GameIdipSvr encapsulates the execution result into XML format and returns it to the web website, indicating that the GM command has not yet been defined. If it is found, execution continues.
[0261] Step S411: ZoneSvr executes the functional logic of GM commands to add, delete, modify, and query data for the test account.
[0262] In step S412, ZoneSvr informs GameIdipSvr of the execution result of the GM command. GameIdipSvr then encapsulates the execution result into XML format and returns the XML execution result to the web website for display.
[0263] In some embodiments, the functional logic of certain GM instructions will notify the client of the execution result obtained after processing, such as... Figure 19 The change in the account level shown can be notified to the client for display.
[0264] In some embodiments, when GameIdipSvr starts, it creates an epoll instance to monitor and process messages from the GM's website. When a test message is received from the GM's website, the specific processing flow is as follows: Figure 23 As shown, the process includes the following steps S501 to S510:
[0265] Step S501: After the server developer completes enterprise identity authentication using trusted identity authentication, they access GM's website, such as... Figure 13 As shown.
[0266] Step S502: On the website, the server developer selects the server to be tested, enters the test account, and clicks "Bind Account," as shown below. Figure 14 As shown.
[0267] In step S503, the web website sends a query request (i.e., an account query request) to GameIdipSvr to query the RoleID of the test account. After receiving the query request, GameIdipSvr queries the RoleKeyDB data table based on the OpenID in the query request, obtains the query result, and returns the query result to the web website.
[0268] Here, the website uses XML format to assemble the query request packet, such as... Figure 21 As shown, after receiving a request packet from the web application, GameIdipSvr calls the data representation interface to convert the XML-formatted request data into an in-memory structure. When GameIdipSvr sends a message to the web application, it reassembles the response packet into XML format.
[0269] In step S504, after obtaining the RoleID, the web website sends a request to GameIdipSvr to query the test account nickname. After receiving the request, GameIdipSvr queries the RoleInDB data table based on the RoleID in the request, obtains the query result, and returns the result to the web website.
[0270] In step S505, the web site automatically sends the GM command " / / help" (i.e., help command) to GameIdipSvr. This help command is used to request all GM commands supported by the game lobby server.
[0271] In step S506, after receiving the GM instruction " / / help" request, GameIdipSvr reassembles the GM instruction based on the " / / help" instruction, initiates an asynchronous transaction, and sends the GM instruction to OnlineSvr.
[0272] In step S507, after receiving the GM command for the " / / help" request, OnlineSvr checks if the RoleID in the request exists in its own memory. If it does not exist, it means that the test account is not online, so it notifies GameIdipSvr, which then sends a response to the web website. If it exists, the following steps continue.
[0273] Here, once a test account successfully logs into ZoneSvr, it will automatically report to OnlineSvr for online registration. Therefore, you can check whether the test account is online and the specific ZoneSvr it is in from OnlineSvr.
[0274] In step S508, OnlineSvr forwards the GM command for the " / / help" request to ZoneSvr based on the address of ZoneSvr registered after the test account logs in.
[0275] In step S509, after ZoneSvr receives the GM instruction for the " / / help" request, it queries the GM instruction executor, obtains the corresponding processing function, executes it, and returns the result to GameIdipSvr, which then sends a response packet to the web website.
[0276] Here, the processing function obtained refers to the test logic of the function to be tested corresponding to all GM commands supported by ZoneSvr.
[0277] After receiving the response packet from GameIdipSvr, the website displays the command string and description of each GM instruction in a table (usually the name of the functional module of ZoneSvr).
[0278] In step S510, the tester can select the target function to be tested, fill in the GM command parameters, and then execute the GM command.
[0279] The GM instruction executor provided in the embodiments of this application will be described below.
[0280] The GM instruction executor is essentially an array of structures, such as Figure 24 The diagram shown is an information diagram of each element in the structure array provided in the embodiment of this application. Each element in the structure array is used to define the command string 241, execution logic (i.e., execution function 242), and required permissions 243 (i.e. permission information) for each GM instruction. As shown in Table 1, it is the structure definition of the GM instruction executor provided in the embodiment of this application.
[0281] Table 1
[0282]
[0283] It should be noted that the HelpInfo information for GM commands uses "\n" as a separator. The first part of the help information 244 is an overview of the GM command or its corresponding functional module 245, and the second part is the detailed usage of the GM command 246.
[0284] The following describes the process of ZoneSvr processing GM instructions in the embodiments of this application.
[0285] Figure 25 This is a flowchart illustrating the processing of GM instructions by ZoneSvr according to an embodiment of this application, as shown below. Figure 25As shown, the processing flow includes the following steps S601 to S608:
[0286] Step S601: When ZoneSvr receives the GM command, it obtains the content of the GM command.
[0287] Step S602: Determine if the GM command starts with " / / ". If not, return with an error message; otherwise, continue execution.
[0288] In this embodiment of the application, the GM command may be specified to begin with " / / ".
[0289] Step S603: Obtain the command string, that is, filter the characters after " / / " until the first space is encountered, and the string in between is the command string of the GM instruction.
[0290] Step S604: Determine if there is a target account.
[0291] Here, we can determine whether the string following the command string contains the character "destuin" (case-insensitive). If it does, it means that the GM command is executed for another account. In this case, we obtain the string following the command string, convert the obtained string into a RoleID, and set the RoleID as the target account of the GM command. If it does not exist, it means that the GM command is executed for this account. In this case, we set the RoleID of this account as the target account of the GM command.
[0292] Step S605: Based on the command string, query the GM command executor. If not found, return with an error message; otherwise, continue execution.
[0293] Step S606: Check if the target account of the GM command has execution permission. If not, report an error and end the process.
[0294] Here, it can be determined whether ZoneSvr has the GM system enabled. If not, an error will be reported and the process will end. If the target account of the GM command is this account, the PowerSelf field corresponding to the GM command will be checked in the structure array of the GM command executor shown in Table 1. If the target role is another account, the PowerOther field corresponding to the GM command will be checked in the structure array of the GM command executor shown in Table 1.
[0295] Step S607: Parse the content of the GM instruction and obtain the parameters of the GM instruction.
[0296] Step S608: Execute the processing function of the GM instruction to complete the corresponding functional logic.
[0297] If the execution is successful, a success response is returned; if the execution fails, an error message is returned, and the help information for the GM command (i.e., the HelpInfo field in Table 1) is printed.
[0298] In some embodiments, when a GM command needs to be executed on a server other than ZoneSvr (i.e., other servers, such as the battleground server RoomSvr), the GM command needs to be forwarded to the target server in the GM command processing function (the present application embodiment also provides a forwarding interface function gm_route_to). When the target server receives the GM command, the processing flow is similar to that of ZoneSvr, and will not be described in detail here.
[0299] Therefore, the web-interactive game GM architecture design proposed in this application consists of a main GM process and a remote GM distribution process. The main GM process is dedicated to ZoneSvr and manages all GM commands across the entire game server. When a GM command needs to be executed on another server, it can be forwarded and the remote GM distribution process can be executed on the target server to complete the actual functional logic of the GM command.
[0300] The web-interactive game GM framework design proposed in this application allows for easy development of new features. Simply add a structure element to the GM command executor according to Table 1 to trigger GM execution from the website, reducing the workload of server-side GM command development and improving testing efficiency. Furthermore, this web-interactive game GM framework design eliminates client-side dependency for GM command development and execution, reducing communication costs and workload during development. It also eliminates the need to recompile the client pipeline to generate new installation packages, significantly reducing testing time.
[0301] It is understood that in the embodiments of this application, if the content involves user information, such as GM instructions, test parameters and web-based interactive game GM framework information during game testing, and if it involves data related to user information or enterprise information, when the embodiments of this application are applied to specific products or technologies, user permission or consent is required. Furthermore, the collection and processing of related data should strictly comply with the requirements of relevant national laws and regulations when applied in the instance, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0302] The following continues to describe the exemplary structure of the game testing device 354 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 7As shown, the game testing device 354 includes: a test instruction generation module 3541, used to receive at least one test instruction for a target function in a target game in response to a game testing operation input through a game testing website, each test instruction including at least one test parameter; a function query module 3542, used to query the processing function of each test instruction from a game management instruction executor; a function execution module 3543, used to execute the processing function based on the test parameters in the test instruction if the processing function of any test instruction is found in the game management instruction executor, to obtain a test result; and a sending module 3544, used to return the test result to the game testing website.
[0303] In some embodiments, the test instruction generation module is further configured to: after completing trusted identity authentication on the game testing website, input game testing operations through the game testing website, the game testing operations including a selection operation for the game server and an input operation for the test account; the game server receives an account query request for the test account sent by the game testing website; in response to the account query request, queries a unique identifier corresponding to the test account from the character database; and returns the unique identifier to the game testing website; wherein, after obtaining the unique identifier, the game testing website receives input test parameters for a target function in the target game, and generates at least one test instruction for the target function in the target game based on the test parameters; and receives the at least one test instruction.
[0304] In some embodiments, the apparatus further includes: a help instruction receiving module, configured to receive a help instruction sent by the game testing website; an instruction information acquisition module, configured to acquire instruction information of each game management instruction that the game server can support in response to the help instruction; and an instruction information sending module, configured to return the instruction information of each game management instruction to the game testing website, and display the instruction information corresponding to each game management instruction on the current page of the game testing website.
[0305] In some embodiments, the instruction information acquisition module is further configured to: in response to the help instruction, determine whether the test account corresponding to the unique identifier is online; if the test account corresponding to the unique identifier is currently online, query the game management instruction executor for multiple game management instructions that the game server can support; and obtain the command string and instruction description information of each game management instruction from the game management instructions; the command string and instruction description information constitute the instruction information of the game management instruction.
[0306] In some embodiments, the apparatus further includes: a status recording module, configured to record the online status of the test account in an online registration server after the test account successfully logs into the game server; the instruction information acquisition module is further configured to: query the online registration server to see if the test account corresponding to the unique identifier is online.
[0307] In some embodiments, the at least one test instruction is request data in a first format; the apparatus further includes: an interface calling module, configured to call a data representation interface to convert the request data in the first format into a second format request data; wherein the request data in the first format is request data in a read-write format; and the request data in the second format is memory structure data.
[0308] In some embodiments, the game server includes at least a message forwarding server, an online registration server, and a game lobby server; the online registration server is used to record the online status of test accounts and the address of the game lobby server where the test account is logged in; the function query module is further used for: the message forwarding server querying the online registration server to see if the current test account is online, and querying the address of the game lobby server corresponding to the test account; the message forwarding server, in response to the test account being online, forwarding each test instruction to the game lobby server based on the address of the game lobby server; and querying the processing function of each test instruction from the game management instruction executor through the game lobby server.
[0309] In some embodiments, the game management instruction executor includes a structure array, which includes multiple structure elements, each of which corresponds to a game management instruction; each structure element includes a command string, an execution function, and permission information for the corresponding game management instruction; the function query module is further configured to: obtain a function identifier of a target function corresponding to each test instruction through the game lobby server; the at least one test instruction corresponds to one or more target functions; query a first target structure element corresponding to the function identifier from the multiple structure elements; obtain the execution function of the target function from the first target structure element; and determine the execution function of the target function as the processing function of the test instruction corresponding to the target function.
[0310] In some embodiments, the game management instruction executor includes a structure array, which includes multiple structure elements, each structure element corresponding to a game management instruction; each structure element includes a command string, an execution function, and permission information for the corresponding game management instruction; the function query module is further configured to: obtain the instruction content of each test instruction through the game lobby server; if the test instruction is determined to conform to a preset format based on the instruction content, then obtain the test command string from the test instruction; query the game management instruction executor for a second target structure element corresponding to the test command string; obtain the execution function of the target function from the second target structure element; and determine the execution function of the target function as the processing function of the test instruction corresponding to the target function.
[0311] In some embodiments, the function execution module is further configured to: obtain test permission information from the instruction content; determine a target account with permissions corresponding to the test permission information based on the test permission information in the test instruction; perform permission analysis on the target account based on the permission information in the second target structure element to obtain permission analysis results; and, in response to the permission analysis result indicating that the test account corresponding to the target account has test permissions, execute the processing function based on the test parameters in the test instruction to obtain the test results of the test account.
[0312] In some embodiments, the data format of the test result is a second format; the sending module is further configured to: send the test result to the message forwarding server through the game lobby server; encapsulate the test result in the second format into a test result in the first format through the message forwarding server; and return the test result in the first format to the game testing website; wherein, the first format is a read-write format; and the second format is a memory structure format.
[0313] In some embodiments, the apparatus further includes: an environment determination module, configured to determine the execution environment of each test instruction; and a function call module, configured to, if the execution environment is a server other than the game lobby server, call a forwarding interface function to forward the test instruction to the other server, so that the other server can execute the processing function based on the test parameters in the test instruction to obtain the test result.
[0314] It should be noted that the description of the apparatus in this application embodiment is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment; therefore, it will not be repeated. For technical details not disclosed in this apparatus embodiment, please refer to the description of the method embodiment of this application for understanding.
[0315] This application provides a computer program product including executable instructions, which are computer instructions stored in a computer-readable storage medium. When the processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the electronic device performs the method described in this application.
[0316] This application provides a storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to perform the method provided in this application, for example... Figure 8 The method shown.
[0317] In some embodiments, the storage medium may be a computer-readable storage medium, such as a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface memory, optical disc, or a compact disk-read-only memory (CD-ROM); or it may be a device that includes one or any combination of the above-mentioned memories.
[0318] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0319] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file containing other programs or data, for example, in one or more scripts within a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., files storing one or more modules, subroutines, or code sections). As an example, executable instructions may be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0320] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A game testing method characterized by comprising: Applied to a game server, the method includes: After completing trusted identity authentication on the game testing website, the user enters game testing operations through the game testing website. These operations include selecting the game server and entering the test account. The user also receives an account query request for the test account from the game testing website. In response to the account query request, the unique identifier corresponding to the test account is queried from the character database; the unique identifier is returned to the game testing website; wherein, after obtaining the unique identifier, the game testing website receives the input test parameters for the target function in the target game, and generates at least one test instruction for the target function in the target game based on the test parameters; Receive the at least one test instruction, each test instruction including at least one test parameter; Queries the processing function for each test instruction from the game management instruction executor; If a processing function for any of the test instructions is found in the game management instruction executor, the processing function is executed based on the test parameters in the test instruction to obtain the test result; Return the test results to the game testing website.
2. The method according to claim 1, characterized in that, After returning the unique identifier to the game testing website, and before the game testing website generates the at least one test instruction, the method further includes: Receive help instructions sent by the game testing website; In response to the help instruction, obtain instruction information for each game management instruction that the game server can support; The instruction information for each game management instruction is returned to the game testing website, and the instruction information corresponding to each game management instruction is displayed on the current page of the game testing website.
3. The method according to claim 2, characterized in that, The step of responding to the help instruction by obtaining instruction information for each game management instruction that the game server can support includes: In response to the help instruction, determine whether the test account corresponding to the unique identifier is online; If the test account corresponding to the unique identifier is currently online, query the game management command executor for multiple game management commands that the game server can support; and The command string and instruction description information of each game management instruction are obtained from the game management instructions; the command string and instruction description information constitute the instruction information of the game management instruction.
4. The method of claim 3, wherein, The method further includes: Once the test account successfully logs into the game server, the online status of the test account is recorded in the online registration server; Determining whether the test account corresponding to the unique identifier is online includes: The system queries the online registration server to determine whether the test account corresponding to the unique identifier is online.
5. The method according to claim 1, characterized in that, The at least one test instruction is request data in a first format; the method further includes: The data representation interface is invoked to convert the request data in the first format to obtain the request data in the second format; wherein, the request data in the first format is a readable and writable format request data; and the request data in the second format is memory structure data.
6. The method according to any one of claims 1 to 5, characterized in that, The game server includes at least a message forwarding server, an online registration server, and a game lobby server; the online registration server is used to record the online status of the test account and the address of the game lobby server where the test account logs in; The processing function for querying each test instruction from the game management instruction executor includes: The message forwarding server queries the online registration server to see if the current test account is online, and queries the address of the game lobby server corresponding to the test account; In response to the test account being online, the message forwarding server forwards each test instruction to the game lobby server based on the address of the game lobby server. The game lobby server queries the processing function of each test instruction from the game management instruction executor.
7. The method of claim 6, wherein, The game management instruction executor includes a structure array, which contains multiple structure elements, each of which corresponds to a game management instruction; each structure element includes the command string, execution function, and permission information of the corresponding game management instruction. The step of querying the processing function of each test instruction from the game management instruction executor through the game lobby server includes: The function identifier of the target function corresponding to each test instruction is obtained through the game lobby server; the at least one test instruction corresponds to one or more target functions. From the plurality of structure elements, query the first target structure element corresponding to the function identifier; Obtain the execution function of the target function from the first target structure element; The execution function of the target function is determined as the processing function of the test instruction corresponding to the target function.
8. The method of claim 6, wherein, The game management instruction executor includes a structure array, which contains multiple structure elements, each of which corresponds to a game management instruction; each structure element includes the command string, execution function, and permission information of the corresponding game management instruction. The step of querying the processing function of each test instruction from the game management instruction executor through the game lobby server includes: The instruction content of each test instruction is obtained through the game lobby server; If it is determined from the instruction content that the test instruction conforms to the preset format specification, then the test command string in the test instruction is obtained from the instruction content; From the game management instruction executor, query the second target structure element corresponding to the test command string; Obtain the execution function of the target function from the second target structure element; The execution function of the target function is determined as the processing function of the test instruction corresponding to the target function.
9. The method of claim 8, wherein, The process of executing the processing function based on the test parameters in the test instruction to obtain the test result includes: Obtain the test permission information from the test instruction from the instruction content; Based on the test permission information in the test instruction, determine the target account that has the permissions corresponding to the test permission information; Based on the permission information in the second target structure element, permission analysis is performed on the target account to obtain permission analysis results; In response to the permission analysis result indicating that the test account corresponding to the target account has test permissions, the processing function is executed based on the test parameters in the test instruction to obtain the test result of the test account.
10. The method according to claim 6, characterized in that, The data format of the test results is the second format; returning the test results to the game testing website includes: The test results are sent to the message forwarding server via the game lobby server; The message forwarding server encapsulates the test results in the second format into test results in the first format; and returns the test results in the first format to the game testing website; wherein, the first format is a read-write format; and the second format is a memory structure format.
11. The method of claim 6, wherein, The method further includes: Determine the execution environment for each of the test instructions; If the execution environment is a server other than the game lobby server, the forwarding interface function is called to forward the test instruction to the other server, so that the other server can execute the processing function based on the test parameters in the test instruction to obtain the test result.
12. A game testing apparatus, characterized by comprising: The device includes: A test instruction generation module is used to input game test operations through a game test website after trusted identity authentication is completed. These game test operations include selecting a game server and inputting a test account. The game server receives an account query request for the test account from the game test website. In response to the account query request, it queries a unique identifier corresponding to the test account from a character database and returns the unique identifier to the game test website. Upon obtaining the unique identifier, the game test website receives input test parameters for a target function in the target game and generates at least one test instruction for that target function based on the test parameters. It then receives the at least one test instruction, each of which includes at least one test parameter. The function query module is used to query the processing function of each test instruction from the game management instruction executor; The function execution module is used to execute the processing function based on the test parameters in the test instruction if a processing function for any of the test instructions is found in the game management instruction executor, and to obtain the test result. The sending module is used to return the test results to the game testing website.
13. The apparatus of claim 12, wherein, The device further includes: The system includes a help instruction receiving module for receiving help instructions sent by the game testing website; an instruction information acquisition module for acquiring instruction information for each game management instruction supported by the game server in response to the help instructions; and an instruction information sending module for returning the instruction information of each game management instruction to the game testing website and displaying the instruction information corresponding to each game management instruction on the current page of the game testing website.
14. The apparatus of claim 13, wherein, The instruction information acquisition module is further configured to: in response to the help instruction, determine whether the test account corresponding to the unique identifier is online; if the test account corresponding to the unique identifier is currently online, query the game management instruction executor for multiple game management instructions that the game server can support; and obtain the command string and instruction description information of each game management instruction from the game management instructions; the command string and instruction description information constitute the instruction information of the game management instruction.
15. The apparatus of claim 14, wherein, The device further includes: The status recording module is used to record the online status of the test account in the online registration server after the test account successfully logs in to the game server; the instruction information acquisition module is also used to query the online registration server to see if the test account corresponding to the unique identifier is online.
16. The apparatus of claim 12, wherein, The at least one test instruction is request data in a first format; The device further includes: an interface calling module, used to call a data representation interface to convert the request data in the first format into a second format request data; wherein the request data in the first format is a readable and writable format request data; and the request data in the second format is memory structure data.
17. The apparatus of any one of claims 12 to 16, wherein, The game server includes at least a message forwarding server, an online registration server, and a game lobby server; the online registration server is used to record the online status of the test account and the address of the game lobby server where the test account logs in; The function query module is further configured to: query whether the current test account is online from the online registration server, and query the address of the game lobby server corresponding to the test account; in response to the test account being online, the message forwarding server forwards each test instruction to the game lobby server based on the address of the game lobby server; The game lobby server queries the processing function of each test instruction from the game management instruction executor.
18. The apparatus according to claim 17, characterized in that, The game management instruction executor includes a structure array, which contains multiple structure elements, each of which corresponds to a game management instruction; each structure element includes the command string, execution function, and permission information of the corresponding game management instruction. The function query module is further configured to: obtain a function identifier for the target function corresponding to each test instruction through the game lobby server; the at least one test instruction corresponds to one or more target functions; and query the first target structure element corresponding to the function identifier from the multiple structure elements. Obtain the execution function of the target function from the first target structure element; determine the execution function of the target function as the processing function of the test instruction corresponding to the target function.
19. The apparatus according to claim 17, characterized in that, The game management instruction executor includes a structure array, which contains multiple structure elements, each of which corresponds to a game management instruction; each structure element includes the command string, execution function, and permission information of the corresponding game management instruction. The function query module is further configured to: obtain the instruction content of each test instruction through the game lobby server; if it is determined based on the instruction content that the test instruction conforms to a preset format specification, then obtain the test command string in the test instruction from the instruction content; From the game management instruction executor, query the second target structure element corresponding to the test command string; Obtain the execution function of the target function from the second target structure element; determine the execution function of the target function as the processing function of the test instruction corresponding to the target function.
20. The apparatus according to claim 19, characterized in that, The function execution module is further configured to: obtain test permission information from the test instruction from the instruction content; and determine a target account with permissions corresponding to the test permission information based on the test permission information in the test instruction. Based on the permission information in the second target structure element, permission analysis is performed on the target account to obtain permission analysis results; In response to the permission analysis result indicating that the test account corresponding to the target account has test permissions, the processing function is executed based on the test parameters in the test instruction to obtain the test result of the test account.
21. The apparatus according to claim 17, characterized in that, The test results are in a second format; the sending module is further configured to: send the test results to the message forwarding server via the game lobby server; The message forwarding server encapsulates the test results in the second format into test results in the first format; and returns the test results in the first format to the game testing website; wherein, the first format is a read-write format; and the second format is a memory structure format.
22. The apparatus of claim 17, wherein, The device further includes: An environment determination module is used to determine the execution environment of each test instruction; a function call module is used to call a forwarding interface function to forward the test instruction to the other server if the execution environment is a server other than the game lobby server, so that the other server can execute the processing function based on the test parameters in the test instruction to obtain the test result.
23. An electronic device, comprising: include: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the game testing method according to any one of claims 1 to 11.
24. A computer-readable storage medium, characterized in that, The device stores executable instructions for causing a processor to execute the executable instructions to implement the game testing method according to any one of claims 1 to 11.
25. A computer program product, characterized in that, The computer program product includes executable instructions stored in a computer-readable storage medium; wherein, when the processor of the electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, it implements the game testing method according to any one of claims 1 to 11.