Software testing method, server, rack and computer program product
By establishing a communication mechanism between the server and the bench, and automatically obtaining and transmitting test cases, the problem of low software testing efficiency in smart devices is solved, and automated testing of software in smart devices is realized.
Patent Information
- Application Number
- CN202411902183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-20
AI Technical Summary
In the prior art, the testing efficiency of software in smart devices is low and requires manual testing.
By establishing a communication mechanism between the server and the gantry, obtain the test case links corresponding to the changes in the software to be tested, and automatically transmit them to the target gantry for software testing.
Automatic testing of software to be tested in smart devices is realized, the efficiency of software testing is improved, and manual intervention is reduced.
Smart Images

Figure CN119718951A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle technology, and in particular, relates to a software testing method, a server, a test bench, and a computer program product. Background Art
[0002] When the software in the Electronic Control Unit (ECU) of a smart device (such as a vehicle) needs to be refreshed, the code of the newly released software can be automatically integrated, compiled and published to the ECU of the smart device through a continuous integration / continuous deployment (CI / CD) server.
[0003] However, after the software in the electronic control unit of the smart device is refreshed, it is usually necessary to manually test the refreshed software to be tested in the smart device, which reduces the testing efficiency of the software in the smart device. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a software testing method, a server, a test bench and a computer program product to solve the existing technical problem of low testing efficiency of software in smart devices.
[0005] In a first aspect, an embodiment of the present application provides a software testing method, which is applied to a first server, and the software testing method includes:
[0006] Acquire at least one first identifier, where the first identifier is used to identify the changed content in the software to be tested; the version of the software to be tested is a first version;
[0007] According to at least one of the first identifiers, obtaining a first link to a first test case corresponding to the changed content in the software to be tested; the first test case is used to test the software to be tested;
[0008] A first message is sent to a target stand of the smart device, wherein the first message includes the first link, and the first message is used to instruct the target stand to obtain the first test case according to the first link, and to test the software to be tested installed in the smart device according to the first test case.
[0009] Optionally, obtaining a first link to a first test case corresponding to the changed content in the software to be tested according to at least one of the first identifiers includes:
[0010] For each first identifier, the first link corresponding to the first identifier is obtained from a preset test case database according to the first identifier, and the test case database includes the first link corresponding to each first identifier.
[0011] Optionally, the test case database further includes an associated change identifier associated with any one of the first identifiers, and obtaining a first link to a first test case corresponding to the changed content in the software to be tested according to at least one of the first identifiers includes:
[0012] According to any of the first identifiers, acquiring, from a test case database, the first link corresponding to any of the first identifiers and the first link corresponding to the associated change identifier;
[0013] The first link corresponding to the first identifier and the first link corresponding to the associated change identifier are used as the first link of the first test case corresponding to the change content.
[0014] Optionally, before sending the first link to the target stand of the smart device, the method further includes:
[0015] Obtaining a second link and version information of the software to be tested;
[0016] Get the first test case template;
[0017] According to the version information of the software to be tested and the second link, the first flash test case template is updated to obtain a second flash test case template, wherein the second flash test case template at least includes the second link and the version information, wherein the second flash test case template is used to test whether the smart device successfully refreshes the version of the software to be tested; the second link is the storage address of the first version of the software to be tested in the second server;
[0018] A second message is sent to the target bench, wherein the second message includes a third link corresponding to the second flash test case template, and the third link is a storage address of the second flash test case template in the second server, and the second message is used to instruct the target bench to refresh the software to be tested to the smart device according to the third link, and to feed back the refresh result to the first server.
[0019] Optionally, the method further includes:
[0020] Receiving a test result for the software to be tested from the target test bench;
[0021] According to the test result, determining the first test case that failed the test;
[0022] Determine a test failure item according to the first test case that failed the test;
[0023] Obtain the data start time, data end time and data type information corresponding to the test failed item;
[0024] According to the data start time, the data end time and the data type information, target analysis data is obtained from the test data generated by the smart device, and the target analysis data is used to determine the test failure reason of the first test case.
[0025] In a second aspect, an embodiment of the present application provides a software testing method, which is applied to a target test bench. The software testing method includes:
[0026] Receive a first message from a first server, wherein the first message includes a first link; the first link is a link to a first test case corresponding to a change in a first version of the software to be tested;
[0027] Obtaining the first test case from the second server according to the first link;
[0028] The software to be tested installed in the smart device is tested according to the first test case to obtain a test result.
[0029] Optionally, also include:
[0030] The method further comprises:
[0031] Receive a third link from the server, the third link is used to obtain a second flash test case template, the second flash test case template includes at least a second link and version information of the software to be tested; the second flash test case template is used to determine whether the smart device successfully refreshes the version of the software to be tested; the second link is the storage address of the first version of the software to be tested in the second server;
[0032] According to the third link, obtaining the second flash test case template from the second server;
[0033] According to the second flash test case template, acquiring the software to be tested corresponding to the second link and version information of the software to be tested from the second server;
[0034] The software to be tested is refreshed to the smart device, and a refresh result is determined according to the version information.
[0035] In a third aspect, an embodiment of the present application provides a server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the software testing method as described in any one of the first aspects when executing the computer program.
[0036] In a fourth aspect, an embodiment of the present application provides a test bench, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the software testing method as described in any one of the first aspects when executing the computer program.
[0037] In a fifth aspect, an embodiment of the present application provides a software testing system, comprising the server as described in the third aspect and the test bench as described in the fourth aspect.
[0038] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the software testing method as described in any one of the first and second aspects above are implemented.
[0039] In a seventh aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes each step of the software testing method as described in any one of the first and second aspects above.
[0040] The software testing method, server, test bench and computer program product provided by the embodiments of the present application have the following beneficial effects:
[0041] The software testing method provided in the embodiment of the present application can be applied to the first server, specifically including: obtaining at least one first identifier, the first identifier is used to identify the changes in the software to be tested; the version of the software to be tested is the first version; according to at least one first identifier, obtaining the first link of the first test case corresponding to the changes in the software to be tested; the first test case is used to test the software to be tested; sending a first message to the target bench of the smart device, the first message includes a first link, the first message is used to instruct the target bench to obtain the first test case according to the first link, and test the software to be tested installed in the smart device according to the first test case. Through the method of the present application, the bench can obtain the test case to test the software to be tested of the smart device, and can realize automatic testing of the software to be tested in the smart device, thereby improving the testing efficiency of the software in the smart device. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 A software testing system provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of a test case database provided in an embodiment of the present application;
[0045] Figure 3 A flowchart of a software testing method provided in an embodiment of the present application;
[0046] Figure 4 A flowchart of a software testing method provided in another embodiment of the present application;
[0047] Figure 5 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0048] Figure 6 A schematic diagram of the structure of a stand provided in an embodiment of the present application;
[0049] Figure 7 A schematic diagram of the structure of a server provided in another embodiment of the present application;
[0050] Figure 8 A schematic structural diagram of a stand provided in another embodiment of the present application. DETAILED DESCRIPTION
[0051] It should be noted that the terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise specified, "multiple" refers to two or more than two, and "at least one", "one or more" refers to one, two or more. The terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, it is defined that the "first" and "second" features can explicitly or implicitly include one or more of the features.
[0052] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0053] like Figure 1 As shown, Figure 1 A software testing system provided in an embodiment of the present application includes:
[0054] A first server, a second server, and a target rack.
[0055] The first server may be a continuous integration / continuous deployment (CI / CD) server, which is used to execute the software testing method in the embodiment of the present application, and to refresh the software to be tested to the smart device. The smart device may be a driving device, a smart car, a robot, or other devices. For example, the smart device in the embodiment of the present application may refer to a vehicle.
[0056] The second server may be a cloud server, used to store the test case database in the embodiment of the present application, and one or more first test cases.
[0057] Among them, the test case database records the first link corresponding to each first identifier, and each first link corresponds to a first test case stored in the second server. In addition, the test case database can also record the associated identifier corresponding to each first identifier, as well as the description of the change content and the first test case corresponding to the first identifier. In addition, the test case database can also record the person in charge information corresponding to the first identifier.
[0058] See also Figure 2 , Figure 2 A schematic diagram of a test case database provided in an embodiment of the present application. Figure 2 As shown, the test case database may include a change ID (i.e., the first identifier of the embodiment of the present application), and an associated change ID (i.e., the associated change ID of the embodiment of the present application). Optionally, the test case database may also include a test case link (i.e., the first link of the embodiment of the present application), and may also include a content description and a person in charge.
[0059] In actual applications, the user can predefine the first identifier corresponding to each change content in the software to be tested, predetermine the first test case corresponding to each change content, and predetermine the association relationship between each first test case and the first link, and then upload the first identifier corresponding to each change content, the first test case and the test case database obtained by the first link to the second server, so that the first server can obtain the test case database from the second server. It is understandable that each record in the test case database in the embodiment of the present application includes a mapping relationship between a change ID, an associated change ID, a test case link, a content description and a person in charge.
[0060] It is worth mentioning that Figure 2 In the test case database shown, not every change ID is associated with an associated change ID. There may also be a change ID that has no associated associated change ID.
[0061] As an example, the system may further include: a smart device. The software to be tested is installed in the smart device. For example, if the smart device is a vehicle, the software to be tested is installed in an electronic control unit in the vehicle.
[0062] The software testing method provided in the embodiment of the present application can be applied to the scenario of testing the software to be tested installed in the smart device. Specifically, the software testing method provided in the embodiment of the present application can be applied to the scenario of testing the software to be tested installed in the vehicle. More specifically, the software testing method provided in the embodiment of the present application can be applied to the scenario of testing the software to be tested installed in the electronic control unit in the vehicle.
[0063] The execution subject of the software testing method provided in the embodiment of the present application may include a first server and a test bench. Among them, the first server may be a continuous integration / continuous deployment server, and the server may be connected to the test bench for communication. Specifically, when it is necessary to automatically test the software to be tested installed in the electronic control unit in the vehicle, the various steps of the software testing method provided in the embodiment of the present application may be respectively executed by the server and the test bench.
[0064] See also Figure 3 , Figure 3 This is a flowchart for implementing a software testing method provided in an embodiment of the present application. The software testing method provided in an embodiment of the present application can be applied to a first server. The method may include steps S101 to S103, which are described in detail as follows:
[0065] In S101, at least one first identifier is obtained, where the first identifier is used to identify the changed content in the software to be tested; the version of the software to be tested is the first version.
[0066] In an embodiment of the present application, when it is necessary to automatically test the software to be tested installed in the electronic control unit in the vehicle, the first server may first obtain a first identifier for identifying the changed content in the software to be tested. The changed content in the software to be tested may be one or more, and based on this, the first identifier may also be one or more.
[0067] The software to be tested may be software in the electronic control unit that has been refreshed but not tested. The changed content in the software to be tested may be content that is different between the software to be tested and the old software, and the old software may be the initial software installed in the electronic control unit that corresponds to the software to be tested.
[0068] In this implementation, when a user is developing software to be tested and after processing a change content, the user can upload the first identifier corresponding to the change content and the first link of the first test case corresponding to the change content to the test case database of the second server.
[0069] As an example, the first server may call a test case database stored in the second server.
[0070] In actual application, the user can input the first identifier corresponding to each change content in the software to be tested into the first server, so that the first server can obtain the first identifier corresponding to each change content in the software to be tested.
[0071] In S102, according to at least one first identifier, a first link of a first test case corresponding to the changed content in the software to be tested is obtained, and the first test case is used to test the software to be tested.
[0072] In the embodiment of the present application, the first test case corresponding to the changed content in the software to be tested may include: the test case corresponding to the changed content, that is, the test case corresponding to the changed content is used to test the software to be tested during testing.
[0073] Alternatively, the first test case corresponding to the changed content in the software to be tested may include: a test case of an associated change ID corresponding to the changed content and a test case corresponding to the changed content. That is, during testing, the test case corresponding to the changed content and the test case of an associated change ID corresponding to the changed content are used together to test the software to be tested.
[0074] In a possible implementation, S102 may be implemented through step a. The details are as follows:
[0075] In step a, for each first identifier, a first link corresponding to the first identifier is obtained from a preset test case database according to the first identifier.
[0076] The test case database includes a first link corresponding to each first identifier.
[0077] In this implementation, after obtaining the first identifier, the first server can obtain a preset test case database from the second server, and then the first server can obtain the first link corresponding to each first identifier from the preset test case database based on each first identifier, thereby obtaining the first link of the first test case corresponding to the changed content in the software to be tested.
[0078] In another possible implementation, S102 may be implemented through steps b to c. The details are as follows:
[0079] In step b, according to any first identifier, a first link corresponding to any first identifier and a first link corresponding to the associated change identifier are obtained from a test case database.
[0080] In this implementation, after obtaining the first identifier, the first server can obtain a preset test case database from the second server, and then the first server can obtain the first link corresponding to each first identifier and the first link corresponding to the associated change identifier of the first identifier from the preset test case database based on each first identifier.
[0081] In step c, the first link corresponding to the first identifier and the first link corresponding to the associated change identifier are used as the first link of the first test case corresponding to the change content.
[0082] In this implementation, after obtaining the first links corresponding to each first identifier and the first link corresponding to the associated change identifier of the first identifier, the first server can use the first link corresponding to the first identifier and the first link corresponding to the associated change identifier as the first link of the first test case corresponding to the change content.
[0083] In S103, a first message is sent to a target rack of the smart device, the first message including a first link, the first message being used to instruct the target rack to obtain a first test case according to the first link, and to test the software to be tested installed in the smart device according to the first test case.
[0084] In an embodiment of the present application, after obtaining the first link, the first server may send a first message including the first link to the target stand of the smart device to instruct the target stand to obtain the first test case according to the first link, and test the software to be tested installed in the smart device according to the first test case.
[0085] In a possible implementation, when the target test bench tests the software to be tested installed in the smart device according to the first test case, the target test bench can also obtain various types of data of the vehicle during the test process, and send the various data obtained during the test process to the first server.
[0086] Among them, various types of data may include but are not limited to controller area network (CAN) data, local interconnect network (LIN) data, diagnostic information (DI) data, analog to digital converter (ADC) data, and ETH (an automotive communication protocol based on Ethernet technology) bus data, etc.
[0087] Based on this, the first server can also obtain data for analysis through steps d to h.
[0088] Details are as follows:
[0089] In step d, a test result for the software to be tested is received from the target test bench.
[0090] In this implementation, after the target rack tests the software to be tested in the smart device according to the first test case, the first server may also receive a test result for the software to be tested from the target rack.
[0091] The test result of the software to be tested may include the sub-test results corresponding to each first test case, and the test result may include test success or test failure.
[0092] In step e, the first test case that failed the test is determined according to the test result.
[0093] In this implementation, the first server may determine the first test case that failed the test according to the sub-test results corresponding to each first test case.
[0094] Specifically, the target vehicle frame can determine the sub-test result corresponding to any first test case in the following manner. The first test case may include several expected values of target data, based on which, when the target test bench tests the software to be tested installed in the electronic control unit of the vehicle according to the first test case, it can obtain the actual value of the target data, and then the actual value of each target data can be compared with the expected value of the corresponding target data, and if there is any actual value of the target data that is different from the expected value of the corresponding target data, it can be determined that the sub-test result corresponding to the first test case is a test failure.
[0095] In step f, the test failure item is determined according to the first test case that failed the test.
[0096] In this implementation, after determining the first test case that failed the test, the first server can determine the test failed items. Specifically, the user can pre-define several test items in each first test case, and can define several test steps for each test item, and can define actual values and expected values of several target data corresponding to each test step. Based on this, the first server can determine in the first test case that there are test failed steps where the actual value and expected value of the target data are different, so that the test failed items can be determined based on the test failed steps.
[0097] In step g, the data start time, data end time and data type information corresponding to the test failed item are obtained.
[0098] In this implementation, after obtaining the test failure item, the first server can obtain the data information corresponding to the test failure item. Specifically, the first server can obtain the data start time, data end time and data type information corresponding to the test failure item. Among them, the data start time corresponding to the test failure item can be used to describe the time when the test failure item starts to generate data, the data end time corresponding to the test failure item can be used to describe the time when the test failure item stops generating data, and the data type information corresponding to the test failure item can be used to describe the data type corresponding to the test failure item.
[0099] In step h, target analysis data is obtained from the test data generated by the smart device according to the data start time, data end time and data type information, and the target analysis data is used to determine the test failure cause of the first test case.
[0100] In this implementation, after obtaining the data start time, data end time and data type information corresponding to the test failure item, the first server can obtain target analysis data from the test data generated by the electronic control unit based on the data start time, data end time and data type information.
[0101] Exemplarily, the data start time may be time 1, the data end time may be time 2, and the data type information may be a controller area network bus data type. Based on this, the first server may obtain data of a data type of controller area network bus data from the test data generated by the electronic control unit, and the data generated within the time range consisting of time 1 and time 2 as target analysis data.
[0102] After the first server obtains the target analysis data, the first server may upload the target analysis data to the second server, so that the user can obtain the target analysis data from the second server, thereby allowing the user to analyze the cause of the test failure according to the target analysis data.
[0103] In addition, the first server can also display the project information of the test failure item corresponding to the target analysis data, the step information of the test failure step corresponding to the target analysis data, and the actual value and expected value of the target data corresponding to the test failure step corresponding to the target analysis data in a preset manner together with the target analysis data, so that the customer can analyze the cause of the test failure based on the above information.
[0104] In another embodiment of the present application, before testing the software to be tested, the first server may also refresh the software to be tested into the electronic control unit.
[0105] In the embodiment of the present application, the first server can refresh the software to be tested into the electronic control unit through steps i to l. The details are as follows:
[0106] In step i, the second link and version information of the software to be tested are obtained.
[0107] In the embodiment of the present application, the first server may store version information of the software to be tested, and the version information of the software to be tested is used to describe that the version of the software to be tested is the first version.
[0108] In step j, a first flash test case template is obtained.
[0109] In an embodiment of the present application, the first server may obtain the first flash test case template from the second server.
[0110] In step k, the first flash test case template is updated according to the version information of the software to be tested and the second link to obtain the second flash test case template, wherein the second flash test case template includes at least the second link and the version information, wherein the second flash test case template is used to test whether the smart device successfully refreshes the version of the software to be tested; the second link is the storage address of the first version of the software to be tested in the second server.
[0111] In an embodiment of the present application, after obtaining the version information and the second link of the software to be tested, and the first flash test case template, the first flash test case template can be updated according to the version information of the software to be tested and the second link to obtain the second flash test case template, so that the second flash test case template includes at least the second link and the version information.
[0112] In step 1, a second message is sent to the target test bench, the second message includes a third link corresponding to the second flash test case template, the third link is the storage address of the second flash test case template in the second server, and the second message is used to instruct the target test bench to refresh the software to be tested to the smart device according to the third link, and to feedback the refresh result to the first server.
[0113] In an embodiment of the present application, after obtaining the second flash test case template, the first server can send a second message including a third link corresponding to the second flash test case template to the target test bench to instruct the target test bench to refresh the software to be tested to the smart device according to the third link, and feedback the refresh result to the first server.
[0114] Specifically, after receiving the second message, the target test bench can obtain the second flash test case template from the second server according to the third link in the second message, and can obtain the second link and version information from the second server according to the second flash test case template, and can obtain the software to be tested from the second server according to the second link, and can also refresh the obtained software to be tested to the electronic control unit of the vehicle. After that, the target test bench can obtain the current version information of the software in the electronic control unit of the vehicle. If the current version information is consistent with the version information of the software to be tested, it can be determined that the refresh is successful. If the current version information is inconsistent with the version information of the software to be tested, it can be determined that the refresh failed. Specifically, the version of the software to be tested is the first version. If the target test bench determines that the version of the current software in the electronic control unit of the vehicle is the first version according to the current version information, it can be determined that the refresh is successful. If the target test bench determines that the version of the current software in the electronic control unit of the vehicle is the second version according to the current version information, it can be determined that the refresh failed.
[0115] Optionally, if the first server determines that the refresh fails, relevant steps for testing the software to be tested (such as S101 to S103) may not be executed, and the software to be tested is directly considered to have failed. If the first server determines that the refresh is successful, relevant steps for testing the software to be tested may be executed.
[0116] It can be seen from the above that the software testing method provided in the embodiment of the present application can be applied to the first server, specifically including: obtaining at least one first identifier, the first identifier is used to identify the changes in the software to be tested; the version of the software to be tested is the first version; according to at least one first identifier, obtaining the first link of the first test case corresponding to the changes in the software to be tested; the first test case is used to test the software to be tested; sending a first message to the target bench of the smart device, the first message includes a first link, the first message is used to instruct the target bench to obtain the first test case according to the first link, and test the software to be tested installed in the smart device according to the first test case. Through the method of the present application, the bench can obtain the test case to test the software to be tested of the smart device, and can automatically test the software to be tested in the smart device after completing the refresh of the software in the smart device, thereby improving the testing efficiency of the software in the smart device.
[0117] In practical applications, there can be multiple first servers and target test benches, so that the software to be tested installed in the electronic control units of multiple vehicles can be automatically tested at the same time, further improving the testing efficiency of the software in the electronic control units.
[0118] See also Figure 4 , Figure 4 This is a flowchart of an implementation of a software testing method provided in another embodiment of the present application. The software testing method provided in the embodiment of the present application can be applied to a target test bench and can include steps S201 to S203, which are described in detail as follows:
[0119] In S201, a first message is received from a first server, where the first message includes a first link; the first link is a link to a first test case corresponding to a change in a first version of the software to be tested.
[0120] In the embodiment of the present application, after receiving the first message from the first server, the target stand may obtain the first link according to the first message.
[0121] In S202, a first test case is obtained from a second server according to the first link.
[0122] In the embodiment of the present application, after obtaining the first link, the target stand can obtain the first test case from the second server according to the first link.
[0123] In S203, the software to be tested installed in the smart device is tested according to the first test case to obtain a test result.
[0124] In the embodiment of the present application, after acquiring the first test case, the target test bench can test the software to be tested installed in the smart device according to the first test case to obtain a test result.
[0125] After obtaining the test results, the target bench can feed back the test results to the smart device.
[0126] In another embodiment of the present application, before testing the software to be tested, the target test bench may also refresh the software to be tested into the electronic control unit of the vehicle.
[0127] In the embodiment of the present application, the target test bench can refresh the software to be tested into the electronic control unit through steps m to p. The details are as follows:
[0128] In step m, a third link is received from the server, and the third link is used to obtain a second flash test case template, wherein the second flash test case template includes at least a second link and version information of the software to be tested; the second flash test case template is used to determine whether the smart device has successfully refreshed the version of the software to be tested; the second link is the storage address of the first version of the software to be tested in the second server.
[0129] In the embodiment of the present application, the target rack can receive a third link from the server, wherein the third link is obtained by the first server updating the first flash test case template according to the version information of the software to be tested and the second link.
[0130] In step n, according to the third link, a second flash test case template is obtained from the second server.
[0131] In the embodiment of the present application, after receiving the third link from the server, the target rack can download the second flash test case template from the second server according to the third link.
[0132] In step o, according to the second flash test case template, the software to be tested corresponding to the second link and the version information of the software to be tested are obtained from the second server.
[0133] In an embodiment of the present application, after obtaining the second flash test case template, the target stand can download the second link and version information of the software to be tested from the second server according to the second flash test case template, and download the software to be tested from the second server according to the second link of the software to be tested.
[0134] In step p, the software to be tested is refreshed to the smart device, and the refresh result is determined according to the version information.
[0135] In the embodiment of the present application, after acquiring the second link and the version information, the target stand can refresh the software to be tested to the smart device according to the second link, and determine the refresh result according to the version information.
[0136] After determining the refresh result, the target rack may feed back the refresh result to the first server.
[0137] Based on the software testing method provided in the above embodiment, the embodiment of the present application further provides a server and a test bench for implementing the above method embodiment.
[0138] See also Figure 5 , Figure 5 A schematic diagram of the structure of a server provided in an embodiment of the present application, such as Figure 5 As shown, the server 50 may include an identification acquisition unit 51, a link acquisition unit 52 and a message sending unit 53, wherein:
[0139] The identifier acquisition unit 51 is used to acquire at least one first identifier, where the first identifier is used to identify the changed content in the software to be tested; the version of the software to be tested is the first version.
[0140] The first link acquisition unit 52 is used to acquire a first link of a first test case corresponding to the changed content in the software to be tested according to at least one first identifier; the first test case is used to test the software to be tested.
[0141] The first message sending unit 53 is used to send a first message to a target rack of the smart device, the first message including a first link, the first message being used to instruct the target rack to obtain a first test case according to the first link, and to test the software to be tested installed in the smart device according to the first test case.
[0142] Optionally, the first link acquiring unit 52 is specifically configured to:
[0143] For each first identifier, a first link corresponding to the first identifier is obtained from a preset test case database according to the first identifier, and the test case database includes the first link corresponding to each first identifier.
[0144] Optionally, the first link acquiring unit 52 is further configured to:
[0145] According to any of the first identifiers, acquiring, from a test case database, the first link corresponding to any of the first identifiers and the first link corresponding to the associated change identifier;
[0146] The first link corresponding to the first identifier and the first link corresponding to the associated change identifier are used as the first link of the first test case corresponding to the change content.
[0147] Optionally, the server 50 may further include a first refreshing unit, wherein:
[0148] The first refreshing unit is specifically used for:
[0149] Obtain the second link and version information of the software to be tested;
[0150] Get the first test case template;
[0151] According to the version information of the software to be tested and the second link, the first flash test case template is updated to obtain a second flash test case template, wherein the second flash test case template at least includes the second link and the version information, wherein the second flash test case template is used to test whether the smart device successfully refreshes the version of the software to be tested; the second link is the storage address of the first version of the software to be tested in the second server;
[0152] A second message is sent to the target test bench, the second message includes a third link corresponding to the second flash test case template, the third link is the storage address of the second flash test case template in the second server, and the second message is used to instruct the target test bench to refresh the software to be tested to the smart device according to the third link, and to feedback the refresh result to the first server.
[0153] Optionally, the server 50 may further include a data acquisition unit, wherein:
[0154] The data acquisition unit is specifically used for:
[0155] Receiving test results for the software to be tested from the target test bench;
[0156] According to the test result, determine the first test case that failed the test;
[0157] Determine the test failure item according to the first test case that failed the test;
[0158] Get the data start time, data end time and data type information corresponding to the test failure item;
[0159] According to the data start time, the data end time and the data type information, target analysis data is obtained from the test data generated by the smart device, and the target analysis data is used to determine the test failure reason of the first test case.
[0160] See also Figure 6 , Figure 6 A schematic diagram of the structure of a stand provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the test stand 60 may include a message receiving unit 61, a test case acquisition unit 62 and a test unit 63, wherein:
[0161] The message receiving unit 61 is used to receive a first message from a first server, where the first message includes the first link; the first link is a link to a first test case corresponding to a change in the first version of the software to be tested.
[0162] The test case acquisition unit 62 is used to acquire the first test case from the second server according to the first link.
[0163] The testing unit 63 is used to test the software to be tested installed in the smart device according to the first test case test to obtain a test result.
[0164] Optionally, the rack 60 may further include a second refreshing unit, wherein:
[0165] The second refresh unit is specifically used for:
[0166] Receive a third link from the server, the third link is used to obtain a second flash test case template, the second flash test case template includes at least a second link and version information of the software to be tested; the second flash test case template is used to determine whether the smart device successfully refreshes the version of the software to be tested; the second link is the storage address of the first version of the software to be tested in the second server;
[0167] According to the third link, obtaining the second flash test case template from the second server;
[0168] According to the second flash test case template, acquiring the software to be tested corresponding to the second link and version information of the software to be tested from the second server;
[0169] The software to be tested is refreshed to the smart device, and a refresh result is determined according to the version information.
[0170] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of a server provided in another embodiment of the present application. Figure 7 As shown, the server 7 provided in this embodiment may include: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. For example, a program corresponding to the software testing method. When the processor 70 executes the computer program 72, the steps applied in the software testing method embodiment are implemented, for example Figure 3 In S101 to S103 shown, the processor 70 executes the computer program 72 to implement the functions of each module / unit in the above-mentioned embodiment corresponding to the server 50, for example Figure 5 The functions of the units 51 to 53 are shown.
[0171] Exemplarily, the computer program 72 may be divided into one or more modules / units, one or more modules / units are stored in the memory 71 and executed by the processor 70 to complete the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 72 in the server 7. For example, the computer program 72 may be divided into an identification acquisition unit 51, a link acquisition unit 52, and a message sending unit 53. For the specific functions of each unit, please refer to Figure 5 The relevant descriptions in the corresponding embodiments are not repeated here.
[0172] Those skilled in the art will understand that Figure 7 This is only an example of the server 7 and does not constitute a limitation on the server 7 , which may include more or less components than those shown in the figure, or a combination of certain components, or different components.
[0173] See also Figure 8 , Figure 8 This is a schematic diagram of the structure of a stand provided in another embodiment of the present application. Figure 8 As shown, the rack 8 provided in this embodiment may include: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. For example, a program corresponding to the software testing method. When the processor 80 executes the computer program 82, the steps applied to the software testing method embodiment are implemented, for example Figure 4 In S201 to S203 shown, the processor 80 executes the computer program 82 to implement the functions of each module / unit in the embodiment corresponding to the above-mentioned rack 60, for example Figure 6 Functions of units 61 to 63 are shown.
[0174] Exemplarily, the computer program 82 may be divided into one or more modules / units, one or more modules / units are stored in the memory 81 and executed by the processor 80 to complete the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 82 in the test stand 8. For example, the computer program 82 may be divided into a message receiving unit 61, a test case acquisition unit 62, and a test unit 63. The specific functions of each unit can be referred to in Figure 6 The relevant descriptions in the corresponding embodiments are not repeated here.
[0175] Those skilled in the art will understand that Figure 8 The above is only an example of the stand 8 and does not constitute a limitation of the stand 8 , and the stand 8 may include more or less components than shown in the figure, or some components may be combined, or different components may be included.
[0176] The processor 80 and the processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0177] The memory 81 and the memory 61 may be internal storage units of the rack 8 and the server 6, such as hard disks or memories of the rack 8 and the server 6. The memory 81 and the memory 61 may also be external storage devices of the rack 8 and the server 6, such as plug-in hard disks, smart media cards (SMC), secure digital (SD) cards or flash cards equipped on the rack 8 and the server 6. Further, the memory 81 and the memory 61 may also include both internal storage units and external storage devices of the rack 8 and the server 6. The memory 81 and the memory 61 are used to store computer programs and other programs and data required by electronic devices. The memory 81 and the memory 61 may also be used to temporarily store data that has been output or is to be output.
[0178] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure of the server and the rack can be divided into different functional units to complete all or part of the functions described above. The functional units in the embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0179] An embodiment of the present application also provides a software testing system, which may include a server and a test bench.
[0180] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0181] An embodiment of the present application provides a computer program product. When the computer program product is executed on a terminal device, the terminal device implements the steps in the above-mentioned various method embodiments.
[0182] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0183] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0184] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A software testing method, characterized in that: Applied to the first server, the software testing method includes: Acquire at least one first identifier, where the first identifier is used to identify the changed content in the software to be tested; the version of the software to be tested is a first version; According to at least one of the first identifiers, obtaining a first link to a first test case corresponding to the changed content in the software to be tested; the first test case is used to test the software to be tested; A first message is sent to a target stand of the smart device, wherein the first message includes the first link, and the first message is used to instruct the target stand to test the software to be tested installed in the smart device according to the first test case obtained from the first link.
2. The method according to claim 1, characterized in that The acquiring, according to at least one of the first identifiers, a first link to a first test case corresponding to the changed content in the software to be tested comprises: For each of the first identifiers, the first link corresponding to the first identifier is acquired from a test case database according to the first identifier, and the test case database includes at least the first link corresponding to each of the first identifiers.
3. The method according to claim 2, characterized in that The test case database further includes an associated change identifier associated with any one of the first identifiers, and obtaining a first link to a first test case corresponding to a change content in the software to be tested according to at least one of the first identifiers includes: According to any of the first identifiers, acquiring, from a test case database, the first link corresponding to any of the first identifiers and the first link corresponding to the associated change identifier; The first link corresponding to the first identifier and the first link corresponding to the associated change identifier are used as the first link of the first test case corresponding to the change content.
4. The method according to claim 1, characterized in that: Before sending the first link to the target stand of the smart device, the method further includes: Obtaining a second link and version information of the software to be tested; Get the first test case template; According to the version information of the software to be tested and the second link, the first flash test case template is updated to obtain a second flash test case template, wherein the second flash test case template at least includes the second link and the version information, wherein the second flash test case template is used to determine whether the smart device successfully refreshes the version of the software to be tested; the second link is the storage address of the first version of the software to be tested in the second server; A second message is sent to the target bench, wherein the second message includes a third link corresponding to the second flash test case template, the third link is a storage address of the second flash test case template in the second server, and the second message is used to instruct the target bench to refresh the version of the software to be tested according to the second flash test case template.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Receiving a test result for the software to be tested from the target test bench; According to the test result, determining the first test case that failed the test; Determine a test failure item according to the first test case that failed the test; Obtain the data start time, data end time and data type information corresponding to the test failed item; According to the data start time, the data end time and the data type information, target analysis data is obtained from the test data generated by the smart device, and the target analysis data is used to determine the test failure reason of the first test case.
6. A software testing method, characterized in that: Applied to a target bench, the software testing method comprises: Receive a first message from a first server, wherein the first message includes a first link; the first link is a link to a first test case corresponding to a change in a first version of the software to be tested; Obtaining the first test case from the second server according to the first link; The software to be tested installed in the smart device is tested according to the first test case to obtain a test result.
7. The method according to claim 6, characterized in that The method further comprises: Receive a third link from the server, the third link is used to obtain a second flash test case template, the second flash test case template includes at least a second link and version information of the software to be tested; the second flash test case template is used to determine whether the smart device successfully refreshes the version of the software to be tested; the second link is the storage address of the first version of the software to be tested in the second server; According to the third link, obtaining the second flash test case template from the second server; According to the second flash test case template, acquiring the software to be tested corresponding to the second link and version information of the software to be tested from the second server; The software to be tested is refreshed to the smart device, and a refresh result is determined according to the version information.
8. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the software testing method according to any one of claims 1 to 5 is implemented.
9. A platform comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the software testing method according to any one of claims 6 to 7 is implemented.
10. A computer program product, characterized in that When the computer program product runs on a computer device, the computer device executes the software testing method according to any one of claims 1 to 5, or implements the software testing method according to any one of claims 6 to 7.
Citation Information
Patent Citations
Software testing method and device, computing equipment and storage medium
CN109960647A
Batch flashing pressure testing method and device, storage medium and computer equipment
CN115033466A
XML file configuration method, device and system, XML file flashing method, device and system and storage medium
CN118349255A
Method and system for cloud-based automated software testing
US20190361801A1