CN103313289A - Wap system automatic test system and method - Google Patents

Wap system automatic test system and method Download PDF

Info

Publication number
CN103313289A
CN103313289A CN2012100615628A CN201210061562A CN103313289A CN 103313289 A CN103313289 A CN 103313289A CN 2012100615628 A CN2012100615628 A CN 2012100615628A CN 201210061562 A CN201210061562 A CN 201210061562A CN 103313289 A CN103313289 A CN 103313289A
Authority
CN
China
Prior art keywords
case
url
parameter
request
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.)
Granted
Application number
CN2012100615628A
Other languages
Chinese (zh)
Other versions
CN103313289B (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

Images

Abstract

The invention relates to a WAP system automatic test system and a test method. The system and the method can use a corresponding use case maintenance module and a corresponding use case maintenance method to scan automatically a system log so that a new use case is generated, and the use case is not required to be inputted manually; and a use case execution engine, a use case generation engine and an image inspection engine are used to detect automatically a test case, so that time of designing the test case and writing test codes is reduced. The update is convenient and the maintenance cost is reduced.

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 case maintenance module be used to the test case that the WAP system is provided and method, reach corresponding WAP system automation test macro and method.
Background technology
Along with the progress of science and technology, the electronic equipment that computer, smart mobile phone etc. has operation processing function has been widely used in the daily live and work of people, becomes requisite article in people's daily life and the work.
WAP (Wireless Application Protocol, home control network communication protocol) be at digital mobile phone, the Internet or other PDA (Personal Digital Assistant) (Personal Digital Assistant, PDA), the global open standard that carries out communication between computer application and even the following information household appliances, it is the wireless Internet agreement of having simplified.By this technology of WAP, the bulk information of Internet and various business can be incorporated among the wireless terminals such as mobile phone, it can browse the WAP website by mobile phone browser, thereby enjoy that news is browsed, the various application services of stock inquiry, mail transmission/reception, game on line, chat etc., can give full play to then that access delay is short, speed is high, always online, easy switching etc. advantage.
At present, the test for WAP system applies class mainly contains dual mode: a kind of is manual mode, removes to check each use-case point by hand by the tester; Another is automatic test, by automation tools, and QTP for example, Selenium etc. remove to record script, go to order about the script playback by automation tools then and carry out regression test.First kind of manual mode be poor efficiency very, the work that needs great amount of manpower to repeat in a large number, and its quick exploitation that is unfavorable for system is upgraded.For second kind of automatic test mode, there is a very big shortcoming to be that automation tools depends on interface element too much, in case the interface changes or changes in demand, have to revise use-case, and new case is also cumbersome, need remove to record use-case again, under the situation that the use-case number is on the increase, it need consume more manual maintenance cost.Therefore have automatization testing technique commonly used now, script maintenance cost amount is big, is unfavorable for the iteratively faster test of system.
Summary of the invention
The objective of the invention is to, overcome the existing existing defective of WAP system detection method, and provide a kind of new being used for that case maintenance module and the case maintenance method of the test case of WAP system is provided, and corresponding WAP system automation test macro and method, with the time that reduces design test case and write 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 case maintenance module be used to the test case that the WAP system is provided, described case maintenance module is used for preserving use-case and adds use-case automatically, wherein, described case maintenance module comprises that user's Request Log storehouse, use-case upgrade engine, use-case storehouse and conditional parameter storehouse.Described user's Request Log storehouse has the daily record hold function to each URL request, to preserve url list and parameter list in system journal.But described use-case upgrades the described system journal of engine automatic scan also to be analyzed, with obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter.Described use-case storehouse is used for preserving described use-case template.And described conditional parameter storehouse is for preserving described conditional parameter and asking with the corresponding described CGI of described conditional parameter.
Preferably, described use-case renewal engine scans and analyzes described system journal termly automatically by the automatic scan script.
The present invention also provides a kind of case maintenance method be used to the test case that the WAP system is provided, described case maintenance method is used for preserving use-case and adds use-case automatically, wherein, described case maintenance method comprises: the automatic scanning system daily record is also analyzed, with obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter, wherein, preserve url list and parameter list in the described system journal; Described use-case template is saved to the use-case storehouse; And described conditional parameter and described CGI request is saved to the conditional parameter storehouse.
Preferably, described automatic scanning system daily record is also analyzed, and further comprises with the step of obtaining described use-case template, described conditional parameter and described CGI request: scan described system journal termly and analyze by the automatic scan script; Scan the url list in the described system journal, analyze parameter name and corresponding parameters value during each CGI asks in each URL request in the described url list, calculate and preserve the different numbers that each CGI asks corresponding parameter and the corresponding value of described parameter, thereby obtain the parameter information of each CGI request; According to the parameter information of each CGI request, determine that it is that conditional parameter also is non-conditional parameter that each CGI asks corresponding parameter; Rescan described url list, remove the corresponding value of conditional parameter of the inside in each URL request, and intactly keep non-conditional parameter, thereby obtain a new URL template, and be saved in the URL template list; The described URL template of tabulate statistics to be obtaining the number of calling of each class URL template, and please it be saved in the tabulation of URL template recalls information; And setting threshold and relatively each class URL template call number and described threshold value, as described the URL template call number above described threshold value, with described URL template as the use-case template.
The present invention provides a kind of WAP system automation test macro in addition, and wherein, described WAP system automation test macro comprises that case maintenance module, automatic management platform, use-case are carried out engine, use-case generates engine and picture checks engine.Wherein said case maintenance module is used for preserving use-case and adds use-case automatically.Described automatic management platform is used for adding test assignment thereon.Described use-case is carried out engine and is obtained described test assignment, and obtains the use-case ID in the described test assignment.Described use-case generates engine and obtains described use-case ID, and from described case maintenance module, find out corresponding use-case template and the configuration mode of conditional parameter, generate a complete URL request then, and return to use-case and carry out engine, wherein said use-case is carried out and is called testing tool and simulation transmission solicit operation after engine receives described URL request, thereby obtains the request results picture.Described picture check engine according to the similarity algorithm of configuration with to described request as a result picture and standard use-case as a result picture carry out the comparison of similarity, thereby generation test result and described test result fed back to described automatic management platform.
Preferably, described case maintenance module comprises that user's Request Log storehouse, use-case upgrade engine, use-case storehouse and conditional parameter storehouse.Wherein said user's Request Log storehouse has the daily record hold function to each URL request, to preserve url list and parameter list in system journal.Described use-case upgrades the described system journal of engine automatic scan also to be analyzed, with obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter.Described use-case storehouse is used for preserving described use-case module.And described conditional parameter storehouse is for preserving described conditional parameter and asking with the corresponding described CGI of described conditional parameter.
The present invention also provides a kind of WAP system automation method of testing, and it comprises: add test assignment at the automatic management platform; Utilize use-case to carry out engine and obtain described test assignment, and obtain the use-case ID in the described test assignment, and send it to use-case generation engine; Utilize described use-case to generate engine according to described use-case ID, from the case maintenance module, find out corresponding use-case template and the configuration mode of conditional parameter, thereby generate a complete URL request, and return to described use-case execution engine; Described use-case is carried out and is called testing tool and simulation transmission solicit operation after engine receives described URL request, thereby obtains the request results picture; Utilize picture to check engine, according to the similarity algorithm of configuration with to described request as a result picture and standard use-case as a result picture carry out the comparison of similarity, thereby generation test result and described test result fed back to described automatic management platform.
Preferably, described case maintenance module is used for preserving automatically and adding use-case, and described case maintenance module is preserved automatically and the flow process of interpolation use-case comprises: the automatic scanning system daily record is also analyzed, with obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter, wherein, preserve in the described system journal with url list and parameter list; Described use-case template is saved to the use-case storehouse; And described conditional parameter and described CGI request is saved to the conditional parameter storehouse.
Preferably, described automatic scanning system daily record is also analyzed, and comprises with the step of obtaining described use-case template, described conditional parameter and described CGI request: scan described system journal termly and analyze by the automatic scan script; Scan the url list in the described system journal, analyze parameter name and corresponding parameters value during each CGI asks in each URL request in the described url list, calculate and preserve the different numbers that each CGI asks corresponding parameter and the corresponding value of described parameter, thereby obtain the parameter information of each CGI request; According to the parameter information of each CGI request, determine that it is that conditional parameter also is non-conditional parameter that each CGI asks corresponding parameter; Rescan described url list, remove the corresponding value of conditional parameter of the inside in each URL request, and intactly keep non-conditional parameter, thereby obtain a new URL template, and be saved in the URL template list; The described URL template of tabulate statistics to be obtaining the number of calling of each class URL template, and please it be saved in the tabulation of URL template recalls information; And setting threshold and relatively each class URL template call number and described threshold value, as described the URL template call number above described threshold value, with described URL template as the use-case template.
Preferably, described testing tool comprises the Selenium instrument.
In sum, WAP system automation test macro of the present invention and method of testing thereof, changed the method for existing new case and maintenance use case, thereby it can go the timing scan system journal to generate new use-case by the automatic scan script in the case maintenance module, and do not need craft to import use-case, its needed manual operation only is the value of configuration condition parameter, so the present invention has reduced the time of writing test code.And the present invention is when the maintenance update use-case, do not need to check that the page changes revises test code then and carry out corresponding text relatively, and the present invention need only want one to replace the picture operation and can finish, so the present invention reduces maintenance cost to a great extent.In addition, in the present invention, because use-case newly-increased is to filter out by the system journal in the scanning user Request Log storehouse and statistics to call the higher URL request of number and generate, therefore guarantee that the use-case of these generations all is the main operation use-case of system, reduced the time of design test case, the use-case coverage also is effectively guaranteed.The present invention can also compare quick upgrading, thus the better agility of back-up system issue test.And the execution result of each use-case can come out by picture presentation, so the tester can get information about implementation status very much.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of specification, and for above-mentioned and other purposes, feature and advantage of the present invention can be become apparent, below especially exemplified by preferred embodiment, and conjunction with figs., be described in detail as follows.
Description of drawings
The block schematic diagram of the WAP system automation test macro that Fig. 1 discloses for the embodiment of the invention.
Fig. 2 is the workflow schematic diagram of case maintenance module shown in Figure 1.
The flow chart of the WAP system automation method of testing that Fig. 3 discloses for the embodiment of the invention.
Embodiment
Reach technological means and the effect that predetermined goal of the invention is taked for further setting forth the present invention, below in conjunction with accompanying drawing and preferred embodiment, foundation the present invention is safeguarded being used for of proposing the case maintenance module of test case of WAP system and case maintenance method, and corresponding WAP system automation test macro and its embodiment of method of testing, method, step, structure, feature and effect thereof, be described in detail as follows.
Relevant aforementioned and other technology contents, characteristics and effect of the present invention can be known to present in the following detailed description that cooperates with reference to graphic preferred embodiment.By the explanation of embodiment, when can being to reach technological means and the effect that predetermined purpose takes to be able to more deeply and concrete understanding to the present invention, yet appended graphic only provide with reference to the usefulness of explanation, the present invention is limited.
The block schematic diagram of the WAP system automation test macro that Fig. 1 discloses for the embodiment of the invention.As shown in Figure 1, WAP system automation test macro 100 of the present invention comprises that case maintenance module 110, use-case generation module 120, use-case Executive Module 130, picture check module 140 and automatic management platform 150.
In the present invention, the concept of use-case mainly refers to send cgi script in the WAP system and the complete URL request of actual of calling, wherein, URL is Uniform Resource Locator, it is called as URL(uniform resource locator), being also referred to as web page address, is the resource addresses of standard on the internet.The general type of URL request is<access mode of URL 〉: //<main frame 〉:<port 〉/<path 〉.CGI is Common Gateway Interface, it is one section program physically, operate on the server, interface with the client html page is provided, wherein Jue Daduoshuo cgi script is used to interpretation process from the input information of list, and produce corresponding the processing at server, or give browser with corresponding feedback information.
Wherein, case maintenance module 110 is used for storage automatically and adds use-case automatically.Fig. 2 is the workflow schematic diagram of case maintenance module 110 shown in Figure 1.See also Fig. 1-2, case maintenance module 110 of the present invention comprises that user's Request Log storehouse 111, use-case upgrade engine 112, use-case storehouse 113 and conditional parameter storehouse 114.Wherein, user's Request Log storehouse 111 has the daily record hold function to each URL request, to preserve url list and parameter list in system journal.Use-case upgrades engine 112 can the automatic scanning system daily record and analyze, with obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter, then the use-case template is saved to use-case storehouse 113, is kept in the conditional parameter storehouse 114 with conditional parameter and with the CGI request.Particularly, the workflow of case maintenance module 110 is as described below:
Step S11: the automatic scanning system daily record is also analyzed, and wherein system journal has the daily record hold function for each URL request, thereby preserves url list and parameter list in the system journal in user's Request Log storehouse 111.Wherein, use-case upgrades engine 112 and can analyze by the daily record that the automatic scan script comes termly from system journal sampling to take out a part.
Step S12: the url list in the scanning system daily record, analyze parameter name and the corresponding parameters value be with in each CGI request in each URL request in the url list then, calculate and preserve the different numbers of the value of this CGI corresponding parameters and described parameter correspondence, thereby obtain the parameter information of each CGI request.After having scanned one time, the parameter information that can obtain each CGI comprises it and contains which parameter, and these parameter corresponding parameters value kinds have what.
Step S13: according to the parameter information of each CGI request, determine that it is that conditional parameter also is non-conditional parameter that each CGI asks corresponding parameter.Wherein, the characteristics of conditional parameter are that its corresponding span is more multiple, because it is relevant with user's account number.And those non-conditional parameters have nothing to do with the user, just are used for telling CGI what functional branch request will carry out.
Step S14: rescan the url list in the system journal again, for each bar URL request, the corresponding value of the conditional parameter of the inside is removed, but not conditional parameter then is complete reservation, thereby obtain a new URL template, be saved in the new tabulation, i.e. the URL template list.
Step S15: tabulate statistics URL template to be obtaining the number of calling of each class URL template, and please it be saved in the tabulation of URL template recalls information.Because in URL template list the inside, each URL request of preserving has been removed with user-dependent parameter and abstract come out, therefore on this basis, rescan again one time, these URL templates are carried out tabulate statistics, can obtain the number of calling of each class URL template, and be saved in the tabulation of URL template recalls information.
Step S16: setting threshold and relatively each class URL template call number and described threshold value, as the URL template call number surpass as described in threshold value, the URL template as the use-case template and be saved in the use-case storehouse, and is analyzed the conditional parameter that comes out with the URL template and the CGI request of its correspondence is saved in the conditional parameter storehouse in above-mentioned steps S13.Because in use, only be concerned about user's request call that those are main, whether therefore can setting threshold be used for weighing be whether the URL template is the call request of main users, it can be set according to actual conditions in different systems.To call number then and surpass the URL template of setting threshold values as the use-case template, it is corresponding to main call request, the also object of being paid close attention to, and it is saved in the use-case storehouse 113, and with the use-case template in above-mentioned steps S13, analyze come out conditional parameter with and corresponding CGI request be saved in the conditional parameter storehouse 114.
In the present invention, run through above-mentioned flow process at every turn, just can improve use-case storehouse 113 and conditional parameter storehouse 114 in the case maintenance module 110, thereby call for follow-up automation.
Give an example, annotate top processing procedure:
For example: check certain contact person in the QQ mailbox, its complete URL request is as follows:
addr_detail?sid=insj9Nas3H1VQEMO&AddrID=1207&grpid=1000&category=common&isqqgroup=0&t=addr_detail
After the statistical analysis processing, the value of learning sid, AddrID, these three parameter correspondences of grpid has a lot of, and the number that different value appears in category, isqqgroup, these three parameters of t seldom, therefore sid, AddrID, grpid belong to conditional parameter, and it is saved in the conditional parameter storehouse 114.And then this URL request of abstract, 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, it is accessed in the use-case storehouse 113, wherein the 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, because it has been removed the value of some conditional parameter correspondences, be directly to have called, expect an executable use-case, need fill complete value to it, just can directly call then.
Therefore, case maintenance module 110 of the present invention can automatically be stored and upgrades use-case template in the use-case storehouse 113 and the conditional parameter in the conditional parameter storehouse 114 according to above-mentioned flow process, thereby automatically store and upgrade use-case, and do not need manual the interpolation.
Use-case generates engine 120 for the use-case ID that imports according to the outside, and finds out corresponding use-case template and the processing mode of conditional parameter from case maintenance module 110, thereby generates a complete URL request, and sends it to use-case execution engine 130.
Particularly, when the outside input transmitted a use-case ID to use-case generation engine 120, its corresponding use-case template was found out in the use-case storehouse 113 that use-case generates in the engine 120 inquiry case maintenance modules 110, and which the conditional parameter of the inside correspondence is.Give an example the use-case template:
addr_detail?sid=&AddrID=&grpid=&category=common&isqqgroup=0&t=addr_detail
The corresponding conditional parameter in its inside is respectively sid, AddrID, grpid.
Then enter into the processing procedure of conditional parameter, from the above, the use-case template just can become a real available URL request after the value of its conditional parameter correspondence need being filled.Therefore the difficult point here is exactly the value that will go to have generated automatically the conditional parameter correspondence, and will guarantee that this value is correct, and is significant.Which the value of understanding the conditional parameter value for convenience has, the corresponding user's full request of each use-case template sample can be preserved tens, just can directly understand this corresponding use-case template request with reference to these samples then, which value the conditional parameter of the inside has, thereby can more easily confirm the character of this conditional parameter.Wherein, according to the character of conditional parameter, the invention provides following two kinds of processing modes:
First kind: hardcode (hard coded) type, it refers to that the value of this conditional parameter correspondence can directly write extremely, it can not influence 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 can be 2,3, perhaps 100, how many values of this conditional parameter page gets for not influence of CGI request, its execution is unified the processing, and it extremely is 2 just passable therefore page directly need only being write, its correspondence be the page-turning function of mail tabulation.
Second kind: script creation type, it refers to that the value of this conditional parameter correspondence need create conditions by compile script and obtains.For example remove to read an envelope mail, corresponding CGI request needs the parameter of a mailid, need invoke script to remove to create an envelope mail this moment, and obtain the mailid of this envelope mail, this is exactly the value of conditions needed parameter, it is a simple assignment that this kind processing mode has more than, and also needs to go just can obtain after the establishment condition by the backstage.
Under the normal condition, can just can determine this conditional parameter and belong to any type directly by parameter name and the parameter value of sample the inside, handle just passable then accordingly.Through practice, the value of most of conditional parameter is to belong to the hardcode type, therefore as long as the value of the dead conditional parameter of simple write is just passable.Based on two kinds of situations of above-mentioned processing, therefore in conditional parameter storehouse 114, for each conditional parameter, two attributes need be arranged, it is hardcode that an attribute is used for identifying this conditional parameter, still needs which script to go to create.The another one attribute is to identify after this use-case executes, and the influence that this conditional parameter causes needs to clear up environment.
For instance, for mail mailid, it need create an envelope mail, in order to guarantee to test the consistency of account number initial environment, needs invoke script to go to remove.Use-case generates engine 120 by the parameter configuration of 114 the insides, conditional parameter storehouse, handles accordingly, and conditional parameter is carried out assignment, thereby forms a complete URL request.
Then, use-case generates the complete URL request (this moment, it was exactly the request that really can call) that engine 120 will generate and returns to use-case execution engine 130.
It is the modules that realize task scheduling and automatically perform test that use-case is carried out engine 130, and its workflow is as described below.
Use-case is carried out the test assignment that engine 130 receives outside input, and for each test assignment, use-case is carried out engine 130 and taken out the use-case ID that this test assignment the inside will be moved respectively.
Then, use-case is carried out engine 130 use-case ID is sent to use-case generation engine 120, use-case generates engine 120 can remove to handle this use-case ID according to above-mentioned flow process, returns the corresponding complete URL request of this use-case ID again, has namely filled the URL request that obtains after the conditional parameter value.
Use-case execution engine 130 is passed to testing tool with the URL request after receiving the complete URL request of use-case ID correspondence, and for example the selenium instrument goes simulation transmission user request thereby control testing tool.
After the user asked successfully to have called, use-case execution engine 130 called testing tool again and carries out the sectional drawing operation, thereby obtains the request results picture.Use-case execution engine 130 is preserved the request results picture get off then.In other words, each use-case ID can obtain the request results picture of a correspondence after having operated.
Then, use-case is carried out engine 130 and the request results picture of intercepting is sent to picture is checked engine 114, checks engine 114 to go to verify whether this test result is normal by picture, thereby obtains test result.
In addition, it should be noted that use-case execution engine 130 after executing use-case at every turn, needs to send request and generates engine 120 to use-case, then use-case generates engine 120 and can determine to want to carry out corresponding environment clear operation according to current use-case conditional parameter configuration.
Picture check engine 140 be used for according to the similarity algorithm of configuration with to described request as a result picture and standard use-case as a result picture carry out the comparison of similarity, thereby generation test result and described test result fed back to described automatic management platform.
The use-case of standard picture as a result is exactly for each newly-increased use-case, one all can go earlier to carry out one time at first, whether the sectional drawing as a result after once this use-case executes by manual examination and verification is correct, after correct picture is preserved, become so-called " normal pictures ", check engine 140 in the validation test result for picture, play the effect of a canonical reference.
Picture check engine 140 use-cases that can carry out request results picture that engine 130 transmits and standard from use-case as a result picture compare.In contrast, can be with two pictures piecemeals (specifically be divided into how many pieces and adjusted by actual demand, for example, in native system, can be divided into the 4*4 piece), calculate the hash value of each picture piecemeal, what adopt in native system is that DCT Based hash algorithm carries out similarity calculating.Calculate the hash similarity of corresponding per two piecemeals then.
Then, picture checks engine and 140 similarity and the predefined similarity thresholds that obtain is compared, if greater than similarity threshold, judge that then picture is similar, otherwise, dissmilarity then.By comparing the similarity of each picture piecemeal, then the similarity of two pictures is calculated in weighting.The present invention can arrange the control to some regional similarity threshold respectively, distinguishes effect more flexibly thereby reach.
As long as two pictures are similar, then picture checks engine and 140 assert that test cases are that normal the execution passed through.Otherwise, then do not pass through.Picture checks engine and 140 utilizes similarity to judge, is because identical display and identical browser, and twice section figure that comes out also may have very fine distinction, and therefore two pictures are can not 100% the same.In addition, may have the sign that some are similar to timestamp and so on the picture, the displaying content of this each run element can be different, therefore to this zone a similarity threshold just can be set and handle.
Automatic management platform 150 is to add test assignment thereon for the user, and shows the test result of each test assignment.Particularly,
The user can add test assignment at automatic management platform 150, wherein each test assignment in fact one group of use-case ID form, on automatic management platform 150, can provide query function, thereby be used for screening relevant function use-case and adding; Perhaps can carry out a key and add at some regression test task lists commonly used of automatic management platform 150 definition.
In addition, automatic management platform 150 can also be showed the test result of each test assignment, comprises relevant informations such as consuming time, test report, test machine.In the test report page, the test request that demonstrates unsanctioned test case is the use-case picture as a result of picture and standard as a result, and then the tester can check that whether to be the result that causes because demand changes different.If be test request as a result picture be only correct, thereby tester's use-case picture as a result that can fall standard in the 150 enterprising line operate direct replacements of automatic management platform so, like this test request of use-case as a result picture be exactly correct, Here it is, and case maintenance has upgraded, remove the trouble of checking and revising code from, promote efficient.If the judgement that perhaps is some zone has problem, can suitably revise the similarity algorithm of this use-case correspondence this moment.If be the complete execution error of use-case, having operation so on the automatic management platform 150 provides the report function, notifies the developer to check.
In addition, the tester can also increase, delete and revise use-case, the information of configuration condition parameter library newly at automatic management platform 150.Seen from the above description, the whole generative process of use-case, realize by automatized script, therefore be subjected to the influence of algorithm, what generate sometimes causes some error with regular meeting, and just can manually examine modification at automatic management platform 150 this moment, comprises revising use-case URL template, the establishment script of configuration condition parameter perhaps adds or modification hardcode value is entered.
Below will specifically introduce the concrete workflow of WAP system automation test macro 100 of the present invention.As shown in Figure 3, the flow chart of the WAP system automation method of testing that it discloses for the embodiment of the invention, WAP system automation method of testing of the present invention may further comprise the steps:
Step S110: add test assignment at automatic management platform 150;
Step S120: utilize use-case to carry out engine 130 and obtain described test assignment, and obtain the use-case ID in the described test assignment, 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 module 110, find out corresponding use-case template and the configuration mode of conditional parameter, thereby generate a complete URL request, and return to use-case execution engine 130;
Step S140: use-case is carried out and is called testing tool after engine 130 receives described URL request, and for example Selenium instrument, and simulation sends solicit operation, thereby obtains the request results picture;
Step S150: utilize picture to check engine 140, according to the similarity algorithm of configuration with to described request as a result picture and standard use-case as a result picture carry out the comparison of similarity, thereby generation test result and described test result fed back to described automatic management platform 150.
In addition, WAP system automation method of testing of the present invention is after above-mentioned flow process, can further include: after test assignment has been moved, the tester can login the test result that automatic management platform 150 is checked this test assignment, and judges that the place that there is not use-case need upgrade picture or needs manual amendment's use-case is arranged.
In addition, in the present invention, the use-case in the case maintenance module 110 upgrades engine 113 and just removes custom system daily record sample drawn at set intervals, and generates new use-case template and conditional parameter and upgrade the value configuration of the adding conditional parameter that manually gets on again.
In sum, WAP system automation test macro of the present invention and method of testing thereof, changed the method for existing new case and maintenance use case, thereby it goes the timing scan system journal to generate new use-case by the automatic scan script that the use-case in the case maintenance module 110 upgrades in the engine 112, and do not need craft to import use-case, its needed manual operation only is the value of configuration condition parameter, so the present invention has reduced the time of writing test code.And the present invention is when the maintenance update use-case, do not need to check that the page changes revises test code then and carry out corresponding text relatively, and the present invention need only want one to replace the picture operation and can finish, so the present invention reduces maintenance cost to a great extent.
In addition, in the present invention, because use-case newly-increased is to filter out by the system journal in the scanning user Request Log storehouse and statistics to call the higher URL request of number and generate, therefore guarantee that the use-case of these generations all is the main operation use-case of system, reduced the time of design test case, the use-case coverage also is effectively guaranteed.
In addition, the present invention can also compare quick upgrading, thus the better agility of back-up system issue test.And the execution result of each use-case can come out by picture presentation, so the tester can get information about implementation status very much.
The above, it only is preferred embodiment of the present invention, be not that the present invention is done any pro forma restriction, though the present invention discloses as above with preferred embodiment, yet be not in order to limit the present invention, any those skilled in the art, in not breaking away from the technical solution of the present invention scope, when the technology contents that can utilize above-mentioned announcement is made a little change or is modified to the equivalent embodiment of equivalent variations, in every case be not break away from the technical solution of the present invention content, any simple modification that foundation technical spirit of the present invention is done above embodiment, equivalent variations and modification all still belong in the scope of technical solution of the present invention.

Claims (10)

1. the case maintenance module for the test case that the WAP system is provided is characterized in that, described case maintenance module is used for preserving use-case and automatic interpolation use-case, and wherein, described case maintenance module comprises:
User's Request Log storehouse has the daily record hold function to each URL request, is used for preserving url list and parameter list in system journal;
Use-case upgrades engine, be used for the described system journal of automatic scan and analyze, thereby obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter;
The use-case storehouse is used for preserving described use-case template; And
The conditional parameter storehouse is for preserving described conditional parameter and asking with the corresponding described CGI of described conditional parameter.
2. the case maintenance module be used to the test case that the WAP system is provided as claimed in claim 1 is characterized in that, described use-case upgrades engine and termly described system journal scanned and analyzes automatically by the automatic scan script.
3. the case maintenance method for the test case that the WAP system is provided is characterized in that, described case maintenance method is used for preserving use-case and automatic interpolation use-case, and wherein, described case maintenance method comprises:
The automatic scanning system daily record is also analyzed, with obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter, wherein, preserve url list and parameter list in the described system journal;
Described use-case template is saved to the use-case storehouse; And
Described conditional parameter and described CGI request are saved to the conditional parameter storehouse.
4. the case maintenance method be used to the test case that the WAP system is provided as claimed in claim 3, it is characterized in that, described automatic scanning system daily record is also analyzed, and further comprises with the step of obtaining described use-case template, described conditional parameter and described CGI request:
Scan described system journal termly and analyze by the automatic scan script;
Scan the url list in the described system journal, analyze parameter name and corresponding parameters value during each CGI asks in each URL request in the described url list, calculate and preserve the different numbers that each CGI asks corresponding parameter and the corresponding value of described parameter, thereby obtain the parameter information of each CGI request;
According to the parameter information of each CGI request, determine that it is that conditional parameter also is non-conditional parameter that each CGI asks corresponding parameter;
Rescan described url list, remove the corresponding value of conditional parameter of the inside in each URL request, and intactly keep non-conditional parameter, thereby obtain a new URL template, and be saved in the URL template list;
The described URL template of tabulate statistics to be obtaining the number of calling of each class URL template, and please it be saved in the tabulation of URL template recalls information; And
Setting threshold and relatively each class URL template call number and described threshold value, as described the URL template call number above described threshold value, with described URL template as the use-case template.
5. a WAP system automation test macro is characterized in that, described WAP system automation test macro comprises:
The case maintenance module is used for preserving use-case and adds use-case automatically;
The automatic management platform is used for adding test assignment thereon;
Use-case is carried out engine, obtains described test assignment, and obtains the use-case ID in the described test assignment;
Use-case generates engine, obtain described use-case ID, and from described case maintenance module, find out corresponding use-case template and the configuration mode of conditional parameter, generate a complete URL request then, and return to use-case and carry out engine, wherein said use-case is carried out and is called testing tool and simulation transmission solicit operation after engine receives described URL request, thereby obtains the request results picture;
Picture checks engine, according to the similarity algorithm of configuration with to described request as a result picture and standard use-case as a result picture carry out the comparison of similarity, thereby generation test result and described test result fed back to described automatic management platform.
6. WAP system automation test macro as claimed in claim 5 is characterized in that, described case maintenance module comprises:
User's Request Log storehouse has the daily record hold function to each URL request, to preserve url list and parameter list in system journal;
Use-case upgrades engine, and the described system journal of automatic scan is also analyzed, with obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter;
The use-case storehouse is used for preserving described use-case module; And
The conditional parameter storehouse is for preserving described conditional parameter and asking with the corresponding described CGI of described conditional parameter.
7. a WAP system automation method of testing is characterized in that, described WAP system automation method of testing comprises:
Add test assignment at the automatic management platform;
Utilize use-case to carry out engine and obtain described test assignment, and obtain the use-case ID in the described test assignment, and send it to use-case generation engine;
Utilize described use-case to generate engine according to described use-case ID, from the case maintenance module, find out corresponding use-case template and the configuration mode of conditional parameter, thereby generate a complete URL request, and return to described use-case execution engine;
Described use-case is carried out and is called testing tool and simulation transmission solicit operation after engine receives described URL request, thereby obtains the request results picture;
Utilize picture to check engine, according to the similarity algorithm of configuration with to described request as a result picture and standard use-case as a result picture carry out the comparison of similarity, thereby generation test result and described test result fed back to described automatic management platform.
8. WAP system automation method of testing as claimed in claim 7 is characterized in that, described case maintenance module is used for automatic the preservation and the interpolation use-case, and described case maintenance module is preserved automatically and the flow process of interpolation use-case comprises:
The automatic scanning system daily record is also analyzed, with obtain use-case template, conditional parameter and with the corresponding CGI request of described conditional parameter, wherein, preserve url list and parameter list in the described system journal;
Described use-case template is saved to the use-case storehouse; And
Described conditional parameter and described CGI request are saved to the conditional parameter storehouse.
9. WAP system automation method of testing as claimed in claim 8 is characterized in that, described automatic scanning system daily record is also analyzed, and comprises with the step of obtaining described use-case template, described conditional parameter and described CGI request:
Scan described system journal termly and analyze by the automatic scan script;
Scan the url list in the described system journal, analyze parameter name and corresponding parameters value during each CGI asks in each URL request in the described url list, calculate and preserve the different numbers that each CGI asks corresponding parameter and the corresponding value of described parameter, thereby obtain the parameter information of each CGI request;
According to the parameter information of each CGI request, determine that it is that conditional parameter also is non-conditional parameter that each CGI asks corresponding parameter;
Rescan described url list, remove the corresponding value of conditional parameter of the inside in each URL request, and intactly keep non-conditional parameter, thereby obtain a new URL template, and be saved in the URL template list;
The described URL template of tabulate statistics to be obtaining the number of calling of each class URL template, and please it be saved in the tabulation of URL template recalls information; And
Setting threshold and relatively each class URL template call number and described threshold value, as described the URL template call number above described threshold value, with described URL template as the use-case template.
10. WAP system automation method of testing as claimed in claim 7 is characterized in that described testing tool comprises the 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 true CN103313289A (en) 2013-09-18
CN103313289B 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)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104657639A (en) * 2015-02-02 2015-05-27 中国科学院数据与通信保护研究教育中心 Test method and system of operation system identity authentication mechanism
CN105335278A (en) * 2014-06-16 2016-02-17 阿里巴巴集团控股有限公司 Testing method and device
CN106294151A (en) * 2016-08-09 2017-01-04 合智能科技(深圳)有限公司 Daily record method of testing and device
CN107040504A (en) * 2016-02-04 2017-08-11 北京京东尚科信息技术有限公司 Method of testing and device
CN107102941A (en) * 2017-03-30 2017-08-29 腾讯科技(深圳)有限公司 The generation method and device of a kind of test case
CN108809755A (en) * 2018-05-18 2018-11-13 烽火通信科技股份有限公司 The home gateway automatic test approach and system of compatible command row and WEB interface
CN109150643A (en) * 2017-06-16 2019-01-04 阿里巴巴集团控股有限公司 A kind of business processing method for detecting abnormality and device
CN109298994A (en) * 2017-07-24 2019-02-01 中国移动通信集团公司 A kind of script records, method for testing software and equipment
CN110515834A (en) * 2019-07-26 2019-11-29 Oppo广东移动通信有限公司 Interface test method, device, mobile terminal and storage medium
CN110830330A (en) * 2019-12-06 2020-02-21 浙江中控技术股份有限公司 Firewall testing method, device and system
CN111083007A (en) * 2019-11-21 2020-04-28 京信通信系统(中国)有限公司 Test method, test device, computer equipment and storage medium
CN111782546A (en) * 2020-07-23 2020-10-16 北京斗米优聘科技发展有限公司 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 (3)

* 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
US20110276834A1 (en) * 2010-05-06 2011-11-10 Salesforce.Com, Inc. Techniques for testing computer readable code

Patent Citations (3)

* 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
US20110276834A1 (en) * 2010-05-06 2011-11-10 Salesforce.Com, Inc. Techniques for testing computer readable code

Cited By (20)

* 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
CN104657639A (en) * 2015-02-02 2015-05-27 中国科学院数据与通信保护研究教育中心 Test method and system of operation system identity authentication mechanism
CN107040504B (en) * 2016-02-04 2020-05-01 北京京东尚科信息技术有限公司 Test method and device
CN107040504A (en) * 2016-02-04 2017-08-11 北京京东尚科信息技术有限公司 Method of testing and device
CN106294151A (en) * 2016-08-09 2017-01-04 合智能科技(深圳)有限公司 Daily record method of testing and device
CN106294151B (en) * 2016-08-09 2019-02-12 合一智能科技(深圳)有限公司 Log test method and device
CN107102941A (en) * 2017-03-30 2017-08-29 腾讯科技(深圳)有限公司 The generation method and device of a kind of test case
CN107102941B (en) * 2017-03-30 2021-01-08 腾讯科技(深圳)有限公司 Test case generation method and device
CN109150643A (en) * 2017-06-16 2019-01-04 阿里巴巴集团控股有限公司 A kind of business processing method for detecting abnormality 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
CN108809755A (en) * 2018-05-18 2018-11-13 烽火通信科技股份有限公司 The home gateway automatic test approach and system of compatible command row and WEB interface
CN110515834A (en) * 2019-07-26 2019-11-29 Oppo广东移动通信有限公司 Interface test method, device, mobile terminal and storage medium
CN110515834B (en) * 2019-07-26 2023-11-10 Oppo广东移动通信有限公司 Interface testing method and device, mobile terminal and storage medium
CN111083007A (en) * 2019-11-21 2020-04-28 京信通信系统(中国)有限公司 Test method, test device, computer equipment and storage medium
CN111083007B (en) * 2019-11-21 2022-07-29 京信网络系统股份有限公司 Test method, test device, computer equipment and storage medium
CN110830330A (en) * 2019-12-06 2020-02-21 浙江中控技术股份有限公司 Firewall testing method, device and system
CN111782546A (en) * 2020-07-23 2020-10-16 北京斗米优聘科技发展有限公司 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

