A transaction process testing method, device, equipment and readable storage medium
The transaction process testing method addresses resource-intensive maintenance issues in UI automated testing by using image recognition and similarity calculations to automate end-to-end testing, enhancing testing efficiency and adaptability in agile environments.
Patent Information
- Application Number
- CN202111630863.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Current UI automated testing methods are resource-intensive for maintenance and fail to provide comprehensive end-to-end testing, especially in agile environments, with non-integrated systems having test blind spots and inadequate evaluation capabilities.
A transaction process testing method utilizing image recognition technology to capture and analyze business operation interfaces, constructing a test data instance library, and performing automated testing based on similarity calculations to generate test reports.
This approach reduces maintenance resources and enables robust, fault-tolerant end-to-end testing by capturing entire business operation interfaces, automating UI testing, and adapting to rapid iteration cycles.
Smart Images

Figure CN114328225B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing technology, and in particular to a transaction process testing method, device, equipment and readable storage medium. Background Art
[0002] The current execution scheme based on UI automated testing invests a lot of resources in the production and maintenance of automated scripts, which cannot cope with the current agile and fast version iteration cycle. The UI automated testing method is gradually being marginalized. However, non-end-to-end testing based on interfaces or services has certain defects and test blind spots in its own environment and methods, and cannot fully evaluate and discover the operation status between non-integrated systems. Therefore, it is necessary to propose a UI automated testing method and device that is simple to maintain, has strong fault tolerance, and is capable of end-to-end testing. Summary of the invention
[0003] The object of the present invention is to provide a transaction process testing method, device, equipment and readable storage medium to improve the above-mentioned problems.
[0004] In order to achieve the above objectives, the present application provides the following technical solutions:
[0005] On the one hand, an embodiment of the present application provides a method for testing a transaction process, the method comprising:
[0006] Acquire an image set and an initial operation interface of a transaction process, wherein the image set includes at least one business operation interface, and all the business operation interfaces form a complete transaction process;
[0007] Building a test data instance library based on the image set, the test data instance library including each of the business operation interfaces, input information of each of the business operation interfaces, and operation information of each of the business operation interfaces;
[0008] The initial operation interface is tested based on the test data instance library to obtain a test report.
[0009] Optionally, constructing a test data instance library based on the image set includes:
[0010] Sorting all the business operation interfaces in the order of the transaction process to obtain sorted business operation interfaces;
[0011] Using image recognition technology, the input and output areas in each of the sorted business operation interfaces are identified to obtain the input area of each of the business operation interfaces, extract the input information of the input area, and extract the operation type information of each of the business operation interfaces;
[0012] Each of the business operation interfaces and the input information and operation type information corresponding to each of the business operation interfaces are combined to form the test data instance library.
[0013] Optionally, the testing of the initial operation interface based on the test data instance library to obtain a test report includes:
[0014] The initial operation interface is defined as a first test interface, a business operation interface corresponding to the first test interface is searched from the test data instance library, and the business operation interface corresponding to the first test interface is defined as a first business operation interface;
[0015] Acquire input information and operation type information corresponding to the first business operation interface;
[0016] Based on the acquired input information and operation type information, an operation on the first test interface is completed to obtain a display result corresponding to the first test interface;
[0017] A test report is obtained based on the test data instance library and the display results.
[0018] Optionally, searching the test data instance library for a business operation interface corresponding to the first test interface includes:
[0019] Searching whether there is a business operation interface that is completely identical to the first test interface in the test data instance library; if so, defining the business operation interface that is completely identical to the first test interface as the first business operation interface; if not, obtaining a similarity threshold, and performing similarity calculation between each of the business operation interfaces in the test data instance library and the first test interface to obtain a similarity calculation result corresponding to each of the business operation interfaces;
[0020] The similarity calculation result is analyzed, and if the similarity calculation result is greater than or equal to the similarity threshold, the business operation interface corresponding to the similarity calculation result is defined as the first business operation interface.
[0021] Optionally, obtaining a test report based on the test data instance library and the display result includes:
[0022] Analyze the displayed result, wherein if the displayed result is the output information corresponding to the first test interface, determine whether the first test interface is the final business operation interface, and if so, obtain the output information corresponding to the first business operation interface, compare and analyze the output information corresponding to the first test interface with the output information corresponding to the first operation interface, and obtain a test report; if not, generate a test record and terminate the test.
[0023] Optionally, obtaining a test report based on the test data instance library and the display result includes:
[0024] Analyze the display result, wherein if the display result is a second test interface, search the test data instance library for a business operation interface corresponding to the second test interface, and define the business operation interface corresponding to the second test interface as a second operation interface;
[0025] Acquire input information and operation type information corresponding to the second operation interface;
[0026] Based on the acquired input information and operation type information, an operation on the second test interface is completed to obtain a display result corresponding to the second test interface;
[0027] A test report is obtained based on the test data instance library and the display results corresponding to the second test interface.
[0028] In a second aspect, an embodiment of the present application provides a transaction process testing device, which includes an acquisition module, a construction module and a testing module.
[0029] An acquisition module, used to acquire an image set and an initial operation interface of a transaction process, wherein the image set includes at least one business operation interface, and all the business operation interfaces form a complete transaction process;
[0030] A construction module, used to construct a test data instance library based on the image set, wherein the test data instance library includes each of the business operation interfaces, input information of each of the business operation interfaces, and operation information of each of the business operation interfaces;
[0031] The test module is used to test the initial operation interface based on the test data instance library to obtain a test report.
[0032] Optionally, the building block includes:
[0033] A sorting unit, used to sort all the business operation interfaces according to the order of the transaction process to obtain sorted business operation interfaces;
[0034] an identification unit, used to identify the input and output areas in each of the sorted business operation interfaces by using image recognition technology, obtain the input area of each of the business operation interfaces, extract input information of the input area, and extract operation type information of each of the business operation interfaces;
[0035] The combining unit is used to combine each of the business operation interfaces and the input information and operation type information corresponding to each of the business operation interfaces to form the test data instance library.
[0036] Optionally, the test module includes:
[0037] A search unit, configured to define the initial operation interface as a first test interface, search the test data instance library for a business operation interface corresponding to the first test interface, and define the business operation interface corresponding to the first test interface as a first business operation interface;
[0038] An acquisition unit, used to acquire input information and operation type information corresponding to the first business operation interface;
[0039] An operating unit, configured to complete an operation on the first test interface based on the acquired input information and operation type information, and obtain a display result corresponding to the first test interface;
[0040] A calculation unit is used to obtain a test report based on the test data instance library and the display result.
[0041] Optionally, the searching unit includes:
[0042] a search subunit, configured to search whether there is a business operation interface that is completely identical to the first test interface in the test data instance library; if so, define the business operation interface that is completely identical to the first test interface as the first business operation interface; if not, obtain a similarity threshold, and perform similarity calculation between each of the business operation interfaces in the test data instance library and the first test interface to obtain a similarity calculation result corresponding to each of the business operation interfaces;
[0043] The first analysis subunit is configured to analyze the similarity calculation result, and if the similarity calculation result is greater than or equal to the similarity threshold, define the business operation interface corresponding to the similarity calculation result as the first business operation interface.
[0044] Optionally, the computing unit includes:
[0045] The second analysis sub-unit is used to analyze the display result, wherein if the display result is the output information corresponding to the first test interface, it is determined whether the first test interface is the final business operation interface, and if so, the output information corresponding to the first business operation interface is obtained, and the output information corresponding to the first test interface is compared and analyzed with the output information corresponding to the first operation interface to obtain a test report; if not, a test record is generated and the test is terminated.
[0046] Optionally, the computing unit includes:
[0047] A third analysis subunit is used to analyze the display result, wherein if the display result is a second test interface, search the business operation interface corresponding to the second test interface from the test data instance library, and define the business operation interface corresponding to the second test interface as a second operation interface;
[0048] An acquisition subunit, used to acquire input information and operation type information corresponding to the second operation interface;
[0049] An operation subunit, configured to complete the operation on the second test interface based on the acquired input information and operation type information, and obtain a display result corresponding to the second test interface;
[0050] The calculation subunit is used to obtain a test report based on the test data instance library and the display results corresponding to the second test interface.
[0051] In a third aspect, an embodiment of the present application provides a transaction process testing device, the device comprising a memory and a processor. The memory is used to store a computer program; the processor is used to implement the steps of the transaction process testing method when executing the computer program.
[0052] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the testing method of the above-mentioned transaction process are implemented.
[0053] In a fifth aspect, the present application also provides a computer program product or a computer program, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, it is used to load and execute the steps of the testing method of the transaction process.
[0054] The beneficial effects of the present invention are:
[0055] 1. In the present invention, the entire business operation interface is captured as the interface and data input basis for subsequent tests, and test playback assets are accumulated by retaining the screenshots. During the regression test, the screen is automatically compared with the above-mentioned retained interface to obtain the input data and operation data on the retained interface to achieve UI automation testing. The present invention replaces the traditional end-to-end testing tool based on controls or partial screenshots by taking a screenshot of the entire transaction screen and matching the playback, thus avoiding the problem of investing a large amount of maintenance resources in script recording and fault-tolerant debugging.
[0056] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0058] Figure 1 It is a flowchart of a testing method for a transaction process described in an embodiment of the present invention;
[0059] Figure 2 is a schematic diagram of the structure of a testing device for a transaction process described in an embodiment of the present invention;
[0060] Figure 3 It is a schematic diagram of the structure of the test equipment for the transaction process described in the embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0062] It should be noted that similar reference numerals or letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0063] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0064] Example 1
[0065] like Figure 1 As shown, this embodiment provides a transaction process testing method, which includes step S1, step S2 and step S3.
[0066] Step S1, obtaining an image set and an initial operation interface of a transaction process, wherein the image set includes at least one business operation interface, and all the business operation interfaces form a complete transaction process;
[0067] Step S2: constructing a test data instance library based on the image set, wherein the test data instance library includes each of the business operation interfaces, input information of each of the business operation interfaces, and operation information of each of the business operation interfaces;
[0068] Step S3: testing the initial operation interface based on the test data instance library to obtain a test report.
[0069] In this embodiment, a transaction process can be regarded as a test case, that is, the test case is tested. In the process of testing the transaction process, each business operation interface corresponding to the entire transaction process is firstly screen-shot as a whole to obtain all business operation interfaces corresponding to the transaction process; after obtaining all business operation interfaces, all business operation interfaces and input information and operation information corresponding to each business operation interface are collected to obtain the test data instance library corresponding to the transaction process; after constructing the test data instance library, the first business operation interface of the transaction process is obtained, and then the entire transaction process is tested based on the first business operation interface to obtain a test report.
[0070] In this embodiment, the entire business operation interface is captured as the interface and data input basis for subsequent tests, and test playback assets are accumulated by retaining the screenshots. During the regression test, the screen is automatically compared with the above-mentioned retained interface to obtain the input data and operation data on the retained interface to achieve UI automation testing. This embodiment replaces the traditional end-to-end testing tool based on controls or partial screenshots by taking a screenshot of the entire transaction screen and matching playback, avoiding the problem of investing a lot of maintenance resources in script recording and fault-tolerant debugging.
[0071] The test recording process of this embodiment can be run in the background without affecting the foreground test. The playback process only needs to give trigger conditions, and the interface and data are automatically matched. It can achieve the preset UI test purpose with minimal investment in transaction process and script maintenance.
[0072] In a specific implementation of the present disclosure, the step S2 may further include step S21, step S22 and step S23.
[0073] Step S21: sort all the business operation interfaces according to the order of the transaction process to obtain sorted business operation interfaces;
[0074] Step S22: using image recognition technology, identify the input and output areas in each of the sorted business operation interfaces, obtain the input area of each of the business operation interfaces, extract input information of the input area, and extract operation type information of each of the business operation interfaces;
[0075] Step S23: Combine each of the business operation interfaces and the input information and operation type information corresponding to each of the business operation interfaces to form the test data instance library.
[0076] At present, whether it is based on interface controls or through the camera to collect and operate real-time screen images, the general practice is for testers to write scripts and debug the environment according to actual conditions. For example, the image recognition solution of a robotic arm + camera is subject to many conditions such as brightness and light angle, and has poor stability. The test process control script required by the recognition solution of interface controls depends on the implementation method of the page, which is greatly affected by the constraints of the test tool itself, and it is difficult to achieve general interface automation testing. The present invention uses image recognition technology to eliminate the resource investment in traditional automation script writing, debugging and maintenance, and compares the interface image with the predetermined stored transaction process image to achieve automatic filling of test data and automatic execution of the process. It has a general interface automation testing foundation and can adapt to the needs of rapid iteration testing.
[0077] In a specific implementation of the present disclosure, the step S3 may further include step S31, step S32, step S33 and step S34.
[0078] Step S31, defining the initial operation interface as a first test interface, searching the business operation interface corresponding to the first test interface from the test data instance library, and defining the business operation interface corresponding to the first test interface as a first business operation interface;
[0079] Step S32: Obtain input information and operation type information corresponding to the first business operation interface;
[0080] Step S33: completing the operation on the first test interface based on the acquired input information and operation type information, and obtaining a display result corresponding to the first test interface;
[0081] Step S34: obtaining a test report based on the test data instance library and the display results.
[0082] In a specific implementation of the present disclosure, the step S31 may further include step S311 and step S312.
[0083] Step S311: search whether there is a business operation interface that is completely identical to the first test interface in the test data instance library; if so, define the business operation interface that is completely identical to the first test interface as the first business operation interface; if not, obtain a similarity threshold, and perform similarity calculation between each of the business operation interfaces in the test data instance library and the first test interface to obtain a similarity calculation result corresponding to each of the business operation interfaces;
[0084] Step S312: Analyze the similarity calculation result. If the similarity calculation result is greater than or equal to the similarity threshold, define the business operation interface corresponding to the similarity calculation result as the first business operation interface.
[0085] In this embodiment, when conducting a test, it is necessary to search the test data instance library for the business operation interface corresponding to the current test interface. At this time, if there is no business operation interface that is exactly the same as the current test interface, the user can customize the similarity threshold, and then calculate the similarity between each business operation interface in the test data instance library and the current test interface. When the similarity reaches the threshold or above, this business operation interface can be used as the business operation interface corresponding to the current test interface. If there are multiple business operation interfaces in the test data instance library and their similarities with the current test interface are greater than or equal to the similarity threshold, then the business operation interface corresponding to the maximum similarity value is selected as the business operation interface corresponding to the current test interface, and then the input information and operation information of this business operation interface are obtained and filled into the current test interface to test the current test interface.
[0086] In a specific implementation of the present disclosure, the step S34 may further include step S341.
[0087] Step S341, analyze the display result, wherein if the display result is the output information corresponding to the first test interface, determine whether the first test interface is the final business operation interface, and if so, obtain the output information corresponding to the first business operation interface, compare and analyze the output information corresponding to the first test interface with the output information corresponding to the first operation interface to obtain a test report; if not, generate a test record and terminate the test.
[0088] In this embodiment, if the initial operation interface obtains the input information and operation type information corresponding to the first business operation interface and displays the corresponding output information on the initial operation interface, then it will be determined whether the initial operation interface is the last test interface in the entire transaction process (equivalent to there being only one test interface in the entire transaction process). If so, the output information corresponding to the first business operation interface will be compared with the output information displayed on the initial operation interface to obtain a test report; if the initial operation interface is not the last test interface in the entire transaction process, then a test record will be generated and the test will be terminated.
[0089] In a specific implementation of the present disclosure, the step S34 may further include step S342, step S343, step S344 and step S345.
[0090] Step S342: analyzing the display result, wherein if the display result is a second test interface, searching the test data instance library for a business operation interface corresponding to the second test interface, and defining the business operation interface corresponding to the second test interface as a second operation interface;
[0091] Step S343: obtaining input information and operation type information corresponding to the second operation interface;
[0092] Step S344: completing the operation on the second test interface based on the acquired input information and operation type information, and obtaining a display result corresponding to the second test interface;
[0093] Step S345: Obtain a test report based on the test data instance library and the display results corresponding to the second test interface.
[0094] In this embodiment, if the initial operation interface obtains the input information and operation type information corresponding to the first business operation interface and displays the second test interface instead of displaying the output information on the first test interface, then the business operation interface corresponding to the second test interface will continue to be searched from the test data instance library, and then the input information and operation type information of the business operation interface corresponding to the second test interface will be filled into the second test interface, and then the display result corresponding to the second test interface will continue to be judged. If the corresponding output information is displayed on the second test interface, then it will be analyzed according to step S341. If the third test interface is displayed, then it will be analyzed according to steps S342-S345 until the entire test is completed and the test results are obtained.
[0095] Example 2
[0096] like Figure 2As shown, this embodiment provides a transaction process testing device, which includes an acquisition module 701, a construction module 702 and a testing module 703.
[0097] The acquisition module 701 is used to acquire an image set and an initial operation interface of a transaction process, wherein the image set includes at least one business operation interface, and all the business operation interfaces form a complete transaction process;
[0098] A construction module 702 is used to construct a test data instance library based on the image set, wherein the test data instance library includes each of the business operation interfaces, input information of each of the business operation interfaces, and operation information of each of the business operation interfaces;
[0099] The testing module 703 is used to test the initial operation interface based on the test data instance library to obtain a test report.
[0100] In this embodiment, the entire business operation interface is captured as the interface and data input basis for subsequent tests, and test playback assets are accumulated by retaining the screenshots. During the regression test, the screen is automatically compared with the above-mentioned retained interface to obtain the input data and operation data on the retained interface to achieve UI automation testing. This embodiment replaces the traditional end-to-end testing tool based on controls or partial screenshots by taking a screenshot of the entire transaction screen and matching playback, avoiding the problem of investing a lot of maintenance resources in script recording and fault-tolerant debugging.
[0101] The test recording process of this embodiment can be run in the background without affecting the foreground test. The playback process only needs to give trigger conditions, and the interface and data are automatically matched. It can achieve the preset UI test purpose with minimal investment in transaction process and script maintenance.
[0102] In a specific implementation of the present disclosure, the construction module 702 further includes a sorting unit 7021 , an identification unit 7022 and a combining unit 7023 .
[0103] The sorting unit 7021 is used to sort all the business operation interfaces according to the order of the transaction process to obtain sorted business operation interfaces;
[0104] The identification unit 7022 is used to identify the input and output areas in each of the sorted business operation interfaces by using image recognition technology, obtain the input area of each of the business operation interfaces, extract the input information of the input area, and extract the operation type information of each of the business operation interfaces;
[0105] The combining unit 7023 is used to combine each of the business operation interfaces and the input information and operation type information corresponding to each of the business operation interfaces to form the test data instance library.
[0106] In a specific implementation of the present disclosure, the test module 703 further includes a searching unit 7031 , an acquiring unit 7032 , an operating unit 7033 and a calculating unit 7034 .
[0107] A search unit 7031 is configured to define the initial operation interface as a first test interface, search the business operation interface corresponding to the first test interface from the test data instance library, and define the business operation interface corresponding to the first test interface as a first business operation interface;
[0108] The acquisition unit 7032 is used to acquire input information and operation type information corresponding to the first business operation interface;
[0109] An operation unit 7033 is used to complete the operation on the first test interface based on the acquired input information and operation type information, and obtain a display result corresponding to the first test interface;
[0110] The calculation unit 7034 is used to obtain a test report based on the test data instance library and the display result.
[0111] In a specific implementation of the present disclosure, the search unit 7031 further includes a search subunit 70311 and a first analysis subunit 70312 .
[0112] The search subunit 70311 is used to search whether there is a business operation interface that is completely identical to the first test interface in the test data instance library. If so, the business operation interface that is completely identical to the first test interface is defined as the first business operation interface; if not, a similarity threshold is obtained, and a similarity calculation is performed between each of the business operation interfaces in the test data instance library and the first test interface to obtain a similarity calculation result corresponding to each of the business operation interfaces;
[0113] The first analysis subunit 70312 is used to analyze the similarity calculation result, and if the similarity calculation result is greater than or equal to the similarity threshold, define the business operation interface corresponding to the similarity calculation result as the first business operation interface.
[0114] In a specific embodiment of the present disclosure, the calculation unit 7034 further includes a second analysis subunit 70341.
[0115] The second analysis subunit 70341 is used to analyze the display result, wherein if the display result is the output information corresponding to the first test interface, it is determined whether the first test interface is the final business operation interface, and if so, the output information corresponding to the first business operation interface is obtained, and the output information corresponding to the first test interface is compared and analyzed with the output information corresponding to the first operation interface to obtain a test report; if not, a test record is generated and the test is terminated.
[0116] In a specific implementation of the present disclosure, the computing unit 7034 further includes a third analyzing subunit 70342 , an acquiring subunit 70343 , an operating subunit 70344 and a computing subunit 70345 .
[0117] The third analysis subunit 70342 is used to analyze the display result, wherein if the display result is a second test interface, search the business operation interface corresponding to the second test interface from the test data instance library, and define the business operation interface corresponding to the second test interface as a second operation interface;
[0118] The acquisition subunit 70343 is used to acquire input information and operation type information corresponding to the second operation interface;
[0119] The operation subunit 70344 is used to complete the operation on the second test interface based on the acquired input information and operation type information, and obtain the display result corresponding to the second test interface;
[0120] The calculation subunit 70345 is used to obtain a test report based on the test data instance library and the display results corresponding to the second test interface.
[0121] It should be noted that, regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0122] Example 3
[0123] Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a testing device for a transaction process. The testing device for the transaction process described below and the testing method for the transaction process described above can refer to each other.
[0124] Figure 3 FIG. 8 is a block diagram of a test device 800 for a transaction process according to an exemplary embodiment. Figure 3As shown, the transaction process testing device 800 may include: a processor 801 and a memory 802. The transaction process testing device 800 may also include one or more of a multimedia component 803, an input / output (I / O) interface 804, and a communication component 805.
[0125] The processor 801 is used to control the overall operation of the transaction process test device 800 to complete all or part of the steps in the transaction process test method. The memory 802 is used to store various types of data to support the operation of the transaction process test device 800, such as instructions for any application or method used to operate on the transaction process test device 800, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the test device 800 of the transaction process and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.
[0126] In an exemplary embodiment, the transaction process testing device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned transaction process testing method.
[0127] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned transaction process testing method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the transaction process testing device 800 to complete the above-mentioned transaction process testing method.
[0128] Example 4
[0129] Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a readable storage medium. The readable storage medium described below and the test method of the transaction process described above can refer to each other.
[0130] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the transaction process testing method of the above method embodiment.
[0131] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0133] Embodiment 5:
[0134] An embodiment of the present application further provides a computer product, which includes a computer program. When the computer program is executed by a processor, the method provided in any optional embodiment of the present application is performed.
[0135] Based on the same principle as the method provided in the embodiment of the present application, the embodiment of the present application further provides a computer program product or computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the transaction flow testing method provided in any optional embodiment of the present application.
[0136] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A transaction process testing method, characterized in that: include: Acquire an image set and an initial operation interface of a transaction process, wherein the image set includes at least one business operation interface, and all the business operation interfaces form a complete transaction process; Building a test data instance library based on the image set, the test data instance library including each of the business operation interfaces, input information of each of the business operation interfaces, and operation information of each of the business operation interfaces; Testing the initial operation interface based on the test data instance library to obtain a test report; The step of constructing a test data instance library based on the image set includes: Sorting all the business operation interfaces in the order of the transaction process to obtain sorted business operation interfaces; Using image recognition technology, the input and output areas in each of the sorted business operation interfaces are identified to obtain the input area of each of the business operation interfaces, extract the input information of the input area, and extract the operation type information of each of the business operation interfaces; Combining each of the business operation interfaces and the input information and operation type information corresponding to each of the business operation interfaces to form the test data instance library; The testing of the initial operation interface based on the test data instance library to obtain a test report includes: The initial operation interface is defined as a first test interface, a business operation interface corresponding to the first test interface is searched from the test data instance library, and the business operation interface corresponding to the first test interface is defined as a first business operation interface; Acquire input information and operation type information corresponding to the first business operation interface; Based on the acquired input information and operation type information, the operation on the first test interface is completed to obtain a display result corresponding to the first test interface; A test report is obtained based on the test data instance library and the display results.
2. The transaction process testing method according to claim 1, characterized in that: The searching the test data instance library for the business operation interface corresponding to the first test interface includes: Searching whether there is a business operation interface that is completely identical to the first test interface in the test data instance library; if so, defining the business operation interface that is completely identical to the first test interface as the first business operation interface; if not, obtaining a similarity threshold, and performing similarity calculation between each of the business operation interfaces in the test data instance library and the first test interface to obtain a similarity calculation result corresponding to each of the business operation interfaces; The similarity calculation result is analyzed, and if the similarity calculation result is greater than or equal to the similarity threshold, the business operation interface corresponding to the similarity calculation result is defined as the first business operation interface.
3. The transaction process testing method according to claim 1, characterized in that: The step of obtaining a test report based on the test data instance library and the display result includes: Analyze the displayed result, wherein if the displayed result is the output information corresponding to the first test interface, determine whether the first test interface is the final business operation interface, and if so, obtain the output information corresponding to the first business operation interface, compare and analyze the output information corresponding to the first test interface with the output information corresponding to the first operation interface, and obtain a test report; if not, generate a test record and terminate the test.
4. The transaction process testing method according to claim 1, characterized in that: The step of obtaining a test report based on the test data instance library and the display result includes: Analyze the display result, wherein if the display result is a second test interface, search the test data instance library for a business operation interface corresponding to the second test interface, and define the business operation interface corresponding to the second test interface as a second operation interface; Acquire input information and operation type information corresponding to the second operation interface; Based on the acquired input information and operation type information, an operation on the second test interface is completed to obtain a display result corresponding to the second test interface; A test report is obtained based on the test data instance library and the display results corresponding to the second test interface.
5. A transaction process testing device, characterized in that: include: An acquisition module, used to acquire an image set and an initial operation interface of a transaction process, wherein the image set includes at least one business operation interface, and all the business operation interfaces form a complete transaction process; A construction module, used to construct a test data instance library based on the image set, wherein the test data instance library includes each of the business operation interfaces, input information of each of the business operation interfaces, and operation information of each of the business operation interfaces; A testing module, used to test the initial operation interface based on the test data instance library to obtain a test report; The building blocks include: A sorting unit, used to sort all the business operation interfaces according to the order of the transaction process to obtain sorted business operation interfaces; an identification unit, used to identify the input and output areas in each of the sorted business operation interfaces by using image recognition technology, obtain the input area of each of the business operation interfaces, extract input information of the input area, and extract operation type information of each of the business operation interfaces; A combining unit, used for combining each of the business operation interfaces and the input information and operation type information corresponding to each of the business operation interfaces to form the test data instance library; The test module comprises: A search unit, configured to define the initial operation interface as a first test interface, search the test data instance library for a business operation interface corresponding to the first test interface, and define the business operation interface corresponding to the first test interface as a first business operation interface; An acquisition unit, used to acquire input information and operation type information corresponding to the first business operation interface; An operating unit, configured to complete an operation on the first test interface based on the acquired input information and operation type information, and obtain a display result corresponding to the first test interface; A calculation unit is used to obtain a test report based on the test data instance library and the display result.
6. The transaction process testing device according to claim 5, characterized in that: The searching unit comprises: a search subunit, configured to search whether there is a business operation interface that is completely identical to the first test interface in the test data instance library; if so, define the business operation interface that is completely identical to the first test interface as the first business operation interface; if not, obtain a similarity threshold, and perform similarity calculation between each of the business operation interfaces in the test data instance library and the first test interface to obtain a similarity calculation result corresponding to each of the business operation interfaces; The first analysis subunit is configured to analyze the similarity calculation result, and if the similarity calculation result is greater than or equal to the similarity threshold, define the business operation interface corresponding to the similarity calculation result as the first business operation interface.
7. The transaction process testing device according to claim 5, characterized in that: The computing unit comprises: The second analysis sub-unit is used to analyze the display result, wherein if the display result is the output information corresponding to the first test interface, it is determined whether the first test interface is the final business operation interface, and if so, the output information corresponding to the first business operation interface is obtained, and the output information corresponding to the first test interface is compared and analyzed with the output information corresponding to the first operation interface to obtain a test report; if not, a test record is generated and the test is terminated.
8. The transaction process testing device according to claim 5, characterized in that: The computing unit comprises: A third analysis subunit is used to analyze the display result, wherein if the display result is a second test interface, search the business operation interface corresponding to the second test interface from the test data instance library, and define the business operation interface corresponding to the second test interface as a second operation interface; An acquisition subunit, used to acquire input information and operation type information corresponding to the second operation interface; An operation subunit, configured to complete the operation on the second test interface based on the acquired input information and operation type information, and obtain a display result corresponding to the second test interface; The calculation subunit is used to obtain a test report based on the test data instance library and the display results corresponding to the second test interface.
9. A transaction process testing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the transaction process testing method as claimed in any one of claims 1 to 4 when executing the computer program.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the transaction process testing method as claimed in any one of claims 1 to 4.
11. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, is used to load and execute the steps of the transaction flow testing method as claimed in any one of claims 1 to 4.
