Testing method and testing device

By determining the target test subject in the server and the client, and sending the test tasks to the client for execution, the problems of high test server load and low parallelism in the existing technology are solved, and the testing efficiency is improved.

CN118549154APending Publication Date: 2024-08-27AVATR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410706802.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing browser-based vehicle testing solutions put greater load pressure on the test server during testing, limiting the degree of parallelism of test cases, resulting in low testing efficiency.

Method used

By determining the target test subject for executing the tasks to be tested in the server and the client, tasks originally performed by the server are sent to the client for execution, thereby making full use of the client's processing capabilities, reducing the server load and improving the parallelism of test cases. degree.

Benefits of technology

It effectively reduces the load pressure on the server, improves the parallelism and testing efficiency of test cases, and achieves a more efficient testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118549154A
    Figure CN118549154A
Patent Text Reader

Abstract

The invention discloses a test method and a test device.The test method is applied to a server and comprises the steps that a test request from a client is received; the test request is determined based on a to-be-tested case; based on the test request, determining a to-be-tested task corresponding to the to-be-tested case; based on the to-be-tested task and a task under test in the server, determining a target test subject for executing the to-be-tested task in the server and the client; and under the condition that the target test main body is the client, issuing the to-be-tested task to the client, so that the client executes the to-be-tested task, and determining a test result of the to-be-tested case. According to the scheme, the load pressure of the server can be relieved, the parallelism degree of the test cases can be improved, and then the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and relates to but is not limited to a testing method and a testing device. Background Art

[0002] With the development of vehicle technology, vehicle equipment is becoming more and more intelligent and sophisticated, and its functions are becoming more and more diverse. This requires various tests on vehicle equipment to ensure its good performance.

[0003] In existing browser-based vehicle testing solutions, when testing a test case, the client is usually responsible for submitting the test request, and the test server is responsible for executing the computing tasks corresponding to the test request and returning the test results. This will bring a large load pressure to the test server, and at the same time, it will also limit the parallel degree of the test case, resulting in low test efficiency. Summary of the invention

[0004] The present application provides a testing method, a testing device, an electronic device, a storage medium and a computer program product, which can not only reduce the load pressure of the server, but also improve the parallelism of test cases, thereby improving the testing efficiency.

[0005] The technical solution of this application is implemented as follows:

[0006] In a first aspect, the present application provides a testing method, which is applied to a server and includes:

[0007] Receiving a test request from a client; the test request is determined based on a case to be tested;

[0008] Based on the test request, determining a task to be tested corresponding to the case to be tested;

[0009] Based on the task to be tested and the task under test in the server, determining a target test subject for executing the task to be tested in the server and the client;

[0010] In the case where the target test subject is the client, the task to be tested is sent to the client so that the client executes the task to be tested and determines the test result of the case to be tested.

[0011] In a second aspect, the present application provides another testing method, which is applied to a client and includes:

[0012] Sending a test request to a server, so that the server determines a task to be tested corresponding to the case to be tested based on the test request;

[0013] Receiving the task to be tested issued by the server;

[0014] Execute the task to be tested and obtain the execution result;

[0015] A test result of the test case is determined based at least on the execution result.

[0016] In a third aspect, the present application provides a testing device, which is deployed on a server and includes:

[0017] A first receiving unit, configured to receive a test request from a client; the test request is determined based on a case to be tested;

[0018] A first determining unit is configured to determine, based on the test request, a task to be tested corresponding to the case to be tested; based on the task to be tested and the test task in the server, determine a target test subject in the server and the client for executing the task to be tested;

[0019] The first sending unit is used to send the task to be tested to the client when the target test subject is the client, so that the client executes the task to be tested and determines the test result of the case to be tested.

[0020] In a fourth aspect, the present application provides another testing device, which is deployed on a client and includes:

[0021] A second sending unit, configured to send a test request to a server, so that the server determines a task to be tested corresponding to the case to be tested based on the test request;

[0022] A second receiving unit, configured to receive the task to be tested sent by the server;

[0023] An execution unit, used for executing the task to be tested and obtaining an execution result;

[0024] The second determining unit is used to determine the test result of the test case at least based on the execution result.

[0025] In a fifth aspect, the present application further provides a test system, the test system comprising a server and a client, wherein:

[0026] The client is used to: send a test request to the server, so that the server determines the task to be tested corresponding to the case to be tested based on the test request;

[0027] The server is used to: receive a test request from a client; the test request is determined based on a case to be tested; based on the test request, determine a task to be tested corresponding to the case to be tested; based on the task to be tested and the test task in the server, determine a target test subject in the server and the client for executing the task to be tested; when the target test subject is the client, send the task to be tested to the client so that the client executes the task to be tested and determines a test result of the case to be tested;

[0028] The client is also used to: receive the task to be tested sent by the server; execute the task to be tested to obtain an execution result; and determine the test result of the case to be tested at least based on the execution result.

[0029] In a sixth aspect, the present application further provides an electronic device comprising at least a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements any one of the above-mentioned testing methods when executing the program.

[0030] In a seventh aspect, the present application further provides a storage medium having a computer program stored thereon, and when the computer program on the storage medium is executed, any one of the above-mentioned testing methods is implemented.

[0031] In an eighth aspect, the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements any of the above-mentioned testing methods.

[0032] The present application provides a testing method, a testing device, an electronic device, a storage medium and a computer program product. The testing method is applied to a server, and the testing method includes: receiving a test request from a client; the test request is determined based on a case to be tested; based on the test request, determining a task to be tested corresponding to the case to be tested; based on the task to be tested and the test task in the server, determining a target test subject for executing the task to be tested in the server and the client; when the target test subject is the client, sending the task to be tested to the client so that the client executes the task to be tested and determines the test result of the case to be tested.

[0033] In the scheme of the present application, by determining the target test subject for executing the task to be tested in the server and the client based on the task to be tested and the task to be tested, the task to be tested can be sent to the client when the target test subject is the client, and the client executes the task to be tested and determines the test result of the test case. It can be seen that the scheme of the present application takes into account that the processing power of the client is not effectively utilized in the existing test scheme. By determining the target test subject for executing the task to be tested in the server and the client, the task to be tested originally executed by the server can be sent to the client for execution, so as to effectively utilize the processing power of the client. In this way, not only can the load pressure of the server be reduced, but also the parallel degree of the test case can be improved, thereby improving the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A first optional flow chart of the test method provided in the embodiment of the present application;

[0035] Figure 2 A second optional flow chart of the test method provided in the embodiment of the present application;

[0036] Figure 3 A third optional flow chart of the test method provided in the embodiment of the present application;

[0037] Figure 4 A fourth optional flow chart of the test method provided in the embodiment of the present application;

[0038] Figure 5 A fifth optional flow chart of the test method provided in the embodiment of the present application;

[0039] Figure 6 A sixth optional flow chart of the test method provided in the embodiment of the present application;

[0040] Figure 7 A seventh optional flow chart of the test method provided in the embodiment of the present application;

[0041] Figure 8 An eighth optional flow chart of the test method provided in the embodiment of the present application;

[0042] Fig. 9 A ninth optional flow chart of the test method provided in the embodiment of the present application;

[0043] Fig.10 An optional schematic diagram of the data flow of the test method provided in the embodiment of the present application;

[0044] Fig.11A schematic diagram of a first optional structure of a testing device provided in an embodiment of the present application;

[0045] Fig.12 A second optional structural diagram of the testing device provided in the embodiment of the present application;

[0046] Fig.13 An optional structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.

[0048] In the following description, reference is made to “some embodiments,” which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0049] In the following description, the terms "first\second\third" are used only as examples to distinguish different objects, and do not represent a specific order for the objects, nor do they have a limitation on the order of precedence. It is understandable that "first\second\third" can be interchanged with a specific order or order of precedence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0051] The embodiments of the present application provide a test method, a test device, an electronic device, a storage medium, and a computer program product. In practical applications, the test method can be implemented by the test device, and each functional entity in the test device can be collaboratively implemented by hardware resources of the electronic device, such as computing resources such as a processor, and communication resources (such as for supporting various communication methods such as optical cables and cellular).

[0052] Below, various embodiments of the test method, test device, electronic device, storage medium and computer program product provided in the embodiments of the present application are described.

[0053] In the first aspect, the embodiment of the present application provides a testing method. The function implemented by the method can be implemented by calling a program code by a processor in an electronic device (such as a controller), and of course the program code can be stored in a computer storage medium. It can be seen that the electronic device at least includes a processor and a storage medium.

[0054] The method is applied to a server.

[0055] The server may be any server for executing a test task. The specific type of the server is not limited in the present embodiment and can be set according to actual conditions.

[0056] Below, taking the server as the execution subject as an example, the testing method provided in the embodiment of the present application is explained.

[0057] Figure 1 A flow chart of the test method provided in the embodiment of the present application is as follows: Figure 1 As shown, the process may include but is not limited to the following S101 to S104.

[0058] S101. The server receives a test request from a client.

[0059] The test request is determined based on the case to be tested.

[0060] The client can be any client for submitting a test request. The specific type and number of the client are not limited in the present embodiment of the application and can be set according to actual conditions.

[0061] The test cases to be tested refer to the test cases waiting to be tested. The specific content and quantity of the test cases to be tested are not limited in the present embodiment of the application and can be set according to the actual situation.

[0062] A test request is an instruction sent by a client to request a server to test a test case. The specific content of the test request is not limited in the embodiment of the present application, and can be set according to actual conditions. Exemplarily, in addition to carrying request information for executing the test, the test request also carries a case identification of the case to be tested.

[0063] In practice, the specific content of the test request will vary depending on the protocol and will not be listed here one by one.

[0064] Exemplarily, the client may use a relevant protocol to generate a test request based on the test case to be tested and send the test request to the server. Correspondingly, S101 may be implemented as follows: the server receives the test request from the client through a receiving module.

[0065] The embodiment of the present application adopts relevant protocols on the client, and does not limit the specific method of generating test requests based on the test case to be tested, which can be set according to actual conditions.

[0066] S102: The server determines a task to be tested corresponding to the case to be tested based on the test request.

[0067] The task to be tested refers to the test task corresponding to the case to be tested. The specific content and quantity of the task to be tested are not limited in the embodiment of the present application, and can be set according to the actual situation. Exemplarily, the task to be tested may include a page to be tested that needs to be rendered in the browser of the client waiting for the test to be carried out, and a code to be executed for executing the test steps of the case to be tested.

[0068] Exemplarily, the server pre-stores a correspondence between test cases and test tasks. Correspondingly, S102 can be implemented as follows: the server parses the test request through a parsing module to obtain a test case to be tested; searches for the test case to be tested in the above correspondence, and determines the test task corresponding to the test case to be tested as the test task to be tested.

[0069] The embodiment of the present application does not limit the specific determination method of the correspondence between the test case and the test task, and can be set according to the actual situation. Exemplarily, the correspondence can be obtained based on human experience or a specific algorithm or model.

[0070] For example, the use case writer can upload and submit at least one test case in advance, and the server can: receive and traverse at least one test case; for each test case, determine the use case identifier of the test case and the test task corresponding to the test case, establish a correspondence between the use case identifier and the test task, and obtain a correspondence; after the traversal is completed, obtain at least one correspondence.

[0071] S103: The server determines a target test subject for executing the task to be tested in the server and the client based on the task to be tested and the task under test in the server.

[0072] The test task refers to the test task in the server that is in the testing state. The embodiment of the present application does not limit the specific type and number of the test task, which can be set according to the actual situation.

[0073] It can be understood that the test task refers to the test task corresponding to the test case.

[0074] The target test subject refers to the execution subject used to execute the task to be tested.

[0075] Exemplarily, S103 may be implemented as follows: the server determines a target test subject for executing the task to be tested in the server and the client based on the object to be tested of the task to be tested and the object under test of the task under test.

[0076] In practice, when the object to be tested of the task to be tested and the object under test of the task under test are the same, there may be a conflict between the task to be tested and the task under test, and they cannot be executed on the same device at the same time. Therefore, the task to be tested and the task under test can be configured to be executed on different devices to avoid the conflict.

[0077] S104: When the target test subject is the client, the server sends the task to be tested to the client, so that the client executes the task to be tested and determines the test result of the case to be tested.

[0078] Exemplarily, S104 can be implemented as follows: when the target test subject is the client, the server sends the task to be tested to the client through the sending module; the client receives the task to be tested through the receiving module; the client executes the task to be tested and obtains the execution result; the client determines the test result of the case to be tested at least based on the execution result.

[0079] An embodiment of the present application provides a testing method, which is applied to a server, and includes: receiving a test request from a client; the test request is determined based on a case to be tested; based on the test request, determining a task to be tested corresponding to the case to be tested; based on the task to be tested and the test task in the server, determining a target test subject for executing the task to be tested in the server and the client; when the target test subject is the client, sending the task to be tested to the client so that the client executes the task to be tested and determines a test result of the case to be tested.

[0080] In the scheme of the present application, by determining the target test subject for executing the task to be tested in the server and the client based on the task to be tested and the task to be tested, the task to be tested can be sent to the client when the target test subject is the client, and the client executes the task to be tested and determines the test result of the test case. It can be seen that the scheme of the present application takes into account that the processing power of the client is not effectively utilized in the existing test scheme. By determining the target test subject for executing the task to be tested in the server and the client, the task to be tested originally executed by the server can be sent to the client for execution, so as to effectively utilize the processing power of the client. In this way, not only can the load pressure of the server be reduced, but also the parallel degree of the test case can be improved, thereby improving the test efficiency.

[0081] The following describes a process in S103 where the server determines a target test subject for executing the task to be tested in the server and the client based on the task to be tested and the task under test in the server.

[0082] refer to Figure 2 As shown in the content, the process may include but is not limited to the following S201 to S204.

[0083] S201: The server obtains a testing task in the server that is in a testing state.

[0084] Exemplarily, a task list for recording various tasks and task statuses is pre-stored in the server. Correspondingly, S201 may be implemented as follows: the server obtains the task list; and determines the tasks in the task list that are in the testing state as the testing tasks.

[0085] S202: The server determines a first test object of the task to be tested and a second test object of the task under test.

[0086] The test object refers to the object that is tested and evaluated as a target in the test task.

[0087] The first test object refers to the test object of the task to be tested.

[0088] The second test object refers to the test object in the test task.

[0089] The embodiment of the present application does not limit the specific types and quantities of the first test object and the second test object, which can be set according to actual conditions.

[0090] Exemplarily, S202 may be implemented as follows: the server determines a first test object of the task to be tested based on a function to be tested or a step to be tested in the task to be tested; and determines a second test object of the task to be tested based on a function to be tested or a step to be tested in the task to be tested.

[0091] For example, when the task to be tested is used to test the function of "turning on the air conditioner", the first test object may be "air conditioner"; when the task to be tested is used to test the function of "closing the car door", the first test object may be "car door"; when the test task is used to test the function of "setting the air conditioner temperature", the second test object may be "air conditioner"; when the test task is used to test the function of "switching the atmosphere light", the first test object may be "atmosphere light".

[0092] S203: When the first test object and the second test object are different, the server determines that the target test subject is the server.

[0093] Exemplarily, S203 may be implemented as follows: the server determines whether the first test object is the same as the second test object; if the first test object is different from the second test object, determining that the target test subject is the server.

[0094] For example, when the task to be tested is used to test "setting the air conditioner temperature" and the task to be tested is used to test "closing the car door", since the first test object of the task to be tested is "air conditioner" and the second test object of the task to be tested is "car door", there is no conflict between the task to be tested and the task under test, and they can be executed on the same device at the same time. In this case, the task to be tested can be configured to be executed on the server, and the server executes the task under test and the task to be tested in parallel.

[0095] S204: When the first test object is the same as the second test object, determine that the target test subject is the client.

[0096] Exemplarily, S203 may be implemented as follows: the server determines whether the first test object is the same as the second test object; if the first test object is the same as the second test object, determining that the target test subject is the client.

[0097] For example, when the task to be tested is used to test "turn on the air conditioner" and the task to be tested is used to test "turn off the air conditioner", since the first test object of the task to be tested and the second test object of the task to be tested are both "air conditioner", there is a conflict between the task to be tested and the task under test, and they cannot be executed on the same device at the same time. In this case, since the task under test has been executed on the server, the task to be tested can be configured to be executed on the client to avoid the conflict.

[0098] In simple terms, by determining the first test object of the task to be tested and the second test object of the task under test, it is possible to accurately determine whether there is a conflict between the task to be tested and the task under test, and then, if there is a conflict, the task to be tested and the task under test can be configured to be executed on different devices. In this way, not only can the conflict between the task to be tested and the task under test be avoided, but also the parallelism of the test cases can be improved, thereby improving the test efficiency, and the implementation scheme is simple and efficient.

[0099] The testing method provided in the embodiment of the present application may also include a process of determining a target test subject in the server and the client based on the current load condition of the server and the current load condition of the client.

[0100] refer to Figure 3 As shown in the content, the process may include but is not limited to the following S301 and S302.

[0101] S301. The server determines a current first load of the server and a current second load of the client.

[0102] The first load refers to the amount of tasks, data, or resource usage that the server is currently processing.

[0103] The second load refers to the amount of tasks, data, or resource usage that the client is currently processing.

[0104] The embodiment of the present application does not limit the specific types of the first load and the second load, which can be determined based on actual conditions.

[0105] Exemplarily, the server and the client both monitor at least one load indicator of themselves in real time through a monitoring tool in advance. Correspondingly, S301 can be implemented as follows: the server obtains and determines the current first load of the server based on at least one load indicator of itself; the client obtains and determines the current second load of the client based on at least one load indicator of itself, and sends it to the server.

[0106] The specific type and quantity of the load index are not limited in the present application embodiment and can be determined according to the actual situation. For example, the load index may include: central processing unit (CPU) usage, memory occupancy, network traffic, number of processes, response time, number of connections, access volume, etc.

[0107] For example, first, the server can use monitoring tools to monitor the server's CPU usage, memory occupancy, disk input / output I / O, etc.; use network traffic analysis tools to view the size of the network traffic in and out of the server; use process / thread statistics commands to view the number of processes / threads running on the server; use performance testing tools to perform performance testing on the server to determine response time, resource utilization, number of concurrent users, number of connections, transaction success rate, system stability, etc. Secondly, the server uses a specific algorithm or a specific model to perform a comprehensive calculation (such as weighted average) on the above load indicators to obtain the server's current first load. Similarly, the client can also use this method to determine the client's current second load.

[0108] In practice, the current first load of the server and the current second load of the client may also be determined by other methods, which are not listed here one by one.

