CN116701224A - Method, device, equipment and storage medium for generating front-end interface test code - Google Patents

Method, device, equipment and storage medium for generating front-end interface test code Download PDF

Info

Publication number
CN116701224A
CN116701224A CN202310747212.5A CN202310747212A CN116701224A CN 116701224 A CN116701224 A CN 116701224A CN 202310747212 A CN202310747212 A CN 202310747212A CN 116701224 A CN116701224 A CN 116701224A
Authority
CN
China
Prior art keywords
configuration file
information
component
interface
determining
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
CN202310747212.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.)
Cosmoplat Industrial Intelligent Research Institute Qingdao Co Ltd
Original Assignee
Haiheng Digital Technology Qingdao Co ltd
Cosmoplat Industrial Intelligent Research Institute Qingdao 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 Haiheng Digital Technology Qingdao Co ltd, Cosmoplat Industrial Intelligent Research Institute Qingdao Co Ltd filed Critical Haiheng Digital Technology Qingdao Co ltd
Priority to CN202310747212.5A priority Critical patent/CN116701224A/en
Publication of CN116701224A publication Critical patent/CN116701224A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

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 invention discloses a method, a device, equipment and a storage medium for generating a front-end interface test code. The method comprises the steps of obtaining a logic configuration file and an interface design configuration file of a product; determining product logic information from the product logic configuration file and determining interface component description information from the interface design configuration file; and generating test codes according to the product logic information and the interface component description information. The technical scheme of the invention improves the walking efficiency and the comprehensiveness of the test codes. The invention is applied to web page development, such as in the aspect of industrial Internet, and helps to improve the interface reduction degree of large-screen visualization of the data management platform and the establishment efficiency of the visualization of the industrial Internet data management platform, so that the industrial Internet data is more quickly presented on a visual and easily-understood data large screen.

Description

Method, device, equipment and storage medium for generating front-end interface test code
Technical Field
The present invention relates to the field of interface testing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a front end interface test code.
Background
The front-end development flow is that a product manager designs a product prototype first, the product manager designs the product prototype, a UI designer designs a UI manuscript through a product prototype diagram, and an interactive designer performs interactive design together according to the UI manuscript and the product prototype diagram. The front end firstly knows the logic of the product through the product prototype graph, then makes a general front end page according to the UI and the interactive design draft, then completes the logic of the product, and then optimizes the UI to improve the reduction degree of the front end interface.
In a general development flow, after the front end finishes development, a UI (User Interface) and an interaction designer are required to perform front end Interface walking, and the front end Interface reduction degree is checked. The designer can look at the front-end developed interface and the design drawing to compare and find out the place with the design drawing having low in-out or reduction degree. The front-end engineer will modify the questions recorded by the post-walk designer. And after modification, UI walking is performed. Often one UI walk is insufficient, and each time the front end engineer modifies a UI problem, a new UI problem may result, which is an inefficient process. After finishing the product logic prototype graph, the product manager can explain the developer, then the test engineer can write the test case according to the prototype graph, and the front end can also carry out unit test in the development to ensure that the program accords with the product logic. The product manager may also participate in the testing work after the development work is completed. Sometimes development and test engineers ignore special cases and user input scenarios, resulting in incomplete test cases.
The inventors have found that the following drawbacks exist in the prior art in the process of implementing the present invention:
the manual walking efficiency is low, the comparison of naked eyes can ignore some fine parts, and a great deal of labor is consumed; sometimes development and test engineers ignore special cases and user input scenarios, resulting in incomplete test cases.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for generating a front-end interface test code, which are used for improving the walking efficiency and improving the comprehensiveness of the test code.
According to an aspect of the present invention, there is provided a method for generating a front-end interface test code, the method comprising:
obtaining a logic configuration file and an interface design configuration file of a product;
determining product logic information from the product logic configuration file, and determining interface component description information from the interface design configuration file;
and generating test codes according to the product logic information and the interface component description information.
According to another aspect of the present invention, there is provided a device for generating a front-end interface test code, the device comprising:
the configuration file acquisition module is used for acquiring a product logic configuration file and an interface design configuration file;
the product information acquisition module is used for determining product logic information from the product logic configuration file and determining interface component description information from the interface design configuration file;
and the test code generation module is used for generating test codes according to the product logic information and the interface component description information.
According to another aspect of the present invention, there is provided an electronic apparatus including:
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 a computer program executable by the at least one processor to enable the at least one processor to perform the method of generating front end interface test code according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the method for generating a front end interface test code according to any of the embodiments of the present invention when executed.
According to the technical scheme, the logic configuration file and the interface design configuration file of the product are obtained; determining product logic information from the product logic configuration file and determining interface component description information from the interface design configuration file; the technical means for generating the test code according to the product logic information and the interface component description information solves the problems of low manual walking efficiency and incomplete test cases caused by manual neglect, improves the walking efficiency and improves the comprehensiveness of the test code.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1a is a flowchart of a method for generating a front end interface test code according to a first embodiment;
FIG. 1b is a flowchart of an application of a method for generating a front end interface test code according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for generating a front end interface test code according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a generating device of a front-end interface test code according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a method for generating a front-end interface test code according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It is noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and in the foregoing figures, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1a is a flowchart of a method for generating a front-end interface test code according to an embodiment of the present invention, where the method may be performed by a device for generating a front-end interface test code, and the device for generating a front-end interface test code may be implemented in hardware and/or software, and the device for generating a front-end interface test code may be configured in a test code generating tool in a computer device or a server. As shown in fig. 1a, the method comprises:
s110, obtaining a product logic configuration file and an interface design configuration file.
The product logic configuration file may be a file generated by a product manager according to the logic requirement of the front-end interface, where the product logic configuration file may include logic information of occurrence of an event on the front-end interface, for example, after inputting a target operation on the front-end interface, a target operation result is displayed on the front-end interface, and this process is the logic information of occurrence of the event. The product manager can configure all logic relations between the input scenes and the output results in the product logic configuration file according to the front-end interface requirement. The product logic configuration file may be, for example, a fig file obtained using a Figma design.
The interface design configuration file may be a file generated by the UI together with the interactive designer according to the front-end interface appearance requirement and the front-end interface logic requirement. The interface design configuration file may include an appearance design of the front-end main interface, and may further include an appearance design of the front-end auxiliary interface after the front-end interface changes along with the change of the interface logic. For example, the UI and interaction designer now designs a front-end interface diagram of a website, where the user opens the front page of the website may be referred to as the front-end main interface, and the interface changes after the user clicks a button on the front page of the website, and the changed interface may become the front-end auxiliary interface. Obviously, the UI and interaction designer needs to configure the front-end interface logic information in addition to the information of the front-end interface appearance in the interface design configuration file. The interface design configuration file may be, for example, a fig file obtained using a Figma design.
It should be noted that, the product logic configuration file may focus on configuring content information of the output result corresponding to the input scene, and the interface design configuration file may focus on configuring component attribute information such as appearance, position, and the like of the component in addition to configuring interface logic information.
In this embodiment, in order to reduce the manual participation in the test process and improve the working efficiency, the product logic configuration file generated by the product manager and the interface design configuration file generated by the UI and the interactive designer may be input into the computer device or the server executing the embodiment, and the test code generating tool configured therein automatically retrieves the product logic configuration file and the interface design configuration file to generate the test code.
S120, determining product logic information from the product logic configuration file and determining interface component description information from the interface design configuration file.
The product logic information may refer to a process of obtaining a corresponding output result through an input action of the front-end interface. I.e. the product logic information may comprise event logic information. For example, a process of popping up a content box after a button is clicked on a front-end interface. The interface component description information can comprise description information of a front-end main interface and a front-end auxiliary interface forming a component, and can also comprise logic information of an event of the component.
In this embodiment, the test code generation tool needs to determine product logic information from the product logic configuration file and determine interface component description information from the interface design configuration file in the process of generating the test code.
S130, generating test codes according to the product logic information and the interface component description information.
In this embodiment, the test code generating tool may automatically generate a test code according to the product logic information and the interface component description information, so that the test code may be used to test the front-end interface developed by the front-end development engineer, so as to determine whether the information such as logic and components of the front-end interface is matched with the product logic information and the interface component description information.
According to the technical scheme, the logic configuration file and the interface design configuration file of the product are obtained; determining product logic information from the product logic configuration file and determining interface component description information from the interface design configuration file; the technical means for generating the test code according to the product logic information and the interface component description information solves the problems of low manual walking efficiency and incomplete test cases caused by manual neglect, improves the walking efficiency and improves the comprehensiveness of the test code.
In order to enable those skilled in the art to better understand the method for generating the front end interface test code according to the present embodiment, fig. 1b is a flowchart of an application of the method for generating the front end interface test code according to the first embodiment.
Using Figma to design a product logic output product prototype, a logic flow chart and other fig files by a product manager; the UI and interaction designer uses Figma to generate a fig file designed by a front-end interface; the product manager configures all test logic cases such as user input scenes and output results; the UI and the interaction designer name each designed component, configure ID (Identity document, identity number) and other identifiers, and configure interface requirements such as what effect the click event has after occurrence, event occurrence sequence and the like; the fig files configured by the product manager and the designer are imported to generate test codes, so that the test codes are utilized to complete the test.
Example two
Fig. 2 is a flowchart of another method for generating a front-end interface test code according to the second embodiment of the present invention, where the operation of "determining product logic information from a product logic configuration file and determining interface component description information from an interface design configuration file" is refined on the basis of the foregoing embodiment. As shown in fig. 2, the method includes:
s210, obtaining a product logic configuration file and an interface design configuration file.
S220, identifying at least one component identification keyword from the product logic configuration file.
Wherein, the component identification keyword may refer to a keyword for representing an identity of the interface component.
S230, determining event logic information corresponding to each component identification keyword from the product logic configuration file based on each component identification keyword, and determining the event logic information as product logic information.
In an alternative embodiment, based on the component identification keywords, determining event logic information corresponding to the component identification keywords from the product logic configuration file may include: based on the identification keyword of the current processing component, identifying input scene information and output result information corresponding to the identification keyword of the current processing component from the product logic configuration file; and determining event logic information corresponding to the identification keyword of the current processing component according to the input scene information and the output result information.
The input scene information may be action information such as clicking on the front-end interface. The output result information may be a result corresponding to the input scene information. The output result information may include an output form and output contents. The product manager may configure all possible input scenarios and output results involved in the product logic configuration file when generating the product logic configuration file.
By way of example, some examples of configuration content and meaning in a product logic configuration file are given below:
IF button (id= "startJob") Pressed THEN open MODAL at Position Middle and sample= "task start" and sample content= "task has started, please return to list view task status". The meaning of the configuration content of this section is: if the button with id of startJob is clicked, then the popup window is in the middle of the interface, the title of the popup window is "task start", the content is "task already started", please return to the list to view the task state ".
IF button (id= "delete job") Pressed THEN pop MESSAGE at Position Top and message content= "deleted task". The meaning of the configuration content of this section is: if the button with id of "delete Job" is clicked, then a prompt is popped up on the screen, and the prompt content is "deleted task".
IF button (id= "addProjectForm") Pressed THEN open DRAWER at Position Right and drawer. Title= "add item form" and drawer. Formline1= "item name" and drawer. Formline2= "item start date" and drawer. Formline3= "item end date" and drawer. Formline4= "item duration" and drawer. Formline5= "item description". The meaning of the configuration content of this section is: if the button with id of addProjectform is clicked, then the drawer pops up on the right side of the interface, the item of the popup window is "add item form", the item 1 of the drawer form is "item name", the item 2 of the drawer form is "item start date", the item 3 of the drawer form is "item end date", the item 4 of the drawer form is "item duration", and the item 5 of the drawer form is "item description".
Drawer.formline1rule=length >2& & LENGTH <10. The meaning of the configuration content of this section is: rule 1 of the drawer form is that the item description length must be greater than 2 and less than 10.
Drawer.formline2rule=date-! < CURRENT DATE. The meaning of the configuration content of this section is: the rule of the 2 nd item of the drawer form is that the project start date cannot be less than or equal to the current date.
Drawer.formline3 rule=date > CURRENT date+1. The meaning of the configuration content of this section is: the rule 3 in the drawer form is that the end date of the project needs to be greater than the date +1 of the current date.
Drawer.formliner 4 rule=length >2& & LENGTH <365. The meaning of the configuration content of this section is: rule 4 of the drawer form must be greater than 2 and less than 365 for the item description length.
Drawer.formline5rule=length <100. The meaning of the configuration content of this section is: the rule 5 of the drawer form is that the item description length must be less than 100.
Where id is the identification key, startJob, deleteJob and addProjectform are component identification keys. One input scene information corresponding to startJob is button (id= "startJob") Pressed, the corresponding output result information is open MODAL at Position Middle and sample= "task start" and sample content= "task started", please return to list view task state ", the output form is popup according to the output result information, the popup title in the output content (popup title and popup content) is task start, the popup content is task started, and the list view task state is please return, so that event logic information corresponding to startJob is obtained according to the input scene information and the output result information. The input scene information, the output result information and the event logic information corresponding to the deleteJob and the addProjectForm respectively can be obtained in the same way.
S240, identifying at least one main component identification keyword from the interface design configuration file.
Wherein the primary component identification keyword may be used to determine components contained within the primary interface.
S250, determining main component description information corresponding to each main component from the interface design configuration file based on the main component identification keywords.
Wherein the main component description information may include attribute description information of the main component.
Specifically, the attribute description information of the current processing main component can be determined from the interface design configuration file based on the identification keyword of the current processing main component; the attribute description information comprises the position information of the current processing main component on the front end interface and the appearance design information of the current processing main component.
For example, clicking a certain button of the front interface is displayed at the upper, middle, lower, left or right position of the front interface, which is position information; the button is in an oval or rectangular pattern, the size of the button being design information.
Optionally, based on the identification keywords of each main component, the occurrence sequence information of the target event corresponding to each main component can be obtained in the interface design configuration file.
For example, for service 1, it is necessary that main assembly 1, main assembly 2 and main assembly 3 are completed together, and the order of completing service 1 is to click first main assembly 1, then main assembly 2, then main assembly 3, and if the order of clicking is wrong, service 1 cannot be implemented. Thus, the order of "click on Main component 1, click on Main component 2, and click on Main component 3" can be configured in the interface design configuration file.
S260, determining auxiliary component description information corresponding to each main component from the interface design configuration file based on the main component identification keywords.
Wherein the sub-component description information may include attribute description information of the sub-component.
Specifically, based on the identification keyword of the main component currently processed, determining attribute description information of each auxiliary component corresponding to the main component currently processed from the interface design configuration file; wherein, each auxiliary component appears after the current processing main component generates a target event; the attribute description information of each sub-assembly includes position information of each sub-assembly at the front end interface, appearance design information of each sub-assembly, and occurrence sequence information of each sub-assembly.
For example, after clicking the button 1 of the front interface, the pop-up window 1 is displayed first, and then the pop-up window 2 is displayed. The popup window 1 displays the upper, middle, lower, left or right position of the front interface, which is position information; the popup window 1 is in an oval or rectangular pattern, and the size of the popup window 1 is appearance design information; "display popup 1 first, then display popup 2" may be the occurrence sequence information of the auxiliary component.
S270, generating test codes according to the event logic information, the main component description information and the auxiliary component description information.
In this embodiment, the test code may be generated using event logic information included in the product logic information, main component description information included in the interface component description information, and sub component description information.
When the test code generating tool processes the fig file of the product logic configuration file and the fig file of the interface design configuration file, the most comprehensive test code can be produced because the product and the design interaction are added into the test code writing, and the time for a developer to write the test code can be reduced. Because the test codes generated by the design drawing can directly indicate which CSS class names or components on the interface and the design drawing have access, the difference between the front-end interface and the design drawing does not need to be observed manually, the communication cost with a designer is greatly reduced, and the UI walking efficiency of the front-end interface is improved.
According to the technical scheme, the logic configuration file and the interface design configuration file of the product are obtained; identifying at least one component identification keyword from the product logic configuration file; determining event logic information corresponding to each component identification keyword from a product logic configuration file based on each component identification keyword, and determining the event logic information as product logic information; identifying at least one primary component identification keyword from the interface design configuration file; determining main component description information corresponding to each main component from the interface design configuration file based on the main component identification keywords; determining auxiliary component description information corresponding to each main component from the interface design configuration file based on the main component identification keywords; the technical means for generating the test code according to the event logic information, the main component description information and the auxiliary component description information solves the problems that the manual walking checking efficiency is low and the test case is not comprehensive due to manual neglect, improves the walking checking efficiency and improves the comprehensiveness of the test code.
Example III
Fig. 3 is a schematic structural diagram of a generating device for a front end interface test code according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a profile acquisition module 310, a product information acquisition module 320, and a test code generation module 330. Wherein:
a configuration file obtaining module 310, configured to obtain a product logic configuration file and an interface design configuration file;
a product information obtaining module 320, configured to determine product logic information from the product logic configuration file, and determine interface component description information from the interface design configuration file;
and the test code generating module 330 is configured to generate a test code according to the product logic information and the interface component description information.
According to the technical scheme, the logic configuration file and the interface design configuration file of the product are obtained; determining product logic information from the product logic configuration file and determining interface component description information from the interface design configuration file; the technical means for generating the test code according to the product logic information and the interface component description information solves the problems of low manual walking efficiency and incomplete test cases caused by manual neglect, improves the walking efficiency and improves the comprehensiveness of the test code.
Optionally, the product information obtaining module 320 may include:
a first keyword recognition unit, configured to recognize at least one component identification keyword from the product logic configuration file;
and the event logic information determining unit is used for determining event logic information corresponding to each component identification keyword from the product logic configuration file based on each component identification keyword, and determining the event logic information as the product logic information.
Optionally, the event logic information determining unit may specifically be configured to:
based on the identification keyword of the current processing component, identifying input scene information and output result information corresponding to the identification keyword of the current processing component from the product logic configuration file;
wherein the output result information comprises an output form and output content;
and determining event logic information corresponding to the identification keyword of the current processing component according to the input scene information and the output result information.
Optionally, the product information obtaining module 320 may further include:
a second keyword recognition unit, configured to recognize at least one main component identification keyword from the interface design configuration file;
the main component description information determining unit is used for determining main component description information corresponding to each main component from the interface design configuration file based on the main component identification keywords;
and the auxiliary component description information determining unit is used for determining auxiliary component description information corresponding to each main component from the interface design configuration file based on the identification keywords of the main components.
Optionally, the main component description information determining unit may specifically be configured to:
determining attribute description information of the current processing main component from the interface design configuration file based on the identification keyword of the current processing main component;
the attribute description information comprises the position information of the current processing main component on a front end interface and the appearance design information of the current processing main component.
Optionally, the auxiliary component description information determining unit may specifically be configured to:
determining attribute description information of each auxiliary component corresponding to the current processing main component from the interface design configuration file based on the identification keyword of the current processing main component;
wherein each auxiliary component appears after the current processing main component generates a target event; the attribute description information of each auxiliary component comprises position information of each auxiliary component on a front end interface, appearance design information of each auxiliary component and occurrence sequence information of each auxiliary component.
Optionally, the generating device of the front end interface test code further includes an event occurrence sequence information acquiring module, configured to:
based on the identification keywords of the main components, the occurrence sequence information of the target events corresponding to each main component is obtained from the interface design configuration file.
The device for generating the front-end interface test code provided by the embodiment of the invention can execute the method for generating the front-end interface test code provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of an electronic device 400 that may be used to implement an embodiment of the invention. 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. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), 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 inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 400 includes at least one processor 401, and a memory communicatively connected to the at least one processor 401, such as a Read Only Memory (ROM) 402, a Random Access Memory (RAM) 403, etc., in which the memory stores a computer program executable by the at least one processor, and the processor 401 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 402 or the computer program loaded from the storage unit 408 into the Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 may also be stored. The processor 401, the ROM 402, and the RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Various components in electronic device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, etc.; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Processor 401 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of processor 401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 401 performs the various methods and processes described above, such as the front end interface test code generation method.
In some embodiments, the method of generating the front end interface test code may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by processor 401, one or more steps of the method of generating front end interface test code described above may be performed. Alternatively, in other embodiments, processor 401 may be configured to perform the method of generating the front end interface test code in any other suitable manner (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.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program 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 the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage 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. Alternatively, the computer readable storage medium may be a machine readable signal medium. 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 an electronic device 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 a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. 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), blockchain networks, and the internet.
The computing system may include clients and servers. 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 can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
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 described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. The method for generating the front-end interface test code is characterized by comprising the following steps of:
obtaining a logic configuration file and an interface design configuration file of a product;
determining product logic information from the product logic configuration file, and determining interface component description information from the interface design configuration file;
and generating test codes according to the product logic information and the interface component description information.
2. The method of claim 1, wherein determining product logic information from the product logic configuration file comprises:
identifying at least one component identification keyword from the product logic profile;
and determining event logic information corresponding to each component identification keyword from the product logic configuration file based on each component identification keyword, and determining the event logic information as the product logic information.
3. The method of claim 2, wherein determining event logic information corresponding to each component identification keyword from the product logic configuration file based on each component identification keyword comprises:
based on the identification keyword of the current processing component, identifying input scene information and output result information corresponding to the identification keyword of the current processing component from the product logic configuration file;
wherein the output result information comprises an output form and output content;
and determining event logic information corresponding to the identification keyword of the current processing component according to the input scene information and the output result information.
4. The method of claim 1, wherein determining interface component description information from the interface design configuration file comprises:
identifying at least one primary component identification keyword from the interface design configuration file;
determining main component description information corresponding to each main component from the interface design configuration file based on the main component identification keywords;
and determining auxiliary component description information corresponding to each main component from the interface design configuration file based on the main component identification keywords.
5. The method of claim 4, wherein determining, based on each of the principal component identification keywords, principal component description information corresponding to each of the principal components from the interface design configuration file comprises:
determining attribute description information of the current processing main component from the interface design configuration file based on the identification keyword of the current processing main component;
the attribute description information comprises the position information of the current processing main component on a front end interface and the appearance design information of the current processing main component.
6. The method of claim 4, wherein determining secondary component description information corresponding to each primary component from the interface design configuration file based on the primary component identification keywords comprises:
determining attribute description information of each auxiliary component corresponding to the current processing main component from the interface design configuration file based on the identification keyword of the current processing main component;
wherein each auxiliary component appears after the current processing main component generates a target event; the attribute description information of each auxiliary component comprises position information of each auxiliary component on a front end interface, appearance design information of each auxiliary component and occurrence sequence information of each auxiliary component.
7. The method as recited in claim 4, further comprising:
based on the identification keywords of the main components, the occurrence sequence information of the target events corresponding to each main component is obtained from the interface design configuration file.
8. A front-end interface test code generating device, comprising:
the configuration file acquisition module is used for acquiring a product logic configuration file and an interface design configuration file;
the product information acquisition module is used for determining product logic information from the product logic configuration file and determining interface component description information from the interface design configuration file;
and the test code generation module is used for generating test codes according to the product logic information and the interface component description information.
9. An electronic device, the 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 a computer program executable by the at least one processor to enable the at least one processor to perform the method of generating the front end interface test code of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the method of generating the front end interface test code of any one of claims 1-7.
CN202310747212.5A 2023-06-21 2023-06-21 Method, device, equipment and storage medium for generating front-end interface test code Pending CN116701224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310747212.5A CN116701224A (en) 2023-06-21 2023-06-21 Method, device, equipment and storage medium for generating front-end interface test code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310747212.5A CN116701224A (en) 2023-06-21 2023-06-21 Method, device, equipment and storage medium for generating front-end interface test code

Publications (1)

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

Family

ID=87823740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310747212.5A Pending CN116701224A (en) 2023-06-21 2023-06-21 Method, device, equipment and storage medium for generating front-end interface test code

Country Status (1)

Country Link
CN (1) CN116701224A (en)

Similar Documents

Publication Publication Date Title
EP3839799A1 (en) Method, apparatus, electronic device and readable storage medium for translation
CN114445047A (en) Workflow generation method and device, electronic equipment and storage medium
EP3889770B1 (en) Mini program material processing
CN115469849B (en) Service processing system, method, electronic equipment and storage medium
CN114880498B (en) Event information display method and device, equipment and medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN116185389A (en) Code generation method and device, electronic equipment and medium
CN116089739A (en) Message pushing method, device, electronic equipment and storage medium
CN116701224A (en) Method, device, equipment and storage medium for generating front-end interface test code
CN113742501A (en) Information extraction method, device, equipment and medium
CN114610204B (en) Auxiliary device and method for data processing, storage medium and electronic equipment
CN114741072B (en) Page generation method, device, equipment and storage medium
EP4071690A2 (en) Method and apparatus for task information management, device and storage medium
CN115202538B (en) Menu configuration method and device, electronic equipment and storage medium
CN112948245B (en) Element debugging method, device, equipment, storage medium and program product
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
US20210216597A1 (en) Method and apparatus for processing mini app material, electronic device and medium
CN114564133A (en) Application program display method, device, equipment and medium
CN116991737A (en) Software testing method, system, electronic equipment and storage medium
CN113836291A (en) Data processing method, device, equipment and storage medium
CN117371416A (en) Project document generation method, device, equipment and storage medium
CN117453973A (en) Information recommendation method, device, equipment and medium
CN117785165A (en) Chart generation method and device based on large model and electronic equipment
CN117130524A (en) Interaction method, device, electronic equipment and storage medium
CN117193726A (en) Parallel design method and device of software, 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

Effective date of registration: 20240129

Address after: 266000 No. 1, Minshan Road, Qingdao area, China (Shandong) pilot Free Trade Zone, Qingdao, Shandong

Applicant after: CAOS industrial Intelligence Research Institute (Qingdao) Co.,Ltd.

Country or region after: China

Address before: Room 3203, Block D1, Phase 1, Innovation Park, No. 1, Weiyi Road, Keyuan, Laoshan District, Qingdao City, Shandong Province, 266101

Applicant before: Haiheng digital technology (Qingdao) Co.,Ltd.

Country or region before: China

Applicant before: CAOS industrial Intelligence Research Institute (Qingdao) Co.,Ltd.

TA01 Transfer of patent application right