CN113535535A - Method, device and system for testing game server and computer storage medium - Google Patents

Method, device and system for testing game server and computer storage medium Download PDF

Info

Publication number
CN113535535A
CN113535535A CN202010305402.8A CN202010305402A CN113535535A CN 113535535 A CN113535535 A CN 113535535A CN 202010305402 A CN202010305402 A CN 202010305402A CN 113535535 A CN113535535 A CN 113535535A
Authority
CN
China
Prior art keywords
game
server
test
client
game server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010305402.8A
Other languages
Chinese (zh)
Inventor
廖宗广
吴冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Chengdu Co Ltd
Original Assignee
Tencent Technology Chengdu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Chengdu Co Ltd filed Critical Tencent Technology Chengdu Co Ltd
Priority to CN202010305402.8A priority Critical patent/CN113535535A/en
Publication of CN113535535A publication Critical patent/CN113535535A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a test method, a device and a system of a game server and a computer storage medium, when a test case to be executed exists, a control server sends a test request to the game server to enable the game server to start a service process, and then login information fed back after the service process is started is distributed to a test server to enable a game client with complete game driving logic of the test server to log in the service process; after logging in, the game client accesses the game server based on the appointed game behavior script; the control server analyzes the performance data of the game server when being accessed to obtain a test result. The game data interaction between the game client and the game server with complete game driving logic is the same as that when the game client is actually operated by the user, and correspondingly, the test result obtained by the scheme can accurately reflect the state of the game server when the real user accesses the game server. Therefore, the scheme can realize automatic test of the game server.

Description

Method, device and system for testing game server and computer storage medium
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a method, an apparatus, a system, and a computer storage medium for testing a game server.
Background
With the development of internet technology, various online games come out endlessly. Depending on the data interaction between the game client and the game server, users at different places can interact in real time in the same online game scene, and good game experience is obtained.
To ensure that the game server can support real-time interaction of multiple users, it is necessary to stress the game server to determine the load-bearing capacity of the game server. The existing pressure test method of the game server is to delete and modify part of game logic to obtain simplified client end scripts, then run a plurality of client end scripts on the test server to simulate a plurality of game client ends to access the game server, and obtain corresponding test results by analyzing performance data of the game server when the client end scripts access the game server.
The visual effect of the current online game is increasingly vivid (for example, the online game with a three-dimensional effect), the supported interactive behavior is increasingly rich, and the data interaction mode between the corresponding game client and the game server is also increasingly complex, so that the simplified client script cannot accurately reflect the access of a user to the game server when the user actually operates the game client, and the corresponding test result obtained based on the client script cannot reflect the state of the game server when the user actually accesses, so that the existing method cannot test the game. Therefore, there is a need for a solution that can automate the testing of the game server for such games.
Disclosure of Invention
Based on the problems in the prior art, the application provides a method, a device, a system and a computer storage medium for testing a game server, so as to perform efficient testing on the game server of the current online game with increasingly rich and vivid visual effects.
The first aspect of the present application provides a testing method for a game server, which is applied to a control server, and the testing method includes:
detecting whether a test case to be executed exists in a database;
if the database has a test case to be executed, sending a test request to at least one game server, and enabling the game server to respond to the test request to start at least one service process for providing game service;
receiving login information fed back after each service process is successfully started, and triggering at least one game client of a test server to perform data interaction with the game server based on a game behavior script by using the login information; wherein each of the game clients has complete game drive logic; the game behavior script is determined based on the test case to be executed;
and analyzing the performance data of the game server and the game client when the game server receives the test request aiming at each game server which receives the test request, and obtaining the test result of the game server.
Optionally, after analyzing, by each game server that receives the test request, performance data of the game server during data interaction with the game client to obtain a test result of the game server, the method further includes:
and determining whether the service process of the game server is abnormally interrupted or not according to the service log of the game server, and determining whether each game client is abnormally interrupted or not according to the client log of the game client.
Optionally, the sending a test request to a plurality of game servers so that each game server receiving the test request starts a plurality of service processes for providing game services further includes:
starting a data collection process of each game server receiving the test request; the data collection process is used for collecting the current performance data of the game server in real time;
the acquiring performance data when the game server performs data interaction with the game client includes:
and after the data interaction between the game server and the game client is finished, receiving performance data acquired by the data acquisition process of the game server, and closing the data acquisition process of the game server.
The second aspect of the present application provides a testing method for a game server, which is applied to a testing server, and the testing method includes:
starting at least one game client; wherein each of the clients has complete game drive logic;
providing login information which is issued by a control server and generated by a service process of a game server to each game client, and enabling the game clients to interact with process data of the game server based on game behavior scripts; the game behavior script is determined based on the test case to be executed, and performance data when the game server and the game client perform data interaction is used as a basis for generating a test result.
Optionally, the game client is a render-less game client having complete game drive logic and image rendering functionality disabled.
A third aspect of the present application provides a testing apparatus for a game server, which is applied to a control server, the testing apparatus comprising:
the detection unit is used for detecting whether a test case to be executed exists in the database;
the request unit is used for sending a test request to at least one game server if the test case to be executed exists in the database, so that the game server responds to the test request to start at least one service process for providing game service;
the receiving unit is used for receiving login information fed back after each service process is started successfully;
the triggering unit is used for triggering at least one game client of the testing server to perform data interaction with the game server based on the game behavior script by utilizing the login information; wherein each of the game clients has complete game drive logic; the game behavior script is determined based on the test case to be executed;
and the analysis unit is used for analyzing the performance data of each game server receiving the test request when the game server and the game client perform data interaction to obtain the test result of the game server.
Optionally, the analysis unit is further configured to:
and determining whether the service process of the game server is abnormally interrupted or not according to the service log of the game server, and determining whether each game client is abnormally interrupted or not according to the client log of the game client.
The fourth aspect of the present application provides a testing apparatus for a game server, which is applied to a testing server, the testing apparatus comprising:
the starting unit is used for starting at least one game client; wherein each game client has complete game driving logic;
the issuing unit is used for providing login information issued by the control server and generated by the service process of the game server to each game client, so that the game clients interact with the process data of the game server based on the game behavior script; the game behavior script is determined based on the test case to be executed, and performance data when the game server and the game client perform data interaction is used as a basis for generating a test result.
A fifth aspect of the present application provides a test system for a game server, comprising a database, a control server, at least one test server and at least one game server;
the control server is configured to execute a testing method of a game server as provided in any one of the first aspect of the present application;
the game server is used for responding to the test request, starting at least one service process for providing game service, and sending login information fed back after the service process is started to the control server;
the testing server is used for executing the testing method of the game server provided by any one of the second aspects of the present application.
A sixth aspect of the present application provides a computer storage medium storing a program for implementing a method of testing a game server as provided in any one of the first aspects of the present application, or for implementing a method of testing a game server as provided in any one of the second aspects of the present application, when the program is executed.
The application provides a test method, a device and a system of a game server and a computer storage medium.A control server sends test requests to a plurality of game servers after detecting that a test case to be executed exists in a database, so that the game servers start a plurality of service processes, then sends login information fed back by the game servers after the service processes are started successfully to the plurality of test servers, and a plurality of game clients operated by the test servers log in the service processes by utilizing the login information; each game client has complete game driving logic; the game client is used for loading a game behavior script specified by the test case to be executed and accessing the game server based on the game behavior script; the control server analyzes the performance data of the game server when being accessed to obtain a test result. Because the rendering function of the game client does not relate to the interaction with the game server, the game client with complete game driving logic used in the scheme can truly reflect the interaction condition with the server when the user actually operates the game client, and the test of the game server is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a test system of a game server according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a test case editing interface provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a display interface for displaying a plurality of test cases in a database according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for testing a game server according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of the relationship between a debugging process and a service process in a game server;
FIG. 6 is a diagram illustrating the relationship between a control server, a test server and a game client according to an embodiment of the present application;
FIG. 7 is a diagram illustrating a game client loading a game behavior script according to an embodiment of the present application;
FIG. 8 is a diagram illustrating a test result of a game server according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a control server according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a test server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
In the process that a user plays a network game through a game client installed on a terminal device (such as a smart phone and a tablet personal computer), the game client needs to interact with a corresponding game server in real time to perform game data interaction, so that real-time interaction between a game role of the user and a game scene and real-time interaction between the game role of the current user and game roles of other users are realized.
As can be appreciated, as the visual effects exhibited by the game clients become more detailed and realistic, the interaction behavior of the supported game characters increases, and the data interaction between the game clients and the game server is necessarily more complex. For example, in the development of a network game (this kind of game may be referred to as an Unreal game) based on an Unreal Engine (a game Engine for supporting the development and driving of a game having three-dimensional visual effects and related interactive behaviors), a game client needs to interact with a game server both the common game data, such as the damage of a game character in the game, the current state of the game character, and the like, and the three-dimensional model in the game role and the game scene, such as the collision between the game character and the three-dimensional model, the positional relationship between the game character and the three-dimensional model, and the like.
The client script obtained by simplifying part of functions of a real game client generally only supports simple data interaction between the game client and a game server, but is difficult to support complex game data interaction, particularly data interaction generated by interaction of a game character and a three-dimensional model in a game scene in a phantom game. Therefore, for online games with complex game data interaction processes, such as ghost games, the existing pressure testing method for the game server implemented by adopting the simplified client-side script cannot accurately reflect the conditions of the game server when the online game is actually run.
Therefore, the application provides a test method of the game server, so as to realize the automatic test of the game server of the online game with complex data interaction.
Referring first to fig. 1, fig. 1 shows an alternative architecture of a test system for implementing the test method provided in the present application.
The test system includes: database 100, control server 200, test server 300, game server 400.
It should be noted that fig. 1 is only used to illustrate the interaction relationship between the servers in the test system, and is not used to limit the number of each type of server in the test system. It can be understood that, since a network game will have a plurality of players online, the game operator needs to set up a plurality of game servers to support the operation of the network game, and each game server has the same function and is used for interacting and processing game data with the game clients of the players participating in the network game and connected to the game server.
On the other hand, in order to stress the game servers (i.e., test how many game clients each game server can simultaneously carry), the test system needs to provide a large number of game clients that can perform data interaction with the game servers. In the test system provided by the present application, the game clients are run by the test server 300, and therefore, in a practical scenario, one test system may include a plurality of test servers.
The tester can edit the test cases one by one on the terminal equipment. FIG. 2 is a schematic diagram of an alternative test case editing interface.
As shown in fig. 2, a test case specifically includes scene configuration parameters, startup configuration parameters, game behavior scripts, and other information. It can be understood that a network game can provide a plurality of optional game environments and game modes for a player to select, the "scenario" in fig. 2 is used to specify what game environment and game mode the test case currently edited is to execute, when a test is started on a test case, the game server starts a plurality of service processes, each service process corresponds to a game involving a plurality of game characters, and the game environment and game scenario of the game are determined by the "scenario" parameters of the test case currently tested.
"run duration per run (seconds)" is used to define the test duration of a test case. In order to ensure the testing efficiency, a testing time length needs to be specified for each test case, the test is terminated when the testing time of one test case reaches the specified testing time length, and then the next test case is tested. As shown in FIG. 2, the test duration of this test case currently edited is 1800 seconds.
The subsequent "number of players per team", "maximum number of players", "number of real players", "Aicount", "OB number", "number of spectators", "number of pets", and "pet configuration" are specific settings for the situation of the players simulated by one test case. The "number of players per team" is the number of players per team when the players are grouped together in the game, and the "maximum number of players" is used to define the upper limit of the number of players participating in the same game. The number of real players and the number of AI (Artificial Intelligence) characters are used to specify the number of real characters and the number of AI characters in a game, when a network game is actually released and run, the real characters refer to game characters created and controlled by a player, the AI characters refer to game characters created and controlled by a game server, in the game testing process, the real characters refer to characters created and controlled by a game client running on the test server, and the definition of the AI characters is unchanged. The "OB number" indicates the number of game characters joining a game of one round but not performing any game action, but waiting in place, and the "number of spectators" indicates the number of game clients that do not join a game of one round but view the game progress of the game in real time. The number of pets, the pet configuration, and the like are parameters set according to a specific online game, if the game currently being tested supports the pet system, that is, virtual pets can be configured for game roles meeting certain conditions, the number of the game roles configured with the virtual pets and the state parameters of the virtual pets can be set by editing the parameters of the number of pets, the pet configuration, and the like, and if the game does not support the pet system, the corresponding test case editing interface can not provide a corresponding input box.
The starting configuration part, the total DS (Dedicated Server) process number is used to control the number of DS processes that a game Server needs to start in the test process. The DS process, which may also be referred to as a service process, is used to provide a corresponding game service for a game client accessing a game server. Each service process corresponds to one game, and the game server achieves the effect of simultaneously supporting multiple games by running a plurality of service processes.
During testing, one game server can start service processes in batches at certain time intervals, a plurality of service processes are started each time until the total limit is reached, so that the situation that a player starts a new game at intervals when the game is actually released is simulated, and the number of the DS processes started each time and the interval time for starting the DS in FIG. 2 are used for specifying the number of the service processes started in each batch and the interval time between two adjacent batches.
The Agent refers to a test server in the test system, the client refers to a game client operated by the test server, and the number of the clients started by each Agent is used for stipulating the number of the game clients operated by each test server in the test system when the test is carried out according to the test case.
The ordinary player and the spectator player delay are used for indicating the time for the player to access one game, 0 delay represents that the ordinary player immediately accesses the game when the game starts, 60 seconds delay represents that the spectator player can not access the game after 60 seconds of starting one game, and the view has 60 seconds lag relative to the real-time view of the game. In the testing link, the ordinary players and the spectator players are replaced by game clients running on the testing server.
The client starting command is used for being read by the control server and issued to the test server, so that the test server is controlled to start the game client.
In a game, the game client can control the game character to move to a predetermined target point, the game behavior is called a running chart, and the running chart script and the target point configuration in fig. 2 are parameters for controlling the game client to execute the game behavior.
The parameters such as weather and carrier are configured to define the virtual weather condition and the virtual carrier condition in one game, for example, the virtual weather may be rainy or sunny, and the virtual carrier condition includes whether or not to generate a carrier, where to generate the carrier, how much to generate the carrier, and the like.
The tester can obtain a test case by filling parameter values of parameters to be configured in the test case editing interface. A plurality of test cases edited by the tester may be stored in the database 100 of the test system of the present application. In addition, the tester can also browse the states of the test cases stored in the database through the test case display interface shown in fig. 3, where the states of the test cases include "to be audited", "normal", "to be executed", "to be smoked", and the like. "to be audited" means that a test case has just been edited and needs to be further audited before it can be used for testing. The "normal" indicates that one test case passes the audit, but is not in the "to-be-smoked" and "to-be-executed" states, and the "to-be-executed" indicates that the test case needs to be tested at present, when a plurality of test cases to be executed simultaneously appear in the database, the test cases can be executed one by one according to a certain sequence, and when one of the test cases is executed, the other test cases to be executed keep the "to-be-executed" state to wait for the test. "to smoke" means that this test case needs to be executed during the smoking test phase. Smoke testing is a concept in the field of software testing and is used to refer to testing performed after one or a group of software has been updated with the purpose of verifying the primary function of the updated software.
Of course, the display interface shown in fig. 3 is only an optional test case display interface, and the test system provided by the present application may use various test case display interfaces including, but not limited to, fig. 3 to display test cases.
On the basis that the database 100 stores a plurality of test cases, the control server 200 may perform polling detection on the plurality of test cases of the database 100 according to a certain period to determine whether there is a test case to be executed.
After detecting the test cases to be executed in the database, the control server reads the test cases to be executed, and then sends a test request to the game server based on the parameters specified by the test cases to be executed, so that the game server responds to the test request required by the control service and starts at least one service process. For a specific implementation process, please refer to related steps in the testing method provided in the following embodiments.
After each service process is started, login information of the service process is fed back to the control server. The control server can distribute the received login information to a plurality of test servers, and each test server receives one or more login information. Then, the test server 300 starts a plurality of game clients, after each game client is started, logs in to a service process providing the login information by using the login information received by the test server, and acquires a game behavior script specified by the test case to be executed from the script server. After the game client logs in the service process, the game behavior script is executed, and the game client performs game data interaction with the game server.
It should be noted that, in the test system provided by the present application, the game client run by the test server is a client program having a complete game drive logic of the game to be tested.
For example, if the game to be tested is the aforementioned phantom game, the game driving logic involved includes interaction logic between a plurality of game characters, interaction logic between the game characters and three-dimensional models in the game scene, interaction logic between different three-dimensional models, and the like, and accordingly, the game client run by the test server needs to implement all the game driving logic of the game, so that the actual situation after the game is released and run can be truly reflected when data interaction is performed between the game client and the game server, thereby ensuring the accuracy of the test result of the game server.
Optionally, the game may be directly released and provided to each player, and a client program running on a terminal device (e.g., a mobile phone or a tablet computer) of the player may be used as a game client for testing the game server in the present application.
Further, a client program running on a terminal device of a player needs to implement a complete game driving logic on one hand, and also needs to render a three-dimensional model of a game character and a game scene on the other hand, so as to show a relevant game picture to the player. The process of rendering the game screen consumes a large amount of resources of the device running the client program, and the rendering process does not involve game data interaction with the game server.
Rendering refers to the process of generating corresponding images based on the attributes of the game character and the three-dimensional model (e.g., the shape, color, size, etc. of the model).
Therefore, in order to reduce the resources consumed by the test server when running each game client, so that each test server can run more game clients, the rendering function of the client program run by the terminal device provided for the player can be disabled, so that a non-rendering client having complete game driving logic that would normally be executed after the game client is started and performing no rendering of the game screen (i.e., no rendering process) is obtained, and the non-rendering client is used as the game client running on the test server.
Specifically, the client program provided for the terminal device to run includes a plurality of threads during running, where there are both a logic thread for implementing the game driving logic and a rendering thread for rendering the game screen. In the process of actually playing a game by a player, the logic thread processes the operation of the player and game data fed back by the game server according to the game driving logic in real time, then feeds back a processing result to the game server, provides game picture data corresponding to the processing result to the rendering thread, the rendering thread calls resources occupied by the rendering thread to render the game picture data, and returns a rendering success result to the logic thread after rendering succeeds, and then the logic thread continues to process for the next time.
In the non-rendering client with the rendering function disabled, the logic thread still processes the operation of the player and the game data fed back by the game server in real time according to the game driving logic, then feeds back the processing result to the game server, and provides the game picture data corresponding to the processing result to the rendering thread, that is, the game driving logic of the non-rendering client can be normally executed, and the rendering thread does not render the game picture data after obtaining the game picture data, but directly returns the successful rendering result, so that the logic thread continues to perform the next processing. By the method, the resource consumed by the test server when running one game client can be effectively reduced, and each test server can run more game clients. Accordingly, a specific number of test servers included in the test system can test more game servers, so that the test capability of the test system provided by the application on the game servers can be improved.
And after the execution time reaches the test duration specified by the test case to be executed, the game client stops executing the interaction between the script and the game data and quits the service process. And meanwhile, the control server acquires performance data of the game server during game data interaction, and obtains a test result of the test case to be executed by analyzing the performance data.
The test result of the test case to be executed can be stored by the control server, and the tester can access the control server through the network, so that the test result can be browsed on the corresponding terminal equipment.
Alternatively, in other systems for implementing the test method provided by the present application, one of the plurality of test servers may be designated as the control server. That is, a certain test server in the test system may be specified in advance, and a control program for realizing the functions of the control server may be configured on the test server. Therefore, after the test system is started, the designated test server is used as a control server to control the game client running by the test server and the game client of other test servers in the test system, so that the game clients and the game server perform data interaction, and the test server is also used as a test server to run a plurality of game clients.
When the number of the game servers and the test servers is small, the corresponding running control program does not consume excessive system resources, and at the moment, the use of the independent control server for running the control program causes a part of system resources of the independent control server to be idle. In this case, a certain test server is designated to simultaneously take over the test task (i.e., the task of operating the game client) and the control task (i.e., the task of operating the control program), and the utilization rate of the system resources of each server in the system can be improved.
Referring to fig. 4, a method for testing a game server according to an embodiment of the present application is described below with reference to the testing system of the game server, where the method includes the following steps:
s401, the control server detects whether a test case to be executed exists in the database.
As described above, the database stores test cases edited by a plurality of testers in advance. The control server only needs to poll each test case in the database according to a certain period, and can determine whether the test case to be executed in the current database exists.
Specifically, the tester may configure a corresponding execution condition for each test case, for example, specify that a test case is executed every other corresponding test interval (for example, every 24 hours).
Then, the control server determines whether the execution conditions of the current execution environment and each test case are matched, for example, for the foregoing example, the determination here may be to determine whether a difference between the current time and the time of the previous execution of a certain test case is equal to or greater than a corresponding test interval, if so, the current execution environment is considered to be matched with the execution conditions of the test case, the test case is determined to be a test case to be executed, and correspondingly, the state of the test case in the database is set to be "to be executed", and if the difference between the current time and the time of the previous execution of a certain test case is less than a corresponding test interval, the execution conditions of the current execution environment and the test case are considered to be unmatched, and are not determined to be a test case to be executed.
Of course, the execution condition of the test case is not limited to the above time condition. For example, the execution condition of a certain test case may also be that the test case is executed when a certain event occurs (for example, when there is a new version of the client program that needs to be released after the game server fails and recovers). The execution conditions of the test case are not limited in the present application.
If the database has the test case to be executed, the control server executes step S402, and if the database does not have the test case to be executed currently, the control server continues to perform the detection until the test case to be executed in the database is detected.
S402, the control server sends a test request to the game server to enable the game server to start at least one service process.
An optional implementation manner of step S402 is to configure a service debugging process (denoted as dsdebug process) for each game server in advance, where the service debugging process monitors information sent by the control server in real time.
As shown in fig. 5, for any game server, after the service debugging process of the game server monitors the test request sent by the control server, the service debugging process will pull up a plurality of service processes on the game server based on the test request sent by the control server.
Generally, each service process corresponds to a game run by the game server, and the service process is used to provide a corresponding game service for a game character in the corresponding game, and the provided game services include, but are not limited to:
providing real-time game data interaction for each real character in the game, providing game picture data lagging for a certain time for a spectator user of the game, controlling the behavior of the AI character of the game based on a specific AI behavior script and the like.
The test request sent by the control server may carry a part of the startup configuration parameters in the use case to be executed. Referring to the foregoing description of the test case interface, the test request may include the total number of service processes run by one game server, the starting number of each batch, the time interval between two adjacent batches, the number of AI characters in one game, and the game scenario specified by the test case to be executed.
The service debugging process can start a plurality of service processes in batches and pull up the plurality of service processes in the game server at intervals of time intervals of adjacent batches according to the total number of the service processes, and provide the game scenes and the AI role number defined by the test cases to be executed for the service processes, so that the service processes create the corresponding game scenes and the AI roles.
It can be understood that, when testing a specific test case to be executed, the test range may cover each existing game server, or may only test a part of game servers, and the specific test of which game servers may be specified by the tester by configuring the relevant parameters, which is not limited in the present application.
When a game server provides game services for real players, a large number of players often access the game server at the same time, and thus the game server may run a plurality of service processes at the same time.
In a conventional manual testing method for a game server, a tester needs to manually operate a game client to access the game server, and then obtain performance data of the game server in an access process. In this method, due to the limitation of manpower, the number of game clients operated by the tester is small, and the game server only needs to run one service process. In this case, it is necessary to evaluate the performance data of the game server when a plurality of service processes are executed based on the performance data of the game server when one service process is executed, and then analyze the performance data to obtain a test result.
In the testing method provided by the application, the number of the game clients automatically operated by the plurality of testing servers is far greater than that of the game clients manually operated by testing personnel in the manual testing method, and the game servers need to simultaneously operate a plurality of service processes due to the large number of game clients operated on the plurality of testing servers. Compared with the manual testing method, the performance data of the game server obtained by the testing method is similar to the performance data of the game server when the game server provides game service for real players, and the performance data can be directly analyzed to obtain the testing result without evaluating the obtained performance data.
And S403, the control server receives login information fed back by the service process.
It should be noted that after each service process is successfully started, login information (key) of the service process is fed back to the control server, where the login information may include a login account and a login password.
If the game server is configured with a service debugging process, as shown in fig. 5, the login information fed back by the service process may be login information obtained by negotiation with the service debugging process after the service process is successfully started.
The negotiation process may be that after the service process is started, the service debugging process sends a start success message to the service debugging process, then the service debugging process sends a random number generated based on a random number algorithm to the service process as a seed, then the service process calls a preset login information generation program to process the received seed and the current time to obtain login information, and finally the generated login information is fed back to the control server through the service debugging process.
The method can ensure that the login information generated by the service process is dynamic, namely the login information generated each time is different from the previous login information, thereby preventing the corresponding safety problem caused by the embezzlement of the previous login information.
S404, the control server distributes login information to the test server.
In the step S404, it is understood that after obtaining the login information of the plurality of service processes, the control server sends the login information to the plurality of test servers in the test system, so that each test server receives a part of the login information.
Referring to fig. 6, if the test case to be executed specifies that a game includes 20 real characters, and specifies that each test server runs 30 game clients, and each real character needs to be created and controlled by one game client in the test environment, the login information generated by one service process includes the login account and the login password of the 20 game characters. When the control server executes step S404, the login information of the service process 1 and the login account and the login password of 10 game characters in the login information of the service process 2 are sent to a certain test server, then the test server starts 30 game clients, and provides the login account and the login password of the 30 game characters to the 30 game clients, and finally each game client can log in the service process providing the login information by using its own login information.
The control server can also send a client starting command designated by the test case to be executed and login information to the test server together, so that the test server can start the game client based on the client starting command.
It should be noted that, the test method provided in the embodiment of the present application is executed once, which is equivalent to a test process performed on a plurality of game servers, and each test server participating in the test process executes the steps executed by the test server in the embodiment, that is, each test server participating in the test process receives login information sent by the control server, and starts a plurality of game clients and then performs data interaction with the game servers through the game clients.
It will be appreciated that for a particular test session, only a portion of the plurality of test servers included in the test system may participate in the test session, while other test servers participate in the next test session. Specifically, which test servers participate and which servers do not participate in a test process, which is determined by the control server according to the test case to be executed, and which is not limited in the present application.
It should be noted that, in this embodiment, if the control server is used to control the whole testing process and is also used as a testing server to run the game client, the specific execution process of step S404 includes:
on one hand, the control server sends login information to other test servers except the control server, so that the test servers are triggered to execute subsequent steps. On the other hand, the process for running the control program (which may be referred to as an AgentService process) in the control server transfers the login information to the process for starting the game client (i.e., the client agent process described in step S405) run by the control server, so that the client agent process of the control server executes step S405, and the control server also starts a plurality of game clients. After the game client of the control server is started, the control server is used as a test server to perform data interaction with the game server.
S405, the test server starts a plurality of game clients and provides login information for the game clients.
Optionally, a client agent process (denoted as AgentClient process) may be configured in advance for each test server, where the client agent process is used to directly perform data interaction with the control server, and control the game client of the test server based on the data sent by the control server.
Based on the AgentClient process, referring to fig. 6, the implementation process of step S405 may be that after the AgentClient process obtains the login information, a plurality of game clients are started in the test server, and then the received login information is distributed to each game client, each game client receives a login account and a login password of a game role, and then the game client can log in to the corresponding service process by using the login account and the login password received by itself.
The game client in step S405 is a game client having a complete game driving logic.
S406, the test server performs game data interaction through the running game client and the game server.
It should be noted that, the game data interaction in step S406 is specifically game data interaction performed by the game client run by the test server and the service process logged in by the game client.
When the control server distributes the login information, the control server may send an identifier (which may be a script name) of the game behavior script specified by the test case to be executed to the test server.
As shown in fig. 7, the AgentClient process of the test server can access the script server, and the script server stores the game behavior script which is written in advance by the tester and uploaded through the network. The game behavior script can be written by using a Lua script language, or can be written by using other existing script languages, which is not limited in the present application.
The Lua script language is an existing script language developed based on the C language, and scripts written based on the Lua language can be flexibly embedded into existing application programs, so that flexible extension and customization functions are provided for the application programs.
The Agent process can search and obtain the game behavior script specified by the test case to be executed from the script server based on the received game behavior script identification, and then transmit the obtained game behavior script to each client process for operating the game client, so that the game client can obtain a corresponding operation instruction from the game behavior script according to the current game scene when operating, and then automatically execute the operation instruction, thereby controlling the corresponding game role to perform corresponding game behavior.
The game data interaction between a game client and a game server mainly comprises that the game server sends a game scene and game behaviors of other game characters except the game character controlled by the game client to the game client, and meanwhile, the game client transmits the behavior of the game character controlled by the game client to the game server.
During the process of playing the game by the player, the terminal device (such as a mobile phone) running the game client collects the operation of the player, further generates a corresponding operation instruction to be provided to the game client, and finally the game client controls the game role to take a corresponding game action according to the operation instruction, wherein the game action includes but is not limited to carrier use, movement, attack and the like. In the testing environment, the game client runs in the testing server and is not controlled by direct human, at the moment, a tester needs to write a game behavior script in advance, the game behavior script consists of a plurality of operation instructions, after the game client running in the testing server obtains the game behavior script, the game client can select a proper operation instruction from the obtained game behavior script according to game data fed back by the game server, and then the game behavior of a game role is controlled based on the operation instruction, and the game playing process of a player is simulated by the mode.
The end time of the game data interaction of the test server and the game server is determined by the test duration specified by the test case to be executed, i.e., "duration (second) of run per game" in fig. 2. If the parameter of the test case to be executed is set to 1800 seconds, after the game behavior script is loaded by each game client, the game behavior script is executed for 1800 seconds, the game client and the logged-in service process perform real-time game data interaction in the period of time, when the 1800 seconds are reached, the game client quits the game, the game data interaction between the game client and the service process is stopped, and when all the game clients operated by one test server do not perform data interaction with the corresponding service process any more, the game data interaction between the test server and the game server is also stopped.
Alternatively, the test server may transmit a message of the end of the test to the control server after the game data interaction with the game server is stopped, so as to trigger the control server to perform step S407, or the game server may transmit the message.
When the game server is tested, in order to ensure that the test result can reflect the state of the game server providing game service for the real player, the game data interaction process between the test tool and the game server is required to be consistent with the game data interaction process between the game client operated by the real player and the game server as much as possible.
For the existing method using the simplified client-side script as the testing tool, when a game server of a game (such as the phantom game prompted by the foregoing) with a complex data interaction process needs to be tested, the game data interaction process between the client-side script and the game server is larger than that between the game client-side and the game server operated by the real player, so the method using the client-side script as the testing tool is not suitable for such games.
The test tool used by the test method provided by the application is a game client with complete game driving logic, and the game client operated by the real player have the same game driving logic, so that the game data interaction process performed between the game client and the game server is basically the same as the game data interaction process performed between the game client operated by the real player and the game server. Therefore, by running the game client with the complete game driving logic provided by the application on the test server and performing game data interaction through the game client and the game server, the test method provided by the application can test the game server of a game with a complex data interaction process (such as the illusion game prompted by the foregoing).
S407, the control server obtains the performance data of the game server and analyzes the performance data to obtain a test result.
Alternatively, a data collection process may be configured for each game server in advance. After the game server has successfully initiated the plurality of service processes, the control server may initiate a data collection process for this game server. After the data collection process is started, the current performance data of the game server where the data collection process is located can be collected and recorded in real time. In the present application, for a game server, the performance data includes, but is not limited to, the total CPU occupancy and total memory occupied by the game server, the single-process CPU occupancy and single-process CPU memory occupied by each service process run by the game server, and the network card traffic of the game server.
When the game data interaction between a certain game server and the test server is stopped, the control server can close the data collection process of the game server, and the performance data of the game server collected by the control server can be uploaded to the control server when the data collection process is closed, so that the control server can acquire the performance data of the game server in the time period of the game data interaction with the test server.
Optionally, the control server may also receive, in real time, performance data uploaded in the data collection process when the game server and the test server perform game data interaction.
Wherein uploading performance data in real time by the data collection process may cause additional system resources to be consumed by the game server. Moreover, when the game server is put into practical use, that is, when game service is provided for a real player, the game server does not need to upload performance data to the control server in real time, which results in inconsistency between system resources consumed by the game server during testing and system resources consumed by the game server during practical use, that is, the game server additionally consumes system resources required for uploading performance data in real time during testing, and further results in a large difference between the bearing capacity of the game server determined according to the test result and the bearing capacity of the game server during practical use, that is, the accuracy of the test result is low.
In order to avoid the above problem, the former way of obtaining performance data may be preferentially adopted by the control server, that is, when the game server and the game client perform data interaction, the data collection process is only used for collecting performance data in real time, and does not upload the performance data to the control server, and after the data interaction is stopped, the data collection process uploads the performance data to the control server. By adopting the acquisition mode, the system resources consumed by the game server during the test can be as close as possible to the system resources consumed by the game server during the actual use, so that the finally obtained test result can accurately reflect the real bearing capacity of the game server.
Optionally, after the game data interaction between a certain game server and the test server is stopped, the service debugging process of the game server may close each service process of the game server, and then upload the service Log (Log) generated during the operation of each service process and the performance data of the data collection process to the control server together for the control server to perform further analysis.
Optionally, after the game client stops the game data interaction with the corresponding service process, the agent process may also close the game client, and then upload a client log generated during the running of the game client to the control server.
The analysis of the service log and the client log may include the following two aspects:
on the first hand, when a large number of players actually participate in the game, the service process of the game server is abnormally interrupted with a certain probability, which leads to the sudden suspension of the game of the player relying on the service process for data interaction, and meanwhile, the game client is also abnormally interrupted with a certain probability during running, which leads to the fact that the player operating the game client cannot participate in the game.
One expression form of the abnormal interruption of the game client is flash back, namely, after the player operates, the game client displays a game picture in a short time, and then the game client automatically quits.
The probability of abnormal interruption of the service process and the game client is low, so that the abnormal interruption is difficult to find when the game server is manually tested, and related maintenance cannot be carried out naturally so as to avoid the abnormal interruption when a player actually plays the game.
The automatic testing scheme provided by the embodiment can simultaneously run a large number of game clients on a plurality of testing servers, and the corresponding game servers can simultaneously run a plurality of service processes so as to perform data interaction with the game clients. Therefore, the test method provided by the embodiment can trigger the abnormal interruption of the service process with low occurrence probability and the abnormal interruption of the game client operated by the test server, and on the other hand, the service log and the client log can record the time of the abnormal interruption and the state parameters of the service process and the game client when the abnormal interruption occurs.
Therefore, the control server can determine whether each service process and each game client are abnormally interrupted or not in the test process by analyzing the service log and the client log, and when the abnormal interruption of a certain service process or a certain game client is detected, the control server can further extract the state parameters of the service process and the client when the abnormal interruption occurs from the log, so that relevant personnel can correspondingly maintain the game server and the game client based on the state parameters, and the abnormal interruption of a player when the player actually plays the game is avoided.
In a second aspect, the service log also records the response of the service process to the game client during data interaction with the game client. Therefore, by analyzing the service log, it can be determined whether the service process is normal in the tested layer in response to various requests initiated by the game client based on the game behavior script, thereby determining whether the running game program function of the service process is normal.
For example, a game program run by a game server generally has a function of automatic team formation, that is, when the number of players N (assuming that N is equal to 9) requesting team formation is smaller than a prescribed number of team characters (prescribed number of team characters is equal to 10), the game program automatically creates a different number of AI characters and teams the AI characters and the player characters.
To test the automatic team formation function, in conjunction with the above example, 9 game clients may be controlled to initiate a team formation request. Normally, for such a team request, the service process creates equivalent AI characters according to the difference between the number of game clients and the number of specified team characters, and teams the AI characters and the game client's character that initiated the team request. By analyzing the service log of the game server, whether corresponding operation is executed after each service process receives the team organizing request during testing can be found, and whether the automatic team organizing function of the game program is normal can be further determined.
The analysis of the performance data by the control server may include:
and calculating the average value and the peak value of each item of performance data acquired by data collection in real time in the test process aiming at any game server, and taking the obtained result as the test result of the game server in the test.
Optionally, after a plurality of tests, a plurality of test results obtained by one game server may be displayed by using the interface shown in fig. 8. Each row of data in the figure is the test result of a certain test of the game server,
as shown in fig. 8, starting from the left side, the first column indicates a test case used in each test, the second column indicates an audit result of performance data obtained in the test, specifically three audit results, namely "audited", "execution completed", and "data abnormal", where "audited" indicates that the performance data of the test has been audited and no abnormality is found, and "execution completed" indicates that the test has been completed but the performance data has not been audited, and "data abnormal" indicates that the performance data of the test has been audited and abnormal data is found.
Auditing of the performance data may be performed by the control server. The auditing method can adopt a preset abnormal data detection algorithm to detect performance data acquired at a plurality of moments within the testing time so as to find whether abnormal data exists or not, if the abnormal data exists, the auditing result is 'data abnormal', and if the abnormal data does not exist, the auditing result is 'audited'.
In the process of data interaction between the game server and the game client, some faults of the program of the game server or the program of the game client may be triggered, and further, the performance data of the game server collected at the moment of the triggered faults is abnormal. Therefore, whether the program of the game server and the program of the game client fail in the game data interaction process can be determined by checking whether the performance data obtained in the game data interaction process contains abnormal data, and the time when the failure occurs is determined, so that the program of the game server and the program of the game client can be maintained conveniently.
The data in columns 3 to 7 of the figure are the test results of each test. For example, for the data in the first row in the drawing, the peak value of the system CPU is 79.5%, and the control server may compare the obtained total CPU occupancy rates of the game server at multiple times in the current test process to determine the maximum value, that is, the peak value of the system CPU; the average value of the system CPU is 56.9%, and the control server can obtain the average value of the system CPU only by averaging the obtained total CPU occupancy rates at all times; and the 90% value of the system CPU is 76%, which means that in the test process, the total CPU occupancy of the 90% time game servers is less than or equal to 76%, and this value can be obtained by sorting the obtained total CPU occupancy at each time from large to small, then deleting the first 10% of data, and the peak value in the remaining 90% of data after deletion is the 90% value of the system CPU.
The other analysis methods of the test results are similar, and corresponding peak values and mean values can be obtained only by comparing and calculating the obtained performance data at each moment. The peak value and the average value of the system memory can be obtained by analyzing the total occupied memory of the game server at each moment, the peak value and the average value of the single-process CPU and the single-process memory can be obtained by analyzing the single-process CPU occupancy rate and the single-process CPU occupied memory of all service processes operated by the game server at each moment, and the read flow and the write flow of the network card can be obtained by analyzing the network card flow of the game server at each moment. This embodiment will not be described in detail.
It can be understood that, for a test process, the number of game clients borne by one game server to be tested can be determined according to the test case used in the test process, for example, in the test case shown in fig. 2, the total DS process number of each game server is 90, and the number of real players of each game is 20, which means that when the test case is used for testing, this game server will bear 90 games at the same time, and each game has 20 real characters, that is, the service process corresponding to this game will perform data interaction with 20 game clients operated by the test server.
Therefore, when the test case is used for testing, one game server can perform data interaction with 90 × 20 game clients, namely 1800 game clients, and the 90% value of the system CPU of the game server is found to be 76% after the test, which is just equal to the threshold value of the 90% value of the specified system CPU, so that the game server can be determined to carry game data interaction of 1800 players at most on the premise of ensuring no fault.
For other game servers and similar analysis of the test cases, in summary, the number N of game clients (referring to game clients that interact with the game server at the same time) borne by the tested game server in the test process is determined through the test cases, then each item of data in the test results is compared with a corresponding threshold, if each item of data of the test results is smaller than the corresponding threshold, it is determined that the number of players that can be borne by the game server is greater than N, if one or more items of data of the test results are equal to or slightly greater than (can be defined to be greater than the threshold, but less than 1.1 times of) the corresponding threshold, it is determined that the number N of players can be borne by the game server, if one or more items of data of the test results are much greater than (can be defined to be greater than the above range) the corresponding threshold, it is determined that this game server cannot carry N players.
The application provides a test method of a game server, after detecting that a test case to be executed exists in a database, a control server sends test requests to a plurality of game servers to enable the game servers to start a plurality of service processes, then login information fed back after the service processes are started is distributed to a plurality of test servers, and a game client of each test server logs in the service processes; each game client side is provided with a complete game driving logic and is used for loading a specified game behavior script and accessing the game server based on the game behavior script; the control server analyzes the performance data of the game server when being accessed to obtain a test result.
On one hand, the control server can automatically control the game server to start a service process when detecting a test case to be executed, and automatically control the test server to start the game client, the game client of the test server can automatically perform game data interaction with the game server based on the game behavior script, and finally the control server automatically analyzes the performance data to obtain a test result. Therefore, the testing system provided by the application can realize automatic testing of the game server without manual operation.
On the other hand, in the testing method provided by the application, the testing tool run by the testing server is a game client with complete game driving logic, and the game driving logic of the game client is the same as that of the game client operated by the real player. For a game (such as a fantasy game) with a complex game data interaction process, a game client with complete game driving logic is used for testing, so that the game data interaction process during testing can be ensured to be consistent with the game data interaction process performed by the game client operated by a real player.
In combination with the testing method of the game server provided by the embodiment of the application, the embodiment of the application also provides a control server and a testing server.
Referring to fig. 9, a control server provided in an embodiment of the present application includes the following units:
the detecting unit 901 is configured to detect whether a test case to be executed exists in the database.
The test case is used for performing stress test on the game server.
The requesting unit 902 is configured to send a test request to a plurality of game servers if the database has a test case to be executed, so that each game server receiving the test request starts a plurality of service processes for providing the game service.
The receiving unit 903 is configured to receive login information fed back after each service process is successfully started.
And a triggering unit 904, configured to trigger at least one game client of the test server to perform data interaction with the game server based on the game behavior script by using the login information.
Wherein each game client has complete game drive logic; the game behavior script is determined based on the test case to be executed.
Wherein each game client has complete game drive logic.
The analysis unit 905 is configured to, for each game server that receives the test request, obtain performance data of the game server when performing data interaction with the game client, and analyze the server performance data to obtain a test result of the game server.
Optionally, the analyzing unit 905 is further configured to:
and determining whether the service process of the game server is abnormally interrupted or not according to the service log of the game server, and determining whether each game client is abnormally interrupted or not according to the client log of the game client.
When the detecting unit 901 detects whether there is a test case to be executed in the database, the detecting unit is specifically configured to:
detecting each pre-edited test case stored in the database according to a period to judge whether the current execution environment of the control server meets the execution condition corresponding to the test case;
and if the current execution environment of the control server is detected to meet the execution condition of any test case, determining the test case as the test case to be executed.
Optionally, each game server is configured with a service debugging process;
the request unit 902 sends a test request to a plurality of game servers, so that when each game server receiving the test request starts a plurality of service processes for providing game services, the test requests are specifically configured to:
and aiming at each game server needing to send the test request, sending the test request to a service debugging process of the game server, so that the service debugging process pulls up a plurality of service processes for providing the game service on the game server.
And after the service process is successfully started, the service debugging process and the service process negotiate to obtain the login information fed back by the service process.
Optionally, the control server further includes:
and the control unit 906 is used for starting the data collection process of each game server receiving the test request.
The data collection process is used for collecting the current performance data of the game server in real time, and the performance data comprises the total CPU occupancy rate, the total occupied memory, the single-process CPU occupancy rate, the single-process CPU occupied memory and the network card flow.
When the analysis unit 905 acquires the performance data, it is specifically configured to:
and acquiring performance data acquired by the data collection process when the game server and the game client perform data interaction from the data collection process of the game server.
The control unit 906 is also adapted to shut down the data collection process of the game server after the analysis unit has obtained the performance data.
Referring to fig. 10, a test server provided in an embodiment of the present application includes the following units:
an initiating unit 1001 is used for initiating a plurality of game clients.
Wherein, each game client has complete game driving logic.
The issuing unit 1002 is configured to provide login information issued by the control server and generated by a service process of the game server to each game client, so that the game client logs in the service process generating the login information by using the login information.
After the game client logs in the service process, the game client is used for loading a game behavior script determined by the control server and designated by the test case to be executed, and performing data interaction with the game server based on the game behavior script, and performance data when the game server performs data interaction with the game client is used as a basis for generating a test result.
Optionally, the game client is a render-less game client having complete game drive logic and image rendering functionality disabled.
The working principles of the control server and the test server provided in the embodiments of the present application may refer to the relevant steps of the control method provided in the embodiments of the present application, and are not described herein again.
After a detection unit 901 of a control server detects that a test case to be executed exists in a database, a request unit 902 sends a test request to a plurality of game servers, so that the game servers start a plurality of service processes, a receiving unit receives login information fed back by the service processes, and then a triggering unit 904 triggers at least one game client of the test server to perform data interaction with the game servers based on a game behavior script by utilizing the login information; finally, the analyzing unit 905 analyzes the performance data of the game server during data interaction to obtain a test result. The game client with the complete game driving logic used in the scheme can truly reflect the interaction condition with the server when the user actually operates the game client, and realizes the automatic test of the game server.
The embodiment of the application also provides a computer storage medium for storing the program.
When the program is executed, the electronic device executing the program may serve as the control server provided in the embodiment of the present application to execute the relevant steps in the foregoing test method, or may serve as the test server provided in the embodiment of the present application to execute the relevant steps in the foregoing test method.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A test method of a game server is applied to a control server, and comprises the following steps:
detecting whether a test case to be executed exists in a database;
if the database has a test case to be executed, sending a test request to at least one game server, and enabling the game server to respond to the test request to start at least one service process for providing game service;
receiving login information fed back after each service process is successfully started, and triggering at least one game client of a test server to perform data interaction with the game server based on a game behavior script by using the login information; wherein each of the game clients has complete game drive logic; the game behavior script is determined based on the test case to be executed;
and analyzing the performance data of the game server and the game client when the game server receives the test request aiming at each game server which receives the test request, and obtaining the test result of the game server.
2. The method according to claim 1, wherein the analyzing, for each game server that receives the test request, performance data of the game server during data interaction with the game client to obtain a test result of the game server further comprises:
and determining whether the service process of the game server is abnormally interrupted or not according to the service log of the game server, and determining whether each game client is abnormally interrupted or not according to the client log of the game client.
3. The method of claim 1, wherein after sending a test request to at least one of the game servers to cause the game server to initiate at least one service process for providing game services in response to the test request, further comprising:
starting a data collection process of each game server receiving the test request; the data collection process is used for collecting the current performance data of the game server in real time and uploading the performance data of the game server and the game client during data interaction to the game server after the data interaction between the game server and the game client is finished.
4. A test method of a game server is applied to a test server, and the test method comprises the following steps:
starting at least one game client; wherein each of the game clients has complete game drive logic;
providing login information which is issued by a control server and generated by a service process of a game server to each game client, and enabling the game clients to interact with process data of the game server based on game behavior scripts; the game behavior script is determined based on the test case to be executed, and performance data when the game server and the game client perform data interaction is used as a basis for generating a test result.
5. The testing method of claim 4, wherein the game client is a render-less game client having complete game driver logic and image rendering functionality disabled.
6. A testing device of a game server is applied to a control server, and comprises:
the detection unit is used for detecting whether a test case to be executed exists in the database;
the request unit is used for sending a test request to at least one game server if the test case to be executed exists in the database, so that the game server responds to the test request to start at least one service process for providing game service;
the receiving unit is used for receiving login information fed back after each service process is started successfully;
the triggering unit is used for triggering at least one game client of the testing server to perform data interaction with the game server based on the game behavior script by utilizing the login information; wherein each of the game clients has complete game drive logic; the game behavior script is determined based on the test case to be executed;
and the analysis unit is used for analyzing the performance data of each game server receiving the test request when the game server and the game client perform data interaction to obtain the test result of the game server.
7. The testing device of claim 6, wherein the analysis unit is further configured to:
and determining whether the service process of the game server is abnormally interrupted or not according to the service log of the game server, and determining whether each game client is abnormally interrupted or not according to the client log of the game client.
8. A testing device of a game server is applied to a testing server, and is characterized by comprising:
the starting unit is used for starting at least one game client; wherein each game client has complete game driving logic;
the issuing unit is used for providing login information issued by the control server and generated by the service process of the game server to each game client, so that the game clients interact with the process data of the game server based on the game behavior script; the game behavior script is determined based on the test case to be executed, and performance data when the game server and the game client perform data interaction is used as a basis for generating a test result.
9. A test system of a game server is characterized by comprising a database, a control server, at least one test server and at least one game server;
the control server is used for executing the test method of the game server according to any one of claims 1 to 3;
the game server is used for responding to the test request, starting at least one service process for providing game service, and sending login information fed back after the service process is started to the control server;
the test server for executing the test method of the game server according to claim 4 or 5.
10. A computer storage medium storing a program which, when executed, implements a method of testing a game server as claimed in any one of claims 1 to 3, or implements a method of testing a game server as claimed in claim 4 or 5.
CN202010305402.8A 2020-04-17 2020-04-17 Method, device and system for testing game server and computer storage medium Pending CN113535535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010305402.8A CN113535535A (en) 2020-04-17 2020-04-17 Method, device and system for testing game server and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010305402.8A CN113535535A (en) 2020-04-17 2020-04-17 Method, device and system for testing game server and computer storage medium

Publications (1)

Publication Number Publication Date
CN113535535A true CN113535535A (en) 2021-10-22

Family

ID=78123289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010305402.8A Pending CN113535535A (en) 2020-04-17 2020-04-17 Method, device and system for testing game server and computer storage medium

Country Status (1)

Country Link
CN (1) CN113535535A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615171A (en) * 2022-03-16 2022-06-10 网易(杭州)网络有限公司 Pressure measurement processing method, device, medium and program product for cloud game server
CN116483718A (en) * 2023-04-25 2023-07-25 无锡市软测认证有限公司 System and method for realizing large-scale pressure test by utilizing big data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615171A (en) * 2022-03-16 2022-06-10 网易(杭州)网络有限公司 Pressure measurement processing method, device, medium and program product for cloud game server
CN114615171B (en) * 2022-03-16 2024-01-30 网易(上海)网络有限公司 Pressure measurement processing method, device, medium and program product of cloud game server
CN116483718A (en) * 2023-04-25 2023-07-25 无锡市软测认证有限公司 System and method for realizing large-scale pressure test by utilizing big data
CN116483718B (en) * 2023-04-25 2023-11-14 无锡市软测认证有限公司 System and method for realizing large-scale pressure test by utilizing big data

Similar Documents

Publication Publication Date Title
US10657032B2 (en) Systems and methods for monitoring performance of applications
EP4119209A1 (en) Interaction scenario start up method, apparatus, storage medium, client end, and server
CN104765678B (en) The method and device tested the application on mobile terminal device
US10095609B1 (en) Intermediary for testing content and applications
US6772107B1 (en) System and method for simulating activity on a computer network
CN108052451A (en) Test method, system, test server, test terminal and storage medium
KR101593984B1 (en) Method for distributed test and system for performing the same, method for controling distributed test and system for performing the same, method for making distributed test plan and apparatus for performing the same, method for executing distributed test plan and agent for distributed test
CN106445817B (en) Processing method, the device and system of test data
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
US10942837B2 (en) Analyzing time-series data in an automated application testing system
CN113535535A (en) Method, device and system for testing game server and computer storage medium
CN107590042A (en) A kind of server method for testing open/close machine and system based on linux system
CN105740154A (en) Webgame test script generation method and device
Abbors et al. MBPeT: a model-based performance testing tool
CN115510454A (en) Game testing method and device, electronic equipment and storage medium
US9792195B2 (en) Terminal data logger
CN114979029A (en) Control method, device, equipment and storage medium of virtual robot
CN114191822A (en) Test method, test device, computer equipment, storage medium and product
CN112203042B (en) Cloud desktop operation response time testing method, system, equipment and medium
CN114064465A (en) Stability testing method based on Linux cloud platform
CN114610597A (en) Pressure testing method, device, equipment and storage medium
CN112073714A (en) Video playing quality automatic detection method, device, equipment and readable storage medium
CN112052163A (en) High-concurrency webpage pressure testing method and device, electronic equipment and storage medium
CN105204975A (en) Performance monitoring system and method based on JavaEE system structure
CN107092546B (en) Live broadcast monitoring system and monitoring method of live broadcast platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination