Client test method, device and equipment

By passing in test cases and startup parameters in the client for environment initialization and business settings, the problem of low efficiency and stability of client automation testing is solved, and a more efficient and stable test process is achieved.

CN119149378APending Publication Date: 2024-12-17DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310722903.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-16
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

During the client development process, the efficiency and stability of client automation testing in the prior art are low in the efficiency and poor in stability, mainly because the test cases require setting multiple preconditions, resulting in a longer execution path and a lower stability.

Method used

Pass in pre-determined test cases and startup parameters through client test instructions, including running the main environment parameters, performing basic environment initialization and business initialization settings of the client, starting the client, and executing test cases to test target functions, avoiding testing in test cases Repeat the precondition code in the

Benefits of technology

Simplifies the execution path of test cases, improves the efficiency and stability of client automation tests, reduces execution steps, and enhances the reliability of tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149378A_ABST
    Figure CN119149378A_ABST
Patent Text Reader

Abstract

The invention discloses a client testing method, device and equipment, and aims to improve the client testing efficiency and stability, the method comprises the following steps: responding to a client testing instruction, obtaining a test case and a starting parameter corresponding to the test case through the client testing instruction, the test case and the starting parameter have a predetermined corresponding relation, and the starting parameter corresponds to the test case; the test case is used for testing a target function of the client, and the starting parameter comprises an operation main environment parameter; reading the operation main environment parameters, and setting the operation main environment of the client as the operation main environment corresponding to the operation main environment parameters; performing service initialization setting of the client, and starting the client; and executing the test case, and testing the target function of the client to obtain a test result of the target function of the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a client testing method, device and equipment. Background Art

[0002] During the development of the client, it is necessary to test the implementation of various functions of the client. Currently, the client is usually tested by automatically executing test cases. When executing test cases, many preconditions need to be set, such as the running environment of the test cases, the account information used by the test cases, etc. These preconditions need to be implemented by writing corresponding codes in the test cases.

[0003] However, the code that implements the preconditions makes the execution path of the test case longer and reduces the execution stability, resulting in low efficiency and poor stability of client-side automated testing. Summary of the invention

[0004] In view of this, embodiments of the present application provide a client testing method, apparatus and device to improve the efficiency and stability of client testing.

[0005] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:

[0006] In a first aspect, an embodiment of the present application provides a client testing method, the method comprising:

[0007] In response to a client test instruction, a test case and a startup parameter corresponding to the test case are obtained through the client test instruction, the test case and the startup parameter have a predetermined corresponding relationship, the test case is used to test a target function of the client, and the startup parameter includes a main running environment parameter;

[0008] Reading the main operating environment parameters, and setting the main operating environment of the client to the main operating environment corresponding to the main operating environment parameters;

[0009] Performing service initialization settings of the client and starting the client;

[0010] The test case is executed to test the target function of the client and obtain the test result of the target function of the client.

[0011] In a second aspect, an embodiment of the present application provides a client testing device, the device comprising:

[0012] an acquisition unit, configured to respond to a client test instruction and acquire a test case and a startup parameter corresponding to the test case through the client test instruction, wherein the test case and the startup parameter have a predetermined corresponding relationship, the test case is used to test a target function of the client, and the startup parameter includes a main running environment parameter;

[0013] A first setting unit, configured to read the main operating environment parameters and set the main operating environment of the client to the main operating environment corresponding to the main operating environment parameters;

[0014] A second setting unit, used to perform service initialization settings of the client and start the client;

[0015] The testing unit is used to execute the test case, test the target function of the client, and obtain the test result of the target function of the client.

[0016] In a third aspect, an embodiment of the present application provides a client testing device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the client testing method as described above is implemented.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the client testing method as described above.

[0018] It can be seen that the embodiments of the present application have the following beneficial effects:

[0019] The embodiment of the present application responds to the client test instruction, and the test case and the startup parameters corresponding to the test case are passed into the client through the client test instruction, and the startup parameters include at least the main running environment parameters. The main running environment parameters are read, and the main running environment of the client is set to the main running environment corresponding to the main running environment parameters, and then the service initialization settings of the client are performed, and the client is started. After the client is started, the test case is executed, the target function of the client is tested, and the test result of the target function of the client is obtained, and the automated testing of the client is completed. Since the setting of various preconditions is completed by passing the startup parameters into the client, there is no need to repeatedly write the corresponding code for implementing the preconditions in the test case, and there is no need to execute the corresponding code for implementing the preconditions when the test case is executed, so that the execution path of the test case is shortened and the execution stability is improved, thereby improving the efficiency and stability of the automated testing of the client. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1A schematic diagram of an exemplary application scenario provided for an embodiment of the present application;

[0021] Figure 2 A flowchart of a client testing method provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of another exemplary application scenario provided for an embodiment of the present application;

[0023] Figure 4 A schematic diagram of a client testing device provided in an embodiment of the present application;

[0024] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0026] In order to facilitate understanding and explanation of the technical solution provided by the embodiments of the present application, the background technology of the embodiments of the present application will be described below.

[0027] During the development of the client, it is necessary to test the implementation of various functions of the client. At present, the client is usually tested by automatically executing test cases. When executing the test case, many preconditions need to be set, such as the running environment of the test case, the account information used by the test case, etc. These preconditions need to be implemented by writing corresponding codes in the test case. However, the code to implement the preconditions makes the execution path of the test case longer and the execution stability is reduced. For example, when executing the test case, the code for setting the preconditions needs to be executed first, and then the relevant code for the test is executed. If the code for setting the preconditions has many execution steps, the overall execution stability of the test case will be reduced. This further leads to low efficiency and poor stability of client automation testing.

[0028] Based on this, the embodiments of the present application provide a client testing method, device and equipment, which transform the client accordingly, pass the startup parameters through the client test instruction when the client starts, and perform relevant settings on the client based on the startup parameters, such as initialization settings of the client basic environment, etc. Based on the startup parameters, the operation of the pre-function can also be performed, such as pre-operation corresponding to the test case, etc. This solves the problem that the client needs to execute the code that sets the pre-conditions first when executing the test case, and improves the efficiency and stability of the client automated testing.

[0029] In order to facilitate understanding of the client testing method provided in the embodiment of the present application, Figure 1See the example scenario shown in the figure. Figure 1 As shown, this figure is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application.

[0030] The client testing method provided in the embodiment of the present application can be applied to the client. When it is necessary to perform a client test, in response to the client test instruction, the client can obtain the test case currently required to be executed and the startup parameters corresponding to the test case through the client test instruction, and the startup parameters at least include the main running environment parameters. Based on the main running environment parameters, the client basic environment initialization settings can be performed, and the main running environment of the client is set to the main running environment corresponding to the main running environment parameters. Then the client's business initialization settings are performed, and the client is started. After the client is started, the test case can be executed, the target function of the client is tested, and the test result of the target function of the client is obtained, thereby completing the test of the client. In this process, there is no need to repeatedly write the code for implementing the preconditions in the test case, but the relevant settings of the preconditions are completed through the startup parameters, which improves the efficiency and stability of the client's automated testing.

[0031] Those skilled in the art will understand that Figure 1 The framework diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.

[0032] To facilitate understanding of the embodiments of the present application, a client testing method provided in the embodiments of the present application is described below in conjunction with the accompanying drawings.

[0033] See also Figure 2 As shown in FIG. 1 , this figure is a flow chart of a client testing method provided in an embodiment of the present application, such as Figure 2 As shown, the method may include S201-S204:

[0034] S201: In response to a client test instruction, a test case and a startup parameter corresponding to the test case are obtained through the client test instruction. The test case and the startup parameter have a predetermined corresponding relationship, the test case is used to test the target function of the client, and the startup parameter includes a main running environment parameter.

[0035] The client that needs to be tested can be run in a test environment. When the client needs to be tested, the test environment will call the client test instruction to trigger the startup of the client. In actual applications, the client test instruction can be an adb (Android Debug Bridge) command. The client can be commanded to pass in a test case and the startup parameters of the test case during the startup process through the client test instruction. The client responds to the client test instruction, and the test case and one or more startup parameters corresponding to the test case can be obtained through the client test instruction. The test case is used to test the target function of the client. In actual applications, the client test instruction can carry information such as the identification and path of the test case, so that the client can obtain the test case through the client test instruction. At the same time, the client test instruction also carries startup parameters, so that the client can obtain the startup parameters corresponding to the test case through the client test instruction.

