CN112835809A - Test data setting method, device, equipment and medium based on browser - Google Patents

Test data setting method, device, equipment and medium based on browser Download PDF

Info

Publication number
CN112835809A
CN112835809A CN202110301333.8A CN202110301333A CN112835809A CN 112835809 A CN112835809 A CN 112835809A CN 202110301333 A CN202110301333 A CN 202110301333A CN 112835809 A CN112835809 A CN 112835809A
Authority
CN
China
Prior art keywords
text box
test data
target text
test
button
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
CN202110301333.8A
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.)
17win Network Technology Co ltd
Original Assignee
17win Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 17win Network Technology Co ltd filed Critical 17win Network Technology Co ltd
Priority to CN202110301333.8A priority Critical patent/CN112835809A/en
Publication of CN112835809A publication Critical patent/CN112835809A/en
Pending legal-status Critical Current

Links

Images

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/3684Test management for test design, e.g. generating new test cases
    • 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

Abstract

The invention discloses a test data setting method based on a browser, which comprises the following steps: determining a test page, acquiring all text boxes of forms in the test page, searching a target text box for generating test data from all text boxes of each form, acquiring test data corresponding to the target text box, and automatically setting the test data into the corresponding target text box in the test page. Therefore, when the test data is set in the text box of the test page, the test data can be directly generated through the browser and automatically set in the corresponding target text box, data generation software of a third party is not needed, the problem of switching between different data generation software is solved, the generation and setting speed of the test data is greatly improved, and the test working efficiency is improved. The invention also discloses a test data setting device, equipment and a medium based on the browser, and the technical effects can be realized.

Description

Test data setting method, device, equipment and medium based on browser
Technical Field
The present invention relates to a test data setting method, and more particularly, to a test data setting method, apparatus, device, and medium based on a browser.
Background
During the testing process, the tester often needs to fill in the test data through a web form. However, some test data are troublesome to construct, such as identification number, and need to satisfy certain length requirement and check code requirement. If the tester fills in the form data manually, the cost is high, and it is very difficult to generate data meeting the format requirement, even if many third-party software can help the tester generate the data, the tester still needs to copy and paste the data from the software manually into the form of the browser. For various data, a tester may need to install different software to generate data, and completing one form may need to switch different software. These software also have the problem of being unable to cross-platform, such as the software of Windows platform is not able to be used under macOS. For these reasons, the efficiency of the test work is drastically reduced when a large amount of data is required. In an actual scene, similar data also comprises a mobile phone number, a postal code, a home address, a mail address and the like, the generation and use processes of the data are troublesome, and much time is occupied by testing personnel, so that the testing efficiency is influenced.
Disclosure of Invention
The invention aims to provide a test data setting method, a test data setting device, test data setting equipment and a test data setting medium based on a browser, so that test data can be quickly set in a text box, and the test efficiency is improved.
In order to achieve the above object, the present invention provides a test data setting method based on a browser, including:
determining a test page;
acquiring all text boxes of the form in the test page;
searching a target text box for generating test data from all text boxes of each form;
acquiring test data corresponding to the target text box;
and automatically setting the test data into a corresponding target text box in the test page.
Searching for a target text box for generating test data from all text boxes of each form includes:
determining text box identifications of all text boxes of each form;
sending the form identification of each form and the corresponding text box identifications of all the text boxes to a server, and determining the target text box identification of each form generating test data through the server;
and determining a corresponding target text box according to the target text box identifier returned by the server.
After searching for a target text box for generating test data from all text boxes of each form, the method further includes:
constructing a test data acquisition button corresponding to each target text box;
determining a button generation position corresponding to each target text box;
and inserting the test data acquisition button corresponding to each target text box into the button generation position of the corresponding target text box in the test page for displaying.
Wherein the obtaining of the test data corresponding to the target text box comprises:
and if the button click information is detected, acquiring the test data of the target text box corresponding to the button click information.
Acquiring test data of a target text box corresponding to the button click information, wherein the acquiring of the test data comprises the following steps:
sending a target text box identifier of a target text box corresponding to the button clicking information to a server, and generating test data corresponding to the target text box identifier through the server;
and receiving test data which is sent by the server and corresponds to the target text box identification.
In order to achieve the above object, the present invention further provides a test data setting apparatus based on a browser, including:
the page determining module is used for determining a test page;
the text box acquisition module is used for acquiring all text boxes of the form in the test page;
the text box searching module is used for searching a target text box for generating the test data from all the text boxes of each form;
the data acquisition module is used for acquiring test data corresponding to the target text box;
and the data setting module is used for automatically setting the test data into a corresponding target text box in the test page.
Wherein the text box searching module comprises:
an identification determining unit, configured to determine text box identifications of all text boxes of each form;
the identification sending unit is used for sending the form identification of each form and the corresponding text box identifications of all the text boxes to a server, and determining the target text box identification of each form for generating the test data through the server;
and the target text box determining unit is used for determining the corresponding target text box according to the target text box identifier returned by the server.
Wherein, the device still includes:
the button construction module is used for constructing a test data acquisition button corresponding to each target text box;
the position determining module is used for determining the button generating position corresponding to each target text box;
and the button inserting module is used for inserting the test data acquisition buttons corresponding to the target text boxes into the button generating positions corresponding to the target text boxes in the test page for displaying.
To achieve the above object, the present invention further provides an electronic device comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the test data setting method based on the browser when executing the computer program.
To achieve the above object, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when being executed by a processor, implements the steps of the above browser-based test data setting method.
According to the scheme, the test data setting method based on the browser provided by the embodiment of the invention comprises the following steps: determining a test page, acquiring all text boxes of forms in the test page, searching a target text box for generating test data from all text boxes of each form, acquiring test data corresponding to the target text box, and automatically setting the test data into the corresponding target text box in the test page. Therefore, when the test data is set in the text box of the test page, the test data can be directly generated through the browser and automatically set in the corresponding target text box, data generation software of a third party is not needed, the problem of switching between different data generation software is solved, the generation and setting speed of the test data is greatly improved, and the test working efficiency is improved. The invention also discloses a test data setting device, equipment and a medium based on the browser, and the technical effects can be realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flowchart of a method for setting test data based on a browser according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a form according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another method for setting test data based on a browser according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a test data setting apparatus based on a browser according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention discloses a test data setting method, a device, equipment and a medium based on a browser.
The browser may be a browser having a Webkit kernel, such as Google browser, 360-speed browser, 360-security browser, dog search browser, and QQ browser, or may be another browser, which is not limited in this respect. The expansion program of the browser is a program developed by adopting a Web (World Wide Web) technology and used for enhancing the functions of the browser, and is essentially a compression packet composed of resources such as HTML (HyperText Markup language), CSS (sharing Style sheets), JavaScript script, picture files and the like. The extended development of Chrome is very simple, and developers can quickly develop an extended program through HTML, CSS and JavaScript by only mastering basic Web development technology. The extension program can interact with the Web page or interact with the server through the content script and the XMLHttpRequest. The extension program can also use all APIs and internal functions provided by the browser, such as tags or bookmarks, etc.
In addition, in order to enable the browser to automatically fill in test data through the extension program, a configuration file of the extension program may be added, and basic extension information including an extension name, an extension version, a CSS (Cascading Style Sheets) file to be loaded, a JavaScript file, and the like is set in the configuration file. The CSS file is used to control the style of the button, and the JavaScript is used to implement a specific function. By configuring the content _ scripts, the extended scripts and the CSSs are injected into the page, and the JavaScript and the CSS are easily injected into the designated page in a configuration mode.
Referring to fig. 1, a schematic flowchart of a method for setting test data based on a browser according to an embodiment of the present invention includes:
s101, determining a test page;
specifically, when a tester opens a test page, an expansion program of the browser injects an autofil.js script into the test page, the autofil.js script is a script preset in a configuration file, and the test data can be automatically filled by executing the scheme through the script. Therefore, in the present scheme, after the autocoll.js script is injected into the test page, the script will take the page opened by the tester as the test page of the present scheme, and then execute the subsequent process.
S102, acquiring all text boxes of a form in a test page;
in this embodiment, after the test page is determined, all form forms in the test page need to be obtained through a jQuery selector $ ("form"), and traversal is performed to determine the text box in each form. The jQuery is a quick and simple JavaScript framework, has a unique chain grammar and a plurality of short and clear functional interfaces, and helps developers to do more things with fewer codes. The jQuery includes functional codes commonly used by JavaScript, And integrates functions of HTML (Hyper Text Markup Language) document operation, event processing, animation design, Ajax (Asynchronous JavaScript And XM, which is a web page development technology for creating interactive And fast dynamic web page applications), interaction And the like. In HTML technology, all fillable input boxes are called text boxes (inputs), which are contained in a form.
Referring to fig. 2, a schematic diagram of a form disclosed in the embodiment of the present invention shows that the form includes three text boxes: a name text box, a mobile phone number text box and an email text box. It should be noted that, in this solution, the test page may include 1 or more forms, and for each form, test data may be set in a target text box of the form through this solution.
S103, searching a target text box for generating test data from all text boxes of each form;
it should be noted that, when the target text box for generating the test data is searched from all text boxes of each form, the target text box can be executed locally through the client, or can be sent to the server and executed through the server. In addition, the target text box in the scheme is a preset text box which needs to be automatically filled with test data through the scheme, for example, in the three text boxes shown in fig. 2, a name text box can be set as a text box which does not need to be automatically filled with test data, and a mobile phone number text box and an email text box can be set as text boxes which need to be automatically filled with test data, so that the target text box searched from the three text boxes in the form by the scheme is: a mobile phone number text box and an email text box.
S104, acquiring test data corresponding to the target text box;
in this embodiment, if the search target text box is executed by an extension program of the client, the generation of the test data is also generated by the extension program, and if the search target text box is executed by the server, the generation of the test data is also generated by the server. In generating the test data, the test data may be generated according to the type of the target text box, for example: and if the target text box is a mobile phone number text box, generating a random mobile phone number according to the rule of the mobile phone number, wherein the random mobile phone number is the test data.
And S105, automatically setting the test data into a corresponding target text box in the test page.
It should be noted that, after the test data is determined, the test data can be directly set in the corresponding text box and displayed through the test page. For example: and if the generated test data is the mobile phone number, automatically filling the generated mobile phone number into a mobile phone number text box of the test page, thereby realizing the automatic generation and automatic filling of the test data.
In conclusion, when the test data is set in the text box of the test page, the test data can be directly generated through the browser and automatically set in the corresponding target text box, data generation software of a third party is not needed, the problem of switching between different data generation software is solved, the generation and setting speed of the test data is greatly improved, and the test working efficiency is improved.
Referring to fig. 3, a schematic flow chart of another method for setting test data based on a browser according to an embodiment of the present invention is shown; it should be noted that, the same points of the data setting method described in the present embodiment and the data setting method described in the previous embodiment may be referred to each other, and are not specifically described here.
The data setting method described in this embodiment specifically includes the following steps:
s201, determining a test page;
s202, acquiring all text boxes of a form in a test page;
s203, determining text box identifications of all text boxes of each form, sending the form identifications of each form and the corresponding text box identifications of all the text boxes to a server, and determining target text box identifications of each form for generating test data through the server;
it should be noted that, in order to facilitate maintenance and update of the type of the target text box on the premise of not upgrading the extension program, in this embodiment, the target text box is determined and test data is generated by the server. When the server determines the target text box and generates the test data, it can be implemented by various technologies, such as Java (computer programming language), PHP (Hypertext Preprocessor, which is a script language executed on the server side), nodjs, etc., and in order to implement the above two functions, the server provides the following two interfaces:
a first interface: the interface is an interface for acquiring a text box list supported by the form, and returning which text boxes under the form support test data generation. When a form appears in a test page, the extension program calls the interface to find a target text box generating test data from all text boxes of each form, and the target text box can be returned in a list form. A second interface: the interface is used for generating random test data, and the test data is generated according to requirements and then returned to a calling party.
Specifically, in the scheme, the identifier of each text box needs to be determined, the identifier may be an identification number id or a name, the extension program calls a first interface of the back-end server, and queries all text box lists capable of generating test data under the form by using the text box identifier and the form identifier as request parameters. After the server obtains the text box identification in the form through the first interface, the server needs to judge which text boxes in the form support automatic generation of test data according to the text box identification, and if a form is not supported, the interface returns a null array; if the form is supported, a list of supported text box identifications is returned. Therefore, if the text box identifier acquired by the extension program from the server is empty, the test data generated by the form is temporarily not supported, and the form is skipped; if the text box list is not empty, the next step is continued.
Taking the form shown in fig. 2 as an example, the number of text boxes in the form is three, and the extension program needs to determine the text box identifier of each text box, such as: and after the three text box identifications are sent to a server, if the server inquires that only the mobile phone number and the electronic mailbox need to be automatically filled with test data, returning the target text box identification which can be [ "mobile phone number", "electronic mailbox" ]. The corresponding relation between the form and the text box can be realized through technical means such as files, databases and the like.
S204, determining a corresponding target text box according to the target text box identifier returned by the server;
s205, constructing a test data acquisition button corresponding to each target text box, determining a button generation position corresponding to each target text box, and inserting the test data acquisition button corresponding to each target text box into the button generation position corresponding to the target text box in the test page for displaying;
s206, if the button click information is detected, sending a target text box identifier of a target text box corresponding to the button click information to a server, and generating test data corresponding to the target text box identifier through the server;
specifically, after receiving the target text box identification list returned by the server, the extension program may determine which text boxes need to be automatically filled with test data, and in order to facilitate a tester to obtain the test data when needed, in this embodiment, after finding the corresponding target text box from the form, a corresponding HTML button may be constructed, and after inserting the button into the text box by using a jQuery's apend method, referring to fig. 4, which is another schematic diagram of the form disclosed in the embodiment of the present invention, the mobile phone number text box and the email box text box in fig. 4 are both target text boxes, and the button generation position determined by the present solution is the right side of the text box, so that after constructing the corresponding test data obtaining button, the button is inserted into the corresponding text box, that is, the right side of the text box.
Furthermore, according to the scheme, a click event needs to be bound to the button, if a tester needs to acquire test data of a certain text box, the tester needs to click the test data acquisition button of the text box, the click event is triggered when the button is clicked, and the event is used for calling the second interface to acquire corresponding test data from the server.
Specifically, when the test data corresponding to the target text box is obtained, a second interface of the server side needs to be called, and the identifier of the target text box is used as a request parameter to obtain the test data. After receiving the request, the server identifies the type of data to be generated according to the identifier of the target text box, generates test data, and returns the test data, for example: if the target text box mark is a mobile phone number, generating a random mobile phone number according to the rule of the mobile phone number, and returning the random mobile phone number as test data to the expansion program; and when the target text box is identified as the electronic mailbox, generating a random mailbox address to return according to the rule of the electronic mailbox. The generation mode of the random test data can be realized according to specific service requirements, in addition, the method can also realize many-to-one mapping, the flexibility of the interface is improved, and for example, when the identifiers are mobile, phone, cell phone and the like, mobile phone numbers can be generated.
And S207, receiving the test data which is sent by the server and corresponds to the target text box identification.
And S208, automatically setting the test data into a corresponding target text box in the test page.
In conclusion, the test data are set based on the browser extension program, and the user can quickly fill in the test data by clicking the button corresponding to the text box; in addition, because the test data in the scheme can be directly generated and filled in the browser, the data generation software of a third party is not needed, the problem of switching between different data generation software is solved, and the browser is used for expanding programs, so that the test working efficiency is greatly improved. Furthermore, the generation function of the test data in the scheme is provided by the server, so that the accuracy of data generation is ensured, new test data types are conveniently added on the premise of not upgrading the extension program, and the extension program and the test data are conveniently upgraded and maintained independently.
The following describes a test data setting device, equipment, and medium according to embodiments of the present invention, and the test data setting device, the equipment, and the medium described below may be referred to the test data setting method described above.
Referring to fig. 5, an embodiment of the present invention provides a structural schematic diagram of a test data setting apparatus based on a browser, where the apparatus specifically includes:
a page determining module 100, configured to determine a test page;
a textbox obtaining module 200, configured to obtain all textboxes of a form in the test page;
the text box searching module 300 is configured to search all text boxes of each form for a target text box for generating test data;
a data obtaining module 400, configured to obtain test data corresponding to the target text box;
and the data setting module 500 is used for automatically setting the test data into the corresponding target text box in the test page.
Wherein the text box searching module comprises:
an identification determining unit, configured to determine text box identifications of all text boxes of each form;
the identification sending unit is used for sending the form identification of each form and the corresponding text box identifications of all the text boxes to a server, and determining the target text box identification of each form for generating the test data through the server;
and the target text box determining unit is used for determining the corresponding target text box according to the target text box identifier returned by the server.
Wherein the apparatus further comprises:
the button construction module is used for constructing a test data acquisition button corresponding to each target text box;
the position determining module is used for determining the button generating position corresponding to each target text box;
and the button inserting module is used for inserting the test data acquisition buttons corresponding to the target text boxes into the button generating positions corresponding to the target text boxes in the test page for displaying.
Wherein, the data acquisition module includes:
the detection unit is used for detecting the button clicking message;
and the acquisition unit is used for acquiring the test data of the target text box corresponding to the button click information when the button click information is detected.
Wherein the obtaining unit is specifically configured to: sending a target text box identifier of a target text box corresponding to the button clicking information to a server, and generating test data corresponding to the target text box identifier through the server; and receiving test data which is sent by the server and corresponds to the target text box identification.
Referring to fig. 6, an electronic device according to an embodiment of the present invention includes:
a memory 11 for storing a computer program;
a processor 12, configured to implement the steps of the browser-based test data setting method according to any of the above-mentioned method embodiments when executing the computer program.
In this embodiment, the device may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet Computer, a palmtop Computer, or a portable Computer.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the device, for example a hard disk of the device. The memory 11 may also be an external storage device of the device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the device. Further, the memory 11 may also include both an internal storage unit of the device and an external storage device. The memory 11 may be used not only to store application software installed in the device and various kinds of data such as program codes for executing a test data setting method, etc., but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data, such as program codes for executing a test data setting method.
The device may include a memory 11, a processor 12, and a bus 13.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
Further, the device may further include a network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are generally used to establish a communication connection between the device and other electronic devices.
Optionally, the device may further comprise a user interface 15, the user interface 15 may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 15 may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the device and for displaying a visualized user interface.
Fig. 6 only shows the device with the components 11-15, and it will be understood by those skilled in the art that the structure shown in fig. 6 does not constitute a limitation of the device, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the test data setting method based on the browser described in any of the above-mentioned method embodiments are implemented.
Wherein the storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A test data setting method based on a browser is characterized by comprising the following steps:
determining a test page;
acquiring all text boxes of the form in the test page;
searching a target text box for generating test data from all text boxes of each form;
acquiring test data corresponding to the target text box;
and automatically setting the test data into a corresponding target text box in the test page.
2. The method according to claim 1, wherein the searching for a target text box for generating test data from all text boxes of each form comprises:
determining text box identifications of all text boxes of each form;
sending the form identification of each form and the corresponding text box identifications of all the text boxes to a server, and determining the target text box identification of each form generating test data through the server;
and determining a corresponding target text box according to the target text box identifier returned by the server.
3. The method according to claim 1, wherein after searching all text boxes of each form for a target text box for generating test data, the method further comprises:
constructing a test data acquisition button corresponding to each target text box;
determining a button generation position corresponding to each target text box;
and inserting the test data acquisition button corresponding to each target text box into the button generation position of the corresponding target text box in the test page for displaying.
4. The method according to claim 3, wherein the acquiring test data corresponding to the target text box includes:
and if the button click information is detected, acquiring the test data of the target text box corresponding to the button click information.
5. The method according to claim 4, wherein the acquiring of the test data of the target text box corresponding to the button click information includes:
sending a target text box identifier of a target text box corresponding to the button clicking information to a server, and generating test data corresponding to the target text box identifier through the server;
and receiving test data which is sent by the server and corresponds to the target text box identification.
6. A test data setting apparatus based on a browser, comprising:
the page determining module is used for determining a test page;
the text box acquisition module is used for acquiring all text boxes of the form in the test page;
the text box searching module is used for searching a target text box for generating the test data from all the text boxes of each form;
the data acquisition module is used for acquiring test data corresponding to the target text box;
and the data setting module is used for automatically setting the test data into a corresponding target text box in the test page.
7. The test data setup device of claim 6, wherein the text box lookup module comprises:
an identification determining unit, configured to determine text box identifications of all text boxes of each form;
the identification sending unit is used for sending the form identification of each form and the corresponding text box identifications of all the text boxes to a server, and determining the target text box identification of each form for generating the test data through the server;
and the target text box determining unit is used for determining the corresponding target text box according to the target text box identifier returned by the server.
8. The test data setting apparatus according to claim 6, further comprising:
the button construction module is used for constructing a test data acquisition button corresponding to each target text box;
the position determining module is used for determining the button generating position corresponding to each target text box;
and the button inserting module is used for inserting the test data acquisition buttons corresponding to the target text boxes into the button generating positions corresponding to the target text boxes in the test page for displaying.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the browser based test data setting method of any one of claims 1 to 5 when executing said computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps of the browser-based test data setting method of any one of claims 1 to 5.
CN202110301333.8A 2021-03-22 2021-03-22 Test data setting method, device, equipment and medium based on browser Pending CN112835809A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110301333.8A CN112835809A (en) 2021-03-22 2021-03-22 Test data setting method, device, equipment and medium based on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110301333.8A CN112835809A (en) 2021-03-22 2021-03-22 Test data setting method, device, equipment and medium based on browser

