CN115185856A - Configuration method and device of test interface, storage medium and computer equipment - Google Patents

Configuration method and device of test interface, storage medium and computer equipment Download PDF

Info

Publication number
CN115185856A
CN115185856A CN202210925607.5A CN202210925607A CN115185856A CN 115185856 A CN115185856 A CN 115185856A CN 202210925607 A CN202210925607 A CN 202210925607A CN 115185856 A CN115185856 A CN 115185856A
Authority
CN
China
Prior art keywords
interface
editing
field
parameters
tested
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
CN202210925607.5A
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.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce 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 E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202210925607.5A priority Critical patent/CN115185856A/en
Publication of CN115185856A publication Critical patent/CN115185856A/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/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3656Software debugging using additional hardware using a specific debug interface

Abstract

The invention discloses a configuration method and device of a test interface, a storage medium and computer equipment, relates to the technical field of software testing, and mainly aims to solve the problems of high error rate and low efficiency of manual assembly of a test interface. The method comprises the following steps: when an editing instruction of a test interface is received, an interface editing form is called and displayed, the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and configuration relations of editing fields in the interface editing form; acquiring a target interface to be tested, which is input through the interface editing form, and displaying an editing field matched with the target interface to be tested through the interface editing form; and acquiring interface field parameters for adding the editing field, and configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested.

Description

Configuration method and device of test interface, storage medium and computer equipment
Technical Field
The present invention relates to the field of software testing technologies, and in particular, to a method and an apparatus for configuring a test interface, a storage medium, and a computer device.
Background
Currently, software development is generally divided into front-end development and back-end development, the delivery test time of the back-end development is often earlier than that of the front-end development, and corresponding test work needs to be carried out on software from an interface provided by the back end. And the back-end development delivery content comprises an interface information description document, and the interface request can be initiated only by performing assembly entry according to the interface information description document during testing.
At present, the reassembly and configuration of the existing interface parameters usually adopts a manual method to extract the interface parameters to be configured from the interface document, and performs manual writing to realize the assembly of the interface parameters. However, the manual method consumes a lot of manpower and material resources, so that the manual assembly of the parameter method takes a long time and has a high error rate, and the configuration efficiency of the test interface is greatly reduced, thereby affecting the efficiency of the interface test.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for configuring a test interface, a storage medium, and a computer device, and mainly aims to solve the problems of high error rate and low efficiency in manually configuring interface parameters during an interface test process.
According to an aspect of the present invention, there is provided a method for configuring a test interface, including:
when an editing instruction of a test interface is received, an interface editing form is called and displayed, the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and configuration relations of editing fields in the interface editing form;
acquiring a target interface to be tested, which is input through the interface editing form, and displaying an editing field matched with the target interface to be tested through the interface editing form;
and acquiring interface field parameters for adding the editing field, and configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested.
Further, before the retrieving and displaying interface edits the form, the method further includes:
searching at least one interface to be tested in the full test data, and analyzing interface parameters of the interface to be tested and field information corresponding to the interface parameters;
constructing an initial editing form component matched with the interface to be tested, wherein the initial editing form component comprises a plurality of blank editing fields and an interface editing form for displaying the blank editing fields;
and configuring the field information in a blank editing field of the initial editing form component according to the field value type of the field information to obtain an editing form component.
Further, the configuring the field information in the blank edit field of the initial edit form component according to the field value type of the field information to obtain an edit form component includes:
when the interface parameters comprise main parameters, configuring the field information in blank editing fields in the initial editing form assembly according to the first field value type of the main parameters, configuring operation controls for editing sub-parameters, and generating an editing form assembly; or the like, or, alternatively,
when the interface parameters comprise main parameters and sub-parameters related to the main parameters, configuring first field information in a blank main editing field in the initial editing form component according to a first field value type of the main parameters, and configuring second field information in a blank sub-editing field in the initial editing form component according to a second field value type of the sub-parameters to generate an editing form component.
Further, the displaying, by the edit form component, the edit field matched with the target interface to be tested includes:
acquiring an interface editing form matched with the target interface to be detected from the editing form component;
and displaying the interface editing form, wherein the interface editing form comprises an editing field corresponding to the configured field information of the main parameter and the operation control, or a main editing field corresponding to the configured first field information of the main parameter and a sub editing field corresponding to the second field information of the sub parameter.
Further, the configuring, by the edit form component, the interface field parameter in the interface parameter of the target interface to be tested, and before the configuring of the interface to be tested is completed, the method further includes:
establishing a butt joint relation between the editing form component and an interface test component, wherein the butt joint relation is used for correspondingly configuring interface field parameters received by editing fields in the editing form component to the interface parameters in the interface test component so as to execute interface test of the target interface to be tested;
configuring the interface field parameter in the interface parameter of the target interface to be tested through the edit form component, wherein completing the configuration of the interface to be tested comprises:
and transmitting the interface field parameters to the interface test component through the docking relationship, and instructing the interface test component to perform parameter configuration on the target interface to be tested according to the interface field parameters.
Further, the method further comprises:
if the operation control is displayed in the interface editing form, after a trigger instruction for the operation control is received, the sub-parameters corresponding to the operation control are recursively displayed according to different parameter formats, wherein the parameter formats comprise at least one of a time format, a text format, a numerical value format and a character string format.
Further, the method further comprises:
configuring an operation confirmation trigger event and an operation cancellation trigger event in the editing form component, and binding operation information corresponding to the operation confirmation trigger event and the operation cancellation trigger event respectively;
and when the operation confirmation triggering event or the operation cancellation triggering event is triggered in the editing form component, performing operation according to the operation information corresponding to the operation confirmation triggering event or the operation cancellation triggering event.
According to another aspect of the present invention, there is provided a test interface configuration apparatus, including:
the form calling module is used for calling and displaying an interface editing form when an editing instruction of the test interface is received, wherein the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and the configuration relation of each editing field in the interface editing form;
the form display module is used for acquiring a to-be-detected target interface input by the interface editing form and displaying an editing field matched with the to-be-detected target interface by the interface editing form;
and the parameter configuration module is used for acquiring the interface field parameters for adding the editing field, configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component, and completing the configuration of the interface to be tested.
According to another aspect of the present invention, a storage medium is provided, where at least one executable instruction is stored, and the executable instruction causes a processor to perform an operation corresponding to the configuration method of the test interface.
According to another aspect of the present invention, there is provided a computer device, including a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the configuration method of the test interface.
By the technical scheme, the technical scheme provided by the embodiment of the invention at least has the following advantages:
the invention provides a configuration method and a device of a test interface, a storage medium and computer equipment, compared with the prior art, the invention calls and displays an interface editing form when receiving an editing instruction of the test interface, wherein the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and the configuration relation of each editing field in the interface editing form; acquiring a target interface to be tested, which is input through the interface editing form, and displaying an editing field matched with the target interface to be tested through the interface editing form; and acquiring interface field parameters for adding the editing field, and configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested. The method realizes the visual input of the interface parameter information of the target interface to be tested according to the field value types configured by each editing field in the form component during the test of the interface. Because the form of configuring the form component is adopted in the assembling stage of the interface parameters, compared with the traditional manual mode, the method not only saves a large amount of manpower and material resources, improves the configuration efficiency of the test interface, but also improves the accuracy of the assembling configuration of the interface parameters.
The above description is only an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description so as to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a configuration method of a test interface according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another method for configuring a test interface according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for configuring a test interface according to another embodiment of the present invention;
FIG. 4 is a flowchart illustrating a configuration method of a test interface according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating a configuration apparatus of a test interface according to an embodiment of the present invention;
fig. 6 shows a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a method for configuring a test interface, as shown in fig. 1, the method includes:
101. when an editing instruction of the test interface is received, calling and displaying an interface editing form;
in the embodiment of the invention, when a current execution end receives an editing instruction of a test interface, an interface editing form is called and displayed, the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and configuration relations of editing fields in the interface editing form; the editing form component is a packaged view set, and the pre-configured editing form component may have a plurality of configuration forms, including but not limited to a text input box, a drop-down list selection box, a drop-down date selection box, a drop-down time selection box, and the like. For the interface parameters of different interfaces to be tested, different forms of editing form components can be configured according to the requirements of parameter formats or the master-slave relationship of the parameters, and embodiments of the present invention are not particularly limited.
It should be noted that the interface editing form includes a plurality of editable fields, and before the editing form component corresponding to the interface editing form is called, the current execution end needs to first search the configuration relationship between the interface parameter of the interface to be tested in the editing form component and each editing field in the interface editing form, and load the editing form component according to the configuration relationship, so that each editing field in the loaded editing form component is matched with the interface parameter of the interface to be tested.
102. Acquiring a target interface to be tested, which is input through the interface editing form, and displaying an editing field matched with the target interface to be tested through the interface editing form;
in the embodiment of the invention, the current execution end acquires the target interface to be tested input by the user from the interface editing form, because the interface parameter of the target interface to be tested is matched with the editing field matched with the field value type of the interface information, after the current execution end acquires the target interface to be tested, the editing field information matched with the interface information of the target interface to be tested is displayed through the interface editing form. The edit field information includes, but is not limited to, field information in a time format, a text format, a numeric format, and a character string format, and the embodiment of the present invention is not limited in particular.
103. And acquiring interface field parameters for adding the editing field, and configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested.
In the embodiment of the invention, the current execution end acquires the interface field parameters added by the user from the editing field matched with the target interface to be tested, and performs parameter configuration on the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested.
It should be noted that the interface editing form in the embodiment of the present invention supports quick switching between the json format and the form mode, and after a user enters interface parameters in the interface editing form, the interface editing form may be switched to a json format file, and the interface parameters entered by the user are automatically assigned to json corresponding fields.
In another embodiment of the present invention, in order to call an interface edit form matched with the interface parameters of the interface to be tested, the interface edit form is preprocessed before being called, and an initial edit form component is constructed and configured, so that each interface to be tested is matched with a corresponding edit form component. As shown in fig. 2, before the step of calling and displaying the interface edit form, the method further includes:
201. searching at least one interface to be tested in the total test data, and analyzing interface parameters of the interface to be tested and field information corresponding to the interface parameters;
in the embodiment of the invention, the current execution end searches at least one interface to be tested in the full test data, and the full test data is used for representing the test data for performing full coverage on the tested system, and covers all service branches, all functional modules, and different scenes or data combinations of the tested system. The application scenarios of the system to be tested include, but are not limited to, smart home, e-commerce, smart grid, and the like, and the embodiment of the present invention is not particularly limited. The search of the interface to be tested can be performed according to the interface identifier, and can also be performed according to the communication protocol of the interface, and the embodiment of the invention is not particularly limited. The current execution end analyzes interface parameters of the interface to be tested, including but not limited to main parameters, sub-parameters, and the like. After the parameter of the interface to be tested is analyzed, the field information corresponding to the parameter of the interface includes, but is not limited to, a field name of the parameter, a Chinese description of the field, information on use of the field, a value type of the field, an ID value of a sub-parameter corresponding to the field, and the like.
202. Constructing an initial editing form component matched with the interface to be tested;
in the embodiment of the invention, the current execution end constructs a matched initial editing form component aiming at the interface parameters of the interface to be detected, wherein the initial editing form component comprises a plurality of blank editing fields and an interface editing form for displaying the blank editing fields. And the blank editing field is a reserved position of the interface information corresponding to the field name of the parameter in the editing interface parameter, and is used for modifying the editing form component according to the configuration relation.
It should be noted that each blank edit field in the initial edit form corresponds to a field name of a parameter, and when a user clicks the field name of a parameter, the field chinese description and the field use information corresponding to the clicked field name in the interface parameter are displayed in the initial edit form.
203. And configuring the field information in a blank editing field of the initial editing form component according to the field value type of the field information to obtain an editing form component.
In the embodiment of the present invention, after the current execution end parses the field value type of the interface parameter to be detected, the field information is configured into the blank editing field of the initial editing form component according to the field value type of the interface parameter, where the field information includes, but is not limited to, a field name of the parameter, a chinese description of the field, use information of the field, a field value type, a sub-parameter ID value corresponding to the field, and the like. And loading an editing form component corresponding to the field value type according to the field value type of the configured interface parameter in the blank editing field. For example, when the field value type of the interface parameter is digital type Long, the current execution end uses the basic input control as an edit form component corresponding to the digital type Long; when the field value type of the interface parameter is Date, the current execution end inputs the Date into the vue component as an edit form component corresponding to the Date, which is not specifically limited in the embodiment of the present invention.
In another embodiment of the present invention, for further limitation and explanation, the step of configuring the field information in a blank editing field of the initial editing form component according to a field value type of the field information, and obtaining the editing form component includes:
when the interface parameters comprise main parameters, configuring the field information in blank editing fields in the initial editing form assembly according to a first field value type of the main parameters, configuring operation controls for editing sub-parameters, and generating an editing form assembly; or the like, or, alternatively,
in the embodiment of the invention, in order to allow a user to flexibly configure the interface parameters, the operation control for editing the sub-parameters is configured in the initial editing form component, so that the configuration efficiency of the sub-parameters is improved. The current execution end firstly analyzes the first field name, the chinese description of the first field, the use information of the first field, the type of the first field value, the sub-parameter ID value corresponding to the first field, and the like of the parameter in the main parameter information according to the main parameter information in the interface parameter, which is not limited in the embodiment of the present invention. The current execution end configures the field information of the main parameter into a blank field in the initial editing form component according to the first field value type of the main parameter information, and when the first field value type is a digital type Long, the current execution end takes the basic input control as the editing form component corresponding to the first field value type; when the first field value type is the Date, the current execution end uses the Date input vue component as the edit form component corresponding to the first field value type, which is not specifically limited in the embodiment of the present invention.
When the interface parameters comprise main parameters and sub-parameters related to the main parameters, configuring first field information in a blank main editing field in the initial editing form component according to a first field value type of the main parameters, and configuring second field information in a blank sub-editing field in the initial editing form component according to a second field value type of the sub-parameters to generate an editing form component.
In the embodiment of the invention, in order to display the master-slave relationship of the parameters in the interface editing form in a more hierarchical manner, the sub-parameter ID value corresponding to the first field of the main parameter is used as a bridge for searching the sub-parameter information associated with the sub-parameter ID value, when the sub-parameter ID value corresponding to the first field of the main parameter in the interface information is analyzed to be not null, the current execution end searches the sub-parameter associated with the main parameter according to the sub-parameter ID value corresponding to the first field, and a blank sub-editing field is set in the initial editing form for editing the sub-parameter associated with the main parameter, so that an editing form component with the master-slave relationship is generated. If the ID value of the sub-parameter corresponding to the first field is 001, the field information of the sub-parameter whose address information is 001 is found according to the ID value of 001, and the field information of the sub-parameter associated with the main parameter is found, which is not specifically limited in the embodiment of the present invention. The current execution end configures the field information of the main parameters into a blank main editing field in the initial editing form component according to the first field value type of the main parameter information, and when the first field value type is a digital type Long, the current execution end takes the basic input control as an editing form component corresponding to the blank main editing field; when the first field value type is Date, the current execution end inputs the Date into the vue component as an edit form component corresponding to the blank main edit field, which is not specifically limited in the embodiment of the present invention. The current execution end searches for the sub-parameter associated with the main parameter according to the sub-parameter ID value corresponding to the first field of the main parameter information, and analyzes the parameter information of the sub-parameter associated with the main parameter to obtain the second field name of the sub-parameter associated with the main parameter, the chinese description of the second field, the use information of the second field, the type of the second field value, the sub-parameter ID value corresponding to the second field, and the like. Configuring field information of the main parameter into a blank sub-editing field in the initial editing form component according to a second field value type of the sub-parameter associated with the main parameter, and when the second field value type is a digital type Long, taking the basic input control as an editing form component corresponding to the blank sub-editing field by the current execution end; when the second field value type is Date, the current execution end inputs the Date into the vue component as an edit form component corresponding to the blank sub-edit field, which is not specifically limited in the embodiment of the present invention.
In another embodiment of the present invention, in order to more reasonably display an interface editing form, so that an editing field in the interface editing form is matched with a target interface to be tested, and reduce an error rate of parameter configuration, the step of displaying, by the editing form component, the editing field matched with the target interface to be tested includes:
301. acquiring an interface editing form matched with the target interface to be detected from the editing form component;
302. and displaying the interface editing form.
In the embodiment of the invention, the current execution end acquires the interface editing form matched with the target interface to be tested from the editing form component, the interface editing form matched with the interface to be tested is displayed in the current execution end, and the displayed interface editing form comprises the editing field corresponding to the field information of the configured main parameter and the operation control used for editing the sub-parameter. If the basic input control is configured in the blank editing field in the field information of the main parameter, displaying the basic input control in the editing form of the interface; if the blank editing field in the field information of the main parameter is configured with the date input vue component, the date input vue component is displayed in the editing form of the interface, and the embodiment of the invention is not particularly limited.
And in a displayed interface editing form or including a main editing field corresponding to the configured first field information of the main parameter and a sub editing field corresponding to the second field information of the sub parameter.
In the embodiment of the invention, a current execution end acquires an interface editing form matched with a target interface to be tested from an editing form component, the interface editing form matched with the interface to be tested is displayed in the current execution end, and if a basic input control is configured in a blank main editing field in field information of a main parameter, the basic input control is displayed in the editing form of the interface; if the white main editing field in the field information of the main parameter is configured with the date input vue component, the date input vue component is displayed in the editing form of the interface, and the embodiment of the invention is not particularly limited. When the sub-edit field is displayed, if a basic input control is configured in the blank sub-edit field in the field information of the sub-parameter, displaying the basic input control in an edit form of the interface; and if the blank child editing field in the field information of the child parameter is configured with the date input vue component, displaying the date input vue component in the editing form of the interface, which is not specifically limited in the embodiment of the invention.
It should be noted that, in order to make the master-slave structure of the parameter displayed more clearly, a recursive component is configured in the interface editing form to perform recursive display on the master parameter and the associated sub-parameters, when an expansion control instruction of the recursive component is received, the associated sub-parameter information is displayed, and when a retraction control instruction of the recursive component is received, only the master parameter information is displayed.
In another embodiment of the present invention, for further limitation and description, the step of configuring the interface field parameter in the interface parameter of the target interface to be tested by the edit form component further includes, before the configuring of the interface to be tested is completed, the method further includes:
establishing a butt joint relation between the editing form component and the interface testing component;
in the embodiment of the present invention, in order to smoothly acquire specific data of an interface field parameter input by a user in an interface editing form in an interface testing component, a current execution end establishes a docking relationship between the editing form component and the interface testing component, where the docking relationship is used to configure the interface field parameter received by an editing field in the editing form component to an interface parameter in the interface testing component, so as to execute an interface test of the target interface to be tested. The interface field parameters received by the edit field are specific entry parameters of the user in the test stage, and the embodiment of the invention is not particularly limited.
Further, the configuring, by the edit form component, the interface field parameter in the interface parameter of the target interface to be tested, and the completing the configuration of the interface to be tested includes:
and transmitting the interface field parameters to the interface test component through the docking relationship, and instructing the interface test component to perform parameter configuration on the target interface to be tested according to the interface field parameters.
In the embodiment of the invention, the current execution end transmits the acquired interface field parameters input by the user to the interface test component by editing the butt joint relation between the form component and the interface test component, and the interface test component performs parameter configuration on the target interface to be tested according to the interface field parameters configured for the interface to be tested by the user, thereby completing the configuration work of the interface to be tested.
In another embodiment of the present invention, for further definition and illustration, the method further comprises:
if the operation control is displayed in the interface editing form, after a trigger instruction for the operation control is received, the sub-parameters corresponding to the operation control are displayed recursively according to different parameter formats, wherein the parameter formats include at least one of a time format, a text format, a numerical value format and a character string format.
In the embodiment of the present invention, in order to provide a user with flexible configuration operation on interface parameters and improve the efficiency of parameter configuration, a current execution end configures and displays an operation control in an interface editing form, and detects the editing condition of the operation control, and if the current execution end receives a trigger instruction of the operation control, sub-parameters corresponding to the operation control are recursively displayed according to the content of the instruction, where the sub-parameter formats include, but are not limited to, a time format, a text format, a numerical value format, and a character string format.
In another embodiment of the present invention, in order to make the operation of editing a form component more flexible, and facilitate a user to confirm operation contents when the operation is finished or cancel the operation at any time during the operation of the user, the method further includes:
401. configuring an operation confirmation trigger event and an operation cancellation trigger event in the editing form component, and binding operation information corresponding to the operation confirmation trigger event and the operation cancellation trigger event respectively;
in the embodiment of the present invention, the operation confirmation trigger event binds operation information of the operation confirmation, such as confirming a submission interface editing form, and the like, and the embodiment of the present invention is not particularly limited. The operation cancel triggering event binds operation information of operation cancel, and the current execution end configures an operation confirmation triggering event and an operation cancel triggering event in the edit table single component. The embodiment of the present invention is not limited specifically, for example, the editing operation on the interface field information is cancelled, the interface editing form is cancelled, and the like.
402. And when the operation confirmation triggering event or the operation cancellation triggering event is triggered in the editing form component, performing operation according to the operation information corresponding to the operation confirmation triggering event or the operation cancellation triggering event.
In the embodiment of the invention, if the current execution end detects that the operation confirmation trigger event is triggered, the current execution end operates according to the operation information of the operation confirmation trigger event. If the current execution end detects an operation confirmation trigger event for confirming the submission of the interface editing form, the interface editing form edited by the user is submitted according to the operation information of the interface editing form submitted by the current execution end. And if the current execution end detects that the operation cancellation trigger event is triggered, operating according to the operation information of the operation cancellation trigger event. If the current execution end detects an operation cancellation trigger event for canceling the interface editing form called by the user, the called interface editing form is closed according to the operation information for canceling the interface editing form called, and the canceling operation is completed.
Compared with the prior art, the embodiment of the invention provides a configuration method of a test interface, which comprises the steps of calling and displaying an interface editing form when an editing instruction of the test interface is received, wherein the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and configuration relations of editing fields in the interface editing form; acquiring a target interface to be tested, which is input through the interface editing form, and displaying an editing field matched with the target interface to be tested through the interface editing form; and acquiring interface field parameters for adding the editing field, and configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested. The method realizes the visual input of the interface parameter information of the target interface to be tested according to the field value types configured by each editing field in the form component during the test of the interface. Because the form of configuring the form component is adopted in the assembling stage of the interface parameters, compared with the traditional manual mode, the method not only saves a large amount of manpower and material resources, improves the configuring efficiency of the test interface, but also improves the accuracy of the assembling configuration of the interface parameters.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention provides a configuration apparatus for a test interface, and as shown in fig. 5, the apparatus includes:
the form calling module 51 is configured to, when receiving an editing instruction of a test interface, call and display an interface editing form, where the interface editing form is output by a preconfigured editing form component, and the editing form component is used to bind interface parameters of different interfaces to be tested and a configuration relationship between each editing field in the interface editing form;
the form display module 52 is configured to obtain a target interface to be tested, which is input through the interface editing form, and display an editing field matched with the target interface to be tested through the interface editing form;
and the parameter configuration module 53 is configured to acquire an interface field parameter for adding the edit field, and configure the interface field parameter in the interface parameter of the target interface to be tested through the edit form component, so as to complete configuration of the interface to be tested.
Further, the apparatus further comprises:
the interface analysis module is used for searching at least one interface to be tested in the whole test data and analyzing the interface parameters of the interface to be tested and the field information corresponding to the interface parameters;
the form component construction module is used for constructing an initial editing form component matched with the interface to be tested, wherein the initial editing form component comprises a plurality of blank editing fields and an interface editing form used for displaying the blank editing fields;
and the form component configuration module is used for configuring the field information in the blank editing field of the initial editing form component according to the field value type of the field information to obtain an editing form component.
Further, the form component configuration module further includes:
a first parameter configuration unit, configured to, when the interface parameter includes a main parameter, configure the field information in a blank editing field in the initial editing form component according to a first field value type of the main parameter, and configure an operation control for editing a sub-parameter, so as to generate an editing form component;
and a second parameter configuration unit, configured to, when the interface parameter includes a main parameter and a sub-parameter associated with the main parameter, configure first field information in a blank main edit field in the initial edit form component according to a first field value type of the main parameter, and configure second field information in a blank sub-edit field in the initial edit form component according to a second field value type of the sub-parameter, so as to generate an edit form component.
Further, the form display module 52 further includes:
the target acquisition unit is used for acquiring an interface editing form matched with the target interface to be detected from the editing form component;
and the target display unit is used for displaying the interface editing form, and the interface editing form comprises an editing field corresponding to the configured field information of the main parameter and the operation control, or a main editing field corresponding to the configured first field information of the main parameter and a sub editing field corresponding to the second field information of the sub parameter.
Further, the apparatus further comprises:
the interface test module is used for carrying out interface test on the target interface to be tested, and the interface test module is used for carrying out interface test on the target interface to be tested;
the parameter configuration module 53 further includes:
and the target parameter configuration unit is used for transmitting the interface field parameters to the interface test component through the butt joint relation and instructing the interface test component to perform parameter configuration on the target interface to be tested according to the interface field parameters.
Further, the apparatus further comprises:
and the triggering display module is used for recursively displaying the sub-parameters corresponding to the operation controls according to different parameter formats after receiving a triggering instruction for the operation control if the operation controls are displayed in the interface editing form, wherein the parameter formats include at least one of a time format, a text format, a numerical value format and a character string format.
Further, the apparatus further comprises:
the operation confirmation and cancellation configuration module is used for configuring an operation confirmation trigger event and an operation cancellation trigger event in the editing form component and binding operation information corresponding to the operation confirmation trigger event and the operation cancellation trigger event respectively;
and the operation confirmation and cancellation execution module is used for performing operation according to the operation information corresponding to the operation confirmation trigger event or the operation cancellation trigger event after detecting that the operation confirmation trigger event or the operation cancellation trigger event is triggered in the editing form component.
Compared with the prior art, the configuration device of the test interface is characterized in that an interface editing form is called and displayed when an editing instruction of the test interface is received, the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and the configuration relation of each editing field in the interface editing form; acquiring a target interface to be tested, which is input through the interface editing form, and displaying an editing field matched with the target interface to be tested through the interface editing form; and acquiring interface field parameters for adding the editing field, and configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested. The method realizes the visual input of the interface parameter information of the target interface to be tested according to the field value types configured by each editing field in the form component during the test of the interface. Because the form of configuring the form component is adopted in the assembling stage of the interface parameters, compared with the traditional manual mode, the method not only saves a large amount of manpower and material resources, improves the configuring efficiency of the test interface, but also improves the accuracy of the assembling configuration of the interface parameters.
According to an embodiment of the present invention, a storage medium is provided, where the storage medium stores at least one executable instruction, and the computer executable instruction can execute the configuration method of the test interface in any of the method embodiments described above.
Fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computer device.
As shown in fig. 6, the computer apparatus may include: a processor (processor) 602, a communication Interface 604, a memory 606, and a communication bus 608.
Wherein: processor 602, communication interface 604, and memory 606 communicate with one another via a communication bus 608.
A communication interface 604 for communicating with network elements of other devices, such as clients or other servers.
The processor 602 is configured to execute the program 610, and may specifically perform relevant steps in the foregoing embodiment of the method for processing public service data.
In particular, program 610 may include program code comprising computer operating instructions.
The processor 602 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the invention. The computer device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 606 for storing a program 610. Memory 606 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 610 may specifically be configured to cause the processor 602 to perform the following operations:
when an editing instruction of a test interface is received, an interface editing form is called and displayed, the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and configuration relations of editing fields in the interface editing form;
acquiring a target interface to be tested, which is input through the interface editing form, and displaying an editing field matched with the target interface to be tested through the interface editing form;
and acquiring interface field parameters for adding the editing field, and configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for configuring a test interface, comprising:
when an editing instruction of a test interface is received, an interface editing form is called and displayed, the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and configuration relations of editing fields in the interface editing form;
acquiring a target interface to be tested, which is input through the interface editing form, and displaying an editing field matched with the target interface to be tested through the interface editing form;
and acquiring interface field parameters for adding the editing field, and configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component to complete the configuration of the interface to be tested.
2. The method of claim 1, wherein prior to the invoking and display interface editing the form, the method further comprises:
searching at least one interface to be tested in the total test data, and analyzing interface parameters of the interface to be tested and field information corresponding to the interface parameters;
constructing an initial editing form component matched with the interface to be tested, wherein the initial editing form component comprises a plurality of blank editing fields and an interface editing form for displaying the blank editing fields;
and configuring the field information in a blank editing field of the initial editing form component according to the field value type of the field information to obtain an editing form component.
3. The method of claim 2, wherein said configuring the field information in a blank edit field of the initial edit form component according to a field value type of the field information, resulting in an edit form component comprises:
when the interface parameters comprise main parameters, configuring the field information in blank editing fields in the initial editing form assembly according to a first field value type of the main parameters, configuring operation controls for editing sub-parameters, and generating an editing form assembly; or the like, or a combination thereof,
when the interface parameters comprise main parameters and sub-parameters related to the main parameters, configuring first field information in a blank main editing field in the initial editing form component according to a first field value type of the main parameters, and configuring second field information in a blank sub-editing field in the initial editing form component according to a second field value type of the sub-parameters to generate an editing form component.
4. The method of claim 3, wherein displaying, by the edit form component, the edit field matching the target interface to be tested comprises:
acquiring an interface editing form matched with the target interface to be detected from the editing form component;
and displaying the interface editing form, wherein the interface editing form comprises an editing field corresponding to the configured field information of the main parameter and the operation control, or a main editing field corresponding to the configured first field information of the main parameter and a sub editing field corresponding to the second field information of the sub parameter.
5. The method according to any one of claims 1 to 4, wherein before configuring the interface field parameter in the interface parameter of the target interface to be tested by the edit form component, the method further comprises:
establishing a butt joint relation between the editing form component and an interface test component, wherein the butt joint relation is used for correspondingly configuring interface field parameters received by editing fields in the editing form component to the interface parameters in the interface test component so as to execute interface test of the target interface to be tested;
configuring the interface field parameter in the interface parameter of the target interface to be tested through the edit form component, wherein completing the configuration of the interface to be tested comprises:
and transmitting the interface field parameters to the interface test component through the docking relationship, and instructing the interface test component to perform parameter configuration on the target interface to be tested according to the interface field parameters.
6. The method of claim 1, further comprising:
if the operation control is displayed in the interface editing form, after a trigger instruction for the operation control is received, the sub-parameters corresponding to the operation control are recursively displayed according to different parameter formats, wherein the parameter formats comprise at least one of a time format, a text format, a numerical value format and a character string format.
7. The method of claim 1, further comprising:
configuring an operation confirmation trigger event and an operation cancellation trigger event in the editing form component, and binding operation information corresponding to the operation confirmation trigger event and the operation cancellation trigger event respectively;
and when the operation confirmation trigger event or the operation cancellation trigger event is triggered in the editing form component, performing operation according to operation information corresponding to the operation confirmation trigger event or the operation cancellation trigger event.
8. An apparatus for configuring a test interface, comprising:
the form calling module is used for calling and displaying an interface editing form when an editing instruction of the test interface is received, wherein the interface editing form is output by a pre-configured editing form component, and the editing form component is used for binding interface parameters of different interfaces to be tested and the configuration relation of each editing field in the interface editing form;
the form display module is used for acquiring a to-be-detected target interface input by the interface editing form and displaying an editing field matched with the to-be-detected target interface by the interface editing form;
and the parameter configuration module is used for acquiring the interface field parameters added to the editing field, configuring the interface field parameters in the interface parameters of the target interface to be tested through the editing form component and completing the configuration of the interface to be tested.
9. A storage medium having stored therein at least one executable software for performing operations corresponding to the configuration method of the test interface according to any one of claims 1 to 7.
10. A computer device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the configuration method of the test interface according to any one of claims 1-7.
CN202210925607.5A 2022-08-03 2022-08-03 Configuration method and device of test interface, storage medium and computer equipment Pending CN115185856A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210925607.5A CN115185856A (en) 2022-08-03 2022-08-03 Configuration method and device of test interface, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210925607.5A CN115185856A (en) 2022-08-03 2022-08-03 Configuration method and device of test interface, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN115185856A true CN115185856A (en) 2022-10-14

