CN109656804A - Automated testing method, equipment, storage medium and device - Google Patents
Automated testing method, equipment, storage medium and device Download PDFInfo
- Publication number
- CN109656804A CN109656804A CN201811135196.XA CN201811135196A CN109656804A CN 109656804 A CN109656804 A CN 109656804A CN 201811135196 A CN201811135196 A CN 201811135196A CN 109656804 A CN109656804 A CN 109656804A
- Authority
- CN
- China
- Prior art keywords
- test
- tested
- markup language
- extensible markup
- language document
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of automated testing method, equipment, storage medium and devices, this method comprises: obtaining multiple processes to be tested, the process to be tested is configured in extensible markup language document according to preset order, each process to be tested configured in the extensible markup language document is successively tested according to the preset order, obtain the first test report, it can configure the process to be tested arbitrarily needed to be implemented in the extensible markup language document, one key executes multiple processes to be tested of configuration, improves testing efficiency;The target process and corresponding first test crash reason of test crash are extracted from first test report, corresponding loophole is positioned according to the first test crash reason, to carry out environment or system reparation according to loophole, to improve the integrality of process and the accuracy of test.
Description
Technical field
The present invention relates to computer information technology field more particularly to a kind of automated testing method, equipment, storage mediums
And device.
Background technique
More mature functional test automated test tool has very much, such as QTP, QTP are Quick Test
The abbreviation of Professional is a kind of automatic testing instrument.It is intended to execute duplicate automation with it using the purpose of QTP
Test is mainly used for regression test and tests the new version of same software, and the use of this kind of testing tool is simple, relative interface
Change, but it is expensive and not convenient for safeguarding, and testing efficiency is low, and execution error rate is higher, therefore, how to improve automatic test
Efficiency be a technical problem to be solved urgently.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill
Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of automated testing method, equipment, storage medium and devices, it is intended to solve
Certainly in the prior art the low efficiency of automatic test the technical issues of.
To achieve the above object, the present invention provides a kind of automated testing method, the automated testing method include with
Lower step:
Multiple processes to be tested are obtained, the process to be tested is configured according to preset order in extensible markup language text
In part;
Each process to be tested configured in the extensible markup language document is successively carried out according to the preset order
Test obtains the first test report;
Target process and corresponding first test crash that test crash is extracted from first test report are former
Cause positions corresponding loophole according to the first test crash reason.
Preferably, described to obtain multiple processes to be tested, the process to be tested can expanded according to preset order configuration
It opens up in making language document, comprising:
Multiple processes to be tested are obtained, each process to be tested is divided into the sub-process of corresponding multiple classifications respectively;
The sub-process is configured in extensible markup language document according to preset order;
Each process to be tested that will be configured in the extensible markup language document according to the preset order successively
It is tested, obtains the first test report, comprising:
Each sub-process configured in the extensible markup language document is successively tested according to the preset order,
Obtain the first test report.
Preferably, the target process that test crash is extracted from first test report and corresponding first
Test crash reason positions corresponding loophole according to the first test crash reason, comprising:
The target process and the first test crash reason of test crash are extracted from first test report;
The target process is tested again, obtains the second test report;
The second test crash reason is extracted from second test report, according to the first test crash reason and
The second test crash reason positions corresponding loophole.
Preferably, described that the target process is tested again, obtain the second test report, comprising:
The corresponding target user's operation of the target process is simulated, detects whether miscue occur;
If there is the miscue, judge whether the miscue shows correctly;
If the miscue shows incorrect, determines the target process test crash, generate corresponding second and survey
Examination report.
Preferably, described to obtain multiple processes to be tested, the process to be tested can expanded according to preset order configuration
Before opening up in making language document, the automated testing method further include:
Integrated Development Environment and default computer file format file are installed, according to the default computer file format text
Part develops default test frame in the Integrated Development Environment of installation;
It is described to obtain multiple processes to be tested, the process to be tested is configured according to preset order in extensible markup language
It says in file, comprising:
Multiple processes to be tested are obtained, the process to be tested is configured according to preset order in the default test frame
In extensible markup language document in.
Preferably, the installation Integrated Development Environment and default computer file format file, according to the default calculating
Machine file format file is developed in the Integrated Development Environment of installation after default test frame, the automatic test side
Method further include:
In the default test frame, predetermined registration operation is executed by preset function, is obtained corresponding with the predetermined registration operation
Process to be tested.
Preferably, described in the default test frame, by preset function execute predetermined registration operation, obtain with it is described pre-
If before operating corresponding process to be tested, the automated testing method further include:
Whether detection current time is the default fixed time test moment, if so, executing described in the default test frame
In, the step of executing predetermined registration operation by preset function, obtain process to be tested corresponding with the predetermined registration operation.
In addition, to achieve the above object, the present invention also proposes a kind of automated test device, the automated test device
Including memory, processor and it is stored in the automatic test program that can be run on the memory and on the processor,
The step of automatic test program is arranged for carrying out automated testing method as described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, it is stored on the storage medium automatic
Change test program, the automatic test program realizes the step of automated testing method as described above when being executed by processor
Suddenly.
In addition, to achieve the above object, the present invention also proposes a kind of automatic test device, the automatic test device
Include:
Configuration module configures the process to be tested can according to preset order for obtaining multiple processes to be tested
In extended markup language file;
Test module, for presetting each process to be tested configured in the extensible markup language document according to described
Sequence is successively tested, and the first test report is obtained;
Locating module, for extracting the target process and corresponding of test crash from first test report
One test crash reason positions corresponding loophole according to the first test crash reason.
In the present invention, multiple processes to be tested are obtained, the process to be tested is configured according to preset order expansible
In making language document, by each process to be tested configured in the extensible markup language document according to the preset order according to
It is secondary to be tested, obtain the first test report, can configure in the extensible markup language document arbitrarily need to be implemented it is to be measured
Process is tried, a key executes multiple processes to be tested of configuration, improves testing efficiency;Survey is extracted from first test report
The target process and corresponding first test crash reason for trying failure position corresponding according to the first test crash reason
Loophole, so that environment or system reparation are carried out according to loophole, to improve the integrality of process and the accuracy of test.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the automated test device for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of automated testing method first embodiment of the present invention;
Fig. 3 is the flow diagram of automated testing method second embodiment of the present invention;
Fig. 4 is the flow diagram of automated testing method 3rd embodiment of the present invention;
Fig. 5 is the structural block diagram of automatic test device first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is that the automated test device structure for the hardware running environment that the embodiment of the present invention is related to is shown
It is intended to.
As shown in Figure 1, the automated test device may include: processor 1001, such as central processing unit (Central
Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein,
Communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display screen
(Display), optional user interface 1003 can also include standard wireline interface and wireless interface, for user interface 1003
Wireline interface in the present invention can be USB interface.Network interface 1004 optionally may include the wireline interface, wireless of standard
Interface (such as Wireless Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the arbitrary access of high speed
Memory (Random Access Memory, RAM) memory, is also possible to stable memory (Non-volatile
Memory, NVM), such as magnetic disk storage.Memory 1005 optionally can also be the storage independently of aforementioned processor 1001
Device.
It will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the restriction to automated test device,
It may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in Figure 1, regarding as in the memory 1005 of computer storage medium a kind of may include operating system, network
Communication module, Subscriber Interface Module SIM and automatic test program.
In automated test device shown in Fig. 1, network interface 1004 is mainly used for connecting background server, and described
Background server carries out data communication;User interface 1003 is mainly used for connecting user equipment;The automated test device is logical
It crosses processor 1001 and calls the automatic test program stored in memory 1005, and execute provided in an embodiment of the present invention automatic
Change test method.
Based on above-mentioned hardware configuration, the embodiment of automated testing method of the present invention is proposed.
It is the flow diagram of automated testing method first embodiment of the present invention referring to Fig. 2, Fig. 2, proposes the present invention certainly
Dynamicization test method first embodiment.
In the first embodiment, the automated testing method the following steps are included:
Step S10: obtaining multiple processes to be tested, and the process to be tested is configured according to preset order in expansible mark
Remember in language file.
It should be understood that the executing subject of the present embodiment is the automated test device, wherein the automatic test
Equipment can be the electronic equipments such as PC or server.The process to be tested include user log in, registration, product publication,
It opens an account, audit, statement analysis and the page are shown etc., and operation flows can be by default test block when carrying out automatic test
Predetermined registration operation is simulated in frame to generate corresponding process to be tested, to tested accordingly the process to be tested.
It should be noted that the extensible markup language document (Extendsible Markup Language, XML)
In can configure the process to be tested arbitrarily needed to be implemented.For example, XiuGaiZiLiao is a function subclass, include
These three power functions of testXiuGaiZiliao, testChuShenZiliao, testFuShenZiliao, function subclass
And its function is added in XML file according to the corresponding label of XML (for example, class and include), then can a key execute on
State three functions.
Step S20: by each process to be tested configured in the extensible markup language document according to the preset order
It is successively tested, obtains the first test report.
It will be appreciated that it is not simultaneously that each process to be tested configured in the extensible markup language document, which is serial executes,
What row executed, the sequence of execution is the sequencing according to each process to be tested in the extensible markup language document to hold
Capable.
In the concrete realization, when tester needs to carry out the test of the process to be tested, preset function can be passed through
The element in current page is obtained, predetermined registration operation corresponding with the element is executed according to the element, is generated described to be tested
Process.The tester can be instructed by the display interface input test of the automated test device, or backstage takes
The test instruction of business device clocked flip, instructs in response to the test, each by what is configured in the extensible markup language document
Process to be tested is successively tested according to the preset order, obtains first test report.First test report
Test result including each process to be tested, if it is successfully tested or test crash, the function of test crash and test crash
The information such as reason.
It should be understood that can be by configuring the process to be tested needed to be implemented and described to be tested in XML file
The parameters such as the username and password that will use in process.For example, the process to be tested is the function of product systems release product
Test, product publication need a business personnel, and product audit needs an auditor, can configure in the XML file in advance
The good business personnel and the corresponding user name of the auditor, then in the functional test of the product systems release product, only
The step of logging in the product systems need to be executed, the business personnel and the corresponding user name of the auditor are then respectively filled in,
Functional test when release product can be realized.It, can be more stable ginseng since the address of product systems will not change
Number all configures in xml, to improve testing efficiency.
It is asserted it should be noted that can be added in test process in each check post of each process to be tested, for example, by
Different in the bullet frame of different browsers, we can write different code for different browsers to adapt to different browsers.It is right
In the page elements too long to obtain the process to be tested due to system response time the case where, it can pass through and increase response
Waiting time solve, to improve the serious forgiveness of test, increase accuracy.
Step S30: the target process and corresponding first that test crash is extracted from first test report are surveyed
Failure cause is tried, corresponding loophole is positioned according to the first test crash reason.
It should be understood that each process to be tested can generate a report file at the end of test, i.e., described first test
Report.If the test result of process to be tested is test crash, the letter for executing failure can be listed in first test report
Several and test crash reason, can extract test crash reason from first test report, former according to the test crash
It is as caused by environmental problem or system vulnerability because positioning corresponding loophole.
It will be appreciated that the generally metastable function that we are tested using default test frame, Wo Menhui
It is used in regression test, the opposite modification of these functions is smaller, and also does more comprehensive functional test before, automates
Test only can complete basic verification, such as Modify password function, we can modify password and do some basic verifications, automatically
Change the main integrality for still verifying main flow of test.
In the first embodiment, multiple processes to be tested are obtained, the process to be tested is configured according to preset order
In extensible markup language document, by each process to be tested configured in the extensible markup language document according to described default
Sequence is successively tested, and is obtained the first test report, be can configure in the extensible markup language document and arbitrarily need to be implemented
Process to be tested, a key execute configuration multiple processes to be tested, improve testing efficiency;It is mentioned from first test report
The target process and corresponding first test crash reason for taking out test crash are positioned according to the first test crash reason
Corresponding loophole, so that environment or system reparation are carried out according to loophole, to improve the integrality of process and the accuracy of test.
It is the flow diagram of automated testing method second embodiment of the present invention referring to Fig. 3, Fig. 3, is based on above-mentioned Fig. 2 institute
The first embodiment shown proposes the second embodiment of automated testing method of the present invention.
In a second embodiment, the step S10, comprising:
Step S101: multiple processes to be tested are obtained, each process to be tested is divided into corresponding multiple classifications respectively
Sub-process.
It will be appreciated that each functional function is placed in a class, is adjusted at any time in the default test frame
With, and the process to be tested is divided into each group as far as possible, i.e., the sub-process of the multiple classification is reduced each to be tested
Coupling between process, so that the change amount of code reduces when demand changes.Such as: this class of Common, we
All public functions are all write on the inside, as long as modifying the power function of bottom in this way, without spending each calling of modification
His function.It is specifically used to be arranged the relevant configuration of browser by driver class, for example, we can be set to IE,
Chrome or Firefox, by common class, using driver class as the variable of the common class, and we are developed
Other some public functions, for example obtain random character string function obtain Institution Code function and subsystems
Function etc. is exited in login, then the java code word of functional type, inherits the common class, these code words are according to actual
Service logic is come the test code developed, such as foreground registering functional and login authentication function, if Chrome need to be switched to from IE
When, as long as the configuration in modification driver class reduces all letters without moving common parent and other function subclasses
Several couplings.
Step S102: the sub-process is configured in extensible markup language document according to preset order.
It should be understood that the sub-process is different classes of, the coupling reduction between each sub-process, then to each subflow
When Cheng Jinhang is tested, if some sub-process test crash is arrived in test, function carry out corresponding with sub-process portion can be found
Divide modification, other function subclass or parent is arrived without change, to reduce code change amount.By the sub-process according to pre-
If being arranged in order in extensible markup language document, then each subflow can be executed by a key in the extensible markup language document
Journey.
In a second embodiment, the step S20, comprising:
Step S201: successively according to the preset order by each sub-process configured in the extensible markup language document
It is tested, obtains the first test report.
It should be noted that it is not parallel that each sub-process configured in the extensible markup language document, which is serial executes,
It executes, the sequence of execution is performed according to sequencing of each sub-process in the extensible markup language document.
First test report includes the test result of each sub-process, if is successfully tested or test crash, the corresponding survey of sub-process
The examination failure information such as function and test crash reason.
In a second embodiment, the step S30, comprising:
Step S301: target process and the first test crash that test crash is extracted from first test report are former
Cause.
In the concrete realization, each process to be tested can generate a report file at the end of test, i.e., described first surveys
Examination report.If the test result of process to be tested is test crash, it can be listed in first test report and execute failure
Function and test crash reason can extract test crash reason from first test report, according to the test crash
Reason positions corresponding loophole, is as caused by environmental problem or system vulnerability.
Step S302: testing the target process again, obtains the second test report.
It should be understood that in order to which the target process for determining test crash is because system response time is too long or be
There are loopholes to cause for system, it will usually the target detection process is tested again, the waiting time that can be responded by increase,
Judge whether to be successfully tested, if can be successfully tested in the waiting time for increasing response, illustrates the target process test crash
It is that can not obtain test crash caused by page elements since system response time is too long.If the test result is still
Test crash then assert it is that caused by system has that loophole or environment exist, then can carry out human intervention, further fixed
Environmental problem or system vulnerability when the loophole of position.The second test report can be generated at the end of the target process is tested again
It accuses, if the test result of the target process is test crash, the letter for executing failure can be listed in second test report
Several and test crash reason.
Further, in the present embodiment, the step S302, comprising:
The corresponding target user's operation of the target process is simulated, detects whether miscue occur;
If there is the miscue, judge whether the miscue shows correctly;
If the miscue shows incorrect, determines the target process test crash, generate corresponding second and survey
Examination report.
It will be appreciated that then generating the corresponding mesh by simulating the corresponding target user's operation of the target process
Process is marked, usually under normal circumstances, if target user operation is when the error occurs, it may appear that corresponding default mistake mentions
Show, to indicate that user re-executes target user's operation, then the miscue can be detected, judge the mistake
Whether prompt is default miscue, if the miscue is default miscue, then it is assumed that the miscue is shown just
Really, then the test result of the target process is to be successfully tested, and dragging the miscue not is the default miscue, then recognizes
Shown for the miscue it is incorrect, then the test result of the target process be test crash, the target stream can be generated
Corresponding second test report of journey can list the function and test crash reason for executing failure in second test report.
For example, the target process be Modify password function, specific test situation include: normal flow, original code mistake,
New password be unsatisfactory for complexity, new password it is consistent with original code and confirmation password mistake.Target user's operation, can be
The original code of analog subscriber input mistake, system can show miscue, then verify whether the miscue occurs, Yi Jisuo
It states whether miscue shows correctly, if show incorrect of the miscue or do not shown, judges the mesh
Mark process executes failure, and test result is test crash.
Step S303: extracting the second test crash reason from second test report, according to first test
Failure cause and the second test crash reason position corresponding loophole.
It will be appreciated that can analyze the second test crash reason listed in second test report, judge
Whether the second test crash reason is identical as the first test crash reason, if they are the same, then can be according to the identical survey
It tries failure cause and positions corresponding loophole, be as caused by environmental problem or system vulnerability.If second test crash is former
Whether cause is not identical as the first test crash reason, then needs to be analyzed respectively for different reasons, to orient
Accurate loophole.
In this second embodiment, multiple processes to be tested are obtained, each process to be tested are divided into respectively corresponding multiple
The sub-process of classification configures the sub-process in extensible markup language document according to preset order, will be described expansible
Each sub-process configured in making language document is successively tested according to the preset order, obtains the first test report,
The process to be tested is divided into each group as far as possible, i.e., the sub-process of the multiple classification is reduced between each process to be tested
Coupling so that when demand changes, the change amount of code is reduced;Test is extracted from first test report
The target process and the first test crash reason of failure, test the target process again, obtain the second test report,
The second test crash reason is extracted from second test report, according to the first test crash reason and described second
Test crash reason positions corresponding loophole, improves the accuracy of the loophole of positioning.
It is the flow diagram of automated testing method 3rd embodiment of the present invention referring to Fig. 4, Fig. 4, is based on above-mentioned Fig. 2 institute
The first embodiment shown proposes the 3rd embodiment of automated testing method of the present invention.
In the third embodiment, before the step S10, further includes:
Step S01: installation Integrated Development Environment and default computer file format file, according to the default computer literal
Part formatted file develops default test frame in the Integrated Development Environment of installation.
It will be appreciated that the default test frame in the present embodiment is in the Integrated Development Environment (Eclipse)
It builds, first installation Eclipse, then the relevant default computer file format file (jar) is installed, described in exploitation acquisition
Default test frame: the frame of Java+Selenium+TestNG need to only make in the test process for carrying out each process to be tested
With included By function, the various elements in the page can be obtained, the operations such as assignment, click or upload attachment are carried out, with this
To complete the operation of automatic imitation user execution.Selenium is a tool for web application test, Selenium
Test is run directly in browser, just as real user in operation.TestNG is a test frame in Java,
Whether test code works in the intended manner, and analog subscriber operation carries out functional test, is to test each process to be tested
It is no to can be realized expectation function.
In the third embodiment, the step S10, comprising:
Step S103: obtaining multiple processes to be tested, and the process to be tested is configured according to preset order described pre-
If in the extensible markup language document in test frame.
It should be understood that in the default test frame, configure the extensible markup language document, can by it is multiple to
Testing process is configured in the extensible markup language document, can be to configuration in the extensible markup language document
Multiple processes to be tested carry out it is successively serial together execute, to improve testing efficiency.
In the third embodiment, after the step S01, further includes:
Step S02: in the default test frame, predetermined registration operation is executed by preset function, obtains and is preset with described
Operate corresponding process to be tested.
It should be noted that the preset function is the By function carried in the default test frame, it is each in order to test
Whether process to be tested works in the intended manner, executes the predetermined registration operation, institute by included By functional simulation user
Stating predetermined registration operation is to generate user's operation corresponding to each process to be tested, the predetermined registration operation include: register, open an account, auditing,
The user's operations such as statement analysis, the page are shown, Modify password, login and product are issued.The predetermined registration operation is being executed, then is being generated
Corresponding process to be tested, to carry out functional test to the process to be tested, with test whether can be in the intended manner
Work.
In the third embodiment, before the step S02, further includes:
Step S011: whether detection current time is the default fixed time test moment, if so, executing the step S02.
In the concrete realization, carry out automatic running test code using Jenkins automatically dispose tool, Jenkins is one
A open source software project is that a kind of continuous integrating tool based on Java exploitation passes through for monitoring persistently duplicate work
Jenkins self-timing executes, and without artificial triggering, for example the default fixed time test moment is 8 o'clock of every morning,
Timed task in Jenkins when detecting that the current time is 8 o'clock of morning just automatic execution pre-set to
The code of testing process can embody in journal file if wrong, can also check the test report in selenium.
In the third embodiment, Integrated Development Environment and default computer file format file are installed, according to described default
Computer file format file develops default test frame in the Integrated Development Environment of installation, establishes specifically for function
The default test frame of test independently can write code for different business process, and safeguard it is simple, serious forgiveness also compared with
It is high;Whether detection current time is the default fixed time test moment, if so, in the default test frame, by presetting letter
Number executes predetermined registration operation, obtains process to be tested corresponding with the predetermined registration operation, periodically carries out the test of process to be tested, nothing
It need to manually trigger, improve testing efficiency;Multiple processes to be tested are obtained, the process to be tested is configured according to preset order
It is automatic to execute configuration in the extensible markup language document in extensible markup language document in the default test frame
In all processes to be tested, multiple regression test processes can be performed simultaneously, to improve testing efficiency.
In addition, the embodiment of the present invention also proposes a kind of storage medium, automatic test journey is stored on the storage medium
The step of sequence, the automatic test program realizes automated testing method as described above when being executed by processor.
In addition, the embodiment of the present invention also proposes a kind of automatic test device, the automatic test device referring to Fig. 5
Include:
Configuration module 10 configures the process to be tested according to preset order for obtaining multiple processes to be tested
In extensible markup language document;
Test module 20, for by each process to be tested configured in the extensible markup language document according to described pre-
If sequence is successively tested, the first test report is obtained;
Locating module 30, for extracting the target process of test crash and corresponding from first test report
First test crash reason positions corresponding loophole according to the first test crash reason.
It should be understood that the executing subject of the present embodiment is the automated test device, wherein the automatic test
Equipment can be the electronic equipments such as PC or server.The process to be tested include user log in, registration, product publication,
It opens an account, audit, statement analysis and the page are shown etc., and operation flows can be by default test block when carrying out automatic test
Predetermined registration operation is simulated in frame to generate corresponding process to be tested, to tested accordingly the process to be tested.
It should be noted that the extensible markup language document (Extendsible Markup Language, XML)
In can configure the process to be tested arbitrarily needed to be implemented.For example, XiuGaiZiLiao is a function subclass, include
These three power functions of testXiuGaiZiliao, testChuShenZiliao, testFuShenZiliao, function subclass
And its function is added in XML file according to the corresponding label of XML (for example, class and include), then can a key execute on
State three functions.
It will be appreciated that it is not simultaneously that each process to be tested configured in the extensible markup language document, which is serial executes,
What row executed, the sequence of execution is the sequencing according to each process to be tested in the extensible markup language document to hold
Capable.
In the concrete realization, when tester needs to carry out the test of the process to be tested, preset function can be passed through
The element in current page is obtained, predetermined registration operation corresponding with the element is executed according to the element, is generated described to be tested
Process.The tester can be instructed by the display interface input test of the automated test device, or backstage takes
The test instruction of business device clocked flip, instructs in response to the test, each by what is configured in the extensible markup language document
Process to be tested is successively tested according to the preset order, obtains first test report.First test report
Test result including each process to be tested, if it is successfully tested or test crash, the function of test crash and test crash
The information such as reason.
It should be understood that can be by configuring the process to be tested needed to be implemented and described to be tested in XML file
The parameters such as the username and password that will use in process.For example, the process to be tested is the function of product systems release product
Test, product publication need a business personnel, and product audit needs an auditor, can configure in the XML file in advance
The good business personnel and the corresponding user name of the auditor, then in the functional test of the product systems release product, only
The step of logging in the product systems need to be executed, the business personnel and the corresponding user name of the auditor are then respectively filled in,
Functional test when release product can be realized.It, can be more stable ginseng since the address of product systems will not change
Number all configures in xml, to improve testing efficiency.
It is asserted it should be noted that can be added in test process in each check post of each process to be tested, for example, by
Different in the bullet frame of different browsers, we can write different code for different browsers to adapt to different browsers.It is right
In the page elements too long to obtain the process to be tested due to system response time the case where, it can pass through and increase response
Waiting time solve, to improve the serious forgiveness of test, increase accuracy.
It should be understood that each process to be tested can generate a report file at the end of test, i.e., described first test
Report.If the test result of process to be tested is test crash, the letter for executing failure can be listed in first test report
Several and test crash reason, can extract test crash reason from first test report, former according to the test crash
It is as caused by environmental problem or system vulnerability because positioning corresponding loophole.
It will be appreciated that the generally metastable function that we are tested using default test frame, Wo Menhui
It is used in regression test, the opposite modification of these functions is smaller, and also does more comprehensive functional test before, automates
Test only can complete basic verification, such as Modify password function, we can modify password and do some basic verifications, automatically
Change the main integrality for still verifying main flow of test.
In the present embodiment, multiple processes to be tested are obtained, will the process to be tested according to preset order configuration can
In extended markup language file, by each process to be tested configured in the extensible markup language document according to it is described preset it is suitable
Sequence is successively tested, and the first test report is obtained, and be can configure in the extensible markup language document and arbitrarily to be needed to be implemented
Process to be tested, a key execute multiple processes to be tested of configuration, improve testing efficiency;It is extracted from first test report
The target process of test crash and corresponding first test crash reason out, according to the first test crash reason positioning pair
The loophole answered, so that environment or system reparation are carried out according to loophole, to improve the integrality of process and the accuracy of test.
In one embodiment, the automatic test device further include: segmentation module, for obtaining multiple streams to be tested
Each process to be tested is divided into the sub-process of corresponding multiple classifications by journey respectively;
The configuration module 10 is also used to according to preset order configure the sub-process in extensible markup language document
In;
The test module 20, each sub-process for being also used to configure in the extensible markup language document is according to described
Preset order is successively tested, and the first test report is obtained.
In one embodiment, the automatic test device further include: extraction module is used for from first test report
In extract the target process and the first test crash reason of test crash;
The test module 20 is also used to test the target process again, obtains the second test report;
The locating module 30 is also used to extract the second test crash reason from second test report, according to
The first test crash reason and the second test crash reason position corresponding loophole.
In one embodiment, the automatic test device further include: detection module, for simulating the target process pair
The target user's operation answered, detects whether miscue occur;
Judgment module, if judging whether the miscue shows correctly for there is the miscue;
Determination module determines the target process test crash if show incorrect for the miscue, generation
Corresponding second test report.
In one embodiment, the automatic test device further include: development module, for install Integrated Development Environment and
Default computer file format file, according to the default computer file format file installation the Integrated Development Environment
It is middle to develop default test frame;
The configuration module 10 is also used to obtain multiple processes to be tested, by the process to be tested according to preset order
Configuration is in the extensible markup language document in the default test frame.
In one embodiment, the automatic test device further include: execution module, in the default test frame
In, predetermined registration operation is executed by preset function, obtains process to be tested corresponding with the predetermined registration operation.
In one embodiment, the detection module is also used to detect whether current time is the default fixed time test moment, if
It is that then execution is described in the default test frame, predetermined registration operation is executed by preset function, is obtained and the predetermined registration operation
The step of corresponding process to be tested.
It is real that the other embodiments or specific implementation of automatic test device of the present invention can refer to above-mentioned each method
Example is applied, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.If listing equipment for drying
Unit claim in, several in these devices, which can be, to be embodied by the same item of hardware.Word first,
Second and the use of third etc. do not indicate any sequence, can be title by these word explanations.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
(such as read-only memory mirror image (Read Only Memory image, ROM)/random access memory (Random Access
Memory, RAM), magnetic disk, CD) in, including some instructions are used so that terminal device (can be mobile phone, computer,
Server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of automated testing method, which is characterized in that the automated testing method the following steps are included:
Multiple processes to be tested are obtained, the process to be tested is configured according to preset order in extensible markup language document
In;
Each process to be tested configured in the extensible markup language document is successively tested according to the preset order,
Obtain the first test report;
The target process and corresponding first test crash reason of test crash, root are extracted from first test report
Corresponding loophole is positioned according to the first test crash reason.
2. automated testing method as described in claim 1, which is characterized in that it is described to obtain multiple processes to be tested, by institute
Process to be tested is stated to configure in extensible markup language document according to preset order, comprising:
Multiple processes to be tested are obtained, each process to be tested is divided into the sub-process of corresponding multiple classifications respectively;
The sub-process is configured in extensible markup language document according to preset order;
Each process to be tested that will be configured in the extensible markup language document is successively carried out according to the preset order
Test obtains the first test report, comprising:
Each sub-process configured in the extensible markup language document is successively tested according to the preset order, is obtained
First test report.
3. automated testing method as claimed in claim 2, which is characterized in that described to be extracted from first test report
The target process of test crash and corresponding first test crash reason out, according to the first test crash reason positioning pair
The loophole answered, comprising:
The target process and the first test crash reason of test crash are extracted from first test report;
The target process is tested again, obtains the second test report;
The second test crash reason is extracted from second test report, according to the first test crash reason and described
Second test crash reason positions corresponding loophole.
4. automated testing method as claimed in claim 3, which is characterized in that described to be surveyed again to the target process
Examination obtains the second test report, comprising:
The corresponding target user's operation of the target process is simulated, detects whether miscue occur;
If there is the miscue, judge whether the miscue shows correctly;
If the miscue shows incorrect, determines the target process test crash, generate corresponding second test report
It accuses.
5. automated testing method as described in claim 1, which is characterized in that it is described to obtain multiple processes to be tested, by institute
State process to be tested according to preset order configuration in extensible markup language document before, the automated testing method also wraps
It includes:
Integrated Development Environment and default computer file format file are installed, existed according to the default computer file format file
Default test frame is developed in the Integrated Development Environment of installation;
It is described to obtain multiple processes to be tested, the process to be tested is configured according to preset order in extensible markup language text
In part, comprising:
Multiple processes to be tested are obtained, the process to be tested is configured in the default test frame according to preset order
In extensible markup language document.
6. automated testing method as claimed in claim 5, which is characterized in that the installation Integrated Development Environment and pre-designed
Calculation machine file format file is developed in the Integrated Development Environment of installation according to the default computer file format file
After default test frame, the automated testing method further include:
In the default test frame, by preset function execute predetermined registration operation, obtain it is corresponding with the predetermined registration operation to
Testing process.
7. automated testing method as claimed in claim 6, which is characterized in that it is described in the default test frame, lead to
It crosses preset function and executes predetermined registration operation, before obtaining process to be tested corresponding with the predetermined registration operation, the automatic test
Method further include:
Whether detection current time is the default fixed time test moment, if so, leading to described in executing in the default test frame
Cross the step of preset function executes predetermined registration operation, obtains process to be tested corresponding with the predetermined registration operation.
8. a kind of automated test device, which is characterized in that the automated test device includes: memory, processor and deposits
The automatic test program that can be run on the memory and on the processor is stored up, the automatic test program is by institute
State the step of realizing the automated testing method as described in any one of claims 1 to 7 when processor executes.
9. a kind of storage medium, which is characterized in that be stored with automatic test program on the storage medium, the automation is surveyed
The step of examination program realizes the automated testing method as described in any one of claims 1 to 7 when being executed by processor.
10. a kind of automatic test device, which is characterized in that the automatic test device includes:
Configuration module configures the process to be tested expansible according to preset order for obtaining multiple processes to be tested
In making language document;
Test module, for by each process to be tested configured in the extensible markup language document according to the preset order
It is successively tested, obtains the first test report;
Locating module, target process and corresponding first for extracting test crash from first test report are surveyed
Failure cause is tried, corresponding loophole is positioned according to the first test crash reason.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811135196.XA CN109656804A (en) | 2018-09-27 | 2018-09-27 | Automated testing method, equipment, storage medium and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811135196.XA CN109656804A (en) | 2018-09-27 | 2018-09-27 | Automated testing method, equipment, storage medium and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109656804A true CN109656804A (en) | 2019-04-19 |
Family
ID=66110681
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811135196.XA Pending CN109656804A (en) | 2018-09-27 | 2018-09-27 | Automated testing method, equipment, storage medium and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109656804A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110543424A (en) * | 2019-09-06 | 2019-12-06 | 安徽航天信息有限公司 | Testing method and device for electronic tax platform |
CN112559375A (en) * | 2020-12-23 | 2021-03-26 | 深圳迅策科技有限公司 | Method for parallel automatic testing by using multiple different browsers |
-
2018
- 2018-09-27 CN CN201811135196.XA patent/CN109656804A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110543424A (en) * | 2019-09-06 | 2019-12-06 | 安徽航天信息有限公司 | Testing method and device for electronic tax platform |
CN110543424B (en) * | 2019-09-06 | 2023-05-05 | 安徽航天信息有限公司 | Test method and device for electronic tax platform |
CN112559375A (en) * | 2020-12-23 | 2021-03-26 | 深圳迅策科技有限公司 | Method for parallel automatic testing by using multiple different browsers |
CN112559375B (en) * | 2020-12-23 | 2024-05-10 | 深圳迅策科技有限公司 | Method for parallel automatic test by using multiple different browsers |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11281570B2 (en) | Software testing method, system, apparatus, device medium, and computer program product | |
CN104407980B (en) | Mobile solution automatic test device and method | |
CN109828903B (en) | Automatic testing method and device, computer device and storage medium | |
CN109710508A (en) | Test method, test device, test equipment and computer readable storage medium | |
US20130117855A1 (en) | Apparatus for automatically inspecting security of applications and method thereof | |
CN110704304B (en) | Application program testing method and device, storage medium and server | |
CN107526676B (en) | Cross-system test method and device | |
CN112270149B (en) | Verification platform automatic integration method and system, electronic equipment and storage medium | |
CN107967209B (en) | Method for detecting error in front-end webpage code, detection equipment and server | |
CN111124919A (en) | User interface testing method, device, equipment and storage medium | |
CN106776338B (en) | Test method, test device and server | |
Lachmann et al. | Delta-oriented test case prioritization for integration testing of software product lines | |
CN105912473A (en) | BDD-based mobile APP automatic testing platform and testing method | |
CN113778898B (en) | User interface automatic test method and device, electronic equipment and storage medium | |
CN109558313B (en) | Method and device for constructing abnormal test scene | |
CN112463580A (en) | Test system and method based on virtualization device | |
US8661414B2 (en) | Method and system for testing an order management system | |
CN106528429A (en) | UI testing method and device | |
CN109656804A (en) | Automated testing method, equipment, storage medium and device | |
KR101792864B1 (en) | System and Method for verifying application | |
CN114647572A (en) | Method and system for software application component testing | |
CN109582524A (en) | A kind of test method, system and electronic equipment and storage medium | |
CN117370203A (en) | Automatic test method, system, electronic equipment and storage medium | |
us Saqib et al. | Functionality, performance, and compatibility testing: A model based approach | |
CN113836825A (en) | Application method of key standard and verification chip of neural network processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |