Software testing method, computer equipment and storage medium

By entering software test data into the AI ​​model and executing test cases on the mock platform, the problem of large amount of code and inaccurate test results in existing automated testing technologies is solved, and efficient and accurate software testing is achieved.

CN119597639APending Publication Date: 2025-03-11IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411522774.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Existing automated testing technology requires professionals to write a large amount of code, which has a high threshold and can easily lead to inaccurate test results.

Method used

By obtaining the software test data of the target software, inputting it into the artificial intelligence AI model, generating a collection of test cases, and executing test cases based on the simulated mock platform to obtain software test results.

Benefits of technology

It improves the efficiency and accuracy of software testing, reduces the need for professional coding, and allows non-professional personnel to conduct effective testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597639A_ABST
    Figure CN119597639A_ABST
Patent Text Reader

Abstract

The invention provides a software testing method, computer equipment and a storage medium, and the method comprises the steps: obtaining at least one group of software testing data corresponding to to-be-tested target software; each set of software test data is input into an artificial intelligence (AI) model, a test case set corresponding to each set of software test data is generated, and the test case set comprises a plurality of test cases; and executing each test case based on a simulation mock platform to obtain a software test result corresponding to the target software. Therefore, the efficiency and accuracy of software testing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Software testing is a process of checking whether the software meets user needs. Nowadays, it is generally done manually based on manual operation, or automated testing by controlling the software to run automatically. Compared with manual testing, automated testing reduces manual involvement and the testing phase takes less time. At present, automated testing technology usually uses scripting languages ​​to write test cases, and then executes these scripts through automated tools to achieve automated testing. Script-based automated testing requires professionals to write a lot of code, which is a large workload, and requires professionals to have a certain programming foundation. The testing threshold is high, and if the code is wrong, it may affect the test results.

[0003] Therefore, how to improve the efficiency and accuracy of software testing has become an urgent problem to be solved. Summary of the invention

[0004] The present application provides a software testing method, a computer device and a storage medium, which can improve the efficiency and accuracy of software testing.

[0005] In a first aspect, the present application provides a software testing method, the method comprising:

[0006] Acquire at least one set of software test data corresponding to the target software to be tested;

[0007] Input each set of the software test data into an artificial intelligence AI model to generate a test case set corresponding to each set of the software test data, wherein the test case set includes multiple test cases;

[0008] Each of the test cases is executed based on the simulated mock platform to obtain the software test results corresponding to the target software.

[0009] In a second aspect, the present application further provides a computer device, the computer device comprising:

[0010] Memory and processor;

[0011] Wherein, the memory is connected to the processor and is used to store programs;

[0012] The processor is used to implement the steps of the software testing method as described in any one of the embodiments of the present application by running the program stored in the memory.

[0013] In a third aspect, the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the steps of the software testing method as described in any one of the embodiments of the present application.

[0014] The software testing method, computer device and storage medium disclosed in the present application obtain at least one set of software test data corresponding to the target software to be tested, input each set of software test data into an AI model, generate a test case set corresponding to each set of software test data, and the test case set contains multiple test cases. Each test case is then executed based on a mock platform to obtain the software test results corresponding to the target software, which saves the operation of professionals writing a large amount of code and avoids the situation where the test results are inaccurate due to errors in the code. Therefore, the efficiency and accuracy of software testing are improved.

[0015] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are 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 work.

[0017] Figure 1 It is a schematic diagram of the steps of a software testing method provided in an embodiment of the present application;

[0018] Figure 2 It is a schematic diagram of software test data corresponding to a weather application set by relevant technical personnel;

[0019] Figure 3 is a schematic diagram of UE configuration information;

[0020] Figure 4 It is a schematic diagram of UI configuration information;

[0021] Figure 5 It is a schematic diagram of a step of obtaining a software test result corresponding to the target software provided by an embodiment of the present application;

[0022] Figure 6 It is a schematic diagram of a step of obtaining an actual execution result corresponding to each test case provided by an embodiment of the present application;

[0023] Figure 7 This is a schematic diagram of the steps of another software testing method provided by an embodiment of the present application;

