CN117472774A - Interface testing method, device, electronic equipment and storage medium - Google Patents

Interface testing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117472774A
CN117472774A CN202311541056.3A CN202311541056A CN117472774A CN 117472774 A CN117472774 A CN 117472774A CN 202311541056 A CN202311541056 A CN 202311541056A CN 117472774 A CN117472774 A CN 117472774A
Authority
CN
China
Prior art keywords
interface
relation
testing
determining
information
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
CN202311541056.3A
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.)
Softcom Power Information Technology Group Co ltd
Original Assignee
Softcom Power Information Technology Group 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 Softcom Power Information Technology Group Co ltd filed Critical Softcom Power Information Technology Group Co ltd
Priority to CN202311541056.3A priority Critical patent/CN117472774A/en
Publication of CN117472774A publication Critical patent/CN117472774A/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/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3692Test management for test results analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses an interface testing method, an interface testing device, electronic equipment and a storage medium. The method comprises the following steps: determining interface data of a target interface, constructing a first model based on the interface data, determining a testing stage of interface testing, determining a reference block corresponding to the testing stage, determining a first association relationship based on the first model and the reference block, and determining a strategy mode of the testing stage based on a preset strategy matching relationship and the first association relationship, wherein the preset strategy matching relationship is used for describing the corresponding relationship between the first association relationship and the strategy mode; and testing the corresponding testing stage according to the strategy mode, and outputting a testing report. According to the method and the device, the association relation among the reference blocks is considered, and the corresponding test stage is tested through the strategy mode determined based on the preset strategy matching relation and the first association relation, so that the problem that the scene lack and the functional intelligent and automatic flexibility exist in the automatic test process is solved, and the interface is tested rapidly and accurately.

Description

Interface testing method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of software testing technologies, and in particular, to an interface testing method, an interface testing device, an electronic device, and a storage medium.
Background
With the advent of the internet and the era, the market demand for software testing is also increasing, and manual testing obviously cannot meet the market demand, so that automatic testing is silently started.
The current automatic test process is generally based on specific scenes and specific functional cases, the page structure is simple to define, the inclusion relation of pages and components is generally expressed, but the current automatic test process lacks flexibility of scene and functional intellectualization and automation, and consistency of similar blocks in operation and expression is ignored, so that the whole process is one-way dependent before and after, the process is complex, and the technical capability and test knowledge requirements of the test scheme design on technicians are high.
Disclosure of Invention
The invention provides an interface testing method, an interface testing device, electronic equipment and a storage medium, which are used for solving the problems that the scene and the functional intelligent and automatic flexibility are lacking in an automatic testing process.
According to an aspect of the present invention, there is provided an interface testing method, including:
determining interface data of a target interface, and constructing a first model based on the interface data, wherein the interface data at least comprises an interface function information block, a component information block and page information, the first model is used for describing association relations among all data in the interface data corresponding to different testing stages, and the association relations at least comprise an operation mode, a combination relation and a switching relation;
determining a testing stage of the interface test, and determining a reference block corresponding to the testing stage, wherein the reference block consists of reference interface data, and the reference interface data is data used in the interface data in the testing stage;
determining a first association relation based on the first model and the reference blocks, wherein the first association relation is used for describing the association relation between the reference blocks;
acquiring a preset strategy matching relation, and determining a strategy mode of the testing stage based on the preset strategy matching relation and the first incidence relation, wherein the preset strategy matching relation is used for describing the corresponding relation between the first incidence relation and the strategy mode;
and testing the corresponding testing stage according to the strategy mode, and outputting a testing report.
According to another aspect of the present invention, there is provided an interface test apparatus, comprising:
the system comprises a model construction module, a data processing module and a data processing module, wherein the model construction module is used for determining interface data of a target interface and constructing a first model based on the interface data, the interface data at least comprises an interface function information block, a component information block and page information, the first model is used for describing association relations among all data in the interface data corresponding to different testing stages, and the association relations at least comprise an operation mode, a combination relation and a switching relation;
the reference block determining module is used for determining a testing stage of the interface test and determining a reference block corresponding to the testing stage, wherein the reference block consists of reference interface data, and the reference interface data is data used in the interface data in the testing stage;
the relation determining module is used for determining a first association relation based on the first model and the reference blocks, and the first association relation is used for describing the association relation among the reference blocks;
the mode determining module is used for acquiring a preset strategy matching relation and determining a strategy mode of the testing stage based on the preset strategy matching relation and the first incidence relation, wherein the preset strategy matching relation is used for describing the corresponding relation between the first incidence relation and the strategy mode;
and the test module is used for testing the corresponding test stage according to the strategy mode and outputting a test report.
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 memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the interface test method of 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 execute the interface test method according to any one of the embodiments of the present invention.
According to the technical scheme, interface data of a target interface are determined, a first model is built based on the interface data, a testing stage of interface testing is determined, a reference block corresponding to the testing stage is determined, a first association relation is determined based on the first model and the reference block, a strategy mode of the testing stage is determined based on a preset strategy matching relation and the first association relation, and the preset strategy matching relation is used for describing the corresponding relation between the first association relation and the strategy mode; and testing the corresponding testing stage according to the strategy mode, and outputting a testing report. According to the method and the device, the association relation among the reference blocks is considered, and the corresponding test stage is tested through the strategy mode determined based on the preset strategy matching relation and the first association relation, so that the problem that the scene lack and the functional intelligent and automatic flexibility exist in the automatic test process is solved, and the interface is tested rapidly and accurately.
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. 1 is a flow chart of an interface testing method provided according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a first model building process adapted according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of policy matching applicable according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of test report generation adapted according to an embodiment of the present invention;
FIG. 5 is a flow chart of an interface testing method applicable according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an interface testing device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device implementing an interface testing method 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 should be noted that the terms "first," "reference," and the like in the description and claims of the invention and in the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, 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 but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of an interface testing method according to an embodiment of the present invention, where the method may be applied to a case of performing an efficient test on an interface, and the method may be performed by an interface testing device, where the interface testing device may be implemented in a form of hardware and/or software, and the interface testing device may be configured in any electronic device having a network communication function. As shown in fig. 1, the method includes:
s110, determining interface data of a target interface, and constructing a first model based on the interface data.
The interface data at least comprises an interface function information block, a component information block and page information, wherein the first model is used for describing association relations among all data in the interface data corresponding to different testing stages, and the association relations at least comprise an operation mode, a combination relation and a switching relation.
Specifically, determining interface data of the target interface includes steps A1-A6:
and A1, acquiring basic data information of a target interface, wherein the basic data information at least comprises image information and file information of the target interface, and the file information is used for describing loading information and software design information in the running process of software on the interface.
Specifically, the basic data information of the target interface can be obtained through a deep neural network, an interaction instruction and a third party tool.
And A2, analyzing the image information to obtain interface element information and spatial position information corresponding to the interface element information.
And A3, analyzing the file information to obtain attribute information of the interface element information, wherein the attribute information at least comprises operation attributes and structural relations among the interface elements.
And A4, determining component information blocks and association relations among the component information blocks based on the interface element information, the spatial position information and the attribute information.
Specifically, whether the interface element information belongs to the same component information block or not can be clearly known according to the spatial position information and the attribute information, the interface element information belonging to the same component information block is combined together, so that the component information block is constructed, and the spatial position information and the attribute information can clearly know the structural relationship and the functional relationship among the component information blocks, so that the association relationship among the component information blocks can be obtained.
And A5, based on the association relation between the component information blocks, combining the component information blocks to determine the interface function information blocks and the association relation between the interface function information blocks, wherein the interface function information blocks are positioned on the same or different pages.
Specifically, the similarity between the component information blocks can be known through the association relationship between the component information blocks, so that the similar component information blocks are further combined into the interface function information blocks according to an algorithm, and certain association relationship exists between the interface function information blocks after the combination because the association relationship between the component information blocks is different.
Wherein similarity may include at least operational, structural, and the like aspects.
And A6, determining page information based on the association relation between the interface function information blocks and the association relation between the component information blocks, wherein the page information is used for indicating the skip relation between pages.
Specifically, the association relationship between the interface function information blocks and the association relationship between the component information blocks determine that page information, the interface function information blocks and the component information blocks have certain association relationship, so that how to jump between the interface function information blocks and the component information blocks can be accurately determined by analyzing the association relationship, and different jump relationships and the interface function information blocks and the component information blocks corresponding to different testing stages can be accurately determined.
Further, constructing a first model based on the interface data includes: acquiring candidate interface data, wherein the candidate interface data are data in interface data corresponding to different testing stages; and analyzing the association relation among the candidate interface data so as to establish a first model, wherein the association relation at least comprises an operation mode, a combination relation and a switching relation.
Specifically, the candidate interface data may be interface function information blocks and component information blocks corresponding to different test phases, and the first model is established by analyzing association relations between the interface function information blocks and the component information blocks corresponding to the different test phases. Wherein the first model may be a PO model, such as shown in fig. 2.
According to the technical mode, the consistency of the similar blocks in operation and expression is considered, and the proper interface function information blocks and the proper assembly information blocks can be matched according to the requirements of the testing stage, so that the proper interface function information blocks and the proper assembly information blocks can be matched through knowing the testing stage later, and the testing is more flexible.
S120, determining a testing stage of the interface test, and determining a reference block corresponding to the testing stage.
The reference block is composed of reference interface data, and the reference interface data is data used in the interface data in the test stage, namely corresponding interface function information blocks and component information blocks.
Specifically, a first corresponding relation is obtained, a reference block corresponding to the testing stage is determined based on the first corresponding relation, and the first corresponding relation is the corresponding relation between the reference block required by different testing stages and the testing stage. S130, determining a first association relation based on the first model and the reference blocks, wherein the first association relation is used for describing the association relation among the reference blocks.
Specifically, the reference block is input into a first model, and the first model determines a first association relationship according to various association information contained in the model.
The corresponding reference blocks (interface function information block and component information block) in different test stages are different, and the unused reference blocks are corresponding to different pages, namely after the association relation among the reference blocks is determined, the conversion relation and the operation relation of the pages corresponding to the different reference blocks in the corresponding test stages are corresponding and clear, so that the interface test can be performed more rapidly and accurately.
The component information blocks are classified according to a common design specification in two modes, wherein the first mode is divided according to an operation mode and comprises clicking, inputting, selecting, compounding sequential operation types and the like, and the second mode is classified according to a layout style, such as icon, an input box, a date selector and the like; the interface function information blocks are aggregated according to the component classification structure and are divided into a single function block and a logic function block according to the functional similarity of the components. The operational relationship in the association relationship may be used to represent the way in which operating different buttons or components on the same page results in local content updates on the current page, the category definition uses a parent type + subtype layout. The functional association relation comprises two parts, one of which is the association expression of the block on the function; the other type represents the association of blocks on the page structure.
S140, acquiring a preset strategy matching relationship, and determining a strategy mode in a testing stage based on the preset strategy matching relationship and the first incidence relationship, wherein the preset strategy matching relationship is used for describing the corresponding relationship between the first incidence relationship and the strategy mode.
Specifically, a first association relationship is obtained, an application type corresponding to the first association relationship is determined, different application types correspond to different policy modes, and a relationship between the first association relationship and the policy modes is established based on the application types so as to establish a preset policy matching relationship.
By way of example, as shown in fig. 3, a smoke test procedure is taken as an example: when the program performs smoking test, the strategy mode selected by strategy matching is smoking test strategy, in the scheme, process monitoring is performed to ensure that the use case execution flow is completed quickly and correctly, namely, parameter matching is preferably preconfigured, if the use case execution flow does not exist and cannot be continued, the current use case flow is exited, and the next sub-function tree searching flow is continued. The state flow is represented as transition and jump of life cycle among different components or elements, taking a navigation bar as an example, the component operation comprises clicking and scrolling, the scrolling is generally in two modes of automatic and manual, three state marks of ready, running and ending are adopted, the state is ready when the type of component appears, when a certain sub-element is clicked, the state of the element is switched into running, and after the program records the element information of the completion sub-module and returns a state value, the element state is converted into completion. The main purpose of smoke test is to quickly acquire a main function flow chart of software, and the process mainly finds a new sub-function set quickly, namely, the sub-function flow in the dynamic control stage preferentially selects components in different modules with larger difference so as to ensure that more new content pages or modules are acquired.
S150, testing in a corresponding testing stage according to the strategy mode, and outputting a testing report.
Specifically, determining a test result of testing the reference block in the test stage; and generating the test report based on the test result, wherein the test report at least comprises the transition relation among the reference blocks and the execution condition of the test process.
As shown in fig. 4, the test report stores the process log and the state information in the process of executing the use case on one hand, so as to ensure the random access of the states and the attribute values of any node in different execution process stages; on the other hand, the execution coordinates and results of different test cases are stored. The stored information includes a screenshot, a set of state video frames, a set of parameters, a set of operations, and a set of results. The process log needs to call process monitoring to process analysis on the test process, and analysis content comprises transition relations between parent components and child modules and execution conditions in the use case execution process. Export format supports Html, pdf, xlsx, csv and other generic file types.
Optionally, as shown in fig. 5, the technical solution of the present application is divided into three parts, where the first part is a basic data acquisition module, and is mainly used for acquiring basic data required by the operation of the system, including page acquisition, page information analysis, persistent storage, page structure optimization and data conversion into a PO model. The second part is a policy matching implementation module mainly comprising various policy predefining, policy intelligent matching, policy implementation and the like, and the main functions of the second part are to intelligently select or combine various policy modes according to task stages or types, and to coordinate and call a proper tool box function to implement the implementation of a test scheme, so that the test task can be completed in a better method. The third part is an information report module which is mainly used for saving the process data and the input data and target information in the strategy executing process, analyzing the process and generating a corresponding result report.
According to the technical scheme, interface data of a target interface are determined, a first model is built based on the interface data, a testing stage of interface testing is determined, a reference block corresponding to the testing stage is determined, a first association relation is determined based on the first model and the reference block, a strategy mode of the testing stage is determined based on a preset strategy matching relation and the first association relation, and the preset strategy matching relation is used for describing the corresponding relation between the first association relation and the strategy mode; and testing the corresponding testing stage according to the strategy mode, and outputting a testing report. According to the method and the device, the association relation among the reference blocks is considered, and the corresponding test stage is tested through the strategy mode determined based on the preset strategy matching relation and the first association relation, so that the problem that the scene lack and the functional intelligent and automatic flexibility exist in the automatic test process is solved, and the interface is tested rapidly and accurately.
Example two
Fig. 6 is a schematic structural diagram of an interface testing device according to an embodiment of the present invention, where the embodiment is applicable to a case of performing efficient testing on an interface, the interface testing device may be implemented in a form of hardware and/or software, and the interface testing device may be configured in any electronic device having a network communication function. As shown in fig. 6, the apparatus includes:
the model construction module 210 is configured to determine interface data of a target interface, and construct a first model based on the interface data, where the interface data at least includes an interface function information block, a component information block, and page information, and the first model is configured to describe association relationships between data in the interface data corresponding to different test phases, where the association relationships at least include an operation mode, a combination relationship, and a switching relationship;
a reference block determining module 220, configured to determine a testing stage of the interface test, and determine a reference block corresponding to the testing stage, where the reference block is composed of reference interface data, and the reference interface data is data used in the interface data in the testing stage;
a relationship determining module 230, configured to determine a first association relationship based on the first model and the reference blocks, where the first association relationship is used to describe an association relationship between the reference blocks;
the mode determining module 240 is configured to obtain a preset policy matching relationship, and determine a policy mode of the testing stage based on the preset policy matching relationship and the first association relationship, where the preset policy matching relationship is used to describe a correspondence between the first association relationship and the policy mode;
and the testing module 250 is used for testing the corresponding testing stage according to the strategy mode and outputting a testing report.
Optionally, the model building module includes a data determining unit for:
acquiring basic data information of the target interface, wherein the basic data information at least comprises image information and file information of the target interface, and the file information is used for describing loading information and software design information in the running process of software on the interface;
analyzing the image information to obtain interface element information and spatial position information corresponding to the interface element information;
analyzing the file information to obtain attribute information of the interface element information, wherein the attribute information at least comprises operation attributes and structural relations among the interface elements;
determining the component information blocks and the association relation among the component information blocks based on the interface element information, the spatial position information and the attribute information;
based on the association relation between the component information blocks, combining the component information blocks to determine the interface function information blocks and the association relation between the interface function information blocks, wherein the interface function information blocks are positioned on the same or different pages;
and determining the page information based on the association relation between the interface function information blocks and the association relation between the component information blocks, wherein the page information is used for indicating the skip relation between pages.
Optionally, the model building module includes a first model building unit for:
acquiring candidate interface data, wherein the candidate interface data are data in the interface data corresponding to different testing stages;
and analyzing the association relation among the candidate interface data so as to establish the first model, wherein the association relation at least comprises an operation mode, a combination relation and a switching relation.
Optionally, the reference block determining module is configured to:
and acquiring a first corresponding relation, and determining a reference block corresponding to the testing stage based on the first corresponding relation, wherein the first corresponding relation is the corresponding relation between the reference block and the testing stage required by different testing stages.
Optionally, the relationship determining module is configured to:
and inputting the reference block into the first model to determine a first association relation.
Optionally, the mode determining module includes a policy matching relation determining unit, configured to:
acquiring the first association relationship, and determining an application type corresponding to the first association relationship, wherein different application types correspond to different policy modes;
and establishing a relation between the first association relation and the strategy mode based on the use case type so as to establish the preset strategy matching relation.
Optionally, the test module is used for:
determining a test result of testing the reference block in the test stage;
and generating the test report based on the test result, wherein the test report at least comprises the transition relation among the reference blocks and the execution condition of the test process.
The interface testing device provided by the embodiment of the invention can execute the interface testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
The data acquisition, storage, use, processing and the like in the technical scheme meet the relevant regulations of national laws and regulations, and the public sequence is not violated.
Example III
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 7 is a schematic structural diagram of an electronic device that may be used to implement the interface test method according to an embodiment of the present 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. 7, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 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 11 performs the various methods and processes described above, such as the interface test method.
In some embodiments, the interface testing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the interface test method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the interface test method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can 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), complex 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. An interface testing method, comprising:
determining interface data of a target interface, and constructing a first model based on the interface data, wherein the interface data at least comprises an interface function information block, a component information block and page information, the first model is used for describing association relations among all data in the interface data corresponding to different testing stages, and the association relations at least comprise an operation mode, a combination relation and a switching relation;
determining a testing stage of the interface test, and determining a reference block corresponding to the testing stage, wherein the reference block consists of reference interface data, and the reference interface data is data used in the interface data in the testing stage;
determining a first association relation based on the first model and the reference blocks, wherein the first association relation is used for describing the association relation between the reference blocks;
acquiring a preset strategy matching relation, and determining a strategy mode of the testing stage based on the preset strategy matching relation and the first incidence relation, wherein the preset strategy matching relation is used for describing the corresponding relation between the first incidence relation and the strategy mode;
and testing the corresponding testing stage according to the strategy mode, and outputting a testing report.
2. The method of claim 1, wherein determining interface data for the target interface comprises:
acquiring basic data information of the target interface, wherein the basic data information at least comprises image information and file information of the target interface, and the file information is used for describing loading information and software design information in the running process of software on the interface;
analyzing the image information to obtain interface element information and spatial position information corresponding to the interface element information;
analyzing the file information to obtain attribute information of the interface element information, wherein the attribute information at least comprises operation attributes and structural relations among the interface elements;
determining the component information blocks and the association relation among the component information blocks based on the interface element information, the spatial position information and the attribute information;
based on the association relation between the component information blocks, combining the component information blocks to determine the interface function information blocks and the association relation between the interface function information blocks, wherein the interface function information blocks are positioned on the same or different pages;
and determining the page information based on the association relation between the interface function information blocks and the association relation between the component information blocks, wherein the page information is used for indicating the skip relation between pages.
3. The method of claim 1, wherein constructing a first model based on the interface data comprises:
acquiring candidate interface data, wherein the candidate interface data are data in the interface data corresponding to different testing stages;
and analyzing the association relation among the candidate interface data so as to establish the first model, wherein the association relation at least comprises an operation mode, a combination relation and a switching relation.
4. The method of claim 1, wherein determining the reference block corresponding to the test phase comprises:
and acquiring a first corresponding relation, and determining a reference block corresponding to the testing stage based on the first corresponding relation, wherein the first corresponding relation is the corresponding relation between the reference block and the testing stage required by different testing stages.
5. The method of claim 1, wherein determining a first association based on the first model and the reference block comprises:
and inputting the reference block into the first model to determine a first association relation.
6. The method according to claim 1, wherein the determining of the preset policy matching relationship includes:
acquiring the first association relationship, and determining an application type corresponding to the first association relationship, wherein different application types correspond to different policy modes;
and establishing a relation between the first association relation and the strategy mode based on the use case type so as to establish the preset strategy matching relation.
7. The method of claim 1, wherein performing a test corresponding to the test phase in accordance with the policy schema and outputting a test report comprises:
determining a test result of testing the reference block in the test stage;
and generating the test report based on the test result, wherein the test report at least comprises the transition relation among the reference blocks and the execution condition of the test process.
8. An interface testing apparatus, comprising:
the system comprises a model construction module, a data processing module and a data processing module, wherein the model construction module is used for determining interface data of a target interface and constructing a first model based on the interface data, the interface data at least comprises an interface function information block, a component information block and page information, the first model is used for describing association relations among all data in the interface data corresponding to different testing stages, and the association relations at least comprise an operation mode, a combination relation and a switching relation;
the reference block determining module is used for determining a testing stage of the interface test and determining a reference block corresponding to the testing stage, wherein the reference block consists of reference interface data, and the reference interface data is data used in the interface data in the testing stage;
the relation determining module is used for determining a first association relation based on the first model and the reference blocks, and the first association relation is used for describing the association relation among the reference blocks;
the mode determining module is used for acquiring a preset strategy matching relation and determining a strategy mode of the testing stage based on the preset strategy matching relation and the first incidence relation, wherein the preset strategy matching relation is used for describing the corresponding relation between the first incidence relation and the strategy mode;
and the test module is used for testing the corresponding test stage according to the strategy mode and outputting a test report.
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 memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the interface testing method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the interface testing method of any one of claims 1-7.
CN202311541056.3A 2023-11-17 2023-11-17 Interface testing method, device, electronic equipment and storage medium Pending CN117472774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311541056.3A CN117472774A (en) 2023-11-17 2023-11-17 Interface testing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311541056.3A CN117472774A (en) 2023-11-17 2023-11-17 Interface testing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117472774A true CN117472774A (en) 2024-01-30

Family

ID=89632773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311541056.3A Pending CN117472774A (en) 2023-11-17 2023-11-17 Interface testing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117472774A (en)

Similar Documents

Publication Publication Date Title
CN115396289B (en) Fault alarm determining method and device, electronic equipment and storage medium
CN115481594B (en) Scoreboard implementation method, scoreboard, electronic equipment and storage medium
CN116225312A (en) Mirror image cleaning method and device, electronic equipment and storage medium
CN113691403B (en) Topology node configuration method, related device and computer program product
CN117472774A (en) Interface testing method, device, electronic equipment and storage medium
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN114706610A (en) Business flow chart generation method, device, equipment and storage medium
CN114595231B (en) Database table generation method and device, electronic equipment and storage medium
CN113836291B (en) Data processing method, device, equipment and storage medium
CN114741072B (en) Page generation method, device, equipment and storage medium
CN112527537B (en) Quality monitoring method, device, equipment and medium of online service system
CN116303071A (en) Interface testing method and device, electronic equipment and storage medium
CN117806604A (en) TLV data analysis method and device based on spring boot frame
CN117827194A (en) Method, apparatus, device and storage medium for inspecting elements
CN118193389A (en) Test case generation method, device, equipment, storage medium and product
CN117609031A (en) Multi-core on-chip program debugging method, device, equipment and storage medium
CN116225943A (en) Interactive interface testing method and device, electronic equipment and storage medium
CN117785165A (en) Chart generation method and device based on large model and electronic equipment
CN117056222A (en) Interface test file generation method and device, electronic equipment and storage medium
CN116627097A (en) Process recipe management method and device, production equipment system and storage medium
CN117742544A (en) Equipment screening method, device, electronic equipment and storage medium
CN117406964A (en) Data architecture model design method, device, electronic equipment and storage medium
CN116991737A (en) Software testing method, system, electronic equipment and storage medium
CN117876526A (en) Drawing method and device of flow chart, electronic equipment and storage medium
CN117540718A (en) Intelligent inspection result statistical method based on document object model

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