[0109] S302: The server determines the target test subject in the server and the client based at least on the first load and the second load.

[0110] In a possible implementation, S302 may be implemented as follows: the server determines the target test subject in the server and the client based on the relationship between the first load and the first threshold and the relationship between the second load and the second threshold.

[0111] In another possible implementation, S302 may be implemented as follows: the server determines the target test subject in the server and the client based on the relationship between the first load and the first threshold, the relationship between the second load and the second threshold, and the priority between the server and the client.

[0112] In practice, since the load condition of a device affects its processing capacity, if the load condition of a device is not ideal, it may cause the device to crash or its processing capacity to deteriorate. Therefore, load balancing of the device can be achieved by configuring the tasks to be tested and the tasks under test to be executed on different devices.

[0113] In simple terms, by determining the current first load of the server and the current second load of the client, the current processing capabilities of the server and the client can be accurately evaluated, and then when the current processing capabilities of the server and / or the client are insufficient, the tasks to be tested and the tasks under test can be configured to be executed on different devices. In this way, not only can the load balancing of the server and the client be achieved, but also the parallelism of the test cases can be improved, thereby improving the test efficiency, and the implementation plan is simple and efficient.

[0114] The following describes a process in which the server determines the target test subject in the server and the client based on at least the first load and the second load in S302.

[0115] The process may include the following method 1 and method 2.

[0116] Method 1: The server determines the target test subject in the server and the client based on the relationship between the first load and the first threshold and the relationship between the second load and the second threshold.

[0117] Method 2: The server determines the target test subject in the server and the client based on the relationship between the first load and the first threshold, the relationship between the second load and the second threshold, and the priority between the server and the client.

[0118] The following describes a process in which the server in the first mode determines the target test subject in the server and the client based on at least the first load and the second load.

[0119] refer to Figure 4 As shown in the content, the process may include but is not limited to the following S401 and S402.

[0120] S401. When the first load is greater than or equal to a first threshold and the second load is less than a second threshold, the server determines that the target test subject is the client.

[0121] The first threshold and the second threshold are used to assist in determining whether the target test subject is a server or a client. The embodiment of the present application does not limit the specific values ​​of the first threshold and the second threshold, which can be determined according to actual conditions.

[0122] It should be noted that the first threshold and the second threshold may be the same or different.

[0123] Exemplarily, S401 can be implemented as: the server determines the size relationship between the first load and the first threshold, and the size relationship between the second load and the second threshold; when the first load is greater than or equal to the first threshold and the second load is less than the second threshold, determines that the target test subject is the client.

[0124] S402: When the first load is less than the first threshold and the second load is greater than or equal to the second threshold, the server determines that the target test subject is the server.

[0125] Exemplarily, S402 can be implemented as: the server determines the size relationship between the first load and the first threshold, and the size relationship between the second load and the second threshold; when the first load is less than the first threshold and the second load is greater than or equal to the second threshold, determines that the target test subject is the server.

[0126] In simple terms, by determining the magnitude relationship between the first load and the first threshold, and the magnitude relationship between the second load and the second threshold, it is possible to determine target test subjects with different tasks to be tested according to the different current processing capabilities of the server and the client. The implementation scheme is simple and efficient.

[0127] Next, a process in which the server in the second mode determines the target test subject in the server and the client based on at least the first load and the second load is described.

[0128] refer to Figure 4 The process may include but is not limited to the following S403.

[0129] S403: When the first load is greater than or equal to the first threshold and the second load is greater than or equal to the second threshold, the server determines the target test subject in the server and the client based on the priority between the server and the client.

[0130] Exemplarily, the server pre-stores the priority between the server and the client. S403 can be implemented as follows: the server determines the size relationship between the first load and the first threshold, and the size relationship between the second load and the second threshold; when the first load is less than the first threshold, and the second load is greater than or equal to the second threshold, the priority between the server and the client is obtained; if the server has priority over the client, the target test subject is determined to be the server; if the client has priority over the server, the target test subject is determined to be the client.

[0131] The embodiment of the present application does not limit the specific method for determining the priority between the server and the client, and can be determined according to actual conditions. For example, the priority between the server and the client can be obtained based on human experience or a specific algorithm or model.

[0132] In simple terms, when the current processing capabilities of the server and the client are the same, by determining the priority between the server and the client, it is possible to determine the target test subjects with different tasks to be tested according to the priority. In this way, reasonable resource allocation of the server and the client can be achieved, and resource utilization can be improved.

[0133] Next, the testing method provided in the embodiment of the present application may also include an execution process in which the server executes the task to be tested.

[0134] In the case where the target test subject is the server, refer to Figure 5 As shown in the content, the process may include but is not limited to the following S501 and S502.

[0135] S501: If the first test object of the task to be tested is different from the second test object of the task to be tested, the server starts to execute the task to be tested.

[0136] Exemplarily, S501 can be implemented as follows: the server determines the first test object of the task to be tested and the second test object of the test task; determines whether the first test object is the same as the second test object, and if not, uses a task start tool or a task start command to trigger the start of the task to be tested.

[0137] For the specific manner in which the server determines the first test object of the task to be tested and the second test object of the task to be tested, reference may be made to the detailed description of S202 above, which will not be repeated here.

[0138] S502: If the first test object of the task to be tested is the same as the second test object of the task under test, the server starts to execute the task to be tested after the task under test is completed.

[0139] Exemplarily, S502 can be implemented as follows: the server determines the first test object of the task to be tested, and the second test object of the test task; determines whether the first test object is the same as the second test object, and if so, uses a task stop tool or a task stop command to trigger the stop of the task to be tested; waits until the test task is completed, and uses a task start tool or a task start command to trigger the start of the task to be tested.

[0140] It can be understood that there is no strict execution order between S501 and S502.

[0141] In simple terms, when the target test subject is a server, since both the task to be tested and the task under test need to be executed on the server, by determining the first test object of the task to be tested and the second test object of the task under test, it is possible to accurately determine whether there is a conflict between the task to be tested and the task under test, and then the task to be tested and the task under test can be configured to be executed serially if there is a conflict, and to be executed in parallel if there is no conflict. In this way, not only can the conflict between the task to be tested and the task under test be avoided, but also the parallel degree of the test case can be improved, thereby improving the test efficiency and achieving a flexible, efficient and reliable solution.

[0142] In the second aspect, the embodiment of the present application provides another testing method. The function implemented by the method can be implemented by calling program code by a processor in an electronic device (such as a controller), and of course the program code can be stored in a computer storage medium. It can be seen that the electronic device at least includes a processor and a storage medium.

[0143] The method is applied to a client.

[0144] The client can be any client for submitting a test request. The specific type and number of the client are not limited in the present embodiment of the application and can be set according to actual conditions.

[0145] Below, taking the client as the execution subject as an example, the testing method provided in the embodiment of the present application is explained.

[0146] Figure 6 Schematic diagram of the test method of the present application embodiment. Figure 6 As shown, the process may include but is not limited to the following S601 to S604.

[0147] S601: The client sends a test request to the server, so that the server determines a task to be tested corresponding to a case to be tested based on the test request.

[0148] Exemplarily, the server pre-stores a correspondence between test cases and test tasks. Correspondingly, S601 can be implemented as follows: the client sends a test request to the server through a sending module; the server receives the test request through a receiving module; the server parses the test request through a parsing module to obtain a test case to be tested; the test case to be tested is searched in the above correspondence, and the test task corresponding to the test case to be tested is determined as the test task to be tested.

[0149] S602: The client receives the task to be tested sent by the server.

[0150] Exemplarily, S602 may be implemented as follows: the client receives the task to be tested sent by the server through a receiving module.

[0151] S603: The client executes the task to be tested and obtains an execution result.

[0152] The execution result refers to the result obtained after the client completes the task to be tested. The specific content of the execution result is not limited in the embodiment of the present application, and can be determined according to the actual situation. For example, when the task to be tested is used to test the function of "turning on the air conditioner", the execution result may include execution success or execution failure; when the task to be tested is used to test the function of "searching for libraries on the map", the execution result may include the search results of the library.

[0153] Exemplarily, S603 may be implemented as follows: the client calls a hardware device or a related application to execute the task to be tested and obtains an execution result.

[0154] S604: The client determines a test result of the test case at least based on the execution result.

[0155] In a possible implementation, S604 may be implemented as follows: the client determines the test result of the test case based on the execution result.

[0156] For example, when the test case is used to test the function of "turning on the air conditioner" and the expected result is "successfully issuing the command to turn on the air conditioner", the client can determine whether the test result of the test case is passed or failed based on whether the execution result is successful or failed.

[0157] In another possible implementation, S604 may be implemented as follows: the client determines the test result of the test case based on the execution result and the data to be verified for verifying the execution result.

[0158] For example, when the test case is used to test the function of "setting the air conditioning temperature to 10 degrees Celsius" and the expected result is "the room temperature is maintained at 10 degrees Celsius", the client cannot determine whether the room temperature is maintained at 10 degrees Celsius based only on the execution result of success or failure. It is also necessary to obtain the data to be verified for verifying the execution result, such as the current room temperature, before determining whether the test result of the test case is a pass or fail.

[0159] In simple terms, considering that the existing test solutions do not effectively utilize the client's processing power, the client can receive and execute the test tasks sent by the server, so that the test tasks originally executed by the server can be executed by the client. In this way, by making full use of the client's processing power, not only can the server's load pressure be reduced, allowing the server to provide more other services, but also the degree of parallelism of test cases can be increased, thereby improving test efficiency.

[0160] Next, the process of the client executing the task to be tested and obtaining the execution result in S603 is described.

[0161] refer to Figure 7 As shown in the content, the process may include but is not limited to the following S701 to S703.

[0162] S701: When the task to be tested includes a page to be tested and a code to be executed, the client renders the page to be tested in the browser of the client.

[0163] The page to be tested refers to the page that needs to be rendered in the client's browser and is waiting to be tested.

[0164] The code to be executed refers to the code used to execute the test steps of the test case to be tested.

[0165] The specific content of the page to be tested and the code to be executed is not limited in the embodiment of the present application, and can be determined according to the actual situation. For example, when the task to be tested is used to test the function of "setting the air conditioner temperature", the page to be tested can be a simulated operation interface of the air conditioner; the code to be executed can be an automation code for realizing "clicking the air conditioner on button; clicking the air conditioner temperature setting button; entering the air conditioner temperature as 10 degrees Celsius".

[0166] Exemplarily, S701 may be implemented as follows: when the task to be tested includes a page to be tested and a code to be executed, the client calls a browser in the client; and loads and renders all page elements of the page to be tested through the browser.

[0167] 702. The client receives a test operation for the page to be tested.

[0168] The operation to be tested refers to the operation on the page to be tested that is waiting to start the test. The specific content of the operation to be tested is not limited in the embodiment of the present application, and can be determined according to actual conditions. For example, in the case where the page to be tested is a simulated operation interface of an air conditioner, the operation to be tested can be "clicking the air conditioner on button", "clicking the air conditioner temperature increase button", "clicking the air conditioner temperature decrease button", "clicking the air conditioner off button", etc.

[0169] Exemplarily, the automated testing engine or the user may issue the operation to be tested for the page to be tested, and S702 may be implemented as follows: the client captures the operation to be tested through a browser.

[0170] S703: Based on the operation to be tested, the client calls the first device to execute the code to be executed to obtain the execution result.

[0171] The first device refers to a device for executing the code to be executed corresponding to the operation to be tested. The specific type of the first device is not limited in the embodiment of the present application, and can be determined according to actual conditions. For example, the first device can be a simulated air conditioning device deployed on the client, or a real air conditioning device.

[0172] Exemplarily, S703 may be implemented as follows: the client determines the operation object of the operation to be tested as the first device; calls the first device to execute the code to be executed; and after the execution is completed, obtains the execution result.

[0173] In simple terms, the client can render the page to be tested in the browser by receiving the page to be tested and the code to be executed sent by the server, and based on the operation to be tested on the page to be tested, call the first device to execute the code to be executed and obtain the execution result. In this way, the execution process of the task to be tested by the client can be realized, and the execution process is simple and comprehensive, especially suitable for vehicle-related testing, and has a good effect.

[0174] Next, the process of determining the test result of the test case to be tested based on at least the execution result in S604 is described.

[0175] This process may include but is not limited to the following method three and method four.

[0176] Mode three: The client determines the test result of the test case based on the execution result.

[0177] Mode 4: The client determines the test result of the test case based on the execution result and the data to be verified for verifying the execution result.