Family

ID=83520775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210925607.5A Pending CN115185856A (en) 2022-08-03 2022-08-03 Configuration method and device of test interface, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN115185856A (en)

Similar Documents

Publication Publication Date Title
CN110554958B (en) Graph database testing method, system, device and storage medium
CN113900958A (en) Test case script generation method, system, medium and electronic device
CN109614325B (en) Method and device for determining control attribute, electronic equipment and storage medium
CN111831542A (en) API application debugging method and device and storage medium
CN102982217B (en) The treating method and apparatus of silk-screen
CN111104181A (en) Webpage data filling system for visually editing task flow
CN108427645B (en) Method and system for realizing unattended operation in automatic test platform without command line interface
CN116384295B (en) Top file generation method and device, computer equipment and storage medium
CN113836014A (en) Interface testing method and device, electronic equipment and storage medium
CN115185856A (en) Configuration method and device of test interface, storage medium and computer equipment
CN115052054B (en) Communication message configuration method, device, readable storage medium and equipment
CN105447580A (en) Floating window based registration reservation method
CN116298340A (en) Product defect detection method and system based on task scheduling
CN115469849A (en) Service processing system, method, electronic device and storage medium
CN114757159A (en) Packaging development method and system of multifunctional data table component
CN110750308B (en) Task processing method and device, storage medium and electronic equipment
CN114564213A (en) Pre-installed software deployment method, system, terminal and storage medium
CN103678054B (en) Test method and device used for BACnet equipment
CN111401020A (en) Interface loading method and system and computing equipment
CN117234512B (en) Method, system, electronic equipment and storage medium for rapidly developing business
CN117034848B (en) Method and device for constructing chip design tool, storage medium and electronic device
CN113835755B (en) Method for realizing serial port control console in operating system-free environment
CN112379926A (en) Business system diagnosis method, system and related product
CN115904356A (en) Application program generation method and device, storage medium and computer equipment
CN114217802A (en) Page automatic generation method and device, server 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