Publications (1)

Publication Number Publication Date
CN112835809A true CN112835809A (en) 2021-05-25

Family

ID=75930357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110301333.8A Pending CN112835809A (en) 2021-03-22 2021-03-22 Test data setting method, device, equipment and medium based on browser

Country Status (1)

Country Link
CN (1) CN112835809A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343159A (en) * 2021-08-06 2021-09-03 万商云集(成都)科技股份有限公司 Method and system for rapidly acquiring data from any channel, analyzing and storing data
CN114328242A (en) * 2021-12-30 2022-04-12 北京百度网讯科技有限公司 Form testing method and device, electronic equipment and medium
CN114860582A (en) * 2022-04-14 2022-08-05 中国电子科技集团公司第十五研究所 Web page test auxiliary method and system

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581212A (en) * 2012-07-18 2014-02-12 百度在线网络技术(北京)有限公司 Automatic form filling method, system and device based on cloud analysis
CN104427627A (en) * 2013-08-23 2015-03-18 阿里巴巴集团控股有限公司 Test data obtaining method, client and server
CN106681973A (en) * 2016-12-20 2017-05-17 北京奇虎科技有限公司 Method and device for achieving automatically filling browser sheet in test
CN108804327A (en) * 2018-06-12 2018-11-13 北京京东金融科技控股有限公司 A kind of method and apparatus of automatic Data Generation Test
CN109669693A (en) * 2017-10-16 2019-04-23 航天信息股份有限公司 A kind of method and system generating forms pages based on dynamic page
CN110188030A (en) * 2019-04-08 2019-08-30 平安科技(深圳)有限公司 A kind of test data generating method, device and computer equipment, storage medium
CN110209572A (en) * 2019-05-06 2019-09-06 深圳法大大网络科技有限公司 Ui testing method, ui testing system and terminal
US10613971B1 (en) * 2018-01-12 2020-04-07 Intuit Inc. Autonomous testing of web-based applications
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
CN111881043A (en) * 2020-07-27 2020-11-03 山石网科通信技术股份有限公司 Page testing method and device, storage medium and processor
US10824541B1 (en) * 2018-10-18 2020-11-03 State Farm Mutual Automobile Insurance Company System and method for test data fabrication
CN112162915A (en) * 2020-08-27 2021-01-01 杭州大搜车汽车服务有限公司 Test data generation method, device, equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581212A (en) * 2012-07-18 2014-02-12 百度在线网络技术(北京)有限公司 Automatic form filling method, system and device based on cloud analysis
CN104427627A (en) * 2013-08-23 2015-03-18 阿里巴巴集团控股有限公司 Test data obtaining method, client and server
CN106681973A (en) * 2016-12-20 2017-05-17 北京奇虎科技有限公司 Method and device for achieving automatically filling browser sheet in test
CN109669693A (en) * 2017-10-16 2019-04-23 航天信息股份有限公司 A kind of method and system generating forms pages based on dynamic page
US10613971B1 (en) * 2018-01-12 2020-04-07 Intuit Inc. Autonomous testing of web-based applications
CN108804327A (en) * 2018-06-12 2018-11-13 北京京东金融科技控股有限公司 A kind of method and apparatus of automatic Data Generation Test
US10824541B1 (en) * 2018-10-18 2020-11-03 State Farm Mutual Automobile Insurance Company System and method for test data fabrication
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
CN110188030A (en) * 2019-04-08 2019-08-30 平安科技(深圳)有限公司 A kind of test data generating method, device and computer equipment, storage medium
CN110209572A (en) * 2019-05-06 2019-09-06 深圳法大大网络科技有限公司 Ui testing method, ui testing system and terminal
CN111881043A (en) * 2020-07-27 2020-11-03 山石网科通信技术股份有限公司 Page testing method and device, storage medium and processor
CN112162915A (en) * 2020-08-27 2021-01-01 杭州大搜车汽车服务有限公司 Test data generation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄陇等: "一种Web应用测试数据生成与组织架构", 《计算机工程与应用》, no. 2006, pages 1 - 3 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343159A (en) * 2021-08-06 2021-09-03 万商云集(成都)科技股份有限公司 Method and system for rapidly acquiring data from any channel, analyzing and storing data
CN114328242A (en) * 2021-12-30 2022-04-12 北京百度网讯科技有限公司 Form testing method and device, electronic equipment and medium
CN114328242B (en) * 2021-12-30 2024-02-20 北京百度网讯科技有限公司 Form testing method and device, electronic equipment and medium
CN114860582A (en) * 2022-04-14 2022-08-05 中国电子科技集团公司第十五研究所 Web page test auxiliary method and system
CN114860582B (en) * 2022-04-14 2024-01-09 中国电子科技集团公司第十五研究所 Web page test auxiliary method and system

Similar Documents

Publication Publication Date Title
CN112835809A (en) Test data setting method, device, equipment and medium based on browser
CN109254910B (en) Application program testing method and device, electronic equipment and storage medium
CN105955888B (en) Page debugging preview method and system
CN107688529B (en) Component debugging method and device
CN103177115B (en) A kind of method and apparatus extracting Webpage link
EP2866158A1 (en) Method for reader to provide service, reader, terminal and computer storage medium
CN111475161B (en) Method, device and equipment for accessing component
CN108595697B (en) Webpage integration method, device and system
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN113095995A (en) Webpage watermark adding method and device, electronic equipment and storage medium
CN108197024B (en) Embedded browser debugging method, debugging terminal and computer readable storage medium
CN110020280B (en) Application page display method and device, storage medium and computer equipment
CN104850498A (en) Filling information testing method and filling information testing system
CN108319474B (en) Page information generation method, device and equipment
CN107045546B (en) Webpage processing method and device and intelligent terminal
CN108255509A (en) Using dispositions method, device, equipment and readable storage medium storing program for executing
CN117519877A (en) Rendering method and device of quick application card, storage medium and electronic equipment
CN109240664A (en) A kind of method and terminal acquiring user behavior information
CN111813385B (en) Page plug-in method, device and equipment based on Web application
CN103279275A (en) Methods for parsing content of document and handheld electronic apparatus
CN111158777B (en) Component calling method, device and computer readable storage medium
CN112035113A (en) Navigation bar loading method, device, equipment and medium of H5 page
CN115543324B (en) Method, device, equipment and medium for generating interactive interface
CN111400635A (en) Background management method and device for database, computer equipment and storage medium
CN108268298B (en) Desktop icon generation method and device, storage medium and electronic equipment

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