专利汇可以提供Automatic configuration of regression test controls专利检索,专利查询,专利分析的服务。并且A method and system for regression testing of a computer software. The method and system execute the software for a first time to create a first data set; execute the software for a second time after the first time to create a second data set; compare the two data sets to determine differences between the two data sets; and store the differences as allowable differences to be ignored in a subsequent regression testing of the software.,下面是Automatic configuration of regression test controls专利的具体信息内容。
What is claimed is:
This patent application claims the benefit of the filing date of U.S. Provisional Patent Application Ser. No. 60/668,228, filed on Apr. 4, 2005 and entitled “Automatic Configuration of Regression Controls to Ignore Unimportant Differences,” the entire content of which is hereby expressly incorporated by reference.
The present invention relates generally to computer software testing; and more particularly to a system and method for regression testing of computer software.
Regression testing is a way of testing software where the test verifies that the functionality of the software that worked previously continues to work. One form that regression testing takes is for the software to be executed and output collected from the software. The output is saved as the regression control. At a later point (often repeated at regular intervals), the software is executed again and further output collected. This second output is then compared to the regression control. If the comparison reveals differences between the second output and the regression control, then a regression has been found. Subsequently, the tester has to manually determine whether that difference was due to an acceptable change in the software or whether an error was introduced.
Complexities arise, however, when the output has elements within it that change in an acceptable manner. For example, the software might include its version number and release date within the output. Whenever a new version of the software is released, this information is expected to change within the output. In this scenario, the regression control may be updated to contain the new version and release date information when the new version is released, so that the regression test does not fail. If a new version of the software is not released very often, this method may work well to keep the regression test working properly.
In another example, the software might include within the output data, the date and time at which the output was generated. This is an example where a portion of the output (date and time) is expected to always be different. The method used to update the regression control in the previous example will not work in this case, because the regression control is out of date as soon as it is created due to the fact that the output changes every time the software is executed.
In these kinds of cases, one of two things can happen. Either a regression test will not be created using this output, or the date and time will be somehow manually marked as a portion of the control that is allowed to be different when the comparison is made. Currently the process of marking the difference as allowable is a manual process, whereby a human operator will look at the differences found, determine which ones are allowable, and then somehow modify the comparison process so that the differences are not determined to be errors when the regression test is run. This process can become a lot of work for the operator, if there are many differences that need to be marked in this way within a single regression test or across other similar regression tests that the operator may be using.
Therefore, there is a need for a more efficient and effective approach to conduct regression testing and generate regression test controls.
In one embodiment, the present invention is a method and system for regression testing of a software. The method and system execute the software for a first time to create a first data set; execute the software for a second time after the first time to create a second data set; compare the two data sets to determine differences between the two data sets; and store the differences as allowable differences to be ignored in a subsequent regression testing of the software.
In one embodiment, the present invention is a method and system for regression testing of a software. The method and system store allowable differences between a first execution of the software and a second execution of the software; regression test the software; compare the results of the regression testing to the stored allowable differences; and ignore the portion of the results that match the allowable differences.
In one embodiment, the present invention is a method and system for regression testing of a software. The method and system execute the software to create an output; determine allowable changes in the output due to dynamic portions of the output that are expected to change over time; regression test the software; compare the results of the regression testing to the allowable changes; and ignore the portion of the results that match the allowable changes.
In one embodiment, the present invention is a method and system for automatically determining how to report only important differences in the process of regression testing of computer software. Regression controls are used in regression testing to control the process. A regression control is a saved set of data that can be used against which to verify a second set of data that will be obtained some time in the future. The saved data set is compared to the new data set to validate that the new set of data has not changed. This is used in software testing to validate that once a section of code is verified as working, it continues to work in the future.
In one embodiment, when creating regression tests, the present invention automatically sets up the tests to ignore the insignificant or allowable differences between different executions of the software, so that the tests do not report them as errors. Data that specifies what differences should be considered insignificant is stored along with the regression control. When testing, the regression tests perform the normal comparison between a new data set and the regression control, compare the differences found with the ignored differences, and only report those differences that were not ignored.
In one embodiment, the present invention is a method for automatically configuring a regression control used in regression testing of data expected to be dynamic. The configuration results in the behavior that some differences between the control and the data being tested are considered allowable and are not reported as differences. In one embodiment, the present invention is a method for automatically determining the invariants in the regression control.
In one embodiment, the present invention is a method for automatically determining the set of insignificant differences that are used along with the regression control.
This includes the following steps:
The logic here is that differences found between two executions of the system in succession are unimportant, assuming that the software being tested was not modified or that modifications did not change the contents of the output.
In the testing phase, the execution engine 104 executes the same method in the software system 102, however this time, it passes the output from the execution engine 104 to the comparison engine 106. The comparison engine 106 then retrieves the regression control pertaining to the method in the software system 102 being tested, and compares the current output with the regression control. If the comparison finds unexpected differences between the current output and the regression control, then those differences are reported by the reporting engine 108.
The comparison engine 106 then compares the output of the second execution with the regression control that was already stored within the regression control repository, in block 203. In block 204, if the output from the second execution matches the regression control, then no allowable differences need to be configured for the regression control and the method terminates, as shown by process path 207. If the output and the control do not match, however, then the differences that are found are added to the regression control as allowable differences, in block 205.
The differences may be stored in different ways. For example, the actual content that is different may be stored in text output including the line number(s) on which the differences occurred. Similarly, in XML output, an XPath that determines the location of the difference may be stored. The number of different ways that differences may be stored is not limited to these examples and may vary according to user preferences. In each case, some information that identifies what is allowed to be different is what gets stored along with the regression control. The assumption here is that the software system has not changed between the first execution and subsequent executions of the system that are setting up the allowable differences. The logic is that any differences that can be found in the output are due to dynamic portions of the output that are expected to change, and are not due to errors that have been introduced into the software. In block 206, as long as further differences in the output can be expected due to its content being dependent on when the test is run (for example, when the current day of the week is included in the output), the process may be repeated through the process path 208. When repeating the process, in block 203 the comparison engine may take into account allowable differences that have already been configured for the regression control and ignore those differences. Once all repetitions are complete, the process then terminates.
As an example, in Web application testing, one way for a tester to determine that a web application continues functioning as expected is to store the HTML of the application's web pages. Typically, scheduled tests then revisit the same pages, and compare the HTML of those pages with what was stored. However, in web applications, there are many differences that show up between two subsequent visits of the same pages. These differences could be insignificant differences such as, a date or time shown in the page, session id information contained in links or form fields, or other random or generated data specific to the current iteration of the page. These kinds of differences are expected, therefore, the tester does not want them to be reported.
In one embodiment, the present invention visits a set of HTML pages, and stores the HTML as a regression control for each page separately. The invention then immediately revisits the same set of HTML pages and collects the HTML for each page. For each page, the invention then compares the HTML and saves the differences as unimportant along with the baseline HTML for that page. Later tests then only report differences in the HTML that were not stored, for each page.
The software system being executed in this case is the web application server and all of its components and content. The output being validated is the HTML of the various web pages that are visited by the testing system. The HTML of the various pages is what gets stored as the regression controls in the regression control repository. The differences that get stored along with the regression controls are the line numbers where the content differed, along with the portions of the HTML that are different. This information is what is used later, during the testing phase, in determining which differences need to be reported as errors.
In another example for Web Service testing, one way for a tester to validate that a web service continues working as expected is to make a request to the web service and store the result (response). This result can be used later to compare the results of another invocation of the web service with the same data. The XML returned from a web service can have the same types of unimportant differences between two different executions as HTML in a web application.
In one embodiment, the present invention utilizes the following process to automatically set up the regression control to ignore these insignificant differences:
It will be recognized by those skilled in the art that various modifications may be made to the illustrated and other embodiments of the invention described above, without departing from the broad inventive scope thereof. It will be understood therefore that the invention is not limited to the particular embodiments or arrangements disclosed, but is rather intended to cover any changes, adaptations or modifications which are within the scope and spirit of the invention as defined by the appended claims.
标题 | 发布/更新时间 | 阅读量 |
---|---|---|
基于蚁群算法进行测试用例优先级排序的回归测试方法 | 2020-05-17 | 504 |
用于测试自主系统的方法 | 2020-05-20 | 932 |
一种回归测试驱动的软件版本管理方法、系统及存储介质 | 2020-05-21 | 804 |
软件程序的测试方法和装置、存储介质和电子设备 | 2020-05-11 | 38 |
测试数据帧生成方法及装置、软件测试方法及装置 | 2020-05-25 | 318 |
一种提高测试效率的测试方法 | 2020-05-19 | 407 |
一种回归测试用例选择方法、装置、终端及存储介质 | 2020-05-23 | 924 |
一种基于电网系统的自动化测试方法 | 2020-05-26 | 637 |
软件更改影响域分析辅助方法 | 2020-05-08 | 977 |
一种互联互通CBTC系统的交叉测试方法及平台 | 2020-05-22 | 685 |
高效检索全球专利专利汇是专利免费检索,专利查询,专利分析-国家发明专利查询检索分析平台,是提供专利分析,专利查询,专利检索等数据服务功能的知识产权数据服务商。
我们的产品包含105个国家的1.26亿组数据,免费查、免费专利分析。
专利汇分析报告产品可以对行业情报数据进行梳理分析,涉及维度包括行业专利基本状况分析、地域分析、技术分析、发明人分析、申请人分析、专利权人分析、失效分析、核心专利分析、法律分析、研发重点分析、企业专利处境分析、技术处境分析、专利寿命分析、企业定位分析、引证分析等超过60个分析角度,系统通过AI智能系统对图表进行解读,只需1分钟,一键生成行业专利分析报告。