Also Published As

Publication number Publication date
CN103313289B (en) 2016-05-11

Similar Documents

Publication Publication Date Title
CN103313289A (en) Wap system automatic test system and method
US9521104B2 (en) Outgoing communications inventory
CN113254466B (en) Data processing method and device, electronic equipment and storage medium
CN101183987B (en) Monitoring performance of dynamic web content applications
US20160162470A1 (en) Semantic Application Logging and Analytics
US9910858B2 (en) System and method for providing contextual analytics data
US11539590B2 (en) Detect impact of network maintenance in software defined infrastructure
CN108073506B (en) Test method and device
CN110381101B (en) API gateway control system, control method, equipment and medium
US20130159529A1 (en) Master data management system for monitoring cloud computing
CN103905379A (en) Method for identifying internet users and device thereof
CN104899134A (en) Automatic domain name registration server testing system and method
CN110147327B (en) Multi-granularity-based web automatic test management method
Chaturvedi et al. Service evolution analytics: change and evolution mining of a distributed system
CN112468840B (en) Tamper-proof system and method for third-party EPG (electronic program guide) server in IPTV (Internet protocol television) system
CN116069838A (en) Data processing method, device, computer equipment and storage medium
CN103970773B (en) A kind of method for updating pages and device of webpage
CN104111997A (en) Information display method, device and system based on browser client
CN110061864B (en) Method and system for automatically verifying domain name configuration
CN113672497A (en) Method, device and equipment for generating non-buried point event and storage medium
CN111026631B (en) Automatic interface detection method, device and server
CN113837870A (en) Financial risk data approval method and device
CN114745146A (en) Skip interception method and device, readable storage medium and equipment
CN111159988A (en) Model processing method and device, computer equipment and storage medium
CN108875070B (en) Method, equipment and system for setting message-leaving type web page

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
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.