CN109766279A - Test method and device - Google Patents

Test method and device Download PDF

Info

Publication number
CN109766279A
CN109766279A CN201910033053.6A CN201910033053A CN109766279A CN 109766279 A CN109766279 A CN 109766279A CN 201910033053 A CN201910033053 A CN 201910033053A CN 109766279 A CN109766279 A CN 109766279A
Authority
CN
China
Prior art keywords
search
condition
tested
result
reading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910033053.6A
Other languages
Chinese (zh)
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.)
FUTURE TV Co Ltd
Original Assignee
FUTURE TV 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 FUTURE TV Co Ltd filed Critical FUTURE TV Co Ltd
Priority to CN201910033053.6A priority Critical patent/CN109766279A/en
Publication of CN109766279A publication Critical patent/CN109766279A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present application provides a kind of test method and device.This method comprises: control objective browser reads a search condition from the condition database including multiple search conditions, and the searching request generated according to the search condition of reading is sent to WEB system to be tested;Receive the actual search results corresponding with received searching request that the WEB system to be tested returns;Actual search results corresponding with the search condition of reading are compared with preset search result, obtain comparing result, to complete the test to WEB systematic search function to be tested.Automatic test can be carried out to the function of search of WEB system to be tested based on pre-set search condition, preset search result through the above way, avoid consuming a large amount of time cost and human cost.

Description

