CN104794057B - A kind of crossing event automated testing method and device - Google Patents

A kind of crossing event automated testing method and device Download PDF

Info

Publication number
CN104794057B
CN104794057B CN201510213286.6A CN201510213286A CN104794057B CN 104794057 B CN104794057 B CN 104794057B CN 201510213286 A CN201510213286 A CN 201510213286A CN 104794057 B CN104794057 B CN 104794057B
Authority
CN
China
Prior art keywords
event
tested
automatic test
item
test cases
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.)
Active
Application number
CN201510213286.6A
Other languages
Chinese (zh)
Other versions
CN104794057A (en
Inventor
刘晓华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom Technology Co Ltd
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 Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN201510213286.6A priority Critical patent/CN104794057B/en
Publication of CN104794057A publication Critical patent/CN104794057A/en
Application granted granted Critical
Publication of CN104794057B publication Critical patent/CN104794057B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of crossing event automated testing method and system, wherein method includes:Determine normal event cross reference storehouse and abnormal operation event base;According to the normal event cross reference storehouse and abnormal operation event base, automatic test cases collection is generated;The item to be tested that test event needs to test is obtained, the automatic test cases collection is searched according to the syntagmatic of the item to be tested, obtains the automatic test cases matched with each item to be tested;According to the automatic test cases matched with each item to be tested, it is determined that automatic test cases corresponding with the test event, perform automatic test cases corresponding with the test event and the test event are tested with realizing.By means of the invention it is possible to realize the batch-automated test of crossing event.

Description

A kind of crossing event automated testing method and device
Technical field
The present invention relates to technical field of measurement and test, espespecially a kind of crossing event automated testing method and device.
Background technology
As network integration trend is increasingly apparent, telecommunication apparatus support function is more and more, performance is more and more stronger, only The test of progress individual module is far from enough, and the demand that module is intersected is increasing, and this is added largely to tester Workload, while higher requirement it is also proposed to the qualification of modules.
Module crossing event is tested, and comprising the cross-beta between each main points of inside modules between module and module, also may be used With comprising being realized by the method for combination, such as:Boundary value and equivalence class combination are all that a kind of method of combined test is realized.Mould Block crossing event test is called events conflict test, during referring to that One function is currently running, at the same another event or The test that person's operation is disturbed the process, judge that the collision event for performing interference will not cause application software abnormal.
Module cross-beta is more in the case of individual module relative maturity, using manual testing, due to the project cycle and The limitation of human resources etc., there is introducing automatic test.Traditional automatic test, it is for the few single work(of relative variability mostly The superposition of energy module or individual feature module, automation use-case is formed, then develops into script according to use-case, is adjusted by script It is used for automatic test after survey.But script logic is relatively easy in existing automatic test, it is used for regression test, and Test period is grown, and is not suitable for carrying out the test of batch.
The content of the invention
In order to solve the above-mentioned technical problem, the invention provides a kind of crossing event automated testing method and device, energy Enough realize the batch-automated test of crossing event.
In order to reach the object of the invention, in a first aspect, the invention provides a kind of crossing event automated testing method, Methods described includes:
Normal event cross reference storehouse and abnormal operation event base are determined, the normal event cross reference storehouse is used to store Correlation of the Cross module in time, space and function, the abnormal operation event base, which is used to store, influences the intersection The abnormal operation event of module normal operation;
According to the normal event cross reference storehouse and the abnormal operation event base, automatic test cases collection is generated;
The item to be tested that test event needs to test is obtained, is searched according to the syntagmatic of the item to be tested described automatic Change test use cases, obtain the automatic test cases matched with each item to be tested;
According to the automatic test cases matched with each item to be tested, it is determined that it is corresponding with the test event from Dynamicization test case, perform automatic test cases corresponding with the test event and the test event is surveyed with realizing Examination.
Alternatively, the normal event cross reference storehouse includes essential option event and option event, the abnormal operation Event base includes essential option event and option event;
It is described according to the normal event cross reference storehouse and the abnormal operation event base, generate automatic test cases Collection, is specifically included:
What the essential option event and the abnormal operation event base included according to the normal event cross reference storehouse included Essential option event, generate the automatic test cases for specifying crossing event;
What the option event and the abnormal operation event base included according to the normal event cross reference storehouse included Option event, using topological sorting algorithm, generate the automatic test cases of random crossing event;
The automatic test cases structure of the automatic test cases of the specified crossing event and the random crossing event Into the automatic test cases collection.
Alternatively, the item to be tested for obtaining test event and needing to test, according to the syntagmatic of the item to be tested The automatic test cases collection is searched, the automatic test cases matched with each item to be tested is obtained, specifically includes:
Test event is established, the test event includes at least one Cross module;
Determine that the test event needs the item to be tested tested;
Judge that the syntagmatic of the item to be tested belongs to specified crossing event relation or random crossing event relation;
If the syntagmatic of the item to be tested belongs to the specified crossing event relation, the specified intersection is searched The automatic test cases collection of event, the automation for obtaining the specified crossing event matched with each item to be tested are surveyed Example on probation;
If the syntagmatic of the item to be tested belongs to the random crossing event relation, the random intersection is searched The automatic test cases collection of event, if found, obtain and described intersect at random with what each item to be tested matched The automatic test cases of event, if do not found, generate the automatic test matched with each item to be tested Use-case.
Alternatively, the automatic test cases that the basis matches with each item to be tested, it is determined that with the test Automatic test cases corresponding to project, are specifically included:
If multiple have association order between the automatic test cases of the item matching to be tested, according to Association order, it is determined that automatic test cases corresponding with the test event;
If multiple do not have association order between the automatic test cases of the item matching to be tested, to multiple The weighted value of the automatic test cases matched with the item to be tested is arranged, and is put in order according to described, it is determined that and institute State automatic test cases corresponding to test event.
Alternatively, it is described to perform automatic test cases corresponding with the test event to realize to the test event After being tested, in addition to:
Test report is generated according to test result, and the test report is analyzed;
The normal event cross reference storehouse and the abnormal operation event are updated according to the analysis to the test report Storehouse.
In second aspect, the invention provides a kind of crossing event automatization test system, including:
Overall control module, normal event cross reference storehouse, abnormal operation event base and automatic test cases collection;
The overall control module includes:Normal event cross reference generation module, abnormal operation event generation module, from Dynamicization test case combination producing module and testing execution module;
The normal event cross reference generation module is described normal for determining the normal event cross reference storehouse Event cross reference storehouse, for correlation of the store interleaving module in time, space and function;
The abnormal operation event generation module, for determining the abnormal operation event base, the abnormal operation event Storehouse is used to store the abnormal operation event for influenceing the Cross module normal operation;
The automatic test cases combination producing module, for according to the normal event cross reference storehouse and abnormal behaviour Make event base and generate the automatic test cases collection, the automatic test cases collection is used to store automatic test cases;
The testing execution module, the item to be tested tested for obtaining test event to need, according to the item to be tested Syntagmatic search the automatic test cases collection, obtain the automatic test use matched with each item to be tested Example;According to the automatic test cases matched with each item to be tested, it is determined that automation corresponding with the test event Test case, perform automatic test cases corresponding with the test event and the test event is tested with realizing. Alternatively, the normal event cross reference storehouse includes essential option event and option event, the abnormal operation event base bag Include essential option event and option event;
The automatic test cases combination producing module, for according to the normal event cross reference storehouse and abnormal behaviour Make event base and generate the automatic test cases collection, be specially:
What the essential option event and the abnormal operation event base included according to the normal event cross reference storehouse included Essential option event, generate the automatic test cases for specifying crossing event;
What the option event and the abnormal operation event base included according to the normal event cross reference storehouse included Option event, using topological sorting algorithm, generate the automatic test cases of random crossing event;
The automatic test cases structure of the automatic test cases of the specified crossing event and the random crossing event Into the automatic test cases collection.
Alternatively, the testing execution module is used to obtain the item to be tested that test event needs to test, and is treated according to described The syntagmatic of test item searches the automatic test cases collection, obtains the automation matched with each item to be tested and surveys Example on probation, it is specially:
Test event is established, the test event includes at least one Cross module;
Determine that the test event needs the item to be tested tested;
Judge that the syntagmatic of the item to be tested belongs to specified crossing event relation or random crossing event relation;
If the syntagmatic of the item to be tested belongs to the specified crossing event relation, the specified intersection is searched The automatic test cases collection of event, the automation for obtaining the specified crossing event matched with each item to be tested are surveyed Example on probation;
If the syntagmatic of the item to be tested belongs to the random crossing event relation, the random intersection is searched The automatic test cases collection of event, if found, obtain and described intersect at random with what each item to be tested matched The automatic test cases of event, if do not found, generate the automatic test matched with each item to be tested Use-case.
Alternatively, the testing execution module is used to be used according to the automatic test matched with each item to be tested Example, it is determined that automatic test cases corresponding with the test event, are specially:
If multiple have association order between the automatic test cases of the item matching to be tested, according to Association order, it is determined that automatic test cases corresponding with the test event;
If multiple do not have association order between the automatic test cases of the item matching to be tested, to multiple The weighted value of the automatic test cases matched with the item to be tested is arranged, and is put in order according to described, it is determined that and institute State automatic test cases corresponding to test event.
Alternatively, the system also includes:Test result module, test result report and analysis module and knowledge base are perfect Module;
The test result module, for storing test result;
The test result report and analysis module, for generating test report according to the test result, and to described Test report is analyzed;
The knowledge base improves module, intersects pass for updating the normal event according to the analysis to the test report It is storehouse and the abnormal operation event base;
The test result module and the knowledge base improve module in the overall control module.
Alternatively, the system also includes:Human-computer interaction module, for receiving subscriber control information, and to the totality Control module sends the subscriber control information;Wherein, the subscriber control information includes operative configuration and operational order.
Alternatively, the system also includes:Crossing event drive module, the crossing event drive module include being used to drive Move the abstract driving of normal event cross reference of the normal event cross reference generation module, for driving the abnormal operation The abnormal operation event of event generation module is abstract to be driven and for driving the automatic test cases combination producing module Automatic test cases combination producing module drive;
The system also includes:For driving the testing execution module test execution to drive.
It is compared with prior art, of the invention by pre-establishing normal event cross reference storehouse and abnormal operation event base, And automatic test cases are generated according to normal event cross reference storehouse and abnormal operation event base, solve crossing event combination What incomplete, abnormal scenario simulation was not enough brought there may be the risk to conceal defects;Need to test in test event to be tested Item can determine from automatic test cases, it is achieved thereby that batch-automated test;In addition, test result is analyzed And normal event cross reference storehouse and abnormal operation event base are updated according to test result, Test coverage degree is not only increased, Effectively save the testing time.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical scheme of the embodiment of the present invention, and one of constitution instruction Point, it is used to explain technical scheme together with the embodiment of the present invention, does not form the limitation to technical solution of the present invention.
Fig. 1 is the structural representation of crossing event automatization test system provided in an embodiment of the present invention.
Fig. 2 is the schematic flow sheet of crossing event automated testing method provided in an embodiment of the present invention.
Fig. 3 is the schematic diagram of topological sorting algorithm provided in an embodiment of the present invention.
Fig. 4 is the schematic flow sheet of automatic test provided in an embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the present invention Feature can mutually be combined.
Can be in the computer system of such as one group computer executable instructions the flow of accompanying drawing illustrates the step of Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein Sequence performs shown or described step.
Fig. 1 is the structural representation of crossing event automatization test system provided in an embodiment of the present invention.The present invention is implemented Crossing event automatic test course can be divided into the next stage in example:Normal event cross reference storehouse and abnormal operation event Storehouse formation stages, automation use-case generation phase, automation use-case perform and result generation phase and normal event intersection pass It is storehouse and abnormal operation event base optimizing phase.
, as shown in figure 1, intersection thing provided in an embodiment of the present invention Part automatization test system includes:It is human-computer interaction module 110, overall control module 120, crossing event drive module 130, normal Event cross reference storehouse 140, abnormal operation event base 150, automatic test cases collection 160, test execution driving 170, test As a result report and analysis module 180 and crossing event storehouse 190.
Wherein, overall control module 120 includes:Normal event cross reference generation module 111, the generation of abnormal operation event Module 112, automatic test cases combination producing module 113, testing execution module 114, test result module 115 and knowledge base Improve module 116;Crossing event drive module 130 includes the abstract driving 131 of normal event cross reference, abnormal operation event is taken out As driving 132 and automatic test cases combination producing module drive 133.
Human-computer interaction module 110, for receiving subscriber control information, and overall control module 120 is passed to, by man-machine Interactive module 110 interacts with overall control module 120, and overall control module 120 is according to subscriber control information to be tested Equipment (equipment includes test event to be tested) is configured and tested, while also stores test data information, storage Test data modification information etc..Wherein, subscriber control information includes operative configuration and operational order, can by taking telecommunication apparatus as an example With the management address comprising equipment, order, to concrete configuration of equipment etc..
Overall control module 120, for the communication being responsible between own module and coordinate other modules complete tested Journey, wherein:
Normal event cross reference generation module 111, for generating normal event cross reference storehouse;
Abnormal operation event generation module 112, for generating abnormal operation event base;
Automatic test cases combination producing module 113, for according to the normal cross reference storehouse of generation and abnormal operation Event base, automation set of uses case is generated according to algorithm combination;
Testing execution module 114, execution, test record generation, detailed problems record for test etc., wherein test Performing can specifically include obtaining the item to be tested that test event needs to test, and be searched according to the syntagmatic of item to be tested automatic Change test use cases, obtain the automatic test cases matched with each item to be tested;According to what is matched with each item to be tested Automatic test cases, it is determined that automatic test cases corresponding with test event, perform automation corresponding with test event Test case is tested test event with realizing;
Further, testing execution module 114 is used to obtain the item to be tested that test event needs to test, according to be tested The syntagmatic of item searches automatic test cases collection, acquisition and the automatic test cases that each item to be tested matches, specifically For:
Test event is established, test event includes at least one Cross module;
Determine that test event needs the item to be tested tested;
Judge that the syntagmatic of item to be tested belongs to specified crossing event relation or random crossing event relation;
If the syntagmatic of item to be tested belongs to specified crossing event relation, the automation for specifying crossing event is searched Test use cases, obtain the automatic test cases of the specified crossing event matched with each item to be tested;
If the syntagmatic of item to be tested belongs to random crossing event relation, the automation of random crossing event is searched Test use cases, if found, the automatic test cases of the random crossing event matched with each item to be tested are obtained, If do not found, the automatic test cases matched with each item to be tested are generated.
Further, testing execution module 114 is used for the automatic test cases that basis matches with each item to be tested, really Fixed automatic test cases corresponding with test event, it is specially:
If multiple have association sequentially between the automatic test cases of item to be tested matching, suitable according to associating Sequence, it is determined that automatic test cases corresponding with test event;
If multiple do not have association order between the automatic test cases of item to be tested matching, to multiple with treating The weighted value of the automatic test cases of test item matching is arranged, according to putting in order, it is determined that corresponding with test event Automatic test cases.
Test result module 115, for storing testing progress and test result;
Knowledge base improves module 116, can after being performed a plurality of times for the crossing event for not occurring expected results to be analyzed It is distributed with forming the error probability based on crossing event, so as to when edition upgrading is tested, reach in the case where risk is smaller Higher coverage;
Crossing event drive module 130 is used for and overall control module 120 interacts, and carries out model and the management realized is adjusted Degree, wherein:
The abstract driving 131 of normal event cross reference, for driving normal event cross reference generation module;
The abstract driving 132 of abnormal operation event, for driving abnormal operation event generation module;
Automatic test cases combination producing module drive 133, for driving automatic test cases combination producing module.
Normal event cross reference storehouse 140, for correlation of the store interleaving module in time, space and function, Such as trigger condition and dependence etc..
Specifically, normal event cross reference storehouse 140 is first passed through by normal event cross reference generation module 121 according to test Test foundation, such as because operating habit, testing requirement, module such as realize in time, space at the Cross module that reason formed in itself Logical relation functionally.Normal event cross reference storehouse includes essential option event and option event, and essential option event is such as Webmaster distribution installation process is carried out to server and client side to be included selected server, starts selected server, selected clothes It is engaged in selecting client in the case of device starts, opens the events such as selected client;Then according to follow-up test result to normal event Cross reference is supplemented, and option event such as carries out to wrap in webmaster distribution installation process to server and client side The events such as nms process running situation are checked in the case of including startup of server.
Abnormal operation event base 150, the abnormal operation event of Cross module normal operation is influenceed for storing.
Specifically, abnormal operation event base 150 is by the first appearance in test experience of abnormal operation event generation module 122 The anomalous event easily to go wrong is established.Abnormal operation event base includes essential option event and option event, essential option event Such as server and client side is carried out not start selected server, selected server startup feelings in webmaster distribution installation process Client can not be selected under condition, server exception is closed and the client event such as closing extremely;Then according to follow-up test result Anomalous event is supplemented, option event is such as carried out to server and client side can be with webmaster distribution installation process The events such as nms process running situation can not be checked in the case of including startup of server;
Automatic test cases collection 160, including specify the automatic test cases of crossing event and random crossing event Automatic test cases, wherein, the essential option event and abnormal operation event base bag included according to normal event cross reference storehouse The essential option event included, generate the automatic test cases for specifying crossing event;Included according to normal event cross reference storehouse The option event that option event and abnormal operation event base include, using topological sorting algorithm, generate random crossing event Automatic test cases;
Test execution driving 170, for driving testing execution module 114;
Test result is reported and analysis module 180, for collecting test result generation report in test result module 115, The form of report is optional.It the problem of in result, can carry out that problem collects, chart is shown, prompt the position of generation problem And reason, to facilitate orientation problem;
Crossing event storehouse 190, including normal event cross reference storehouse 140 and abnormal operation event base 150, it is possible to understand that It is that normal event cross reference storehouse 140 and abnormal operation event base 150 can be both co-located in crossing event storehouse 190, or Person, independently it is configured.
Based on the crossing event automatization test system shown in Fig. 1, Fig. 2 be crossing event provided in an embodiment of the present invention from The schematic flow sheet of dynamicization method of testing.As shown in Fig. 2 comprise the following steps:
Step 21, normal event cross reference storehouse and abnormal operation event base are determined.
In this step, normal event cross reference generation module is generated according to test experience and existed for store interleaving module The normal event cross reference storehouse of time, space and correlation event functionally;Abnormal operation event generation module according to Test experience generates the abnormal operation event base for storing the abnormal operation event for influenceing Cross module normal operation.Positive ordinary affair The event in part cross reference storehouse all includes essential option event and option event, normal event cross reference storehouse and abnormal operation thing It can share and call for performing the module tested in part storehouse.
Step 22, according to normal event cross reference storehouse and abnormal operation event base, automatic test cases collection is generated.
In this step, crossing event is specified to derive from essential option event and exception that normal event cross reference storehouse includes The essential option event that Action Events storehouse includes;Random crossing event derives from the option thing that normal event cross reference storehouse includes The option event that part and abnormal operation event base include.Specified crossing event and random crossing event are imported into automatic test In the model library of system, model library generate respectively specified crossing event automatic test cases and random crossing event it is automatic Change test case, specify described in the automatic test cases of crossing event and the automatic test cases composition of random crossing event Automatic test cases collection.In addition, the configuration that can be identified according to the configuration of automatic test cases collection and equipment, generation equipment File, as the input of subsequent automated test, how to generate configuration file and belong to the known of those skilled in the art, herein not Repeat.
The present invention be preferable to carry out it is inner in, topological sorting algorithm belongs to depth-priority-searching method, refers in event relation use-case To there is the loop-free relation event of order to be ranked up, form generic sequence and indicate event.
For example, with reference to shown in figure 3, telecommunication apparatus needs webmaster management, and webmaster management system is divided into two large divisions:Webmaster takes Business device and NM client, here by taking the startup of webmaster distribution installation system as an example, have correctly been installed in network management system, and Start after system computerized normal startup, A is startup of server, and B is server closing, in the case that C is startup of server Client 1 is opened, D be client 1 close, E be startup of server in the case of client 2 open, F be client 2 close, G For selected server, H is selected client 1, and I is selected client 2, and J is to check net in the case where NM server starts Pipe process running situation, K are selected to cancel.For example, A can be selected to reach B path by C, path ACHDGB, illustrate The flow that one server and client side starts and closed:Startup of server->In the case of startup of server client 1 open-> Selected client 1->Client 1 closes->Selected server->Server closing;It is further possible to select other roads Footpath travels through successively, for example, another path can be:ACHK, represent a kind of abnormal operating process:Startup of server->Clothes Business device start in the case of client 1 open->Selected client 1->Cancel selected.
Step 23, the item to be tested that test event needs to test is obtained, is searched according to the syntagmatic of item to be tested automatic Change test use cases, the automatic test cases matched with each item to be tested are obtained, according to what is matched with each item to be tested Automatic test cases, it is determined that automatic test cases corresponding with test event, perform automation corresponding with test event Test case is tested test event with realizing.
Step 24, test report is generated according to test result, and test report is analyzed, according to test report Analysis renewal normal event cross reference storehouse and abnormal operation event base.
In this step, after the completion of test, test result report and analysis module automatically generate test according to test result Report, wherein testing whether to complete that the output state that test is completed whether can be completed according to verification output state to judge.
Test report includes the test case number and percent of pass, the concrete configuration and event of each test case of combination, The information such as the implementation status of each test case and the details of specific check post of each test case.
Test report is generated according to test result, periodically test report can be analyzed, certain can also be selected A little test report are analyzed, and are counted for example, every 20 test report are counted or selected 5 test results, can When using automatic test cases being calculated in a manner of array concentrating the implementation rate of crossing event, mortality, averagely perform Between etc., it is ranked up respectively using bubbling method, forms the crossing event relation with different weighted values, normal event is intersected and closed It is that storehouse and abnormal operation event base are updated.
If it can be added furthermore, it is possible to contrast the use-case of mortality from high to low successively and do not include and record failure Probability.When carrying out the test of edition upgrading or being tested before issuing, it can select to carry out coverage test by weighted value, greatly improve While Test coverage is spent, time cost is also effectively saved.
The schematic flow sheet of Fig. 4 automatic tests provided in an embodiment of the present invention, the flow of the automatic test is to upper State illustrating for step 23.As shown in figure 4, comprise the following steps:
Step 231, test event is established.
Specifically, crossing event automatization test system is run on a client device, and is connect by human-computer interaction module The control information of user is received, when user needs test, a newly-built test event, the test event comprises at least a crossed module Block.
Step 232, determine that test event needs the item to be tested tested.
Specifically, test event includes at least one item to be tested, and thing is selected in crossing event storehouse according to testing requirement The item to be tested that part needs to test as test event.Event in crossing event storehouse includes essential option event and option thing Part, in actual applications, it can set and be defaulted as selecting essential option event.
Generate the configuration file of item to be tested respectively according to device configuration and the event selected in crossing event storehouse.In reality In the application of border, if not selecting crossing event storehouse option event, setting acquiescence is used using the automatic test generated The configuration file of example collection, to save the time.
In addition, the configuration file for generating item to be tested can also set the outgoing position of test record and test report with And file display format.
Step 233, judge that the syntagmatic of item to be tested belongs to specified crossing event relation or random crossing event pass System, if the syntagmatic of item to be tested belongs to specified crossing event relation, into step 234, if the combination of item to be tested Relation belongs to random crossing event relation, into step 235.
Step 234, the automatic test cases collection for specifying crossing event is searched, obtains the finger matched with each item to be tested The automatic test cases of crossing event are determined, subsequently into step 238.
Crossing event relation is specified to derive from essential option event and abnormal operation thing that normal event cross reference storehouse includes The essential option event that part storehouse includes, therefore the automatic test cases collection of crossing event can specified to find.Specifically, it is raw Into the configuration file of read test item, the automatic test cases collection for specifying crossing event is searched, is obtained and each item to be tested The automatic test cases of the specified crossing event of matching.
Step 235, the automatic test cases collection of random crossing event is searched, judges the automation in random crossing event Test case concentrates the automatic test cases whether found with item to be tested matching, if found, into step 236, If do not found, into step 237;
Random crossing event relation derives from the option event and abnormal operation event base in normal event cross reference storehouse Option event, if follow-up have the new option event of supplement or abnormal operation event, it is possible to can not intersect at random The automatic test cases of event are concentrated and found.
Step 236, the automatic test cases of the random crossing event matched with each item to be tested are obtained;
Step 237, the automatic test cases that generation matches with each item to be tested.
Specifically, random crossing event is generated according to topological sorting algorithm, and generates the test case of random crossing event Automatic test cases as item to be tested.
Step 238, according to the automatic test cases matched with each item to be tested, it is determined that it is corresponding with test event from Dynamicization test case.
Specifically, test event includes at least one item to be tested, by the automatic test cases of item to be tested according to setting Fixed sequential combination, the automatic test cases of test event are determined, if for example, multiple automations matched with item to be tested Directly there is association order in test case, then can be according to association order, it is determined that automatic test corresponding with test event is used Example;, can be to multiple with surveying if multiple do not have association order between the automatic test cases of item to be tested matching The weighted value of automatic test cases of examination item matching is arranged, according to putting in order, it is determined that it is corresponding with test event from Dynamicization test case.
Step 239, the automatic test cases for performing test event are tested test event with realizing.
Specifically, testing execution module is called to perform the automatic test cases of test event, and preferably, test process In, running situation can be checked at any time in test result module and by the end of current test process.
The crossing event automatization test system and crossing event automated testing method of the present invention is corresponding, therefore, intersects Concrete implementation details in event automatization test system and crossing event automated testing method can be referred to mutually, herein not Repeat.
In the present invention, by pre-establishing normal event cross reference storehouse and abnormal operation event base, and according to positive ordinary affair Part cross reference storehouse and abnormal operation event base generation automatic test cases, solve crossing event and combine incomplete, anomalous field What scape simulation was not enough brought there may be the risk to conceal defects;Need the item to be tested tested can be from automatic in test event Change and determined in test case, it is achieved thereby that batch-automated test;In addition, test result is analyzed and tied according to test Fruit renewal crossing event storehouse, not only increases Test coverage degree, also effectively saves the testing time.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.

Claims (12)

1. a kind of crossing event automated testing method, it is characterised in that methods described includes:
Normal event cross reference storehouse and abnormal operation event base are determined, the normal event cross reference storehouse is used for store interleaving Correlation of the module in time, space and function, the abnormal operation event base, which is used to store, influences the Cross module The abnormal operation event of normal operation;
According to the normal event cross reference storehouse and the abnormal operation event base, automatic test cases collection is generated;
The item to be tested that test event needs to test is obtained, the automation is searched according to the syntagmatic of the item to be tested and surveyed Set of uses case is tried, obtains the automatic test cases matched with each item to be tested;
According to the automatic test cases matched with each item to be tested, it is determined that automation corresponding with the test event Test case, perform automatic test cases corresponding with the test event and the test event is tested with realizing.
2. according to the method for claim 1, it is characterised in that the normal event cross reference storehouse includes essential option event With option event, the abnormal operation event base includes essential option event and option event;
It is described that automatic test cases collection is generated according to the normal event cross reference storehouse and the abnormal operation event base, Specifically include:
The essential option event and the abnormal operation event base included according to the normal event cross reference storehouse includes essential Item event, generates the automatic test cases for specifying crossing event;
The option event and the abnormal operation event base included according to the normal event cross reference storehouse includes optional Event, using topological sorting algorithm, generate the automatic test cases of random crossing event;
The automatic test cases of the automatic test cases of the specified crossing event and the random crossing event form institute State automatic test cases collection.
3. according to the method for claim 2, it is characterised in that the item to be tested for obtaining test event and needing to test, The automatic test cases collection is searched according to the syntagmatic of the item to be tested, obtains and is matched with each item to be tested Automatic test cases, specifically include:
Test event is established, the test event includes at least one Cross module;
Determine that the test event needs the item to be tested tested;
Judge that the syntagmatic of the item to be tested belongs to specified crossing event relation or random crossing event relation;
If the syntagmatic of the item to be tested belongs to the specified crossing event relation, the specified crossing event is searched Automatic test cases collection, obtain the automatic test use of the specified crossing event matched with each item to be tested Example;
If the syntagmatic of the item to be tested belongs to the random crossing event relation, the random crossing event is searched Automatic test cases collection, if found, obtain and each random crossing event for matching of the item to be tested Automatic test cases, if do not found, generation and each automatic test cases for matching of the item to be tested.
4. according to the method for claim 1, it is characterised in that the basis matches automatic with each item to be tested Change test case, it is determined that automatic test cases corresponding with the test event, are specifically included:
If multiple have association order between the automatic test cases of the item matching to be tested, according to the association Sequentially, it is determined that automatic test cases corresponding with the test event;
If multiple do not have association order between the automatic test cases of the item matching to be tested, to multiple and institute The default weighted value for stating the automatic test cases of item matching to be tested is arranged, and is put in order according to described, it is determined that with Automatic test cases corresponding to the test event.
5. according to method according to any one of claims 1 to 4, it is characterised in that the execution and the test event pair After the automatic test cases answered are to realize the test event is tested, in addition to:
Test report is generated according to test result, and the test report is analyzed;
The normal event cross reference storehouse and the abnormal operation event base are updated according to the analysis to the test report.
A kind of 6. crossing event automatization test system, it is characterised in that including:Overall control module, normal event, which intersect, to close It is storehouse, abnormal operation event base and automatic test cases collection;
The overall control module includes:Normal event cross reference generation module, abnormal operation event generation module, automation Test case combination producing module and testing execution module;
The normal event cross reference generation module, for determining the normal event cross reference storehouse, the normal event Cross reference storehouse, for correlation of the store interleaving module in time, space and function;
The abnormal operation event generation module, for determining the abnormal operation event base, the abnormal operation event base is used The abnormal operation event of the Cross module normal operation is influenceed in storage;
The automatic test cases combination producing module, for according to the normal event cross reference storehouse and abnormal operation thing Part storehouse generates the automatic test cases collection, and the automatic test cases collection is used to store automatic test cases;
The testing execution module, the item to be tested tested for obtaining test event to need, according to the group of the item to be tested Conjunction relation searches the automatic test cases collection, obtains the automatic test cases matched with each item to be tested;Root According to the automatic test cases matched with each item to be tested, it is determined that automatic test corresponding with the test event is used Example, perform automatic test cases corresponding with the test event and the test event is tested with realizing.
7. system according to claim 6, it is characterised in that the normal event cross reference storehouse includes essential option event With option event, the abnormal operation event base includes essential option event and option event;
The automatic test cases combination producing module, for according to the normal event cross reference storehouse and abnormal operation thing Part storehouse generates the automatic test cases collection, is specially:
The essential option event and the abnormal operation event base included according to the normal event cross reference storehouse includes essential Item event, generates the automatic test cases for specifying crossing event;
The option event and the abnormal operation event base included according to the normal event cross reference storehouse includes optional Event, using topological sorting algorithm, generate the automatic test cases of random crossing event;
The automatic test cases of the automatic test cases of the specified crossing event and the random crossing event form institute State automatic test cases collection.
8. system according to claim 7, it is characterised in that the testing execution module is used to obtain test event needs The item to be tested of test, the automatic test cases collection is searched according to the syntagmatic of the item to be tested, obtained and each The automatic test cases of the item matching to be tested, it is specially:
Test event is established, the test event includes at least one Cross module;
Determine that the test event needs the item to be tested tested;
Judge that the syntagmatic of the item to be tested belongs to specified crossing event relation or random crossing event relation;
If the syntagmatic of the item to be tested belongs to the specified crossing event relation, the specified crossing event is searched Automatic test cases collection, obtain the automatic test use of the specified crossing event matched with each item to be tested Example;
If the syntagmatic of the item to be tested belongs to the random crossing event relation, the random crossing event is searched Automatic test cases collection, if found, obtain and each random crossing event for matching of the item to be tested Automatic test cases, if do not found, generation and each automatic test cases for matching of the item to be tested.
9. system according to claim 6, it is characterised in that the testing execution module is used to described treat according to each The automatic test cases of test item matching, it is determined that automatic test cases corresponding with the test event, are specially:
If multiple have association order between the automatic test cases of the item matching to be tested, according to the association Sequentially, it is determined that automatic test cases corresponding with the test event;
If multiple do not have association order between the automatic test cases of the item matching to be tested, to multiple and institute The default weighted value for stating the automatic test cases of item matching to be tested is arranged, and is put in order according to described, it is determined that with Automatic test cases corresponding to the test event.
10. the system according to any one of claim 6~9, it is characterised in that the system also includes:Test result Module, test result report and analysis module and knowledge base improve module;
The test result module, for storing test result;
The test result report and analysis module, for generating test report according to the test result, and to the test Report is analyzed;
The knowledge base improves module, for updating the normal event cross reference storehouse according to the analysis to the test report With the abnormal operation event base;
The test result module and the knowledge base improve module in the overall control module.
11. the system according to any one of claim 6~9, it is characterised in that the system also includes:Man-machine interaction Module, the subscriber control information is sent for receiving subscriber control information, and to the overall control module;Wherein, it is described Subscriber control information includes operative configuration and operational order.
12. the system according to any one of claim 6~9, it is characterised in that the system also includes:Crossing event Drive module, the crossing event drive module include being used for the positive ordinary affair for driving the normal event cross reference generation module The abstract driving of part cross reference, the abstract driving of abnormal operation event for driving the abnormal operation event generation module and For driving the automatic test cases combination producing module drive of the automatic test cases combination producing module;
The system also includes:For driving the testing execution module test execution to drive.
CN201510213286.6A 2015-04-29 2015-04-29 A kind of crossing event automated testing method and device Active CN104794057B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510213286.6A CN104794057B (en) 2015-04-29 2015-04-29 A kind of crossing event automated testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510213286.6A CN104794057B (en) 2015-04-29 2015-04-29 A kind of crossing event automated testing method and device

Publications (2)

Publication Number Publication Date
CN104794057A CN104794057A (en) 2015-07-22
CN104794057B true CN104794057B (en) 2017-12-12

Family

ID=53558866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510213286.6A Active CN104794057B (en) 2015-04-29 2015-04-29 A kind of crossing event automated testing method and device

Country Status (1)

Country Link
CN (1) CN104794057B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776261B (en) * 2015-11-23 2021-03-12 腾讯科技(深圳)有限公司 Object testing method and device
CN106326116B (en) * 2016-08-17 2019-03-05 北京奇虎科技有限公司 The method and apparatus of product test
CN106610899B (en) * 2016-12-30 2020-01-14 中国科学院长春光学精密机械与物理研究所 Test case generation method and device
CN108255653B (en) * 2018-01-02 2021-05-04 深圳壹账通智能科技有限公司 Product testing method and terminal thereof
CN109597762A (en) * 2018-11-28 2019-04-09 平安科技(深圳)有限公司 System transposition method of testing, system, electronic device and computer readable storage medium
CN109857671A (en) * 2019-02-15 2019-06-07 广州视源电子科技股份有限公司 Test case generation method and device, server and storage medium
CN110659215A (en) * 2019-09-30 2020-01-07 贵州航天云网科技有限公司 Open type industrial APP rapid development and test verification method
CN110851369A (en) * 2019-11-19 2020-02-28 泰康保险集团股份有限公司 Policy data processing method and device
CN111130938B (en) * 2019-12-25 2021-05-25 北京奇艺世纪科技有限公司 Index acquisition method and device, electronic equipment and computer readable storage medium
CN112506757A (en) * 2020-11-17 2021-03-16 中广核工程有限公司 Automatic test method, system, computer device and medium thereof
CN114443392B (en) * 2022-01-07 2024-06-18 苏州浪潮智能科技有限公司 Method, device and storage medium for automatically adjusting test item sequence

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212362A (en) * 2006-12-26 2008-07-02 中兴通讯股份有限公司 Automatic testing device and method incorporating a variety of testing tools
CN101251798A (en) * 2008-04-01 2008-08-27 中兴通讯股份有限公司 Test case generating method based on relationship

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8938647B2 (en) * 2012-06-29 2015-01-20 Sap Se System and method for capturing and using web page views in a test environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212362A (en) * 2006-12-26 2008-07-02 中兴通讯股份有限公司 Automatic testing device and method incorporating a variety of testing tools
CN101251798A (en) * 2008-04-01 2008-08-27 中兴通讯股份有限公司 Test case generating method based on relationship

Also Published As

Publication number Publication date
CN104794057A (en) 2015-07-22

Similar Documents

Publication Publication Date Title
CN104794057B (en) A kind of crossing event automated testing method and device
CN104598380B (en) A kind of automated testing method and system based on control
CN109857668A (en) UI automated function test method, test device, test equipment and storage medium
CN109947646A (en) Interface test method, device, computer equipment and storage medium
CN109857667A (en) Automatic interface testing method, test device, test equipment and storage medium
CN103941207B (en) Automatic power-measuring endpoint detection methods and system thereof
CN106406266B (en) A method of the equipment that simulation is controlled by nuclear power station DCS system
CN109558317A (en) The processing method and processing device of test case
CN105279196B (en) The generation method and device of test script
CN107911251B (en) Network equipment configuration method, device and medium
CN102110053A (en) Random testing method based on Android
CN108959067A (en) Test method, device and the computer readable storage medium of search engine
CN106815147B (en) A kind of test script generation method and device
CN112433944A (en) Service testing method, device, computer equipment and storage medium
CN109902251A (en) Scheme Choice method, apparatus, terminal and readable storage medium storing program for executing based on decision tree
CN109426611A (en) A kind of method for testing software and device
CN105760300B (en) A kind of automated testing method and test macro of STK/UTK business
CN109491922A (en) One kind being based on model-driven test method and apparatus
CN110489317A (en) Cloud system task run method for diagnosing faults and system based on workflow
CN104216823B (en) A kind of automated testing method and master control set
CN110287088A (en) A kind of automated testing method based on dynamic UI model
CN107703773A (en) A kind of method for testing software and device based on hardware-in-loop simulation system
CN108399122A (en) Test script operation method and system
CN109871321A (en) A kind of method and test case management platform of test case Code automatic build
CN106909615A (en) Data message consistency verification method and device between a kind of main website and substation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant