Interface software testing method and device, equipment and medium
By generating a test model of interface software, the problems of low efficiency and high cost of traditional testing methods are solved, and the automated testing of interface software is realized, which improves testing efficiency and reduces labor costs.
Patent Information
- Application Number
- CN202311028500.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-25
AI Technical Summary
Traditional interface software automation testing methods are inefficient and have poor flexibility, and require a lot of modification of historical configurations when it comes to iterative updates of interface software, resulting in high testing costs.
By obtaining the display parameters of multiple objects to be tested in the interface software, using preset tools to arrange the display and record the test operations, generate the test model, and realize automated testing.
It improves the testing efficiency of interface software, reduces labor costs, and can meet the requirements of automated testing by maintaining the test model when the interface software is updated iteratively.
Smart Images

Figure CN119512918A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of testing technology, and in particular to a testing method, device, equipment and medium for interface software. Background Art
[0002] Interface software is widely used in human-computer interaction devices such as vehicle-mounted display devices. In order to ensure the stability and reliability of the interface software, the interface software needs to be tested.
[0003] Traditional automated testing methods require manual configuration of a large amount of test data to ensure that the test process proceeds normally in sequence. A large amount of interaction is required during the test. For interface software that has testing requirements, since the interface software is iteratively updated, once the interface software changes significantly, it will require a large amount of historical configuration modifications and re-establishing the automated testing process. The testing efficiency and flexibility are low, and the testing cost is high. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a testing method, device, equipment and storage medium for interface software.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating a test model, comprising:
[0006] Acquiring display parameters of a plurality of objects to be measured in the interface software, wherein the display parameters are used to locate the objects to be measured in the interface software;
[0007] Arranging and displaying the display parameters of the plurality of objects to be measured in a preset tool;
[0008] Recording test operations on the multiple objects to be tested;
[0009] Modeling is performed on the display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations to generate a test model.
[0010] In a second aspect, an embodiment of the present disclosure provides a method for testing interface software, including:
[0011] The test model pre-established according to the method of the first aspect is executed to perform preset test operations on the multiple objects to be tested in sequence according to the arrangement order of the display parameters of the multiple objects to be tested, and generate test results.
[0012] In a third aspect, an embodiment of the present disclosure provides a device for generating a test model, including:
[0013] An acquisition module, used for acquiring display parameters of a plurality of objects to be tested in the interface software, wherein the display parameters are used for locating the objects to be tested in the interface software;
[0014] An arrangement module, used for arranging and displaying the display parameters of the plurality of objects to be tested in a preset tool;
[0015] A recording module, used for recording the test operations on the multiple objects to be tested;
[0016] A building module is provided to model the display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations to generate a test model.
[0017] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in the first aspect or the second aspect above.
[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect or the second aspect is implemented.
[0019] In a fifth aspect, an embodiment of the present disclosure provides a vehicle, comprising the device or electronic device as described above.
[0020] The technical solution provided by the embodiments of the present disclosure has the following advantages compared with the prior art: by acquiring the display parameters of multiple objects to be tested in the interface software, arranging and displaying the display parameters of the multiple objects to be tested in a preset tool, and recording the test operations on the multiple objects to be tested, modeling the display parameters of the arranged and displayed multiple objects to be tested and the recorded test operations, generating a test model to execute the test model when testing, thereby realizing automated testing of the interface software, inputting the test points of the interface software into the test model in advance, and executing the test model when testing, thereby improving the test efficiency, and when the interface software is iteratively updated, the automated testing requirements can be met by maintaining the test model, saving the manpower cost of interface software testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0023] Figure 1A flow chart of a method for generating a test model provided in an embodiment of the present disclosure;
[0024] Figure 2 A flowchart of a method for testing interface software provided by an embodiment of the present disclosure;
[0025] Figure 3 A flowchart of another method for generating a test model provided by an embodiment of the present disclosure;
[0026] Figure 4 A schematic diagram of the structure of a test model generation device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0029] Figure 1 This is a flow chart of a method for generating a test model provided in an embodiment of the present disclosure. The method provided in an embodiment of the present disclosure can be executed by a test model generation device, which can be implemented in software and / or hardware and can be integrated on any electronic device with computing capabilities, such as a vehicle-mounted terminal.
[0030] like Figure 1 As shown, the method for generating a test model provided by the embodiment of the present disclosure may include:
[0031] Step 101 : obtaining display parameters of a plurality of objects to be measured in the interface software, wherein the display parameters are used to locate the objects to be measured in the interface software.
[0032] The method of this embodiment is used in the testing scenario of interface software, wherein the interface software includes multiple operable objects, and the operable objects include interactive controls, buttons, icons, etc. in the interface. The test of the interface software includes the test of performing operations such as clicking and dragging on the above-mentioned operable objects.
[0033] In this embodiment, the object to be tested refers to the operable object in the interface software that needs to be tested. All the operable objects in the interface software can be used as the object to be tested, or some of the operable objects in the interface software can be used as the object to be tested, which is determined according to actual test needs.
[0034] Among them, the display parameters can be screenshots or coordinate information. The screenshot of the object to be measured is an image containing the object to be measured obtained by selecting a certain area in the image of the interface software. As an example, for icon one in the interface software, the area where the icon one is located is selected in the image of the interface software to perform an image capture operation to obtain a screenshot corresponding to icon one. The coordinate information is used to indicate the position of the object to be measured in the interface software. As an example, a coordinate system is established based on the interface software, and each operable object in the interface software corresponds to a coordinate information in the coordinate system. For icon one in the interface software, the coordinate information corresponding to icon one can be determined through the established coordinate system.
[0035] Step 102, arranging and displaying the display parameters of the multiple objects to be tested in a preset tool.
[0036] In this embodiment, the preset tool is a pre-developed tool for creating a test model, in which the test interface can be used as a basis, edited based on the interface, and operated according to the test requirements, wherein the editing method can be an editing method based on screenshots, an editing method based on coordinate information, and an editing method that mixes screenshots and coordinate information. Optionally, when creating a new test process, the user can draw a flowchart of the test in the tool according to the number of objects to be tested, and the flowchart includes a corresponding number of test steps, and then the display parameters of multiple objects to be tested are arranged in the tool according to the flowchart order in the previous step.
[0037] It should be noted that the preset tool can be a tool developed by technicians according to needs, or an existing tool with corresponding functions can be used, which is not limited here.
[0038] Step 103: record the test operations on the multiple objects to be tested.
[0039] In this embodiment, the test operation of each object to be tested is recorded separately, including the operation steps and the operation type. The operation types include single-click, double-click, right-click, drag, and multiple clicks. By recording the test operation of each object to be tested, after exporting the test model, the corresponding test operation can be performed on multiple objects to be tested according to the record, so as to meet the requirements of automated testing and improve the test efficiency.
[0040] Step 104 , modeling the display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations to generate a test model.
[0041] In this embodiment, after the display parameters of multiple objects to be tested are arranged and displayed in a preset tool, and the test operations on the multiple objects to be tested are recorded, the tool is used to perform the operation of saving the project, and the project is exported to obtain a test model. Among them, the test model contains information such as the arrangement order of the multiple objects to be tested and the test operations corresponding to each object to be tested. In one embodiment of the present disclosure, after the test model is generated through the above steps, during the test process, the test model is executed to perform test operations on the multiple objects to be tested in sequence according to the arrangement order to generate test results. Figure 2 A flowchart of a method for testing interface software provided by an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the method also includes:
[0042] Step 105 , executing a pre-established test model to sequentially perform preset test operations on the multiple objects to be tested according to the arrangement order of the display parameters of the multiple objects to be tested, and generate test results.
[0043] In this embodiment, after the test model is generated, the test model can be verified, and after the verification is passed, the test model can be executed to perform test operations on multiple objects to be tested in order to generate test results, wherein the test results include a test report, the result of each test operation, etc. By repeatedly executing the test model, a cyclic test or a stress test can be implemented to improve the test efficiency.
[0044] The following is an explanation of the execution process of the test model.
[0045] As an example, the display parameter is a screenshot, and the execution of the test model includes: performing target detection on the image of the interface software, obtaining the operable objects in the interface software, matching the screenshot of each object to be tested with all the operable objects, determining the operable objects corresponding to each object to be tested, and then, performing test operations on the operable objects corresponding to each object to be tested in sequence according to the arrangement order of the objects to be tested, and obtaining the test results. In this example, the image processing technology can be used to match the operable objects corresponding to the screenshots in the image of the interface software. Optionally, the target detection can be implemented based on deep learning or machine learning. The target detection network can identify the operable objects such as controls, buttons and icons in the interface software and their detection frames, and match the screenshots with the detection frame areas of all operable objects. When the screenshots match the detection frame areas that are consistent or have a similarity greater than a preset threshold, the operable object is used as the operable object corresponding to the object to be tested. Among them, the display parameters of multiple objects to be tested are arranged and displayed in a certain order in the preset tool, and the derived model contains the arrangement order of multiple objects to be tested, thereby performing the recorded test operations on the operable objects in sequence according to the arrangement order to achieve automated testing.
[0046] As another example, the display parameter is coordinate information, and executing the test model includes: positioning in the interface software according to the coordinate information to determine the operable object corresponding to each object to be tested from the interface software, and then, performing the test operation on the operable object corresponding to each object to be tested in sequence according to the arrangement order of the objects to be tested, to obtain the test result. In this example, the coordinate information is used to indicate the position of the object to be tested in the interface software, so it is possible to directly position in the interface software according to the coordinate information of the object to be tested to determine the operable object corresponding to the object to be tested.
[0047] As another example, the display parameters include a mixture of screenshots and coordinate information, and the execution of the test model includes: for the object to be tested whose display parameter is a screenshot, matching the screenshot of the object to be tested with all operable objects to determine the operable object corresponding to each object to be tested; for the object to be tested whose display parameter is coordinate information, locating the object to be tested in the interface software according to the coordinate information to determine the operable object corresponding to the object to be tested from the interface software; and then, performing test operations on the operable object corresponding to each object to be tested in the arrangement order of the objects to be tested to obtain test results.
[0048] Optionally, the test model can be implemented in combination with a recording function to execute a pre-established test model, including: recording the test process in response to a trigger operation on the recording function, so as to facilitate subsequent playback, viewing and analysis. Among them, the test recording function includes the following two types: after starting the test recording function, the interface software is recorded to generate a historical record video of the test process, which is used to intuitively display the test process, for historical records, and / or, to record the data generated during the test process, including operation type, operation information, operation time, operation action, the result of each operation, etc. The recorded data is used for test playback for users to analyze the test process.
[0049] According to the technical solution of the embodiment of the present disclosure, by acquiring the display parameters of multiple objects to be tested in the interface software, the display parameters of the multiple objects to be tested are arranged and displayed in a preset tool, and the test operations on the multiple objects to be tested are recorded, and the display parameters of the arranged and displayed multiple objects to be tested and the recorded test operations are modeled to generate a test model to execute the test model when the test is performed. Thus, the automated testing of the interface software is realized, and the test points of the interface software are input into the test model in advance, which improves the test efficiency. When the interface software is iteratively updated, even if the position of the object to be tested in the interface software changes, the test of the object to be tested can be realized. By maintaining the test model, the automated testing requirements can be met, saving the manpower cost of the interface software testing.
[0050] Based on the above embodiments, Figure 3 A flow chart of another method for generating a test model provided by an embodiment of the present disclosure is shown as follows: Figure 3 As shown, the method includes:
[0051] Step 301 , obtaining display parameters of a plurality of objects to be tested in the interface software, wherein the display parameters are used to locate the objects to be tested in the interface software, and arranging and displaying the display parameters of the plurality of objects to be tested in a preset tool.
[0052] The display parameters include screenshots and coordinate information. As an example, taking screenshots as an example, test the operable objects 1, 2, and 3 in the interface software, draw a test flowchart in the tool, a total of 3 test steps, take screenshots of operable objects 1, 2, and 3 respectively and name them according to the sequence number, and get the following screenshots: Figure 1 ,cut Figure 2 ,cut Figure 3 , arrange the three screenshots in the tool in the order of the flowchart.
[0053] Step 302: Perform a click response operation in a preset tool to obtain positive responses of multiple objects to be tested. If the positive responses of the multiple objects to be tested meet expected conditions, the test operation on the multiple objects to be tested is recorded.
[0054] The click response operation is used to verify whether the object under test can be executed normally as expected. When the object under test can execute the response normally, it is determined that the expected conditions are met. As an example, the object under test includes button 1. The click response operation is performed to click button 1, and the response of button 1 is obtained. If the response indicates that button 1 is clicked normally, it is determined that the expected conditions are met, and subsequent steps can be performed to record the test operations on multiple objects under test.
[0055] Step 303: Perform test operations on multiple objects to be tested respectively to generate pre-test results.
[0056] Step 304: verify the pre-test result.
[0057] In this embodiment, a pre-test is performed before exporting the test model. The test output includes test results, operation screenshots, operation details, logs, etc. The pre-test results are verified based on the similarity between the pre-test results and the expected results. For example, when the similarity between the pre-test results and the expected results is greater than a threshold, it is determined that the verification has passed, thereby ensuring the stability of the exported test model.
[0058] Step 305 , modeling the display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations to generate a test model.
[0059] In this embodiment, when the similarity between the pre-test result and the expected result is greater than a threshold, display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations are modeled to generate a test model.
[0060] Step 306: Edit the generated test model.
[0061] Among them, editing operations include adding, deleting, modifying and other operations.
[0062] As an example, when a moving operation on the display parameters of any first object to be measured in the preset tool is detected, the arrangement order of the display parameters of the plurality of objects to be measured is modified according to the moving operation. Figure 1 ,cut Figure 2 ,cut Figure 3 , will cut Figure 2 Move to Figure 3 After that, the sorting order is changed to Figure 1 ,cut Figure 3 ,cut Figure 2 , when executing the test model, the test operation is performed in the order of operable object one, operable object three, and operable object two.
[0063] As another example, when a deletion operation on the display parameters of any second object to be tested in the preset tool is detected, the display parameters of the second object to be tested and the recorded test operation of the second object to be tested are deleted. Figure 1 ,cut Figure 2 ,cut Figure 3 , will cut Figure 3 Delete, then delete the test operation of operable object three in the record. When executing the test model, the test operation is executed in the order of operable object one and operable object two.
[0064] As another example, when an adding operation of adding a third object to be tested in the preset tool is detected, display parameters of the third object to be tested are displayed at a specified position in the preset tool, and the test operation of the third object to be tested is recorded. Figure 1 ,cut Figure 2 ,cut Figure 3 Then add the cut Figure 4 ,cut Figure 4 It is obtained by intercepting the operable object four in the image of the interface software, and recording the test operation of the operable object four. When executing the test model, the test operation is performed in the order of operable object one, operable object two, operable object three and operable object four.
[0065] In this embodiment, the exported test model can be edited. Since the display parameters of multiple objects to be tested are arranged and displayed in the preset tool during the aforementioned model establishment process, after the interface software is updated, if the interface software changes significantly, such as the positions of multiple operable objects have changed, the update can be quickly and conveniently implemented by editing the test model to adapt to the iterated or modified interface software. The model can be tested after simple editing and modification, without the need to significantly modify the test code, thereby reducing the testing cost.
[0066] According to the technical solution of the embodiment of the present disclosure, the test model can be edited by importing the model to add, delete, and modify the test points of the interface software. When the interface software is iteratively updated, even if the interface software changes significantly, it can be adapted to the automated testing requirements of the iteratively updated interface software by simply modifying the editing operations on the object to be tested in the tool. The operation is simple, the user threshold is low, and the testing efficiency is improved.
[0067] The disclosed embodiment also provides a device for generating a test model.
[0068] Figure 4 A schematic diagram of a test model generation device provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the testing device of the interface software includes: an acquisition module 41, an arrangement module 42, a recording module 43, and a creation module 44.
[0069] Wherein, the acquisition module 41 is used to acquire display parameters of multiple objects to be tested in the interface software, wherein the display parameters are used to locate the objects to be tested in the interface software;
[0070] An arrangement module 42, used for arranging and displaying the display parameters of the plurality of objects to be tested in a preset tool;
[0071] A recording module 43, used for recording the test operations on the plurality of objects to be tested;
[0072] The building module 44 models the display parameters of the plurality of objects to be tested and the recorded test operations to generate a test model.
[0073] In one embodiment of the present disclosure, the device also includes: a verification module, which is used to perform a click response operation in the preset tool to obtain a positive response of the multiple objects to be tested; if the positive responses of the multiple objects to be tested meet the expected conditions, the test operation is performed on the multiple objects to be tested respectively to generate a pre-test result; the establishment module 34 is specifically used to: when the similarity between the pre-test result and the expected result is greater than a threshold, the display parameters of the multiple objects to be tested that are arranged and displayed and the recorded test operations are modeled to generate the test model.
[0074] In one embodiment of the present disclosure, the device also includes: an editing module, which is used to modify the arrangement order of the display parameters of the multiple objects to be tested according to the move operation when a move operation is detected on the display parameters of any first object to be tested in the preset tool, so as to update the test model; and / or, when a deletion operation is detected on the display parameters of any second object to be tested in the preset tool, delete the display parameters of the second object to be tested and the recorded test operation of the second object to be tested, so as to update the test model; and / or, when an addition operation of adding a third object to be tested in the preset tool is detected, display the display parameters of the third object to be tested at a specified position in the preset tool, and record the test operation of the third object to be tested, so as to update the test model.
[0075] Furthermore, the embodiment of the present disclosure also provides a testing device for interface software, the testing device for interface software comprising:
[0076] The test module is used to execute a pre-established test model to perform preset test operations on the multiple objects to be tested in sequence according to the arrangement order of the display parameters of the multiple objects to be tested, and generate test results.
[0077] In one embodiment of the present disclosure, the display parameter is a screenshot, and the test module is specifically used to:
[0078] Performing target detection on the image of the interface software to obtain operable objects in the interface software;
[0079] Matching the screenshot of each of the objects to be tested with all operable objects to determine the operable objects corresponding to each of the objects to be tested;
[0080] The test operation is performed on each operable object corresponding to the object to be tested in sequence according to the arrangement order of the objects to be tested.
[0081] In one embodiment of the present disclosure, the display parameter is coordinate information, and the test module is specifically used to:
[0082] Positioning in the interface software according to the coordinate information to determine the operable object corresponding to each of the objects to be measured from the interface software;
[0083] The test operation is performed on each operable object corresponding to the object to be tested in sequence according to the arrangement order of the objects to be tested.
[0084] In one embodiment of the present disclosure, the testing device of the interface software also includes: a recording module, which is used to record the screen of the interface software during the test process in response to a trigger operation of the recording function to generate a historical record video of the test process, and / or record the data generated during the test process.
[0085] The test model generation device / interface software test device provided in the embodiment of the present disclosure can execute any test model generation device / interface software test method provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in the embodiment of the device of the present disclosure, reference can be made to the description in any method embodiment of the present disclosure.
[0086] An embodiment of the present disclosure also provides an electronic device, which includes one or more processors and a memory.
[0087] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0088] The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and a processor may run the program instructions to implement the method of the embodiments of the present disclosure above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0089] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and / or other forms of connection mechanisms. In addition, the input device may also include, for example, a keyboard, a mouse, etc. The output device may output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0090] Of course, for simplicity, only some of the components in the electronic device related to the present disclosure are shown, omitting components such as a bus, an input / output interface, etc. In addition, the electronic device may further include any other appropriate components according to specific application scenarios.
[0091] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0092] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0093] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0094] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0095] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0096] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a test model, characterized in that: include: Acquiring display parameters of a plurality of objects to be measured in the interface software, wherein the display parameters are used to locate the objects to be measured in the interface software; Arranging and displaying the display parameters of the plurality of objects to be measured in a preset tool; Recording test operations on the multiple objects to be tested; Modeling is performed on the display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations to generate a test model.
2. The method according to claim 1, characterized in that Before generating the test model, it also includes: Performing a click response operation in the preset tool to obtain positive responses from the multiple objects to be tested; If the positive responses of the multiple objects to be tested meet the expected conditions, performing the test operations on the multiple objects to be tested respectively to generate pre-test results; The step of modeling the display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations to generate a test model comprises: When the similarity between the pre-test result and the expected result is greater than a threshold, the display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations are modeled to generate the test model.
3. The method according to claim 1, characterized in that After generating the test model, it also includes: When a moving operation of the display parameters of any first object to be tested in the preset tool is detected, the arrangement order of the display parameters of the plurality of objects to be tested is modified according to the moving operation to update the test model; and / or, When a deletion operation of the display parameters of any second object to be tested in the preset tool is detected, the display parameters of the second object to be tested and the recorded test operation of the second object to be tested are deleted to update the test model; and / or, When an adding operation of adding a third object to be tested in the preset tool is detected, display parameters of the third object to be tested are displayed at a designated position in the preset tool, and a test operation of the third object to be tested is recorded to update the test model.
4. A method for testing interface software based on the method of claim 1, characterized in that: include: The pre-established test model is executed to perform preset test operations on the multiple objects to be tested in sequence according to the arrangement order of the display parameters of the multiple objects to be tested, and generate test results.
5. The method according to claim 4, characterized in that The display parameter is a screenshot, and the pre-established test model is executed to perform preset test operations on the multiple objects to be tested in sequence according to the arrangement order of the display parameters of the multiple objects to be tested, and generate test results, including: Performing target detection on the image of the interface software to obtain operable objects in the interface software; Matching the screenshot of each of the objects to be tested with all operable objects to determine the operable objects corresponding to each of the objects to be tested; The test operation is performed on each operable object corresponding to the object to be tested in sequence according to the arrangement order of the objects to be tested.
6. The method according to claim 4, characterized in that The display parameter is coordinate information, and the pre-established test model is executed to perform preset test operations on the multiple objects to be tested in sequence according to the arrangement order of the display parameters of the multiple objects to be tested, and generate test results, including: Positioning in the interface software according to the coordinate information, so as to determine the operable object corresponding to each of the objects to be measured in the interface software; The test operation is performed on each operable object corresponding to the object to be tested in sequence according to the arrangement order of the objects to be tested.
7. The method according to claim 4, characterized in that The executing of the pre-established test model comprises: In response to a trigger operation on the recording function, the interface software is recorded during the test process to generate a historical record video of the test process and / or record data generated during the test process.
8. A device for generating a test model, characterized in that: include: An acquisition module, used for acquiring display parameters of a plurality of objects to be tested in the interface software, wherein the display parameters are used for locating the objects to be tested in the interface software; An arrangement module, used for arranging and displaying the display parameters of the plurality of objects to be tested in a preset tool; A recording module, used for recording the test operations on the multiple objects to be tested; The building module is used to model the display parameters of the plurality of objects to be tested that are arranged and displayed and the recorded test operations to generate a test model.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.