Test method and device
Technical field
This application involves field of computer technology, in particular to a kind of test method and device.
Background technique
Function of search is the necessary functions of most WEB systems, in order to guarantee the correctness of function of search, in WEB system Before system comes into operation, tester needs comprehensively to test function of search.Current test mode are as follows: tester Real user operation is simulated, inputs various search conditions, and verified one by one to a large amount of search result.Although which can To realize the test to function of search, but a large amount of time cost and human cost can be consumed.
Summary of the invention
In order to overcome above-mentioned deficiency in the prior art, the embodiment of the present application be designed to provide a kind of test method and Device can carry out certainly the function of search of WEB system to be tested according to pre-set search condition, preset search result Dynamicization test, can largely reduce the workload of tester, avoid consuming a large amount of time cost and human cost.
In a first aspect, the embodiment of the present application provides a kind of test method, comprising:
Control objective browser from include multiple search conditions condition database in read a search condition, and by root WEB system to be tested is sent to according to the searching request that the search condition of reading generates;
Receive the actual search results corresponding with received searching request that the WEB system to be tested returns;
Actual search results corresponding with the search condition of reading are compared with preset search result, obtain comparison knot Fruit, to complete the test to WEB systematic search function to be tested.
Optionally, in the embodiment of the present application, the preset search result includes a plurality of first data, the actual search As a result include a plurality of second data, it is described by actual search results corresponding with the search condition of reading and preset search result into Row comparison, obtains comparing result, comprising:
Obtain the condition identity of the search condition read;
Preset search result corresponding with the search condition read is obtained according to the condition identity;
By every second data and corresponding first data in the preset search result in the actual search results It compares, obtains that every second data comparison is correct or the incorrect comparing result of comparison.
Optionally, in the embodiment of the present application, described by actual search results corresponding with the search condition of reading and pre- If search result compares, after obtaining comparing result, the method also includes:
Judge whether all search conditions in the condition database were read by the objective browser;
If it is not, then going to step: control objective browser is read from the condition database including multiple search conditions One search condition, and the searching request generated according to the search condition of reading is sent to WEB system to be tested.
Optionally, in the embodiment of the present application, the method also includes:
Successively regard each browser in multiple browsers as the objective browser, with through different browsers to described The function of search of WEB system to be tested is tested.
Optionally, in the embodiment of the present application, the method also includes:
The condition database is updated according to the update operation received.
Second aspect, the embodiment of the present application also provide a kind of test device, comprising:
Condition read module reads one from the condition database including multiple search conditions for controlling objective browser A search condition, and the searching request generated according to the search condition of reading is sent to WEB system to be tested;
Receiving module, for receiving actually the searching corresponding with received searching request of the WEB system return to be tested Hitch fruit;
Contrast module, for carrying out pair actual search results corresponding with the search condition of reading and preset search result Than comparing result being obtained, to complete the test to WEB systematic search function to be tested.
Optionally, in the embodiment of the present application, the preset search result includes a plurality of first data, the actual search As a result include a plurality of second data, the contrast module by actual search results corresponding with the search condition of reading and preset search Hitch fruit compares, and the mode for obtaining comparing result includes:
Obtain the condition identity of the search condition read;
Preset search result corresponding with the search condition read is obtained according to the condition identity;
By every second data and corresponding first data in the preset search result in the actual search results It compares, obtains that every second data comparison is correct or the incorrect comparing result of comparison.
Optionally, in the embodiment of the present application, described device further include:
Judgment module, for judging all search conditions in the condition database whether by the objective browser It read;
If it is not, the condition read module then controls objective browser from the condition data including multiple search conditions again A search condition is read in library, and the searching request generated according to the search condition of reading is sent to WEB system to be tested.
Optionally, in the embodiment of the present application, the condition read module is also used to each of multiple browsers are clear Device of looking at successively is used as the objective browser, to survey through function of search of the different browsers to the WEB system to be tested Examination.
Optionally, in the embodiment of the present application, described device further include:
Update module, for being updated according to the update operation received to the condition database.
In terms of existing technologies, the application has the advantages that
The embodiment of the present application provides a kind of test method and device.It is read from condition database by objective browser first A search condition is taken, generates searching request corresponding with the search condition, and the searching request is sent to WEB system to be tested System.Then WEB system to be tested is received according to the actual search results returned after the above-mentioned searching request search received.Finally Then by comparing actual search results corresponding with the search condition of reading and preset search result, comparison knot can be obtained Fruit.By the above-mentioned means, carrying out one to the function of search of WEB system to be tested using objective browser and a search condition Secondary test, repeats the above process, and can repeatedly be tested.Since entire test process is automation process, thus can pole The earth saves human cost and time cost, and can avoid when artificial contrast obtains comparing result due to certain disturbing factors Influence cause the reliability of comparing result low, simultaneously because stochastic inputs when search condition is not manual testing, thus Aforesaid way also has the characteristics that search condition coverage is high.
For enable application above objects, features, and advantages be clearer and more comprehensible, the application preferred embodiment is cited below particularly, and Cooperate appended attached drawing, is described in detail below.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the block diagram of electronic equipment provided by the embodiments of the present application.
Fig. 2 is one of the flow diagram of test method provided by the embodiments of the present application.
Fig. 3 is test result schematic diagram provided by the embodiments of the present application.
Fig. 4 is the two of the flow diagram of test method provided by the embodiments of the present application.
Fig. 5 is the three of the flow diagram of test method provided by the embodiments of the present application.
Fig. 6 is one of the block diagram of test device provided by the embodiments of the present application.
Fig. 7 is the two of the block diagram of test device provided by the embodiments of the present application.
Icon: 100- electronic equipment;110- memory;120- storage control;130- processor;200- test device; 205- update module;210- condition read module;220- receiving module;230- contrast module;240- judgment module.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Ground description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.Usually exist The component of the embodiment of the present application described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.Cause This, is not intended to limit claimed the application's to the detailed description of the embodiments herein provided in the accompanying drawings below Range, but it is merely representative of the selected embodiment of the application.Based on embodiments herein, those skilled in the art are not being done Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.Meanwhile the application's In description, term " first ", " second " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Since the frequency of use of the function of search of WEB (webpage) system is very high, it is come into operation in WEB system Before, it needs to carry out function of search whole tests.Before present inventor proposes the technical solution in the embodiment of the present application, The mode of manual testing is usually used at present.However be when manual testing by tester's stochastic inputs search condition at that time, Tester can't fully take into account the search condition used in various situations, therefore search condition used in test can be deposited In the situation that coverage is inadequate.In the corresponding actual search results of the search condition that obtains be manually entered, and pass through people The workload of the mode that work compares one by one, tester is huge, in this case, along with the influence of other disturbing factors, The correctness for the comparing result that artificial contrast obtains is not can guarantee.
For defect present in above scheme, be inventor being obtained after practicing and carefully studying as a result, Therefore, the discovery procedure of the above problem and the solution that hereinafter the embodiment of the present application is proposed regarding to the issue above, all It should be the contribution that inventor makes the application during the application.
Fig. 1 is please referred to, Fig. 1 is the block diagram of electronic equipment 100 provided by the embodiments of the present application.The embodiment of the present application Described in electronic equipment 100 may be, but not limited to, computer, server etc..As shown in Figure 1, the electronic equipment 100 includes: Memory 110, storage control 120, processor 130 and test device 200.
It is directly or indirectly electrically connected between the memory 110, storage control 120 and each element of processor 130, To realize the transmission or interaction of data.For example, these elements can pass through one or more communication bus or signal wire between each other It realizes and is electrically connected.Test device 200 is stored in memory 110, the test device 200 includes at least one can be with software Or the form of firmware (firmware) is stored in the software function module in the memory 110.The processor 130 passes through fortune The row software program and module that are stored in memory 110, such as the test device 200 in the embodiment of the present application, thereby executing Various function application and data processing, i.e. test method in realization the embodiment of the present application.
Wherein, the memory 110 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..Wherein, memory 110 is for storing program, the processor 130 after receiving and executing instruction, Execute described program.The processor 130 and other possible components can control the access of memory 110 in the storage It is carried out under the control of device 120.
The processor 130 may be a kind of IC chip, the processing capacity with signal.Above-mentioned processor 130 can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc..It can also be digital signal processor (DSP), specific integrated circuit (ASIC), scene Programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware group Part.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present application.General processor can be with It is that microprocessor or the processor are also possible to any conventional processor etc..
It is appreciated that structure shown in FIG. 1 is only to illustrate, electronic equipment 100 may also include it is more than shown in Fig. 1 or Less component, or with the configuration different from shown in Fig. 1.Each component shown in Fig. 1 can using hardware, software or its Combination is realized.
In the embodiment of the present embodiment, where the electronic equipment 100 and WEB system to be tested for being tested Equipment can be the same equipment, or different equipment.
Referring to figure 2., Fig. 2 is one of the flow diagram of test method provided by the embodiments of the present application.The method is answered For the electronic equipment 100.Condition database and at least one browser are stored in the electronic equipment 100.Below to survey The detailed process of method for testing is described in detail.
Step S110, control objective browser read a searching bar from the condition database including multiple search conditions Part, and the searching request generated according to the search condition of reading is sent to WEB system to be tested.
In the present embodiment, the file after browser parameters can be stored in the electronic equipment 100, need using When certain browser, usable WebDriver is called.So that entire automatic test course is directly transported in a browser Row, just as being done real user, is tested from the angle of terminal user.When starting test, can control selected Browser (i.e. objective browser) reads a search condition from pre-generated condition database, then the objective browser Searching request is generated according to the search condition of reading, and the searching request is sent to WEB system to be tested.Wherein, WebDriver is the tool for being used to carry out web automatic test.
Alternatively it is also possible to directly read a search condition, then the search condition is sent to objective browser, target The searching request generated according to the search condition is sent to WEB system to be tested again by browser.
Optionally, in the embodiment of the present embodiment, this search condition being read be can be clear with the target In the corresponding situation of device of looking at, the search condition that was not read;It is also possible in situation corresponding with target browsing, The search condition being read.Preferably, to avoid passing through the same search condition of the same browser to WEB system to be tested Repeatedly, this search condition being read is the search that was not read in situation corresponding with the objective browser for test Condition.
Optionally, as an implementation, described search condition database can be EXCEL table, when testing, Search condition in the EXCEL table is then used as the input source of function of search.As a result, by (searching for test script and data Condition) separation, the tissue and execution entirely tested flexibly can be managed and configured, while enhance answering for test script The property used.
Step S120 receives the actual search knot corresponding with received searching request that the WEB system to be tested returns Fruit.
In the present embodiment, WEB system to be tested is after receiving described search request, according to the searching request at itself Including mass data in search with the search ask corresponding data, and data conduct corresponding with the searching request is actually searched Hitch fruit returns.In this process, WEB system has used the function of search of itself.
Step S130 compares actual search results corresponding with the search condition of reading with preset search result, Comparing result is obtained, to complete the test to WEB systematic search function to be tested.
In the present embodiment, after reading search condition, it can get preset search result corresponding with the search condition.So Afterwards after receiving actual search results corresponding with the search condition of reading, it can be searched by comparing actual search results and presetting Hitch fruit obtains comparing result.That is, having obtained this search by objective browser and the search condition of reading to WEB system The test result of functional test.Due to this result is that automatic comparison obtained, opposite artificial contrast obtains the mode of result For, it is ensured that the accuracy of result.Wherein, when preset search result is design search condition, it is contemplated that the search that can be obtained As a result.
In an embodiment of the present embodiment, preset search result corresponding with each search condition be can store In condition database, and it is one-to-one relationship with corresponding search condition.When reading search condition, can read simultaneously pair The preset search answered is as a result, be convenient for Comparative result.It may include a plurality of first data, actual search knot in preset search result It may include a plurality of second data in fruit, the comparing result includes that every second data comparison is correct or the incorrect comparison of comparison As a result.By being compared the first data, the second data one by one, correct or incorrect pair of every second data comparison is obtained Compare result.For example, there is the first data 1,2,3, then the first data 1 are compared with the second data 1 for the second data 1,2,3, will First data 2 are compared with the second data 2, and the first data 3 are compared with the second data 3.
It, can also will preset search result corresponding with each search condition in the another embodiment of the present embodiment It is stored in result database, can guarantee mark of having ready conditions in condition database and result database.When reading search condition, The condition identity of the search condition of reading can be obtained simultaneously, then according to the search condition mark in the result database into Row is searched, and preset search result corresponding with the search condition read is obtained.The preset search result includes a plurality of first number According to the actual search results include a plurality of second data.By being compared the first data, the second data one by one, obtain The correct or incorrect comparing result of every second data comparison.
It wherein, may include multiple branch datas in the second data of single when the number of pages of actual search results is more, it is this In the case of, include superposition symbol in actual search results, is i.e. actually includes a plurality of data in certain the second data.When comparing, It needs for all information in second data to be compared with corresponding first data.As an example, being directed to some search The test result obtained after condition test can be as shown in Figure 3.
By step S110~step S130, the achievable objective browser that once passes through is based on a search condition to WEB The test of the function of search of system.Repeat step S110~step S130, can the function of search to WEB system repeatedly surveyed Examination.Due to including search condition of a large amount of tester for the setting of various situations, we in the condition database Search condition used in case has the characteristics that multifarious.
As an implementation, Python+Selenium realization can be used in above-mentioned test.Python is one and possesses by force Big scalability, supports Object-Oriented Programming, high-level programming language easy to maintain at portability.Selenium is based on Javascript and the true operation for carrying out analog subscriber in conjunction with its WebDriver have the ability of processing Ajax well, can transport Row is on any browser for supporting JavaScript.Python can be used to write for script, and other programmings also can be used Language is write, and since Python has the characteristics that light, quick easy to get started, is pressed for time in test assignment, the feelings of task weight It is more convenient to use under condition, thus uses Python in present embodiment.
This programme uses the design method of data-driven and modular event driven, can tissue to test script and execution It is flexibly managed and is configured.Data-driven realizes the separation of data (i.e. search condition) and script, enhances script Reusability can directly read the search condition stored in condition database, the input source as function of search.Modular event driven is For a variety of necessary operations, it is packaged into individual script file, script file need to only be called for use-case itself, for example, Login module sends searching request to WEB system by calling the login module that can be directly logged onto WEB system.This programme pair After browser is parameterized, it is called using WebDriver.Entire automatic test course is directly transported in a browser Row, just as being done real user, is tested from the angle of terminal user.
Cumbersome search condition is manually entered and compares is obtained the process of comparing result by this programme, is converted to automation Mode carries out, and can greatly reduce the workload of tester, reduces time cost and human cost.And it is easy to use a large amount of Search condition the function of search of WEB system is tested, substantially increase the reliability of the function.
Referring to figure 4., Fig. 4 is the two of the flow diagram of test method provided by the embodiments of the present application.In step S130 Later, the method can also include step S140.
Step S140, judges whether all search conditions in the condition database are read by the objective browser It crosses.
In the present embodiment, using the same browser, primary survey is completed using a search condition After examination, it can determine whether the search condition in condition database at this time was all read.If so, indicating to have passed through a browsing Device and all search conditions are tested the function of search of WEB system, that is, primary complete test are completed, this In the case of, the search condition that can not used in the browser and condition database tests function of search.If it is not, indicating Primary complete test is not completed, in this case, then can go to step S110, to complete primary complete test. Optionally, go to step S110, the search condition of the search condition read again unread mistake when being corresponding above-mentioned browser.
As an implementation, all search conditions in the condition database are being read according to certain sequential storage When taking search condition, sequentially it is read out according to this.If reaching end as a result, then it represents that all search conditions were all read; If not reaching end, then it represents that there is part searches condition not to be read.Can be quickly judged by this way for some browsing In the case where device, if all search conditions were all read.
In the present embodiment, to guarantee that the function of search of WEB system is adapted to a variety of browsers, the electronic equipment The parametrization file of a variety of browsers is stored in 100.The method can also include: by each browser in multiple browsers It is used as the objective browser, successively to test through function of search of the different browsers to the WEB system to be tested.It can Selection of land replaces browser after completing primary complete test, again repeatedly step S110~step S140.
Referring to figure 5., Fig. 5 is the three of the flow diagram of test method provided by the embodiments of the present application.The method is also It may include step S105.
Step S105 is updated the condition database according to the update operation received.
In the present embodiment, the condition database can also be updated according to actual needs, to increase or modify Search condition, to improve the condition database.Thus search condition used in the present embodiment has a changeability, while by Include a large amount of search conditions in condition database, and search condition can be updated, therefore used in the present embodiment Search condition also has diversity.Accordingly, corresponding to update preset search result after being updated to search condition.Due to Data are separated with script, therefore after being updated to search condition, do not need to carry out biggish change to script itself, can be into The workload of one step reduction tester.
Fig. 6 is please referred to, Fig. 6 is one of the block diagram of test device 200 provided by the embodiments of the present application.The test Device 200 may include condition read module 210, receiving module 220 and contrast module 230.
The condition read module 210, for controlling objective browser from the condition database including multiple search conditions One search condition of middle reading, and the searching request generated according to the search condition of reading is sent to WEB system to be tested.
In the present embodiment, the condition read module 210 is used to execute the step S110 in Fig. 2, about the condition The specific descriptions of read module 210 are referred to the description of step S110 in Fig. 2.
The receiving module 220, for receiving the corresponding with received searching request of the WEB system return to be tested Actual search results.
In the present embodiment, the receiving module 220 is used to execute the step S120 in Fig. 2, about the receiving module 220 specific descriptions are referred to the description of step S120 in Fig. 2.
The contrast module 230, for by actual search results corresponding with the search condition of reading and preset search knot Fruit compares, and obtains comparing result, to complete the test to WEB systematic search function to be tested.
In the present embodiment, the preset search result includes a plurality of first data, and the actual search results include more The second data of item, the contrast module 230 is by actual search results corresponding with the search condition of reading and preset search result It compares, the mode for obtaining comparing result includes:
Obtain the condition identity of the search condition read;
Preset search result corresponding with the search condition read is obtained according to the condition identity;
By every second data and corresponding first data in the preset search result in the actual search results It compares, obtains that every second data comparison is correct or the incorrect comparing result of comparison.
In the present embodiment, the contrast module 230 is used to execute the step S130 in Fig. 2, about the contrast module 230 specific descriptions are referred to the description of step S130 in Fig. 2.
Fig. 7 is please referred to, Fig. 7 is the two of the block diagram of test device 200 provided by the embodiments of the present application.The test Device 200 can also include judgment module 240.
The judgment module 240, for judging all search conditions in the condition database whether by the mesh Mark browser was read.
If it is not, the condition read module 210 then controls objective browser from the condition including multiple search conditions again A search condition is read in database, and the searching request generated according to the search condition of reading is sent to WEB to be tested System.
In the present embodiment, the judgment module 240 is used to execute the step S140 in Fig. 4, about the judgment module 240 specific descriptions are referred to the description of step S140 in Fig. 4.
In the present embodiment, the condition read module 210 is also used to each browser in multiple browsers successively As the objective browser, to be tested through function of search of the different browsers to the WEB system to be tested.
Referring once again to Fig. 7, the test device 200 can also include update module 205.
The update module 205, for being updated according to the update operation received to the condition database.
In the present embodiment, the update module 205 is used to execute the step S105 in Fig. 5, about the update module 205 specific descriptions are referred to the description of step S105 in Fig. 5.
The embodiment of the present application also provides a kind of readable storage medium storing program for executing, and executable calculating is stored on the readable storage medium storing program for executing Machine instruction, realizes the test method when the executable computer instruction is executed by processor.
It will be understood by those skilled in the art that the embodiment of the present application can provide as method, apparatus or computer program production Product.Therefore, in terms of the embodiment of the present application can be used complete hardware embodiment, complete software embodiment or combine software and hardware Embodiment form.Moreover, it wherein includes computer available programs generation that the embodiment of the present application, which can be used in one or more, The meter implemented in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of code The form of calculation machine program product.
The embodiment of the present application is referring to the method, equipment (system) and computer program product according to the embodiment of the present application Flowchart and/or the block diagram describe.It should be understood that can be realized by computer program instructions in flowchart and/or the block diagram The combination of process and/or box in each flow and/or block and flowchart and/or the block diagram.It can provide these calculating Processing of the machine program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices Device is to generate a machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute For realizing the function of being specified in one or more flows of the flowchart and/or one or more blocks of the block diagram Device.
In conclusion the embodiment of the present application provides a kind of test method and device.Pass through objective browser first from condition A search condition is read in database, generates searching request corresponding with the search condition, and the searching request is sent to WEB system to be tested.Then WEB system to be tested is received actually to be searched according to what is returned after the above-mentioned searching request search received Hitch fruit.It is last then by the way that actual search results corresponding with the search condition of reading and preset search result are compared, Comparing result can be obtained.By the above-mentioned means, being searched using objective browser and a search condition to WEB system to be tested Suo Gong can be carried out primary test, repeat the above process, and can repeatedly be tested.Since entire test process is to automate Journey, thus can greatly save human cost and time cost, and can avoid when artificial contrast obtains comparing result due to The influence of certain disturbing factors causes the reliability of comparing result low, simultaneously because random when search condition is not manual testing Input, thus aforesaid way also has the characteristics that search condition coverage is high.
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this field For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.

