Invention content
The main purpose of the present invention is to provide a kind of automated testing method and devices, it is intended to improve automatic test
Efficiency and cost-effective.
To achieve the above object, a kind of automated testing method provided by the invention, the described method comprises the following steps:
In software systems operational process, in real time or whether the software code of the timing analysis software systems is changed;
If the software code for analyzing the software systems is changed, the software code changed is found out, and protect according to advance
The associated data of the software code and automatic test perform script deposited, determination are associated with the software code changed found out
Automatic test perform script;
Determining each automatic test perform script is run in software code is by the modified software systems, and raw
At test report.
Preferably, described in software systems operational process, in real time or the software code of the timing analysis software systems
Further include before the step of whether being changed:
The corresponding each automatic test perform script of runs software system one by one, and execute foot in an automatic test
In this operational process, software code associated with the automatic test perform script, the described and automation are analyzed and recorded
The software generation that the associated software code of test execution script is called in the process of running for the automatic test perform script
Code;
Preserve the associated data of software code and automatic test perform script.
Preferably, described to run determining each automatic test in software code is by the modified software systems and hold
This is traveled far and wide, and further includes before the step of generating test report:
Analyse whether the associated automatic test perform script of the software code determined with changed;
It is held if so, executing and running determining each automatic test in software code is by the modified software systems
It travels far and wide originally, and the step of generating test report;
It is that the corresponding automatic test of the software code changed addition is held to remind if it is not, then generating prompting message
Travel far and wide this.
Preferably, described in software systems operational process, in real time or the software code of the timing analysis software systems
The step of whether being changed include:
In software systems operational process, in real time or the software modification daily record of the timing analysis software systems, with analysis
Whether the software code for going out the software systems is changed;The modification includes newly-increased code, modification code or deletes code.
Preferably, the test report includes the list information for the automatic test perform script for test errors occur, and/
Or, the error type information of test errors.
In addition, to achieve the above object, the present invention also provides a kind of automatic test device, the automatic test device
Including:
First analysis module, in software systems operational process, in real time or the timing analysis software systems it is soft
Whether part code is changed;
Determining module finds out the software code changed if the software code for analyzing the software systems is changed,
And according to the associated data of the software code and automatic test perform script that pre-save, determine soft with being changed of finding out
The associated automatic test perform script of part code;
Test module, in software code by the modified software systems in run determining each automatic test
Perform script, and generate test report.
Preferably, the automatic test device further includes:
Logging modle, for the corresponding each automatic test perform script of runs software system one by one, and certainly at one
In dynamicization test execution script operational process, software code associated with the automatic test perform script is analyzed and records,
The software code associated with the automatic test perform script be the automatic test perform script in the process of running
The software code called;
Preserving module, the associated data for preserving software code and automatic test perform script.
Preferably, the automatic test device further includes:
Second analysis module, for analysing whether that the associated automatic test of the software code determined with changed is held
Travel far and wide this;
If reminding module is given birth to for automatic test perform script not associated with the software code changed
It is that the software code changed adds corresponding automatic test perform script to remind at prompting message.
Preferably, first analysis module is additionally operable to:
In software systems operational process, in real time or the software modification daily record of the timing analysis software systems, with analysis
Whether the software code for going out the software systems is changed;The modification includes newly-increased code, modification code or deletes code.
Preferably, the test report includes the list information for the automatic test perform script for test errors occur, and/
Or, the error type information of test errors.
Automated testing method and device proposed by the present invention, when the software code for analyzing software systems is changed,
By the associated data of the software code and automatic test perform script that pre-save, determine and the software code changed
Associated automatic test perform script, and run in software code is by the modified software systems it is determining it is each from
Dynamicization test execution script, to generate test report.It is associated with the software code changed automatic due to need to only determine
Change test execution script, and execute the automatic test perform script determined and complete test, without after changing code
The testing results that all automatic test perform scripts are carried out in software systems, improve testing efficiency, and are more prone to search
Test errors have saved manpower and materials.
Specific implementation mode
In order to keep technical problems, technical solutions and advantages to be solved clearer, clear, tie below
Drawings and examples are closed, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only
To explain the present invention, it is not intended to limit the present invention.
The present invention provides a kind of automated testing method.
Referring to Fig.1, Fig. 1 is the flow diagram of automated testing method first embodiment of the present invention.
In the first embodiment, which includes:
Step S10, in software systems operational process, in real time or the software code of the timing analysis software systems whether
It is changed;
After a software systems on-line running, according to the actual operating state of the software systems, developer is sometimes
The software code that the software systems need to be directed to carries out part modification, for example, newly-increased code, modification code, deletion code etc..This
In embodiment, during software systems on-line running, in real time or timing is (for example, daily 23:59) the software system is analyzed
Whether the software code of system is changed, such as whether have newly-increased code, modification code, delete code etc..
In one embodiment, in the software systems operational process, in real time or system log message is transferred in timing,
And the software modification daily record of the software systems is extracted from system log message, to analyze the software code of the software systems
Whether changed.
In another embodiment, a software modification information acquisition module can be also pre-configured in the software systems,
The details of each software code modification are detected in real time or periodically and record by the software modification information acquisition module, such as
Change type, modification time, modification side's identity information etc., and point more refined using the software modification information detected
Analysis is to judge whether the software code of the software systems should be identified as being changed.For example, can be set in advance in set period of time or
It is automatic without being carried out to the software systems after the high-level developer of setting modifies to the software code of the software systems
Change test, is opened in set period of time or the high-level of setting if then detecting and being recorded by the software modification information acquisition module
Hair personnel are modified the software code of the software systems, then analysis and identification be the software systems software code not by
Modification, it is more flexible, practical.
Step S20 finds out the software code changed, and root if the software code for analyzing the software systems is changed
According to the associated data of the software code and automatic test perform script that pre-save, the software generation changed for determining and finding out
The associated automatic test perform script of code;
If the software code for analyzing the software systems is changed if any newly-increased code, modification code, deletes the feelings such as code
When condition, then find out the software code changed, in the software code of the software code changed namely the software systems with repair
Original software code before changing that post code is corresponding and being changed, and held according to the software code and automatic test that pre-save
The associated data for sheet of traveling far and wide, determines the associated automatic test perform script of the software code changed.Wherein, software generation
Code and the associated data of automatic test perform script can be directed in advance the software codes of the software systems with it is each automatically
Change test execution script to be analyzed, finds out the automatic test corresponding to every section of software code of the software systems and execute foot
This, and it is associated preservation.Software code and the associated data of automatic test perform script can also be from cloud server
Obtain, as can be directly acquired from cloud server software code that software systems identical with the software systems are provided with it is automatic
Change the associated data of test execution script;The multiple and same or analogous software of the software systems can also be obtained from cloud server
The associated data for the software code and automatic test perform script that system provides carries out comparison and chooses most accurate software code
With the associated data of automatic test perform script, do not limit herein.
Step S30 runs determining each automatic test in software code is by the modified software systems and executes
Script, and generate test report.
After the associated automatic test perform script of the software code determining with changed, you can in software generation
Code is run determining each automatic test perform script in the modified software systems, after being changed software code
The software systems carry out automatic test, that is, utilize and held with the associated automatic test of original software code before being changed
Travel far and wide this, automatic test carried out by the modified software systems to code, in the software systems after test modifications with
Whether the original software code before being changed is deposited in content, function, effect etc. all same or similar modification post code
Change it is incompatible, mismatch the problems such as, and generate test report.Wherein, the test report includes test errors occur
The list information of automatic test perform script, and/or, the error type information of test errors, the error type information packet
Include but be not limited to H5 page exceptions, system crash etc..
The present embodiment passes through software code and oneself pre-saved when the software code for analyzing software systems is changed
The associated data of dynamicization test execution script determines that automatic test associated with the software code changed executes foot
This, and determining each automatic test perform script is run in software code is by the modified software systems, to generate
Test report.Due to the associated automatic test perform script of the software code that need to only determine be changed, and execute true
The automatic test perform script made completes test, without carrying out all automations in the software systems after changing code
The testing results of test execution script improve testing efficiency, and are more prone to search test errors, have saved manpower and materials.
As shown in Fig. 2, second embodiment of the invention proposes a kind of automated testing method, on the basis of above-described embodiment
On, further include before above-mentioned steps S10:
Step S40, the one by one corresponding each automatic test perform script of runs software system, and the automation survey at one
Try in perform script operational process, analyze and record software code associated with the automatic test perform script, it is described with
The associated software code of automatic test perform script is called in the process of running by the automatic test perform script
Software code;
Step S50 preserves the associated data of software code and automatic test perform script.
In the present embodiment, for a software systems, the corresponding each automatic test of the software systems is run one by one and is held
This is traveled far and wide, and in an automatic test perform script operational process, analyzes and records and the automatic test perform script
Associated software code, it is described to refer to that the automatic test executes with the associated software code of automatic test perform script
The software code called in script implementation procedure.In this way, can accurately be looked for for each section of software code of the software systems
To one or more automatic test perform scripts associated therewith, and by the software code of the software systems of record and certainly
The associated data of dynamicization test execution script is preserved, for subsequently in the software generation for determining with being changed in the software systems
It is used when the associated automatic test perform script of code.
As shown in figure 3, third embodiment of the invention proposes a kind of automated testing method, on the basis of above-described embodiment
On, further include before above-mentioned steps S30:
Step S60 analyses whether the associated automatic test perform script of the software code determined with changed;
If so, thening follow the steps S30;
If it is not, thening follow the steps S70, prompting message is generated, is that the software code changed addition is corresponding to remind
Automatic test perform script.
In the present embodiment, in the associated automatic test perform script of the determining software code changed, if not looking for
To automatic test perform script associated with the software code changed, then illustrate that the software code changed does not have in advance
It is newly-increased code in relation to being linked to relevant automatic test perform script or the software code changed, is not associated
Automatic test perform script, it is its addition automatic test perform script manually to need developer.Then generated on interface
Prompting message such as pop window information etc., alternatively, sending prompting message to the mobile phone of predetermined terminal such as developer, prompting is opened
Hair personnel are that the software code changed carries out manual compiling script or transfers existing script to add corresponding automation survey
Perform script is tried, so as to carry out more comprehensive automatic test by the modified software systems to software code.
The present invention further provides a kind of automatic test devices.
It is the high-level schematic functional block diagram of automatic test device first embodiment of the present invention with reference to Fig. 4, Fig. 4.
In the first embodiment, which includes:
First analysis module 01, in software systems operational process, in real time or the timing analysis software systems
Whether software code is changed;
After a software systems on-line running, according to the actual operating state of the software systems, developer is sometimes
The software code that the software systems need to be directed to carries out part modification, for example, newly-increased code, modification code, deletion code etc..This
In embodiment, during software systems on-line running, in real time or timing is (for example, daily 23:59) the software system is analyzed
Whether the software code of system is changed, such as whether have newly-increased code, modification code, delete code etc..
In one embodiment, in the software systems operational process, in real time or system log message is transferred in timing,
And the software modification daily record of the software systems is extracted from system log message, to analyze the software code of the software systems
Whether changed.
In another embodiment, a software modification information acquisition module can be also pre-configured in the software systems,
The details of each software code modification are detected in real time or periodically and record by the software modification information acquisition module, such as
Change type, modification time, modification side's identity information etc., and point more refined using the software modification information detected
Analysis is to judge whether the software code of the software systems should be identified as being changed.For example, can be set in advance in set period of time or
It is automatic without being carried out to the software systems after the high-level developer of setting modifies to the software code of the software systems
Change test, is opened in set period of time or the high-level of setting if then detecting and being recorded by the software modification information acquisition module
Hair personnel are modified the software code of the software systems, then analysis and identification be the software systems software code not by
Modification, it is more flexible, practical.
Determining module 02 finds out the software generation changed if the software code for analyzing the software systems is changed
Code, and according to the associated data of the software code and automatic test perform script that pre-save, determination are changed with finding out
The associated automatic test perform script of software code;
If the software code for analyzing the software systems is changed if any newly-increased code, modification code, deletes the feelings such as code
When condition, then find out the software code changed, in the software code of the software code changed namely the software systems with repair
Original software code before changing that post code is corresponding and being changed, and held according to the software code and automatic test that pre-save
The associated data for sheet of traveling far and wide, determines the associated automatic test perform script of the software code changed.Wherein, software generation
Code and the associated data of automatic test perform script can be directed in advance the software codes of the software systems with it is each automatically
Change test execution script to be analyzed, finds out the automatic test corresponding to every section of software code of the software systems and execute foot
This, and it is associated preservation.Software code and the associated data of automatic test perform script can also be from cloud server
Obtain, as can be directly acquired from cloud server software code that software systems identical with the software systems are provided with it is automatic
Change the associated data of test execution script;The multiple and same or analogous software of the software systems can also be obtained from cloud server
The associated data for the software code and automatic test perform script that system provides carries out comparison and chooses most accurate software code
With the associated data of automatic test perform script, do not limit herein.
Test module 03, in software code by the modified software systems in run determining each automation and survey
Perform script is tried, and generates test report.
After the associated automatic test perform script of the software code determining with changed, you can in software generation
Code is run determining each automatic test perform script in the modified software systems, after being changed software code
The software systems carry out automatic test, that is, utilize and held with the associated automatic test of original software code before being changed
Travel far and wide this, automatic test carried out by the modified software systems to code, in the software systems after test modifications with
Whether the original software code before being changed is deposited in content, function, effect etc. all same or similar modification post code
Change it is incompatible, mismatch the problems such as, and generate test report.Wherein, the test report includes test errors occur
The list information of automatic test perform script, and/or, the error type information of test errors, the error type information packet
Include but be not limited to H5 page exceptions, system crash etc..
The present embodiment passes through software code and oneself pre-saved when the software code for analyzing software systems is changed
The associated data of dynamicization test execution script determines that automatic test associated with the software code changed executes foot
This, and determining each automatic test perform script is run in software code is by the modified software systems, to generate
Test report.Due to the associated automatic test perform script of the software code that need to only determine be changed, and execute true
The automatic test perform script made completes test, without carrying out all automations in the software systems after changing code
The testing results of test execution script improve testing efficiency, and are more prone to search test errors, have saved manpower and materials.
As shown in figure 5, second embodiment of the invention proposes a kind of automatic test device, on the basis of above-described embodiment
On, further include:
Logging modle 04, for the corresponding each automatic test perform script of runs software system one by one, and at one
In automatic test perform script operational process, analyzes and record software generation associated with the automatic test perform script
Code, the software code associated with the automatic test perform script are the automatic test perform script in operational process
Middle called software code;
Preserving module 05, the associated data for preserving software code and automatic test perform script.
In the present embodiment, for a software systems, the corresponding each automatic test of the software systems is run one by one and is held
This is traveled far and wide, and in an automatic test perform script operational process, analyzes and records and the automatic test perform script
Associated software code, it is described to refer to that the automatic test executes with the associated software code of automatic test perform script
The software code called in script implementation procedure.In this way, can accurately be looked for for each section of software code of the software systems
To one or more automatic test perform scripts associated therewith, and by the software code of the software systems of record and certainly
The associated data of dynamicization test execution script is preserved, for subsequently in the software generation for determining with being changed in the software systems
It is used when the associated automatic test perform script of code.
As shown in fig. 6, third embodiment of the invention proposes a kind of automatic test device, on the basis of above-described embodiment
On, further include:
Second analysis module 06, the associated automatic test of software code for analysing whether to determine with changed
Perform script;
Reminding module 07, if for automatic test perform script not associated with the software code changed,
Prompting message is generated, is that the software code changed adds corresponding automatic test perform script to remind.
In the present embodiment, in the associated automatic test perform script of the determining software code changed, if not looking for
To automatic test perform script associated with the software code changed, then illustrate that the software code changed does not have in advance
It is newly-increased code in relation to being linked to relevant automatic test perform script or the software code changed, is not associated
Automatic test perform script, it is its addition automatic test perform script manually to need developer.Then generated on interface
Prompting message such as pop window information etc., alternatively, sending prompting message to the mobile phone of predetermined terminal such as developer, prompting is opened
Hair personnel are that the software code changed carries out manual compiling script or transfers existing script to add corresponding automation survey
Perform script is tried, so as to carry out more comprehensive automatic test by the modified software systems to software code.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that process, method, article or device including a series of elements include not only those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this
There is also other identical elements in the process of element, method, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to be realized by hardware, but very much
In the case of the former be more preferably embodiment.Based on this understanding, technical scheme of the present invention is substantially in other words to existing
The part that technology contributes can be expressed in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, calculate
Machine, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
Above by reference to the preferred embodiment of the present invention has been illustrated, not thereby limit to the interest field of the present invention.On
It is for illustration only to state serial number of the embodiment of the present invention, can not represent the quality of embodiment.It is patrolled in addition, though showing in flow charts
Sequence is collected, but in some cases, it can be with the steps shown or described are performed in an order that is different from the one herein.
Those skilled in the art do not depart from the scope of the present invention and essence, can there are many variant scheme realize the present invention,
It can be used for another embodiment for example as the feature of one embodiment and obtain another embodiment.All technologies with the present invention
All any modification, equivalent and improvement made by within design, should all be within the interest field of the present invention.