WO2019114209A1 - Automatic testing and analysis method, automatic testing and analysis system, application server and computer-readable storage medium - Google Patents

Automatic testing and analysis method, automatic testing and analysis system, application server and computer-readable storage medium Download PDF

Info

Publication number
WO2019114209A1
WO2019114209A1 PCT/CN2018/089424 CN2018089424W WO2019114209A1 WO 2019114209 A1 WO2019114209 A1 WO 2019114209A1 CN 2018089424 W CN2018089424 W CN 2018089424W WO 2019114209 A1 WO2019114209 A1 WO 2019114209A1
Authority
WO
WIPO (PCT)
Prior art keywords
software system
code
automated test
modified
system code
Prior art date
Application number
PCT/CN2018/089424
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 WO2019114209A1 publication Critical patent/WO2019114209A1/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
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Definitions

  • the present application relates to the field of automated test analysis, and in particular, to an automated test analysis method, system, application server, and computer readable storage medium.
  • regression testing has a large workload in the entire software testing process. Multiple regression tests are performed at various stages of software development. In the progressive and rapid iterative development, the new version is continuously released. Make regression testing more frequent. However, in the case of regression testing, running a full-scale automated test usually results in large-scale errors. Usually, the cause is not a program bug, but the requirement or code change causes the test case to not be updated synchronously, resulting in a failure. With this increase in volume and time, the cost of automated automated case maintenance will become higher and higher, leading testers to slowly abandon automated testing.
  • the present application proposes an automated test analysis method, system, application server and computer readable storage medium, which enables a tester to evaluate whether an automated test foot needs to be modified according to an affected automated test script before performing regression testing.
  • the present application provides an automated test analysis method, which is applied to an application server, and the method includes:
  • the present application further provides an application server including a memory, a processor, and an automated test analysis system stored on the memory and operable on the processor, the automation
  • the test analysis system is implemented by the processor to implement the following steps:
  • the present application further provides an automated test analysis system, the automated test analysis system comprising:
  • the calling module is configured to retrieve the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
  • a comparison module configured to compare the tested software system code with the latest historical version code, and determine whether the tested software system code is modified
  • An analysis module configured to: when the tested software system code is modified, analyze the modified software system code to obtain all affected automated test scripts;
  • a feedback module configured to send the all affected automated test scripts to the terminal device.
  • the present application further provides a computer readable storage medium storing an automated test analysis system, the automated test analysis system being executable by at least one processor to enable The at least one processor performs the following steps:
  • the application server, the automated test analysis method, the system, and the computer readable storage medium proposed by the present application firstly retrieve the application server storage when receiving the tested software system code sent by the terminal device. a latest history version code; then comparing the software system code under test with the latest history version code to determine whether the software system code under test is modified; further, when the code of the software system under test is modified, analyzing All affected automated test scripts are obtained; finally, all of the affected automated test scripts are sent to the terminal device.
  • the regression test fails due to the modified software system code being modified, and can also obtain all the affected automated test scripts by analyzing the modified software system code to be tested, and Sending all the affected automated test scripts to the terminal device, so that the tester evaluates whether it is necessary to modify the automated test script before the regression test to improve the test efficiency.
  • FIG. 1 is a schematic diagram of an optional application environment of each embodiment of the present application.
  • FIG. 2 is a schematic diagram of an optional hardware architecture of the application server of FIG. 1;
  • FIG. 3 is a schematic diagram of a program module of a first embodiment of an automated test and analysis system of the present application
  • FIG. 4 is a schematic diagram of a program module of a second embodiment of the automated test and analysis system of the present application.
  • FIG. 5 is a schematic diagram of a program module of a third embodiment of the automated test and analysis system of the present application.
  • FIG. 6 is a schematic flow chart of a first embodiment of an automated test analysis method according to the present application.
  • FIG. 7 is a schematic flow chart of a second embodiment of an automated test analysis method according to the present application.
  • FIG. 8 is a schematic flow chart of a third embodiment of an automated test analysis method according to the present application.
  • Terminal Equipment 1 application server 2 The internet 3 Memory 11 processor 12 Network Interface 13 Automated test analysis system 200 Retrieve module 201 Comparison module 202 Analysis module 203 Feedback module 204 Positioning module 205 Setting module 206 Storage module 207 Sorting module 208
  • FIG. 1 it is a schematic diagram of an optional application environment of each embodiment of the present application.
  • the present application is applicable to an application environment including, but not limited to, the terminal device 1, the application server 2, and the network 3.
  • the terminal device 1 may be a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet PC), a PMP (Portable Multimedia Player), a navigation device, or the like.
  • Mobile devices, as well as fixed terminals such as digital TVs, desktop computers, notebooks, servers, and the like.
  • the application server 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server.
  • the application server 2 may be a stand-alone server or a server cluster composed of multiple servers.
  • the network 3 may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, Wireless or wired networks such as 5G networks, Bluetooth, Wi-Fi, etc.
  • GSM Global
  • the application server 2 is respectively connected to one or more of the terminal devices 1 through the network 3 for data transmission and interaction.
  • the application server 2 is installed and runs an automated test analysis system 200.
  • the application server 2 receives the tested software system code sent by the terminal device 1. Retrieving the latest historical version code stored by the application server; then comparing the measured software system code with the latest historical version code to determine whether the tested software system code is modified; further, when the The test software system code is modified to analyze all affected automated test scripts; finally, all of the affected automated test scripts are sent to the terminal device 1.
  • the regression test fails due to the modified software system code being modified, and can also obtain all the affected automated test scripts by analyzing the modified software system code to be tested, and Sending all the affected automated test scripts to the terminal device 1 so that the tester evaluates whether it is necessary to modify the automated test script before the regression test to improve the test efficiency.
  • the application server 2 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through a system bus. It is to be noted that FIG. 2 only shows the application server 2 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), and a random access memory (RAM). , static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 11 may be an internal storage unit of the application server 2, such as a hard disk or memory of the application server 2.
  • the memory 11 may also be an external storage device of the application server 2, such as a plug-in hard disk equipped on the application server 2, a smart memory card (SMC), and a secure digital number. (Secure Digital, SD) card, flash card, etc.
  • the memory 11 can also include both the internal storage unit of the application server 2 and its external storage device.
  • the memory 11 is generally used to store an operating system installed on the application server 2 and various types of application software, such as program codes of the automated test analysis system 200. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the application server 2, such as performing control and processing related to data interaction or communication with the terminal device 1.
  • the processor 12 is configured to run program code or process data stored in the memory 11, such as running the automated test analysis system 200 or the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the application server 2 and other electronic devices.
  • the network interface 13 is mainly used to connect the application server 2 to one or more of the terminal devices 1 through the network 3, and the application server 2 and the one or more terminals. Establish a data transmission channel and communication connection between devices 1.
  • the present application proposes an automated test analysis system 200.
  • FIG. 3 it is a program module diagram of the first embodiment of the automated test analysis system 200 of the present application.
  • the automated test analysis system 200 includes a series of computer program instructions stored on the memory 11, and when the computer program instructions are executed by the processor 12, the automated test analysis operations of the embodiments of the present application can be implemented. .
  • automated test analysis system 200 can be divided into one or more modules based on the particular operations implemented by the various portions of the computer program instructions. For example, in FIG. 3, the automated test analysis system 200 can be segmented into a capture module 201, a comparison module 202, an analysis module 203, and a feedback module 204. among them:
  • the retrieving module 201 is configured to retrieve the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device 1.
  • the program code will be continually modified, or the program code of the new function will be added.
  • the program code will be continually modified, or the program code of the new function will be added.
  • you must re-test the existing features in order to confirm that the modified program code has been modified to not affect the existing functions, and verify that the intended purpose is achieved.
  • regression testing is usually required.
  • running a full-scale automated test usually results in large-scale errors.
  • the cause is not a program bug, but a requirement or code change, but the automated test script is not synchronized, resulting in a failure.
  • the application server 2 stores the software code of the tested software every time. Specifically, when the application server 2 receives the tested software system code submitted by the terminal device 1, the historical version code stored by the application server 2 is retrieved. In the present embodiment, the application server 2 retrieves the latest history version code.
  • the comparing module 202 is configured to compare the tested software system code with the latest historical version code to determine whether the tested software system code is modified.
  • the application server 2 analyzes the structural relationship between the tested software system code and the latest historical version code, including the calling relationship of the function and the method, the inclusion relationship of the structure, the inheritance relationship of the class, and the like, and further The place where the code has been modified.
  • the modification of the software system code under test includes the addition, deletion, and modification of functions.
  • the function is deleted; if a function does not exist in the historical version code, it exists in the software system code under test. , the function is a new function; if a function exists in both the object code and the historical version code, the white line character is filtered out by scanning the code line inside the function, and the character matching is compared. The same, the code has been changed, the function is modified.
  • the analyzing module 203 is configured to: when the tested software system code is modified, analyze the modified software system code to obtain all affected automated test scripts.
  • the feedback module 204 is configured to feed back all the affected automated test scripts to the terminal device 1.
  • the application server 2 sends the affected automated test script to the terminal device 1.
  • the tester can query the terminal device 1 to affect the automation due to the modified software system code being modified. Test the script so that you can evaluate whether you need to modify the automated test script before the regression test, keep the automated test script and the software code of the tested software system updated synchronously, and avoid the test failure because the automated test script does not update synchronously.
  • the application server 2 organizes all the affected automated test scripts into a chart or a report, generates an influence result graph, and feeds back the impact result graph to the terminal device 1 so that the tester can intuitively Learn about the affected automated test scripts.
  • the automated test analysis system 200 proposed by the present application firstly retrieves the latest historical version code stored by the application server 2 when receiving the software system code under test transmitted by the terminal device 1; Comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified; further, when the tested software system code is modified, analyzing all affected automated test scripts Finally, all of the affected automated test scripts are sent to the terminal device 1.
  • the regression test fails due to the modified software system code being modified, and can also obtain all the affected automated test scripts by analyzing the modified software system code to be tested, and Sending all the affected automated test scripts to the terminal device 1 so that the tester evaluates whether it is necessary to modify the automated test script before the regression test to improve the test efficiency.
  • the automated test and analysis system 200 further includes a positioning module 205, where
  • the retrieving module 201 is further configured to retrieve a mapping relationship between an automated test script pre-stored in the memory of the application server 2 and a function of the software system code under test;
  • the application server 2 automatically analyzes the mapping relationship between the automated test script and the software system code function, and saves the mapping relationship.
  • the mapping relationship is saved to the storage space of the application server 2.
  • the mapping relationship is retrieved from the storage space of the application server 2.
  • the positioning module 205 is configured to locate a mapping relationship between the modified function and the automated test script to obtain all the affected automated test scripts.
  • the application server 2 locates the modified function by using the positioning module 205. That is, the software system code function corresponding to the latest historical version corresponding to the modified function in the software system code, and determining the automation associated with the modified function according to the mapping relationship between the pre-saved software system code function and the automated test execution script. Test the execution script.
  • the automated test analysis system 200 can retrieve the mapping relationship between the automated test script pre-stored in the memory of the application server 2 and the function of the tested software system code, and locate To the mapping relationship between the modified function and the automated test script, all the affected automated test scripts are obtained, and all affected automated test scripts are quickly located to save time.
  • the automated test and analysis system 200 further includes a setting module 206, a storage module 207, and a sorting module 208, where:
  • the setting module 206 is configured to set a storage space.
  • the storage module 207 is configured to store the tested software system code sent from the terminal device 1.
  • the sorting module 208 sorts the test software system code according to the receiving time.
  • the application server 2 receives the tested software system code sent by the terminal device 1, the software module code to be tested is stored by the storage module 208. And each time the software system code to be tested is modified, the application server 2 retrieves the latest historical version of the tested software system code and compares the modified software system code to be tested. Therefore, in the embodiment, the application server 2 also sorts the test software system code according to the receiving time by the sorting module 209. The most recent receiving time is the latest historical version of the test software system code.
  • the automated test analysis system 200 proposed by the present application can also store the historical version of the tested software system code and sort them in chronological order, so that developers can better understand the software in development.
  • the present application also proposes an automated test analysis method.
  • FIG. 6 it is a schematic flowchart of the first embodiment of the automatic test analysis method of the present application.
  • the order of execution of the steps in the flowchart shown in FIG. 6 may be changed according to different requirements, and some steps may be omitted.
  • Step S301 when receiving the tested software system code sent by the terminal device 1, retrieve the latest historical version code stored by the application server 2.
  • the program code will be continually modified, or the program code of the new function will be added.
  • the program code will be continually modified, or the program code of the new function will be added.
  • you must re-test the existing features in order to confirm that the modified program code has been modified to not affect the existing functions, and verify that the intended purpose is achieved.
  • regression testing is usually required.
  • running a full-scale automated test usually results in large-scale errors.
  • the cause is not a program bug, but a requirement or code change, but the automated test script is not synchronized, resulting in a failure.
  • the application server 2 stores the software code of the tested software every time. Specifically, when the application server 2 receives the tested software system code submitted by the terminal device 1, the historical version code stored by the application server 2 is retrieved. In the present embodiment, the application server 2 retrieves the latest history version code.
  • Step S302 comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified.
  • the application server 2 analyzes the structural relationship between the tested software system code and the latest historical version code, including the calling relationship of the function and the method, the inclusion relationship of the structure, the inheritance relationship of the class, and the like, and further The place where the code has been modified.
  • the modification of the software system code under test includes the addition, deletion, and modification of functions.
  • the function is deleted; if a function does not exist in the historical version code, it exists in the software system code under test. , the function is a new function; if a function exists in both the object code and the historical version code, the white line character is filtered out by scanning the code line inside the function, and the character matching is compared. The same, the code has been changed, the function is modified.
  • Step S303 when the code of the tested software system is modified, analyzing the code of the tested software system to be modified to obtain all affected automated test scripts.
  • Step S304 feeding back all the affected automated test scripts to the terminal device 1.
  • the application server 2 sends the affected automated test script to the terminal device 1.
  • the tester can query the terminal device 1 to affect the automation due to the modified software system code being modified. Test the script so that you can evaluate whether you need to modify the automated test script before the regression test, keep the automated test script and the software code of the tested software system updated synchronously, and avoid the test failure because the automated test script does not update synchronously.
  • the application server 2 organizes all the affected automated test scripts into a chart or a report, generates an influence result graph, and feeds back the impact result graph to the terminal device 1 so that the tester can intuitively Learn about the affected automated test scripts.
  • the automated test analysis method proposed by the present application firstly, when receiving the tested software system code sent by the terminal device 1, retrieves the latest historical version code stored by the application server 2; Determining whether the software system code under test is modified; further, when the code of the software system under test is modified, analyzing all affected automated test scripts; Sending all the affected automated test scripts to the terminal device 1.
  • the regression test fails due to the modified software system code being modified, and can also obtain all the affected automated test scripts by analyzing the modified software system code to be tested, and Sending all the affected automated test scripts to the terminal device 1 so that the tester evaluates whether it is necessary to modify the automated test script before the regression test to improve the test efficiency.
  • FIG. 7 is a schematic flow chart of a second embodiment of the automated test analysis method of the present application.
  • the step of comparing the function logic branch of the source code with the test case logical branch pre-stored in the application server 2, before generating the function logic branch coverage report of the source code further includes the following step:
  • Step S401 retrieving a mapping relationship between an automated test script pre-stored in the memory of the application server 2 and a function of the software system code under test;
  • the application server 2 automatically analyzes the mapping relationship between the automated test script and the software system code function, and saves the mapping relationship.
  • the mapping relationship is saved to the storage space of the application server 2.
  • the mapping relationship is retrieved from the storage space of the application server 2.
  • Step S402 locating the mapping relationship between the modified function and the automated test script to obtain all the affected automated test scripts.
  • the application server 2 locates the modified function through the positioning module 206. That is, the software system code function corresponding to the latest historical version corresponding to the modified function in the software system code, and determining the automation associated with the modified function according to the mapping relationship between the pre-saved software system code function and the automated test execution script. Test the execution script.
  • the automated test analysis method proposed by the present application can retrieve the mapping relationship between the automated test script pre-stored in the memory of the application server 2 and the function of the tested software system code, and Locating the mapping relationship between the modified function and the automated test script, obtaining all the affected automated test scripts, and quickly locating all affected automated test scripts, saving time.
  • the step of generating the function logic branch coverage report of the source code includes:
  • step S501 a storage space is set.
  • Step S502 storing the software system code under test transmitted from the terminal device 1.
  • Step S503 sorting the test software system code according to the receiving time.
  • the application server 2 when the application server 2 receives the software system code under test sent by the terminal device 1, the application server 2 stores the software system code under test. And each time the software system code to be tested is modified, the application server 2 retrieves the latest historical version of the tested software system code and compares the modified software system code to be tested. Therefore, in the embodiment, the application server 2 sorts the test software system codes according to the reception time. The most recent receiving time is the latest historical version of the test software system code.
  • the automated test analysis method proposed by the present application can also store the historical version of the tested software system code and sort them in chronological order, so that developers can better understand the evolution of the software in development.
  • the procedure and the program code of the reference historical version can also store the historical version of the tested software system code and sort them in chronological order, so that developers can better understand the evolution of the software in development.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Abstract

Disclosed is an automatic testing and analysis method. The method comprises: when a tested software system code sent by a terminal device is received, invoking the latest historical version code stored by an application server; comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified; when the tested software system code is modified, analyzing the modified tested software system code to obtain all affected automatic testing scripts; and sending all the affected automatic testing scripts to the terminal device. Further provided are an automatic testing and analysis system, an application server and a computer-readable storage medium. By means of the automatic testing and analysis method, the automatic testing and analysis system, the application server and the computer-readable storage medium provided in the present application, a tester can evaluate, according to the affected automatic testing script, whether it is necessary to modify an automatic testing script before a regression test is carried out, so that the testing efficiency is improved.

Description

自动化测试分析方法、系统、应用服务器及计算机可读存储介质Automated test analysis method, system, application server and computer readable storage medium
优先权申明Priority claim
本申请基于巴黎公约申明享有2017年12月15日递交的申请号为CN 201711344740.7、名称为“自动化测试分析方法、应用服务器及计算机可读存储介质”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。This application is based on the priority of the Chinese Patent Application entitled "Automated Test Analysis Method, Application Server and Computer-Readable Storage Media", filed on December 15, 2017, with the application number of CN 201711344740.7, which is filed on Dec. 15, 2017. The entire content is incorporated herein by reference.
技术领域Technical field
本申请涉及自动化测试分析领域,尤其涉及一种自动化测试分析方法、系统、应用服务器及计算机可读存储介质。The present application relates to the field of automated test analysis, and in particular, to an automated test analysis method, system, application server, and computer readable storage medium.
背景技术Background technique
回归测试作为软件生命周期的一个组成部分,在整个软件测试过程中占有很大的工作量比重,软件开发的各个阶段都会进行多次回归测试,在渐进和快速迭代开发中,新版本的连续发布使回归测试进行的更加频繁。然而在回归测试的时候,运行全量自动化测试通常会出现大面积的错误,而通常发现原因并不是程序bug,而是需求或者代码变更导致测试案例没有同步更新,导致运行失败。随着这种量的加大以及时间关系,慢慢的自动化案例维护成本会越来越高,导致测试人员慢慢开始放弃自动化测试。As an integral part of the software life cycle, regression testing has a large workload in the entire software testing process. Multiple regression tests are performed at various stages of software development. In the progressive and rapid iterative development, the new version is continuously released. Make regression testing more frequent. However, in the case of regression testing, running a full-scale automated test usually results in large-scale errors. Usually, the cause is not a program bug, but the requirement or code change causes the test case to not be updated synchronously, resulting in a failure. With this increase in volume and time, the cost of automated automated case maintenance will become higher and higher, leading testers to slowly abandon automated testing.
发明内容Summary of the invention
有鉴于此,本申请提出一种自动化测试分析方法、系统、应用服务器及计算机可读存储介质,能够使得测试人员在进行回归测试之前根据受影响的自动化测试脚本评估是否需要修改自动化测试脚。In view of this, the present application proposes an automated test analysis method, system, application server and computer readable storage medium, which enables a tester to evaluate whether an automated test foot needs to be modified according to an affected automated test script before performing regression testing.
首先,为实现上述目的,本申请提出一种自动化测试分析方法,该方法应用于应用服务器,所述方法包括:First, in order to achieve the above object, the present application provides an automated test analysis method, which is applied to an application server, and the method includes:
当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;Receiving the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;Comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified;
当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码 以得到所有受影响自动化测试脚本;When the tested software system code is modified, analyzing the modified software system code to obtain all affected automated test scripts;
将所述所有受影响的自动化测试脚本发送至所述终端设备。All of the affected automated test scripts are sent to the terminal device.
此外,为实现上述目的,本申请还提供一种应用服务器,所述应用服务器包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的自动化测试分析系统,所述自动化测试分析系统被所述处理器执行时实现如下步骤:In addition, to achieve the above object, the present application further provides an application server including a memory, a processor, and an automated test analysis system stored on the memory and operable on the processor, the automation The test analysis system is implemented by the processor to implement the following steps:
当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;Receiving the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;Comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified;
当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本;When the tested software system code is modified, analyzing the modified software system code to obtain all affected automated test scripts;
将所述所有受影响的自动化测试脚本发送至所述终端设备。All of the affected automated test scripts are sent to the terminal device.
此外,为实现上述目的,本申请还提供一种自动化测试分析系统,所述自动化测试分析系统包括:In addition, in order to achieve the above object, the present application further provides an automated test analysis system, the automated test analysis system comprising:
调取模块,用于当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;The calling module is configured to retrieve the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
比较模块,用于比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;a comparison module, configured to compare the tested software system code with the latest historical version code, and determine whether the tested software system code is modified;
分析模块,用于当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本;An analysis module, configured to: when the tested software system code is modified, analyze the modified software system code to obtain all affected automated test scripts;
反馈模块,用于将所述所有受影响的自动化测试脚本发送至所述终端设备。a feedback module, configured to send the all affected automated test scripts to the terminal device.
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有自动化测试分析系统,所述自动化测试分析系统可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:Further, to achieve the above object, the present application further provides a computer readable storage medium storing an automated test analysis system, the automated test analysis system being executable by at least one processor to enable The at least one processor performs the following steps:
当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的 最新历史版本代码;Receiving the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;Comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified;
当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本;When the tested software system code is modified, analyzing the modified software system code to obtain all affected automated test scripts;
将所述所有受影响的自动化测试脚本发送至所述终端设备。All of the affected automated test scripts are sent to the terminal device.
相较于现有技术,本申请所提出的应用服务器、自动化测试分析方法、系统及计算机可读存储介质,首先,当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;然后,比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;进一步地,当所述被测软件系统代码被修改,分析得到所有受影响自动化测试脚本;最后,将所述所有受影响的自动化测试脚本发送至所述终端设备。这样,既可以避免现有技术中通过因被测软件系统代码被修改而导致回归测试失败的缺陷,也可以通过分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本,并将所述所有受影响的自动化测试脚本发送至所述终端设备,使得测试人员在进行回归测试之前评估是否需要修改自动化测试脚本,提高测试效率。Compared with the prior art, the application server, the automated test analysis method, the system, and the computer readable storage medium proposed by the present application firstly retrieve the application server storage when receiving the tested software system code sent by the terminal device. a latest history version code; then comparing the software system code under test with the latest history version code to determine whether the software system code under test is modified; further, when the code of the software system under test is modified, analyzing All affected automated test scripts are obtained; finally, all of the affected automated test scripts are sent to the terminal device. In this way, it is possible to avoid the defects in the prior art that the regression test fails due to the modified software system code being modified, and can also obtain all the affected automated test scripts by analyzing the modified software system code to be tested, and Sending all the affected automated test scripts to the terminal device, so that the tester evaluates whether it is necessary to modify the automated test script before the regression test to improve the test efficiency.
附图说明DRAWINGS
图1是本申请各个实施例一可选的应用环境示意图;1 is a schematic diagram of an optional application environment of each embodiment of the present application;
图2是图1中应用服务器一可选的硬件架构的示意图;2 is a schematic diagram of an optional hardware architecture of the application server of FIG. 1;
图3是本申请自动化测试分析系统第一实施例的程序模块示意图;3 is a schematic diagram of a program module of a first embodiment of an automated test and analysis system of the present application;
图4是本申请自动化测试分析系统第二实施例的程序模块示意图;4 is a schematic diagram of a program module of a second embodiment of the automated test and analysis system of the present application;
图5是本申请自动化测试分析系统第三实施例的程序模块示意图;5 is a schematic diagram of a program module of a third embodiment of the automated test and analysis system of the present application;
图6为本申请自动化测试分析方法第一实施例的流程示意图;6 is a schematic flow chart of a first embodiment of an automated test analysis method according to the present application;
图7为本申请自动化测试分析方法第二实施例的流程示意图;7 is a schematic flow chart of a second embodiment of an automated test analysis method according to the present application;
图8为本申请自动化测试分析方法第三实施例的流程示意图。FIG. 8 is a schematic flow chart of a third embodiment of an automated test analysis method according to the present application.
附图标记:Reference mark:
终端设备Terminal Equipment 11
应用服务器 application server 22
网络The internet 33
存储器Memory 1111
处理器processor 1212
网络接口Network Interface 1313
自动化测试分析系统Automated test analysis system 200200
调取模块Retrieve module 201201
比较模块Comparison module 202202
分析模块Analysis module 203203
反馈模块Feedback module 204204
定位模块Positioning module 205205
设定模块Setting module 206206
存储模块Storage module 207207
排序模块Sorting module 208208
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数 量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions of "first", "second" and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. . Thus, features defining "first" or "second" may include at least one of the features, either explicitly or implicitly. In addition, the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. Nor is it within the scope of protection required by this application.
参阅图1所示,是本申请各个实施例一可选的应用环境示意图。Referring to FIG. 1 , it is a schematic diagram of an optional application environment of each embodiment of the present application.
在本实施例中,本申请可应用于包括,但不仅限于,终端设备1、应用服务器2、网络3的应用环境中。其中,所述终端设备1可以是移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置等等的可移动设备,以及诸如数字TV、台式计算机、笔记本、服务器等等的固定终端。所述应用服务器2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等计算设备,该应用服务器2可以是独立的服务器,也可以是多个服务器所组成的服务器集群。所述网络3可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。In this embodiment, the present application is applicable to an application environment including, but not limited to, the terminal device 1, the application server 2, and the network 3. The terminal device 1 may be a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet PC), a PMP (Portable Multimedia Player), a navigation device, or the like. Mobile devices, as well as fixed terminals such as digital TVs, desktop computers, notebooks, servers, and the like. The application server 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server. The application server 2 may be a stand-alone server or a server cluster composed of multiple servers. The network 3 may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, Wireless or wired networks such as 5G networks, Bluetooth, Wi-Fi, etc.
其中,所述应用服务器2中通过所述网络3分别与一个或多个所述终端设备1通信连接,以进行数据传输和交互。The application server 2 is respectively connected to one or more of the terminal devices 1 through the network 3 for data transmission and interaction.
本实施例中,所述应用服务器2内安装并运行有自动化测试分析系统200,当所述自动化测试分析系统200运行时,所述应用服务器2当接收到终端设备1发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;然后,比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;进一步地,当所述被测软件系统代码被修改,分析得到所有受影响自动化测试脚本;最后,将所述所有受影响的自动化测试脚本发送至所述终端设备1。这样,既可以避免现有技术中通过因被测软件系统代码被修改而导致回归测试失败的缺陷,也可以通过分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本,并将所述所有受影响的自动化测试脚本发送至所述终端设备1,使得测试人员在进行回归测试之前评 估是否需要修改自动化测试脚本,提高测试效率。In this embodiment, the application server 2 is installed and runs an automated test analysis system 200. When the automated test analysis system 200 is running, the application server 2 receives the tested software system code sent by the terminal device 1. Retrieving the latest historical version code stored by the application server; then comparing the measured software system code with the latest historical version code to determine whether the tested software system code is modified; further, when the The test software system code is modified to analyze all affected automated test scripts; finally, all of the affected automated test scripts are sent to the terminal device 1. In this way, it is possible to avoid the defects in the prior art that the regression test fails due to the modified software system code being modified, and can also obtain all the affected automated test scripts by analyzing the modified software system code to be tested, and Sending all the affected automated test scripts to the terminal device 1 so that the tester evaluates whether it is necessary to modify the automated test script before the regression test to improve the test efficiency.
参阅图2所示,是图1中应用服务器2一可选的硬件架构的示意图。本实施例中,所述应用服务器2可包括,但不仅限于,可通过系统总线相互通信连接存储器11、处理器12、网络接口13。需要指出的是,图2仅示出了具有组件11-13的应用服务器2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Referring to FIG. 2, it is a schematic diagram of an optional hardware architecture of the application server 2 in FIG. In this embodiment, the application server 2 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through a system bus. It is to be noted that FIG. 2 only shows the application server 2 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器11可以是所述应用服务器2的内部存储单元,例如该应用服务器2的硬盘或内存。在另一些实施例中,所述存储器11也可以是所述应用服务器2的外部存储设备,例如该应用服务器2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器11还可以既包括所述应用服务器2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器11通常用于存储安装于所述应用服务器2的操作系统和各类应用软件,例如所述自动化测试分析系统200的程序代码等。此外,所述存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), and a random access memory (RAM). , static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. In some embodiments, the memory 11 may be an internal storage unit of the application server 2, such as a hard disk or memory of the application server 2. In other embodiments, the memory 11 may also be an external storage device of the application server 2, such as a plug-in hard disk equipped on the application server 2, a smart memory card (SMC), and a secure digital number. (Secure Digital, SD) card, flash card, etc. Of course, the memory 11 can also include both the internal storage unit of the application server 2 and its external storage device. In this embodiment, the memory 11 is generally used to store an operating system installed on the application server 2 and various types of application software, such as program codes of the automated test analysis system 200. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述应用服务器2的总体操作,例如执行与所述终端设备1进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行所述的自动化测试分析系统200等。The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 12 is typically used to control the overall operation of the application server 2, such as performing control and processing related to data interaction or communication with the terminal device 1. In this embodiment, the processor 12 is configured to run program code or process data stored in the memory 11, such as running the automated test analysis system 200 or the like.
所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述应用服务器2与其他电子设备之间建立通信连接。本实施例中,所述网络接口13主要用于通过所述网络3将所述应用服务器2与一个或多个所述终端设备1相连,在所述应用服务器2与所述一个或多个终端设备1 之间的建立数据传输通道和通信连接。The network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the application server 2 and other electronic devices. In this embodiment, the network interface 13 is mainly used to connect the application server 2 to one or more of the terminal devices 1 through the network 3, and the application server 2 and the one or more terminals. Establish a data transmission channel and communication connection between devices 1.
至此,己经详细介绍了本申请各个实施例的应用环境和相关设备的硬件结构和功能。下面,将基于上述应用环境和相关设备,提出本申请的各个实施例。So far, the application environment of the various embodiments of the present application and the hardware structure and functions of related devices have been described in detail. Hereinafter, various embodiments of the present application will be proposed based on the above-described application environment and related devices.
首先,本申请提出一种自动化测试分析系统200。First, the present application proposes an automated test analysis system 200.
参阅图3所示,是本申请自动化测试分析系统200第一实施例的程序模块图。Referring to FIG. 3, it is a program module diagram of the first embodiment of the automated test analysis system 200 of the present application.
本实施例中,所述自动化测试分析系统200包括一系列的存储于存储器11上的计算机程序指令,当该计算机程序指令被处理器12执行时,可以实现本申请各实施例的自动化测试分析操作。在一些实施例中,基于该计算机程序指令各部分所实现的特定的操作,自动化测试分析系统200可以被划分为一个或多个模块。例如,在图3中,所述自动化测试分析系统200可以被分割成调取模块201、比较模块202、分析模块203、以及反馈模块204。其中:In this embodiment, the automated test analysis system 200 includes a series of computer program instructions stored on the memory 11, and when the computer program instructions are executed by the processor 12, the automated test analysis operations of the embodiments of the present application can be implemented. . In some embodiments, automated test analysis system 200 can be divided into one or more modules based on the particular operations implemented by the various portions of the computer program instructions. For example, in FIG. 3, the automated test analysis system 200 can be segmented into a capture module 201, a comparison module 202, an analysis module 203, and a feedback module 204. among them:
所述调取模块201,用于当接收到终端设备1发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码。The retrieving module 201 is configured to retrieve the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device 1.
通常地,在软件开发的过程中,一定会不断的修改程序代码,或是增加新功能的程序代码。每次更改程序代码,则意味着软件变更,就必须重新测试现有功能,以便确认改程序代码被修改后由没有影响到既有功能,并验证是否达到预期的目的。为了验证程序代码修改的正确性及其影响,通常需要进行回归测试。然而在回归测试的时候,运行全量自动化测试通常会出现大面积的错误,而通常发现原因并不是程序bug,而是需求或者代码变更,但是自动化测试脚本没有同步更新,从而导致运行失败。Generally, in the process of software development, the program code will be continually modified, or the program code of the new function will be added. Each time you change the program code, it means that the software changes, you must re-test the existing features, in order to confirm that the modified program code has been modified to not affect the existing functions, and verify that the intended purpose is achieved. In order to verify the correctness of the program code modifications and their impact, regression testing is usually required. However, in the case of regression testing, running a full-scale automated test usually results in large-scale errors. Usually, the cause is not a program bug, but a requirement or code change, but the automated test script is not synchronized, resulting in a failure.
因此,在本实施例中,所述应用服务器2存储每一次修改被测软件系统代码。具体地,当应用服务器2接收到终端设备1提交的被测软件系统代码时,调取所述应用服务器2存储的历史版本代码。在本实施方式中,应用服务器2调取最新历史版本代码。Therefore, in the present embodiment, the application server 2 stores the software code of the tested software every time. Specifically, when the application server 2 receives the tested software system code submitted by the terminal device 1, the historical version code stored by the application server 2 is retrieved. In the present embodiment, the application server 2 retrieves the latest history version code.
所述比较模块202,用于比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改。The comparing module 202 is configured to compare the tested software system code with the latest historical version code to determine whether the tested software system code is modified.
具体地,所述应用服务器2对所述被测软件系统代码与所述最新历史版 本代码的结构关系进行分析,包括函数及方法的调用关系、结构的包含关系、类的继承关系等,进而找出代码中做过修改的地方。Specifically, the application server 2 analyzes the structural relationship between the tested software system code and the latest historical version code, including the calling relationship of the function and the method, the inclusion relationship of the structure, the inheritance relationship of the class, and the like, and further The place where the code has been modified.
在本实施方式中,被测软件系统代码的修改包括函数的增加、删除、修改。详细而言,如果一个函数在历史版本代码中存在而在被测软件系统代码中不存在,则说明该函数被删除;如果一个函数在历史版本代码中不存在而在被测软件系统代码中存在,则说明该函数是新增函数;如果一个函数在被测对象代码和历史版本代码中都存在,则通过扫描函数内代码行,过滤掉空白字符,进行字符匹配对比,如果出现函数内代码不相同,则说明代码有改动,该函数被修改。In the present embodiment, the modification of the software system code under test includes the addition, deletion, and modification of functions. In detail, if a function exists in the historical version code and does not exist in the software system code under test, the function is deleted; if a function does not exist in the historical version code, it exists in the software system code under test. , the function is a new function; if a function exists in both the object code and the historical version code, the white line character is filtered out by scanning the code line inside the function, and the character matching is compared. The same, the code has been changed, the function is modified.
所述分析模块203,用于当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本。The analyzing module 203 is configured to: when the tested software system code is modified, analyze the modified software system code to obtain all affected automated test scripts.
具体地,从上文可知,在回归测试的时候,运行全量自动化测试通常会出现大面积的错误,而通常发现原因并不是程序bug,而是需求或者被测软件系统代码被修改,但是自动化测试脚本没有同步更新,从而导致运行失败。因此,当所述应用服务器2在确定所述被测软件系统代码被修改时,分析所述被修改的函数,根据被修改的函数与自动化测试脚本的关联关系,确定该被修改的函数将会影响到的自动化测试脚本。Specifically, as can be seen from the above, in the regression test, running a full-scale automated test usually has a large-scale error, and usually the cause is not a program bug, but the requirement or the tested software system code is modified, but the automated test The script did not synchronize updates, causing the run to fail. Therefore, when the application server 2 determines that the software system under test is modified, the modified function is analyzed, and according to the relationship between the modified function and the automated test script, it is determined that the modified function will be The automated test scripts that are affected.
所述反馈模块204,用于将所述所有受影响的自动化测试脚本反馈至所述终端设备1。The feedback module 204 is configured to feed back all the affected automated test scripts to the terminal device 1.
具体地,所述应用服务器2将所述受影响的自动化测试脚本发送至所述终端设备1,测试员在进行回归测试之前可以通过终端设备1查询因被测软件系统代码被修改而影响到自动化测试脚本,从而可以在回归测试之前评估是否需要修改自动化测试脚本,保持自动化测试脚本与被测软件系统代码的同步更新,避免因自动化测试脚本没有同步更新,而导致测试失败。Specifically, the application server 2 sends the affected automated test script to the terminal device 1. Before the regression test, the tester can query the terminal device 1 to affect the automation due to the modified software system code being modified. Test the script so that you can evaluate whether you need to modify the automated test script before the regression test, keep the automated test script and the software code of the tested software system updated synchronously, and avoid the test failure because the automated test script does not update synchronously.
在本实施例中,所述应用服务器2将所有受影响的自动化测试脚本整理成图表或者报表,生成影响结果图并将所述影响结果图反馈至所述终端设备1,使得测试员可以直观地了解受影响的自动化测试脚本。In this embodiment, the application server 2 organizes all the affected automated test scripts into a chart or a report, generates an influence result graph, and feeds back the impact result graph to the terminal device 1 so that the tester can intuitively Learn about the affected automated test scripts.
通过上述程序模块201-204,本申请所提出的自动化测试分析系统200,首先,当接收到终端设备1发送的被测软件系统代码时,调取应用服务器2 存储的最新历史版本代码;然后,比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;进一步地,当所述被测软件系统代码被修改,分析得到所有受影响自动化测试脚本;最后,将所述所有受影响的自动化测试脚本发送至所述终端设备1。这样,既可以避免现有技术中通过因被测软件系统代码被修改而导致回归测试失败的缺陷,也可以通过分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本,并将所述所有受影响的自动化测试脚本发送至所述终端设备1,使得测试人员在进行回归测试之前评估是否需要修改自动化测试脚本,提高测试效率。Through the above-mentioned program modules 201-204, the automated test analysis system 200 proposed by the present application firstly retrieves the latest historical version code stored by the application server 2 when receiving the software system code under test transmitted by the terminal device 1; Comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified; further, when the tested software system code is modified, analyzing all affected automated test scripts Finally, all of the affected automated test scripts are sent to the terminal device 1. In this way, it is possible to avoid the defects in the prior art that the regression test fails due to the modified software system code being modified, and can also obtain all the affected automated test scripts by analyzing the modified software system code to be tested, and Sending all the affected automated test scripts to the terminal device 1 so that the tester evaluates whether it is necessary to modify the automated test script before the regression test to improve the test efficiency.
进一步地,基于本申请自动化测试分析系统200的上述第一实施例,提出本申请的第二实施例(如图4所示)。本实施例中,所述自动化测试分析系统200还包括定位模块205,其中,Further, based on the above-described first embodiment of the automated test analysis system 200 of the present application, a second embodiment of the present application (shown in FIG. 4) is proposed. In this embodiment, the automated test and analysis system 200 further includes a positioning module 205, where
所述调取模块201,还用于调取预存储在所述应用服务器2内存中的自动化测试脚本与被测软件系统代码的函数之间的映射关系;The retrieving module 201 is further configured to retrieve a mapping relationship between an automated test script pre-stored in the memory of the application server 2 and a function of the software system code under test;
具体地,在进行自动化测试期间,所述应用服务器2自动分析自动化测试脚本与软件系统代码函数之间的映射关系,并保存所述映射关系。在本实施例中,所述映射关系保存至所述应用服务器2的存储空间。当被测软件系统代码被修改时,从所述应用服务器2的存储空间调取所述映射关系。Specifically, during the automated test, the application server 2 automatically analyzes the mapping relationship between the automated test script and the software system code function, and saves the mapping relationship. In this embodiment, the mapping relationship is saved to the storage space of the application server 2. When the software system code under test is modified, the mapping relationship is retrieved from the storage space of the application server 2.
所述定位模块205,用于定位所述被修改的函数与所述自动化测试脚本的映射关系,得到所述所有受影响自动化测试脚本。The positioning module 205 is configured to locate a mapping relationship between the modified function and the automated test script to obtain all the affected automated test scripts.
具体地,若分析出该软件系统的软件代码被修改如有新增代码、修改代码、删除代码等情况时,所述应用服务器2通过所述定位模块205定位到所述该被修改的函数也即该软件系统代码中修改后的函数相对应的最新历史版本的软件系统代码函数,并根据预先保存的软件系统代码函数与自动化测试执行脚本的映射关系,确定该被修改的函数相关联的自动化测试执行脚本。Specifically, if it is analyzed that the software code of the software system is modified, such as adding code, modifying code, deleting code, etc., the application server 2 locates the modified function by using the positioning module 205. That is, the software system code function corresponding to the latest historical version corresponding to the modified function in the software system code, and determining the automation associated with the modified function according to the mapping relationship between the pre-saved software system code function and the automated test execution script. Test the execution script.
通过上述程序模块205,本申请所提出的自动化测试分析系统200可以通过调取预存储在所述应用服务器2内存中的自动化测试脚本与被测软件系统代码的函数之间的映射关系,并定位到所述被修改的函数与所述自动化测试脚本的映射关系,得到所述所有受影响自动化测试脚本,实现快速定位所有受影响自动化测试脚本,节省时间。Through the above program module 205, the automated test analysis system 200 proposed by the present application can retrieve the mapping relationship between the automated test script pre-stored in the memory of the application server 2 and the function of the tested software system code, and locate To the mapping relationship between the modified function and the automated test script, all the affected automated test scripts are obtained, and all affected automated test scripts are quickly located to save time.
进一步地,基于本申请自动化测试分析系统200的上述第一实施例,提出本申请的第三实施例(如图5所示)。本实施例中,所述的自动化测试分析系统200还包括设定模块206,存储模块207以及排序模块208,其中:Further, based on the above-described first embodiment of the automated test analysis system 200 of the present application, a third embodiment of the present application (shown in FIG. 5) is proposed. In this embodiment, the automated test and analysis system 200 further includes a setting module 206, a storage module 207, and a sorting module 208, where:
所述设定模块206,用于设定一个存储空间。The setting module 206 is configured to set a storage space.
所述存储模块207,用于存储从终端设备1发送的被测软件系统代码。The storage module 207 is configured to store the tested software system code sent from the terminal device 1.
所述排序模块208,按照接收时间对所述测试软件系统代码进行排序。The sorting module 208 sorts the test software system code according to the receiving time.
具体地,从上文可知,在软件开发的过程中,无可避免的会不断的修改程序代码,或是增加新功能的程序代码。为了让开发人员更好地了解软件在开发中的要演进过程以及参考历史版本的程序代码。在本实施例中,当所述应用服务器2接收到终端设备1发送的被测软件系统代码时,通过存储模块208存储所述被测软件系统代码。而每次被测试软件系统代码被修改后,所述应用服务器2调取最新历史版本的被测软件系统代码与所述修改后的被测软件系统代码进行比较。因此,在本实施例中,所述应用服务器2还通过排序模块209按照接收时间对所述所述测试软件系统代码进行排序。接收时间最靠前的为最新历史版本的测试软件系统代码。Specifically, as can be seen from the above, in the process of software development, it is inevitable that the program code will be constantly modified, or the program code of the new function will be added. In order to let developers better understand the evolution process of the software in development and refer to the historical version of the program code. In this embodiment, when the application server 2 receives the tested software system code sent by the terminal device 1, the software module code to be tested is stored by the storage module 208. And each time the software system code to be tested is modified, the application server 2 retrieves the latest historical version of the tested software system code and compares the modified software system code to be tested. Therefore, in the embodiment, the application server 2 also sorts the test software system code according to the receiving time by the sorting module 209. The most recent receiving time is the latest historical version of the test software system code.
通过上述程序模块206-208,本申请所提出的自动化测试分析系统200,还能够在存储历史版本的被测软件系统代码,并按照时间顺序排序,方便开发人员更好地了解软件在开发中的要演进过程以及参考历史版本的程序代码。Through the above-mentioned program modules 206-208, the automated test analysis system 200 proposed by the present application can also store the historical version of the tested software system code and sort them in chronological order, so that developers can better understand the software in development. The process code to be evolved and referenced to the historical version.
此外,本申请还提出一种自动化测试分析方法。In addition, the present application also proposes an automated test analysis method.
参阅图6所示,是本申请自动化测试分析方法第一实施例的流程示意图。在本实施例中,根据不同的需求,图6所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。Referring to FIG. 6, it is a schematic flowchart of the first embodiment of the automatic test analysis method of the present application. In this embodiment, the order of execution of the steps in the flowchart shown in FIG. 6 may be changed according to different requirements, and some steps may be omitted.
步骤S301,当接收到终端设备1发送的被测软件系统代码时,调取应用服务器2存储的最新历史版本代码。Step S301, when receiving the tested software system code sent by the terminal device 1, retrieve the latest historical version code stored by the application server 2.
通常地,在软件开发的过程中,一定会不断的修改程序代码,或是增加新功能的程序代码。每次更改程序代码,则意味着软件变更,就必须重新测试现有功能,以便确认改程序代码被修改后由没有影响到既有功能,并验证 是否达到预期的目的。为了验证程序代码修改的正确性及其影响,通常需要进行回归测试。然而在回归测试的时候,运行全量自动化测试通常会出现大面积的错误,而通常发现原因并不是程序bug,而是需求或者代码变更,但是自动化测试脚本没有同步更新,从而导致运行失败。Generally, in the process of software development, the program code will be continually modified, or the program code of the new function will be added. Each time you change the program code, it means that the software changes, you must re-test the existing features, in order to confirm that the modified program code has been modified to not affect the existing functions, and verify that the intended purpose is achieved. In order to verify the correctness of the program code modifications and their impact, regression testing is usually required. However, in the case of regression testing, running a full-scale automated test usually results in large-scale errors. Usually, the cause is not a program bug, but a requirement or code change, but the automated test script is not synchronized, resulting in a failure.
因此,在本实施例中,所述应用服务器2存储每一次修改被测软件系统代码。具体地,当应用服务器2接收到终端设备1提交的被测软件系统代码时,调取所述应用服务器2存储的历史版本代码。在本实施方式中,应用服务器2调取最新历史版本代码。Therefore, in the present embodiment, the application server 2 stores the software code of the tested software every time. Specifically, when the application server 2 receives the tested software system code submitted by the terminal device 1, the historical version code stored by the application server 2 is retrieved. In the present embodiment, the application server 2 retrieves the latest history version code.
步骤S302,比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改。Step S302, comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified.
具体地,所述应用服务器2对所述被测软件系统代码与所述最新历史版本代码的结构关系进行分析,包括函数及方法的调用关系、结构的包含关系、类的继承关系等,进而找出代码中做过修改的地方。Specifically, the application server 2 analyzes the structural relationship between the tested software system code and the latest historical version code, including the calling relationship of the function and the method, the inclusion relationship of the structure, the inheritance relationship of the class, and the like, and further The place where the code has been modified.
在本实施方式中,被测软件系统代码的修改包括函数的增加、删除、修改。详细而言,如果一个函数在历史版本代码中存在而在被测软件系统代码中不存在,则说明该函数被删除;如果一个函数在历史版本代码中不存在而在被测软件系统代码中存在,则说明该函数是新增函数;如果一个函数在被测对象代码和历史版本代码中都存在,则通过扫描函数内代码行,过滤掉空白字符,进行字符匹配对比,如果出现函数内代码不相同,则说明代码有改动,该函数被修改。In the present embodiment, the modification of the software system code under test includes the addition, deletion, and modification of functions. In detail, if a function exists in the historical version code and does not exist in the software system code under test, the function is deleted; if a function does not exist in the historical version code, it exists in the software system code under test. , the function is a new function; if a function exists in both the object code and the historical version code, the white line character is filtered out by scanning the code line inside the function, and the character matching is compared. The same, the code has been changed, the function is modified.
步骤S303,当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本。Step S303, when the code of the tested software system is modified, analyzing the code of the tested software system to be modified to obtain all affected automated test scripts.
具体地,从上文可知,在回归测试的时候,运行全量自动化测试通常会出现大面积的错误,而通常发现原因并不是程序bug,而是需求或者被测软件系统代码被修改,但是自动化测试脚本没有同步更新,从而导致运行失败。因此,当所述应用服务器2在确定所述被测软件系统代码被修改时,分析所述被修改的函数,根据被修改的函数与自动化测试脚本的关联关系,确定该被修改的函数将会影响到的自动化测试脚本。Specifically, as can be seen from the above, in the regression test, running a full-scale automated test usually has a large-scale error, and usually the cause is not a program bug, but the requirement or the tested software system code is modified, but the automated test The script did not synchronize updates, causing the run to fail. Therefore, when the application server 2 determines that the software system under test is modified, the modified function is analyzed, and according to the relationship between the modified function and the automated test script, it is determined that the modified function will be The automated test scripts that are affected.
步骤S304,将所述所有受影响的自动化测试脚本反馈至所述终端设备1。Step S304, feeding back all the affected automated test scripts to the terminal device 1.
具体地,所述应用服务器2将所述受影响的自动化测试脚本发送至所述 终端设备1,测试员在进行回归测试之前可以通过终端设备1查询因被测软件系统代码被修改而影响到自动化测试脚本,从而可以在回归测试之前评估是否需要修改自动化测试脚本,保持自动化测试脚本与被测软件系统代码的同步更新,避免因自动化测试脚本没有同步更新,而导致测试失败。Specifically, the application server 2 sends the affected automated test script to the terminal device 1. Before the regression test, the tester can query the terminal device 1 to affect the automation due to the modified software system code being modified. Test the script so that you can evaluate whether you need to modify the automated test script before the regression test, keep the automated test script and the software code of the tested software system updated synchronously, and avoid the test failure because the automated test script does not update synchronously.
在本实施例中,所述应用服务器2将所有受影响的自动化测试脚本整理成图表或者报表,生成影响结果图并将所述影响结果图反馈至所述终端设备1,使得测试员可以直观地了解受影响的自动化测试脚本。In this embodiment, the application server 2 organizes all the affected automated test scripts into a chart or a report, generates an influence result graph, and feeds back the impact result graph to the terminal device 1 so that the tester can intuitively Learn about the affected automated test scripts.
通过上述步骤S301-304,本申请所提出的自动化测试分析方法,首先,当接收到终端设备1发送的被测软件系统代码时,调取应用服务器2存储的最新历史版本代码;然后,比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;进一步地,当所述被测软件系统代码被修改,分析得到所有受影响自动化测试脚本;最后,将所述所有受影响的自动化测试脚本发送至所述终端设备1。这样,既可以避免现有技术中通过因被测软件系统代码被修改而导致回归测试失败的缺陷,也可以通过分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本,并将所述所有受影响的自动化测试脚本发送至所述终端设备1,使得测试人员在进行回归测试之前评估是否需要修改自动化测试脚本,提高测试效率。Through the above steps S301-304, the automated test analysis method proposed by the present application firstly, when receiving the tested software system code sent by the terminal device 1, retrieves the latest historical version code stored by the application server 2; Determining whether the software system code under test is modified; further, when the code of the software system under test is modified, analyzing all affected automated test scripts; Sending all the affected automated test scripts to the terminal device 1. In this way, it is possible to avoid the defects in the prior art that the regression test fails due to the modified software system code being modified, and can also obtain all the affected automated test scripts by analyzing the modified software system code to be tested, and Sending all the affected automated test scripts to the terminal device 1 so that the tester evaluates whether it is necessary to modify the automated test script before the regression test to improve the test efficiency.
进一步地,基于本申请自动化测试分析方法的上述第一实施例,提出本申请自动化测试分析方法的第二实施例。Further, based on the above first embodiment of the automated test analysis method of the present application, a second embodiment of the automated test analysis method of the present application is proposed.
如图7所示,是本申请自动化测试分析方法第二实施例的流程示意图。本实施例中,所述将所述源代码的功能逻辑分支与预存储在应用服务器2的测试案例逻辑分支进行比较,生成所述源代码的功能逻辑分支覆盖率报告的步骤之前,还包括如下步骤:FIG. 7 is a schematic flow chart of a second embodiment of the automated test analysis method of the present application. In this embodiment, the step of comparing the function logic branch of the source code with the test case logical branch pre-stored in the application server 2, before generating the function logic branch coverage report of the source code, further includes the following step:
步骤S401,调取预存储在所述应用服务器2内存中的自动化测试脚本与被测软件系统代码的函数之间的映射关系;Step S401, retrieving a mapping relationship between an automated test script pre-stored in the memory of the application server 2 and a function of the software system code under test;
具体地,在进行自动化测试期间,所述应用服务器2自动分析自动化测试脚本与软件系统代码函数之间的映射关系,并保存所述映射关系。在本实施例中,所述映射关系保存至所述应用服务器2的存储空间。当被测软件系统代码被修改时,从所述应用服务器2的存储空间调取所述映射关系。Specifically, during the automated test, the application server 2 automatically analyzes the mapping relationship between the automated test script and the software system code function, and saves the mapping relationship. In this embodiment, the mapping relationship is saved to the storage space of the application server 2. When the software system code under test is modified, the mapping relationship is retrieved from the storage space of the application server 2.
步骤S402,定位所述被修改的函数与所述自动化测试脚本的映射关系,得到所述所有受影响自动化测试脚本。Step S402, locating the mapping relationship between the modified function and the automated test script to obtain all the affected automated test scripts.
具体地,若分析出该软件系统的软件代码被修改如有新增代码、修改代码、删除代码等情况时,所述应用服务器2通过所述定位模块206定位到所述该被修改的函数也即该软件系统代码中修改后的函数相对应的最新历史版本的软件系统代码函数,并根据预先保存的软件系统代码函数与自动化测试执行脚本的映射关系,确定该被修改的函数相关联的自动化测试执行脚本。Specifically, if it is analyzed that the software code of the software system is modified, such as adding new code, modifying code, deleting code, etc., the application server 2 locates the modified function through the positioning module 206. That is, the software system code function corresponding to the latest historical version corresponding to the modified function in the software system code, and determining the automation associated with the modified function according to the mapping relationship between the pre-saved software system code function and the automated test execution script. Test the execution script.
通过上述步骤S401-S402,本申请所提出的自动化测试分析方法,可以通过调取预存储在所述应用服务器2内存中的自动化测试脚本与被测软件系统代码的函数之间的映射关系,并定位到所述被修改的函数与所述自动化测试脚本的映射关系,得到所述所有受影响自动化测试脚本,实现快速定位所有受影响自动化测试脚本,节省时间。Through the above steps S401-S402, the automated test analysis method proposed by the present application can retrieve the mapping relationship between the automated test script pre-stored in the memory of the application server 2 and the function of the tested software system code, and Locating the mapping relationship between the modified function and the automated test script, obtaining all the affected automated test scripts, and quickly locating all affected automated test scripts, saving time.
进一步地,基于本申请自动化测试分析方法的上述第一和第二实施例,提出本申请自动化测试分析方法的第三实施例。Further, based on the above first and second embodiments of the automated test analysis method of the present application, a third embodiment of the automated test analysis method of the present application is proposed.
如图8所示,是本申请自动化测试分析方法第三实施例的流程示意图。本实施例中,所述生成所述源代码的功能逻辑分支覆盖率报告的步骤,具体包括:As shown in FIG. 8, it is a schematic flowchart of the third embodiment of the automatic test analysis method of the present application. In this embodiment, the step of generating the function logic branch coverage report of the source code includes:
步骤S501,设定一个存储空间。In step S501, a storage space is set.
步骤S502,存储从终端设备1发送的被测软件系统代码。Step S502, storing the software system code under test transmitted from the terminal device 1.
步骤S503,按照接收时间对所述测试软件系统代码进行排序。Step S503, sorting the test software system code according to the receiving time.
具体地,从上文可知,在软件开发的过程中,无可避免的会不断的修改程序代码,或是增加新功能的程序代码。为了让开发人员更好地了解软件在开发中的要演进过程以及参考历史版本的程序代码。在本实施例中,当所述应用服务器2接收到终端设备1发送的被测软件系统代码时,所述应用服务器2存储所述被测软件系统代码。而每次被测试软件系统代码被修改后,所述应用服务器2调取最新历史版本的被测软件系统代码与所述修改后的被测软件系统代码进行比较。因此,在本实施例中,所述应用服务器2按照接收时间对所述测试软件系统代码进行排序。接收时间最靠前的为最新历史版本的测试软件系统代码。Specifically, as can be seen from the above, in the process of software development, it is inevitable that the program code will be constantly modified, or the program code of the new function will be added. In order to let developers better understand the evolution process of the software in development and refer to the historical version of the program code. In this embodiment, when the application server 2 receives the software system code under test sent by the terminal device 1, the application server 2 stores the software system code under test. And each time the software system code to be tested is modified, the application server 2 retrieves the latest historical version of the tested software system code and compares the modified software system code to be tested. Therefore, in the embodiment, the application server 2 sorts the test software system codes according to the reception time. The most recent receiving time is the latest historical version of the test software system code.
通过上述步骤S501-S503,本申请所提出的自动化测试分析方法,还能够在存储历史版本的被测软件系统代码,并按照时间顺序排序,方便开发人员更好地了解软件在开发中的要演进过程以及参考历史版本的程序代码。Through the above steps S501-S503, the automated test analysis method proposed by the present application can also store the historical version of the tested software system code and sort them in chronological order, so that developers can better understand the evolution of the software in development. The procedure and the program code of the reference historical version.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种自动化测试分析方法,应用于应用服务器,其特征在于,所述方法包括:An automated test analysis method, applied to an application server, characterized in that the method comprises:
    当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;Receiving the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
    比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;Comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified;
    当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本;When the tested software system code is modified, analyzing the modified software system code to obtain all affected automated test scripts;
    将所述所有受影响的自动化测试脚本发送至所述终端设备。All of the affected automated test scripts are sent to the terminal device.
  2. 如权利要求1所述的自动化测试分析方法,其特征在于,所述根据所述被修改的函数与自动化测试脚本的映射关系,确定所有受影响自动化测试脚本的步骤,具体包括如下步骤:The automated test analysis method according to claim 1, wherein the step of determining all affected automated test scripts according to the mapping relationship between the modified function and the automated test script comprises the following steps:
    调取与存储在所述应用服务器中的所述自动化测试脚本与被测软件系统代码的函数之间的映射关系;Retrieving a mapping relationship between the automated test script stored in the application server and a function of the software system under test;
    定位所述被修改的函数与所述自动化测试脚本的映射关系,得到所述所有受影响自动化测试脚本。Positioning the mapping relationship between the modified function and the automated test script to obtain all the affected automated test scripts.
  3. 如权利要求1所述的自动化测试分析方法,其特征在于,所述当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码的步骤之前,还包括如下步骤:The automated test and analysis method according to claim 1, wherein the step of retrieving the latest historical version code stored by the application server when receiving the software system code to be tested sent by the terminal device further includes the following steps :
    设定一个存储空间;Set a storage space;
    存储从终端设备发送的测软件系统代码;Storing a test software system code sent from the terminal device;
    按照接收时间对所述测试软件系统代码进行排序,其中,接收时间最靠前的为最新历史版本的测试软件系统代码。The test software system code is sorted according to the receiving time, wherein the most advanced receiving time is the latest historical version of the test software system code.
  4. 如权利要求1所述的自动化测试分析方法,其特征在于,所述比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改的步骤,具体包括:The automated test analysis method according to claim 1, wherein the step of comparing the measured software system code with the latest historical version code to determine whether the tested software system code is modified comprises: :
    分析被测软件系统代码与所述最新历史版本代码的结构关系;Analyzing a structural relationship between the tested software system code and the latest historical version code;
    根据所述结构关系,判断被测软件系统代码是否被修改,其中,所述结构关系为函数及方法的调用关系、结构的包含关系、类的继承关系。Determining, according to the structural relationship, whether the code of the tested software system is modified, wherein the structural relationship is a calling relationship of a function and a method, an inclusion relationship of the structure, and an inheritance relationship of the class.
  5. 如权利要求1-4任一项所述的自动化测试分析方法,其特征在于,所述将所述所有受影响的自动化测试脚本发送至所述终端设备的步骤,具体包括:The automated test and analysis method according to any one of claims 1 to 4, wherein the step of transmitting the all the affected automated test scripts to the terminal device comprises:
    将所有受影响的自动化测试脚本整理成图表或者报表,生成影响结果图;Organize all affected automated test scripts into charts or reports to generate an impact result graph;
    将所述影响结果图反馈至所述终端设备。The impact result graph is fed back to the terminal device.
  6. 一种应用服务器,其特征在于,所述应用服务器包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的自动化测试分析系统,所述自动化测试分析系统被所述处理器执行时实现如下步骤:An application server, comprising: a memory, a processor, on the memory, an automated test analysis system executable on the processor, wherein the automated test analysis system is The following steps are implemented during execution:
    当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;Receiving the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
    比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;Comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified;
    当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本;When the tested software system code is modified, analyzing the modified software system code to obtain all affected automated test scripts;
    将所述所有受影响的自动化测试脚本发送至所述终端设备。All of the affected automated test scripts are sent to the terminal device.
  7. 如权利要求6所述的应用服务器,其特征在于,所述根据所述被修改的函数与自动化测试脚本的映射关系,确定所有受影响自动化测试脚本的步骤,具体包括如下步骤:The application server according to claim 6, wherein the determining the steps of all the affected automated test scripts according to the mapping relationship between the modified function and the automated test script comprises the following steps:
    调取与存储在所述应用服务器中的所述自动化测试脚本与被测软件系统代码的函数之间的映射关系;Retrieving a mapping relationship between the automated test script stored in the application server and a function of the software system under test;
    定位所述被修改的函数与所述自动化测试脚本的映射关系,得到所述所有受影响自动化测试脚本。Positioning the mapping relationship between the modified function and the automated test script to obtain all the affected automated test scripts.
  8. 如权利要求6所述的应用服务器,其特征在于,所述当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码的步骤之前,还包括如下步骤:The application server according to claim 6, wherein the step of retrieving the latest historical version code stored by the application server when receiving the software system code to be tested sent by the terminal device further includes the following steps:
    设定一个存储空间;Set a storage space;
    存储从终端设备发送的测软件系统代码;Storing a test software system code sent from the terminal device;
    按照接收时间对所述测试软件系统代码进行排序,其中,接收时间最靠前的为最新历史版本的测试软件系统代码。The test software system code is sorted according to the receiving time, wherein the most advanced receiving time is the latest historical version of the test software system code.
  9. 如权利要求6所述的应用服务器,其特征在于,所述比较所述被测软 件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改的步骤,具体包括:The application server according to claim 6, wherein the step of comparing the software system code to be tested with the latest history version code to determine whether the software system code to be tested is modified comprises:
    分析被测软件系统代码与所述最新历史版本代码的结构关系;Analyzing a structural relationship between the tested software system code and the latest historical version code;
    根据所述结构关系,判断被测软件系统代码是否被修改,其中,所述结构关系为函数及方法的调用关系、结构的包含关系、类的继承关系。Determining, according to the structural relationship, whether the code of the tested software system is modified, wherein the structural relationship is a calling relationship of a function and a method, an inclusion relationship of the structure, and an inheritance relationship of the class.
  10. 如权利要求5-9所述的应用服务器,其特征在于,所述将所述所有受影响的自动化测试脚本发送至所述终端设备的步骤,具体包括:The application server according to any one of claims 5-9, wherein the step of transmitting the all the affected automated test scripts to the terminal device comprises:
    将所有受影响的自动化测试脚本整理成图表或者报表,生成影响结果图;Organize all affected automated test scripts into charts or reports to generate an impact result graph;
    将所述影响结果图反馈至所述终端设备。The impact result graph is fed back to the terminal device.
  11. 一种自动化测试分析系统,其特征在于,所述自动化测试分析系统包括:An automated test and analysis system, characterized in that the automated test and analysis system comprises:
    调取模块,用于当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;The calling module is configured to retrieve the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
    比较模块,用于比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;a comparison module, configured to compare the tested software system code with the latest historical version code, and determine whether the tested software system code is modified;
    分析模块,用于当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本;An analysis module, configured to: when the tested software system code is modified, analyze the modified software system code to obtain all affected automated test scripts;
    反馈模块,用于将所述所有受影响的自动化测试脚本发送至所述终端设备。a feedback module, configured to send the all affected automated test scripts to the terminal device.
  12. 如权利要求11所述的自动化测试分析系统,其特征在于,所述调取模块还用于:The automated test and analysis system of claim 11, wherein the call module is further configured to:
    调取与存储在所述应用服务器中的所述自动化测试脚本与被测软件系统代码的函数之间的映射关系;Retrieving a mapping relationship between the automated test script stored in the application server and a function of the software system under test;
    所述自动化测试分析系统还包括定位模块,所述定位模块用于:The automated test analysis system further includes a positioning module, the positioning module is configured to:
    定位所述被修改的函数与所述自动化测试脚本的映射关系,得到所述所有受影响自动化测试脚本。Positioning the mapping relationship between the modified function and the automated test script to obtain all the affected automated test scripts.
  13. 如权利要求11所述的自动化测试分析系统,其特征在于,所述自动化测试分析系统,还包括:The automated test and analysis system of claim 11, wherein the automated test and analysis system further comprises:
    设定模块,用于设定一个存储空间;Setting module for setting a storage space;
    存储模块,用于存储从终端设备发送的测软件系统代码;a storage module, configured to store a test software system code sent from the terminal device;
    排序模块,用于按照接收时间对所述测试软件系统代码进行排序,其中,接收时间最靠前的为最新历史版本的测试软件系统代码。The sorting module is configured to sort the test software system code according to the receiving time, wherein the most advanced receiving time is the latest historical version of the test software system code.
  14. 如权利要求11所述的自动化测试分析系统,其特征在于,所述比较模块,具体用于:The automated test and analysis system according to claim 11, wherein the comparison module is specifically configured to:
    分析被测软件系统代码与所述最新历史版本代码的结构关系;Analyzing a structural relationship between the tested software system code and the latest historical version code;
    根据所述结构关系,判断被测软件系统代码是否被修改,其中,所述结构关系为函数及方法的调用关系、结构的包含关系、类的继承关系。Determining, according to the structural relationship, whether the code of the tested software system is modified, wherein the structural relationship is a calling relationship of a function and a method, an inclusion relationship of the structure, and an inheritance relationship of the class.
  15. 如权利要求11-14任一项所述的自动化测试分析系统,其特征在于,所述反馈模块,具体用于:The automated test and analysis system according to any one of claims 11 to 14, wherein the feedback module is specifically configured to:
    将所有受影响的自动化测试脚本整理成图表或者报表,生成影响结果图;Organize all affected automated test scripts into charts or reports to generate an impact result graph;
    将所述影响结果图反馈至所述终端设备。The impact result graph is fed back to the terminal device.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有自动化测试分析系统,所述自动化测试分析系统可被至少一个处理器执行,以使所述至少一个处理器执行如下步骤:A computer readable storage medium, characterized in that the computer readable storage medium stores an automated test analysis system, the automated test analysis system being executable by at least one processor to cause the at least one processor to perform the following step:
    当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史版本代码;Receiving the latest historical version code stored by the application server when receiving the tested software system code sent by the terminal device;
    比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改;Comparing the tested software system code with the latest historical version code to determine whether the tested software system code is modified;
    当所述被测软件系统代码被修改,分析被修改的所述被测软件系统代码以得到所有受影响自动化测试脚本;When the tested software system code is modified, analyzing the modified software system code to obtain all affected automated test scripts;
    将所述所有受影响的自动化测试脚本发送至所述终端设备。All of the affected automated test scripts are sent to the terminal device.
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述根据所述被修改的函数与自动化测试脚本的映射关系,确定所有受影响自动化测试脚本的步骤,具体包括如下步骤:The computer readable storage medium of claim 16, wherein the determining the steps of all affected automated test scripts according to the mapping relationship between the modified function and the automated test script comprises the following steps:
    调取与存储在所述应用服务器中的所述自动化测试脚本与被测软件系统代码的函数之间的映射关系;Retrieving a mapping relationship between the automated test script stored in the application server and a function of the software system under test;
    定位所述被修改的函数与所述自动化测试脚本的映射关系,得到所述所有受影响自动化测试脚本。Positioning the mapping relationship between the modified function and the automated test script to obtain all the affected automated test scripts.
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,所述当接收到终端设备发送的被测软件系统代码时,调取应用服务器存储的最新历史 版本代码的步骤之前,所述处理器还用于执行自动化测试分析系统,以实现如下步骤:The computer readable storage medium according to claim 16, wherein said processing is performed before said step of retrieving a latest history version code stored by the application server when receiving the software system code under test transmitted by the terminal device The device is also used to execute an automated test analysis system to achieve the following steps:
    设定一个存储空间;Set a storage space;
    存储从终端设备发送的测软件系统代码;Storing a test software system code sent from the terminal device;
    按照接收时间对所述测试软件系统代码进行排序,其中,接收时间最靠前的为最新历史版本的测试软件系统代码。The test software system code is sorted according to the receiving time, wherein the most advanced receiving time is the latest historical version of the test software system code.
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,所述比较所述被测软件系统代码与所述最新历史版本代码,确定所述被测软件系统代码是否被修改的步骤,具体包括:The computer readable storage medium according to claim 16, wherein said comparing said measured software system code with said latest history version code, determining whether said tested software system code is modified, include:
    分析被测软件系统代码与所述最新历史版本代码的结构关系;Analyzing a structural relationship between the tested software system code and the latest historical version code;
    根据所述结构关系,判断被测软件系统代码是否被修改,其中,所述结构关系为函数及方法的调用关系、结构的包含关系、类的继承关系。Determining, according to the structural relationship, whether the code of the tested software system is modified, wherein the structural relationship is a calling relationship of a function and a method, an inclusion relationship of the structure, and an inheritance relationship of the class.
  20. 如权利要求16-19任一项所述的计算机可读存储介质,其特征在于,所述将所述所有受影响的自动化测试脚本发送至所述终端设备的步骤,具体包括:The computer readable storage medium according to any one of claims 16 to 19, wherein the step of transmitting the all the affected automated test scripts to the terminal device comprises:
    将所有受影响的自动化测试脚本整理成图表或者报表,生成影响结果图;Organize all affected automated test scripts into charts or reports to generate an impact result graph;
    将所述影响结果图反馈至所述终端设备。The impact result graph is fed back to the terminal device.
PCT/CN2018/089424 2017-12-15 2018-06-01 Automatic testing and analysis method, automatic testing and analysis system, application server and computer-readable storage medium WO2019114209A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711344740.7A CN107992424A (en) 2017-12-15 2017-12-15 Automatic test analysis method, application server and computer-readable recording medium
CN201711344740.7 2017-12-15

Publications (1)

Publication Number Publication Date
WO2019114209A1 true WO2019114209A1 (en) 2019-06-20

Family

ID=62037888

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089424 WO2019114209A1 (en) 2017-12-15 2018-06-01 Automatic testing and analysis method, automatic testing and analysis system, application server and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN107992424A (en)
WO (1) WO2019114209A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115203064A (en) * 2022-09-19 2022-10-18 北京探境科技有限公司 Code detection method and device, computer equipment and readable storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107992424A (en) * 2017-12-15 2018-05-04 平安科技(深圳)有限公司 Automatic test analysis method, application server and computer-readable recording medium
CN109947657A (en) * 2019-04-03 2019-06-28 广东电网有限责任公司 A kind of the mobility scale analysis method and system of enterprise-level information management system
CN113360368B (en) * 2020-03-06 2023-09-01 北京京东振世信息技术有限公司 Method and device for testing software performance
CN115858348A (en) * 2022-11-24 2023-03-28 上海浦东发展银行股份有限公司 Testing workload evaluation method, equipment and medium based on bytecode

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100146340A1 (en) * 2008-12-09 2010-06-10 International Business Machines Corporation Analyzing Coverage of Code Changes
CN102831056A (en) * 2012-07-31 2012-12-19 东南大学 Regression testing sample generating method based on modification impact analysis
CN103678097A (en) * 2012-09-05 2014-03-26 百度在线网络技术(北京)有限公司 Method and device for selecting regression test case
CN103870384A (en) * 2012-12-11 2014-06-18 航天信息股份有限公司 Test case presumption method and system
CN104536896A (en) * 2015-01-12 2015-04-22 牟永敏 Regression test case selecting and ranking method and system oriented to function call path
CN106547678A (en) * 2015-09-16 2017-03-29 伊姆西公司 For the method and apparatus of white-box testing
CN107992424A (en) * 2017-12-15 2018-05-04 平安科技(深圳)有限公司 Automatic test analysis method, application server and computer-readable recording medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100466556C (en) * 2007-03-30 2009-03-04 华为技术有限公司 Network device management method and system
CN100576172C (en) * 2008-05-27 2009-12-30 华耀环宇科技(北京)有限公司 A kind of method of determining that function point changes that changes by code analysis
US8732663B2 (en) * 2010-02-24 2014-05-20 Salesforce.Com, Inc. System, method and computer program product for providing automated testing by utilizing a preconfigured point of entry in a test or by converting a test to a predefined format
CN106776339B (en) * 2016-12-30 2018-07-24 深圳壹账通智能科技有限公司 Automated testing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100146340A1 (en) * 2008-12-09 2010-06-10 International Business Machines Corporation Analyzing Coverage of Code Changes
CN102831056A (en) * 2012-07-31 2012-12-19 东南大学 Regression testing sample generating method based on modification impact analysis
CN103678097A (en) * 2012-09-05 2014-03-26 百度在线网络技术(北京)有限公司 Method and device for selecting regression test case
CN103870384A (en) * 2012-12-11 2014-06-18 航天信息股份有限公司 Test case presumption method and system
CN104536896A (en) * 2015-01-12 2015-04-22 牟永敏 Regression test case selecting and ranking method and system oriented to function call path
CN106547678A (en) * 2015-09-16 2017-03-29 伊姆西公司 For the method and apparatus of white-box testing
CN107992424A (en) * 2017-12-15 2018-05-04 平安科技(深圳)有限公司 Automatic test analysis method, application server and computer-readable recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115203064A (en) * 2022-09-19 2022-10-18 北京探境科技有限公司 Code detection method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN107992424A (en) 2018-05-04

Similar Documents

Publication Publication Date Title
WO2019114209A1 (en) Automatic testing and analysis method, automatic testing and analysis system, application server and computer-readable storage medium
WO2019071891A1 (en) Code coverage analysis method and application server
US8782609B2 (en) Test failure bucketing
US9569325B2 (en) Method and system for automated test and result comparison
US9104796B2 (en) Correlation of source code with system dump information
US10133651B2 (en) Software defect analysis tool
US20120084756A1 (en) Accurate identification of software tests based on changes to computer software code
CN107329894B (en) Application program system testing method and device and electronic equipment
US11625315B2 (en) Software regression recovery via automated detection of problem change lists
US10140201B2 (en) Software defect detection tool
CN109783324B (en) System operation early warning method and device
US20210048999A1 (en) Automated generation of status chains for software updates
CN108255735B (en) Associated environment testing method, electronic device and computer readable storage medium
CN115454869A (en) Interface automation test method, device, equipment and storage medium
CN111427601A (en) Method and device for automatically upgrading BIOS in batches, computer equipment and storage medium
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN111694684B (en) Abnormal construction method and device of storage device, electronic device and storage medium
CN114090113B (en) Method, device, equipment and storage medium for dynamically loading data source processing plug-in
CN111399862A (en) Batch installation method and device of Windows missing driver and computer equipment
CN113032257B (en) Automated testing method, apparatus, computer system, and readable storage medium
CN107908525B (en) Alarm processing method, equipment and readable storage medium
CN113505059A (en) Page monitoring method and device, computer equipment and storage medium
CN106874191B (en) Intelligent database execution method and system
CN113342560A (en) Fault processing method, system, electronic equipment and storage medium
KR102201845B1 (en) Automation unit test method of multi-task based software and system for the same

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18888871

Country of ref document: EP

Kind code of ref document: A1