[0024] Figure 8 It is a schematic block diagram of a computer device provided in an embodiment of the present application.

[0025] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0028] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0029] It should be understood that in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish between the same items or similar items with substantially the same functions and effects. For example, the first callback function and the second callback function are only used to distinguish different callback functions, and their order is not limited. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit them to be different.

[0030] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0031] For various types of software, such as weather application software, software testing is generally based on manual testing of the software in a manual operation mode, or automatic testing of the software by controlling the automatic operation. Compared with manual testing, automated testing reduces manual participation and the testing phase takes less time. At present, automated testing technology usually uses scripting languages ​​to write test cases, and then executes these scripts through automated tools to achieve automated testing. Script-based automated testing requires professionals to write a lot of code, which is a large workload, and requires professionals to have a certain programming foundation. The testing threshold is high, and if the code is wrong, it may affect the test results.

[0032] To this end, embodiments of the present application provide a software testing method, a computer device, and a storage medium to improve the efficiency and accuracy of software testing.

[0033] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0034] See also Figure 1 , Figure 1 It is a flowchart of a software testing method provided in an embodiment of the present application. The software testing method can be applied in a terminal device, wherein the terminal device can be a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, a wearable device or a smart screen, a smart TV, a projector, a reading pen, a computer device, etc., of course, it is not limited thereto.

[0035] like Figure 1 As shown, the software testing method can be applied to a computer device, and the software testing method applied to a computer device includes steps S101 to S103.

[0036] S101. Obtain at least one set of software test data corresponding to the target software to be tested.

[0037] The target software may be various types of applications, including but not limited to weather applications, music applications, etc.

[0038] Testing of the target software includes but is not limited to testing of various test categories corresponding to the software, including but not limited to interface, UI (User Interface), UE (User Experience), etc.

[0039] Before automatically testing the target software, one or more sets of software test data corresponding to the target software are obtained, wherein each set of software test data is used to generate a test case for testing a certain test category corresponding to the target software, and different test categories correspond to different software test data.

[0040] For example, taking the target software as a weather application, the test categories corresponding to the weather application include at least one of an interface, a UI, and a UE, and obtaining software test data corresponding to at least one of the interface, the UI, and the UE.

[0041] In some embodiments, obtaining at least one set of software test data corresponding to the target software to be tested includes:

[0042] Query the input information to obtain the software test data corresponding to at least one test category of the target software, wherein different test categories correspond to different software test data.

[0043] Before automatically testing the target software, the technicians can manually enter the input information corresponding to the target software test into the computer device system in advance, or the input information can be automatically entered into the computer device system in advance. The input information includes but is not limited to data documents corresponding to different test categories, such as interface documents, UI documents, UE documents, etc., and each data document contains software test data corresponding to the test category. Interface documents, UI documents, and UE documents are uniformly entered into the system for maintenance, which is convenient for relevant technicians to quickly query and obtain the required corresponding documents.

[0044] In this way, by querying the input information, the software test data corresponding to any test category of the target software can be quickly obtained.

[0045] In some embodiments, the obtaining the software test data corresponding to at least one test category of the target software includes:

[0046] Obtaining a first set of software test data corresponding to the interface, the first set of software test data comprising interface configuration information, the interface configuration information comprising at least one of an interface request mode, an interface request path, an interface input parameter, an interface return parameter, and an abnormal situation handling strategy; and / or

[0047] Acquire a second set of software test data corresponding to the UE, where the second set of software test data includes UE configuration information, where the UE configuration information includes interaction process information during the operation of the target software; and / or

[0048] A third set of software test data corresponding to the UI is obtained, wherein the third set of software test data includes UI configuration information, and the UI configuration information includes types of page elements corresponding to the target software, wherein the types include dynamic and static.

[0049] Exemplarily, the first set of software test data, the second set of software test data, and the third set of software test data are set by relevant technical personnel. For example, still taking the target software as a weather application as an example, Figure 2 As shown, the server-side R&D engineer sets the first set of software test data and generates the corresponding interface document, the UE engineer sets the second set of software test data and generates the corresponding UE document, and the UI engineer sets the third set of software test data and generates the corresponding UI document.

[0050] The first group of software test data contains interface configuration information, wherein the interface configuration information includes at least one of the following information: the interface request method, interface request path, interface input parameter, interface return parameter, and abnormal situation handling strategy corresponding to the interface of the target software. For example, still taking the target software as a weather application as an example, the weather application contains two interfaces: weather list query and weather details query. Among them, the weather list query supports obtaining date information, city information, basic weather information, etc. by entering longitude and latitude or city name. Weather details query provides more in-depth weather information, such as air quality, wind speed, sunrise and sunset times, etc. Each return field has a preset value range and abnormal scenarios, such as an error code when the city is invalid, a fallback display when weather data for some cities is incomplete, and so on.

[0051] For example, a possible example of interface configuration information corresponding to the weather list query interface is as follows:

[0052] Interface request method: GET

[0053] Interface request path: http: / / ip:port / api / v1.0 / weather

[0054] Interface input parameters: longitude (longitude), latitude (latitude), city (city)

[0055] The interface returns parameters: date (date supported for query), weathertype (weather type), temperature (temperature), cityid (city id)

[0056] Abnormal situation handling strategy:

[0057] When no results are found for the city or longitude and latitude query, code=1 is returned

[0058] When other unknown exceptions occur, return code = -1

[0059] For example, a possible example of interface configuration information corresponding to the weather details query interface is as follows:

[0060] Interface request method: GET

[0061] Interface request path: http: / / ip:port / api / v1.0 / weather / detail

[0062] Interface input parameters: cityid (city id), date (date supported for query)

[0063] The interface returns parameters: airquality (air quality), windlevel (wind force), sunrise (sunrise time), sunset (sunset time), alert (weather warning information)

[0064] Abnormal situation handling strategy:

[0065] When the city id is invalid, return code = 2

[0066] When the date is not supported, return code = 3

[0067] When other unknown exceptions occur, return code = -1

[0068] Due to restrictions by the local meteorological bureau, each return parameter may not get a value and return null.

[0069] In some embodiments, the interface configuration information also includes an interface domain name, which is configured to simulate a mock platform domain name to enable the computer device system to connect to the mock platform, and to call the mock platform based on the mock platform domain name to execute relevant test cases of the target software test. For example, still taking the target software as a weather application as an example, Figure 2 As shown in the figure, the client R&D engineer changes the domain name of the weather application request background interface to the mock platform domain name in order to control the return result of each request. After the modification is completed, the server R&D engineer can initiate the test from the mock platform and start the automatic application test.

[0070] For example, change http: / / ip:port / api / v1.0 / weather to http: / / mockDomain / api / v1.0 / weathe, and change http: / / ip:port / api / v1.0 / weather / detail to http: / / mockDomain / api / v1.0 / weather / detail.

[0071] The second set of software test data contains UE configuration information, which includes the interactive process information during the operation of the target software. For example, still taking the target software as a weather application, the UE engineer enters the UE document into the system, marks which buttons or pictures can be interacted with, and indicates the jump page after clicking. In the weather application, for example, Figure 3 As shown, the normal display page of the weather application under normal circumstances after startup is indicated, as well as the abnormal display page of various abnormal circumstances (including disconnection / weak network, unknown abnormality / timeout, invalid city id, etc.). Click Close to exit the application. Click the city name to pop up a city list for the user to select a city. Click details, such as clicking the weather icon of a certain day, to enter the details page, indicating the normal details display page. Click Close to exit the details page, as well as the abnormal display page of various abnormal circumstances (including disconnection / weak network, unknown abnormality / timeout, invalid parameters, etc.). For example, when the network is disconnected or weak, the page with network connection error is displayed and jumps to the application connected to the vehicle network; when there is no response after timeout, the page asking you to try again later is displayed; when the error code specified in the interface document is reported, the corresponding specified page is displayed. For example, when the weather information of a certain city cannot be queried, the page with no data queried is displayed.

