CN103313289B - WAP system automation test macro and method - Google Patents

WAP system automation test macro and method Download PDF

Info

Publication number
CN103313289B
CN103313289B CN201210061562.8A CN201210061562A CN103313289B CN 103313289 B CN103313289 B CN 103313289B CN 201210061562 A CN201210061562 A CN 201210061562A CN 103313289 B CN103313289 B CN 103313289B
Authority
CN
China
Prior art keywords
case
request
parameter
url
template
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
CN201210061562.8A
Other languages
Chinese (zh)
Other versions
CN103313289A (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.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210061562.8A priority Critical patent/CN103313289B/en
Publication of CN103313289A publication Critical patent/CN103313289A/en
Application granted granted Critical
Publication of CN103313289B publication Critical patent/CN103313289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a kind of WAP system automation test macro and method of testing, it can utilize corresponding case maintenance module and the daily record of case maintenance method automatic scanning system, thereby generate new use-case, and do not need craft to input use-case, and utilize use-case execution engine, use-case generation engine and picture to check engine and automatically detect test case, thereby the time that has reduced design test case and write test code, it is convenient to upgrade, and has reduced maintenance cost.

Description

WAP system automation test macro and method
Technical field
The present invention relates to a kind of WAP system detection method and system, particularly relate to a kind of for providingThe case maintenance module of the test case of WAP system and method and corresponding WAP system automationTest macro and method.
Background technology
Along with scientific and technological progress, the electronic equipment that computer, smart mobile phone etc. has an operation processing functionIn being widely used in the daily live and work of people, becoming must in people's daily life and workIndispensable article.
WAP (WirelessApplicationProtocol, home control network communication protocol) be digital mobile phone,Internet or other PDAs (PersonalDigitalAssistant, PDA), computer applicationAnd even the global open standard that carries out communication between following information household appliances, it is simplified wirelessInternet agreement. By this technology of WAP, can be by the bulk information of Internet and variousBusiness be incorporated among the wireless terminals such as mobile phone, it can be browsed by mobile phone browserWAP website, thus news browsing, stock inquiry, mail transmission/reception, game on line, chat etc. enjoyedEtc. various application services, can give full play to that access delay is short, speed is high, always online, switching sideJust etc. advantage.
At present, for the test of WAP system applies class, mainly contain two kinds of modes: one is manual sideFormula, removes to check each use-case point by hand by tester; Another is automatic test, passes throughAutomation tools, for example QTP, Selenium etc. remove to record script, are then gone to drive by automation toolsMake script playback carry out regression test. Very poor efficiency of the first manual mode, needs a large amount of manpowers to carry outA large amount of work that repeat, its fast Development that is unfavorable for system upgrades. For the second automatic testMode, has a very large shortcoming to be that automation tools depends on interface element too much, once interfaceChanges or changes in demand, have to revise use-case, and new case is also cumbersome,Need to again remove to record use-case, in the situation that being on the increase by number of cases, it need to consume more peopleWork maintenance cost. Therefore existing conventional automatization testing technique, script maintenance cost amount is large, unfavorableIn the iteratively faster test of system.
Summary of the invention
The object of the invention is to, overcome the existing defect of existing WAP system detection method, and carryFor a kind of new for case maintenance module and the case maintenance side of test case of WAP system is providedMethod, and corresponding WAP system automation test macro and method, with reduce design test case andWrite the time of test code, it is convenient to upgrade, and has reduced maintenance cost.
The object of the invention to solve the technical problems realizes by the following technical solutions.
The invention provides a kind of for the case maintenance module of test case of WAP system is provided, described inCase maintenance module is used for preserving use-case and automatically adds use-case, wherein, and described case maintenance module bagDraw together user's Request Log storehouse, use-case renewal engine, use-case storehouse and conditional parameter storehouse. Described user's requestDaily record storehouse has daily record hold function to each URL request, to preserve URL in system journalList and parameter list. Described use-case upgrade engine can automatic scan described in system journal analyzing,To obtain use-case template, conditional parameter and to ask with the corresponding CGI of described conditional parameter. DescribedUse-case storehouse is used for preserving described use-case template. And described conditional parameter storehouse is used for preserving described conditional parameterAnd ask with the corresponding described CGI of described conditional parameter.
Preferably, described use-case upgrades engine by automatic scan script and automatically termly to described systemSystem daily record scans and analyzes.
It is a kind of for the case maintenance method of test case of WAP system, institute are provided that the present invention also providesState case maintenance method for preserving use-case and automatically adding use-case, wherein, described case maintenance methodComprise: automatic scanning system daily record is also analyzed, with obtain use-case template, conditional parameter and withThe corresponding CGI request of described conditional parameter, wherein, preserves url list in described system journalAnd parameter list; Described use-case template is saved to use-case storehouse; And by described conditional parameter and instituteState CGI request and be saved to conditional parameter storehouse.
Preferably, described automatic scanning system daily record is also analyzed, with obtain described use-case template,The step of described conditional parameter and described CGI request further comprises: fixed by automatic scan scriptThe phase ground described system journal of scanning is also analyzed; Scan the url list in described system journal, pointAnalyse in described url list the parameter name in each CGI request in each URL request and correspondingParameter value, calculate and preserve each CGI ask corresponding parameter and described parameter correspondingThe different numbers of value, thus the parameter information that each CGI asks obtained; Ask according to each CGIParameter information, determines that it is that conditional parameter is also non-conditional parameter that each CGI asks corresponding parameter;Rescan described url list, the conditional parameter that removes the inside in each URL request is correspondingValue, and intactly retain non-conditional parameter, thus obtain a new URL template, and be saved toIn URL template list; Described in tabulate statistics, URL template is to obtain calling of each class URL templateNumber, and please it be saved in the list of URL template recalls information; And setting threshold also compares eachClass URL template call number and described threshold value, as described in the number of calling of URL template exceed instituteState threshold value, using described URL template as use-case template.
The present invention separately provides a kind of WAP system automation test macro, wherein, and described WAP systemAutomatization test system comprises case maintenance module, automatic management platform, use-case execution engine, useExample generates engine and picture checks engine. Wherein said case maintenance module is used for preserving use-case and automaticAdd use-case. Described automatic management platform is for adding test assignment thereon. Described use-case is carried outEngine obtains described test assignment, and obtains the use-case ID in described test assignment. Described use-case generatesEngine obtains described use-case ID, and finds out corresponding use-case template and bar from described case maintenance moduleThe configuration mode of part parameter, then generates a complete URL request, and returns to use-case and carry out and drawHold up, wherein said use-case is carried out after engine receives described URL request and is called testing tool simulationSend solicit operation, thereby obtain request results picture. Described picture checks engine similar according to what configureDegree algorithm carries out the comparison of similarity with the use-case result picture to described request result picture and standard,Thereby produce test result and described test result is fed back to described automatic management platform.
Preferably, described case maintenance module comprises that user's Request Log storehouse, use-case upgrade engine, useExample storehouse and conditional parameter storehouse. Wherein said user's Request Log storehouse has daily record to each URL request and protectsDeposit function, to preserve url list and parameter list in system journal. Described use-case upgrades engineSystem journal analyzing described in automatic scan, with obtain use-case template, conditional parameter and with instituteState the corresponding CGI request of conditional parameter. Described use-case storehouse is used for preserving described use-case module. And instituteState conditional parameter storehouse for preserve described conditional parameter and corresponding with described conditional parameter described inCGI request.
The present invention also provides a kind of WAP system automation method of testing, and it comprises: in automatic managementOn platform, add test assignment; Utilize use-case to carry out engine and obtain described test assignment, and described in obtainingUse-case ID in test assignment, and send it to use-case generation engine; Utilizing described use-case to generate drawsHold up according to described use-case ID, from case maintenance module, find out corresponding use-case template and conditional parameterConfiguration mode, thus a complete URL request generated, and return to described use-case execution engine;Described use-case is carried out engine and is received and call testing tool after described URL request and simulation sends request behaviourDo, thereby obtain request results picture; Utilize picture to check engine, according to the similarity algorithm of configurationCarry out the comparison of similarity with the use-case result picture to described request result picture and standard, thereby produceRaw test result also feeds back to described automatic management platform by described test result.
Preferably, described case maintenance module is for automatically preserving and adding use-case, and described use-case dimensionThe flow process of protecting the automatic preservation of module and interpolation use-case comprises: automatic scanning system daily record is also analyzed,To obtain use-case template, conditional parameter and to ask with the corresponding CGI of described conditional parameter, wherein,In described system journal, preserve with url list and parameter list; Described use-case template is saved to useExample storehouse; And described conditional parameter and described CGI request are saved to conditional parameter storehouse.
Preferably, described automatic scanning system daily record is also analyzed, with obtain described use-case template,The step of described conditional parameter and described CGI request comprises: sweep termly by automatic scan scriptRetouch described system journal and analyze; Scan the url list in described system journal, described in analysisParameter name and corresponding parameter value in each CGI request in each URL request in url list,Calculate and preserve each CGI and ask the difference of corresponding parameter and the corresponding value of described parameterNumber, thus the parameter information that each CGI asks obtained; According to the parameter information of each CGI request,Determine that it is that conditional parameter is also non-conditional parameter that each CGI asks corresponding parameter; Rescan instituteState url list, remove the corresponding value of conditional parameter of the inside in each URL request, and completeGround retains non-conditional parameter, thereby obtains a new URL template, and is saved to URL template rowIn table; Described in tabulate statistics, URL template to be to obtain the number of calling of each class URL template, and pleaseIt is saved in the list of URL template recalls information; And setting threshold also compares each class URL mouldPlate call number and described threshold value, as described in URL template call number exceed as described in threshold value, willDescribed URL template is as use-case template.
Preferably, described testing tool comprises Selenium instrument.
In sum, WAP system automation test macro of the present invention and method of testing thereof, changedThe method of existing new case and maintenance use case, it can be by sweeping in case maintenance module automaticallyGo timing scan system journal to generate new use-case thereby retouch script, and do not need manual input use-case,Its needed manual operation is only the value of configuration condition parameter, and therefore the present invention has reduced and writesThe time of test code. And the present invention, in the time of maintenance update use-case, does not need to check that the page changesThen revise test code and carry out corresponding text comparison, the present invention need only want one to replace picture operationCan complete, therefore the present invention reduces maintenance cost to a great extent. In addition, in the present invention,Because the newly-increased of use-case is to filter out by system journal and statistics in scanning user's Request Log storehouseCall that number generates compared with high URL request, the use-case that therefore ensures these generations is all the master of systemOperate use-case, reduced the time of design test case, use-case coverage is also effectively guaranteed.The present invention can also be quicker upgrade, thereby better the agility of back-up system is issued test.And the execution result of each use-case can be by picture presentation out, and therefore tester can be very directly perceivedRecognize implementation status.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, of the present invention in order to better understandTechnological means, and can being implemented according to the content of description, and for allow of the present invention above-mentioned andOther objects, feature and advantage can become apparent, below especially exemplified by preferred embodiment, and coordinate attachedFigure, is described in detail as follows.
Brief description of the drawings
The square signal of the WAP system automation test macro that Fig. 1 discloses for the embodiment of the present inventionFigure.
Fig. 2 is the workflow schematic diagram of the case maintenance module shown in Fig. 1.
The flow chart of the WAP system automation method of testing that Fig. 3 discloses for the embodiment of the present invention.
Detailed description of the invention
Technological means and effect of taking for reaching predetermined goal of the invention for further setting forth the present invention,Below in conjunction with accompanying drawing and preferred embodiment, to according to the present invention propose for safeguarding the survey of WAP systemRoutine case maintenance module on probation and case maintenance method and corresponding WAP system automation test areIts detailed description of the invention of the method for testing of unifying, method, step, structure, feature and effect thereof, in detailBe described as follows.
Relevant aforementioned and other technology contents of the present invention, Characteristic, coordinate with reference to graphic followingThe detailed description of preferred embodiment in can know and present. By the explanation of detailed description of the invention, when canThe present invention is able to more deeply and concrete for the technological means reaching predetermined object and take and effectUnderstand, however appended graphic be only to provide with reference to the use of explanation, be not used for the present invention to be limited.
The square signal of the WAP system automation test macro that Fig. 1 discloses for the embodiment of the present inventionFigure. As shown in Figure 1, WAP system automation test macro 100 of the present invention comprises case maintenance mouldPiece 110, use-case generation module 120, use-case Executive Module 130, picture checking module 140 and fromMovingization management platform 150.
In the present invention, the concept of use-case mainly refers in WAP system and sends cgi script and actual tuneWith a complete URL request, wherein, URL is UniformResourceLocator, its quiltBeing called URL, being also referred to as web page address, is the address of the resource of standard on internet.The general type of URL request is<access mode of URL>: //<main frame>:<port>/<path>. CGIBe CommonGatewayInterface, it is one section of program physically, operate on server,The interface of same client html page is provided, and wherein most cgi scripts is used to explanation placeManage the input message from list, and produce corresponding processing at server, or by anti-corresponding informationThe browser of feeding.
Wherein, case maintenance module 110 is for autostore and automatically add use-case. Fig. 2 is Fig. 1The workflow schematic diagram of shown case maintenance module 110. See also Fig. 1-2, of the present inventionCase maintenance module 110 comprises that user's Request Log storehouse 111, use-case upgrade engine 112, use-case storehouse 113And conditional parameter storehouse 114. Wherein, user's Request Log storehouse 111 has day to each URL requestWill hold function, to preserve url list and parameter list in system journal. Use-case upgrades engine112 can automatic scanning system daily record and analyze, with obtain use-case template, conditional parameter and withThe corresponding CGI request of described conditional parameter, is then saved to use-case storehouse 113 by use-case template, willConditional parameter and being kept in conditional parameter storehouse 114 with CGI request. Particularly, case maintenance mouldThe workflow of piece 110 is as described below:
Step S11: automatic scanning system daily record is also analyzed, and wherein system journal is for each URLRequest has daily record hold function, thereby preserves in the system journal in user's Request Log storehouse 111There are url list and parameter list. Wherein, use-case renewal engine 112 can pass through automatic scan scriptSampling from the system journal termly a part of daily record of taking-up is analyzed.
Step S12: the url list in scanning system daily record, then analyze in url list eachParameter name and the corresponding parameter value in URL request, in each CGI request, be with, calculate and preserveThe different numbers of value corresponding to the parameter that this CGI is corresponding and described parameter, thus each CGI obtainedThe parameter information of request. Scanned after one time, the parameter information that can obtain each CGI comprises it and containsHave which parameter, and parameter value kind corresponding to these parameters there are how many.
Step S13: according to the parameter information of each CGI request, determine each CGI request correspondenceParameter be that conditional parameter is also non-conditional parameter. Wherein, the feature of conditional parameter is that its institute is correspondingSpan more multiple because it is relevant with user's account number. And those non-conditional parameters justHave nothing to do with user, be just used for telling CGI what functional branch request will carry out.
Step S14: rescan again the url list in system journal, for each URL request,Corresponding the conditional parameter of the inside value is removed, but not conditional parameter is complete reservation, therebyObtain a new URL template, be saved in a new list i.e. URL template list.
Step S15: tabulate statistics URL template to be to obtain the number of calling of each class URL template, andPlease it be saved in the list of URL template recalls information. Due in URL template list the inside, preserveEach URL request removed with user-dependent parameter and out abstract, therefore at thisOn basis, then rescan one time, these URL templates are carried out to tabulate statistics, can obtain eachClass URL template call number, and be saved in the list of URL template recalls information.
Step S16: setting threshold relatively each class URL template call number and described threshold value,As URL template call number exceed as described in threshold value, using URL template as use-case template and preserveTo use-case storehouse, and URL template is analyzed in above-mentioned steps S13 to conditional parameter out and itCorresponding CGI request is saved in conditional parameter storehouse. Due in use, be only concerned about that those are mainWhether user's request call, therefore can setting threshold being used for weighing is whether URL template is main useThe call request at family, it can set according to actual conditions in different systems. Then willCall number and exceed the URL template of setting threshold values as use-case template, it is corresponding to main call request,Also be the object being concerned, and be saved in use-case storehouse 113, and by use-case template in above-mentioned stepIn rapid S13, analyze out conditional parameter with and corresponding CGI request be saved to conditional parameter storehouse 114In.
In the present invention, run through above-mentioned flow process at every turn, just can improve in case maintenance module 110Use-case storehouse 113 and conditional parameter storehouse 114, thus call for follow-up automation.
Give an example, annotate processing procedure above:
For example: in QQ mailbox, check certain contact person, its complete URL request is as follows:
addr_detail?sid=insj9Nas3H1VQEMO&AddrID=1207&grpid=1000&category=common&isqqgroup=0&t=addr_detail
After statistical analysis is processed, learn that sid, AddrID, these three values corresponding to parameter of grpid haveA lot of, and the number that different value appears in category, isqqgroup, these three parameters of t is little, because ofThis sid, AddrID, grpid belong to conditional parameter, are saved in conditional parameter storehouse 114. SoAfter this URL of abstract request again, just can obtain a use-case template:
addr_detail?sid=&AddrID=&grpid=&category=common&isqqgroup=0&t=addr_detail
This use-case has just represented the function of checking contact person in certain mailbox in fact, is accessed in useIn example storehouse 113, the wherein corresponding unique use-case ID of each use-case template.
It should be noted that the use-case template that take out 113 the insides, use-case storehouse is incomplete, becauseIt has been removed value corresponding to some conditional parameters, is directly to have called, and expect oneExecutable use-case, need to fill complete value to it, then just can directly call.
Therefore, case maintenance module 110 of the present invention can automatically be stored and more according to above-mentioned flow processUse-case template in new use-case storehouse 113 and the conditional parameter in conditional parameter storehouse 114, thereby automaticallyGround is stored and upgrades use-case, and does not need manual interpolation.
Use-case generates the use-case ID of engine 120 for inputting according to outside, and from case maintenance moduleIn 110, find out corresponding use-case template and the processing mode of conditional parameter, thus generate one completeURL request, and send it to use-case execution engine 130.
Particularly, in the time that outside input transmits a use-case ID to use-case generation engine 120, use-case is rawIts corresponding use-case template is found out in the use-case storehouse 113 that becomes engine 120 to inquire about in case maintenance module 110,And which the conditional parameter of the inside correspondence is. Give an example, use-case template:
addr_detail?sid=&AddrID=&grpid=&category=common&isqqgroup=0&t=addr_detail
Conditional parameter corresponding to its inside is respectively sid, AddrID, grpid.
Then enter into the processing procedure of conditional parameter, from the above, use-case template need to be by itAfter value corresponding to part parameter filled, just can become a real available URL request. Therefore hereDifficult point is exactly to go value corresponding to automatic generated conditional parameter, and will ensure that this value is correct,Significant. For which the convenient value of understanding conditional parameter value has, can be by each use-case templateCorresponding user's full request sample is preserved tens, then just can directly come with reference to these samplesUnderstand this corresponding use-case template request, which value the conditional parameter of the inside has, thereby canMore easily to confirm the character of this conditional parameter. Wherein, according to the character of conditional parameter, the present inventionFollowing two kinds of processing modes are provided:
The first: hardcode (hard coded) type, its value that refers to that this conditional parameter is corresponding can directly be write extremely,It can not affect the execution of corresponding function operation. This processing mode is similar to the method for testing of equivalence class.For example check mail tabulation, when needing page turning, the conditional parameter page of the inside, its value canBe 2,3, or 100, the value of this conditional parameter page gets how much request does not affect for CGI,Its execution is unified processing, and it is extremely 2 just passable therefore page directly need only being write, and it is rightWhat answer is the page-turning function of mail tabulation.
The second: script creation type, its value that refers to that this conditional parameter is corresponding need to be come by compile scriptCreate conditions and obtain. For example remove to read an envelope mail, corresponding CGI request needs a mailidParameter, now need invoke script to remove to create an envelope mail, and obtain the mailid of this envelope mail,This is exactly the value of needed conditional parameter, and it is a simple assignment that this kind of processing mode has more than,Also need to go just can obtain after establishment condition by backstage.
Under normal circumstances, can, directly by parameter name and the parameter value of sample the inside, just canDetermine this conditional parameter and belong to any type, then carry out corresponding processing just passable.As long as through practice, the value of most of conditional parameter is to belong to hardcode type, therefore the dead bar of simple writeThe value of part parameter is just passable. Based on two kinds of situations of above-mentioned processing, therefore in conditional parameter storehouse 114,For each conditional parameter, need to there be two attributes, an attribute is used for identifying this conditional parameter and isWhich script hardcode, still need go to create. Another one attribute is to carry out for identifying this use-caseAfter complete, the impact that this conditional parameter causes needs to clear up environment.
For instance, for mail mailid, it need to create an envelope mail, in order to ensure to test account numberThe uniformity of initial environment, needs invoke script to go to remove. Use-case generates engine 120 and passes through barThe parameter configuration of part parameter library 114 the insides, processes accordingly, and conditional parameter is carried out to assignment,Thereby form a complete URL request.
Then, use-case generate engine 120 by the complete URL request generating (now its be exactly one trueThe request that just can call) return to use-case carry out engine 130.
It is for realizing task scheduling and automatically performing the module of test that use-case is carried out engine 130, itsWorkflow is as described below.
Use-case is carried out engine 130 and is received the outside test assignment of inputting, for each test assignment,Use-case is carried out engine 130 and is taken out respectively the use-case ID that this test assignment the inside will be moved.
Then, use-case is carried out engine 130 and is sent to use-case to generate engine 120 use-case ID, and use-case is rawBecome engine 120 to remove to process this use-case ID according to above-mentioned flow process, then it is corresponding complete to return to this use-case IDWhole URL request, has filled the URL request obtaining after conditional parameter value.
Use-case is carried out engine 130 and is received after the complete URL request that use-case ID is corresponding, by URLTesting tool is passed in request, and for example selenium instrument goes simulation to send use thereby control testing toolFamily request.
After user asks successfully to have called, use-case execution engine 130 calls testing tool again and carries out sectional drawingOperation, thus request results picture obtained. Then use-case execution engine 130 is protected request results pictureLeave. In other words, each use-case ID, after having operated, can obtain a corresponding request knotFruit picture.
Then, use-case execution engine 130 sends to picture to check engine in the request results picture of intercepting114, check engine and 114 go to verify that whether this test result is normal by picture, thereby obtain testResult.
In addition, it should be noted that use-case execution engine 130 is executing after use-case at every turn, needsSend request to use-case and generate engine 120, use-case generates engine 120 meetings according to current use-case conditionParameter configuration, determines to want to carry out corresponding environment clear operation.
Picture checks engine and 140 is used for according to the similarity algorithm of configuration with to described request result pictureCarry out the comparison of similarity with the use-case result picture of standard, thereby produce test result by described surveyTest result feeds back to described automatic management platform.
The use-case result picture of standard is exactly that one all can at first for each newly-increased use-caseFirst go to carry out one time, by manual examination and verification, once whether the result sectional drawing of this use-case after executing be correct, justReally, picture is saved, become so-called " normal pictures ", check engine and 140 testing for pictureWhen card test result, play the effect of a canonical reference.
Picture check engine 140 can by carries out from use-case request results picture that engine 130 transmits andThe use-case result picture of standard contrasts. In contrast, can two pictures piecemeals are (concreteBe divided into how many and adjusted by actual demand, for example, in native system, can be divided into 4*4 piece), calculateThe hash value of each picture piecemeal, what in native system, adopt is that DCTBasedHash algorithm entersRow similarity is calculated. Then calculate the hash similarity of corresponding every two piecemeals.
Then, picture checks engine and 140 the similarity of acquisition and predefined similarity threshold is enteredRow relatively, if be greater than similarity threshold, judges that picture is similar, otherwise, dissimilar.By comparing the similarity of each picture piecemeal, then weighting calculates the similarity of two pictures. ThisThe bright control that the similarity threshold to some region can be set respectively, distinguishes thereby reach more flexiblyEffect.
As long as two pictures are similar, picture check engine 140 identification test cases be normal carry out logicalCross. Otherwise, do not pass through. Picture checks engine and 140 utilizes similarity to judge, be because ofFor identical display and identical browser, twice section of figure out also may have very trickleDifference, therefore two pictures impossible 100% are the same. In addition, on picture, may have some is similar toThe mark of timestamp and so on, the displaying content of this each run element can be different, therefore to thisKind region just can arrange a similarity threshold and process.
Automatic management platform 150 is for adding test assignment thereon for user, and shows eachThe test result of test assignment. Particularly,
User can add test assignment on automatic management platform 150, wherein each test assignmentOne group of use-case ID composition can provide query function on automatic management platform 150 in fact,Thereby for screening relevant function use-case and adding; Or can be flat in automatic managementOn platform 150, define some conventional regression test task lists, carry out a key interpolation.
In addition, automatic management platform 150 can also be shown the test result of each test assignment, bagDraw together the relevant informations such as consuming time, test report, test machine. In the test report page, demonstrate notThe use-case result picture of the test request result picture of the test case of passing through and standard, test personWhether member to be the result that causes because demand changes different if can checking. If be test request knotFruit picture is only correct, and tester can be at the enterprising line operate of automatic management platform 150 soThereby the use-case result picture of standard is fallen in direct replacement, the test request result picture of use-case is exactly like thisCorrect, Here it is, and case maintenance has upgraded, and removes the trouble of checking and revising code from, raising efficiency.If or be that the judgement in some region has problem, now can suitably revise corresponding similar of this use-caseDegree algorithm. If be the complete execution error of use-case, on automatic management platform 150, there is operation soReport function is provided, notifies developer to check.
In addition, tester can also increase, deletes and revise use newly on automatic management platform 150Example, the information of configuration condition parameter library. Seen from the above description, the whole generative process of use-case, isRealize by automatized script, be therefore subject to the impact of algorithm, what sometimes generate causes with regular meetingSome error now just can manually be examined amendment on automatic management platform 150, comprisesAmendment use-case URL template, the establishment script of configuration condition parameter, or add or amendment hardcodeValue is entered.
The Concrete workflow of WAP system automation test macro 100 of the present invention will specifically be introduced belowJourney. As shown in Figure 3, its WAP system automation method of testing disclosing for the embodiment of the present inventionFlow chart, WAP system automation method of testing of the present invention comprises the following steps:
Step S110: add test assignment on automatic management platform 150;
Step S120: utilize use-case to carry out engine 130 and obtain described test assignment, and obtain described surveyUse-case ID in trial business, and send it to use-case generation engine 120;
Step S130: utilize use-case to generate engine 120 according to described use-case ID, from case maintenance moduleIn 110, find out corresponding use-case template and the configuration mode of conditional parameter, thus generate one completeURL request, and return to use-case execution engine 130;
Step S140: use-case is carried out after engine 130 receives described URL request and called testing tool,For example Selenium instrument, and simulation send request operation, thereby obtain request results picture;
Step S150: utilize picture to check engine 140, according to the similarity algorithm of configuration with to describedThe use-case result picture of request results picture and standard carries out the comparison of similarity, thereby produces test knotFruit also feeds back to described automatic management platform 150 by described test result.
In addition, WAP system automation method of testing of the present invention, after above-mentioned flow process, can also be enteredOne step comprises: after test assignment has been moved, tester can login automatic management platform 150 and look intoSee the test result of this test assignment, and judge to have not have use-case need to upgrade picture or need peopleThe place of work amendment use-case.
Separately, in the present invention, the use-case in case maintenance module 110 upgrades engine 113 every one sectionTime is just removed custom system daily record sample drawn, and generates new use-case template and conditional parameter carries outUpgrade, then the configuration of the value of the adding conditional parameter that manually gets on.
In sum, WAP system automation test macro of the present invention and method of testing thereof, changedThe method of existing new case and maintenance use case, it by the use-case in case maintenance module 110 moreThereby the automatic scan script in new engine 112 goes timing scan system journal to generate new use-case, andDo not need manual input use-case, its needed manual operation is only the value of configuration condition parameter,Therefore the present invention has reduced the time of writing test code. And the present invention is in the time of maintenance update use-case, andDo not need to check that the page changes then revises test code and carry out corresponding text comparison, the present invention onlyNeed the operation of a replacement picture can complete, therefore the present invention reduces maintenance cost to a great extent.
In addition, in the present invention, due to use-case newly-increased by scanning user's Request Log storehouse inSystem journal and statistics filter out calls that number generates compared with high URL request, therefore ensures theseThe use-case generating is all the main operation use-case of system, has reduced the time of design test case, use-caseCoverage is also effectively guaranteed.
Separately, what the present invention can also be quicker upgrades, thus the agility of better back-up systemIssue test. And the execution result of each use-case can be by picture presentation out, therefore testerCan get information about very much implementation status.
The above, be only preferred embodiment of the present invention, not the present invention made to any formOn restriction, although the present invention disclose as above with preferred embodiment, but not in order to limit thisBright, any those skilled in the art, are not departing within the scope of technical solution of the present invention, when utilizingThe technology contents of above-mentioned announcement is made a little change or is modified to the equivalent embodiment of equivalent variations, is in every caseDo not depart from technical solution of the present invention content, according to technical spirit of the present invention, above embodiment is doneAny simple modification, equivalent variations and modification, all still belong in the scope of technical solution of the present invention.

Claims (10)

1. for the case maintenance module of test case for home control network communication protocol system, its spy are providedLevy and be, described case maintenance module is used for preserving use-case and automatically adds use-case, wherein, and described useExample maintenance module comprises:
User's Request Log storehouse, has daily record hold function to each URL request, usesIn preserve URL list and parameter list in system journal;
Use-case upgrades engine, for system journal described in automatic scan and analyze, thus the use of obtainingExample template, conditional parameter and with the corresponding CGI(Common gateway interface) request of described conditional parameter;
Use-case storehouse, for preserving described use-case template; And
Conditional parameter storehouse, for preserve described conditional parameter and with the corresponding institute of described conditional parameterState CGI(Common gateway interface) request.
2. as claimed in claim 1 for the use-case of test case of home control network communication protocol system is providedMaintenance module, is characterized in that, described use-case upgrades engine by automatic scan script and automatically regularGround scans and analyzes described system journal.
3. for the case maintenance method of test case for home control network communication protocol system, its spy are providedLevy and be, described case maintenance method is used for preserving use-case and automatically adds use-case, wherein, and described useExample maintaining method comprises:
Automatic scanning system daily record is also analyzed, with obtain use-case template, conditional parameter and with instituteState the corresponding CGI(Common gateway interface) request of conditional parameter, wherein, in described system journal, preserve systemOne URLs list and parameter list;
Described use-case template is saved to use-case storehouse; And
Described conditional parameter and described CGI(Common gateway interface) request are saved to conditional parameter storehouse.
4. as claimed in claim 3 for the use-case of test case of home control network communication protocol system is providedMaintaining method, is characterized in that, described automatic scanning system daily record is also analyzed, described in obtainingThe step of use-case template, described conditional parameter and described CGI(Common gateway interface) request further comprises:
Scan termly described system journal and analyze by automatic scan script;
Scan the URL list in described system journal, analyze described unified resource locationIn symbol list in each URL request the parameter name in each CGI(Common gateway interface) request withAnd corresponding parameter value, calculate and preserve the corresponding parameter of each CGI(Common gateway interface) request andThe different numbers of the corresponding value of described parameter, thus the parameter of each CGI(Common gateway interface) request obtainedInformation;
According to the parameter information of each CGI(Common gateway interface) request, determine each CGI(Common gateway interface) requestCorresponding parameter is that conditional parameter is also non-conditional parameter;
Rescan described URL list, remove in each URL requestThe corresponding value of conditional parameter of the inside, and intactly retain non-conditional parameter, thus obtain one newlyURL template, and be saved in URL template list;
Described in tabulate statistics, URL template is to obtain each class URL templateCall number, and please it be saved in the list of URL template recalls information; And
Setting threshold relatively each class URL template call number and described threshold value,As described in URL template call number exceed as described in threshold value, by fixed described unified resourcePosition symbol template is as use-case template.
5. a home control network communication protocol system automation test macro, is characterized in that, described channel radioNews protocol system automatization test system comprises:
Case maintenance module, for preserving use-case and automatically adding use-case;
Automatic management platform, for adding test assignment thereon;
Use-case is carried out engine, obtains described test assignment, and obtains the use-case body in described test assignmentPart identification number;
Use-case generates engine, obtains described use-case identify label number, and from described case maintenance moduleFind out corresponding use-case template and the configuration mode of conditional parameter, then generate a complete unified moneySource finger URL request, and return to use-case execution engine, wherein said use-case is carried out engine and is received instituteState and call testing tool after URL request and simulation sends request operation, please thereby obtainAsk result picture;
Picture checks engine, according to the similarity algorithm of configuration with to described request result picture and standardUse-case result picture carry out the comparison of similarity, thereby produce test result by described test resultFeed back to described automatic management platform.
6. home control network communication protocol system automation test macro as claimed in claim 5, its feature existsIn, described case maintenance module comprises:
User's Request Log storehouse, has daily record hold function to each URL request, withIn system journal, preserve URL list and parameter list;
Use-case upgrades engine, system journal analyzing described in automatic scan, with obtain use-case template,Conditional parameter and with the corresponding CGI(Common gateway interface) request of described conditional parameter;
Use-case storehouse, for preserving described use-case module; And
Conditional parameter storehouse, for preserve described conditional parameter and with the corresponding institute of described conditional parameterState CGI(Common gateway interface) request.
7. a home control network communication protocol system automation method of testing, is characterized in that, described channel radioNews protocol system automated testing method comprises:
On automatic management platform, add test assignment;
Utilize use-case to carry out engine and obtain described test assignment, and obtain the use-case in described test assignmentIdentify label number, and send it to use-case generation engine;
Utilize described use-case to generate engine according to described use-case identify label number, from case maintenance moduleFind out corresponding use-case template and the configuration mode of conditional parameter, thereby generate a complete unified moneySource finger URL request, and return to described use-case execution engine;
Described use-case is carried out after engine receives described URL request and is called testing tool alsoSimulation sends request operation, thereby obtains request results picture;
Utilize picture to check engine, according to configuration similarity algorithm with to described request result picture withThe use-case result picture of standard carries out the comparison of similarity, thereby produces test result by described testResult feedback is to described automatic management platform.
8. home control network communication protocol system automation method of testing as claimed in claim 7, its feature existsIn, described case maintenance module is for automatically preserving and adding use-case, and described case maintenance module is certainlyThe flow process of moving preservation and interpolation use-case comprises:
Automatic scanning system daily record is also analyzed, with obtain use-case template, conditional parameter and with instituteState the corresponding CGI(Common gateway interface) request of conditional parameter, wherein, in described system journal, preserve systemOne URLs list and parameter list;
Described use-case template is saved to use-case storehouse; And
Described conditional parameter and described CGI(Common gateway interface) request are saved to conditional parameter storehouse.
9. home control network communication protocol system automation method of testing as claimed in claim 8, its feature existsIn, described automatic scanning system daily record is also analyzed, to obtain described use-case template, described conditionThe step of parameter and described CGI(Common gateway interface) request comprises:
Scan termly described system journal and analyze by automatic scan script;
Scan the URL list in described system journal, analyze described unified resource locationIn symbol list in each URL request the parameter name in each CGI(Common gateway interface) request withAnd corresponding parameter value, calculate and preserve the corresponding parameter of each CGI(Common gateway interface) request andThe different numbers of the corresponding value of described parameter, thus the parameter of each CGI(Common gateway interface) request obtainedInformation;
According to the parameter information of each CGI(Common gateway interface) request, determine each CGI(Common gateway interface) requestCorresponding parameter is that conditional parameter is also non-conditional parameter;
Rescan described URL list, remove in each URL requestThe corresponding value of conditional parameter of the inside, and intactly retain non-conditional parameter, thus obtain one newlyURL template, and be saved in URL template list;
Described in tabulate statistics, URL template is to obtain each class URL templateCall number, and please it be saved in the list of URL template recalls information; And
Setting threshold relatively each class URL template call number and described threshold value,As described in URL template call number exceed as described in threshold value, by fixed described unified resourcePosition symbol template is as use-case template.
10. home control network communication protocol system automation method of testing as claimed in claim 7, its feature existsIn, described testing tool comprises Selenium instrument.
CN201210061562.8A 2012-03-09 2012-03-09 WAP system automation test macro and method Active CN103313289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210061562.8A CN103313289B (en) 2012-03-09 2012-03-09 WAP system automation test macro and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210061562.8A CN103313289B (en) 2012-03-09 2012-03-09 WAP system automation test macro and method

Publications (2)

Publication Number Publication Date
CN103313289A CN103313289A (en) 2013-09-18
CN103313289B true CN103313289B (en) 2016-05-11

Family

ID=49137964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210061562.8A Active CN103313289B (en) 2012-03-09 2012-03-09 WAP system automation test macro and method

Country Status (1)

Country Link
CN (1) CN103313289B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335278A (en) * 2014-06-16 2016-02-17 阿里巴巴集团控股有限公司 Testing method and device
CN104657639B (en) * 2015-02-02 2017-08-25 中国科学院数据与通信保护研究教育中心 A kind of method of testing and system of operating system identity authentication scheme
CN107040504B (en) * 2016-02-04 2020-05-01 北京京东尚科信息技术有限公司 Test method and device
CN106294151B (en) * 2016-08-09 2019-02-12 合一智能科技(深圳)有限公司 Log test method and device
CN107102941B (en) * 2017-03-30 2021-01-08 腾讯科技(深圳)有限公司 Test case generation method and device
CN109150643B (en) * 2017-06-16 2022-09-23 创新先进技术有限公司 Service processing abnormity detection method and device
CN109298994A (en) * 2017-07-24 2019-02-01 中国移动通信集团公司 A kind of script records, method for testing software and equipment
CN108809755B (en) * 2018-05-18 2020-10-30 烽火通信科技股份有限公司 Automatic testing method and system for home gateway compatible with command line and WEB interface
CN110515834B (en) * 2019-07-26 2023-11-10 Oppo广东移动通信有限公司 Interface testing method and device, mobile terminal and storage medium
CN111083007B (en) * 2019-11-21 2022-07-29 京信网络系统股份有限公司 Test method, test device, computer equipment and storage medium
CN110830330B (en) * 2019-12-06 2022-01-28 浙江中控技术股份有限公司 Firewall testing method, device and system
CN111782546B (en) * 2020-07-23 2021-10-01 北京斗米优聘科技发展有限公司 Automatic interface testing method and device based on machine learning
CN112069073A (en) * 2020-09-07 2020-12-11 深圳创维-Rgb电子有限公司 Test case management method, terminal and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101561802A (en) * 2008-04-18 2009-10-21 上海复旦光华信息科技股份有限公司 Web page structural data extraction method and system
CN101593211A (en) * 2008-05-30 2009-12-02 富士通株式会社 Web data provides system, web data that method and computer-readable medium are provided

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110276834A1 (en) * 2010-05-06 2011-11-10 Salesforce.Com, Inc. Techniques for testing computer readable code

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101561802A (en) * 2008-04-18 2009-10-21 上海复旦光华信息科技股份有限公司 Web page structural data extraction method and system
CN101593211A (en) * 2008-05-30 2009-12-02 富士通株式会社 Web data provides system, web data that method and computer-readable medium are provided

Also Published As

Publication number Publication date
CN103313289A (en) 2013-09-18

Similar Documents

Publication Publication Date Title
CN103313289B (en) WAP system automation test macro and method
CN101183987B (en) Monitoring performance of dynamic web content applications
US9076072B2 (en) System and method for web page rendering test automation suite
US10296859B1 (en) Workflow discovery through user action monitoring
US20080005747A1 (en) System and method for object state management
US8972578B2 (en) Master data management system for monitoring cloud computing
CN109710298A (en) Interface managerial method, interface management apparatus, interface management equipment and storage medium
CN106484853A (en) document analysis method and device
Kazhamiakin et al. Analysis of realizability conditions for web service choreographies
US9823999B2 (en) Program lifecycle testing
US10235158B2 (en) Optimizing feature deployment based on usage pattern
CN111078424A (en) Information interaction method and device, computer equipment and storage medium
US20120066388A1 (en) Management of b2b communities
CN111857932A (en) Web substitution and filling method for operation and maintenance auditing system based on puppeteer
CN113377683B (en) Software test case generation method, system, device, terminal, medium and application
CN110442636A (en) A kind of reading/writing method of data, device and reading and writing data equipment
CN110381035A (en) Network security test method, device, computer equipment and readable storage medium storing program for executing
CN112416995B (en) Data statistics method, device, computer equipment and storage medium
CN113779551A (en) Authority management method and device
CN113468446A (en) Method, system and equipment for supporting identification of third-party two-dimensional code data
CN111159988A (en) Model processing method and device, computer equipment and storage medium
CN105243479A (en) Risk judgment method and data processing system
CN117112668B (en) ETL-based RPA flow management method and system
CN117667665B (en) White screen detection method, device, equipment and storage medium
US20210398084A1 (en) Time activity processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210928

Address after: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors

Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 2, 518044, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TR01 Transfer of patent right