[0036] The startup parameters correspond to the test cases that need to be executed in the current test, and the correspondence between the test cases and the startup parameters is predetermined. The startup parameters corresponding to the test cases are used to describe a series of operation settings that need to be performed during or after the client startup process in order to execute the test cases. The startup parameters can be in key / value format, where the key is used to identify a certain type of startup parameter, and the value is used to identify the specific value of a certain type of startup parameter. In one possible implementation, the startup parameters may include the main running environment parameters, that is, the key of the startup parameters is the main running environment parameters, and the main running environment parameters are the online environment, that is, the value of the startup parameters is the online environment.

[0037] S202: Read the main running environment parameters, and set the main running environment of the client to the main running environment corresponding to the main running environment parameters.

[0038] The main running environment parameter is used to identify the main running environment after the client is started. Generally, the main running environment parameter is a required option in the startup parameters. The value of the main running environment parameter can include an online environment, an offline environment, or a pre-release environment. The online environment means that the client to be tested runs in a normal online network environment after startup, the offline environment means that the client to be tested runs in a virtual offline environment after startup, and the pre-release environment means that the client to be tested runs in a simulated online environment after startup. The pre-release environment is used to simulate the use of online users and is generally not open to the public.

[0039] After obtaining the main operating environment parameters, the client parses the values ​​of the main operating environment parameters, determines the main operating environment of the client, and performs initialization settings for the main operating environment of the client. Initializing the main operating environment of the client belongs to initializing the basic environment of the client. The initialization settings of the basic environment of the client are related to the basic capabilities of the client required during the client startup process.

[0040] S203: Perform service initialization settings of the client and start the client.

[0041] After initializing the basic environment of the client, you can also initialize the service of the client. The service initialization of the client is to initialize the content related to the client's own service, which can be performed independently of the startup parameters. After the initialization of the basic environment of the client and the service initialization of the client are completed, the client can be started.

[0042] S204: Execute the test case to test the target function of the client and obtain the test result of the target function of the client.

[0043] After the client is started, the target function of the client can be tested by executing the test case to obtain the test result of the target function of the client. At this time, since the relevant preconditions of the client have been set, the test case does not need to execute the relevant settings again. Executing the test case is to directly execute the test process of the client, so that the test results can be obtained with higher efficiency and stability.

[0044] Based on the description of S201-S204, the embodiment of the present application responds to the client test instruction, and the test case and the startup parameters corresponding to the test case are passed into the client through the client test instruction, and the startup parameters at least include the main running environment parameters. Read the main running environment parameters, set the main running environment of the client to the main running environment corresponding to the main running environment parameters, then perform the service initialization settings of the client, and start the client. After the client is started, execute the test case, test the target function of the client, obtain the test result of the target function of the client, and complete the automated testing of the client. Since the setting of various preconditions is completed by passing the startup parameters into the client, there is no need to repeatedly write the corresponding code for implementing the preconditions in the test case, and there is no need to execute the corresponding code for implementing the preconditions when the test case is executed, so that the execution path of the test case is shortened and the execution stability is improved, thereby improving the efficiency and stability of the automated testing of the client.

[0045] In a possible implementation, the startup parameters may further include local experiment configuration information, and the client testing method provided in the embodiment of the present application may further include:

[0046] Read the local experiment configuration information and perform initial configuration of the AB experiment based on the local experiment configuration information.

[0047] The startup parameters may also include local experiment configuration information, which is an optional item in the startup parameters. The local experiment configuration information is used to set the relevant content of the client's local experiment (such as AB experiment). The AB experiment can divide the test content for the client into two groups for testing respectively.

[0048] If the client also obtains local experiment configuration information, it can perform initial configuration related to the AB experiment. The initial configuration of the AB experiment also belongs to the initialization setting of the client basic environment.

[0049] In a possible implementation, when the main operating environment parameter is an offline environment or a pre-release environment, the startup parameter may also include a lane environment parameter. In the above embodiment, S202 reads the main operating environment parameter, and the specific implementation of setting the main operating environment of the client to the main operating environment corresponding to the main operating environment parameter may include:

[0050] When the main running environment parameter is the online environment, the main running environment of the client is set to the online environment.

[0051] When the main operating environment parameter is an offline environment or a pre-release environment, the target lane environment is determined according to the lane environment parameter, and the main operating environment of the client is set to the target lane environment of the offline environment or the pre-release environment.

[0052] In an embodiment of the present application, when the value of the main operating environment parameter is the online environment, the main operating environment of the client is directly set to the online environment, and the initialization setting of the main operating environment of the client is completed. When the main operating environment parameter is the offline environment or the pre-release environment, the offline environment or the pre-release environment can have multiple sets of different environments to choose from, that is, the offline environment or the pre-release environment has multiple different lane environments. The startup parameters can also include lane environment parameters, and the target lane environment can be determined according to the lane environment parameters. The target lane environment is any lane environment, thereby completing the initialization setting of the main operating environment of the client.

[0053] In a possible implementation, the local experiment configuration information may include an AB experiment identifier and an AB experiment hit group identifier. In the above embodiment, the local experiment configuration information is read, and the specific implementation of performing the initialization configuration of the AB experiment based on the local experiment configuration information may include:

[0054] Read and save the AB experiment identifier and the AB experiment hit group identifier.

[0055] Then S204 executes the test case to test the target function of the client, and the specific implementation of obtaining the test result of the target function of the client may include:

[0056] Execute the test case, perform the test corresponding to the AB experiment identifier on the target function of the client and hit the target experiment group corresponding to the AB experiment hit group identifier, and obtain the test result of the target function of the client.

[0057] In an embodiment of the present application, the local experiment configuration information may specifically include an AB experiment identifier and an AB experiment hit group identifier. The AB experiment identifier is used to describe the unique identifier of the AB experiment, and the AB experiment hit group identifier is used to set the experimental group (such as group A or group B) that is hit when the local AB experiment is performed. In addition, the local experiment configuration information may also include an AB experiment name and the result exposure information of the AB experiment. The AB experiment name is used to describe the name of the AB experiment, and the result exposure information of the AB experiment is used to control whether the result of the AB experiment is exposed.

[0058] After reading the local experiment configuration information, the local experiment configuration information can be parsed, and which AB experiment to use when conducting an AB experiment on the target function of the client can be determined based on the AB experiment identifier, and which experiment group in the AB experiment the client directly hits after startup can be determined based on the AB experiment hit group. When executing the test case, the AB experiment corresponding to the AB experiment identifier is executed, and the target experiment group corresponding to the AB experiment hit group identifier is hit to complete the test of the target function of the client and obtain the test result of the target function of the client. In addition, the AB experiment name and the result exposure information of the AB experiment can also be read. When executing the test case, the AB experiment name can be displayed on the client page to facilitate identification of the currently ongoing AB experiment. It is also possible to configure whether the results of the AB experiment are exposed based on the result exposure information of the AB experiment. Generally, the default option is not to expose, that is, the results of the AB experiment do not affect the normal operation of the online environment.

[0059] Thus, in the embodiment of the present application, the initialization configuration of the AB experiment can be performed based on the local experiment configuration information in the startup parameters. Thus, the startup parameters solve various precondition settings before the client executes the test case, so that the execution steps of the test case are reduced, and the stability of the client's automatic running of the test case is greatly improved.

[0060] In addition, based on the above embodiment, after starting the client, some pre-operation processes can also be set based on the startup parameters. In some possible implementations, the startup parameters can also include client pre-operation parameters. After starting the client in S203, S204 executes the test case to test the target function of the client. Before obtaining the test result of the target function of the client, the client testing method provided in the embodiment of the present application can also include:

[0061] Read the client pre-operation parameters and perform the pre-operation corresponding to the client pre-operation parameters.

[0062] After the client is started, based on the client pre-operation parameters, some pre-operation settings for the test case after the client is started can also be performed, that is, the pre-operation corresponding to the client pre-operation parameters is executed. Setting the pre-operation corresponding to the client pre-operation parameters in advance can make it possible to proceed to the test step faster when executing the test case, without the need for the test case to set the relevant pre-operation.

[0063] In a possible implementation, the client pre-operation parameter may include login information; then the specific implementation of reading the client pre-operation parameter and performing the pre-operation corresponding to the client pre-operation parameter may include:

[0064] Read the login information and perform login operations based on the login information.

[0065] The client pre-operation parameters can include login information, which is an optional item in the startup parameters. Login information includes the account, password and other information used when the test case is tested. After the client is started, the login information can be obtained and the login operation can be performed, so that when writing and executing test cases, there is no need to pay attention to the account login process, which improves the test efficiency.

[0066] In a possible implementation, the client pre-operation parameter may include jump link information; then the specific implementation of reading the client pre-operation parameter and performing the pre-operation corresponding to the client pre-operation parameter may include:

[0067] Read the jump link information and jump to the page corresponding to the jump link information.

[0068] The client pre-operation parameters may include jump link information, which is an optional item in the startup parameters. The jump link information is used to describe the link to which the client directly jumps after startup. Based on the jump link information, the client can directly jump to the corresponding page to be tested, thereby further improving the test efficiency.

[0069] In a possible implementation, the client pre-operation parameter may include target path information and simulation data corresponding to the target path information; then the specific implementation of reading the client pre-operation parameter and performing the pre-operation corresponding to the client pre-operation parameter may include:

[0070] Read and save the target path information and the simulation data corresponding to the target path information.

[0071] Based on this, S204 executes the test case to test the target function of the client, and the specific implementation of obtaining the test result of the target function of the client may include:

[0072] When executing the test case to trigger the target path corresponding to the target path information, the simulation data corresponding to the target path information is obtained, and the target function of the client is tested using the simulation data corresponding to the target path information to obtain the test result of the target function of the client.

[0073] The client pre-operation parameters may include target path information and simulation data corresponding to the target path information, which are optional in the startup parameters. In some scenarios of executing test cases, some simulation data is required to reproduce the scenario, for example, simulation data needs to be constructed to test payment failure scenarios.

[0074] Based on the client pre-operation parameters, the target path information can be set, and the target path corresponding to the target path information can store specific simulation data. When testing the target function of the client, the simulation data corresponding to the target path information can be obtained, and the target function of the client can be tested using the simulation data. Among them, the target path supports regular matching, that is, the target path can be set by a regular expression. When the execution of the test case triggers the regular expression of the target path corresponding to the target path information, the simulation data is directly obtained for testing. Therefore, the client test process of a specific scenario can also be realized through the startup parameters.

[0075] See also Figure 3 As shown, this figure is a schematic diagram of another exemplary application scenario provided in an embodiment of the present application.

[0076] In the embodiment of the present application, the startup process of the client can be divided into the initialization setting of the basic environment of the client, the initialization setting of the business of the client, the startup client, the pre-operation corresponding to the pre-operation parameters of the client, and other links. The improvements involved in the embodiment of the present application are concentrated on the initialization setting of the basic environment of the client and the pre-operation corresponding to the pre-operation parameters of the client. Based on the startup parameters, the initialization setting of the main environment of the client can be performed, and the main environment of the client is set to the main environment corresponding to the main environment parameters of the client. The initialization configuration of the AB experiment can also be performed, thereby completing the initialization setting of the basic environment of the client. Based on the pre-operation parameters of the client in the startup parameters, it is also possible to perform a login operation, jump to the page corresponding to the jump link information (i.e., jump operation) and / or obtain the target path information and the simulation data corresponding to the target path information (i.e., perform data simulation), thereby performing the pre-operation corresponding to the pre-operation parameters of the client. After completing the startup process of the client, the test case can be executed to test the target function of the client and obtain the test result of the target function of the client.

[0077] In this way, the embodiment of the present application passes the startup parameters corresponding to the test case into the client through the client test instruction. Based on the startup parameters, the client basic environment is initialized and the corresponding pre-operation is completed. There is no need to repeatedly write the code to implement the preconditions in the test case, and it supports various testability extensions according to the client business characteristics. The execution steps of the test case are greatly reduced, and the stability of the client automated test operation is greatly improved.

[0078] Based on a client testing method provided by the above method embodiment, the embodiment of the present application also provides a client testing device, which will be described below in conjunction with the accompanying drawings.

[0079] See also Figure 4 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a client test device provided in an embodiment of the present application. Figure 4 As shown, the client test device includes:

[0080] The acquisition unit 401 is used to respond to the client test instruction and acquire the test case and the startup parameters corresponding to the test case through the client test instruction, wherein the test case and the startup parameters have a predetermined corresponding relationship, the test case is used to test the target function of the client, and the startup parameters include the main running environment parameters;

[0081] A first setting unit 402 is used to read the main operating environment parameters and set the main operating environment of the client to the main operating environment corresponding to the main operating environment parameters;

[0082] The second setting unit 403 is used to perform service initialization settings of the client and start the client;

[0083] The testing unit 404 is used to execute the test case, test the target function of the client, and obtain the test result of the target function of the client.

[0084] In a possible implementation, the startup parameter further includes a client pre-operation parameter, and the device further includes:

[0085] The operation unit is used to execute the test case after starting the client, test the target function of the client, read the client pre-operation parameters before obtaining the test results of the target function of the client, and perform pre-operation corresponding to the client pre-operation parameters.

[0086] In a possible implementation, the startup parameter further includes local experiment configuration information, and the device further includes:

[0087] The third setting unit is used to read the local experiment configuration information and perform initialization configuration of the AB experiment based on the local experiment configuration information.

[0088] In a possible implementation, when the main operating environment parameter is an offline environment or a pre-release environment, the startup parameter further includes a lane environment parameter; and the first setting unit is specifically configured to:

[0089] When the main operating environment parameter is an online environment, setting the main operating environment of the client to an online environment;

[0090] When the main operating environment parameter is an offline environment or a pre-release environment, the target lane environment is determined according to the lane environment parameter, and the main operating environment of the client is set to the target lane environment of the offline environment or the pre-release environment.

[0091] In a possible implementation manner, the local experiment configuration information includes an AB experiment identifier and an AB experiment hit group identifier, and the third setting unit is specifically configured to:

[0092] Read and save the AB experiment identifier and the AB experiment hit group identifier;

[0093] The testing unit is specifically used for:

[0094] The test case is executed, the target function of the client is tested corresponding to the AB experiment identifier and the target experiment group corresponding to the AB experiment hit group identifier is hit, so as to obtain the test result of the target function of the client.

[0095] In a possible implementation manner, the client pre-operation parameter includes login information; and the operation unit is specifically configured to:

[0096] The login information is read, and a login operation is performed based on the login information.

[0097] In a possible implementation manner, the client pre-operation parameter includes jump link information; and the operation unit is specifically configured to:

[0098] Read the jump link information and jump to the page corresponding to the jump link information.

[0099] In a possible implementation manner, the client pre-operation parameter includes target path information and simulation data corresponding to the target path information; and the operation unit is specifically configured to:

[0100] Reading and saving the target path information and simulation data corresponding to the target path information;

[0101] The testing unit is specifically used for:

[0102] When executing the test case triggers the target path corresponding to the target path information, the simulation data corresponding to the target path information is obtained, and the target function of the client is tested using the simulation data corresponding to the target path information to obtain the test result of the target function of the client.

[0103] Based on a client testing method provided in the above method embodiment, an embodiment of the present application also provides an electronic device, including: one or more processors; a storage device, on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors implement the client testing method described in any of the above embodiments.

[0104] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device 1300 suitable for implementing the embodiment of the present application. The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0105] like Figure 5 As shown, the electronic device 1300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage device 1306 into a random access memory (RAM) 1303. In the RAM 1303, various programs and data required for the operation of the electronic device 1300 are also stored. The processing device 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0106] Typically, the following devices may be connected to the I / O interface 1305: an input device 1306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1306 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1309. The communication device 1309 may allow the electronic device 1300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 1300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0107] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1309, or installed from the storage device 1306, or installed from the ROM 1302. When the computer program is executed by the processing device 1301, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0108] The electronic device provided in the embodiment of the present application and the client testing method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0109] Based on a client testing method provided by the above method embodiment, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the client testing method as described in any of the above embodiments.

[0110] It should be noted that the computer-readable medium in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In an embodiment of the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0111] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0112] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0113] The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device executes the client testing method.

[0114] The computer program code for performing the operation of the embodiment of the present application can be written in one or more programming languages ​​or a combination thereof, and the above-mentioned programming languages ​​include but are not limited to object-oriented programming languages-such as Java, Smalltalk, C++, and also include conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network-including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0115] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] The units involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the unit / module does not, in some cases, constitute a limitation on the unit itself.

[0117] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0118] In the context of the present application embodiment, machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include but is not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0119] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0120] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0121] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0122] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0123] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A client testing method, characterized in that: The method comprises: In response to a client test instruction, a test case and a startup parameter corresponding to the test case are obtained through the client test instruction, the test case and the startup parameter have a predetermined corresponding relationship, the test case is used to test a target function of the client, and the startup parameter includes a main running environment parameter; Reading the main operating environment parameters, and setting the main operating environment of the client to the main operating environment corresponding to the main operating environment parameters; Performing service initialization settings of the client and starting the client; The test case is executed to test the target function of the client and obtain the test result of the target function of the client.

2. The method according to claim 1, characterized in that The startup parameters also include client pre-operation parameters. After starting the client, executing the test case to test the target function of the client, and before obtaining the test result of the target function of the client, the method further includes: The client pre-operation parameters are read, and a pre-operation corresponding to the client pre-operation parameters is performed.

3. The method according to claim 1, characterized in that: The startup parameters also include local experiment configuration information, and the method further includes: The local experiment configuration information is read, and initialization configuration of the AB experiment is performed based on the local experiment configuration information.

4. The method according to claim 1, characterized in that: When the main operating environment parameter is an offline environment or a pre-release environment, the startup parameter further includes a lane environment parameter; and the reading of the main operating environment parameter and setting the main operating environment of the client to the main operating environment corresponding to the main operating environment parameter includes: When the main operating environment parameter is an online environment, setting the main operating environment of the client to an online environment; When the main operating environment parameter is an offline environment or a pre-release environment, the target lane environment is determined according to the lane environment parameter, and the main operating environment of the client is set to the target lane environment of the offline environment or the pre-release environment.

5. The method according to claim 3, characterized in that: The local experiment configuration information includes an AB experiment identifier and an AB experiment hit group identifier, and the reading of the local experiment configuration information and performing initialization configuration of the AB experiment based on the local experiment configuration information includes: Read and save the AB experiment identifier and the AB experiment hit group identifier; The executing the test case to test the target function of the client and obtain the test result of the target function of the client includes: The test case is executed, the target function of the client is tested corresponding to the AB experiment identifier and the target experiment group corresponding to the AB experiment hit group identifier is hit, so as to obtain the test result of the target function of the client.

6. The method according to claim 2, characterized in that The client pre-operation parameters include login information; The reading of the client pre-operation parameter and performing a pre-operation corresponding to the client pre-operation parameter includes: The login information is read, and a login operation is performed based on the login information.

7. The method according to claim 2, characterized in that The client pre-operation parameter includes jump link information; the reading the client pre-operation parameter and performing a pre-operation corresponding to the client pre-operation parameter includes: Read the jump link information and jump to the page corresponding to the jump link information.

8. The method according to claim 2, characterized in that: The client pre-operation parameters include target path information and simulation data corresponding to the target path information; the reading of the client pre-operation parameters and performing the pre-operation corresponding to the client pre-operation parameters includes: Reading and saving the target path information and simulation data corresponding to the target path information; The executing the test case to test the target function of the client and obtain the test result of the target function of the client includes: When executing the test case triggers the target path corresponding to the target path information, the simulation data corresponding to the target path information is obtained, and the target function of the client is tested using the simulation data corresponding to the target path information to obtain the test result of the target function of the client.

9. A client testing device, characterized in that: The device comprises: an acquisition unit, configured to respond to a client test instruction and acquire a test case and a startup parameter corresponding to the test case through the client test instruction, wherein the test case and the startup parameter have a predetermined corresponding relationship, the test case is used to test a target function of the client, and the startup parameter includes a main running environment parameter; A first setting unit, configured to read the main operating environment parameters and set the main operating environment of the client to the main operating environment corresponding to the main operating environment parameters; A second setting unit, used to perform service initialization settings of the client and start the client; The testing unit is used to execute the test case, test the target function of the client, and obtain the test result of the target function of the client.

10. A client testing device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the client testing method according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the client testing method according to any one of claims 1 to 8.