WO2017036068A1 - Method and system for realizing software automatic test - Google Patents

Method and system for realizing software automatic test Download PDF

Info

Publication number
WO2017036068A1
WO2017036068A1 PCT/CN2016/070821 CN2016070821W WO2017036068A1 WO 2017036068 A1 WO2017036068 A1 WO 2017036068A1 CN 2016070821 W CN2016070821 W CN 2016070821W WO 2017036068 A1 WO2017036068 A1 WO 2017036068A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
test
tested
standard
function
Prior art date
Application number
PCT/CN2016/070821
Other languages
French (fr)
Chinese (zh)
Inventor
郭明侠
李胜华
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017036068A1 publication Critical patent/WO2017036068A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the invention relates to the field of software automated testing technology, in particular to a method and system for implementing software automated testing.
  • Software testing is an important part of a software project and an important means of ensuring software quality.
  • Software testing activities are an important part of software testing. Software testing activities can improve the quality and reliability of software. Therefore, activities in the software testing phase are critical to improving software quality.
  • test workload is getting bigger and bigger, the test takes more time, and if it is not tested, it is not at ease, so the automated test is introduced.
  • automation can be easily implemented, but for some data analysis processing results are correct by manual test query matching, especially for big data analysis, manual testing can not be tested in detail every time, and manual testing is too time consuming .
  • individual error data appearing cannot be found in time.
  • the technical problem to be solved by the present invention is to provide a method and system for implementing software automated testing, which can solve the existing software automated test test results requiring manual test comparison, and there are time consuming and individual error data appearing in a large amount of data cannot be Find problems in time.
  • an embodiment of the present invention provides a method for implementing software automated testing, the method comprising:
  • the method further includes:
  • the predetermined data source is imported into the standard test system to obtain the standard data after the automated script runs the test function of the standard test system.
  • the step of obtaining the comparison result and generating the test report comprises:
  • a test report is generated that includes the error code and the source of the operation corresponding to the error code.
  • the step of obtaining the comparison result and generating the test report comprises:
  • test report corresponding to the test function failure is generated.
  • the step of obtaining the comparison result and generating the test report comprises:
  • test report of the performance change of the corresponding test function is generated.
  • the comparison result is displayed in a test function classification list.
  • the predetermined data source may be one or more copies.
  • Embodiments of the present invention also provide a system for implementing software automated testing, the system comprising:
  • test module configured to import a predetermined data source into the system under test, and obtain data to be tested after the automated script runs the test function of the system to be tested;
  • a data comparison and test report generating module configured to compare the data to be tested with pre-stored standard data, obtain a comparison result, and generate a test report; wherein the standard data is obtained by the obtained automated script and The data output after the test function of the standard test system corresponding to the system under test.
  • system further includes:
  • a data source selection module configured to pre-select the predetermined data source
  • a standard data obtaining module configured to import the predetermined data source into the standard test system, and obtain the standard data after the automated script runs the test function of the standard test system.
  • the data comparison and test report generation module comprises:
  • a first data comparison sub-module configured to compare the data to be tested with the standard data, and determine a code that is different from the standard data by the data to be tested, and determine an error code
  • a judging submodule configured to determine a running point of the error code on the system under test
  • the first test report generation submodule is configured to generate a test report including the error code and a running source corresponding to the error code.
  • the data comparison and test report generation module comprises:
  • a second data comparison sub-module configured to compare the data to be tested corresponding to each test function with the standard data, and determine whether the data to be tested is consistent with the standard data
  • the second test report generation sub-module is configured to generate a test report of the corresponding test function fault when determining that the data to be tested corresponding to one of the test functions is inconsistent with the standard data.
  • the data comparison and test report generation module comprises:
  • a third data comparison submodule configured to compare the data to be tested corresponding to each test function with an output period of the standard data relative to an automatic script running start time, and determine the data to be tested and the Whether the output period of the standard data is consistent;
  • a third test report generation submodule configured to generate a test report of a performance change of the corresponding test function when it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the output period of the standard data.
  • the above technical solution of the present invention compares the data to be tested after executing the test function of the system under test with the pre-stored standard data by importing a predetermined data source into the system under test, and obtains the comparison result and generates a test. Reporting, comparing the test results of the automatic test system and generating test reports, eliminating the need for manual test operations, reducing manual operations, saving test time, and avoiding the inability of individual errors in large amounts of data to be detected in time. Case.
  • FIG. 1 is a flow chart diagram showing a method for implementing software automated testing according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a system for implementing software automated testing according to an embodiment of the present invention
  • FIG. 3 is a flow chart showing the test in an application of an embodiment of the present invention.
  • FIG. 5 shows a partial test report of a software faulty introduction in an application result according to an embodiment of the present invention.
  • the invention provides a method and system for realizing software automatic testing by using manual test comparison for existing software automated test test results, and there are problems that time-consuming and large amount of error data appearing in a large amount of data cannot be detected in time, and the like,
  • the predetermined data source is imported into the system under test, and the test data after the test function of the system to be tested is executed by the automated script is compared with the pre-stored standard data, and the comparison result is obtained and a test report is generated to achieve the automatic test system test.
  • the results are compared and a test report is generated, no manual test operation is required, manual operation is reduced, test time is saved, and individual error data appearing in a large amount of data cannot be detected and detected in time.
  • FIG. 1 is a schematic block diagram of a method for implementing software automated testing according to an embodiment of the present invention.
  • the method for implementing software automated testing according to an embodiment of the present invention includes:
  • Step 11 the predetermined data source is imported into the system under test, and the data to be tested after the automated script runs the test function of the system under test is obtained;
  • Step 12 comparing the data to be tested with pre-stored standard data, obtaining a comparison result, and generating a test report; wherein the standard data is a standard test system corresponding to the system to be tested The output of the data after the test function.
  • an automated script is executed to run the test function of the system under test, and the data to be tested is obtained; and then the data to be tested is compared with the standard data to obtain the comparison. The result is generated and a test report is generated; wherein the predetermined data source can analyze all test functions of the system under test, and the standard data is data outputted by the pre-stored automatic script running the test function in the standard test system, and the standard test system is compared with the system under test. correspond.
  • the method for implementing the software automatic test according to the above embodiment of the present invention can reduce the manual operation, save the test time, and avoid the appearance in a large amount of data, without performing manual test matching on the data after the software automatic test. Individual error data cannot be detected in a timely manner.
  • step 11 after the predetermined data source is imported into the system under test to obtain the output data after the automatic script runs the test function of the system under test, the method further includes: pre-selecting the predetermined data. a data source; importing the predetermined data source into the standard test system to obtain the standard data after an automated script runs a test function of the standard test system.
  • the method for implementing software automated testing according to the above embodiment of the present invention pre-selects a predetermined data source that can analyze all test functions of the system under test before performing test analysis on the system under test, and introduces the predetermined data source into the standard test system. Standard data is obtained after executing an automated script to run the test functions of the standard test system.
  • the step of obtaining the comparison result in step 12 and generating a test report includes:
  • a test report is generated that includes the error code and the source of the operation corresponding to the error code.
  • step 12 of the method for implementing software automated testing in the above embodiment by comparing the data to be tested with the standard data, and determining the code to be measured relative to the standard data, determining that the code is different is an error code, and A judgment is made on the source of the error code on the system under test, and then a test report including the error code and the corresponding source of the error code is generated.
  • the code change of the system under test can be obtained through the data change of the data to be tested and the standard data after the test system is tested, and thus the operation of the corresponding code change is performed.
  • the location is located to make it easy to know that some/some of the functions or packages that appear in the system under test fail or that some/some performance changes.
  • the step of obtaining the comparison result and generating the test report in step 12 is performed.
  • the steps include:
  • test report of the test function failure is generated.
  • step 12 by comparing the data to be tested corresponding to each test function with the standard data, and determining whether the data to be tested is consistent with the standard data, when the data to be tested and the standard are When the data is inconsistent, the test function fails, and a test report corresponding to the test function failure is generated. Therefore, the method for implementing the software automated test in the above embodiment can easily find out whether each test function in the tested system fails by the above steps, without manual confirmation, saving test time and reducing manual test. It is easy to happen that individual error data appearing in a large amount of data is not detected in time or even found.
  • the step of obtaining the comparison result in step 12 and generating a test report includes:
  • test report of the performance change of the corresponding test function is generated.
  • step 12 the data to be tested and the standard are determined by comparing the data to be tested corresponding to each test function with the output data of the standard data relative to the start time of the automatic script operation start time. Whether the output period of the data is consistent. When it is judged to be inconsistent, the test function of the system under test changes performance, and a test report of the performance change of the corresponding test function is generated. Therefore, the method for implementing the software automatic test in the above embodiment can easily find the function of changing the performance of the system under test by using the step, without manual verification, reducing the manual operation, saving the test time, and reducing the manual test. Bringing some features new performance changes are not discovered or discovered and exploited in time.
  • the comparison result is displayed in a test function classification list.
  • the test results of the test function of the system under test can be more clearly understood.
  • the predetermined data source may be one or more copies.
  • FIG. 3 is a flowchart of a test in an application according to an embodiment of the present invention.
  • one or more copies or increments that can analyze all test functions of a certain software version are pre-selected.
  • the selected data source import the data source in a pre-selected stable version of the software version, execute the automated script to run all the test functions of the stable version, generate standard data after running; start the automation when a new version of the software version is detected a script that automatically imports pre-selected data sources, and the automation script runs all of the new version Test the function and generate the data to be tested, compare the generated data to be tested with the standard data, and enumerate the comparison results according to the function, analyze the failure of the test function, performance change, etc.
  • the test time can also be set in advance, and then the software is scheduled for the predetermined test time. The version is tested.
  • the data source is equivalent to a predetermined data source
  • the stable version of the software version corresponds to the standard test system
  • the new version or the software version tested at the predetermined test time is equivalent to the system under test.
  • FIG. 2 is a schematic structural diagram of a system for implementing software automated testing according to an embodiment of the present invention.
  • the embodiment of the present invention further provides a system for implementing software automated testing, where the system includes:
  • test module 21 configured to import a predetermined data source into the system under test, and obtain data to be tested after the automated script runs the test function of the system to be tested;
  • the data comparison and test report generating module 22 is configured to compare the data to be tested with pre-stored standard data, obtain a comparison result, and generate a test report; wherein the standard data is an obtained automated script running and The data output after the test function of the standard test system corresponding to the system under test.
  • the predetermined data source is imported into the system under test by the test module 21 in the system for implementing the software automated test, and the data to be tested after the test function of the system under test is executed by the automated script is obtained;
  • the pair test report generation module 22 compares the data to be tested with the standard data to obtain a comparison result and generate a test report.
  • the predetermined data source can analyze all test functions of the system under test, and the standard data is data outputted by the pre-stored automatic script running the test function in the standard test system, and the standard test system corresponds to the system under test.
  • the system for implementing the software automatic test according to the above embodiment of the present invention can reduce the manual operation, save the test time, and avoid the appearance of a large amount of data, without performing manual test matching on the data after the software automatic test. Individual error data cannot be detected in a timely manner.
  • system further includes:
  • a data source selection module configured to pre-select the predetermined data source
  • a standard data obtaining module configured to import the predetermined data source into the standard test system, and obtain the standard data after the automated script runs the test function of the standard test system.
  • the data comparison and test report generation module 22 includes:
  • a first data comparison sub-module configured to compare the data to be tested with the standard data, and determine a code that is different from the standard data by the data to be tested, and determine an error code
  • a judging submodule configured to determine a running point of the error code on the system under test
  • a first test report generation submodule for generating the error code and corresponding error code The test report of the running source.
  • the data comparison and test report generation module 22 includes:
  • a second data comparison sub-module configured to compare the data to be tested corresponding to each test function with the standard data, and determine whether the data to be tested is consistent with the standard data
  • the second test report generation sub-module is configured to generate a test report of the corresponding test function fault when determining that the data to be tested corresponding to one of the test functions is inconsistent with the standard data.
  • the data comparison and test report generation module 22 includes:
  • a third data comparison submodule configured to compare the data to be tested corresponding to each test function with an output period of the standard data relative to an automatic script running start time, and determine the data to be tested and the Whether the output period of the standard data is consistent;
  • a third test report generation submodule configured to generate a test report of a performance change of the corresponding test function when it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the output period of the standard data.
  • the above-described system for implementing software automated testing is configured to perform the above-described method of implementing software automated testing.
  • the system for implementing software automated testing can be a computer, a server, or the like.
  • the system implementing software automated testing can include at least one of a processing component, a memory, a power component, an input and output interface, and a communication component.
  • the processing component can perform all operations of the system implementing the software automated test, such as data communication, recording operations, and the like.
  • Processing components may include one or more processors for executing instructions to implement all or a portion of the steps above.
  • the processing component can include one or more modules that facilitate interaction between the processing component and other components.
  • the memory is configured to store various types of data to support the operation of the system for software automated testing. Examples of such data include instructions, messages, etc. of any application or method running on a system that implements software automated testing.
  • the memory can be implemented using any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power components provide power to the various components of the system that implements automated software testing.
  • the input/output interface provides an interface between the processing component and the peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, a button, or the like.
  • the communication component is configured to facilitate wired or wireless communication between the system and other devices that implement software automated testing.
  • non-transitory computer readable storage medium comprising instructions, such as a memory comprising instructions executable by a processor of a system implementing software automated testing to perform the above method.
  • the non-transitory computer readable storage medium described above may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • the method and system for implementing software automatic testing in the embodiments of the present invention may The test results of the automatic test system are compared and the test report is generated, no manual test operation is required, the manual operation is reduced, and the test time is saved; and the test data of the system to be tested and the standard data of the standard test system can be passed.
  • the comparison data changes to obtain the code change of the system under test, and thus locate the running source of the corresponding code change, so as to know that some/some functions or packaging of the detected system are faulty or a certain/some Some performance changes; at the same time, it is easy to find out whether each test function in the system under test is faulty and whether the performance changes, and the individual errors caused by manual testing are easy to occur in a large amount of data. Data is not detected or even detected in a timely manner, and new performance changes in certain functions are not discovered or discovered and used.

Abstract

A method and system for realizing software automatic test. The method includes: importing a predetermined data source into a tested system, obtaining data to be tested after an automated script runs the test function of the test system (11); comparing the data to be tested with pre-stored standard data, obtaining the comparison result and generating a test report (12); wherein the standard data are the output data after the automated script obtained runs the test function of the standard test system corresponding to the tested system. The method and system for realizing software automatic test do not need a manual test operation, the manual operation is reduced, the test time is saved, and the situation that some error data in a large amount of data can not be timely detected and discovered could be avoided.

Description

一种实现软件自动化测试的方法和系统Method and system for realizing software automatic testing 技术领域Technical field
本发明涉及软件自动化测试技术领域,特别是指一种实现软件自动化测试的方法和系统。The invention relates to the field of software automated testing technology, in particular to a method and system for implementing software automated testing.
背景技术Background technique
软件测试是软件项目的一个重要环节,也是确保软件质量的一个重要手段。软件测试活动是软件测试的重要组成部分,通过软件测试活动可以提高软件的质量与可靠性,因此,软件测试阶段的活动对提高软件质量是至关重要的。Software testing is an important part of a software project and an important means of ensuring software quality. Software testing activities are an important part of software testing. Software testing activities can improve the quality and reliability of software. Therefore, activities in the software testing phase are critical to improving software quality.
然而,随着软件开发功能越来越多,测试工作量越来越大,测试需要耗费较多时间,若是不进行测试则并不放心,因此引入自动化测试。对于一般的功能测试,自动化可以简单实现,但是对于一些数据分析处理结果是否正确需要由手工测试查询匹配,尤其是对于大数据分析,手工测试无法每次都详细测试到,而且手工测试太费时间。并且,在大量数据中,出现的个别错误数据,基本无法被及时发现出来。However, with more and more software development functions, the test workload is getting bigger and bigger, the test takes more time, and if it is not tested, it is not at ease, so the automated test is introduced. For general functional testing, automation can be easily implemented, but for some data analysis processing results are correct by manual test query matching, especially for big data analysis, manual testing can not be tested in detail every time, and manual testing is too time consuming . Moreover, in a large amount of data, individual error data appearing cannot be found in time.
发明内容Summary of the invention
本发明要解决的技术问题是提供一种实现软件自动化测试的方法和系统,能解决现有的软件自动化测试测试结果需要手工测试比对,存在耗时且大量数据中出现的个别错误数据无法被及时发现等问题。The technical problem to be solved by the present invention is to provide a method and system for implementing software automated testing, which can solve the existing software automated test test results requiring manual test comparison, and there are time consuming and individual error data appearing in a large amount of data cannot be Find problems in time.
为解决上述技术问题,本发明的实施例提供一种实现软件自动化测试的方法,所述方法包括:To solve the above technical problem, an embodiment of the present invention provides a method for implementing software automated testing, the method comprising:
将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的待测数据;Importing a predetermined data source into the system under test, and obtaining data to be tested after the automated script runs the test function of the system under test;
将所述待测数据与预先保存的标准数据进行比对,获取比对结果并生成测试报告;其中所述标准数据为获得的自动化脚本运行与所述被测系统对应的标准测试系统的所述测试功能后输出的数据。Comparing the data to be tested with pre-stored standard data, obtaining a comparison result and generating a test report; wherein the standard data is obtained by the obtained automated script running a standard test system corresponding to the system under test The data output after testing the function.
进一步的,所述将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的输出数据之前,还包括:Further, before the importing the predetermined data source into the system under test and obtaining the output data after the automated script runs the test function of the system under test, the method further includes:
预先选定所述预定数据源;Pre-selecting the predetermined data source;
将所述预定数据源导入所述标准测试系统,获得自动化脚本运行所述标准测试系统的测试功能之后的所述标准数据。The predetermined data source is imported into the standard test system to obtain the standard data after the automated script runs the test function of the standard test system.
优选的,所述获取比对结果并生成测试报告的步骤包括:Preferably, the step of obtaining the comparison result and generating the test report comprises:
将所述待测数据与所述标准数据进行比较,判断所述待测数据相对于所述标准数据不同的代码,确定为错误代码; Comparing the data to be tested with the standard data, and determining that the data to be tested is different from the standard data, and determining the error code;
判断所述错误代码在所述被测系统上的运行出处;Determining an operation source of the error code on the system under test;
生成包括所述错误代码以及相对应所述错误代码的运行出处的测试报告。A test report is generated that includes the error code and the source of the operation corresponding to the error code.
优选的,所述获取比对结果并生成测试报告的步骤包括:Preferably, the step of obtaining the comparison result and generating the test report comprises:
将每一测试功能对应的所述待测数据与所述标准数据进行比较,判断所述待测数据与所述标准数据是否一致;Comparing the data to be tested corresponding to each test function with the standard data, and determining whether the data to be tested is consistent with the standard data;
当判断其中一测试功能所对应的所述待测数据与所述标准数据不一致时,则生成相应测试功能故障的测试报告。When it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the standard data, a test report corresponding to the test function failure is generated.
优选的,所述获取比对结果并生成测试报告的步骤包括:Preferably, the step of obtaining the comparison result and generating the test report comprises:
将每一测试功能对应的所述待测数据与所述标准数据相对于自动化脚本运行起始时间的输出时段进行比较,判断所述待测数据与所述标准数据的输出时段是否一致;Comparing the data to be tested corresponding to each test function with an output period of the standard data relative to an automatic script running start time, and determining whether the data to be tested is consistent with an output period of the standard data;
当判断其中一测试功能所对应的所述待测数据与所述标准数据的输出时段不一致时,则生成相应测试功能的性能改变的测试报告。When it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the output period of the standard data, a test report of the performance change of the corresponding test function is generated.
优选的,在所述生成测试报告的步骤中,所生成的所述测试报告中,所述比对结果以测试功能分类列举显示。Preferably, in the step of generating the test report, in the generated test report, the comparison result is displayed in a test function classification list.
优选的,所述预定数据源可以为一份或者多份。Preferably, the predetermined data source may be one or more copies.
本发明的实施例还提供一种实现软件自动化测试的系统,所述系统包括:Embodiments of the present invention also provide a system for implementing software automated testing, the system comprising:
测试模块,用于将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的待测数据;a test module, configured to import a predetermined data source into the system under test, and obtain data to be tested after the automated script runs the test function of the system to be tested;
数据比对及测试报告生成模块,用于将所述待测数据与预先保存的标准数据进行比对,获取比对结果并生成测试报告;其中所述标准数据为获得的自动化脚本运行与所述被测系统对应的标准测试系统的所述测试功能后输出的数据。a data comparison and test report generating module, configured to compare the data to be tested with pre-stored standard data, obtain a comparison result, and generate a test report; wherein the standard data is obtained by the obtained automated script and The data output after the test function of the standard test system corresponding to the system under test.
进一步的,所述系统还包括:Further, the system further includes:
数据源选取模块,用于预先选定所述预定数据源;a data source selection module, configured to pre-select the predetermined data source;
标准数据获取模块,用于将所述预定数据源导入所述标准测试系统,获得自动化脚本运行所述标准测试系统的测试功能之后的所述标准数据。And a standard data obtaining module, configured to import the predetermined data source into the standard test system, and obtain the standard data after the automated script runs the test function of the standard test system.
优选的,所述数据比对及测试报告生成模块包括:Preferably, the data comparison and test report generation module comprises:
第一数据比对子模块,用于将所述待测数据与所述标准数据进行比较,判断所述待测数据相对于所述标准数据不同的代码,确定为错误代码;a first data comparison sub-module, configured to compare the data to be tested with the standard data, and determine a code that is different from the standard data by the data to be tested, and determine an error code;
判断子模块,用于判断所述错误代码在所述被测系统上的运行出处;a judging submodule, configured to determine a running point of the error code on the system under test;
第一测试报告生成子模块,用于生成包括所述错误代码以及相对应所述错误代码的运行出处的测试报告。The first test report generation submodule is configured to generate a test report including the error code and a running source corresponding to the error code.
优选的,所述数据比对及测试报告生成模块包括:Preferably, the data comparison and test report generation module comprises:
第二数据比对子模块,用于将每一测试功能对应的所述待测数据与所述标准数据进行比较,判断所述待测数据与所述标准数据是否一致; a second data comparison sub-module, configured to compare the data to be tested corresponding to each test function with the standard data, and determine whether the data to be tested is consistent with the standard data;
第二测试报告生成子模块,用于当判断其中一测试功能所对应的所述待测数据与所述标准数据不一致时,则生成相应测试功能故障的测试报告。The second test report generation sub-module is configured to generate a test report of the corresponding test function fault when determining that the data to be tested corresponding to one of the test functions is inconsistent with the standard data.
优选的,所述数据比对及测试报告生成模块包括:Preferably, the data comparison and test report generation module comprises:
第三数据比对子模块,用于将每一测试功能对应的所述待测数据与所述标准数据相对于自动化脚本运行起始时间的输出时段进行比较,判断所述待测数据与所述标准数据的输出时段是否一致;a third data comparison submodule, configured to compare the data to be tested corresponding to each test function with an output period of the standard data relative to an automatic script running start time, and determine the data to be tested and the Whether the output period of the standard data is consistent;
第三测试报告生成子模块,用于当判断其中一测试功能所对应的所述待测数据与所述标准数据的输出时段不一致时,则生成相应测试功能的性能改变的测试报告。And a third test report generation submodule, configured to generate a test report of a performance change of the corresponding test function when it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the output period of the standard data.
本发明的上述技术方案的有益效果如下:The beneficial effects of the above technical solution of the present invention are as follows:
本发明的上述技术方案通过将预定数据源导入被测系统,执行自动化脚本运行所述被测系统的测试功能之后的待测数据与预先保存的标准数据进行比对,获取比对结果并生成测试报告,达到自动对待测系统测试结果进行比对并生成测试报告,无需进行手工测试操作,减少了人工操作,节约了测试时间,且避免了在大量数据中出现的个别错误数据无法被及时检测发现的情况。The above technical solution of the present invention compares the data to be tested after executing the test function of the system under test with the pre-stored standard data by importing a predetermined data source into the system under test, and obtains the comparison result and generates a test. Reporting, comparing the test results of the automatic test system and generating test reports, eliminating the need for manual test operations, reducing manual operations, saving test time, and avoiding the inability of individual errors in large amounts of data to be detected in time. Case.
附图说明DRAWINGS
图1表示本发明实施例的实现软件自动化测试的方法的流程框线图;1 is a flow chart diagram showing a method for implementing software automated testing according to an embodiment of the present invention;
图2表示本发明实施例的实现软件自动化测试的系统的结构示意图;2 is a schematic structural diagram of a system for implementing software automated testing according to an embodiment of the present invention;
图3表示本发明一实施例应用中的测试流程图;3 is a flow chart showing the test in an application of an embodiment of the present invention;
图4表示本发明一实施例应用结果中软件无故障引入的部分测试报告;4 is a partial test report of software introduction without failure in an application result according to an embodiment of the present invention;
图5表示本发明一实施例应用结果中软件有故障引入的部分测试报告。FIG. 5 shows a partial test report of a software faulty introduction in an application result according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。The technical problems, the technical solutions, and the advantages of the present invention will be more clearly described in the following description.
本发明针对现有的软件自动化测试测试结果需要手工测试比对,存在耗时且大量数据中出现的个别错误数据无法被及时发现等问题,提供一种实现软件自动化测试的方法和系统,通过将预定数据源导入被测系统,执行自动化脚本运行所述被测系统的测试功能之后的待测数据与预先保存的标准数据进行比对,获取比对结果并生成测试报告,达到自动对待测系统测试结果进行比对并生成测试报告,无需进行手工测试操作,减少了人工操作,节约了测试时间,且避免了在大量数据中出现的个别错误数据无法被及时检测发现。The invention provides a method and system for realizing software automatic testing by using manual test comparison for existing software automated test test results, and there are problems that time-consuming and large amount of error data appearing in a large amount of data cannot be detected in time, and the like, The predetermined data source is imported into the system under test, and the test data after the test function of the system to be tested is executed by the automated script is compared with the pre-stored standard data, and the comparison result is obtained and a test report is generated to achieve the automatic test system test. The results are compared and a test report is generated, no manual test operation is required, manual operation is reduced, test time is saved, and individual error data appearing in a large amount of data cannot be detected and detected in time.
如图1所示为本发明实施例的实现软件自动化测试的方法的流程框线图,本发明实施例的实现软件自动化测试的方法包括: FIG. 1 is a schematic block diagram of a method for implementing software automated testing according to an embodiment of the present invention. The method for implementing software automated testing according to an embodiment of the present invention includes:
步骤11,将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的待测数据; Step 11, the predetermined data source is imported into the system under test, and the data to be tested after the automated script runs the test function of the system under test is obtained;
步骤12,将所述待测数据与预先保存的标准数据进行比对,获取比对结果并生成测试报告;其中所述标准数据为获得的自动化脚本运行与所述被测系统对应的标准测试系统的所述测试功能后输出的数据。Step 12: comparing the data to be tested with pre-stored standard data, obtaining a comparison result, and generating a test report; wherein the standard data is a standard test system corresponding to the system to be tested The output of the data after the test function.
该实施例中,通过将预定数据源导入被测系统,执行自动化脚本运行所述被测系统的测试功能,并获得待测数据;然后将待测数据与标准数据进行比对,从而获取比对结果并生成测试报告;其中预定数据源可以分析被测系统的所有测试功能,标准数据是预先保存的自动化脚本运行标准测试系统中的测试功能后输出的数据,且标准测试系统与被测系统相对应。这样,通过本发明上述实施例的实现软件自动化测试的方法,可以无需经由手工对软件自动化测试后的数据进行结果测试匹配,减少了人工操作,节约了测试时间,同时避免了在大量数据中出现的个别错误数据无法被及时检测发现的情况。In this embodiment, by importing a predetermined data source into the system under test, an automated script is executed to run the test function of the system under test, and the data to be tested is obtained; and then the data to be tested is compared with the standard data to obtain the comparison. The result is generated and a test report is generated; wherein the predetermined data source can analyze all test functions of the system under test, and the standard data is data outputted by the pre-stored automatic script running the test function in the standard test system, and the standard test system is compared with the system under test. correspond. In this way, the method for implementing the software automatic test according to the above embodiment of the present invention can reduce the manual operation, save the test time, and avoid the appearance in a large amount of data, without performing manual test matching on the data after the software automatic test. Individual error data cannot be detected in a timely manner.
进一步的,本发明的上述实施例中,步骤11,将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的输出数据之前,还包括:预先选定所述预定数据源;将所述预定数据源导入所述标准测试系统,获得自动化脚本运行所述标准测试系统的测试功能之后的所述标准数据。本发明的上述实施例的实现软件自动化测试的方法,在对被测系统进行测试分析之前,预先选定可以分析被测系统的所有测试功能的预定数据源,将预定数据源导入标准测试系统,执行自动化脚本运行所述标准测试系统的测试功能后获得标准数据。Further, in the above embodiment of the present invention, in step 11, after the predetermined data source is imported into the system under test to obtain the output data after the automatic script runs the test function of the system under test, the method further includes: pre-selecting the predetermined data. a data source; importing the predetermined data source into the standard test system to obtain the standard data after an automated script runs a test function of the standard test system. The method for implementing software automated testing according to the above embodiment of the present invention pre-selects a predetermined data source that can analyze all test functions of the system under test before performing test analysis on the system under test, and introduces the predetermined data source into the standard test system. Standard data is obtained after executing an automated script to run the test functions of the standard test system.
优选的,本发明的上述实施例中,步骤12中获取比对结果并生成测试报告的步骤包括:Preferably, in the above embodiment of the present invention, the step of obtaining the comparison result in step 12 and generating a test report includes:
将所述待测数据与所述标准数据进行比较,判断所述待测数据相对于所述标准数据不同的代码,确定为错误代码;Comparing the data to be tested with the standard data, and determining that the data to be tested is different from the standard data, and determining the error code;
判断所述错误代码在所述被测系统上的运行出处;Determining an operation source of the error code on the system under test;
生成包括所述错误代码以及相对应所述错误代码的运行出处的测试报告。A test report is generated that includes the error code and the source of the operation corresponding to the error code.
上述实施例的实现软件自动化测试的方法的步骤12中,通过将待测数据与标准数据进行比较,并对待测数据相对于标准数据不同的代码进行判断,确定其中代码不同的为错误代码,并对错误代码在被测系统上的运行出处进行判断,然后生成包括错误代码以及相对应错误代码的运行出处的测试报告。这样,通过本发明实施例的实现软件自动化测试的方法,可以通过被测系统测试后的待测数据与标准数据的数据变化得到被测系统的代码变化情况,并从而对相对应代码变化的运行出处进行定位,方便知悉被测系统出现的某个/某些功能或者打包等出现故障或者是某个/某些性能发生改变。In step 12 of the method for implementing software automated testing in the above embodiment, by comparing the data to be tested with the standard data, and determining the code to be measured relative to the standard data, determining that the code is different is an error code, and A judgment is made on the source of the error code on the system under test, and then a test report including the error code and the corresponding source of the error code is generated. In this way, by implementing the software automatic test method in the embodiment of the present invention, the code change of the system under test can be obtained through the data change of the data to be tested and the standard data after the test system is tested, and thus the operation of the corresponding code change is performed. The location is located to make it easy to know that some/some of the functions or packages that appear in the system under test fail or that some/some performance changes.
优选的,本发明的上述实施例中,步骤12中获取比对结果并生成测试报告的步 骤包括:Preferably, in the above embodiment of the present invention, the step of obtaining the comparison result and generating the test report in step 12 is performed. The steps include:
将每一测试功能对应的所述待测数据与所述标准数据进行比较,判断所述待测数据与所述标准数据是否一致;Comparing the data to be tested corresponding to each test function with the standard data, and determining whether the data to be tested is consistent with the standard data;
当判断其中一测试功能所对应的所述待测数据与所述标准数据不一致时,则生成测试功能故障的测试报告。When it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the standard data, a test report of the test function failure is generated.
上述实施例的实现软件自动化测试的方法,在步骤12中,通过将每一测试功能对应的待测数据与标准数据进行比较,并判断待测数据与标准数据是否一致,当待测数据与标准数据不一致时,则该测试功能发生故障,生成相应测试功能故障的测试报告。因此,上述实施例的实现软件自动化测试的方法可以很容易的通过上述步骤发现被测系统中每一测试功能是否发生故障的情况,无需手工进行确认,节约了测试时间,并且减少了手工测试导致的易发生在大量数据中出现的个别错误数据未被及时检测甚至未能发现的情况。In the method for implementing the software automatic test in the above embodiment, in step 12, by comparing the data to be tested corresponding to each test function with the standard data, and determining whether the data to be tested is consistent with the standard data, when the data to be tested and the standard are When the data is inconsistent, the test function fails, and a test report corresponding to the test function failure is generated. Therefore, the method for implementing the software automated test in the above embodiment can easily find out whether each test function in the tested system fails by the above steps, without manual confirmation, saving test time and reducing manual test. It is easy to happen that individual error data appearing in a large amount of data is not detected in time or even found.
优选的,本发明的上述实施例中,步骤12中获取比对结果并生成测试报告的步骤包括:Preferably, in the above embodiment of the present invention, the step of obtaining the comparison result in step 12 and generating a test report includes:
将每一测试功能对应的所述待测数据与所述标准数据相对于自动化脚本运行起始时间的输出时段进行比较,判断所述待测数据与所述标准数据的输出时段是否一致;Comparing the data to be tested corresponding to each test function with an output period of the standard data relative to an automatic script running start time, and determining whether the data to be tested is consistent with an output period of the standard data;
当判断其中一测试功能所对应的所述待测数据与所述标准数据的输出时段不一致时,则生成相应测试功能的性能改变的测试报告。When it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the output period of the standard data, a test report of the performance change of the corresponding test function is generated.
上述实施例的实现软件自动化测试的方法,在步骤12中,通过将每一测试功能对应的待测数据与标准数据相对于自动化脚本运行起始时间的输出时段进行比较,判断待测数据与标准数据的输出时段是否一致,当判断为不一致时,则被测系统的该测试功能发生性能变化,生成相应测试功能性能改变的测试报告。因此,上述实施例的实现软件自动化测试的方法可以很容易的通过该步骤发现被测系统中性能发生改变的功能,无需经过手工测试确认,减少手工操作,节约了测试时间,也减少了手工测试带来某些功能新的性能改变未被及时发现或未能发现并被利用的情况。In the method for implementing the software automatic test in the above embodiment, in step 12, the data to be tested and the standard are determined by comparing the data to be tested corresponding to each test function with the output data of the standard data relative to the start time of the automatic script operation start time. Whether the output period of the data is consistent. When it is judged to be inconsistent, the test function of the system under test changes performance, and a test report of the performance change of the corresponding test function is generated. Therefore, the method for implementing the software automatic test in the above embodiment can easily find the function of changing the performance of the system under test by using the step, without manual verification, reducing the manual operation, saving the test time, and reducing the manual test. Bringing some features new performance changes are not discovered or discovered and exploited in time.
优选的,本发明的上述实施例中,在所述生成测试报告的步骤中,所生成的所述测试报告中,所述比对结果以测试功能分类列举显示。这样,可以更清晰明了地了解被测系统测试功能的测试结果。Preferably, in the above embodiment of the present invention, in the step of generating a test report, in the generated test report, the comparison result is displayed in a test function classification list. In this way, the test results of the test function of the system under test can be more clearly understood.
优选的,本发明的上述实施例中,所述预定数据源可以为一份或者多份。Preferably, in the above embodiment of the present invention, the predetermined data source may be one or more copies.
如图3所示为本发明一实施例应用中的测试流程图,本发明的一实施例应用中,预先选择可以对某一软件版本的所有测试功能进行分析的一份或多份或增量选择的数据源;在预先选取的该软件版本的稳定版本中导入数据源,执行自动化脚本运行稳定版本的所有测试功能,运行之后生成标准数据;当检测到该软件版本的新版本后,启动自动化脚本,自动导入之前预先选取的数据源,自动化脚本运行该新版本的所有 测试功能并生成待测数据,将所生成的待测数据与标准数据进行比对,将比对结果按功能分类列举出来,对该新版本中测试功能出现故障、性能改变等进行分析,通过数据比对中的错误代码以及其运行出处进行判断,生成对应的测试报告,如图4所示的是本发明的上述实施例应用结果中软件无故障引入的部分测试报告,如图5所示的是本发明上述实施例应用结果中软件有故障引入的部分测试报告,测试报告中指出了所测试的版本中出现的错误代码以及其运行出处。需要指出的是,在本发明的上述实施例应用中,除可以在检测到软件版本的新版本时对新版本进行测试之外,同样可以预先设定测试时间,然后在预定测试时间内对软件版本进行测试。在本发明的上述实施例中,数据源即相当于预定数据源,软件版本的稳定版本即相当于标准测试系统,新版本或在预定测试时间测试的软件版本即相当于被测系统。FIG. 3 is a flowchart of a test in an application according to an embodiment of the present invention. In an application of an embodiment of the present invention, one or more copies or increments that can analyze all test functions of a certain software version are pre-selected. The selected data source; import the data source in a pre-selected stable version of the software version, execute the automated script to run all the test functions of the stable version, generate standard data after running; start the automation when a new version of the software version is detected a script that automatically imports pre-selected data sources, and the automation script runs all of the new version Test the function and generate the data to be tested, compare the generated data to be tested with the standard data, and enumerate the comparison results according to the function, analyze the failure of the test function, performance change, etc. in the new version, and pass the data. The error code in the comparison and the operation source thereof are judged, and a corresponding test report is generated. As shown in FIG. 4, a partial test report in which the software is introduced without failure in the application result of the above embodiment of the present invention is shown in FIG. It is a partial test report in which the software is faulty introduced in the application result of the above embodiment of the present invention, and the test report indicates the error code appearing in the tested version and the source of its operation. It should be noted that, in the application of the above embodiment of the present invention, in addition to testing the new version when a new version of the software version is detected, the test time can also be set in advance, and then the software is scheduled for the predetermined test time. The version is tested. In the above embodiment of the present invention, the data source is equivalent to a predetermined data source, and the stable version of the software version corresponds to the standard test system, and the new version or the software version tested at the predetermined test time is equivalent to the system under test.
如图2所示为本发明实施例的实现软件自动化测试的系统的结构示意图,本发明的实施例还提供一种实现软件自动化测试的系统,所述系统包括:FIG. 2 is a schematic structural diagram of a system for implementing software automated testing according to an embodiment of the present invention. The embodiment of the present invention further provides a system for implementing software automated testing, where the system includes:
测试模块21,用于将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的待测数据;a test module 21, configured to import a predetermined data source into the system under test, and obtain data to be tested after the automated script runs the test function of the system to be tested;
数据比对及测试报告生成模块22,用于将所述待测数据与预先保存的标准数据进行比对,获取比对结果并生成测试报告;其中所述标准数据为获得的自动化脚本运行与所述被测系统对应的标准测试系统的所述测试功能后输出的数据。The data comparison and test report generating module 22 is configured to compare the data to be tested with pre-stored standard data, obtain a comparison result, and generate a test report; wherein the standard data is an obtained automated script running and The data output after the test function of the standard test system corresponding to the system under test.
本发明的该实施例中,通过实现软件自动化测试的系统中的测试模块21将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的待测数据;然后数据比对及测试报告生成模块22将待测数据与标准数据进行比对,从而获取比对结果并生成测试报告。其中预定数据源可以分析被测系统的所有测试功能,标准数据是预先保存的自动化脚本运行标准测试系统中的测试功能后输出的数据,且标准测试系统与被测系统相对应。这样,通过本发明上述实施例的实现软件自动化测试的系统,可以无需经由手工对软件自动化测试后的数据进行结果测试匹配,减少了人工操作,节约了测试时间,同时避免了在大量数据中出现的个别错误数据无法被及时检测发现的情况。In this embodiment of the present invention, the predetermined data source is imported into the system under test by the test module 21 in the system for implementing the software automated test, and the data to be tested after the test function of the system under test is executed by the automated script is obtained; The pair test report generation module 22 compares the data to be tested with the standard data to obtain a comparison result and generate a test report. The predetermined data source can analyze all test functions of the system under test, and the standard data is data outputted by the pre-stored automatic script running the test function in the standard test system, and the standard test system corresponds to the system under test. In this way, the system for implementing the software automatic test according to the above embodiment of the present invention can reduce the manual operation, save the test time, and avoid the appearance of a large amount of data, without performing manual test matching on the data after the software automatic test. Individual error data cannot be detected in a timely manner.
进一步的,本发明的上述实施例中,所述系统还包括:Further, in the foregoing embodiment of the present invention, the system further includes:
数据源选取模块,用于预先选定所述预定数据源;a data source selection module, configured to pre-select the predetermined data source;
标准数据获取模块,用于将所述预定数据源导入所述标准测试系统,获得自动化脚本运行所述标准测试系统的测试功能之后的所述标准数据。And a standard data obtaining module, configured to import the predetermined data source into the standard test system, and obtain the standard data after the automated script runs the test function of the standard test system.
优选的,所述数据比对及测试报告生成模块22包括:Preferably, the data comparison and test report generation module 22 includes:
第一数据比对子模块,用于将所述待测数据与所述标准数据进行比较,判断所述待测数据相对于所述标准数据不同的代码,确定为错误代码;a first data comparison sub-module, configured to compare the data to be tested with the standard data, and determine a code that is different from the standard data by the data to be tested, and determine an error code;
判断子模块,用于判断所述错误代码在所述被测系统上的运行出处;a judging submodule, configured to determine a running point of the error code on the system under test;
第一测试报告生成子模块,用于生成包括所述错误代码以及相对应所述错误代码 的运行出处的测试报告。a first test report generation submodule for generating the error code and corresponding error code The test report of the running source.
优选的,所述数据比对及测试报告生成模块22包括:Preferably, the data comparison and test report generation module 22 includes:
第二数据比对子模块,用于将每一测试功能对应的所述待测数据与所述标准数据进行比较,判断所述待测数据与所述标准数据是否一致;a second data comparison sub-module, configured to compare the data to be tested corresponding to each test function with the standard data, and determine whether the data to be tested is consistent with the standard data;
第二测试报告生成子模块,用于当判断其中一测试功能所对应的所述待测数据与所述标准数据不一致时,则生成相应测试功能故障的测试报告。The second test report generation sub-module is configured to generate a test report of the corresponding test function fault when determining that the data to be tested corresponding to one of the test functions is inconsistent with the standard data.
优选的,所述数据比对及测试报告生成模块22包括:Preferably, the data comparison and test report generation module 22 includes:
第三数据比对子模块,用于将每一测试功能对应的所述待测数据与所述标准数据相对于自动化脚本运行起始时间的输出时段进行比较,判断所述待测数据与所述标准数据的输出时段是否一致;a third data comparison submodule, configured to compare the data to be tested corresponding to each test function with an output period of the standard data relative to an automatic script running start time, and determine the data to be tested and the Whether the output period of the standard data is consistent;
第三测试报告生成子模块,用于当判断其中一测试功能所对应的所述待测数据与所述标准数据的输出时段不一致时,则生成相应测试功能的性能改变的测试报告。And a third test report generation submodule, configured to generate a test report of a performance change of the corresponding test function when it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the output period of the standard data.
上述实现软件自动化测试的系统被配置为执行上述实现软件自动化测试的方法。该实现软件自动化测试的系统可以是计算机、服务器等。该实现软件自动化测试的系统可以包括处理部件、存储器、电力部件、输入输出接口、通信部件中的至少一个。The above-described system for implementing software automated testing is configured to perform the above-described method of implementing software automated testing. The system for implementing software automated testing can be a computer, a server, or the like. The system implementing software automated testing can include at least one of a processing component, a memory, a power component, an input and output interface, and a communication component.
处理部件可以执行实现软件自动化测试的系统的全部操作,例如数据通信、记录操作等。处理部件可以包括一个或多个处理器,用以执行指令以实施上述方法中的所有或部分步骤。而且,处理部件可以包括利于处理部件与其他部件之间交互的一个或多个模块。The processing component can perform all operations of the system implementing the software automated test, such as data communication, recording operations, and the like. Processing components may include one or more processors for executing instructions to implement all or a portion of the steps above. Moreover, the processing component can include one or more modules that facilitate interaction between the processing component and other components.
存储器被配置为存储各种类型的数据以支实现软件自动化测试的系统的操作。这种数据的示例包括在实现软件自动化测试的系统上运行的任意应用或方法的指令、消息等。存储器可以使用任何类型的易失性或非易失性存储器件或其组合来实施,例如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory is configured to store various types of data to support the operation of the system for software automated testing. Examples of such data include instructions, messages, etc. of any application or method running on a system that implements software automated testing. The memory can be implemented using any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Disk or Optical Disk.
电力组件为实现软件自动化测试的系统的各种组件提供电力。Power components provide power to the various components of the system that implements automated software testing.
输入输出接口为处理组件和外围接口模块之间提供接口,上述外围接口模块可以是键盘、点击轮、按钮等。The input/output interface provides an interface between the processing component and the peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, a button, or the like.
通信组件被配置为便于实现软件自动化测试的系统和其他设备之间有线或者无线方式的通信。The communication component is configured to facilitate wired or wireless communication between the system and other devices that implement software automated testing.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由实现软件自动化测试的系统的处理器执行以完成上述方法。例如,上述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium comprising instructions, such as a memory comprising instructions executable by a processor of a system implementing software automated testing to perform the above method. For example, the non-transitory computer readable storage medium described above may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
从以上所述可以看出,本发明实施例的实现软件自动化测试的方法和系统,可以 达到自动对待测系统测试结果进行比对并生成测试报告,无需进行手工测试操作,减少了人工操作,节约了测试时间;而且,可以通过对被测系统的待测数据与标准测试系统的标准数据比较的数据变化得到被测系统的代码变化情况,并从而对相对应代码变化的运行出处进行定位,方便知悉被测系统出现的某个/某些功能或者打包等出现故障或者是某个/某些性能发生改变;同时,可以很容易的通过上述步骤发现被测系统中每一测试功能是否发生故障以及是否性能发生改变的情况,减少了手工测试导致的易发生在大量数据中出现的个别错误数据未被及时检测甚至未能发现的情况,以及某些功能新的性能改变未被及时发现或未能发现并被利用的情况。It can be seen from the above that the method and system for implementing software automatic testing in the embodiments of the present invention may The test results of the automatic test system are compared and the test report is generated, no manual test operation is required, the manual operation is reduced, and the test time is saved; and the test data of the system to be tested and the standard data of the standard test system can be passed. The comparison data changes to obtain the code change of the system under test, and thus locate the running source of the corresponding code change, so as to know that some/some functions or packaging of the detected system are faulty or a certain/some Some performance changes; at the same time, it is easy to find out whether each test function in the system under test is faulty and whether the performance changes, and the individual errors caused by manual testing are easy to occur in a large amount of data. Data is not detected or even detected in a timely manner, and new performance changes in certain functions are not discovered or discovered and used.
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。 The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.

Claims (12)

  1. 一种实现软件自动化测试的方法,其特征在于,所述方法包括:A method for implementing software automated testing, the method comprising:
    将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的待测数据;Importing a predetermined data source into the system under test, and obtaining data to be tested after the automated script runs the test function of the system under test;
    将所述待测数据与预先保存的标准数据进行比对,获取比对结果并生成测试报告;其中所述标准数据为获得的自动化脚本运行与所述被测系统对应的标准测试系统的所述测试功能后输出的数据。Comparing the data to be tested with pre-stored standard data, obtaining a comparison result and generating a test report; wherein the standard data is obtained by the obtained automated script running a standard test system corresponding to the system under test The data output after testing the function.
  2. 根据权利要求1所述的方法,其特征在于,所述将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的待测数据之前,还包括:The method according to claim 1, wherein the importing the predetermined data source into the system under test and obtaining the data to be tested after the test function of the system is tested by the automated script further comprises:
    预先选定所述预定数据源;Pre-selecting the predetermined data source;
    将所述预定数据源导入所述标准测试系统,获得自动化脚本运行所述标准测试系统的测试功能之后的所述标准数据。The predetermined data source is imported into the standard test system to obtain the standard data after the automated script runs the test function of the standard test system.
  3. 根据权利要求1所述的方法,其特征在于,所述获取比对结果并生成测试报告的步骤包括:The method of claim 1 wherein said step of obtaining a comparison result and generating a test report comprises:
    将所述待测数据与所述标准数据进行比较,判断所述待测数据相对于所述标准数据不同的代码,确定为错误代码;Comparing the data to be tested with the standard data, and determining that the data to be tested is different from the standard data, and determining the error code;
    判断所述错误代码在所述被测系统上的运行出处;Determining an operation source of the error code on the system under test;
    生成包括所述错误代码以及相对应所述错误代码的运行出处的测试报告。A test report is generated that includes the error code and the source of the operation corresponding to the error code.
  4. 根据权利要求1所述的方法,其特征在于,所述获取比对结果并生成测试报告的步骤包括:The method of claim 1 wherein said step of obtaining a comparison result and generating a test report comprises:
    将每一测试功能对应的所述待测数据与所述标准数据进行比较,判断所述待测数据与所述标准数据是否一致;Comparing the data to be tested corresponding to each test function with the standard data, and determining whether the data to be tested is consistent with the standard data;
    当判断其中一测试的测试功能所对应的所述待测数据与所述标准数据不一致时,则生成相应测试功能故障的测试报告。When it is determined that the test data corresponding to the test function of one of the tests is inconsistent with the standard data, a test report corresponding to the test function fault is generated.
  5. 根据权利要求1所述的方法,其特征在于,所述获取比对结果并生成测试报告的步骤包括:The method of claim 1 wherein said step of obtaining a comparison result and generating a test report comprises:
    将每一测试功能对应的所述待测数据与所述标准数据相对于自动化脚本运行起始时间的输出时段进行比较,判断所述待测数据与所述标准数据的输出时段是否一致;Comparing the data to be tested corresponding to each test function with an output period of the standard data relative to an automatic script running start time, and determining whether the data to be tested is consistent with an output period of the standard data;
    当判断其中一测试功能所对应的所述待测数据与所述标准数据的输出时段不一致时,则生成相应测试功能的性能改变的测试报告。When it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the output period of the standard data, a test report of the performance change of the corresponding test function is generated.
  6. 根据权利要求1所述的方法,其特征在于,在所述生成测试报告的步骤中,所生成的所述测试报告中,所述比对结果以测试功能分类列举显示。The method according to claim 1, wherein in the step of generating a test report, in the generated test report, the comparison result is displayed in a test function classification list.
  7. 根据权利要求1所述的方法,其特征在于,所述预定数据源可以为一份或者多份。 The method of claim 1 wherein said predetermined data source can be one or more.
  8. 一种实现软件自动化测试的系统,其特征在于,所述系统包括:A system for implementing software automated testing, characterized in that the system comprises:
    测试模块,用于将预定数据源导入被测系统,获得自动化脚本运行所述被测系统的测试功能之后的待测数据;a test module, configured to import a predetermined data source into the system under test, and obtain data to be tested after the automated script runs the test function of the system to be tested;
    数据比对及测试报告生成模块,用于将所述待测数据与预先保存的标准数据进行比对,获取比对结果并生成测试报告;其中所述标准数据为获得的自动化脚本运行与所述被测系统对应的标准测试系统的所述测试功能后输出的数据。a data comparison and test report generating module, configured to compare the data to be tested with pre-stored standard data, obtain a comparison result, and generate a test report; wherein the standard data is obtained by the obtained automated script and The data output after the test function of the standard test system corresponding to the system under test.
  9. 根据权利要求8所述的系统,其特征在于,所述系统还包括:The system of claim 8 wherein the system further comprises:
    数据源选取模块,用于预先选定所述预定数据源;a data source selection module, configured to pre-select the predetermined data source;
    标准数据获取模块,用于将所述预定数据源导入所述标准测试系统,获得自动化脚本运行所述标准测试系统的测试功能之后的所述标准数据。And a standard data obtaining module, configured to import the predetermined data source into the standard test system, and obtain the standard data after the automated script runs the test function of the standard test system.
  10. 根据权利要求8所述的系统,其特征在于,所述数据比对及测试报告生成模块包括:The system of claim 8 wherein said data comparison and test report generation module comprises:
    第一数据比对子模块,用于将所述待测数据与所述标准数据进行比较,判断所述待测数据相对于所述标准数据不同的代码,确定为错误代码;a first data comparison sub-module, configured to compare the data to be tested with the standard data, and determine a code that is different from the standard data by the data to be tested, and determine an error code;
    判断子模块,用于判断所述错误代码在所述被测系统上的运行出处;a judging submodule, configured to determine a running point of the error code on the system under test;
    第一测试报告生成子模块,用于生成包括所述错误代码以及相对应所述错误代码的运行出处的测试报告。The first test report generation submodule is configured to generate a test report including the error code and a running source corresponding to the error code.
  11. 根据权利要求8所述的系统,其特征在于,所述数据比对及测试报告生成模块包括:The system of claim 8 wherein said data comparison and test report generation module comprises:
    第二数据比对子模块,用于将每一测试功能对应的所述待测数据与所述标准数据进行比较,判断所述输出数据与所述标准数据是否一致;a second data comparison submodule, configured to compare the data to be tested corresponding to each test function with the standard data, and determine whether the output data is consistent with the standard data;
    第二测试报告生成子模块,用于当判断其中一测试功能所对应的所述待测数据与所述标准数据不一致时,则生成相应测试功能故障的测试报告。The second test report generation sub-module is configured to generate a test report of the corresponding test function fault when determining that the data to be tested corresponding to one of the test functions is inconsistent with the standard data.
  12. 根据权利要求8所述的系统,其特征在于,所述数据比对及测试报告生成模块包括:The system of claim 8 wherein said data comparison and test report generation module comprises:
    第三数据比对子模块,用于将每一测试功能对应的所述待测数据与所述标准数据相对于自动化脚本运行起始时间的输出时段进行比较,判断所述待测数据与所述标准数据的输出时段是否一致;a third data comparison submodule, configured to compare the data to be tested corresponding to each test function with an output period of the standard data relative to an automatic script running start time, and determine the data to be tested and the Whether the output period of the standard data is consistent;
    第三测试报告生成子模块,用于当判断其中一测试功能所对应的所述待测数据与所述标准数据的输出时段不一致时,则生成相应测试功能的性能改变的测试报告。 And a third test report generation submodule, configured to generate a test report of a performance change of the corresponding test function when it is determined that the data to be tested corresponding to one of the test functions is inconsistent with the output period of the standard data.
PCT/CN2016/070821 2015-08-28 2016-01-13 Method and system for realizing software automatic test WO2017036068A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510542300.7A CN106484605A (en) 2015-08-28 2015-08-28 A kind of method and system realizing software automated testing
CN201510542300.7 2015-08-28

Publications (1)

Publication Number Publication Date
WO2017036068A1 true WO2017036068A1 (en) 2017-03-09

Family

ID=58186522

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/070821 WO2017036068A1 (en) 2015-08-28 2016-01-13 Method and system for realizing software automatic test

Country Status (2)

Country Link
CN (1) CN106484605A (en)
WO (1) WO2017036068A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446055A (en) * 2018-09-04 2019-03-08 中国平安人寿保险股份有限公司 Print routine test method, device, computer equipment and storage medium
CN110134574A (en) * 2019-04-19 2019-08-16 平安普惠企业管理有限公司 A kind of software performance testing method, system, medium and electronic equipment
CN110297747A (en) * 2018-03-22 2019-10-01 福建天泉教育科技有限公司 A kind of method and terminal of test statistics function
CN111337765A (en) * 2020-02-19 2020-06-26 上海辛格林纳新时达电机有限公司 Frequency converter parameter testing system and testing method

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109324960A (en) * 2018-08-13 2019-02-12 中国平安人寿保险股份有限公司 Automatic test approach and terminal device based on big data analysis
CN110838955B (en) * 2019-11-18 2021-11-23 中国银行股份有限公司 Method and device for debugging ETC online application function
CN110927587B (en) * 2019-12-06 2022-02-25 天津市捷威动力工业有限公司 Method and device for generating battery pack charge and discharge test report
CN112559330A (en) * 2020-12-07 2021-03-26 深圳开源互联网安全技术有限公司 Method for analyzing correctness of component detection result of open source software

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5157779A (en) * 1990-06-07 1992-10-20 Sun Microsystems, Inc. User extensible testing system
CN1811729A (en) * 2005-01-26 2006-08-02 华为技术有限公司 Method for generating software test expectative result by use of standard tester and relavant software test method
CN1932776A (en) * 2006-09-29 2007-03-21 上海科泰世纪科技有限公司 Automatic operating method for interface test in embedded operating system
CN101178687A (en) * 2007-11-26 2008-05-14 中兴通讯股份有限公司 Software regression testing method
CN103838672A (en) * 2014-03-04 2014-06-04 中国工商银行股份有限公司 Automated testing method and device for all-purpose financial statements
CN104317713A (en) * 2014-10-27 2015-01-28 北京锐安科技有限公司 Automatic testing tool and method on basis of templates

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5157779A (en) * 1990-06-07 1992-10-20 Sun Microsystems, Inc. User extensible testing system
CN1811729A (en) * 2005-01-26 2006-08-02 华为技术有限公司 Method for generating software test expectative result by use of standard tester and relavant software test method
CN1932776A (en) * 2006-09-29 2007-03-21 上海科泰世纪科技有限公司 Automatic operating method for interface test in embedded operating system
CN101178687A (en) * 2007-11-26 2008-05-14 中兴通讯股份有限公司 Software regression testing method
CN103838672A (en) * 2014-03-04 2014-06-04 中国工商银行股份有限公司 Automated testing method and device for all-purpose financial statements
CN104317713A (en) * 2014-10-27 2015-01-28 北京锐安科技有限公司 Automatic testing tool and method on basis of templates

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297747A (en) * 2018-03-22 2019-10-01 福建天泉教育科技有限公司 A kind of method and terminal of test statistics function
CN109446055A (en) * 2018-09-04 2019-03-08 中国平安人寿保险股份有限公司 Print routine test method, device, computer equipment and storage medium
CN109446055B (en) * 2018-09-04 2024-02-02 中国平安人寿保险股份有限公司 Printing program testing method, device, computer equipment and storage medium
CN110134574A (en) * 2019-04-19 2019-08-16 平安普惠企业管理有限公司 A kind of software performance testing method, system, medium and electronic equipment
CN111337765A (en) * 2020-02-19 2020-06-26 上海辛格林纳新时达电机有限公司 Frequency converter parameter testing system and testing method

Also Published As

Publication number Publication date
CN106484605A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2017036068A1 (en) Method and system for realizing software automatic test
US10552301B2 (en) Completing functional testing
US8756460B2 (en) Test selection based on an N-wise combinations coverage
US9208064B2 (en) Declarative testing using dependency injection
US9329968B2 (en) Testing application performance using virtual machines created from the same image on different hardware platforms
WO2016177124A1 (en) Method and device for implementing continuous integration test
US20180349251A1 (en) Automated Root Cause Detection Using Data Flow Analysis
US10459830B2 (en) Executable code abnormality detection
US10613969B2 (en) Code coverage module with testing function identifier
US9842044B2 (en) Commit sensitive tests
Kaur et al. Performance testing of insititute website using jmeter
WO2019019454A1 (en) Layered testing method and device, computer equipment and storage medium
US10042743B2 (en) Computer system testing
CN115757138A (en) Method and device for determining script abnormal reason, storage medium and electronic equipment
US10467131B1 (en) Method and system for performance analysis by test automation frameworks
CN114661615A (en) FPGA software testing method and device
CN109783263B (en) Method and system for processing aging test fault of server
CN114020645A (en) Test method, device, equipment, readable storage medium and computer program product
Dhareula et al. Prevalent criteria's in regression test case selection techniques: An exploratory study
US20120005055A1 (en) Dynamic computation of roi for test automation
CN112015658A (en) Method and device for generating software integration test case
US20160283355A1 (en) Identifying a configuration element value as a potential cause of a testing operation failure
Barack et al. Adaptation of Orthogonal Defect Classification for Mobile Applications
CN117234946B (en) Automatic test method and related equipment for project library system
JP2020115248A (en) Test priority determination apparatus

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: 16840508

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: 16840508

Country of ref document: EP

Kind code of ref document: A1