CN114218078A - UI page testing method, device and equipment and readable storage medium - Google Patents
UI page testing method, device and equipment and readable storage medium Download PDFInfo
- Publication number
- CN114218078A CN114218078A CN202111483181.4A CN202111483181A CN114218078A CN 114218078 A CN114218078 A CN 114218078A CN 202111483181 A CN202111483181 A CN 202111483181A CN 114218078 A CN114218078 A CN 114218078A
- Authority
- CN
- China
- Prior art keywords
- page
- test
- tested
- test mode
- difference value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/368—Test management for test version control, e.g. updating test cases to a new software version
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a UI page testing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring all UI pages of a tested system; determining a test mode; testing each UI page according to the determined test mode to obtain a test result and a difference comparison graph corresponding to each UI page; integrating the test result corresponding to each UI page to obtain a test report, and gathering the difference comparison graph corresponding to each UI page to obtain a difference comparison graph set; and displaying the test report and the difference comparison atlas on a display interface to help a tester to find problems existing in UI page design. The method can automatically test all pages of a system without manual intervention, simultaneously supports the UI test of the specified pages or local areas in a specific business process, realizes high-precision page comparison and intelligent analysis of results through fusion of multiple algorithms, and quickly finds the problems of messy codes, layout dislocation and the like.
Description
Technical Field
The invention relates to the technical field of testing, in particular to a UI page testing method, a device, equipment and a readable storage medium.
Background
The traditional manual test Web interface has low efficiency, large error of naked eyes and easy test omission. Especially for enterprise-level Web application, the test quantity of interface layout is huge, the time consumption is long, and the types of browsers and machine models are complicated and many, so that the UI automatic test by only manual operation is impossible. Meanwhile, the UI interface automatic test in the prior art only supports static UI detection, only layout and difference of fixed test single pages can be realized, the mode can be used only by combining with functional automatic test, manpower is required to be invested to compile scripts, requirements on testers are high, the cost of maintaining the scripts is high, and the test range is small.
Disclosure of Invention
The invention aims to provide a UI page testing method, a device, equipment and a readable storage medium, so as to solve the problems.
In order to achieve the above object, the embodiments of the present application provide the following technical solutions:
in one aspect, an embodiment of the present application provides a UI page testing method, where the method includes:
acquiring all UI pages of a tested system;
determining a test mode based on the number of the functional points and the UI pages of the tested system;
testing each UI page according to the determined test mode to obtain a test result and a difference comparison graph corresponding to each UI page;
integrating the test result corresponding to each UI page to obtain a test report, and gathering the difference comparison graph corresponding to each UI page to obtain a difference comparison graph set;
and displaying the test report and the difference comparison atlas on a display interface to help testers to find problems existing in the UI page design.
Optionally, the determining a test mode based on the number of the function points and the UI pages of the system under test includes:
acquiring all UI pages of the tested system of the previous version;
obtaining a function point difference value according to the function point of the tested system of the previous version and the function point of the tested system; obtaining a UI page quantity difference value according to the UI page quantity of the tested system of the previous version and the UI page quantity of the tested system;
and determining a static test mode or a dynamic test mode according to the difference value of the function points and the difference value of the number of the UI pages.
Optionally, the determining a static test mode or a dynamic test mode according to the difference between the function points and the difference between the UI page numbers includes:
acquiring a function point difference threshold and a UI page quantity difference threshold;
analyzing the relation between the function point difference value and the function point difference value threshold, if the function point difference value is larger than the function point difference value threshold, selecting a static test mode, otherwise, selecting a dynamic test mode;
and analyzing the relation between the UI page quantity difference value and the UI page quantity difference value threshold, if the UI page quantity difference value is larger than the UI page quantity difference value threshold, selecting a static test mode, otherwise, selecting a dynamic test mode.
Optionally, if the determined test mode is a static test mode, the testing each UI page according to the determined test mode to obtain a test result and a difference comparison diagram corresponding to each UI page, including:
acquiring a page scanning rule;
scanning each UI page according to the page scanning rule and the depth traversal algorithm, and performing screenshot on the scanned page to obtain a page screenshot corresponding to each UI page;
and obtaining a test result and a difference comparison chart corresponding to each UI page based on the page screenshot corresponding to each UI page.
Optionally, the obtaining of the test result and the difference comparison chart corresponding to each UI page based on the page screenshot corresponding to each UI page includes:
analyzing whether a design drawing corresponding to the UI page exists or not, and if the design drawing exists, comparing a page screenshot corresponding to each UI page with the design drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; if the design drawing does not exist, analyzing whether a reference version drawing corresponding to the UI page exists or not, and if the reference version drawing exists, comparing a page screenshot corresponding to each UI page with the reference version drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; and if the reference version map does not exist, storing the UI page of the tested system as the reference version map.
Optionally, if the determined test mode is a dynamic test mode, the testing each UI page according to the determined test mode to obtain a test result and a difference comparison diagram corresponding to each UI page includes:
acquiring UI pages needing to be tested in all the UI pages of the tested system;
scanning each UI page needing to be tested, and performing screenshot on the scanned page to obtain a page screenshot corresponding to each UI page needing to be tested;
analyzing whether a reference version diagram corresponding to the UI page needing to be tested exists or not, and if the reference version diagram exists, comparing a page screenshot corresponding to each UI page needing to be tested with the reference version diagram to obtain a test result and a difference comparison diagram corresponding to each UI page needing to be tested; and if the reference version map does not exist, saving the UI page needing to be tested as the reference version map.
In a second aspect, an embodiment of the present application provides a UI page testing apparatus, which includes an obtaining module, a determining module, a testing module, an integrating module, and a displaying module.
The acquisition module is used for acquiring all UI pages of the tested system;
the determining module is used for determining a test mode based on the number of the functional points and the UI pages of the tested system;
the test module is used for testing each UI page according to the determined test mode to obtain a test result and a difference comparison chart corresponding to each UI page;
the integration module is used for integrating the test result corresponding to each UI page to obtain a test report, and gathering the difference comparison graph corresponding to each UI page to obtain a difference comparison graph set;
the display module is used for displaying the test report and the difference comparison atlas on a display interface and helping testers to find problems existing in the UI page design.
Optionally, the determining module includes:
the first acquisition unit is used for acquiring all UI pages of the tested system of the previous version;
the calculation unit is used for obtaining a function point difference value according to the function point of the tested system of the previous version and the function point of the tested system; obtaining a UI page quantity difference value according to the UI page quantity of the tested system of the previous version and the UI page quantity of the tested system;
and the determining unit is used for determining a static test mode or a dynamic test mode according to the function point difference value and the UI page number difference value.
Optionally, the determining unit includes:
the acquiring subunit is used for acquiring a function point difference threshold and a UI page number difference threshold;
the first analysis subunit is used for analyzing the relationship between the function point difference value and the function point difference value threshold, and if the function point difference value is greater than the function point difference value threshold, the static test mode is selected, otherwise, the dynamic test mode is selected;
and the second analysis subunit is used for analyzing the relationship between the UI page quantity difference value and the UI page quantity difference value threshold, selecting a static test mode if the UI page quantity difference value is greater than the UI page quantity difference value threshold, and otherwise, selecting a dynamic test mode.
Optionally, the test module includes:
the second acquisition unit is used for acquiring the page scanning rule;
the first screenshot unit is used for scanning each UI page according to the page scanning rule and the depth traversal algorithm and screenshot the scanned page to obtain a page screenshot corresponding to each UI page;
and the comparison unit is used for obtaining a test result and a difference comparison chart corresponding to each UI page based on the page screenshot corresponding to each UI page.
Optionally, the comparison unit includes:
the third analysis subunit is used for analyzing whether a design drawing corresponding to the UI page exists or not, and if the design drawing exists, comparing the page screenshot corresponding to each UI page with the design drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; if the design drawing does not exist, analyzing whether a reference version drawing corresponding to the UI page exists or not, and if the reference version drawing exists, comparing a page screenshot corresponding to each UI page with the reference version drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; and if the reference version map does not exist, storing the UI page of the tested system as the reference version map.
Optionally, the test module includes:
the third acquisition unit is used for acquiring the UI pages needing to be tested in all the UI pages of the tested system;
the second screenshot unit is used for scanning each UI page needing to be tested and screenshot the scanned page to obtain a page screenshot corresponding to each UI page needing to be tested;
the analysis unit is used for analyzing whether a reference version map corresponding to the UI page needing to be tested exists or not, and if the reference version map exists, comparing a page screenshot corresponding to each UI page needing to be tested with the reference version map to obtain a test result and a difference comparison map corresponding to each UI page needing to be tested; and if the reference version map does not exist, saving the UI page needing to be tested as the reference version map.
In a third aspect, an embodiment of the present application provides a UI page testing device, which includes a memory and a processor. The memory is used for storing a computer program; the processor is used for realizing the steps of the UI page testing method when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the steps of the UI page testing method are implemented.
The invention has the beneficial effects that:
1. according to the method, a depth-first traversal algorithm is adopted, a filtering rule is customized to intelligently explore pages and capture pictures, difference tests are realized by means of dom analysis and image comparison, any difference can be accurately compared and marked, test results are intelligently analyzed and classified, and the problems of inconsistent characters, inconsistent backgrounds, disordered positions, disordered codes and the like are definitely tested.
2. On one hand, the invention can rapidly assist a design team to check whether the system meets the design standardization; on one hand, the method can also assist testers to accurately find out version change differences, and is convenient for the testers to carry out influence analysis; the method can help to develop and position the problem quickly, improve the development efficiency and unify the front-end development standard.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart of a UI page test method according to an embodiment of the invention;
FIG. 2 is a schematic structural diagram of a UI page test device according to an embodiment of the invention;
fig. 3 is a schematic structural diagram of a UI page testing device in the embodiment of the present invention.
Detailed Description
In order to make the objects, 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 with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers or letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1
As shown in fig. 1, the present embodiment provides a UI page test method including step S1, step S2, step S3, step S4, and step S5.
Step S1, acquiring all UI pages of the tested system;
step S2, determining a test mode based on the number of the function points and the UI pages of the tested system;
step S3, testing each UI page according to the determined test mode to obtain a test result and a difference comparison chart corresponding to each UI page;
step S4, integrating the test results corresponding to each UI page to obtain a test report, and gathering the difference comparison graphs corresponding to each UI page to obtain a difference comparison graph set;
and step S5, displaying the test report and the difference comparison atlas on a display interface, and helping a tester to find the problems existing in the UI page design.
In the embodiment, all pages of a system can be automatically tested without manual intervention, UI test is supported for the specified pages or local areas in a specific business process, high-precision page comparison and intelligent analysis of results are realized through fusion of multiple algorithms, and the problems of messy codes, inconsistent characters, misplacement in layout and the like are quickly discovered;
meanwhile, the front-end page change and the error of the tested system are automatically checked, so that the checking efficiency and the checking accuracy are improved, the manual maintenance is reduced, and the labor cost is saved;
meanwhile, in the embodiment, the test result and the difference comparison atlas are displayed, so that a tester can obtain the test result and the difference comparison atlas more quickly and intuitively in a display mode, and the problem existing in the UI page design is solved more timely; meanwhile, in the embodiment, the test report and the difference comparison atlas can be sent to the mailbox of the relevant tester, and the tester can find and solve the problem more quickly by the method.
In a specific embodiment of the present disclosure, the step S2 may further include a step S21, a step S22 and a step S23.
Step S21, acquiring all UI pages of the tested system of the previous version;
step S22, obtaining a function point difference value according to the function point of the tested system of the previous version and the function point of the tested system; obtaining a UI page quantity difference value according to the UI page quantity of the tested system of the previous version and the UI page quantity of the tested system;
and step S23, determining a static test mode or a dynamic test mode according to the function point difference and the UI page number difference.
In this embodiment, a static test mode or a dynamic test mode may also be manually selected, and determining the static test mode or the dynamic test mode according to the difference between the function points or the difference between the numbers of the UI pages in this embodiment may make the selection more objective, reduce the influence of human factors, and improve the accuracy of the test.
In a specific embodiment of the present disclosure, the step S23 may further include a step S231, a step S232, and a step S233.
Step S231, acquiring a function point difference threshold and a UI page quantity difference threshold;
step S232, analyzing the relation between the function point difference value and the function point difference value threshold, if the function point difference value is larger than the function point difference value threshold, selecting a static test mode, otherwise, selecting a dynamic test mode;
step S233, analyzing a relationship between the UI page number difference and the UI page number difference threshold, and selecting a static test mode if the UI page number difference is greater than the UI page number difference threshold, otherwise selecting a dynamic test mode.
In this embodiment, the function point difference threshold and the UI page number difference threshold may be set differently according to the needs of the user, and the applicability of the method may be enhanced by this way.
In a specific embodiment of the present disclosure, the step S3 may further include a step S31, a step S32 and a step S33.
Step S31, acquiring a page scanning rule;
step S32, scanning each UI page according to the page scanning rule and the depth traversal algorithm, and capturing a screen of the scanned page to obtain a page capture corresponding to each UI page;
and step S33, obtaining a test result and a difference comparison chart corresponding to each UI page based on the page screenshot corresponding to each UI page.
In the embodiment, the page is intelligently explored and the screen is captured by a depth-first traversal algorithm and a custom filtering rule, the difference test is realized by adopting two modes of dom analysis and image comparison, any difference can be accurately compared and marked, the test result is intelligently analyzed and classified, and the problems of inconsistent characters, inconsistent background, disordered position, disordered codes and the like are definitely tested.
In a specific embodiment of the present disclosure, the step S33 may further include a step S331.
Step S331, analyzing whether a design drawing corresponding to the UI page exists, and if the design drawing exists, comparing a page screenshot corresponding to each UI page with the design drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; if the design drawing does not exist, analyzing whether a reference version drawing corresponding to the UI page exists or not, and if the reference version drawing exists, comparing a page screenshot corresponding to each UI page with the reference version drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; and if the reference version map does not exist, storing the UI page of the tested system as the reference version map.
In this embodiment, a more accurate comparison map can be selected by analyzing whether a design map exists or not and then analyzing whether a reference version map exists or not, so that a UI page with a problem in the current version is accurately found, and the accuracy of a test result and a difference comparison map is improved.
In a specific embodiment of the present disclosure, the step S3 may further include a step S34, a step S35 and a step S36.
Step S34, obtaining the UI pages needing to be tested in all the UI pages of the tested system;
step S35, scanning each UI page needing to be tested, and performing screenshot on the scanned page to obtain a page screenshot corresponding to each UI page needing to be tested;
step S36, analyzing whether a reference version diagram corresponding to the UI page needing to be tested exists or not, if so, comparing a page screenshot corresponding to each UI page needing to be tested with the reference version diagram to obtain a test result and a difference comparison diagram corresponding to each UI page needing to be tested; and if the reference version map does not exist, saving the UI page needing to be tested as the reference version map.
In this embodiment, a page to be tested can be selected in the dynamic test mode, and by using the dynamic test mode, a more flexible test mode is provided, so that a tester can randomly select a page to be tested, and the test is more flexible and more humanized.
Example 2
As shown in fig. 2, the present embodiment provides a UI page testing apparatus, which includes an obtaining module 701, a determining module 702, a testing module 703, an integrating module 704, and a displaying module 705.
The obtaining module 701 is configured to obtain all UI pages of the system under test;
the determining module 702 is configured to determine a test mode based on the number of the function points and the UI pages of the system under test;
the testing module 703 is configured to test each UI page according to the determined testing mode to obtain a testing result and a difference comparison graph corresponding to each UI page;
the integration module 704 is configured to integrate the test result corresponding to each UI page to obtain a test report, and aggregate the difference comparison graph corresponding to each UI page to obtain a difference comparison graph set;
the display module 705 is configured to display the test report and the difference comparison atlas on a display interface, so as to help a tester to find a problem in the UI page design.
In the embodiment, all pages of a system can be automatically tested without manual intervention, UI test is supported for the specified pages or local areas in a specific business process, high-precision page comparison and intelligent analysis of results are realized through fusion of multiple algorithms, and the problems of messy codes, inconsistent characters, misplacement in layout and the like are quickly discovered;
meanwhile, the front-end page change and the error of the tested system are automatically checked, so that the checking efficiency and the checking accuracy are improved, the manual maintenance is reduced, and the labor cost is saved;
meanwhile, in the embodiment, the test result and the difference comparison atlas are displayed, so that a tester can obtain the test result and the difference comparison atlas more quickly and intuitively in a display mode, and the problem existing in the UI page design is solved more timely; meanwhile, in the embodiment, the test report and the difference comparison atlas can be sent to the mailbox of the relevant tester, and the tester can find and solve the problem more quickly by the method.
In a specific embodiment of the present disclosure, the determining module 702 further includes a first obtaining unit 7021, a calculating unit 7022, and a determining unit 7023.
The first obtaining unit 7021 is configured to obtain all UI pages of the previous version of the system under test;
the calculating unit 7022 is configured to obtain a function point difference according to the function point of the previous version of the system under test and the function point of the system under test; obtaining a UI page quantity difference value according to the UI page quantity of the tested system of the previous version and the UI page quantity of the tested system;
the determining unit 7023 is configured to determine a static test mode or a dynamic test mode according to the difference between the function points and the difference between the UI page numbers.
In a specific embodiment of the present disclosure, the determining unit 7023 further includes an obtaining subunit 70231, a first analyzing subunit 70232, and a second analyzing subunit 70233.
The acquiring subunit 70231 is configured to acquire a function point difference threshold and a UI page number difference threshold;
the first analyzing subunit 70232 is configured to analyze a relationship between the function point difference value and the function point difference value threshold, select a static test mode if the function point difference value is greater than the function point difference value threshold, and select a dynamic test mode if the function point difference value is not greater than the function point difference value threshold;
the second analyzing subunit 70233 is configured to analyze a relationship between the UI page number difference and the UI page number difference threshold, select a static test mode if the UI page number difference is greater than the UI page number difference threshold, and select a dynamic test mode if the UI page number difference is not greater than the UI page number difference threshold.
In a specific embodiment of the present disclosure, the testing module 703 further includes a second obtaining unit 7031, a first cutting unit 7032, and a comparing unit 7033.
The second obtaining unit 7031 is configured to obtain a page scanning rule;
the first screenshot unit 7032 is configured to scan each UI page according to the page scanning rule and the depth traversal algorithm, and capture a screenshot of the scanned page to obtain a page screenshot corresponding to each UI page;
the comparison unit 7033 is configured to obtain a test result and a difference comparison chart corresponding to each UI page based on the page screenshot corresponding to each UI page.
In an embodiment of the present disclosure, the comparison unit 7033 further includes a third analysis subunit 70331.
The third analyzing subunit 70331 is configured to analyze whether a design drawing corresponding to the UI page exists, and if the design drawing exists, compare the page screenshot corresponding to each UI page with the design drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; if the design drawing does not exist, analyzing whether a reference version drawing corresponding to the UI page exists or not, and if the reference version drawing exists, comparing a page screenshot corresponding to each UI page with the reference version drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; and if the reference version map does not exist, storing the UI page of the tested system as the reference version map.
In a specific embodiment of the present disclosure, the testing module 703 further includes a third obtaining unit 7034, a second screenshot unit 7035, and an analyzing unit 7036.
The third obtaining unit 7034 is configured to obtain a UI page that needs to be tested in all UI pages of the system under test;
the second screenshot unit 7035 is configured to scan each UI page that needs to be tested, and perform screenshot on the scanned page to obtain a page screenshot corresponding to each UI page that needs to be tested;
the analysis unit 7036 is configured to analyze whether a reference version map corresponding to the UI page to be tested exists, and if the reference version map exists, compare a page screenshot corresponding to each UI page to be tested with the reference version map to obtain a test result and a difference comparison map corresponding to each UI page to be tested; and if the reference version map does not exist, saving the UI page needing to be tested as the reference version map.
It should be noted that, regarding the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Example 3
Corresponding to the above method embodiment, the present disclosure further provides a UI page testing device, and the UI page testing device described below and the UI page testing method described above may be referred to in a corresponding manner.
FIG. 3 is a block diagram illustrating a UI page test device 800 according to an example embodiment. As shown in fig. 3, the UI page test apparatus 800 may include: a processor 801, a memory 802. The UI page test 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.
The processor 801 is configured to control the overall operation of the UI page testing apparatus 800, so as to complete all or part of the steps in the UI page testing method. The memory 802 is used to store various types of data to support operation of the UI page test device 800, such data may include, for example, instructions for any application or method operating on the UI page test device 800, as well as application-related data such as contact data, messaging, pictures, audio, video, and so forth. The Memory 802 may be implemented by any type of volatile or non-volatile Memory device or 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, magnetic disk or optical disk. The multimedia components 803 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 802 or transmitted through the communication component 805. The audio assembly 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, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the UI page test apparatus 800 and other apparatuses. 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 that the corresponding communication component 805 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the UI page testing Device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the UI page testing methods described above.
In another exemplary embodiment, there is also provided a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the UI page testing method described above. For example, the computer readable storage medium may be the memory 802 described above comprising program instructions executable by the processor 801 of the UI page test device 800 to perform the UI page test method described above.
Example 4
Corresponding to the above method embodiment, the present disclosure also provides a readable storage medium, and a readable storage medium described below and the above UI page testing method may be referred to in correspondence with each other.
A readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the UI page testing method of the above-described method embodiments.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (14)
1. A UI page test method is characterized by comprising the following steps:
acquiring all UI pages of a tested system;
determining a test mode based on the number of the functional points and the UI pages of the tested system;
testing each UI page according to the determined test mode to obtain a test result and a difference comparison graph corresponding to each UI page;
integrating the test result corresponding to each UI page to obtain a test report, and gathering the difference comparison graph corresponding to each UI page to obtain a difference comparison graph set;
and displaying the test report and the difference comparison atlas on a display interface to help testers to find problems existing in the UI page design.
2. The UI page test method of claim 1, wherein the determining a test pattern based on the number of UI pages and function points of the system under test comprises:
acquiring all UI pages of the tested system of the previous version;
obtaining a function point difference value according to the function point of the tested system of the previous version and the function point of the tested system; obtaining a UI page quantity difference value according to the UI page quantity of the tested system of the previous version and the UI page quantity of the tested system;
and determining a static test mode or a dynamic test mode according to the difference value of the function points and the difference value of the number of the UI pages.
3. The UI page test method of claim 2, wherein the determining the static test mode or the dynamic test mode according to the function point difference and the UI page number difference comprises:
acquiring a function point difference threshold and a UI page quantity difference threshold;
analyzing the relation between the function point difference value and the function point difference value threshold, if the function point difference value is larger than the function point difference value threshold, selecting a static test mode, otherwise, selecting a dynamic test mode;
and analyzing the relation between the UI page quantity difference value and the UI page quantity difference value threshold, if the UI page quantity difference value is larger than the UI page quantity difference value threshold, selecting a static test mode, otherwise, selecting a dynamic test mode.
4. The method according to claim 1, wherein if the determined test mode is a static test mode, the step of testing each UI page according to the determined test mode to obtain a test result and a difference comparison graph corresponding to each UI page includes:
acquiring a page scanning rule;
scanning each UI page according to the page scanning rule and the depth traversal algorithm, and performing screenshot on the scanned page to obtain a page screenshot corresponding to each UI page;
and obtaining a test result and a difference comparison chart corresponding to each UI page based on the page screenshot corresponding to each UI page.
5. The UI page testing method of claim 4, wherein the obtaining of the test result and the difference comparison graph corresponding to each UI page based on the page screenshot corresponding to each UI page comprises:
analyzing whether a design drawing corresponding to the UI page exists or not, and if the design drawing exists, comparing a page screenshot corresponding to each UI page with the design drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; if the design drawing does not exist, analyzing whether a reference version drawing corresponding to the UI page exists or not, and if the reference version drawing exists, comparing a page screenshot corresponding to each UI page with the reference version drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; and if the reference version map does not exist, storing the UI page of the tested system as the reference version map.
6. The method according to claim 1, wherein if the determined test mode is a dynamic test mode, the step of testing each UI page according to the determined test mode to obtain a test result and a difference comparison graph corresponding to each UI page includes:
acquiring UI pages needing to be tested in all the UI pages of the tested system;
scanning each UI page needing to be tested, and performing screenshot on the scanned page to obtain a page screenshot corresponding to each UI page needing to be tested;
analyzing whether a reference version diagram corresponding to the UI page needing to be tested exists or not, and if the reference version diagram exists, comparing a page screenshot corresponding to each UI page needing to be tested with the reference version diagram to obtain a test result and a difference comparison diagram corresponding to each UI page needing to be tested; and if the reference version map does not exist, saving the UI page needing to be tested as the reference version map.
7. A UI page test apparatus, comprising:
the acquisition module is used for acquiring all UI pages of the tested system;
the determining module is used for determining a test mode based on the number of the functional points and the UI pages of the tested system;
the test module is used for testing each UI page according to the determined test mode to obtain a test result and a difference comparison graph corresponding to each UI page;
the integration module is used for integrating the test result corresponding to each UI page to obtain a test report, and gathering the difference comparison graph corresponding to each UI page to obtain a difference comparison graph set;
and the display module is used for displaying the test report and the difference comparison atlas on a display interface and helping testers to find problems existing in the UI page design.
8. The UI page testing device of claim 7, wherein the determining module comprises:
the first acquisition unit is used for acquiring all UI pages of the tested system of the previous version;
the calculation unit is used for obtaining a function point difference value according to the function point of the tested system of the previous version and the function point of the tested system; obtaining a UI page quantity difference value according to the UI page quantity of the tested system of the previous version and the UI page quantity of the tested system;
and the determining unit is used for determining a static test mode or a dynamic test mode according to the function point difference value and the UI page number difference value.
9. The UI page test apparatus according to claim 8, wherein the determining unit comprises:
the acquiring subunit is used for acquiring a function point difference threshold and a UI page number difference threshold;
the first analysis subunit is used for analyzing the relationship between the function point difference value and the function point difference value threshold, and if the function point difference value is greater than the function point difference value threshold, the static test mode is selected, otherwise, the dynamic test mode is selected;
and the second analysis subunit is used for analyzing the relationship between the UI page quantity difference value and the UI page quantity difference value threshold, selecting a static test mode if the UI page quantity difference value is greater than the UI page quantity difference value threshold, and otherwise, selecting a dynamic test mode.
10. The UI page testing device of claim 7, wherein the testing module comprises:
the second acquisition unit is used for acquiring the page scanning rule;
the first screenshot unit is used for scanning each UI page according to the page scanning rule and the depth traversal algorithm and screenshot the scanned page to obtain a page screenshot corresponding to each UI page;
and the comparison unit is used for obtaining a test result and a difference comparison chart corresponding to each UI page based on the page screenshot corresponding to each UI page.
11. The UI page test device of claim 10, wherein the comparing unit comprises:
the third analysis subunit is used for analyzing whether a design drawing corresponding to the UI page exists or not, and if the design drawing exists, comparing the page screenshot corresponding to each UI page with the design drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; if the design drawing does not exist, analyzing whether a reference version drawing corresponding to the UI page exists or not, and if the reference version drawing exists, comparing a page screenshot corresponding to each UI page with the reference version drawing corresponding to the UI page to obtain a test result and a difference comparison drawing corresponding to each UI page; and if the reference version map does not exist, storing the UI page of the tested system as the reference version map.
12. The UI page testing device of claim 7, wherein the testing module comprises:
the third acquisition unit is used for acquiring the UI pages needing to be tested in all the UI pages of the tested system;
the second screenshot unit is used for scanning each UI page needing to be tested and screenshot the scanned page to obtain a page screenshot corresponding to each UI page needing to be tested;
the analysis unit is used for analyzing whether a reference version map corresponding to the UI page needing to be tested exists or not, and if the reference version map exists, comparing a page screenshot corresponding to each UI page needing to be tested with the reference version map to obtain a test result and a difference comparison map corresponding to each UI page needing to be tested; and if the reference version map does not exist, saving the UI page needing to be tested as the reference version map.
13. A UI page test apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the UI page testing method according to any of claims 1 to 6 when executing the computer program.
14. A readable storage medium, characterized by: the readable storage medium has stored thereon a computer program which, when executed by a processor, carries out the steps of the UI page testing method according to any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111483181.4A CN114218078A (en) | 2021-12-07 | 2021-12-07 | UI page testing method, device and equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111483181.4A CN114218078A (en) | 2021-12-07 | 2021-12-07 | UI page testing method, device and equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114218078A true CN114218078A (en) | 2022-03-22 |
Family
ID=80699931
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111483181.4A Pending CN114218078A (en) | 2021-12-07 | 2021-12-07 | UI page testing method, device and equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114218078A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114924959A (en) * | 2022-05-13 | 2022-08-19 | 北京百度网讯科技有限公司 | Page testing method and device, electronic equipment and medium |
-
2021
- 2021-12-07 CN CN202111483181.4A patent/CN114218078A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114924959A (en) * | 2022-05-13 | 2022-08-19 | 北京百度网讯科技有限公司 | Page testing method and device, electronic equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109828903B (en) | Automatic testing method and device, computer device and storage medium | |
CN110347587B (en) | APP compatibility testing method and device, computer equipment and storage medium | |
CN108874268B (en) | User behavior data acquisition method and device | |
CN110413506A (en) | Test case recommended method, device, equipment and storage medium | |
CN106095866B (en) | The optimization method and device of application program recommended method, program starting speed | |
CN104956339B (en) | Software test script is generated from video | |
KR20140038381A (en) | Systems and methods for testing content of mobile communication devices | |
CN103528617A (en) | Cockpit instrument automatic recognizing and detecting method and device | |
CN110309498B (en) | Method and device for generating audit report based on parameters and method for generating audit report by using same | |
CN112839323A (en) | Bluetooth device testing method and device, terminal and computer readable storage medium | |
CN112445693B (en) | Page update detection method, device, equipment and storage medium | |
CN112597052A (en) | Interface testing method and device and computer readable storage medium | |
CN110580217B (en) | Software code health degree detection method, processing method, device and electronic equipment | |
CN106959919B (en) | Software testing method and device based on testing path diagram | |
CN114218078A (en) | UI page testing method, device and equipment and readable storage medium | |
CN110275820B (en) | Page compatibility testing method, system and equipment | |
CN114154799A (en) | Material quality inspection method and device and incoming material quality visual inspection system | |
CN109840212A (en) | Function test method, device, equipment and the readable storage medium storing program for executing of application program | |
CN115827435A (en) | Front-end performance testing method, electronic device and computer-readable storage medium | |
US20160132424A1 (en) | Simulating sensors | |
CN106547686A (en) | Product test method and device | |
CN113590442B (en) | Host performance detection method and device, electronic equipment and storage medium | |
CN107451047B (en) | Browser function testing method and system and electronic equipment | |
CN117472738A (en) | Test script generation method and device, readable storage medium and electronic equipment | |
CN113342628B (en) | Automatic acquisition method and device based on mobile terminal APP performance data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |