CN116089267A - Test interface generation method, device, equipment and storage medium - Google Patents

Test interface generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN116089267A
CN116089267A CN202211538487.XA CN202211538487A CN116089267A CN 116089267 A CN116089267 A CN 116089267A CN 202211538487 A CN202211538487 A CN 202211538487A CN 116089267 A CN116089267 A CN 116089267A
Authority
CN
China
Prior art keywords
test
interface
configuration information
generating
parameter
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
CN202211538487.XA
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.)
Shandong Energy Chain Holding Co ltd
Original Assignee
Chezhubang Beijing 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 Chezhubang Beijing Technology Co Ltd filed Critical Chezhubang Beijing Technology Co Ltd
Priority to CN202211538487.XA priority Critical patent/CN116089267A/en
Publication of CN116089267A publication Critical patent/CN116089267A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure provides a test interface generating method, device, equipment and storage medium, where the method includes: acquiring a first parameter of an interface to be generated, and generating a configuration selection instruction based on the first parameter; responding to a configuration selection instruction, and generating an interaction interface based on preset test interface related configuration information; receiving at least one piece of configuration information associated with the first parameter through the interactive interface, calling and generating a code corresponding to a preset test interface in a code library based on the first parameter and the at least one piece of configuration information, and generating a test case; and filling the test parameters into the test cases to generate a test interface. The method and the device realize automatic generation of the test interface and improve script test efficiency.

Description

Test interface generation method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of software testing, and in particular, to a method, an apparatus, a device, and a storage medium for generating a test interface.
Background
The interface refers to the type of reference that defines the agreement. Other types implement interfaces to ensure that they support certain operations. The interface specifies the members that must be provided by the class or other interfaces that implement it. Similar to classes, interfaces may contain methods, attributes, indexers, and events as members.
At present, the test interface needs to be generated manually by a tester according to different test cases, which results in lower generation efficiency of the test interface, and large and tedious parameter quantity output by the tester.
The interfaces required by different test cases need to be completed independently, so that the interfaces are very slow to generate and the test efficiency is very low.
Disclosure of Invention
The present disclosure provides a test interface generating method, apparatus, device and storage medium, so as to at least solve the above technical problems in the prior art.
According to a first aspect of the present disclosure, there is provided a test interface generating method, including:
acquiring a first parameter of an interface to be generated, and generating a configuration selection instruction based on the first parameter;
responding to a configuration selection instruction, and generating an interaction interface based on preset test interface related configuration information;
receiving at least one piece of configuration information associated with the first parameter through the interactive interface, calling and generating a code corresponding to a preset test interface in a code library based on the first parameter and the at least one piece of configuration information, and generating a test case;
and filling the test parameters into the test cases to generate a test interface.
In an embodiment, the generating, in response to the configuration selection instruction, the interaction interface based on the preset configuration information related to the test interface includes:
and calling preset test interface related configuration information matched with the configuration selection instruction in the database, and correspondingly inserting the related configuration information into a preset page code to generate an interactive interface.
In an embodiment, the generating the test case includes:
generating a calling instruction based on the first parameter and at least one configuration information;
responding to the calling instruction, and selecting a preset configuration information code corresponding to at least one configuration information in a code library;
and inserting the first parameter into a corresponding position in a preset configuration information code to generate a test case.
In an embodiment, the method further comprises:
after the test cases are generated, determining the priority and the association relation between the test cases;
and setting the priority for each test case based on the priority and/or the association relation, and associating the test cases based on the association relation.
In one embodiment, the determining the priority between test cases includes:
pre-testing the test cases, defining the test cases with errors or verification of existence boundary values as medium priority, and defining other test cases as low priority; and/or
And degrading or upgrading the middle-priority test cases and the low-priority test cases according to the test frequency and the project requirements, and determining the priorities among the test cases.
In one embodiment, the test parameters are manually entered or recalled from historical data;
correspondingly, the method further comprises:
inserting different test parameters for different test cases to generate different test interfaces;
and calling corresponding test environments to run according to the test parameters to generate different test interfaces.
In an embodiment, the method further comprises:
after the test is completed, deleting the test interface and outputting a test result based on the test information corresponding to the test interface; wherein, the liquid crystal display device comprises a liquid crystal display device,
the test results include test reports and failure screenshots.
According to a second aspect of the present disclosure, there is provided a test interface generating apparatus, comprising:
the acquisition unit is used for acquiring a first parameter of the interface to be generated;
a first generation unit that generates a configuration selection instruction based on the first parameter;
the second generation unit is used for responding to the configuration selection instruction and generating an interaction interface based on preset test interface related configuration information;
a receiving unit, configured to receive, through an interaction interface, at least one configuration information associated with a first parameter;
the third generating unit is used for calling and generating codes corresponding to a preset test interface in a code library based on the first parameters and at least one piece of configuration information to generate test cases;
and the fourth generating unit is used for filling the test parameters into the test cases and generating a test interface.
In an embodiment, the second generating unit is further configured to:
and calling preset test interface related configuration information matched with the configuration selection instruction in the database, and correspondingly inserting the related configuration information into a preset page code to generate an interactive interface.
In an embodiment, the third generating unit is further configured to:
generating a calling instruction based on the first parameter and at least one configuration information;
responding to a calling instruction, and selecting a preset configuration information code corresponding to at least one configuration information in the code library;
and inserting the first parameter into a corresponding position in a preset configuration information code to generate a test case.
In an embodiment, the device is further configured to:
after the third unit generates test cases, determining priorities and association relations between the test cases;
and setting the priority for each test case based on the priority and/or the association relation, and associating the test cases based on the association relation.
In an embodiment, the test third generating unit is further configured to:
pre-testing the test cases, defining the test cases with errors or verification of existence boundary values as medium priority, and defining other test cases as low priority; and/or
And degrading or upgrading the middle-priority test cases and the low-priority test cases according to the test frequency and the project requirements, and determining the priorities among the test cases.
In an embodiment, the fourth generating unit is further configured to:
inserting different test parameters for different test cases to generate different test interfaces;
according to the test parameters, calling corresponding test environments to run to generate different test interfaces;
the test parameters are manually entered or invoked from historical data.
In an embodiment, the device further comprises:
the deleting unit is used for deleting the test interface and outputting a test result based on the test information corresponding to the test interface after the test is completed; wherein, the liquid crystal display device comprises a liquid crystal display device,
the test results include test reports and failure screenshots.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the test interface generation method of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the steps of the test interface generation method of the present disclosure.
According to the test interface generation method, device and equipment and storage medium, the first parameters of the interface to be generated are acquired, the preset test interface related configuration information is called, and the interactive interface is generated.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings, in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a schematic diagram of an implementation flow of a test interface generation method according to an embodiment of the disclosure;
FIG. 2 shows a second implementation flow diagram of a test interface generation method according to an embodiment of the present disclosure;
FIG. 3 shows a schematic diagram of a test interface generation apparatus according to an embodiment of the present disclosure;
fig. 4 shows a schematic diagram of the test interface electronic device of the present embodiment.
Detailed Description
In order to make the objects, features and advantages of the present disclosure more comprehensible, the technical solutions in the embodiments of the present disclosure will be clearly described in conjunction with the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
Fig. 1 shows a schematic diagram of an implementation flow of a test interface generating method according to an embodiment of the present disclosure, and as shown in fig. 1, the implementation flow of the test interface generating method according to an embodiment of the present disclosure includes the following steps:
step 101, obtaining a first parameter of an interface to be generated, and generating a configuration selection instruction based on the first parameter.
In this embodiment, the first parameter refers to information related to the interface, including an interface name, an interface call path, an interface environment, an encryption mode, and the like. The first parameter may be preset in a database, and the related information is grabbed by a grabbing tool; the relevant information can also be acquired by user input. When the system detects that the first parameter input is completed, a configuration selection instruction is generated and sent to the database.
The interface environment is set by the user, and the environment configuration comprises: MAC, IOS, android, python, crontab.
Step 102, responding to the configuration selection instruction, and generating an interactive interface based on preset test interface related configuration information.
In this embodiment, the preset configuration information related to the test interface includes: the method comprises the steps of testing environment channels, global variables, global configuration parameters, grouping identification and the like, calling preset test interface related configuration information matched with configuration selection instructions in a database in response to the configuration selection instructions, and correspondingly inserting the related configuration information into preset page codes to generate an interaction interface.
Step 103, receiving at least one configuration information associated with the first parameter through the interaction interface, and calling and generating codes corresponding to the preset test interface in a code library based on the first parameter and the at least one configuration information to generate test cases.
In this embodiment, the interaction interface includes the preset configuration information options related to the test interface, preferably, the user selects, through the generated interaction interface, configuration information corresponding to the first parameter in the preset configuration information of the test interface, and after the interaction interface detects that the user completes selection of the configuration information, the interaction interface invokes a code corresponding to the configuration information from the code library according to the configuration information selected by the user, and inserts the first parameter into a corresponding position in the preset configuration information code, so as to generate the test case.
And 104, filling the test parameters into the test cases to generate a test interface.
In this embodiment, preferably, the user inserts different test parameters into different test cases through the interactive interface according to the test requirement, so as to generate the test interface. The same test case can generate different test interfaces by inputting different test parameters, and the test parameters are manually input by a user or required test parameters are called from historical data.
Fig. 2 shows a second implementation flow chart of the test interface generating method according to the embodiment of the present disclosure, and as shown in fig. 2, the implementation flow chart of the test interface generating method according to the embodiment of the present disclosure includes the following steps:
step 201, obtaining relevant information of a test interface.
In this embodiment, the user sets relevant information of the test interface according to the test requirement, including the interface name, the interface call path, the interface environment, and the encryption mode. The related information can be input by a user or the related parameters can be grabbed by a grabbing tool.
Step 202, an interactive interface is generated.
In this embodiment, the system generates a configuration selection instruction according to the test interface related information, and the database calls the test interface related configuration information matched with the configuration selection instruction in response to the configuration selection instruction, where the test interface related configuration information is preset by a user, and includes: test environment channels, global variables, global configuration parameters, grouping identifications, etc.
In this embodiment, the system inserts the called related information of the test interface into a preset page code correspondingly to generate an interactive interface, where the interactive interface includes test interface configuration options, and the test interface configuration options correspond to the test interface configuration information.
Step 203, selecting test interface configuration information.
In this embodiment, the user selects, according to the test requirement, the test interface configuration option corresponding to the test interface related information from the test interface configuration options through the interactive interface. And the interactive interface generates a code calling instruction according to the test interface configuration options selected by the user and the test interface related information.
Step 204, calling code to generate test cases.
In this embodiment, in response to the code calling instruction, the code library calls, from the code library, a basic code of the test interface configuration information corresponding to the test interface configuration option selected by the user and a code corresponding to the obtained test interface related information, and inserts the first parameter into a corresponding position in the preset configuration information code, so as to generate the test case.
Step 205, determining the priority and association relation of the test cases.
In this embodiment, the priorities are set for the test cases based on the priorities and/or the association relationships, and the test cases are associated based on the association relationships.
The method comprises the steps of pre-testing the generated test cases, screening test results, defining the test cases with errors or verification of existence boundary values in the test results as medium-priority test cases, defining the rest test cases as low-priority test cases, and/or upgrading or degrading the medium-priority test cases and the low-priority test cases according to project requirements and test frequencies, so that the generated test cases can be operated and expected test cases can be operated preferentially.
In this embodiment, in order to avoid mutual interference caused by test results during the test case running process, the association relationship between test cases needs to be determined.
Step 206, setting different test parameters in the test case, and generating a test interface.
In this embodiment, the required test parameters are obtained according to the project requirements, where the test parameters may be manually input, or may be historical test parameters included in the captured historical data. And inserting the obtained different required test parameters into the test case to generate a test interface of different test parameters corresponding to the test case.
In this embodiment, according to the input test parameters, different test interfaces generated by the corresponding test running environments are called.
Step 207, deleting the test interface and outputting the test result.
In this embodiment, after the operation of the test interface is finished, the generated test interface is deleted according to the determined association relationship between the test cases and the test information corresponding to the test interface. Wherein the test information includes: user identification information and test list number, the user identification information includes: handset number, account information, etc.
In this embodiment, after the operation of the test interface is finished, the test result information is output, where the test result information includes a test report and a test failure screenshot, and preferably, the test result information is output through an enterprise WeChat.
Fig. 3 shows a schematic structural diagram of a test interface generating device according to an embodiment of the present disclosure, and as shown in fig. 3, the test interface generating device according to an embodiment of the present disclosure includes:
an obtaining unit 301, configured to obtain a first parameter of an interface to be generated.
The first generation unit 302 generates a configuration selection instruction based on the first parameter.
The second generating unit 303 is configured to generate the interaction interface based on the preset test interface related configuration information in response to the configuration selection instruction.
The second generating unit is further configured to call preset test interface related configuration information matched with the configuration selection instruction in the database, and correspondingly insert the related configuration information into a preset page code to generate an interaction interface.
The receiving unit 304 is configured to receive, via the interaction interface, at least one configuration information related to the first parameter.
The third generating unit 305 invokes and generates a code corresponding to the preset test interface in the code library based on the first parameter and at least one configuration information, and generates a test case.
The third generating unit 305 is further configured to generate a call instruction based on the first parameter and the at least one configuration information, and select, in response to the call instruction, a preset configuration information code corresponding to the at least one configuration information in the code base; and inserting the first parameter into a corresponding position in a preset configuration information code to generate a test case.
The third generating unit 305 is further configured to determine priorities and association relationships between test cases after generating the test cases, set priorities for the test cases based on the priorities and/or the association relationships, and associate the test cases based on the association relationships. Pre-testing the test cases, defining the test cases with errors or verification of existence boundary values as medium priority, and defining other test cases as low priority; and/or degrading or upgrading the middle-priority test cases and the low-priority test cases according to the test frequency and the project requirements, and determining the priorities among the test cases.
The fourth generating unit 306 is configured to fill the test parameters into the test case, and generate a test interface.
The fourth generating unit 306 is further configured to manually input or call the test parameter from the history data; inserting different test parameters for different test cases to generate different test interfaces; and calling corresponding test environments to run according to the test parameters to generate different test interfaces.
A deleting unit 307, configured to delete the test interface and output a test result based on the test information corresponding to the test interface after the test is completed; the test result comprises a test report and a failure screenshot.
In an exemplary embodiment, the acquisition unit 301, the first generation unit 302, the second generation unit 303, the reception unit 304, the third generation unit 305, the fourth generation unit 306, the deletion unit 307 may be implemented by one or more central processing units (CPU, central Processing Unit), graphics processors (GPU, graphics Processing Unit), application specific integrated circuits (ASIC, application Specific Integrated Circuit), DSPs, programmable logic devices (PLD, programmable Logic Device), complex programmable logic devices (CPLD, complex Programmable Logic Device), field programmable gate arrays (FPGA, field-Programmable Gate Array), general purpose processors, controllers, microcontrollers (MCU, micro Controller Unit), microprocessors (Microprocessor), or other electronic components.
The specific manner in which the various modules and units perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
Fig. 4 shows a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 4, the apparatus 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the respective methods and processes described above, such as a test interface generation method. For example, in some embodiments, the test interface generation method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 800 via ROM802 and/or communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the test interface generation method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the test interface generation method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it is intended to cover the scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (16)

1. A method for generating a test interface, the method comprising:
acquiring a first parameter of an interface to be generated, and generating a configuration selection instruction based on the first parameter;
responding to the configuration selection instruction, and generating an interaction interface based on preset test interface related configuration information;
receiving at least one piece of configuration information associated with the first parameter through the interaction interface, and calling and generating codes corresponding to the preset test interface in a code library based on the first parameter and the at least one piece of configuration information to generate test cases;
and filling the test parameters into the test cases to generate a test interface.
2. The method of claim 1, wherein generating an interactive interface based on preset test interface related configuration information in response to the configuration selection instruction comprises:
and calling preset test interface related configuration information matched with the configuration selection instruction in a database, and correspondingly inserting the related configuration information into a preset page code to generate an interactive interface.
3. The method of claim 1, wherein the generating test cases comprises:
generating a calling instruction based on the first parameter and the at least one configuration information;
responding to the calling instruction, and selecting a preset configuration information code corresponding to the at least one configuration information in the code library;
and inserting the first parameter into a corresponding position in the preset configuration information code to generate a test case.
4. The method according to claim 1, wherein the method further comprises:
after the test cases are generated, determining the priority and the association relation between the test cases;
and setting the priority for each test case based on the priority and/or the association relation, and associating the test cases based on the association relation.
5. The method of claim 4, wherein determining the priority between test cases comprises:
pre-testing the test cases, defining the test cases with errors or verification of existence boundary values as medium priority, and defining other test cases as low priority; and/or
And degrading or upgrading the test cases with medium priority and the test cases with low priority according to the test frequency and the project requirements, and determining the priorities among the test cases.
6. The method of claim 1, wherein the test parameters are entered manually or invoked from historical data;
correspondingly, the method further comprises:
inserting different test parameters for different test cases to generate different test interfaces;
and according to the test parameters, calling corresponding test environments to operate the different test interfaces.
7. The method according to claim 1, wherein the method further comprises:
after the test is completed, deleting the test interface and outputting a test result based on the test information corresponding to the test interface; the test result comprises a test report and a failure screenshot.
8. A test interface generation apparatus, the apparatus comprising:
the acquisition unit is used for acquiring a first parameter of the interface to be generated;
a first generation unit that generates a configuration selection instruction based on the first parameter;
the second generation unit is used for responding to the configuration selection instruction and generating an interaction interface based on preset test interface related configuration information;
a receiving unit, configured to receive, through the interaction interface, at least one configuration information associated with the first parameter;
the third generating unit is used for calling and generating codes corresponding to the preset test interfaces in a code library based on the first parameters and at least one piece of configuration information to generate test cases;
and the fourth generating unit is used for filling the test parameters into the test cases and generating a test interface.
9. The apparatus of claim 8, wherein the second generating unit is further configured to:
and calling preset test interface related configuration information matched with the configuration selection instruction in a database, and correspondingly inserting the related configuration information into a preset page code to generate an interactive interface.
10. The apparatus of claim 8, wherein the third generating unit is further configured to:
generating a calling instruction based on the first parameter and the at least one configuration information;
responding to the calling instruction, and selecting a preset configuration information code corresponding to the at least one configuration information in the code library;
and inserting the first parameter into a corresponding position in the preset configuration information code to generate a test case.
11. The apparatus of claim 8, wherein the apparatus is further configured to:
after the third test case is generated, determining the priority and the association relation between the test cases;
and setting the priority for each test case based on the priority and/or the association relation, and associating the test cases based on the association relation.
12. The apparatus of claim 11, wherein the third generating unit is further configured to:
pre-testing the test cases, defining the test cases with errors or verification of existence boundary values as medium priority, and defining other test cases as low priority; and/or
And degrading or upgrading the test cases with medium priority and the test cases with low priority according to the test frequency and the project requirements, and determining the priorities among the test cases.
13. The apparatus of claim 8, wherein the fourth generation unit is further configured to:
inserting different test parameters for different test cases to generate different test interfaces;
according to the test parameters, calling corresponding test environments to operate the different test interfaces; wherein the test parameters are manually entered or invoked from historical data.
14. The apparatus of claim 8, wherein the apparatus further comprises:
the deleting unit is used for deleting the test interface and outputting a test result based on the test information corresponding to the test interface after the test is completed; wherein, the liquid crystal display device comprises a liquid crystal display device,
the test results include test reports and failure screenshots.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the test interface generation method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the steps of the test interface generation method according to any one of claims 1-7.
CN202211538487.XA 2022-12-02 2022-12-02 Test interface generation method, device, equipment and storage medium Pending CN116089267A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211538487.XA CN116089267A (en) 2022-12-02 2022-12-02 Test interface generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211538487.XA CN116089267A (en) 2022-12-02 2022-12-02 Test interface generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116089267A true CN116089267A (en) 2023-05-09

Family

ID=86211097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211538487.XA Pending CN116089267A (en) 2022-12-02 2022-12-02 Test interface generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116089267A (en)

Similar Documents

Publication Publication Date Title
WO2019161619A1 (en) Automatic interface test method and apparatus, and device and computer-readable storage medium
CN109684188B (en) Test method and device
EP4195108A1 (en) Method and apparatus for generating and applying deep learning model based on deep learning framework
CN114090365A (en) Method, device and equipment for performing function test by using dynamic link library
CN113821433A (en) Method, device, equipment, medium and product for testing cloud mobile phone application program
CN116126719A (en) Interface testing method and device, electronic equipment and storage medium
CN116089267A (en) Test interface generation method, device, equipment and storage medium
CN115481594B (en) Scoreboard implementation method, scoreboard, electronic equipment and storage medium
CN115269431A (en) Interface testing method and device, electronic equipment and storage medium
CN113590498B (en) Method and system for testing application starting time of desktop operating system
CN115309730A (en) Data auditing method and device, electronic equipment and storage medium
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
CN114124769A (en) Base station testing method and device, electronic equipment and storage medium
CN112860419A (en) Multi-instance task execution method and device, terminal equipment and computer storage medium
CN113836016B (en) Writing interface storage quality testing method, system, electronic equipment and storage medium
CN113535187B (en) Service online method, service updating method and service providing method
CN115374010A (en) Function testing method, device, equipment and storage medium
CN114327577A (en) Code change determining method and device, electronic equipment and storage medium
CN115312114A (en) Method, apparatus, device and medium for testing RAM
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium
CN117312171A (en) Code testing method, device, electronic equipment and computer readable storage medium
CN117931155A (en) Code generation method, device, equipment and medium
CN115686479A (en) File creation method and related device
CN116610582A (en) Test range determining method and device, electronic equipment and medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240411

Address after: Room 2101, Block B, Platinum Plaza, 5-15 Wenling Road, Laoshan District, Qingdao, Shandong 266000

Applicant after: Shandong Energy Chain Holding Co.,Ltd.

Country or region after: China

Address before: Unit 3805-3815, 38th Floor, Building 8, No. 91 Jianguo Road, Chaoyang District, Beijing, 100123

Applicant before: CHEZHUBANG (BEIJING) TECHNOLOGY Co.,Ltd.

Country or region before: China