[0072] The third set of software test data contains UI configuration information, where the UI configuration information includes the type of page elements corresponding to the target software, and the types of page elements include dynamic and static. UI engineers can set the UI diagram of the corresponding page according to the UE document, and mark each page with dynamic page elements and static page elements. Dynamic page elements display different pictures or texts based on the data returned by the interface, while static page elements have fixed colors and sizes and do not change with the interface results. For example, still taking the target software as a weather application, Figure 4 As shown in the figure, the temperature (such as 23°, 25°, 26°, 27°, 28°), weather icon, date (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday), and current city are dynamic page elements, which will change according to user selection and interface return. Other elements such as the screen background are static page elements, showing a fixed picture.

[0073] By setting the corresponding software test data through professional technical personnel such as R&D engineers, UI engineers, UE engineers, etc., the workload and technical requirements are reduced compared to asking professionals with programming basics to write a large amount of code, so that non-professional testers can also perform effective testing.

[0074] S102. Input each group of the software test data into an artificial intelligence AI model to generate a test case set corresponding to each group of the software test data, wherein the test case set includes multiple test cases.

[0075] Exemplarily, the type of software test data can be text type or voice type, which is not specifically limited in this application. AI models include but are not limited to iFlytek Spark Cognitive Big Model. Each set of software test data of voice type or text type is used as the input of the AI ​​model, and a set of test cases corresponding to each set of software test data is output, wherein the test case set contains multiple test cases.

[0076] Exemplarily, the test case set includes at least one of an interface test case set, a UE test case set, and a UI test case set, each test case set contains multiple groups of test case related information, each group of test case related information includes but is not limited to the case name, priority, test item, prerequisite, step details, expected execution result, and test type, wherein the prerequisite indicates the conditions that must be met to execute the corresponding test case, the expected execution result indicates the expected result of executing the corresponding test case, and the priority indicates the priority level of the execution of the corresponding test case, and the test case with a higher priority is executed first.

[0077] In some embodiments, inputting each set of the software test data into an artificial intelligence AI model to generate a set of test cases corresponding to each set of the software test data includes:

[0078] Input the software test data of voice type into the AI ​​model to generate corresponding text data, and generate the test case set according to the text data; or

[0079] The software test data of text type is input into the AI ​​model to generate the test case set.

[0080] For voice-type software test data, the voice-type software test data is input into the AI ​​model to perform voice-to-text conversion to generate text data corresponding to the voice-type software test data, and then a test case set is generated based on the text data.

[0081] For text-type software test data, the text-type software test data is input into the AI ​​model, and a corresponding test case set is generated based on the text-type software test data.

[0082] For example, still taking the target software as a weather application, according to the first set of software test data, it is input into the AI ​​model to generate the interface test case sets corresponding to the weather list query interface and the weather details query interface as shown in Table 1 and Table 2 respectively:

[0083] Table 1

[0084]

[0085]

[0086]

[0087] Table 2

[0088]

[0089]

[0090] Each row in Table 1 and Table 2 represents the test case related information corresponding to one of the test cases in the interface test case set, where the priority levels include P1, P2, P3, P4, and P5, with P1 having the highest priority and P5 having the lowest priority.

[0091] According to the second set of software test data, it is input into the AI ​​model to generate a corresponding set of UE test cases, for example, as shown in Table 3:

[0092] Table 3

[0093]

[0094] Each row in Table 3 represents the test case related information corresponding to one of the test cases in the UE test case set.

[0095] According to the third set of software test data, it is input into the AI ​​model to generate a corresponding set of UI test cases, for example, as shown in Table 4:

[0096] Table 4

[0097]

[0098]

[0099] Each row in Table 4 represents the test case related information corresponding to one of the test cases in the UI test case set.

[0100] S103: Execute each of the test cases based on the simulation mock platform to obtain software test results corresponding to the target software.

[0101] After obtaining the test case sets such as the interface test case set, UE test case set, UI test case set, etc., each test case in the test case set is executed separately based on the mock platform to obtain the execution result of each test case. According to the execution result of each test case, the final software test result of the target software is obtained.

[0102] In some embodiments, Figure 5 As shown, step S103 may include sub-steps S1031 to S1033.

[0103] S1031, executing each of the test cases based on the mock platform to obtain an actual execution result corresponding to each of the test cases;

[0104] S1032, comparing the actual execution result with the expected execution result corresponding to each of the test cases to obtain a test case test result corresponding to each of the test cases;

[0105] S1033. Generate the software test result according to the test results of each use case.

[0106] Exemplarily, the computer device establishes a communication connection with a terminal where the target software is installed, wherein the terminal where the target software is installed includes but is not limited to a vehicle computer. For example, taking the vehicle computer as an example, ADB (Android Debug Bridge) is used to connect the vehicle computer to the computer device.

[0107] After the computer device and the terminal have successfully established a communication connection, when the terminal starts running the target software, since the computer device system is connected to the mock platform, each test case is executed based on the mock platform to obtain the actual execution result corresponding to each test case.

[0108] In some embodiments, Figure 6 As shown, step S1031 may include sub-steps S10311 to S10313.

[0109] S10311, sending a software startup instruction to the terminal so that the terminal starts the target software;

[0110] S10312. After the target software is started, the mock platform is called to execute each of the test cases to obtain response data of the terminal;

[0111] S10313. Generate the actual execution result corresponding to each test case according to the response data.

[0112] For example, taking the terminal as the car computer and the target software as the weather application, after using ADB to connect the car computer to the computer device, send the weather application startup command to the car computer. After the car computer receives the startup command, it starts the weather application. After the weather application is started, the computer device system calls the mock platform to execute each test case and obtains the response data of the car computer in real time, such as the car computer screen information. After that, the actual execution result corresponding to the test case is generated according to the response data of the car computer. For example, for the dynamic page elements contained in the car computer screen information, the dynamic page elements may include text parts, picture parts and other contents. The text part of the dynamic page elements is recognized using OCR (Optical Character Recognition) recognition technology to generate the actual execution result corresponding to the text part. For the picture part of the dynamic page element, the corresponding return value is returned to generate the actual execution result corresponding to the picture part.

[0113] After obtaining the actual execution result corresponding to the test case, the actual execution result is compared with the expected execution result corresponding to the test case to obtain the test case test result corresponding to the test case. For example, for the static page elements contained in the vehicle screen information, the static page elements are compared pixel by pixel with the UI image corresponding to the expected execution result. Through the automatic pixel-by-pixel comparison, the work intensity and workload of the testers are reduced, and the accuracy and consistency of the test are also improved. For the dynamic page elements contained in the vehicle screen information, the recognition result of the text part of the dynamic page element using OCR recognition technology is compared with the UI image corresponding to the expected execution result, and the return value corresponding to the image part of the dynamic page element is compared with the UI image corresponding to the expected execution result. Checking whether the actual execution result is consistent with the expected execution result includes not only whether the response under normal circumstances is consistent with expectations, but also whether the response under abnormal circumstances is consistent with expectations, such as whether the corresponding page can be correctly jumped to in the case of disconnection and weak network. Use the mock platform to modify the return value of the interface to cover all scenarios in the UE, and automatically modify the interface data through the mock platform to improve the test efficiency.

[0114] The test results of the weather application are generated according to all the test results of the use cases, wherein the test results of the weather application include the test results of the test cases of each test case.

[0115] In some embodiments, Figure 7 As shown, step S103 may include step S104 and step S105.

[0116] S104, generating a test report according to the software test results;

[0117] S105: Output the test report.

[0118] Exemplarily, the test report includes information such as target software information, test time, and software test results, wherein the target software information includes but is not limited to information such as software name and software version.

[0119] After the test report is generated, the test report is output, for example, the test report is displayed on a display screen of a computer device, so that relevant personnel can understand the test results of the target software through the test report.

[0120] The software testing method disclosed in the above embodiment obtains at least one set of software test data corresponding to the target software to be tested, inputs each set of software test data into the AI ​​model, generates a test case set corresponding to each set of software test data, and the test case set contains multiple test cases. Each test case is then executed based on a mock platform to obtain the software test results corresponding to the target software. This saves professionals from having to write a large amount of code, and also avoids the situation where the test results are inaccurate due to errors in the code. Therefore, the efficiency and accuracy of software testing are improved.

[0121] See also Figure 8 , Figure 8 is a schematic block diagram of a computer device provided in an embodiment of the present application. Figure 8 As shown, the computer device 300 includes one or more processors 301 and a memory 302. The processor 301 and the memory 302 are connected via a bus, such as an I2C (Inter-integrated Circuit) bus.

[0122] Among them, one or more processors 301 work individually or collectively to execute the steps of the software testing method provided in the above embodiment.

[0123] Specifically, the processor 301 may be a micro-controller unit (MCU), a central processing unit (CPU) or a digital signal processor (DSP).

[0124] Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0125] The processor 301 is used to run the computer program stored in the memory 302, and implement the steps of the software testing method provided in the above embodiment when executing the computer program.

[0126] Exemplarily, the processor 301 is used to run the computer program stored in the memory 302, and implement the following steps when executing the computer program:

[0127] Acquire at least one set of software test data corresponding to the target software to be tested;

[0128] Input each set of the software test data into an artificial intelligence AI model to generate a test case set corresponding to each set of the software test data, wherein the test case set includes multiple test cases;

[0129] Each of the test cases is executed based on the simulated mock platform to obtain the software test results corresponding to the target software.

[0130] In some embodiments, when the processor 301 implements the step of obtaining at least one set of software test data corresponding to the target software to be tested, it is configured to implement:

[0131] Query the input information to obtain the software test data corresponding to at least one test category of the target software, wherein different test categories correspond to different software test data.

[0132] In some embodiments, the test category includes at least one of an interface, a user interface UI, and a user experience UE, and the processor 301, when implementing the acquisition of the software test data corresponding to at least one test category of the target software, is used to implement:

[0133] Obtaining a first set of software test data corresponding to the interface, the first set of software test data comprising interface configuration information, the interface configuration information comprising at least one of an interface request mode, an interface request path, an interface input parameter, an interface return parameter, and an abnormal situation handling strategy; and / or

[0134] Acquire a second set of software test data corresponding to the UE, where the second set of software test data includes UE configuration information, where the UE configuration information includes interaction process information during the operation of the target software; and / or

[0135] A third set of software test data corresponding to the UI is obtained, wherein the third set of software test data includes UI configuration information, and the UI configuration information includes types of page elements corresponding to the target software, wherein the types include dynamic and static.

[0136] In some embodiments, the interface configuration information further includes an interface domain name, and the interface domain name is configured as a mock platform domain name, so as to call the mock platform based on the mock platform domain name to execute the test case.

[0137] In some embodiments, the type of the software test data is a voice type or a text type. When the processor 301 implements the step of inputting each set of the software test data into an artificial intelligence AI model to generate a set of test cases corresponding to each set of the software test data, it is used to implement:

[0138] Input the software test data of voice type into the AI ​​model to generate corresponding text data, and generate the test case set according to the text data; or

[0139] The software test data of text type is input into the AI ​​model to generate the test case set.

[0140] In some embodiments, the test case set includes at least one of an interface test case set, a UE test case set, and a UI test case set, each of which contains multiple groups of test case related information, each group of which includes at least one of a case name, a precondition, and an expected execution result, wherein the precondition indicates the conditions that must be met to execute the corresponding test case, and the expected execution result indicates the expected result of executing the corresponding test case.

[0141] In some embodiments, when executing each of the test cases based on the mock platform to obtain the software test results corresponding to the target software, the processor 301 is used to implement:

[0142] Execute each of the test cases based on the mock platform to obtain an actual execution result corresponding to each of the test cases;

[0143] Compare the actual execution result with the expected execution result corresponding to each test case to obtain a test case test result corresponding to each test case;

[0144] The software test results are generated according to the test results of each use case.

[0145] In some embodiments, the method is applied to a computer device, the computer device establishes a communication connection with a terminal where the target software is installed, and the processor 301, when executing each of the test cases based on the mock platform and obtaining the actual execution result corresponding to each of the test cases, is used to implement:

[0146] Sending a software startup instruction to the terminal so that the terminal can start the target software;

[0147] After the target software is started, calling the mock platform to execute each of the test cases and obtaining response data of the terminal;

[0148] The actual execution result corresponding to each of the test cases is generated according to the response data.

[0149] In some embodiments, after executing each of the test cases based on the mock platform and obtaining the software test results corresponding to the target software, the processor 301 is used to implement:

[0150] Generate a test report based on the software test results;

[0151] The test report is output.

[0152] An embodiment of the present application further 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 processor implements the steps of the software testing method provided in the above embodiment.

[0153] The computer-readable storage medium may be an internal storage unit of the computer device described in any of the above embodiments, such as a hard disk or memory of the terminal device. The computer-readable storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the terminal device.

[0154] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A software testing method, characterized in that: The method comprises: Acquire at least one set of software test data corresponding to the target software to be tested; Input each set of the software test data into an artificial intelligence AI model to generate a test case set corresponding to each set of the software test data, wherein the test case set includes multiple test cases; Each of the test cases is executed based on the simulated mock platform to obtain the software test results corresponding to the target software.

2. The method according to claim 1, characterized in that The step of obtaining at least one set of software test data corresponding to the target software to be tested includes: Query the input information to obtain the software test data corresponding to at least one test category of the target software, wherein different test categories correspond to different software test data.

3. The method according to claim 2, characterized in that The test category includes at least one of an interface, a user interface UI, and a user experience UE, and the acquiring the software test data corresponding to the at least one test category of the target software includes: Obtaining a first set of software test data corresponding to the interface, the first set of software test data comprising interface configuration information, the interface configuration information comprising at least one of an interface request mode, an interface request path, an interface input parameter, an interface return parameter, and an abnormal situation handling strategy; and / or Acquire a second set of software test data corresponding to the UE, where the second set of software test data includes UE configuration information, where the UE configuration information includes interaction process information during the operation of the target software; and / or A third set of software test data corresponding to the UI is obtained, wherein the third set of software test data includes UI configuration information, and the UI configuration information includes types of page elements corresponding to the target software, wherein the types include dynamic and static.

4. The method according to claim 3, characterized in that The interface configuration information also includes an interface domain name, and the interface domain name is configured as a mock platform domain name, so as to call the mock platform based on the mock platform domain name to execute the test case.

5. The method according to claim 1, characterized in that The type of the software test data is a voice type or a text type, and each set of the software test data is input into an artificial intelligence AI model to generate a set of test cases corresponding to each set of the software test data, including: Input the software test data of voice type into the AI ​​model to generate corresponding text data, and generate the test case set according to the text data; or The software test data of text type is input into the AI ​​model to generate the test case set.

6. The method according to claim 3, characterized in that The test case set includes at least one of an interface test case set, a UE test case set, and a UI test case set. Each of the test case sets contains multiple groups of test case related information. Each group of the test case related information includes at least one of a case name, a precondition, and an expected execution result. The precondition indicates the condition that must be met to execute the corresponding test case, and the expected execution result indicates the expected result of executing the corresponding test case.

7. The method according to claim 1, characterized in that Executing each of the test cases based on the mock platform to obtain the software test results corresponding to the target software includes: Execute each of the test cases based on the mock platform to obtain an actual execution result corresponding to each of the test cases; Compare the actual execution result with the expected execution result corresponding to each test case to obtain a test case test result corresponding to each test case; The software test results are generated according to the test results of each use case.

8. The method according to claim 7, characterized in that The method is applied to a computer device, the computer device establishes a communication connection with a terminal on which the target software is installed, and each of the test cases is executed based on the mock platform to obtain an actual execution result corresponding to each of the test cases, including: Sending a software startup instruction to the terminal so that the terminal can start the target software; After the target software is started, calling the mock platform to execute each of the test cases and obtaining response data of the terminal; The actual execution result corresponding to each of the test cases is generated according to the response data.

9. The method according to claim 1, characterized in that: After executing each of the test cases based on the mock platform to obtain the software test results corresponding to the target software, the method includes: Generate a test report based on the software test results; The test report is output.

10. A computer device, characterized in that: The computer device comprises: Memory and processor; Wherein, the memory is connected to the processor and is used to store programs; The processor is used to implement the steps of the software testing method according to any one of claims 1 to 9 by running the program stored in the memory.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the steps of the software testing method according to any one of claims 1 to 9.