[0178] Next, a process in which the client determines the test result of the test case to be tested based on at least the execution result in the third mode is described.

[0179] refer to Figure 8 As shown in the content, the process may include but is not limited to the following S801 and S802.

[0180] S801. When the execution result is successful, the client determines that the test result of the test case is passed.

[0181] Exemplarily, S801 may be implemented as follows: the client determines whether the execution result is successful, and if so, determines that the test result of the test case is passed.

[0182] S802: When the execution result is execution failure, the client determines that the test result of the test case is test failure.

[0183] Exemplarily, S802 may be implemented as follows: the client determines whether the execution result is successful, and if not, determines that the test result of the test case is a test failure.

[0184] For example, when the test case is used to test the function of "turning on the air conditioner" and the expected result is "successfully issuing the command to turn on the air conditioner", when the execution result of the task to be tested is successful execution, it means that the command to turn on the air conditioner has been successfully issued. At this time, the client can determine that the test result of the test case is passed; when the execution result of the task to be tested is failed execution, it means that the command to turn on the air conditioner has not been successfully issued. At this time, the client can determine that the test result of the test case is failed.

[0185] In simple terms, the client directly determines the test results of the test case based on the execution results of the task to be tested. It is simple and efficient to implement and can be applied in application scenarios where the relevant processing logic needs to be tested but the hardware device does not need to be tested. For example, it can be applied in application scenarios where the relevant processing logic of the air conditioner opening instruction needs to be tested but there is no need to test whether the air conditioner is turned on.

[0186] Next, a process in which the client determines the test result of the test case to be tested based on at least the execution result in the fourth mode is described.

[0187] refer to Fig. 9 As shown in the content, the process may include but is not limited to the following S901 to S903.

[0188] S901: The client determines a target request for obtaining data to be verified.

[0189] The data to be verified is used to verify the execution result.

[0190] The specific content and quantity of the data to be verified are not limited in the embodiments of the present application and can be determined according to actual conditions. For example, when the test case is used to test the function of "setting the air conditioning temperature to 10 degrees Celsius" and the expected result is "keeping the room temperature at 10 degrees Celsius", the data to be verified can be "room temperature".

[0191] The target request refers to a request for obtaining the data to be verified. The specific content of the target request is not limited in the embodiment of the present application and can be determined according to the actual situation. Exemplarily, in addition to carrying the request information for obtaining information, the target request also carries the relevant information of the data to be verified.

[0192] Exemplarily, S901 may be implemented as follows: the client determines the data to be verified based on the expected result of the test case to be tested; and generates a target request based on the data to be verified using a relevant protocol.

[0193] S902: The client sends the target request to the server, so that the server responds to the target request and calls the second device to determine the data to be verified.

[0194] The second device refers to a device that obtains the data to be verified. The specific type of the second device is not limited in the present embodiment and can be determined according to actual conditions.

[0195] Exemplarily, S902 may be implemented as follows: the client sends the target request to the server through a sending module; the server determines the second device to be called based on the target request; and the server responds to the target request by calling the second device to obtain the data to be verified.

[0196] For example, when the data to be verified may be "room temperature", the server may call a temperature sensor to obtain room temperature parameters.

[0197] S903: The client determines the test result of the test case based on the execution result and the data to be verified.

[0198] Exemplarily, S903 may be implemented as follows: the client determines whether the execution result matches the data to be verified; if so, determines that the test result of the test case to be tested is a passed test; if not, determines that the test result of the test case to be tested is a failed test.

[0199] For example, when the test case is used to test the function of "setting the air conditioning temperature to 10 degrees Celsius" and the expected result is "the room temperature is maintained at 10 degrees Celsius", when the execution result is "successfully setting the air conditioning temperature to 10 degrees Celsius" and the data to be verified is "the room temperature is maintained at 10 degrees Celsius", it can be determined that the two match, and the test result of the test case is passed; when the execution result is "successfully setting the air conditioning temperature to 10 degrees Celsius" and the data to be verified is "the room temperature is maintained at 15 degrees Celsius", it can be determined that the two do not match, and the test result of the test case is failed.

[0200] In simple terms, compared to the server, the client has more limited functions and fewer docking devices, and may not be able to directly obtain the data to be verified. The client can send a target request to the server to obtain the data to be verified, so that the server can complete the acquisition of the data to be verified. In this way, through the cooperation of the server and the client, the test process of the test case can be completed. It has the characteristics of comprehensive and complete implementation, and can be applied in application scenarios that need to test related processing logic and need to test hardware equipment. For example, it can be applied in application scenarios that need to test the related processing logic of setting the air conditioner temperature and need to test whether the air conditioner equipment is working properly.

[0201] Below, the testing method provided in the embodiments of the present application is described through a complete example.

[0202] When traditional car companies test software and system functions, they need to directly connect the test server and hardware, and then write test plans based on the specific test content. The test process data is simple and can only be used for simple smoke tests and unit tests. The whole process is time-consuming. In addition, when adding test plans to the test framework, they are often restricted by the framework, which also limits the degree of parallel testing. If the same port is used, conflicts may even occur.

[0203] In order to solve the above problems, this embodiment of the present application provides a QT-based web-based vehicle testing framework, which can decouple test cases and test frameworks, and can distribute computing tasks and pressure to each page-side processing, reduce the pressure of deploying test servers, and decouple different test tasks, thereby achieving the purpose of testing.

[0204] The core content of the vehicle testing framework includes: considering the drawbacks of the traditional vehicle testing architecture, namely the monolithic structure, starting from the test plan, service architecture, and test end, constructing an overall test architecture framework, decoupling different business parts, and focusing on the content that it focuses on, so that all parties in the test framework can avoid introducing additional, overly complex dependencies.

[0205] The core principles of the vehicle testing framework include:

[0206] 1. The test service framework provides as few external dependencies as possible, so that each tester and program writer does not affect each other, the dependence on hardware is minimal, and the framework is stable. Each component needs to be connected to the framework using the Transmission Control Protocol (TCP) + routing address.

[0207] 2. Test plan writers focus on the design and processing of test cases. The intermediate communication process only focuses on whether the communication can be correct and timely. Deployment and adjustment are not sensitive to test plans (except for the plan to test network communication). Back-end personnel usually do not know much about front-end development or have a vague understanding of it. Using QT, a framework with low back-end learning cost, can greatly increase development efficiency and do more logical processing. Using third-party tools to compile QT into a front-end language, you can directly use the client's browser to access the processing method of the test plan.

