CN110321284A - Test data input method, device, computer equipment and storage medium - Google Patents

Test data input method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110321284A
CN110321284A CN201910475800.1A CN201910475800A CN110321284A CN 110321284 A CN110321284 A CN 110321284A CN 201910475800 A CN201910475800 A CN 201910475800A CN 110321284 A CN110321284 A CN 110321284A
Authority
CN
China
Prior art keywords
test
page
tested
control
test data
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
CN201910475800.1A
Other languages
Chinese (zh)
Other versions
CN110321284B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910475800.1A priority Critical patent/CN110321284B/en
Publication of CN110321284A publication Critical patent/CN110321284A/en
Application granted granted Critical
Publication of CN110321284B publication Critical patent/CN110321284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

This application involves a kind of test data input method, device, computer equipment and storage mediums.The described method includes: obtaining the page to be tested;Determining test file corresponding with the page to be tested;The script for traversing the page to be tested determines the corresponding control of the page to be tested;When the control is text-entry control, keyword associated with the text-entry control is inquired, and corresponding test data is searched from the test file according to the keyword;The test data found is filled to the page to be tested;The test data is used to carry out page test to the page to be tested.It can be improved the efficiency of inputting of test data using this method based on measuring technology.

Description

Test data input method, device, computer equipment and storage medium
Technical field
This application involves the field of test technology, more particularly to a kind of test data input method, device, computer equipment And storage medium.
Background technique
With the development of computer technology, more and more business can pass through operation system (including service customer end and industry Business server) Lai Shixian, for example service customer end is provided and is used to user, service server is as background process server.With The abundant and extension of business tine, it is often necessary to operation system is upgraded.In order to ensure the operation system function after upgrading The stabilization of energy, it is often necessary to the operation system after upgrading be tested, to determine the upgrade case of operation system.
When testing operation system, service customer end input test data need to be passed through.Traditional test data it is defeated Enter mode, generallys use the mode manually inputted.But it is defeated since type of transaction is many for the operation system for class of trading Enter data complexity, in transaction system front end page logging data, needs to expend a large amount of manpowers, cause quantity efficiency of inputting low.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of test that can be improved test data efficiency of inputting Data entry method, device, computer equipment and storage medium.
A kind of test data input method, which comprises
Obtain the page to be tested;
Determining test file corresponding with the page to be tested;
The script for traversing the page to be tested determines the corresponding control of the page to be tested;
When the control is text-entry control, keyword associated with the text-entry control is inquired, according to The keyword searches corresponding test data from the test file;
The test data found is filled to the page to be tested;The test data is used for described to be measured It tries the page and carries out page test.
A kind of test data input device, described device include:
Module is obtained, for obtaining the page to be tested;
Determining module, for determining test file corresponding with the page to be tested;
The determining module is also used to traverse the script of the page to be tested, determines the corresponding control of the page to be tested Part;
Searching module, for inquiring associated with the text-entry control when the control is text-entry control Keyword, corresponding test data is searched from the test file according to the keyword;
Module is filled, for filling the test data found to the page to be tested;The test data For carrying out page test to the page to be tested.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing Device performs the steps of when executing the computer program
Obtain the page to be tested;
Determining test file corresponding with the page to be tested;
The script for traversing the page to be tested determines the corresponding control of the page to be tested;
When the control is text-entry control, keyword associated with the text-entry control, and root are inquired Corresponding test data is searched from the test file according to the keyword;
The test data found is filled to the page to be tested;The test data is used for described to be measured It tries the page and carries out page test.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
Obtain the page to be tested;
Determining test file corresponding with the page to be tested;
The script for traversing the page to be tested determines the corresponding control of the page to be tested;
When the control is text-entry control, keyword associated with the text-entry control, and root are inquired Corresponding test data is searched from the test file according to the keyword;
The test data found is filled to the page to be tested;The test data is used for described to be measured It tries the page and carries out page test.
Above-mentioned test data input method, device, computer equipment and storage medium obtain corresponding with the page to be tested Test file, by traversing the script of the page to be tested, with the corresponding control of the determination page to be tested.When determining control is When text-entry control, then it can be searched from test file corresponding according to keyword associated with text input control Test data, and according to text input control, the test data found is filled to the page to be tested.In this way, passing through knowledge Control in the page not to be tested can detect the text-entry control that input test data are used in the page to be tested automatically, And corresponding test data is input to the page to be tested automatically, without being artificially manually entered, substantially increase test data Input efficiency.
Detailed description of the invention
Fig. 1 is the application scenario diagram of test data input method in one embodiment;
Fig. 2 is the flow diagram of test data input method in one embodiment;
Fig. 3 be in one embodiment when the control is text-entry control, according to the text-entry control phase Associated keyword, the flow diagram for the step of searching corresponding test data from the test file;
Fig. 4 is the structural block diagram of test data input device in one embodiment;
Fig. 5 is the structural block diagram of test data input device in another embodiment;
Fig. 6 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Test data input method provided by the present application, can be applied in application environment as shown in Figure 1.Wherein, eventually End 110 is communicated with service server 120 by network.Test equipment 130 is communicated with terminal 110 by network.It surveys Examination equipment 130 is communicated with service server 120 by network.Operation has service customer end, business client in terminal 110 End provides the page to be tested, and test equipment 130 is by executing above-mentioned test data input method for test data typing to be measured The page is tried, service customer end can test accordingly order according to Test data generation.Wherein, terminal 110 can be, but not limited to be Various personal computers, laptop, smart phone, tablet computer and portable wearable device, server 120 can be used The server cluster of independent server either multiple servers composition is realized.
In one embodiment, as shown in Fig. 2, providing a kind of test data input method, it is applied to Fig. 1 in this way In test equipment 130 for be illustrated, comprising the following steps:
S202 obtains the page to be tested.
Wherein, the page to be tested is transaction page to be tested provided by service customer end.In one embodiment, it surveys It tries equipment and obtains data inputting instruction, wherein data inputting instruction carries test address;Determine that test address is corresponding to be tested The page.Wherein, which can specifically have service customer end to be provided.
Wherein, test address is address (such as url, Uniform corresponding to front end page provided by operation system Resource Locator, uniform resource locator).Service customer end is to may operate at answering for terminal provided by operation system With program, user can open the corresponding page to be tested by service customer end, into operation system.
In one embodiment, staff can be used for the virtual push button of triggering testing action, test equipment by clicking The test instruction for carrying test address is generated according to the trigger action.Wherein, it is just pre-stored before test address can be, When needing to test, then directly acquires the test address and generate corresponding test instruction.Alternatively, test equipment can obtain user The test address of input, and generate corresponding test instruction.
In one embodiment, test equipment can directly acquire test address, when meeting test condition, automatically according to survey It tries address and generates test instruction.Wherein, the time interval that test condition specifically can be apart from last time test reaches preset duration Deng.
In one embodiment, test equipment specifically can be the test data composer of deployment on a computing device.
S204 determines test file corresponding with the page to be tested.
Wherein, test file is the file for testing the page to be tested, can specifically include multiple groups test cases.Every group Test cases all includes complete test data.Test file specifically can be text file, form document or PDF (Portable Document Format, portable document format) file etc., does not do the file format of test file at this It limits.
In one embodiment, test file can be pre-prepd for testing the excel data of operation system.Its In, operation system specifically can be service customer end and/or service server.When operation system need to dock new order type When, so that it may staging business system.Whether staff can update test file accordingly, steady to test updated operation system It is fixed and qualified.Test equipment is when receiving test instruction, so that it may search the test file being locally stored, or receive other surveys Try the test file that equipment is sent.
In one embodiment, shown in test file such as following table (1), the test data of every a line collectively constitutes a test Case.
Controlling value Case title Product type Sales Channel Quantity Rate
N bookAfund A TA0012 1250000 1.235
N bookBfund B TA0013 35000 2.3584
Y bookAandupdate A TA0014 25214141 5.681
Y bookAandCancel A TA0015 5412000 2.366
N bookCandReallocate C TA0016 1524000 3.652
Y bookCandReallocate D TA0017 1524000 3.652
Table (1)
S206 traverses the script of the page to be tested, determines the corresponding control of the page to be tested.
Wherein, control refers to the encapsulation to data and method, and different controls can be used for triggering different movements.It is to be tested The corresponding control of the page specifically can be text-entry control, button control, drop-down selection control, document uploading control or column Table control etc..
For example, text-entry control can be presented in the form of Text Entry, for inputting text;Button control can be with Occur in the form of virtual pattern, for jump page or executes corresponding movement;Drop-down selection control is more for pulling down display A option;Document uploading control is used for upper transmitting file;List control is presented in the form of list box, for showing list.
Specifically, after test equipment has determined the page to be tested, the script of the page to be tested can be traversed, searches control mark Know, to identify the control in the page to be tested.Wherein, control mark is used for unique identification control, specifically can be letter, word Symbol, number or figure etc..
For example, control mark A can be preset for identifying text-entry control in test equipment;Control identifies B and uses In labeled button control.So when traversing the script of the page to be tested, find control mark A, then illustrate to correspond to herein to Text Entry in test page can be used for filling test data.
S208 inquires keyword associated with text-entry control, and according to pass when control is text-entry control Keyword searches corresponding test data from test file.
Specifically, when the control that test equipment recognizes be text-entry control when, test equipment can further inquire with The associated keyword of the control.According to the keyword, test data corresponding with the keyword is searched from test file, The test data found is exactly for filling the data into text input control.
In one embodiment, when test equipment traverses the script of the page to be tested, searches control mark, text can be positioned The control of this input control identifies, and searches predetermined keyword from the neighbouring text that the control identifies.The default pass found Keyword is keyword associated with text input control.
For example, when it is " product type " that test equipment, which finds keyword associated with text-entry control, Correspondingly, test equipment can search test data corresponding with " product type " from test file.
It in one embodiment, can be successively by the survey in test file when test equipment is treated test page and tested Test data corresponding to examination case is input to the page to be tested.Namely point multiple groups test cases tests page to be tested respectively Face.For example, reference table (1), for the test cases of the third line, when test equipment find it is associated with text-entry control When keyword is " product type ", it is exactly " A " that test equipment, which finds test data corresponding with " product type ",.Work as test When equipment is treated test page by the test cases of the 6th row and tested, when test equipment is found and text-entry control When associated keyword is " product type ", test equipment finds test data corresponding with " product type " and is exactly “D”。
In one embodiment, test equipment can putting in order according to test cases, by multiple groups test cases Test data treats test page respectively and is repeatedly filled and tested.
S210 fills the test data found to the page to be tested;Test data is for treating test page progress Page test.
Specifically, the test data corresponding with text-entry control that test equipment can will be found, automatic filling is extremely In corresponding Text Entry, until completing the typing of all test datas in the page to be tested.Typing is to the page to be tested Test data carries out page test for treating test page, to determine whether the operation system after upgrading meets upgrade requirement.
Above-mentioned test data input method obtains test file corresponding with the page to be tested, to be tested by traversing The script of the page, with the corresponding control of the determination page to be tested.When determining control be text-entry control when, then can according to The associated keyword of text input control is searched corresponding test data from test file, and is inputted according to the text Control fills the test data found to the page to be tested.In this way, by identifying the control in the page to be tested, it can be certainly The dynamic text-entry control for detecting to be used for input test data in the page to be tested, and automatically input corresponding test data The input efficiency of test data is substantially increased without being artificially manually entered to the page to be tested.
In one embodiment, the step of determining the corresponding page to be tested in test address specifically includes: according to the survey Address is tried, determines corresponding login page;Obtain test account and corresponding account number cipher, and typing login page;Work as test After account and account number cipher pass through verifying, the page to be tested corresponding to test address is jumped to.
In one embodiment, login page and the page to be tested are provided by service customer end.Test equipment is according to survey After examination address determines corresponding login page, test account and corresponding account number cipher can be obtained, it automatically will test account and phase The account number cipher typing answered jumps to service customer end institute after testing account and account number cipher by verifying to login page The page to be tested provided.
In one embodiment, test equipment needs to carry out the verifying of user account and password before entering the page to be tested, The page to be tested provided by service customer end can just be entered after being only verified.
In one embodiment, the test equipment test address entrained according to data inputting instruction, determines by business visitor Login page provided by the end of family.When test equipment is determined that the current page is login page, pre-stored test is obtained Account and corresponding account number cipher.
Further, test equipment can traverse the script of login page, to position account input frame and Password Input frame.It surveys Account and corresponding account number cipher typing will can be tested to login page automatically by trying equipment, and test account and account according to input Number password generates account checking request.Account checking request can be sent to service server by test equipment, and service server is logical It crosses the test account prestored and account number cipher is verified, after being verified, feed back authorized order.Test equipment is according to authorization Instruction jumps to the page to be tested provided by service customer end.
In above-described embodiment, test equipment can determine the login page as provided by service customer end according to test address, And automatic input tests account and corresponding account number cipher.After the test account and account number cipher of typing are by verifying, jump To the page to be tested provided by service customer end.In this way, testing account and account number cipher by automatic input, it is not necessarily to user hand Dynamic input, substantially increases and treats the efficiency that test page is tested.
In one embodiment, test file includes multiple groups test cases.Step S208, that is, when control is that text is defeated When entering control, keyword associated with text-entry control is inquired, and is searched from test file accordingly according to keyword The step of test data, specifically includes:
S302 determines current test cases to be entered from test file.
In one embodiment, test equipment can putting in order according to test cases, by multiple groups test cases Test data treats test page respectively and carries out multiple data inputting and test.Test equipment can obtain current survey to be entered Try case.
S304 determines controlling value corresponding with test cases when control is text-entry control.
Wherein, controlling value is whether the current test cases of control is effectively worth, and controlling value specifically can be letter, number Word or character etc..Controlling value includes virtual value and invalid value.Wherein, virtual value indicates that the test cases is validity test case; Invalid value indicates that the test cases is invalid test cases.For example, settable " Y " is to have when controlling value includes " Y " and " N " Valid value, " N " are invalid value.
Validity test case refers to when treating test page and carrying out page test, the test cases be it is effective, can be with The page to be tested is tested by the test cases.Invalid test cases refers to when treating test page progress page test, is somebody's turn to do Test cases be it is invalid, this is to testing when the page to be tested carries out page test without using the test cases.
Specifically, test equipment can determine current test cases to be tested, when the control of identification is from test file When text-entry control, controlling value corresponding with test cases is determined.In one embodiment, test equipment is current in judgement Test cases when whether being effective case, can be determined by judging that corresponding controlling value is virtual value or invalid value.
S306, when determining controlling value is virtual value, then according to keyword associated with text-entry control, from test Corresponding test data is searched in case.
Specifically, when determining controlling value is virtual value, test equipment can be according to pass associated with text-entry control Keyword, searches corresponding test data from test cases, so by the test data automatic input in the test cases to In test page.
S308 then skips current test cases to be entered, continues to determine next group of test when controlling value is invalid value Whether the controlling value of case is virtual value.
Specifically, when controlling value is invalid value, test equipment then skips current test cases to be entered, continues true Whether the controlling value for fixing one group of test cases is virtual value.
In one embodiment, operation system can repeatedly be upgraded, and the tested concrete function of upgrading is different every time Sample.And it can be only a for the test file tested operation system.So, it can be stored in the test file Multiple groups are directed to the test data of different test purposes.Test equipment can be come by the way that controlling value corresponding to the test cases is arranged Determine the test data used needed for this test.
In one embodiment, the test cases used needed for this test in test file can be preset in test equipment Controlling value be virtual value, the controlling values of other test cases is invalid value.
In above-described embodiment, when the controlling value of test cases is virtual value, just according to associated with text-entry control Keyword, corresponding test data is searched from test cases.In this way, test equipment can treated by the way that controlling value is arranged When test page is tested, corresponding test cases can be determined according to controlling value, it is convenient and efficient.
In one embodiment, which further includes the steps that selecting test data, and the step is specific The following steps are included: when control is drop-down selection control, according to keyword associated with drop-down selection control, from test text Test data corresponding with keyword is searched in part;Drop-down selection control corresponds to multiple candidate items, chooses opposite with test data The candidate item answered, and the page to be tested is filled according to the candidate item chosen.
Specifically, when the control that test equipment recognizes be drop-down selection control when, test equipment can further determine that with The associated keyword of the control.According to the keyword, test data corresponding with the keyword is searched from test file. Drop-down selection control corresponds to more than one candidate item, and test equipment can choose candidate item corresponding with test data, and The page to be tested is filled according to the candidate item chosen.
In one embodiment, it when test equipment traverses the script of the page to be tested, searches control mark, can position down The control mark of selection control is drawn, and searches predetermined keyword from the neighbouring text that the control identifies.The default pass found Keyword is keyword associated with drop-down selection control.
For example, working as test when test equipment is treated test page by the test cases of the 6th row and tested Equipment is found with drop-down selection control associated keyword when being " product type ", and test equipment is found and " product type Number " corresponding test data is exactly " D ".And pulling down candidate item corresponding to selection control includes " A ", " B ", " C " and " D ", Test equipment can choose " D " option.
In above-described embodiment, when control is drop-down selection control, according to the associated keyword of drop-down selection control, Corresponding test data is searched from test file.Drop-down selection control corresponds to multiple candidate items, can choose and test data phase Corresponding candidate item, and the page to be tested is filled according to the candidate item chosen and substantially increases test without artificially manually selecting The efficiency of inputting of data.
In one embodiment, which further includes the step treated test page and carry out page test Suddenly, which specifically includes: determining in the page to be tested for triggering the test control of page test;When determining the page to be tested When having been filled with completion, nucleus formation tests instruction in the page of test control;It tests and instructs in response to the page, according to test data It treats test page and carries out page test.
Specifically, when test equipment identifies the control in the page to be tested, it can be identified and be determined for triggering page according to control The test control of face test.The test control specifically can be the button control for triggering page test instruction.When to be tested When the page has been filled with completion, test equipment can automatically generate the page test instruction for acting on test control.It is surveyed in response to the page Examination instruction, test equipment treat test page according to the data of filling and carry out page test.
In one embodiment, when the page to be tested is filled completion, test equipment analog nucleus formation is in the survey Control is tried from trigger action, corresponding page test instruction is generated according to the trigger action.In turn, test equipment can be submitted currently The test data of typing in the page to be tested.
In one embodiment, the service customer end run in test equipment can treat the test number of typing in test page According to business processing is carried out, processing result is obtained.Processing result and default result can be compared in test equipment, to determine business The upgrade case of system.
In above-described embodiment, when the test data typing in the page to be tested is completed, corresponding test can be automatically generated Instruction, and corresponding test action is executed automatically, page test is carried out to treat test page.In this way, it can be achieved that being recorded from data Enter the full-automation tested to the page, substantially increases the testing efficiency of page test.
In one embodiment, which further includes the steps that updating test file, and the step is specific It include: that test page progress page test test order generated is treated in acquisition;Determine order corresponding with test order Mark;Test file is updated according to order note identification.
Wherein, order note identification is for unique identification when time test test order generated.Specifically, which has Body can be order processing system, and service customer end specifically can be order processing client.Test equipment treats test page When carrying out page test, service customer end can test accordingly order and order note identification according to Test data generation.Test is set It is standby to obtain order note identification corresponding with the order, and the order note identification is accordingly added in test file.
In above-described embodiment, page test test order generated is carried out according to test page is treated, determines and tests The corresponding order note identification of order, may be updated test file according to order note identification, can safeguard and improve test file.
It should be understood that although each step in the flow chart of Fig. 2-3 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-3 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in figure 4, providing a kind of test data input device 400, comprising: obtain module 401, determining module 402, searching module 403 and filling module 404, in which:
Module 401 is obtained, for obtaining the page to be tested.
Determining module 402, for determining test file corresponding with the page to be tested.
Determining module 402 is also used to traverse the script of the page to be tested, determines the corresponding control of the page to be tested.
Searching module 403, for inquiring key associated with text-entry control when control is text-entry control Word, and corresponding test data is searched from test file according to keyword.
Module 404 is filled, the test data typing for will find to the page to be tested;Test data is used for to be measured It tries the page and carries out page test.
In one embodiment, it obtains module 401 and is also used to obtain data inputting instruction;Data inputting instruction carries test Address;Determine the corresponding page to be tested in test address.
In one embodiment, determining module 402 is also used to determine corresponding login page according to test address;It obtains Test account and corresponding account number cipher, and typing login page;After testing account and account number cipher by verifying, jump to To the page to be tested corresponding to test address.
In one embodiment, test file includes multiple groups test cases;Searching module 403 is also used to from test file In, determine current test cases to be entered;When control is text-entry control, control corresponding with test cases is determined Value;When determining controlling value is virtual value, then according to keyword associated with text-entry control, searched from test cases Corresponding test data;When controlling value is invalid value, then current test cases to be entered is skipped, continues to determine next group of survey Whether the controlling value for trying case is virtual value.
In one embodiment, searching module 403 is also used to select when control selects control for drop-down according to drop-down The associated keyword of control searches test data corresponding with keyword from test file.Drop-down selection control correspondence is more A candidate item;Filling module 404 is also used to choose candidate item corresponding with test data, and is filled according to the candidate item chosen The page to be tested.
In one embodiment, which further includes generation module 405 and test module 406, in which: Determining module 402 is also used to determine in the page to be tested for triggering the test control of page test.Generation module 405, is used for When determining that the page to be tested has been filled with completion, nucleus formation tests instruction in the page of test control.Test module 406 is used It is instructed in being tested in response to the page, test page is treated according to test data and carries out page test.
With reference to Fig. 5, in one embodiment, which further includes update module 407, in which: is obtained Module 401, which is also used to obtain, treats test page progress page test test order generated.Determining module 402 is also used to really Fixed order note identification corresponding with test order.Update module 407, for updating test file according to order note identification.
Above-mentioned test data input device obtains test file corresponding with the page to be tested, to be tested by traversing The script of the page, with the corresponding control of the determination page to be tested.When determining control be text-entry control when, then can according to The associated keyword of text input control is searched corresponding test data from test file, and is inputted according to the text Control fills the test data found to the page to be tested.In this way, by identifying the control in the page to be tested, it can be certainly The dynamic text-entry control for detecting to be used for input test data in the page to be tested, and automatically input corresponding test data The input efficiency of test data is substantially increased without being artificially manually entered to the page to be tested.
Specific about test data input device limits the limit that may refer to above for test data input method Fixed, details are not described herein.Modules in above-mentioned test data input device can fully or partially through software, hardware and its Combination is to realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with It is stored in the memory in computer equipment in a software form, in order to which processor calls the above modules of execution corresponding Operation.
In one embodiment, a kind of computer equipment is provided, which can be terminal or server, Internal structure chart can be as shown in Figure 6.The computer equipment includes processor, memory and the network connected by system bus Interface.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory of the computer equipment includes Non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer program.The memory Reservoir provides environment for the operation of operating system and computer program in non-volatile memory medium.The net of the computer equipment Network interface is used to communicate with external terminal by network connection.To realize a kind of survey when the computer program is executed by processor Try data entry method.
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, memory is stored with meter Calculation machine program, when computer program is executed by processor, so that the step of processor executes above-mentioned test data input method.This The step of locating test data input method can be the step in the test data input method of above-mentioned each embodiment.
In one embodiment, a kind of computer readable storage medium is provided, computer program, computer journey are stored with When sequence is executed by processor, so that the step of processor executes above-mentioned test data input method.Test data typing side herein The step of method, can be the step in the test data input method of above-mentioned each embodiment.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM in a variety of forms may be used , such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) are direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of test data input method, which comprises
Obtain the page to be tested;
Determining test file corresponding with the page to be tested;
The script for traversing the page to be tested determines the corresponding control of the page to be tested;
When the control is text-entry control, keyword associated with the text-entry control is inquired, and according to institute It states keyword and searches corresponding test data from the test file;
The test data found is filled to the page to be tested;The test data is used for the page to be tested Face carries out page test.
2. the method according to claim 1, wherein described obtain the page to be tested, comprising:
Obtain data inputting instruction;The data inputting instruction carries test address;
Determine the corresponding page to be tested in the test address.
3. according to the method described in claim 2, it is characterized in that, the corresponding page to be tested in the determination test address Face, comprising:
According to the test address, corresponding login page is determined;
Obtain test account and corresponding account number cipher, and login page described in typing;
After the test account and the account number cipher are by verifying, page to be tested corresponding to the test address is jumped to Face.
4. the method according to claim 1, wherein the test file includes multiple groups test cases;It is described to work as When the control is text-entry control, keyword associated with the text-entry control is inquired, and according to the key Word searches corresponding test data from the test file, comprising:
From the test file, current test cases to be entered is determined;
When the control is text-entry control, controlling value corresponding with the test cases is determined;
When determining the controlling value is virtual value, then according to keyword associated with the text-entry control, from described Corresponding test data is searched in test cases;
When the controlling value is invalid value, then the current test cases to be entered is skipped, continues to determine next group of test Whether the controlling value of case is virtual value.
5. the method according to claim 1, wherein the method also includes:
When the control is drop-down selection control, according to keyword associated with drop-down selection control, from the survey It tries to search test data corresponding with the keyword in file;
The drop-down selection control corresponds to multiple candidate items, chooses candidate item corresponding with the test data, and according to choosing In the candidate item fill the page to be tested.
6. method according to any one of claims 1 to 5, which is characterized in that the method also includes:
It determines in the page to be tested for triggering the test control of page test;
When determining that the page to be tested has been filled with completion, nucleus formation tests instruction in the page of the test control;
It tests and instructs in response to the page, page test is carried out to the page to be tested according to the test data.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
It obtains and page test test order generated is carried out to the page to be tested;
Determine order note identification corresponding with the test order;
The test file is updated according to the order note identification.
8. a kind of test data input device, which is characterized in that described device includes:
Module is obtained, for obtaining the page to be tested;
Determining module, for determining test file corresponding with the page to be tested;
The determining module is also used to traverse the script of the page to be tested, determines the corresponding control of the page to be tested;
Searching module, for inquiring pass associated with the text-entry control when the control is text-entry control Keyword, and corresponding test data is searched from the test file according to the keyword;
Module is filled, for filling the test data found to the page to be tested;The test data is used for Page test is carried out to the page to be tested.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201910475800.1A 2019-06-03 2019-06-03 Test data entry method, device, computer equipment and storage medium Active CN110321284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910475800.1A CN110321284B (en) 2019-06-03 2019-06-03 Test data entry method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910475800.1A CN110321284B (en) 2019-06-03 2019-06-03 Test data entry method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110321284A true CN110321284A (en) 2019-10-11
CN110321284B CN110321284B (en) 2024-05-03

Family

ID=68119404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910475800.1A Active CN110321284B (en) 2019-06-03 2019-06-03 Test data entry method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110321284B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625459A (en) * 2020-05-27 2020-09-04 平安普惠企业管理有限公司 Application program testing method and device, computer equipment and storage medium
CN111813694A (en) * 2020-08-11 2020-10-23 中国工商银行股份有限公司 Test method, test device, electronic device, and readable storage medium
CN112214397A (en) * 2020-09-09 2021-01-12 腾讯科技(深圳)有限公司 User interface testing method and device, computer equipment and storage medium
CN112416777A (en) * 2020-11-23 2021-02-26 珠海格力电器股份有限公司 Text display test method and device, computer equipment and storage medium
CN112884441A (en) * 2021-03-02 2021-06-01 岭东核电有限公司 Test result recording method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630686A (en) * 2016-03-24 2016-06-01 厦门美图移动科技有限公司 Traversal testing method and device for applications and mobile terminal
US20170185509A1 (en) * 2015-12-28 2017-06-29 Bank Of America Corporation Codeless system and tool for testing applications
CN108255373A (en) * 2018-01-25 2018-07-06 平安科技(深圳)有限公司 Data entry method, device, computer equipment and storage medium
CN108255566A (en) * 2018-01-29 2018-07-06 平安科技(深圳)有限公司 Optimized treatment method, device, computer equipment and the storage medium of data inputting
CN109388557A (en) * 2018-09-03 2019-02-26 深圳壹账通智能科技有限公司 A kind of control visiting method, computer readable storage medium and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170185509A1 (en) * 2015-12-28 2017-06-29 Bank Of America Corporation Codeless system and tool for testing applications
CN105630686A (en) * 2016-03-24 2016-06-01 厦门美图移动科技有限公司 Traversal testing method and device for applications and mobile terminal
CN108255373A (en) * 2018-01-25 2018-07-06 平安科技(深圳)有限公司 Data entry method, device, computer equipment and storage medium
CN108255566A (en) * 2018-01-29 2018-07-06 平安科技(深圳)有限公司 Optimized treatment method, device, computer equipment and the storage medium of data inputting
CN109388557A (en) * 2018-09-03 2019-02-26 深圳壹账通智能科技有限公司 A kind of control visiting method, computer readable storage medium and terminal device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁昕瑜: "基于RFT的Web系统自动化测试设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, no. 10, 15 June 2018 (2018-06-15), pages 138 - 1891 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625459A (en) * 2020-05-27 2020-09-04 平安普惠企业管理有限公司 Application program testing method and device, computer equipment and storage medium
CN111813694A (en) * 2020-08-11 2020-10-23 中国工商银行股份有限公司 Test method, test device, electronic device, and readable storage medium
CN111813694B (en) * 2020-08-11 2024-03-15 中国工商银行股份有限公司 Test method, test device, electronic equipment and readable storage medium
CN112214397A (en) * 2020-09-09 2021-01-12 腾讯科技(深圳)有限公司 User interface testing method and device, computer equipment and storage medium
CN112416777A (en) * 2020-11-23 2021-02-26 珠海格力电器股份有限公司 Text display test method and device, computer equipment and storage medium
CN112884441A (en) * 2021-03-02 2021-06-01 岭东核电有限公司 Test result recording method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110321284B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN110321284A (en) Test data input method, device, computer equipment and storage medium
CN108595329B (en) Application testing method and device and computer storage medium
US8104020B2 (en) Method and system to automate software testing using sniffer side and browser side recording and a toolbar interface
CN108804548B (en) Test data query method, device, computer equipment and storage medium
CN108228873A (en) Object recommendation, publication content delivery method, device, storage medium and equipment
CN110647320A (en) Project framework construction method and device, computer equipment and storage medium
CN108874926A (en) Mass data inquiry method, device, computer equipment and storage medium
CN109766261B (en) Coverage test method, coverage test device, computer equipment and storage medium
CN109033150A (en) Sensitive word verification method, device, computer equipment and storage medium
CN109726134B (en) Interface test method and system
CN110213357A (en) Business datum backing method, device, computer equipment and storage medium
CN110221967A (en) Test data building method, device, computer equipment and storage medium
CN108399124A (en) Application testing method, device, computer equipment and storage medium
CN109144799A (en) Integrated testing method, apparatus, computer equipment and storage medium
CN109741035A (en) Data processing method, device, computer equipment and storage medium
CN108874661A (en) Test mapping relations library generating method, device, computer equipment and storage medium
CN110162453A (en) Test method, device, computer readable storage medium and computer equipment
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN109491885A (en) Test problem localization method, device, computer equipment and storage medium
CN110362479A (en) System upgrade test method and system
CN109299009A (en) Data test method, apparatus, computer equipment and storage medium
CN109375843A (en) Application search method, device, equipment and medium based on shortcut
CN109032614A (en) A kind of system and method for Internet of Things application development and maintenance
CN110232018A (en) Interface test method, device, computer equipment
CN108846741B (en) Payment processing method and approval document processing method

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
GR01 Patent grant
GR01 Patent grant