WO2017005148A1 - Automatic software-testing method and device - Google Patents
Automatic software-testing method and device Download PDFInfo
- Publication number
- WO2017005148A1 WO2017005148A1 PCT/CN2016/088183 CN2016088183W WO2017005148A1 WO 2017005148 A1 WO2017005148 A1 WO 2017005148A1 CN 2016088183 W CN2016088183 W CN 2016088183W WO 2017005148 A1 WO2017005148 A1 WO 2017005148A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- screenshot
- tested
- software
- version
- test
- Prior art date
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
Definitions
- the present invention relates to the technical field of software testing, and in particular to an automated software testing method and apparatus.
- the embodiments of the present invention mainly solve the technical problems of low efficiency and poor performance of traditional automated testing, and provide an automated software testing solution with higher efficiency and better effect.
- the test result of the software to be tested is judged according to the comparison result.
- the reference screenshot may be obtained in advance.
- the software to be tested is operated by an automated method or a manual method, and a set of reference screenshots are obtained. This set of reference screenshots represents the correct state of the software.
- an automated software testing method includes:
- a comparison module for comparing the obtained screenshot to be tested with a reference screenshot
- the judging module is configured to judge the test result of the software to be tested according to the comparison result.
- Running fast It only needs to operate the key interface elements of the user interface, and the process of screen comparison can be completed in a few seconds, and the total test time will be greatly shortened.
- FIG. 2 is a flow chart of an automated software testing method provided by an embodiment of the present invention.
- 3(a) to 3(d) are examples of an automated software testing method provided by an embodiment of the present invention.
- each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code, the module, the program segment, or a portion of code comprising one or more Functional executable instructions.
- each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented by a dedicated hardware-based system that performs the specified function or operation, or It can be implemented in a combination of dedicated hardware and computer instructions.
- Step 101 Take a screenshot of the operation interface of the software to be tested, and save the obtained screenshot as a screenshot to be tested.
- the operation interface may be obtained by manual or automatic operation of the software to be tested.
- the subsequent comparison with the reference screenshot is performed, in order to improve the test efficiency, only part of the operation interface corresponding to the reference screenshot of the software to be tested may be screenshotd. For example, when referring to the screenshot as the user operation interface after the login operation, only the user operation interface after the corresponding login operation of the software to be tested is taken as a screenshot to be tested.
- Step 102 Compare the obtained screenshot to be tested with a reference screenshot.
- the user operation interface of the test-qualified version of the software to be tested ie, confirming the well-behaved version or the reference version
- the user operation interface of the test-qualified version of the software to be tested can be looped and traversed to measure all the screenshots and the reference screenshots. Or compare the attributes of some interface elements, and judge whether the software to be tested is qualified according to the comparison result, avoiding writing verification code and testing for each element in the screenshot to be tested, thereby greatly reducing the workload of the test. It also simplifies the complexity of testing and improves work efficiency.
- the interface element may include one or more of the following items: a button, a text box, Charts, status bars, and web links.
- the attributes of the interface element may include one or more of the following: text of the interface element, color of the interface element, picture of the interface element, and stress reflection of the interface element on the incentive operation.
- the incentive operation may include one or more of the following items: click, double-click, drag, slide, long press, dial, and enter operations, such as entering characters/letters.
- the interface elements for comparison, the attributes of the interface elements, and the types of the incentive operations can all be determined according to the specific content of the software operation interface, and the attributes of the interface elements and interface elements used for comparison in the present invention and The type of incentive operation is not limited.
- the reference screenshot may be a defect-free standard operating interface.
- the reference screenshot may be manually checked to determine that the user operation interface corresponding to the reference screenshot has no software defects. That is, those skilled in the art can understand that the reference screenshot can be a screenshot of the operation interface after the standard manual/automatic operation of the software reference version.
- the reference screenshot may also be a screenshot of any standard operation interface pre-stored by the software reference version.
- the present invention does not limit the acquisition manner and acquisition timing of the reference screenshot.
- the reference screenshot may be before step 101.
- the pre-acquisition can also be obtained during the test process when the screenshot is needed in step 102, for example, executing the verified software version to obtain its standard operation interface without defects.
- the comparison result of the two screenshots may be displayed by using a picture and/or a number, by determining whether the operation interface shown by the screenshot to be tested is relative to the standard shown in the reference screenshot. The operation interface has changed and the test results are obtained.
- the first version of the software to be tested may be tested, and the screenshot of the user operation interface obtained after the test is correct is saved as a reference screenshot. Then, the method of the present invention is executed in the second version of the software to be tested, and the obtained screenshot of the user operation interface is saved as a screenshot to be tested. Then, the obtained screenshot to be tested is compared with the reference screenshot, and the test result of the second version of the software to be tested is determined according to the comparison result.
- the first version here can be a version that confirms that it works well, that is, a reference version
- the second version can be a modified or upgraded version, that is, a version to be tested.
- the method of the embodiment of the present invention can be used for automatic testing.
- the process of the automatic test may specifically be: determining the difference between the two versions according to the comparison result of the screenshot to be tested and the reference screenshot, and optionally also combining the product design requirements to determine whether the second version has a software defect.
- the test when the comparison result shows that the second version does not change compared to the first version, the test is considered to be qualified; or when the comparison result shows that the second version has a predetermined change with respect to the first version, The second version passed the test.
- the comparison result is output only when the comparison result between the second version and the first version is different. Then, based on the comparison result, it is judged whether the second version is really defective.
- the first version and the second version may be any version specified by the user.
- the method provided by the embodiment of the present invention may be used for version confirmation and comparison.
- the reference screenshot may also be a preset or stored picture with standard operation data recorded.
- the screenshot of the operation interface can obtain the screenshot to be tested, which makes it necessary to write some points on the user interface of the software user to be tested when writing the automated test program.
- the key interface element writes the automatic operation code, and does not need to write the corresponding test code and test each element on each interface in the test version, thereby greatly reducing the amount of code written by the automated test program.
- the reference version is also changing. At this time, only the corresponding reference screenshot and the test program code need to be updated accordingly.
- the code amount of the test program is relatively small, the maintenance of the overall automated test code is performed. It is also relatively simple. In addition, the process of screen comparison can be completed in a few seconds, and the total test time is greatly shortened. Through the comparison of screenshots, the conclusion that the software version has software defects is obtained, and the test results are also very intuitive and fast.
- the following embodiments illustrate the process of the method provided by the embodiments of the present invention for automatic testing.
- 2 is an automated software testing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes:
- Step 201 Perform an automatic operation on a version of the software that works well, such as a reference version, and save the user operation interface obtained after the operation step.
- the user may save each user operation interface obtained after each operation step, and finally obtain a screenshot set; or may only save the final user operation interface obtained by the operation step of the test.
- automatic operation of the software is implemented by an automated script.
- Automated operations can be any test operation, such as swiping, long press, dialing, entering characters/letters, clicking on a button, and clicking on a web link.
- These screenshots are used as a comparison reference for subsequent automated testing.
- the reference screenshot or the screenshot set is temporarily named as screenshot A.
- the intercepted screenshot may be further manually checked to determine that the reference screenshot as a subsequent automatic test comparison is completely correct or has no software bugs.
- Step 202 Perform automatic operation on the tested version of the software, and save the user operation interface obtained after each operation step.
- the running script mentioned in step 201 may also be run on the test version of the software. And get the corresponding screenshot.
- the screenshot or screenshot set of the test version may be temporarily named as screenshot B.
- step 202 and step 201 run the same set of automatic running scripts, the strategy and order of clicking on the interface elements of the target software are the same.
- a screenshot set B is finally obtained, and in this case, the corresponding pictures in the screenshot set A and the screenshot set B can be automatically correlated. Joint comparison.
- the association between the screenshots contained in the screenshot collection can be simply related by the naming of the screenshots, for example, the name of the screenshot is automatically sequenced with the step number executed by the script, so that the screenshots in the screenshot set A may be named A01 in turn. , A02, A03, etc., and the screenshots in the screenshot set B may be named B01, B02, B03, and so on.
- the batch image comparison tool can be run by the machine to automatically compare the corresponding images in the screenshot set A and the screenshot set B one by one, and output the comparison result.
- the RGB values of each of the pixels in the screenshot A01 and the screenshot B01 can be obtained, and then the similarity or peak signal to noise ratio is calculated, and the similarity or peak signal to noise ratio is taken as the final comparison result.
- the comparison operation result may be displayed in a digital manner, or may be displayed in the form of a picture, or two display modes may be utilized at the same time.
- the difference between the two pictures can be represented by digital information such as the numerical difference of the pixel values and the coordinate position where the difference is located.
- specific differences can be identified on screenshot A or screenshot B in a highlighted or otherwise identifiable manner. The way images are displayed is usually more intuitive, but it's clear that digital presentations are more efficient.
- only the comparison result may be set differently.
- the comparison operation result is output, if the comparison result shows that the two corresponding pictures are identical, the comparison operation result is not output.
- the comparison process of referring to the screenshot and the screenshot to be tested can also be performed manually.
- the present invention does not limit the manner in which the reference screenshot and the screenshot to be tested are compared.
- Step 204 Determine a test result of the software to be tested according to the comparison result.
- the tester can quickly conclude whether the software version to be tested has software defects.
- Step 205 Once it is determined that there is no software defect in the software version to be tested, the original reference screenshot is replaced by the screenshot of the software to be tested, as a reference for the subsequent automatic test comparison of the next software version.
- Figure 3(b) shows the screenshot to be tested corresponding to the second version.
- the picture comparison program is run to compare the two pictures.
- the picture comparison tool is imagemagick.
- the programmer can also use other image comparison tool software to complete the picture comparison process, and any picture comparison tool capable of batch processing pictures can be used to complete the picture comparison process.
- Picture pair of the invention The types of sheet contrast tools are also not limited.
- compare is the main running program
- -verbose-metric PSNR is the running parameter, specifically for screenshot A imageA.png, screenshot B imageB.png, and contrast output file diff.png.
- the content of the command line is specifically: calculating the peak signal-to-noise ratio of the two images imageA and imageB, and outputting the digital result, and simultaneously highlighting the different points in the image and outputting them to the diff.png file. Among them, if the two images are different, different parts will be marked in the comparison output file. If the two images are identical, the digital output is 0 and the output image has no highlights.
- the tester can determine whether the deletion of the back button is a known change or a bug caused by the negligence of the developer. If the deletion of the back button is a known change intentionally made by the product design, then the screenshot A shown in Figure 3(b) is used instead of the screenshot A as a comparison reference for subsequent versions. If the deletion of the back button is caused by negligence, the bug found will be returned to the developer for modification.
- the testing step generally includes: defining each element on the user interface, such as a button, Tags, etc.; then, write test code for each element to verify the properties of those elements, such as text, color, position, size, and so on. Specifically, for example, verify that the color, position, and size of the box of “number search” at the top of the page are correct, verify that the font, size, color, and position of the display text “number search” are correct, and verify the list displayed on the page.
- test screenshot as shown in FIG. 3(b), which is compared with the reference screenshot shown in FIG. 3(a) by means of a graphic comparison. Detection. As long as the same is true, even if there are differences, it is possible to quickly determine whether there are software defects and accurately locate software defects. This not only saves the workload of writing code, but also has high efficiency and can find software defects more accurately; it solves the problem of low efficiency and poor effect of traditional automated testing.
- the software to be tested is a mobile phone application
- the pseudo code for executing the automated software testing method of the present invention may be specifically as follows:
- the following is the second step of the automated test, copying the screenshot from the SD card of the phone to the specified folder of the computer.
- the following is the third step of the automated test, run the image comparison program, compare the screenshots of this run with the previous images, and get the comparison results.
- Diff util.compare_images(self.machine_center.get_property("local_image_folder"),self.machine_center.get_property("template_image_folder"),self.machine_center.get_property("diff_image_folder"),self.machine_center.get_property("diff_file”))
- An embodiment of the invention also provides an automated test device.
- the automated test apparatus includes:
- the screenshot module is configured to take a screenshot of the user operation interface of the software to be tested version, and save the obtained screenshot as a screenshot to be tested;
- a judging module configured to determine, according to the comparison result obtained by the comparison module, a test result of the software to be tested.
- the automated testing device may further include:
- An automatic script module for implementing automatic operation of the software version detects whether the software can implement the set function by automatically operating elements on one or more user interfaces of the software.
- the obtained user operation interface is saved as a screenshot to be tested.
- the screenshot module may further invoke the automatic script module to automatically perform a reference operation on the reference version to obtain a reference screenshot.
- the automated testing device may further include:
- the screenshot to be tested is called as a reference screenshot.
- the reference screenshot acquisition module may also invoke an automatic script module to perform an automated operation on the tested qualified software, and save the user interface obtained after the automatic operation as a reference screenshot.
- embodiments of the present invention may also be implemented by hardware, or a combination of software and hardware.
- the hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated design hardware.
- a suitable instruction execution system such as a microprocessor or dedicated design hardware.
- processor control code such as a carrier medium such as a magnetic disk, CD or DVD-ROM, such as read-only memory (firmware).
- Such code is provided on a programmable memory or data carrier such as an optical or electronic signal carrier.
- the apparatus of the present invention and its modules may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, and the like. It can also be implemented by software executed by various types of processors, or by a combination of the above-described hardware circuits and software such as firmware.
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
Provided are an automatic software-testing method and device. The automatic software-testing method comprises: (101) taking a screenshot of a user interface of a beta software package, and saving the screenshot as a test screenshot; (102) comparing the test screenshot with a reference screenshot; and (103) determining a test result of the beta software package according to a comparison result. Using the automatic software-testing method and device increases efficiency and accuracy of an automatic test.
Description
本发明涉及软件测试的技术领域,特别涉及一种自动化地软件测试方法和装置。The present invention relates to the technical field of software testing, and in particular to an automated software testing method and apparatus.
测试在软件开发的过程中占据比较重要的作用。现代软件的快速迭代对测试的效率和质量有了更高的要求,因此自动化测试成为了必然的选择。Testing plays a more important role in the process of software development. The rapid iteration of modern software has higher requirements for the efficiency and quality of testing, so automated testing has become an inevitable choice.
现有的自动测试方法通常有如下方式:Existing automated test methods usually have the following methods:
1)通过编写代码调用程序接口得到返回值并对其进行验证。1) Get the return value and verify it by writing a code call to the program interface.
2)编写代码得到用户界面上面的一些元素,如按钮等;然后直接验证这些元素的一些属性,如文字,颜色,图片等。2) Write code to get some elements of the user interface, such as buttons; then directly verify some of the attributes of these elements, such as text, color, images, and so on.
3)编写代码得到用户界面上面的一些元素,并对这些元素进行操作,如点击;最后对操作的结果进行验证。3) Write code to get some elements of the user interface, and operate on these elements, such as clicks; finally verify the results of the operation.
这种自动化测试在带来方便和准确的同时,也有一些弊端,比如运行时间长,出错概率高,维护成本较高等。具体而言,现有的自动化测试方案的主要弊端有:This kind of automated test brings convenience and accuracy, but also has some drawbacks, such as long running time, high probability of error, and high maintenance cost. Specifically, the main drawbacks of existing automated test solutions are:
1)编写自动化测试的代码量较大,需要花费时间较多;1) The amount of code for writing automated tests is large and takes a lot of time;
2)当产品的界面或者功能做了修改以后,大部分自动化测试代码就失效了,需要重新编写;2) When the interface or function of the product has been modified, most of the automated test code will be invalid and need to be rewritten;
3)自动化测试运行时间较长,往往需要数个小时甚至更长才能完成一轮完整的自动化测试;3) Automated test runs for a long time, often takes hours or even longer to complete a complete round of automated testing;
4)当自动化测试用例运行出错的时候,往往很难辨别到底是产品功能
或界面做了修改,还是真的出了软件缺陷(bug),需要很长时间进行分析和调研才能定位问题并最终得出结论。4) When the automated test case runs wrong, it is often difficult to distinguish whether it is a product function.
Or the interface has been modified, or there is a software bug. It takes a long time to analyze and research to locate the problem and finally reach a conclusion.
因此,需要一种可以更加省时省力,同时又能保证测试有效性的测试方法。Therefore, there is a need for a test method that can save time and effort while ensuring the effectiveness of the test.
发明内容Summary of the invention
有鉴于此,本发明实施例主要解决的是传统自动化测试效率低以及效果差的技术问题,提供一种效率更高、效果更佳的自动化软件测试方案。In view of this, the embodiments of the present invention mainly solve the technical problems of low efficiency and poor performance of traditional automated testing, and provide an automated software testing solution with higher efficiency and better effect.
在本发明的一个方面,提供一种自动化地软件测试方法。该方法包括:In one aspect of the invention, an automated software testing method is provided. The method includes:
对待测软件的用户操作界面进行截图,并将所得的截图保存为待测截图;Take a screenshot of the user interface of the software to be tested, and save the obtained screenshot as the screenshot to be tested;
将获得的待测截图与参照截图进行对比;以及,Compare the obtained screenshots to be tested with the reference screenshots; and,
根据对比结果判断所述待测软件的测试结果。The test result of the software to be tested is judged according to the comparison result.
根据本发明的一个实施方式,参照截图可以是事先获取的。通过自动化方法或者人工方法对待测软件进行操作,并得到一组参照截图,这组参照截图代表软件的正确状况。According to one embodiment of the invention, the reference screenshot may be obtained in advance. The software to be tested is operated by an automated method or a manual method, and a set of reference screenshots are obtained. This set of reference screenshots represents the correct state of the software.
根据本发明的一个实施方式,参照截图对应软件的确认运作良好的版本的用户操作界面,而获得的待测截图对应新版本的待测软件的用户操作界面。在这种情况下,根据获得的待测截图与参照截图的对比结果来判断所述待测软件的测试结果,包括判断新版本的软件是否有问题。According to an embodiment of the present invention, the user-operated interface of the version that corresponds to the well-recognized version of the screenshot corresponding software is obtained, and the obtained screenshot to be tested corresponds to the user operation interface of the new version of the software to be tested. In this case, the test result of the software to be tested is judged according to the obtained comparison result of the screenshot to be tested and the reference screenshot, including whether the software of the new version has a problem.
具体而言,根据本发明的一个实施例,提供一种自动化地软件测试方法,其包括:Specifically, in accordance with an embodiment of the present invention, an automated software testing method is provided that includes:
通过自动化方法或者人工方法对软件进行操作,并得到一组参照截图,这组参照截图代表软件的正确状况。The software is operated by an automated method or a manual method, and a set of reference screenshots are obtained. This set of reference screenshots represents the correct status of the software.
对新版本的待测软件的用户操作界面进行截图,并将所得的截图保存为待测截图;
Take a screenshot of the user interface of the new version of the software to be tested, and save the obtained screenshot as the screenshot to be tested;
将获得的待测截图与参照截图进行对比;以及Compare the obtained screenshots to be tested with reference screenshots; and
根据对比结果判断所述待测软件的测试结果来判断新版本的软件是否有问题。Judging the test result of the software to be tested according to the comparison result to determine whether the new version of the software has a problem.
本发明实施例还提供了一种自动化测试装置,包括:An embodiment of the present invention further provides an automated testing device, including:
截图模块,用于对待测软件的用户操作界面进行截图,并将所得的截图保存为待测截图;The screenshot module is used for taking a screenshot of the user operation interface of the software to be tested, and saving the obtained screenshot as a screenshot to be tested;
对比模块,用于将获得的待测截图与参照截图进行对比;以及,a comparison module for comparing the obtained screenshot to be tested with a reference screenshot; and
判断模块,用于根据对比结果判断所述待测软件的测试结果。The judging module is configured to judge the test result of the software to be tested according to the comparison result.
采用本发明实施例所提供的自动化地软件测试方法的有益效果在于:The beneficial effects of the automated software testing method provided by the embodiments of the present invention are as follows:
1.自动化测试程序的编写简单。只需要对界面的关键元素进行操作,其余大部分的验证都是通过截图对比来实现的,所以代码量会大大减少。1. The preparation of automated test procedures is simple. Only need to operate on the key elements of the interface, most of the rest of the verification is achieved through screenshot comparison, so the amount of code will be greatly reduced.
2.运行速度快。只需对用户操作界面的关键界面元素进行操作,而且截屏对比的过程只要几秒钟就可以完成,总的测试时间会大大缩短。2. Running fast. It only needs to operate the key interface elements of the user interface, and the process of screen comparison can be completed in a few seconds, and the total test time will be greatly shortened.
3.错误定位更精确。通过截图对比来得出软件是否有缺陷的结论,测试非常直观,可以快速得知这个差异是因为新的设计引起的还是确实有软件缺陷。3. Error positioning is more accurate. By comparing the screenshots to draw conclusions about whether the software is defective, the test is very intuitive, and it can be quickly learned whether the difference is caused by a new design or a software defect.
4.维护成本低。因为代码量小,而且软件如果改版之后,只需要更新参照截图就可以了,所以整体自动化测试代码的维护比较简单。4. Low maintenance costs. Because the amount of code is small, and the software only needs to update the reference screenshot after the revision, the maintenance of the overall automated test code is relatively simple.
图1是本发明实施例提供的一种自动化地软件测试方法的流程图。FIG. 1 is a flowchart of an automated software testing method according to an embodiment of the present invention.
图2是本发明实施例提供的一种自动化地软件测试方法的流程图。2 is a flow chart of an automated software testing method provided by an embodiment of the present invention.
图3(a)~3(d)是本发明实施例提供的一种自动化地软件测试方法的实例。3(a) to 3(d) are examples of an automated software testing method provided by an embodiment of the present invention.
为使本发明的目的、技术方案和优点更加清楚,下面结合附图对本发明
作进一步的详细描述。In order to make the objects, technical solutions and advantages of the present invention more clear, the present invention will be described below with reference to the accompanying drawings.
For further detailed description.
附图中的流程图和框图,图示了按照本发明各种实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,所述模块、程序段、或代码的一部分包含一个或多个用于实现预定的逻辑功能的可执行指令。也应当注意,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality and operation of possible implementations of apparatus, methods and computer program products in accordance with various embodiments of the invention. In this regard, each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code, the module, the program segment, or a portion of code comprising one or more Functional executable instructions. It should also be noted that each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or It can be implemented in a combination of dedicated hardware and computer instructions.
图1是本发明实施例提供的一种自动化地软件测试方法的流程图。如图1所示,该自动化地软件测试方法包括:FIG. 1 is a flowchart of an automated software testing method according to an embodiment of the present invention. As shown in Figure 1, the automated software testing method includes:
步骤101:对待测软件的操作界面进行截图,并将所得的截图保存为待测截图。Step 101: Take a screenshot of the operation interface of the software to be tested, and save the obtained screenshot as a screenshot to be tested.
具体而言,可以是对待测软件的全部或部分操作界面进行截图,操作界面可通过对待测软件进行人工或自动操作的方式获得。在本发明一实施例中,由于后续要和参照截图进行对比,因此为了提高测试效率,也可以是仅对待测软件的与参照截图对应的部分操作界面进行截图。例如,当参照截图为进行登录操作后的用户操作界面时,则仅需将对待测软件进行相应登录操作后的用户操作界面截图为待测截图即可。Specifically, it may be a screenshot of all or part of the operation interface of the software to be tested, and the operation interface may be obtained by manual or automatic operation of the software to be tested. In an embodiment of the present invention, since the subsequent comparison with the reference screenshot is performed, in order to improve the test efficiency, only part of the operation interface corresponding to the reference screenshot of the software to be tested may be screenshotd. For example, when referring to the screenshot as the user operation interface after the login operation, only the user operation interface after the corresponding login operation of the software to be tested is taken as a screenshot to be tested.
步骤102:将获得的待测截图与参照截图进行对比。Step 102: Compare the obtained screenshot to be tested with a reference screenshot.
根据本发明的一个实施例,参照截图对应该待测软件经测试合格的版本(即确认运动良好的版本或参照版本)的用户操作界面,可以循环遍历的方式对待测截图与参照截图中的全部或部分界面元素的属性进行对比,并根据对比结果判断该软件待测版本合格与否,避免了为待测截图中的每一个元素编写验证代码并进行测试,从而大大减轻了测试的工作负担,也简化了测试的复杂度,提高了工作效率。According to an embodiment of the present invention, referring to the screenshot, the user operation interface of the test-qualified version of the software to be tested (ie, confirming the well-behaved version or the reference version) can be looped and traversed to measure all the screenshots and the reference screenshots. Or compare the attributes of some interface elements, and judge whether the software to be tested is qualified according to the comparison result, avoiding writing verification code and testing for each element in the screenshot to be tested, thereby greatly reducing the workload of the test. It also simplifies the complexity of testing and improves work efficiency.
具体而言,界面元素可包括以下几项中的一种或多种:按钮、文本框、
图表、状态栏和网页链接。界面元素的属性可包括以下几项中的一种或多种:界面元素的文字、界面元素的颜色、界面元素的图片和界面元素对激励操作的应激反映。其中,激励操作可包括以下几项中的一种或多种:单击、双击、拖动、滑动、长按、拨号和录入操作,比如录入字符/字母。Specifically, the interface element may include one or more of the following items: a button, a text box,
Charts, status bars, and web links. The attributes of the interface element may include one or more of the following: text of the interface element, color of the interface element, picture of the interface element, and stress reflection of the interface element on the incentive operation. The incentive operation may include one or more of the following items: click, double-click, drag, slide, long press, dial, and enter operations, such as entering characters/letters.
本领域技术人员可以理解,用于对比的界面元素、界面元素的属性和激励操作的类型均可根据软件操作界面的具体内容而定,本发明对用于对比的界面元素、界面元素的属性和激励操作的类型不做限定。Those skilled in the art can understand that the interface elements for comparison, the attributes of the interface elements, and the types of the incentive operations can all be determined according to the specific content of the software operation interface, and the attributes of the interface elements and interface elements used for comparison in the present invention and The type of incentive operation is not limited.
本领域技术人员仍然可以理解,无需对用户操作界面的每个元素及元素的每个属性逐一进行对比,当测试人员主要关注用户操作界面上的某些关键界面元素时,也可以仅对待测截图与参照截图中的关键界面元素的属性进行对比。本发明对用于对比的界面元素的种类和数量不做限定。Those skilled in the art can still understand that it is not necessary to compare each attribute of each element and element of the user operation interface one by one. When the tester mainly focuses on some key interface elements on the user operation interface, only the screenshot can be measured. Compare with the properties of the key interface elements in the reference screenshot. The present invention does not limit the kind and number of interface elements used for comparison.
在本发明一实施例中,参照截图可以是一个无缺陷的标准操作界面。为了确保参照截图所呈现的用户操作界面为所需求的无缺陷的标准操作界面,还可对参照截图进行人工检查,以确定参照截图所对应的用户操作界面没有软件缺陷。即,本领域技术人员可以理解,参照截图可以是对该软件参照版本进行标准人工/自动操作后的操作界面的截图。In an embodiment of the invention, the reference screenshot may be a defect-free standard operating interface. In order to ensure that the user operation interface presented by the reference screenshot is the required non-defective standard operation interface, the reference screenshot may be manually checked to determine that the user operation interface corresponding to the reference screenshot has no software defects. That is, those skilled in the art can understand that the reference screenshot can be a screenshot of the operation interface after the standard manual/automatic operation of the software reference version.
在本发明另一实施例中,参照截图也可以是该软件参照版本预存的任意一个标准操作界面截图,本发明对参照截图的获取方式和获取时机不做限定,比如,参照截图可以步骤101之前事先获取,也可以在测试过程中在步骤102需要参照截图时进行获取,例如执行被确认合格的软件版本,获得其无缺陷的标准操作界面。In another embodiment of the present invention, the reference screenshot may also be a screenshot of any standard operation interface pre-stored by the software reference version. The present invention does not limit the acquisition manner and acquisition timing of the reference screenshot. For example, the reference screenshot may be before step 101. The pre-acquisition can also be obtained during the test process when the screenshot is needed in step 102, for example, executing the verified software version to obtain its standard operation interface without defects.
步骤103:根据对比结果判断所述待测软件版本的测试结果。根据本发明的实施例,通过对待测软件的待测截图与参照截图进行对比,根据该对比的差异性来确定该待测版本是否存在软件缺陷。Step 103: Determine a test result of the software version to be tested according to the comparison result. According to an embodiment of the present invention, by comparing the to-be-tested screenshot of the software to be tested with the reference screenshot, it is determined whether the version to be tested has a software defect according to the difference of the comparison.
在本发明一实施例中,两种截图的对比结果可采用图片和/或数字的方式展示,通过判断待测截图所示的操作界面是否相对于参照截图所示的标准
操作界面发生了变化,获得测试结果。In an embodiment of the present invention, the comparison result of the two screenshots may be displayed by using a picture and/or a number, by determining whether the operation interface shown by the screenshot to be tested is relative to the standard shown in the reference screenshot.
The operation interface has changed and the test results are obtained.
在本发明一实施例中,可以通过对待测软件的第一版本进行测试,将测试无误后获得的用户操作界面截图保存为参照截图。然后对待测软件的第二版本执行本发明所述方法,并将获得的用户操作界面截图保存为待测截图。接着,将获得的待测截图与参照截图进行对比,根据对比结果判断待测软件第二版本的测试结果。In an embodiment of the present invention, the first version of the software to be tested may be tested, and the screenshot of the user operation interface obtained after the test is correct is saved as a reference screenshot. Then, the method of the present invention is executed in the second version of the software to be tested, and the obtained screenshot of the user operation interface is saved as a screenshot to be tested. Then, the obtained screenshot to be tested is compared with the reference screenshot, and the test result of the second version of the software to be tested is determined according to the comparison result.
这里的第一版本可为确认运作良好的版本,即参照版本,第二版本可以是修改或升级版本,即待测版本。在这种情况下,本发明实施例的方法可以用于自动测试。自动测试的过程具体可为:根据待测截图与参照截图的对比结果来确定该两个版本的差异,以及可选地还结合产品设计需求,判断第二版本是否存在软件缺陷。The first version here can be a version that confirms that it works well, that is, a reference version, and the second version can be a modified or upgraded version, that is, a version to be tested. In this case, the method of the embodiment of the present invention can be used for automatic testing. The process of the automatic test may specifically be: determining the difference between the two versions according to the comparison result of the screenshot to be tested and the reference screenshot, and optionally also combining the product design requirements to determine whether the second version has a software defect.
在本发明一实施例中,当对比结果显示第二版本相比第一版本没有发生变化,则认为测试合格;或者当对比结果显示第二版本相对于第一版本发生预定变化时,则认为第二版本测试合格。In an embodiment of the present invention, when the comparison result shows that the second version does not change compared to the first version, the test is considered to be qualified; or when the comparison result shows that the second version has a predetermined change with respect to the first version, The second version passed the test.
在本发明一实施例中,在第二版本与第一版本完全一致时判定第二版本不存在缺陷的情况下,只有在第二版本与第一版本的对比结果为不同时,才输出对比结果,然后再根据该对比结果判断第二版本是否真的存在缺陷。In an embodiment of the present invention, when it is determined that the second version does not have a defect when the second version is completely consistent with the first version, the comparison result is output only when the comparison result between the second version and the first version is different. Then, based on the comparison result, it is judged whether the second version is really defective.
在本发明另一实施例中,第一版本和第二版本可以是用户任意指定的版本,在这种情况下,本发明实施例提供的方法可以用于版本确认和比对。In another embodiment of the present invention, the first version and the second version may be any version specified by the user. In this case, the method provided by the embodiment of the present invention may be used for version confirmation and comparison.
本领域技术人员还可以理解,并不是必须通过对待测试软件的确认运作良好的版本进行自动操作才能得到参照截图,参照截图也可以是预先设定或存储的记录有标准操作数据的图片。It will also be understood by those skilled in the art that it is not necessary to perform an automatic operation by confirming that the test software is in a well-functioning version to obtain a reference screenshot. The reference screenshot may also be a preset or stored picture with standard operation data recorded.
利用本发明实施例提供的技术方案,由于是采用截图对比的方式来验证软件待测版本与参照版本的差异,因此,仅需对待测软件的一些关键界面元素进行自动操作,并保存自动操作后的操作界面截图即可获得待测截图,这使得在编写自动化测试程序时,仅需针对待测软件用户操作界面上的一些关
键界面元素编写自动操作代码,而无需对待测版本中每一个界面上的每一个元素编写对应的测试代码并进行测试,从而大大减少了自动化测试程序的编写代码量。同时,随着待测软件的更迭,参照版本也在发生变化,此时只需要相应更新参照截图以及更改测试程序代码就可以了,由于测试程序的代码量比较小,所以整体自动化测试代码的维护也比较简单。另外,截屏对比的过程只要几秒钟就可以完成,总的测试时间大大缩短。通过截图对比来得出软件版本是否存在软件缺陷的结论,测试结果也非常直观、快速。With the technical solution provided by the embodiment of the present invention, since the difference between the software to be tested version and the reference version is verified by using the screenshot comparison method, only some key interface elements of the software to be tested are automatically operated, and the automatic operation is saved. The screenshot of the operation interface can obtain the screenshot to be tested, which makes it necessary to write some points on the user interface of the software user to be tested when writing the automated test program.
The key interface element writes the automatic operation code, and does not need to write the corresponding test code and test each element on each interface in the test version, thereby greatly reducing the amount of code written by the automated test program. At the same time, with the change of the software to be tested, the reference version is also changing. At this time, only the corresponding reference screenshot and the test program code need to be updated accordingly. Since the code amount of the test program is relatively small, the maintenance of the overall automated test code is performed. It is also relatively simple. In addition, the process of screen comparison can be completed in a few seconds, and the total test time is greatly shortened. Through the comparison of screenshots, the conclusion that the software version has software defects is obtained, and the test results are also very intuitive and fast.
以下实施例说明本发明实施例提供的方法用于自动测试的过程。图2为本发明实施例提供的一种自动化地软件测试方法,如图2所示,该方法包括:The following embodiments illustrate the process of the method provided by the embodiments of the present invention for automatic testing. 2 is an automated software testing method according to an embodiment of the present invention. As shown in FIG. 2, the method includes:
步骤201:对一软件运作良好的版本,比如参照版本,进行自动操作,对操作步骤后获得的用户操作界面进行保存。Step 201: Perform an automatic operation on a version of the software that works well, such as a reference version, and save the user operation interface obtained after the operation step.
在本发明的实施例中,用户可以对每一个操作步骤后获得的每一个用户操作界面进行保存,最终获得一截图集合;也可以仅对待测试的操作步骤获得的最终的用户操作界面进行保存。In the embodiment of the present invention, the user may save each user operation interface obtained after each operation step, and finally obtain a screenshot set; or may only save the final user operation interface obtained by the operation step of the test.
在本发明一实施例中,通过一自动化脚本来实现对软件的自动操作。In an embodiment of the invention, automatic operation of the software is implemented by an automated script.
首先编写一个对待测用户操作界面的指定界面元素进行自动操作,并对自动操作后产生的用户操作界面进行截屏的自动化脚本。自动操作可以是任何测试性的操作,比如滑动、长按、拨号、输入字符/字母、对按钮点击以及对网页链接进行点击等。此处可以采取循环遍历的方式,直至确保对所有的界面元素或者可以打开的界面都进行了操作,并保存了相应的操作界面截图。将这些截图作为后续自动测试的对比参照物。为方便后续描述,将参照截图或截图集合暂命名为截图A。First, write an automatic script that performs the automatic operation of the specified interface elements of the user interface and performs a screen capture of the user interface generated after the automatic operation. Automated operations can be any test operation, such as swiping, long press, dialing, entering characters/letters, clicking on a button, and clicking on a web link. Here you can take the loop traversal method until you ensure that all interface elements or interfaces that can be opened are operated, and the corresponding screenshots of the operation interface are saved. These screenshots are used as a comparison reference for subsequent automated testing. For the convenience of the subsequent description, the reference screenshot or the screenshot set is temporarily named as screenshot A.
在本发明一实施例中,还可以进一步对截取的截图进行人工检查,确定作为后续自动测试对比的参照截图完全正确或者没有软件缺陷(bug)。In an embodiment of the present invention, the intercepted screenshot may be further manually checked to determine that the reference screenshot as a subsequent automatic test comparison is completely correct or has no software bugs.
步骤202:对该软件的待测版本进行自动操作,对每个操作步骤后获得的用户操作界面进行保存。
Step 202: Perform automatic operation on the tested version of the software, and save the user operation interface obtained after each operation step.
在本发明一实施例中,当待测的软件在参照版本的基础上有了新的更改,需要进行软件测试的时候,可以对该软件的待测版本同样运行步骤201所提及的运行脚本,并得到相应截图。为方便后续描述,可以将该待测版本的截图或截图集合暂命名为截图B。In an embodiment of the present invention, when the software to be tested has a new change on the basis of the reference version, and the software test is required, the running script mentioned in step 201 may also be run on the test version of the software. And get the corresponding screenshot. For the convenience of the following description, the screenshot or screenshot set of the test version may be temporarily named as screenshot B.
由于步骤202和步骤201运行的是同一套自动运行脚本,因此其对目标软件的界面元素进行点击的策略和顺序是相同的。当采用对每一个操作步骤后获得的每一个用户操作界面都进行保存的策略时,将最终获得一截图集合B,在此情形下,可以自动将截图集合A和截图集合B中对应的图片相关联地进行比较。对截图集合中所包含的截图之间的关联可以简单地通过截图的命名来关联,例如使截图的名称带自动运行脚本所执行的步骤序号,这样截图集合A中的截图可能依次被命名为A01、A02、A03等,而截图集合B中的截图可能依次被命名为B01、B02、B03等。Since step 202 and step 201 run the same set of automatic running scripts, the strategy and order of clicking on the interface elements of the target software are the same. When a strategy for saving each user interface obtained after each operation step is adopted, a screenshot set B is finally obtained, and in this case, the corresponding pictures in the screenshot set A and the screenshot set B can be automatically correlated. Joint comparison. The association between the screenshots contained in the screenshot collection can be simply related by the naming of the screenshots, for example, the name of the screenshot is automatically sequenced with the step number executed by the script, so that the screenshots in the screenshot set A may be named A01 in turn. , A02, A03, etc., and the screenshots in the screenshot set B may be named B01, B02, B03, and so on.
如果由于待测版本与参照版本相比,减少或增加了界面元素,可以采取人工介入进行微调整。当然,也可以对运行脚本做微调整,更新对待测修改软件的界面元素的点击策略。If the interface element is reduced or increased because the version to be tested is compared with the reference version, manual intervention can be used for fine adjustment. Of course, you can also make minor adjustments to the running script and update the click strategy of the interface elements of the software you are testing.
步骤203:对比参照截图和待测截图。Step 203: Compare the reference screenshot with the screenshot to be tested.
在本发明一实施例中,可以通过机器运行批量图片对比工具,逐张对截图集合A和截图集合B中对应的图片进行自动对比,输出对比结果。例如,可以获取截图A01和截图B01中每一个像素的RGB值,然后计算相似度或峰值信噪比,将该相似度或峰值信噪比作为最终的对比结果。In an embodiment of the present invention, the batch image comparison tool can be run by the machine to automatically compare the corresponding images in the screenshot set A and the screenshot set B one by one, and output the comparison result. For example, the RGB values of each of the pixels in the screenshot A01 and the screenshot B01 can be obtained, and then the similarity or peak signal to noise ratio is calculated, and the similarity or peak signal to noise ratio is taken as the final comparison result.
在本发明实施例中,对比运算结果既可以以数字的方式展示,也可以以图片的方式展示,或者同时利用两种展示方式。比如可以利用像素值的数字差异以及差异所在的坐标位置等数字信息来表示两张图片的不同。又比如可以将具体的差异用高亮或者其他可被识别的方式标识在截图A或者截图B上。图片展示方式通常更为直观,但显然数字展示方式的运算效率更高。In the embodiment of the present invention, the comparison operation result may be displayed in a digital manner, or may be displayed in the form of a picture, or two display modes may be utilized at the same time. For example, the difference between the two pictures can be represented by digital information such as the numerical difference of the pixel values and the coordinate position where the difference is located. For example, specific differences can be identified on screenshot A or screenshot B in a highlighted or otherwise identifiable manner. The way images are displayed is usually more intuitive, but it's clear that digital presentations are more efficient.
在本发明一实施例中,为了提高测试效率,可以设置只有对比结果不同
时,才输出对比运算结果;如果对比结果显示两种对应的图片完全相同,则不输出对比运算结果。In an embodiment of the invention, in order to improve the test efficiency, only the comparison result may be set differently.
When the comparison operation result is output, if the comparison result shows that the two corresponding pictures are identical, the comparison operation result is not output.
本领域技术人员可以理解,在有一些关键界面元素需要特别关注的情况下,参照截图和待测截图的对比过程也可以通过人工进行。然而,本发明对参照截图和待测截图的对比方式并不做限定。Those skilled in the art can understand that in the case that some key interface elements require special attention, the comparison process of referring to the screenshot and the screenshot to be tested can also be performed manually. However, the present invention does not limit the manner in which the reference screenshot and the screenshot to be tested are compared.
步骤204:根据对比结果判断待测软件的测试结果。Step 204: Determine a test result of the software to be tested according to the comparison result.
测试人员会根据图片对比的结果,结合产品设计需求,就可以快速得出该待测软件版本是否存在软件缺陷的结论。Based on the results of the image comparison and the product design requirements, the tester can quickly conclude whether the software version to be tested has software defects.
举例说明,如果对比显示截图A01和截图B01没有任何差异,但根据产品设计需求,两者一定应该有差异,那么可以判定存在软件缺陷;如果对比显示截图A02和截图B02存在特定差异,但根据产品设计需求,两者不应该有差异,同样可以判定存在软件缺陷。For example, if there is no difference between the screenshot A01 and the screenshot B01, but there should be a difference between the two according to the product design requirements, then it can be determined that there is a software defect; if there is a specific difference between the screenshot A02 and the screenshot B02, but according to the product Design requirements, there should be no difference between the two, as well as the existence of software defects.
步骤205:一旦判断出待测软件版本不存在软件缺陷,则利用待测修改软件的截图替代原参照截图,作为后续下一个软件版本自动测试对比的参照物。Step 205: Once it is determined that there is no software defect in the software version to be tested, the original reference screenshot is replaced by the screenshot of the software to be tested, as a reference for the subsequent automatic test comparison of the next software version.
下面我们举一个例子进行说明。Let us give an example to illustrate.
首先编写一个自动化测试程序,自动测试一个已有手机软件的第一个版本,即对该第一个版本的某一个界面元素进行自动操作,对获得的用户操作界面截图进行保存,图3(a)为保存的结果截图。将这个截图图片作为软件运行正常的参考截图。First, write an automated test program to automatically test the first version of an existing mobile phone software, that is, to automatically operate an interface element of the first version, and save the screenshot of the obtained user interface, Figure 3 (a ) Screenshot of the saved results. Take this screenshot image as a normal reference screenshot of the software.
接下来,对软件的第二个版本运行同样的测试代码,对获得的操作界面进行保存,图3(b)为第二个版本对应的待测截图。Next, run the same test code on the second version of the software, and save the obtained operation interface. Figure 3(b) shows the screenshot to be tested corresponding to the second version.
接下来,运行图片对比程序,对这两个图片进行对比,在本发明一实施例中,采取的图片对比工具是imagemagick。本领域技术人员可以理解,编程人员也可以采用其他的图片对比工具软件来完成图片对比过程,任何能够批量处理图片的图片对比工具都可用于完成上述图片对比过程。本发明对图
片对比工具的种类同样不做限定。Next, the picture comparison program is run to compare the two pictures. In an embodiment of the invention, the picture comparison tool is imagemagick. Those skilled in the art can understand that the programmer can also use other image comparison tool software to complete the picture comparison process, and any picture comparison tool capable of batch processing pictures can be used to complete the picture comparison process. Picture pair of the invention
The types of sheet contrast tools are also not limited.
一个更具体的实例,可以运行如下命令行:For a more specific example, you can run the following command line:
compare-verbose-metric PSNR imageA.png imageB.png diff.pngCompare-verbose-metric PSNR imageA.png imageB.png diff.png
其中compare是主运行程序;-verbose-metric PSNR是运行参数,具体为截图A imageA.png,截图B imageB.png,对比输出文件diff.png。该命令行所执行的内容具体为:计算两张图片imageA和imageB的峰值信噪比,并以数字结果输出,同时以图片的方式将不同点高亮并输出至diff.png文件中。其中,如果两张图片不同,不同的部分会在对比输出文件中标记出来。如果两张图片完全一致,则数字输出结果为0,同时输出图片无任何高亮标记。Where compare is the main running program; -verbose-metric PSNR is the running parameter, specifically for screenshot A imageA.png, screenshot B imageB.png, and contrast output file diff.png. The content of the command line is specifically: calculating the peak signal-to-noise ratio of the two images imageA and imageB, and outputting the digital result, and simultaneously highlighting the different points in the image and outputting them to the diff.png file. Among them, if the two images are different, different parts will be marked in the comparison output file. If the two images are identical, the digital output is 0 and the output image has no highlights.
图片对比程序运行后获得的diff.png实例如图3(c)所示。其中,imageA.png=>diff.png PNG 480…………为数字结果,表明两张图片是有不同的,并分别在红蓝绿等纬度给出了具体差异的数字。从这些数字结果上已经可以明确的判断两种图片之间在哪些位置有何差异了。而当两张图片并不存在差异时,则不会输出任何数字结果。The diff.png example obtained after the image comparison program is run is shown in Figure 3(c). Among them, imageA.png=>diff.png PNG 480............ is a numerical result, indicating that the two pictures are different, and the numbers of specific differences are given in latitudes such as red, blue and green. From these numerical results, it is already clear which position between the two pictures is different. When there is no difference between the two images, no digital result will be output.
进一步地,可以用图片查看工具打开输出文件diff.png。图3(d)为diff.png对应的输出图片,该图片会将两张图片的不同点以特定的形式标记出来,例如,以虚线框,或高亮,或特定的线条粗细或字体大小或颜色等形式突出显示不同之处。Further, the output file diff.png can be opened with an image viewing tool. Figure 3 (d) is the output image corresponding to diff.png, which will mark the different points of the two images in a specific form, for example, with a dashed frame, or highlight, or a specific line thickness or font size or Colors and other forms highlight the differences.
从图3(d)可以清楚地看到,截图A和截图B的主要差距在于屏幕左上方的回退按钮,在第二个版本,这个回退按钮可以被删除。As can be clearly seen from Figure 3(d), the main difference between screenshot A and screenshot B is the back button at the top left of the screen. In the second version, this back button can be deleted.
此时,就可以由测试人员判断回退按钮的删除是已知的改动,还是研发人员疏忽导致的bug。如果回退按钮的删除是产品设计刻意所为的已知改动,那么用图3(b)所示的截图B替代截图A,作为后续版本的对比参照物。如果回退按钮的删除是疏忽所致,则将发现的bug返回至研发人员修改。At this point, the tester can determine whether the deletion of the back button is a known change or a bug caused by the negligence of the developer. If the deletion of the back button is a known change intentionally made by the product design, then the screenshot A shown in Figure 3(b) is used instead of the screenshot A as a comparison reference for subsequent versions. If the deletion of the back button is caused by negligence, the bug found will be returned to the developer for modification.
这样,一个完整自动测试过程就结束了。
In this way, a complete automated test process is over.
上面例子中的对比方式并不仅限于单张图片,对于大量的图片,我们也是可以批量对比并得出结论的。同时这种截屏对比进行自动化测试的方式也不限于手机应用,任何有图形界面的软件都可以用这种方式对功能以及用户界面等进行测试。比如,对普通电脑软件、网页、手机应用、手机应用内部的网页等都可以采取该测试方式。The comparison method in the above example is not limited to a single picture. For a large number of pictures, we can also compare and draw conclusions in batches. At the same time, the way of automatic screening of such screenshots is not limited to mobile applications. Any software with a graphical interface can test functions and user interfaces in this way. For example, this test method can be adopted for ordinary computer software, web pages, mobile applications, and web pages within mobile applications.
在传统的自动化测试过程中,以图3(b)为例,对于图3(b)所示的待测界面,测试步骤通常包括:对该用户界面上的每一个元素进行定义,比如按钮、标签等;接着,为每一个元素编写测试代码来验证这些元素的属性,比如文字、颜色、位置、尺寸等。具体来说,比如,验证页面顶部的“号码搜索”所在框的颜色、位置、尺寸是否正确,验证显示文本“号码搜索”的字体、大小、颜色、位置是否正确,验证该页面所显示的列表项是否正确,验证例如对于“肯德基新宜街店”、“肯德基田林店”这类存在优惠信息的列表项是否在右上角显示了角标等。由于界面上元素众多,可以想象,测试的代码是相当繁复的。此外,由于对于待测软件的每一个界面,都需要编写类似的验证代码,而且对于例如右上角的三个竖排圆点(进入设置的入口),即使在不同界面都位于相似的位置,由于是不同的界面,因此程序员需要重新进行定义和测试验证。这就造成了采用传统的自动化测试,对于图3(b)所示的用户操作界面进行测试时,测试代码相当冗长。相反,根据本发明,在对软件的新版本进行测试时,只需要形成图3(b)所示的测试截图,将其与图3(a)所示的参照截图,通过图形对比的方式进行检测。只要相同便认为无误,即使存在不相同之处,也可以快速地判断出是否存在软件缺陷以及精准地对软件缺陷进行定位。这样既节省了写代码的工作量,效率高,又能更精确地找到软件缺陷;解决了传统自动化测试效率较低以及效果较差的问题。In the traditional automated testing process, taking FIG. 3(b) as an example, for the interface to be tested shown in FIG. 3(b), the testing step generally includes: defining each element on the user interface, such as a button, Tags, etc.; then, write test code for each element to verify the properties of those elements, such as text, color, position, size, and so on. Specifically, for example, verify that the color, position, and size of the box of “number search” at the top of the page are correct, verify that the font, size, color, and position of the display text “number search” are correct, and verify the list displayed on the page. Whether the item is correct or not, for example, whether a list item having a preferential information such as "KFC Xinyi Street Store" or "KFC Tianlin Store" has a corner mark or the like displayed in the upper right corner. Due to the many elements on the interface, it is conceivable that the code tested is quite complicated. In addition, since each interface of the software to be tested needs to be written with a similar verification code, and for, for example, three vertical rows of dots in the upper right corner (into the set entry), even at different interfaces are located at similar positions due to It's a different interface, so programmers need to re-define and test validation. This results in the use of traditional automated testing, which is quite lengthy when testing the user interface shown in Figure 3(b). In contrast, according to the present invention, when testing a new version of the software, it is only necessary to form a test screenshot as shown in FIG. 3(b), which is compared with the reference screenshot shown in FIG. 3(a) by means of a graphic comparison. Detection. As long as the same is true, even if there are differences, it is possible to quickly determine whether there are software defects and accurately locate software defects. This not only saves the workload of writing code, but also has high efficiency and can find software defects more accurately; it solves the problem of low efficiency and poor effect of traditional automated testing.
在本发明另一实施例中,待测软件为一个手机应用程序,执行本发明自动化地软件测试方法的伪代码可具体如下:In another embodiment of the present invention, the software to be tested is a mobile phone application, and the pseudo code for executing the automated software testing method of the present invention may be specifically as follows:
首先,测试程序入口
First, test the program entry
class TestMainPages(CoolerTestCase):Class TestMainPages(CoolerTestCase):
然后,通过如下这个函数对应用程序当前版本的主界面进行测试Then, test the main interface of the current version of the application by the following function:
def test_main_pages(self):Def test_main_pages(self):
下面为自动化测试的第一步:执行测试用例,并保存截屏。Here's the first step in automated testing: Execute test cases and save screenshots.
os.system("adb shell am instrument-w-e class com.cootek.smartdialer.testmoudle.webview.WebViewTestCaseDemo com.cootek.smartdialer.test/android.test.InstrumentationTestRunner")Os.system("adb shell am instrument-w-e class com.cootek.smartdialer.testmoudle.webview.WebViewTestCaseDemo com.cootek.smartdialer.test/android.test.InstrumentationTestRunner")
下面为自动化测试的第二步,将截屏的图片从手机的SD卡中复制到计算机的指定文件夹The following is the second step of the automated test, copying the screenshot from the SD card of the phone to the specified folder of the computer.
util.get_folder(self.machine_center.get_property("android_image_folder"),self.machine_center.get_property("local_image_folder"))Util.get_folder(self.machine_center.get_property("android_image_folder"),self.machine_center.get_property("local_image_folder"))
下面为自动化测试的第三步,运行图像对比程序,将这次运行的截屏图片与以前的图片进行批量对比,并得到对比结果The following is the third step of the automated test, run the image comparison program, compare the screenshots of this run with the previous images, and get the comparison results.
diff=util.compare_images(self.machine_center.get_property("local_image_folder"),self.machine_center.get_property("template_image_folder"),self.machine_center.get_property("diff_image_folder"),self.machine_center.get_property("diff_file"))Diff=util.compare_images(self.machine_center.get_property("local_image_folder"),self.machine_center.get_property("template_image_folder"),self.machine_center.get_property("diff_image_folder"),self.machine_center.get_property("diff_file"))
下面的步骤为根据对比结果判断应用程序当前版本的测试结果。如果对比结果显示不同,则弹出异常提示信息,表明测试用例运行失败,即该应用程序的当前版本存在缺陷。The following steps are used to determine the test results of the current version of the application based on the comparison results. If the comparison result is different, an exception message is displayed indicating that the test case failed to run, that is, the current version of the application is defective.
if diff:If diff:
raise Exception("Image compare fails!")Raise Exception("Image compare fails!")
本发明一实施例还提供了一种自动化测试装置。如图4所示,该自动化测试装置包括:An embodiment of the invention also provides an automated test device. As shown in FIG. 4, the automated test apparatus includes:
截图模块,用于对软件待测版本的用户操作界面进行截图,并将所得的截图保存为待测截图;The screenshot module is configured to take a screenshot of the user operation interface of the software to be tested version, and save the obtained screenshot as a screenshot to be tested;
对比模块,用于将经由所述截图模块获得的待测截图与参照截图进行对比;以及,
a comparison module, configured to compare the to-be-tested screenshot obtained by the screenshot module with a reference screenshot; and
判断模块,用于根据所述对比模块获得的对比结果判断所述待测软件的测试结果。And a judging module, configured to determine, according to the comparison result obtained by the comparison module, a test result of the software to be tested.
在本发明一实施例中,该自动化测试装置可进一步包括:In an embodiment of the invention, the automated testing device may further include:
自动脚本模块,用于实现对软件版本进行自动操作;例如,所述自动脚本模块通过对软件的一个或多个用户界面上的元素进行自动操作,检测软件是否能实现设定的功能。其中,在本发明一实施例中,所述截图模块调用所述自动脚本模块对待测版本进行自动操作后,将获得的用户操作界面保存为待测截图。在本发明另一实施例中,所述截图模块还可调用所述自动脚本模块对参照版本进行自动操作后,获得参照截图。An automatic script module for implementing automatic operation of the software version; for example, the automatic script module detects whether the software can implement the set function by automatically operating elements on one or more user interfaces of the software. In an embodiment of the present invention, after the screenshot module invokes the automatic script module to perform an automatic operation on the version to be tested, the obtained user operation interface is saved as a screenshot to be tested. In another embodiment of the present invention, the screenshot module may further invoke the automatic script module to automatically perform a reference operation on the reference version to obtain a reference screenshot.
在本发明一实施例中,该自动化测试装置可进一步包括:In an embodiment of the invention, the automated testing device may further include:
参照截图获取模块,用于在所述判断模块确定所述待测软件的测试结果为测试合格时,调用所述待测截图作为参照截图保存。Referring to the screenshot obtaining module, when the determining module determines that the test result of the software to be tested is qualified for testing, the screenshot to be tested is called as a reference screenshot.
附加地或可替换地,参照截图获取模块还可以调用自动脚本模块来对经测试合格的软件执行自动操作,将自动操作后获得的用户操作界面作为参照截图保存。Additionally or alternatively, the reference screenshot acquisition module may also invoke an automatic script module to perform an automated operation on the tested qualified software, and save the user interface obtained after the automatic operation as a reference screenshot.
本领域技术人员可以理解,虽然以上实施例介绍了自动化测试装置若干模块或子模块,但是这种划分仅仅并非强制性的。实际上,根据本发明的实施方式,上文描述的两个或更多模块的特征和功能可以在一个模块中具体化。反之,上文描述的一个模块的特征和功能可以进一步划分为由多个模块来具体化。本领域技术人员可以理解,本发明的技术方案可以用软件来实现,具体而言,可以是计算机程序的方式实现。比如,在类似RAM、ROM、硬盘和/或任何适当的存储介质中存储可执行代码,当该可执行代码被执行时,可以实现本发明以上实施例提及的功能。Those skilled in the art will appreciate that while the above embodiments describe several modules or sub-modules of an automated test set, such division is merely not mandatory. Indeed, in accordance with embodiments of the present invention, the features and functions of the two or more modules described above may be embodied in one module. Conversely, the features and functions of one of the modules described above may be further divided into multiple modules. Those skilled in the art can understand that the technical solution of the present invention can be implemented by using software, and in particular, can be implemented by a computer program. For example, executable code may be stored in a RAM, ROM, hard disk, and/or any suitable storage medium, and when the executable code is executed, the functions mentioned in the above embodiments of the present invention may be implemented.
应当注意,本发明的实施方式还可以通过硬件、或者软件和硬件的结合来实现。硬件部分可以利用专用逻辑来实现;软件部分可以存储在存储器中,由适当的指令执行系统,例如微处理器或者专用设计硬件来执行。本领域的
普通技术人员可以理解上述的装置和方法可以使用计算机可执行指令和/或包含在处理器控制代码中来实现,例如在诸如磁盘、CD或DVD-ROM的载体介质、诸如只读存储器(固件)的可编程的存储器或者诸如光学或电子信号载体的数据载体上提供了这样的代码。本发明的装置及其模块可以由诸如超大规模集成电路或门阵列、诸如逻辑芯片、晶体管等的半导体、或者诸如现场可编程门阵列、可编程逻辑设备等的可编程硬件设备的硬件电路实现,也可以用由各种类型的处理器执行的软件实现,也可以由上述硬件电路和软件的结合例如固件来实现。It should be noted that embodiments of the present invention may also be implemented by hardware, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated design hardware. In the field
One of ordinary skill in the art will appreciate that the apparatus and methods described above can be implemented using computer-executable instructions and/or embodied in processor control code, such as a carrier medium such as a magnetic disk, CD or DVD-ROM, such as read-only memory (firmware). Such code is provided on a programmable memory or data carrier such as an optical or electronic signal carrier. The apparatus of the present invention and its modules may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, and the like. It can also be implemented by software executed by various types of processors, or by a combination of the above-described hardware circuits and software such as firmware.
还应当理解,为了不模糊本发明的实施方式,说明书仅对一些关键、未必必要的技术和特征进行了描述,而可能未对一些本领域技术人员能够实现的特征做出说明。It should also be understood that the descriptions of the present invention are merely illustrative of some key, non-essential techniques and features, and may not be described in a manner that can be realized by those skilled in the art.
以上仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换等,均应包含在本发明的保护范围之内。
The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, and the like made within the spirit and scope of the present invention are intended to be included in the scope of the present invention. .
Claims (14)
- 一种自动化地软件测试方法,其特征在于,包括:An automated software testing method, comprising:对软件待测版本的用户操作界面进行截图,并将所得的截图保存为待测截图;Take a screenshot of the user operation interface of the software to be tested version, and save the obtained screenshot as the screenshot to be tested;将获得的待测截图与参照截图进行对比;以及,Compare the obtained screenshots to be tested with the reference screenshots; and,根据对比结果判断所述待测软件的测试结果。The test result of the software to be tested is judged according to the comparison result.
- 根据权利要求1所述的方法,其特征在于,对所述待测版本的部分的用户操作界面进行截图,包括:The method according to claim 1, wherein the user operation interface of the part of the version to be tested is screenshotd, including:对所述待测版本的与所述参照截图对应的部分用户操作界面进行截图。A screenshot is taken on a part of the user operation interface corresponding to the reference screenshot of the to-be-tested version.
- 根据权利要求2所述的方法,其特征在于,其中所述参照截图对应所述软件经测试合格的参照版本的全部或部分的用户操作界面。The method of claim 2 wherein said reference screenshot corresponds to all or a portion of a user interface of a reference version of said software that is qualified for testing.
- 根据权利要求3所述的方法,其特征在于,对软件待测版本的用户操作界面进行截图包括:The method according to claim 3, wherein the screenshot of the user operation interface of the software to be tested version comprises:对所述待测版本的全部或部分的用户操作界面进行截图。A screenshot is taken of all or part of the user operation interface of the test version to be tested.
- 根据权利要求1至4中任一项所述的方法,其特征在于,将获得的待测截图与所述参照截图进行对比,包括:The method according to any one of claims 1 to 4, wherein comparing the obtained screenshot to be tested with the reference screenshot comprises:对待测截图与参照截图中的全部或部分界面元素的属性进行对比。The measured screenshots are compared to the properties of all or part of the interface elements in the reference screenshot.
- 根据权利要求5所述的方法,其特征在于,所述界面元素包括以下各项中的一种或多种:按钮、文本框、图表框、状态栏和网页链接,并且所述界面元素的属性包括以下各项中的一种或多种:文字、颜色、图片和界面元素对激励操作的应激反映。The method of claim 5, wherein the interface element comprises one or more of the following: a button, a text box, a chart box, a status bar, and a web page link, and attributes of the interface element Includes one or more of the following: text, color, picture, and interface elements reflect the stress of the stimulus.
- 根据权利要求5所述的方法,其特征在于,所述激励操作包括以下操作中的一种或多种:单击、双击、拖动、滑动、长按、拨号和录入操作。The method of claim 5 wherein said stimulating operation comprises one or more of the following: clicking, double clicking, dragging, sliding, long pressing, dialing, and entering operations.
- 根据权利要求1至4中任一项所述的方法,其特征在于,进一步包括: The method according to any one of claims 1 to 4, further comprising:对所述软件的确认运作良好的参照版本进行自动操作,将自动操作后获得的用户操作界面保存为所述参照截图;以及Performing an automatic operation on the reference version of the software that confirms that the operation is good, and saving the user operation interface obtained after the automatic operation as the reference screenshot;对所述软件的待测版本进行自动操作,将自动操作后获得的用户操作界面保存为所述待测截图。Automatically operating the test version of the software, and saving the user operation interface obtained after the automatic operation as the screenshot to be tested.
- 根据权利要求8所述的方法,其特征在于,所述根据对比结果判断所述待测软件版本的测试结果进一步包括:The method according to claim 8, wherein the determining the test result of the software version to be tested according to the comparison result further comprises:当判断所述待测版本不存在软件缺陷时,将所述待测截图作为后续测试中的参照截图。When it is determined that the software to be tested does not have a software defect, the screenshot to be tested is used as a reference screenshot in the subsequent test.
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述待测截图为一个截图或一个截图集合,其中将获得的待测截图与参照截图进行对比包括:The method according to any one of claims 1 to 4, wherein the screenshot to be tested is a screenshot or a collection of screenshots, wherein comparing the obtained screenshot to be tested with the reference screenshot includes:将获得的一个待测截图与一个参照截图进行对比;或者Compare one of the obtained screenshots to be taken with a reference screenshot; or批量地将获得的待测截图集合与参照截图集合中的截图相应地进行一对一或一对多的对比。The one-to-one or one-to-many comparison is performed in batches corresponding to the screenshots in the reference screenshot set.
- 一种自动化地软件测试装置,其特征在于,包括:An automated software testing device, comprising:截图模块,用于对软件待测版本的用户操作界面进行截图,并将所得的截图保存为待测截图;The screenshot module is configured to take a screenshot of the user operation interface of the software to be tested version, and save the obtained screenshot as a screenshot to be tested;对比模块,用于将经由所述截图模块获得的待测截图与参照截图进行对比;以及,a comparison module, configured to compare the to-be-tested screenshot obtained by the screenshot module with a reference screenshot; and判断模块,用于根据所述对比模块获得的对比结果判断所述待测软件的测试结果。And a judging module, configured to determine, according to the comparison result obtained by the comparison module, a test result of the software to be tested.
- 根据权利要求11所述的装置,其特征在于,进一步包括:The device according to claim 11, further comprising:自动脚本模块,用于对所述软件的一个或多个用户界面上的元素进行自动操作,检测所述软件是否能实现设定的功能。An automatic script module for automatically operating an element on one or more user interfaces of the software to detect whether the software can implement the set function.
- 根据权利要求12所述的装置,其特征在于,所述截图模块进一步包括: The device according to claim 12, wherein the screenshot module further comprises:调用所述自动脚本模块对所述待测版本进行自动操作后,将获得的用户操作界面保存为待测截图;或者After the automatic script module is invoked to perform automatic operation on the to-be-tested version, the obtained user operation interface is saved as a screenshot to be tested; or调用所述自动脚本模块对所述软件的确认运作良好的参照版本进行自动操作后,将获得的用户操作界面保存为参照截图。After the automatic script module is invoked to automatically operate the reference version of the software that confirms the operation, the obtained user operation interface is saved as a reference screenshot.
- 根据权利要求11所述的装置,其特征在于,进一步包括:The device according to claim 11, further comprising:参照截图获取模块,用于在所述判断模块确定所述待测软件的测试结果为测试合格时,调用所述待测截图,将其作为后续测试中的参照截图并保存。 Referring to the screenshot acquisition module, when the determining module determines that the test result of the software to be tested is qualified, the screenshot to be tested is called, and is used as a reference screenshot in the subsequent test and saved.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510388590.4 | 2015-07-03 | ||
CN201510388590.4A CN104978270A (en) | 2015-07-03 | 2015-07-03 | Automatic software testing method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017005148A1 true WO2017005148A1 (en) | 2017-01-12 |
Family
ID=54274799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/088183 WO2017005148A1 (en) | 2015-07-03 | 2016-07-01 | Automatic software-testing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104978270A (en) |
WO (1) | WO2017005148A1 (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107451058A (en) * | 2017-07-31 | 2017-12-08 | 北京云测信息技术有限公司 | A kind of software development methodology and device |
CN108579094A (en) * | 2018-05-11 | 2018-09-28 | 深圳市腾讯网络信息技术有限公司 | A kind of user interface detection method and relevant apparatus, system and storage medium |
CN109784369A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | H5 page test method and device, electronic equipment, storage medium |
CN109800153A (en) * | 2018-12-14 | 2019-05-24 | 深圳壹账通智能科技有限公司 | Mobile application test method and device, electronic equipment, storage medium |
CN109857652A (en) * | 2019-01-16 | 2019-06-07 | 深圳壹账通智能科技有限公司 | A kind of automated testing method of user interface, terminal device and medium |
CN110321257A (en) * | 2019-05-22 | 2019-10-11 | 深圳壹账通智能科技有限公司 | Abnormity screen compatibility test method, device, computer equipment and storage medium |
CN110737599A (en) * | 2019-10-18 | 2020-01-31 | 付彪 | Front-end automatic regression testing system and method based on picture comparison technology |
CN111767228A (en) * | 2020-06-30 | 2020-10-13 | 平安国际智慧城市科技股份有限公司 | Interface testing method, device, equipment and medium based on artificial intelligence |
CN112416795A (en) * | 2020-12-03 | 2021-02-26 | 江苏通付盾科技有限公司 | Application program detection method and device, computer equipment and storage medium |
CN112732559A (en) * | 2020-12-30 | 2021-04-30 | 广东粤云工业互联网创新科技有限公司 | Picture comparison method, automatic dial testing method and system and storage medium |
CN113268407A (en) * | 2020-02-17 | 2021-08-17 | 北京沃东天骏信息技术有限公司 | Page testing method and device, computer storage medium and electronic equipment |
CN113391741A (en) * | 2020-11-13 | 2021-09-14 | 腾讯科技(深圳)有限公司 | Operation checking method and device, storage medium and electronic equipment |
CN114003162A (en) * | 2021-11-04 | 2022-02-01 | 上海智臻智能网络科技股份有限公司 | RPA system screenshot positioning method, device, equipment and medium |
CN118032377A (en) * | 2024-04-11 | 2024-05-14 | 常州星宇车灯股份有限公司 | ADAS function test bench and test method |
Families Citing this family (38)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978270A (en) * | 2015-07-03 | 2015-10-14 | 上海触乐信息科技有限公司 | Automatic software testing method and apparatus |
CN107179983A (en) * | 2016-03-09 | 2017-09-19 | 阿里巴巴集团控股有限公司 | The method of calibration and device of ui testing result |
CN106294161A (en) * | 2016-08-12 | 2017-01-04 | 北京奇虎科技有限公司 | The interface function method of testing of a kind of application and device |
CN106484614B (en) * | 2016-09-29 | 2019-01-22 | 厦门美图之家科技有限公司 | A kind of method, device and mobile terminal for checking picture treatment effect |
CN106502891B (en) * | 2016-10-19 | 2019-05-17 | 广州视源电子科技股份有限公司 | Automatic detection method and device for user interface |
CN107066376A (en) * | 2016-12-15 | 2017-08-18 | 中国航天科工集团第四研究院第四总体设计部 | A kind of automatic test verification method tested for GUI |
CN106776327A (en) * | 2016-12-21 | 2017-05-31 | 北京奇虎科技有限公司 | A kind of application program regression testing method and device |
CN106951777B (en) * | 2017-03-06 | 2019-07-23 | 西安电子科技大学 | The estimating method of user interface when Android application operation |
CN108388505A (en) * | 2017-04-27 | 2018-08-10 | 深圳雷柏科技股份有限公司 | A kind of method and test equipment of operation test equipment |
CN107239404A (en) * | 2017-07-27 | 2017-10-10 | 广州云测信息技术有限公司 | A kind of positioning problems method and apparatus |
CN107985349B (en) * | 2017-10-24 | 2021-04-13 | 北京全路通信信号研究设计院集团有限公司 | Method and device for realizing single hardware and multiple software and computer storage medium |
CN108334450A (en) * | 2018-01-26 | 2018-07-27 | 深圳市瑞云科技有限公司 | A kind of test method of CG rendering clients |
CN108491322A (en) * | 2018-03-06 | 2018-09-04 | 平安科技(深圳)有限公司 | Automated testing method, device and storage medium |
CN108509341A (en) * | 2018-03-30 | 2018-09-07 | 北京金山安全软件有限公司 | Input method software testing method and device and electronic equipment |
CN108563726A (en) * | 2018-04-03 | 2018-09-21 | 联想(北京)有限公司 | Method and apparatus for remotely answering |
CN108549604A (en) * | 2018-04-11 | 2018-09-18 | 上海达梦数据库有限公司 | A kind of test script generation method, device, terminal device and storage medium |
CN108536597A (en) * | 2018-04-11 | 2018-09-14 | 上海达梦数据库有限公司 | A kind of terminal test method, device, terminal device and storage medium |
CN108549608A (en) * | 2018-04-18 | 2018-09-18 | 武汉极意网络科技有限公司 | A kind of the UI sectional drawings test method and system of APP |
CN108710570B (en) * | 2018-05-11 | 2021-10-29 | 创新先进技术有限公司 | View function testing method, device and equipment |
CN108845948A (en) * | 2018-07-09 | 2018-11-20 | 郑州云海信息技术有限公司 | The method and apparatus of defect are managed in software testing system |
CN109086201A (en) * | 2018-07-16 | 2018-12-25 | 曙光信息产业(北京)有限公司 | Automatic software test method and system |
CN109086203B (en) * | 2018-07-20 | 2022-10-28 | 百度在线网络技术(北京)有限公司 | Page detection method and device |
CN108920380A (en) * | 2018-07-20 | 2018-11-30 | 百度在线网络技术(北京)有限公司 | Test method, device, server, equipment and the storage medium of the software compatibility |
CN109189677B (en) * | 2018-08-21 | 2022-02-08 | 北京云测信息技术有限公司 | Test method and device for updating state of variable value |
CN109634859A (en) * | 2018-12-10 | 2019-04-16 | 宋航 | A kind of test method that control property identification is combined with image recognition |
CN109783351A (en) * | 2018-12-13 | 2019-05-21 | 重庆金融资产交易所有限责任公司 | Interface detection method, apparatus and computer readable storage medium |
CN109901968A (en) * | 2019-01-31 | 2019-06-18 | 阿里巴巴集团控股有限公司 | A kind of automation page data method of calibration and device |
CN110554957B (en) * | 2019-07-31 | 2021-02-05 | 北京三快在线科技有限公司 | Method and device for testing user interface, electronic equipment and readable storage medium |
CN112347400A (en) * | 2019-08-09 | 2021-02-09 | 腾讯科技(深圳)有限公司 | Method, device and equipment for detecting missing of multilingual page data and storage medium |
CN110532188B (en) * | 2019-08-30 | 2021-06-29 | 北京三快在线科技有限公司 | Page display test method and device |
CN111026637B (en) * | 2019-10-22 | 2022-11-11 | 苏宁云计算有限公司 | Method and device for positioning problem code |
CN111367816B (en) * | 2020-03-25 | 2021-04-02 | 上海复深蓝软件股份有限公司 | Mobile test method and device, computer equipment and storage medium |
CN112052174A (en) * | 2020-09-07 | 2020-12-08 | 云账户技术(天津)有限公司 | Software comparison method and device, computer equipment and storage medium |
CN112988283A (en) * | 2021-05-12 | 2021-06-18 | 鹏城实验室 | Screenshot obtaining method and device, terminal equipment and storage medium |
CN113238972B (en) * | 2021-07-12 | 2021-10-29 | 腾讯科技(深圳)有限公司 | Image detection method, device, equipment and storage medium |
CN113468066A (en) * | 2021-07-21 | 2021-10-01 | 上海幻电信息科技有限公司 | User interface testing method and device |
CN113660535B (en) * | 2021-08-18 | 2023-03-24 | 海看网络科技(山东)股份有限公司 | System and method for monitoring content change of EPG column of IPTV service |
CN113946511B (en) * | 2021-10-15 | 2022-06-17 | 杭州研极微电子有限公司 | Full-function test case set acquisition method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103514090A (en) * | 2012-06-26 | 2014-01-15 | 腾讯科技(深圳)有限公司 | Method and device for testing browser |
CN104268083A (en) * | 2014-09-30 | 2015-01-07 | 上海联影医疗科技有限公司 | Software automatic testing method and device |
CN104484273A (en) * | 2014-12-19 | 2015-04-01 | 广州博冠信息科技有限公司 | Test method for application program, device and system |
CN104978270A (en) * | 2015-07-03 | 2015-10-14 | 上海触乐信息科技有限公司 | Automatic software testing method and apparatus |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102932197B (en) * | 2011-08-11 | 2017-05-10 | 阿里巴巴集团控股有限公司 | Testing method and system |
CN103136094B (en) * | 2011-11-25 | 2016-08-03 | 阿里巴巴集团控股有限公司 | A kind of page method of testing and device |
CN103389937A (en) * | 2012-05-09 | 2013-11-13 | 腾讯科技(深圳)有限公司 | Interface testing method and device |
CN103678105B (en) * | 2012-09-17 | 2018-11-09 | 百度在线网络技术(北京)有限公司 | A kind of test method and device of page code |
CN104216826A (en) * | 2013-06-05 | 2014-12-17 | 腾讯科技(深圳)有限公司 | Test method and device |
CN104572056B (en) * | 2013-10-24 | 2018-10-12 | 阿里巴巴集团控股有限公司 | A kind of method and device of page comparison |
-
2015
- 2015-07-03 CN CN201510388590.4A patent/CN104978270A/en active Pending
-
2016
- 2016-07-01 WO PCT/CN2016/088183 patent/WO2017005148A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103514090A (en) * | 2012-06-26 | 2014-01-15 | 腾讯科技(深圳)有限公司 | Method and device for testing browser |
CN104268083A (en) * | 2014-09-30 | 2015-01-07 | 上海联影医疗科技有限公司 | Software automatic testing method and device |
CN104484273A (en) * | 2014-12-19 | 2015-04-01 | 广州博冠信息科技有限公司 | Test method for application program, device and system |
CN104978270A (en) * | 2015-07-03 | 2015-10-14 | 上海触乐信息科技有限公司 | Automatic software testing method and apparatus |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107451058A (en) * | 2017-07-31 | 2017-12-08 | 北京云测信息技术有限公司 | A kind of software development methodology and device |
CN108579094A (en) * | 2018-05-11 | 2018-09-28 | 深圳市腾讯网络信息技术有限公司 | A kind of user interface detection method and relevant apparatus, system and storage medium |
CN108579094B (en) * | 2018-05-11 | 2023-04-18 | 深圳市腾讯网络信息技术有限公司 | User interface detection method, related device, system and storage medium |
CN109784369A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | H5 page test method and device, electronic equipment, storage medium |
CN109800153A (en) * | 2018-12-14 | 2019-05-24 | 深圳壹账通智能科技有限公司 | Mobile application test method and device, electronic equipment, storage medium |
CN109857652A (en) * | 2019-01-16 | 2019-06-07 | 深圳壹账通智能科技有限公司 | A kind of automated testing method of user interface, terminal device and medium |
CN110321257A (en) * | 2019-05-22 | 2019-10-11 | 深圳壹账通智能科技有限公司 | Abnormity screen compatibility test method, device, computer equipment and storage medium |
CN110737599A (en) * | 2019-10-18 | 2020-01-31 | 付彪 | Front-end automatic regression testing system and method based on picture comparison technology |
CN113268407A (en) * | 2020-02-17 | 2021-08-17 | 北京沃东天骏信息技术有限公司 | Page testing method and device, computer storage medium and electronic equipment |
CN111767228A (en) * | 2020-06-30 | 2020-10-13 | 平安国际智慧城市科技股份有限公司 | Interface testing method, device, equipment and medium based on artificial intelligence |
CN111767228B (en) * | 2020-06-30 | 2024-02-06 | 深圳赛安特技术服务有限公司 | Interface testing method, device, equipment and medium based on artificial intelligence |
CN113391741A (en) * | 2020-11-13 | 2021-09-14 | 腾讯科技(深圳)有限公司 | Operation checking method and device, storage medium and electronic equipment |
CN113391741B (en) * | 2020-11-13 | 2023-08-29 | 腾讯科技(深圳)有限公司 | Operation verification method and device, storage medium and electronic equipment |
CN112416795A (en) * | 2020-12-03 | 2021-02-26 | 江苏通付盾科技有限公司 | Application program detection method and device, computer equipment and storage medium |
CN112732559A (en) * | 2020-12-30 | 2021-04-30 | 广东粤云工业互联网创新科技有限公司 | Picture comparison method, automatic dial testing method and system and storage medium |
CN114003162A (en) * | 2021-11-04 | 2022-02-01 | 上海智臻智能网络科技股份有限公司 | RPA system screenshot positioning method, device, equipment and medium |
CN118032377A (en) * | 2024-04-11 | 2024-05-14 | 常州星宇车灯股份有限公司 | ADAS function test bench and test method |
Also Published As
Publication number | Publication date |
---|---|
CN104978270A (en) | 2015-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017005148A1 (en) | Automatic software-testing method and device | |
WO2020233331A1 (en) | User interface automated testing method and apparatus, and computer-readable storage medium | |
CN109086203B (en) | Page detection method and device | |
WO2019144680A1 (en) | Automatic testing method and apparatus, storage medium and electronic device | |
US7908518B2 (en) | Method, system and computer program product for failure analysis implementing automated comparison of multiple reference models | |
US9424167B2 (en) | Automated testing of an application system | |
US8943423B2 (en) | User interface indicators for changed user interface elements | |
US8645912B2 (en) | System and method for use in replaying software application events | |
US7369129B2 (en) | Automated user interface testing | |
US20170132119A1 (en) | Method and device for retrieving test case based on code coverage | |
US10019346B2 (en) | Generating software test script from video | |
US10810113B2 (en) | Method and apparatus for creating reference images for an automated test of software with a graphical user interface | |
US20100211893A1 (en) | Cross-browser page visualization presentation | |
US10866883B2 (en) | Detection of graphical user interface element of application undergoing functional testing | |
WO2019019358A1 (en) | Page compatibility detection method and apparatus, server, and storage medium | |
US20060085132A1 (en) | Method and system to reduce false positives within an automated software-testing environment | |
US20150074648A1 (en) | Software defect verification | |
TWI476587B (en) | Testing method and testing apparatus for testing function of electronic apparatus | |
WO2016043729A1 (en) | User interface layout comparison | |
CN110659197B (en) | Application test case generation method and device and software test system | |
US20200104244A1 (en) | Scriptless software test automation | |
CN108121648B (en) | Interface error monitoring method | |
CN114546881A (en) | Application software testing method, electronic device and computer readable storage medium | |
JP4896909B2 (en) | Scenario generation apparatus and program | |
WO2017041530A1 (en) | Software metric detection method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16820799 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16820799 Country of ref document: EP Kind code of ref document: A1 |