[0208] 3. Specific testers need to have a simple understanding of the deployment and configuration of the service framework. For example, on the framework side, only the routing and framework access need to be configured, and other constraints are specified by the product, such as the use of ports and files. Testers can compare and verify the processing verification solutions provided in Core Principle 2 for specific test cases, and obtain test results for the production project, which is also the focus of the test.

[0209] Next, the logical flow of testing based on the vehicle testing framework is described.

[0210] First, the framework provider needs to complete the development of the test server function, provide proxy classes for testers and solution providers, and only provide an upload interface. The proxy class can provide routing to port conversion, such as nginx, etc., and is not limited to specific software. Secondly, the solution provider needs to make test cases and effect feedback based on the actual content of the product, such as fixed value smoke testing or runtime data detection. Finally, the tester configures the specific business port and route according to the submitted test plan, and views the running results and test content on the browser.

[0211] See also Fig.10 , the data flow process is as follows Fig.10 As shown in the numbers.

[0212] Label (0): When the solution is submitted, the web page content and logic processing of the browser are generated and will not be changed after submission. The solution here has a business name.

[0213] Label (1): The data generated by the business is sent from the port to the proxy class router.

[0214] Label (2): The proxy class encapsulates data to the test server according to the routing configuration.

[0215] Label (3): The test server records the routing table of the solution. Here, there are business names and routing information. A corresponding relationship can be created. The business name can also be replaced by other characteristic information. Here, only the business name is used as an illustration and sent to the proxy class according to the routing table.

[0216] Label (4): The proxy class forwards the data to the browser without processing. The browser processes and verifies the data and displays the processing results on the web page. When returning a message, the reverse steps are followed, via label (3) -> label (2) -> label (1). The business end then receives the specific return result.

[0217] It is not difficult to see that the above steps are more flexible than traditional testing methods. The business end can be operated at runtime to perform real-time adjustments, which can also reduce the number of adjustment steps for product developers each time.

[0218] The beneficial effects of the vehicle testing framework provided by the embodiment of the present application include: a) the participants of the testing framework can be relatively independent of each other and achieve the testing purpose with minimal self-reliance; b) the testing scheme can be used independently or as a whole set of schemes. If the vehicle model needs to be adjusted to add or delete functional items, the testing scheme is still valid; c) the testing scheme processing end and display end are executed by the client, which reduces the overall load of the testing server. The testing server can provide more testing pressure and results, and fully utilizes the processing power of multiple terminals; d) the testing framework and testing method can be used for multiple other projects with similar characteristics. The above conclusions are all capabilities that other current testing schemes do not have or are weaker in.

[0219] In a third aspect, the present application provides a testing device, such as Fig.11 As shown, the test device 110 includes: a first receiving unit 1101, a first determining unit 1102, and a first sending unit 1103. Among them:

[0220] The first receiving unit 1101 is used to receive a test request from a client; the test request is determined based on a case to be tested;

[0221] The first determining unit 1102 is used to determine, based on the test request, a task to be tested corresponding to the case to be tested; based on the task to be tested and the test task in the server, determine a target test subject in the server and the client for executing the task to be tested;

[0222] The first sending unit 1103 is used for sending the task to be tested to the client when the target test subject is the client, so that the client executes the task to be tested and determines the test result of the case to be tested.

[0223] In some embodiments, the first determination unit 1102 is specifically used to: obtain the under-test task in the server that is in a testing state; determine the first test object of the task to be tested, and the second test object of the under-test task; when the first test object is different from the second test object, determine that the target test subject is the server; when the first test object is the same as the second test object, determine that the target test subject is the client.

[0224] In some embodiments, the first determination unit 1102 is further used to: determine a current first load of the server and a current second load of the client; and determine the target test subject in the server and the client based at least on the first load and the second load.

[0225] In some embodiments, the first determination unit 1102 is also used to: when the first load is greater than or equal to a first threshold and the second load is less than a second threshold, determine the target test subject as the client; when the first load is less than the first threshold and the second load is greater than or equal to the second threshold, determine the target test subject as the server; when the first load is greater than or equal to the first threshold and the second load is greater than or equal to the second threshold, determine the target test subject among the server and the client based on the priority between the server and the client.

[0226] In some embodiments, the test device 110 further includes a first execution unit. The first execution unit is used to: when the target test subject is the server, obtain the under-test task in the server that is in the testing state; determine the first test object of the task to be tested and the second test object of the under-test task; when the first test object is different from the second test object, start executing the task to be tested; when the first test object is the same as the second test object, wait until the under-test task is completed before starting to execute the task to be tested.

[0227] In a fourth aspect, the present application provides another testing device, such as Fig.12 As shown, the testing device 120 includes: a second sending unit 1201, a second receiving unit 1202, an execution unit 1203, and a second determination unit 1204. Among them:

[0228] The second sending unit 1201 is used to send a test request to the server, so that the server determines a task to be tested corresponding to the case to be tested based on the test request;

[0229] The second receiving unit 1202 is used to receive the task to be tested sent by the server;

[0230] The execution unit 1203 is used to execute the task to be tested and obtain an execution result;

[0231] The second determining unit 1204 is configured to determine a test result of the test case at least based on the execution result.

[0232] In some embodiments, the execution unit 1203 is specifically used to: when the task to be tested includes a page to be tested and a code to be executed, render the page to be tested in the browser of the client; receive a test operation for the page to be tested; and based on the operation to be tested, call the first device to execute the code to be executed to obtain the execution result.

[0233] In some embodiments, the second determination unit 1204 is specifically used to: when the execution result is successful execution, determine that the test result of the test case to be tested is a passed test; when the execution result is a failed execution, determine that the test result of the test case to be tested is a failed test; or, determine a target request for obtaining data to be verified; the data to be verified is used to verify the execution result; send the target request to the server, so that the server responds to the target request and calls the second device to determine the data to be verified; determine the test result of the test case to be tested based on the execution result and the data to be verified.

[0234] It should be noted that the various units included in the test device provided in the embodiment of the present application can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Micro Processor Unit), a digital signal processor (DSP, Digital Signal Processor) or a field programmable gate array (FPGA, Field-Programmable Gate Array), etc.

[0235] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0236] In a fifth aspect, the present application further provides a test system, the test system comprising a server and a client, wherein:

[0237] The client is used to: send a test request to the server, so that the server determines the task to be tested corresponding to the case to be tested based on the test request;

[0238] The server is used to: receive a test request from a client; the test request is determined based on a case to be tested; based on the test request, determine a task to be tested corresponding to the case to be tested; based on the task to be tested and the test task in the server, determine a target test subject in the server and the client for executing the task to be tested; when the target test subject is the client, send the task to be tested to the client so that the client executes the task to be tested and determines a test result of the case to be tested;

[0239] The client is also used to: receive the task to be tested sent by the server; execute the task to be tested to obtain an execution result; and determine the test result of the case to be tested at least based on the execution result.

[0240] In a sixth aspect, an embodiment of the present application further provides an electronic device comprising at least a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements any one of the above-mentioned testing methods when executing the program.

[0241] Combine the following Fig.13 The electronic device 130 shown is used to illustrate a structural diagram of the electronic device.

[0242] In one example, if Fig.13 As shown, the electronic device 130 includes: a processor 1301, at least one communication bus 1302, at least one external communication interface 1303 and a memory 1304. The communication bus 1302 is configured to realize the connection and communication between these components. The external communication interface 1303 may include a standard wired interface and a wireless interface.

[0243] The memory 1304 is configured to store instructions and applications executable by the processor 1301, and can also cache data to be processed or processed by the processor 1301 and various modules in the electronic device (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).

[0244] In a seventh aspect, an embodiment of the present application further provides a storage medium, on which a computer program is stored. When the computer program on the storage medium is executed, any one of the above-mentioned test methods is implemented.

[0245] In an eighth aspect, the present application also provides, in an embodiment, a computer program product, including a computer program or instructions, which, when executed by a processor, implements any of the above-mentioned testing methods.

[0246] It should be noted that in the embodiment of the present application, if the above-mentioned test method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0247] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0248] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0249] It should be noted that, in this article, the terms "comprises," "includes" or any other variations 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 includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0250] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0251] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0252] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0253] A person skilled in the art can understand that all or part of the steps of the above method embodiment can be completed by hardware related to program instructions, and the above program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the above storage medium includes: a mobile storage device, a read-only memory (ROM), a magnetic disk or an optical disk, and other media that can store program codes.

[0254] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0255] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A testing method, It is characterized in that The testing method is applied to a server, and the testing method comprises: Receiving a test request from a client; the test request is determined based on a case to be tested; Based on the test request, determining a task to be tested corresponding to the case to be tested; Based on the task to be tested and the task under test in the server, determining a target test subject for executing the task to be tested in the server and the client; In the case where the target test subject is the client, the task to be tested is sent to the client so that the client executes the task to be tested and determines the test result of the case to be tested.

2. The test method according to claim 1, It is characterized in that The step of determining a target test subject for executing the task to be tested in the server and the client based on the task to be tested and the task under test in the server includes: Obtaining the testing tasks in the server that are in a testing state; Determine a first test object of the task to be tested, and a second test object of the task to be tested; In a case where the first test object is different from the second test object, determining that the target test subject is the server; In the case that the first test object is the same as the second test object, the target test subject is determined to be the client.

3. The testing method according to claim 1, It is characterized in that The method further comprises: Determining a current first load of the server and a current second load of the client; The target test subject is determined in the server and the client based on at least the first load and the second load.

4. The test method according to claim 3, It is characterized in that The step of determining the target test subject in the server and the client based at least on the first load and the second load includes: When the first load is greater than or equal to a first threshold and the second load is less than a second threshold, determining that the target test subject is the client; When the first load is less than the first threshold value and the second load is greater than or equal to the second threshold value, determining that the target test subject is the server; When the first load is greater than or equal to the first threshold and the second load is greater than or equal to the second threshold, the target test subject is determined in the server and the client based on a priority between the server and the client.

5. The testing method according to claim 1, It is characterized in that In the case where the target test subject is the server, the testing method further includes: If the first test object of the task to be tested is different from the second test object of the task to be tested, starting to execute the task to be tested; If the first test object of the task to be tested is the same as the second test object of the task under test, the task to be tested starts to be executed after the task under test is completed.

6. A testing method, It is characterized in that The test method is applied to the client, and the test method includes: Sending a test request to a server, so that the server determines a task to be tested corresponding to the case to be tested based on the test request; Receiving the task to be tested issued by the server; Execute the task to be tested and obtain the execution result; A test result of the test case is determined based at least on the execution result.

7. The test method according to claim 6, It is characterized in that In the case where the task to be tested includes a page to be tested and a code to be executed, executing the task to be tested to obtain an execution result includes: Rendering the page to be tested in the browser of the client; Receiving a test operation for the page to be tested; Based on the operation to be tested, the first device is called to execute the code to be executed to obtain the execution result.

8. The testing method according to claim 6, It is characterized in that The step of determining the test result of the test case at least based on the execution result includes: When the execution result is successful, determining the test result of the test case is passed; When the execution result is an execution failure, determining the test result of the test case to be tested as a test failure; or, Determine a target request for obtaining data to be verified; the data to be verified is used to verify the execution result; Sending the target request to the server, so that the server responds to the target request and calls the second device to determine the data to be verified; Based on the execution result and the data to be verified, a test result of the test case to be tested is determined.

9. A testing device, It is characterized in that The testing device is deployed on a server, and the testing device includes: A first receiving unit, configured to receive a test request from a client; the test request is determined based on a case to be tested; A first determining unit is configured to determine, based on the test request, a task to be tested corresponding to the case to be tested; based on the task to be tested and the test task in the server, determine a target test subject in the server and the client for executing the task to be tested; The first sending unit is used to send the task to be tested to the client when the target test subject is the client, so that the client executes the task to be tested and determines the test result of the case to be tested.

10. A testing device, It is characterized in that The testing device is deployed on the client, and the testing device includes: A second sending unit, configured to send a test request to a server, so that the server determines a task to be tested corresponding to the case to be tested based on the test request; A second receiving unit, configured to receive the task to be tested issued by the server; An execution unit, used for executing the task to be tested and obtaining an execution result; The second determining unit is used to determine the test result of the test case at least based on the execution result.