Claims (10)

1. a kind of test method characterized by comprising
It controls objective browser and reads a search condition from the condition database including multiple search conditions, and will be according to reading The searching request that the search condition taken generates is sent to WEB system to be tested;
Receive the actual search results corresponding with received searching request that the WEB system to be tested returns;
Actual search results corresponding with the search condition of reading are compared with preset search result, obtain comparing result, To complete the test to WEB systematic search function to be tested.
2. the method according to claim 1, wherein the preset search result includes a plurality of first data, institute Stating actual search results includes a plurality of second data, described by actual search results corresponding with the search condition of reading and default Search result compares, and obtains comparing result, comprising:
Obtain the condition identity of the search condition read;
Preset search result corresponding with the search condition read is obtained according to the condition identity;
Every second data in the actual search results are carried out with the first data corresponding in the preset search result Comparison, obtains that every second data comparison is correct or the incorrect comparing result of comparison.
3. the method according to claim 1, wherein described by actual search corresponding with the search condition of reading As a result it is compared with preset search result, after obtaining comparing result, the method also includes:
Judge whether all search conditions in the condition database were read by the objective browser;
If it is not, then going to step: control objective browser reads one from the condition database including multiple search conditions Search condition, and the searching request generated according to the search condition of reading is sent to WEB system to be tested.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
Successively regard each browser in multiple browsers as the objective browser, with through different browsers to described to be measured The function of search of examination WEB system is tested.
5. the method according to claim 1, wherein the method also includes:
The condition database is updated according to the update operation received.
6. a kind of test device characterized by comprising
Condition read module is searched for controlling objective browser reading one from the condition database including multiple search conditions Rope condition, and the searching request generated according to the search condition of reading is sent to WEB system to be tested;
Receiving module, the actual search knot corresponding with received searching request returned for receiving the WEB system to be tested Fruit;
Contrast module, for actual search results corresponding with the search condition of reading to be compared with preset search result, Comparing result is obtained, to complete the test to WEB systematic search function to be tested.
7. device according to claim 6, which is characterized in that the preset search result includes a plurality of first data, institute Stating actual search results includes a plurality of second data, and the contrast module is by actual search knot corresponding with the search condition of reading Fruit and preset search result compare, and the mode for obtaining comparing result includes:
Obtain the condition identity of the search condition read;
Preset search result corresponding with the search condition read is obtained according to the condition identity;
Every second data in the actual search results are carried out with the first data corresponding in the preset search result Comparison, obtains that every second data comparison is correct or the incorrect comparing result of comparison.
8. device according to claim 6, which is characterized in that described device further include:
Judgment module, for judging whether all search conditions in the condition database are read by the objective browser It crosses;
If it is not, the condition read module is then controlled objective browser from the condition database including multiple search conditions again A search condition is read, and the searching request generated according to the search condition of reading is sent to WEB system to be tested.
9. device according to claim 8, which is characterized in that
The condition read module is also used to successively regard each browser in multiple browsers as the objective browser, To be tested through function of search of the different browsers to the WEB system to be tested.
10. device according to claim 6, which is characterized in that described device further include:
Update module, for being updated according to the update operation received to the condition database.
CN201910033053.6A 2019-01-14 2019-01-14 Test method and device Pending CN109766279A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910033053.6A CN109766279A (en) 2019-01-14 2019-01-14 Test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910033053.6A CN109766279A (en) 2019-01-14 2019-01-14 Test method and device

Publications (1)

Publication Number Publication Date
CN109766279A true CN109766279A (en) 2019-05-17

Family

ID=66453817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910033053.6A Pending CN109766279A (en) 2019-01-14 2019-01-14 Test method and device

Country Status (1)

Country Link
CN (1) CN109766279A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1761962A (en) * 2003-03-21 2006-04-19 国际商业机器公司 Real-time aggregation of unstructured data into structured data for SQL processing by a relational database engine
CN105989152A (en) * 2015-03-02 2016-10-05 深圳市腾讯计算机***有限公司 Search engine service quality monitoring methods, apparatus and system
US20160292242A1 (en) * 2015-04-06 2016-10-06 Adp, Llc Automatic verification of json data
CN108959067A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Test method, device and the computer readable storage medium of search engine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1761962A (en) * 2003-03-21 2006-04-19 国际商业机器公司 Real-time aggregation of unstructured data into structured data for SQL processing by a relational database engine
CN105989152A (en) * 2015-03-02 2016-10-05 深圳市腾讯计算机***有限公司 Search engine service quality monitoring methods, apparatus and system
US20160292242A1 (en) * 2015-04-06 2016-10-06 Adp, Llc Automatic verification of json data
CN108959067A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Test method, device and the computer readable storage medium of search engine

Similar Documents

Publication Publication Date Title
CN109960653A (en) Regression testing method, device, equipment and storage medium
CN104794057B (en) A kind of crossing event automated testing method and device
CN110413510B (en) Data processing method, device and equipment
CN109634837A (en) Automated testing method, device, equipment and storage medium
CN106326120B (en) Regression testing method and device for application software and electronic equipment
CN110046088A (en) A kind of interface test method, device and equipment
CN108681504A (en) Automated testing method, test server and computer readable storage medium
CN112433944A (en) Service testing method, device, computer equipment and storage medium
CN110032505A (en) Software quality determining device, software quality determine that method and software quality determine program
CN108629355A (en) Method and apparatus for generating workload information
CN110134598A (en) A kind of batch processing method, apparatus and system
CN110188793A (en) Data exception analysis method and device
CN109766279A (en) Test method and device
CN110874475A (en) Vulnerability mining method, vulnerability mining platform and computer readable storage medium
CN115098362B (en) Page test method, page test device, electronic equipment and storage medium
CN110413287A (en) The dispositions method and device of software
CN110287121A (en) A kind of test method and device automating use-case
CN112765041B (en) Game automation testing method and device and electronic equipment
CN109783713A (en) A kind of dynamic website classification method, system, equipment and medium
CN114416596A (en) Application testing method and device, computer equipment and storage medium
CN109144806A (en) A kind of function verification method and device of register transfer level circuit
CN111061258B (en) Function testing method and device based on train control system
CN107688539A (en) A kind of BMC Web test systems
CN113656313A (en) Automatic test processing method and device
CN106339797A (en) Point inspection data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190517