CN116185826A - Test method, device, equipment and storage medium - Google Patents

Test method, device, equipment and storage medium Download PDF

Info

Publication number
CN116185826A
CN116185826A CN202211631961.3A CN202211631961A CN116185826A CN 116185826 A CN116185826 A CN 116185826A CN 202211631961 A CN202211631961 A CN 202211631961A CN 116185826 A CN116185826 A CN 116185826A
Authority
CN
China
Prior art keywords
test case
interfaces
controller
interface
canvas
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
CN202211631961.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.)
Nsfocus Technologies Inc
Nsfocus Technologies Group Co Ltd
Original Assignee
Nsfocus Technologies Inc
Nsfocus Technologies 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 Nsfocus Technologies Inc, Nsfocus Technologies Group Co Ltd filed Critical Nsfocus Technologies Inc
Priority to CN202211631961.3A priority Critical patent/CN116185826A/en
Publication of CN116185826A publication Critical patent/CN116185826A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

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

Abstract

The application provides a test method, a device, equipment and a storage medium, which can simply, conveniently and visually arrange an interface to obtain a test case, reduce a software test threshold and improve software test efficiency, and the method comprises the following steps: generating a plurality of interface call labels corresponding to the interfaces according to the information of the interfaces, receiving the dragging connection operation of a user on the interface call labels in a canvas, obtaining a first function test case corresponding to the service execution logic relation of the interfaces, generating json data according to the first function test case, executing the json data, and testing the first function test case.

Description

Test method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of automated testing, and in particular, to a testing method, apparatus, device, and storage medium.
Background
As the field of software applications becomes more and more widespread, more and more companies are facing automated testing requirements for software. Currently, test engineers may write test cases (i.e., functions assembled by one or more interfaces of software) with different automation test frameworks or tools, and complete the automation test of the software by simulating the running cases.
However, the existing automated test frameworks or tools all require test engineers to learn the language under the corresponding automated test framework to complete the writing of test cases using the corresponding language under different automated test frameworks. Therefore, a test engineer is required to have a certain code foundation, the software test threshold is high, the test cases of the software are all required to be written in a coded mode by the test engineer, the writing efficiency is low, the error correction and modification are difficult, and the test efficiency is also influenced.
Disclosure of Invention
The application provides a test method, a device, equipment and a storage medium, which can simply, conveniently and visually arrange an interface to obtain a test case, reduce the test threshold of software and improve the test efficiency of the software.
In a first aspect, the present application provides a test method comprising:
generating a plurality of interface call labels corresponding to a plurality of interfaces according to the information of the interfaces;
receiving drag connection operation of a user on the interface call labels in the canvas to obtain a first functional test case corresponding to the service execution logic relationship of the interfaces;
generating json data according to the first functional test case;
and executing the json data and testing the first functional test case.
Further, receiving a drag connection operation of a user on the plurality of interface call labels in the canvas to obtain a first functional test case corresponding to a service execution logic relationship of the plurality of interfaces, and further comprising:
receiving drag connection operation of a user on the interface call labels and the controller call labels corresponding to at least one controller in canvas to obtain a first function test case corresponding to the service execution logic relationship of the interfaces and the at least one controller;
the controller comprises a circulation controller, a condition controller, a delay controller and a parameter extractor.
Further, the method further comprises:
receiving drag connection operation of a user on function test case labels corresponding to a plurality of function test cases in a canvas to obtain a scene test case corresponding to a service execution logic relationship of the plurality of function test cases, wherein the plurality of function test cases comprise the first function test case;
generating json data according to the scene test case;
and executing the json data and testing the scene test case.
Further, the interface information includes one or more of the following:
interface name, request path, request parameters, request header.
Further, after the testing of the first functional test case, the method further includes:
if errors occur after the first functional test case is tested, reporting errors to an error interface in the first functional test case.
In a second aspect, the present application provides a use case testing apparatus, the apparatus comprising:
the processing module is used for generating a plurality of interface call labels corresponding to the interfaces according to the information of the interfaces;
the acquisition module is used for receiving the dragging connection operation of the user on the interface call labels in the canvas to obtain a first functional test case corresponding to the service execution logic relationship of the interfaces;
the processing module is further used for generating json data according to the first functional test case; and executing the json data and testing the first functional test case.
Further, the obtaining module receives a drag connection operation of a user on the plurality of interface call labels in the canvas, and when obtaining a first functional test case corresponding to a service execution logic relationship of the plurality of interfaces, the obtaining module is specifically configured to:
receiving drag connection operation of a user on the interface call labels and the controller call labels corresponding to at least one controller in canvas to obtain a first function test case corresponding to the service execution logic relationship of the interfaces and the at least one controller; the controller comprises a circulation controller, a condition controller, a delay controller and a parameter extractor.
Further, the processing module is further configured to:
receiving drag connection operation of a user on function test case labels corresponding to a plurality of function test cases in a canvas to obtain a scene test case corresponding to a service execution logic relationship of the plurality of function test cases, wherein the plurality of function test cases comprise the first function test case;
generating json data according to the scene test case;
and executing the json data and testing the scene test case.
Further, the interface information includes one or more of the following:
interface name, request path, request parameters, request header.
Further, after testing the first functional test case, the processing module is further configured to:
if errors occur after the first functional test case is tested, reporting errors to an error interface in the first functional test case.
In a third aspect, the present application provides an electronic device comprising at least a processor and a memory, the processor implementing the method of the first aspect when executing a computer program or instructions stored in the memory.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program or instructions which, when executed by a processor, implement the method of the first aspect described above.
According to the method and the device, a plurality of interface call labels corresponding to the interfaces are generated according to the information of the interfaces, the dragging connection operation of the user on the interface call labels in the canvas is received, a first function test case corresponding to the service execution logic relationship of the interfaces is obtained, corresponding json data is generated according to the node relationship of each interface in the first function test case, the json data is executed, the first function test case is tested, the interfaces can be simply, conveniently and visually arranged to obtain the test cases, the test threshold of software is reduced, and the software test efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that 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 a test method provided in the present application.
Fig. 2 is a schematic diagram of a functional test case obtained by visual dragging provided in the present application.
FIG. 3 is a block diagram of a test case visualization building system provided herein.
Fig. 4 is a flowchart of a test case visualization construction method provided in the present application.
Fig. 5 is a schematic structural diagram of a testing device provided in the present application.
Fig. 6 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
For purposes of clarity and implementation of the present application, the following description will make clear and complete descriptions of exemplary implementations of the present application with reference to the accompanying drawings in which exemplary implementations of the present application are illustrated, it being apparent that the exemplary implementations described are only some, but not all, of the examples of the present application.
It should be noted that the brief description of the terms in the present application is only for convenience in understanding the embodiments described below, and is not intended to limit the embodiments of the present application. Unless otherwise indicated, these terms should be construed in their ordinary and customary meaning.
The terms first, second, third and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar or similar objects or text entities and not necessarily for limiting a particular order or sequence unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements explicitly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware or/and software code that is capable of performing the function associated with that element.
As the field of software applications becomes more and more widespread, more and more companies are facing automated testing requirements for software. Currently, test engineers can implement automated testing of software with different automated test frameworks or tools.
Figure BDA0004005943630000051
TABLE 1
As shown in table 1, table 1 is a framework and implementation technique commonly used for automated test writing cases. Currently mainstream automated test frameworks include Robot Frameworks (RF), functional test tools (Quick Test Professional, QTP), jmeter, and cuum. For each automatic test framework, a test engineer needs to learn the language under the automatic test framework to complete writing of test cases. In addition, test engineers may also directly write test cases for testing software using common language Python, shell, java tools. In summary, the test cases are written by a test engineer with a certain code basis, and the test cases are obtained by writing codes, which results in the possibility that the test cases of the same type have a repeated coding process, and when a large number of test cases are required to be written or the number of interfaces included in one test case is large, the coding process is time-consuming and labor-consuming, and because the test cases are all formed by codes and presented to the test engineer, when errors occur, the test engineer is required to check the codes one by one, and the error correction efficiency is low.
Based on the above, the application provides a test method, a device, equipment and a storage medium, so that the interface is simply, conveniently and visually arranged to obtain the test case, the test threshold of software is reduced, and the test efficiency of the software is improved.
Fig. 1 is a flowchart of a testing method provided in an embodiment of the present application, where the method may be applied to an electronic device, and the method includes:
s101: and generating a plurality of interface call labels corresponding to the interfaces according to the information of the interfaces.
In the process of testing the software, a user can input information of a plurality of interfaces of the software to be tested into the electronic equipment, and after receiving the information of the interfaces input by the user, the electronic equipment can generate a plurality of interface call labels corresponding to the interfaces according to the information of the interfaces. As an example, a user may input information of an interface (e.g., information of an interface name, a request path, a request parameter, a request header, a function of the interface, etc.) into an electronic device, and the electronic device may generate an interface call tag of the interface on a canvas according to the interface name or the function of the interface, etc. For example: the function of the interface is "login", the electronic device may generate an interface call tag named "login" in the canvas, where the interface call tag is associated with information of the interface (such as information of interface name, request path, request parameter, request header, function of the interface, etc.), and the electronic device may implement call or simulation call to the interface through the interface information associated with the interface call tag.
S102: and receiving the dragging connection operation of the user on the plurality of interface call labels in the canvas to obtain a first functional test case corresponding to the service execution logic relationship of the plurality of interfaces.
The electronic equipment receives the dragging connection operation of calling labels for a plurality of interfaces in canvas displayed at the front end by a user, and a first function test case can be obtained, wherein the first function test case corresponds to a plurality of interfaces arranged according to the service logic relation for realizing the function.
Fig. 2 is a schematic diagram of a functional test case obtained by visual dragging according to an embodiment of the present application. As shown in fig. 2, the left side is a function directory for constructing use cases, and the function directory includes: a starting point, an interface pool, a loop controller, parameter extraction, assertion, script files, end and other options. The user can click interface options to input information of an interface to be tested, the electronic device can generate corresponding interface call labels (such as information of the interface of common login input by the user and interface information of event type hierarchy search loading) in a canvas on the right side, the electronic device generates corresponding interface call labels of common login and interface call labels of event type hierarchy search loading in the canvas on the right side, and can click options such as starting point and ending point, and corresponding logic node labels such as starting point and ending point can be generated in the canvas. In the canvas, a user can visually drag one or more interface call labels and one or more logic node labels, and the one or more interface call labels and the one or more logic node labels are well arranged, so that a functional test case is obtained. As shown in fig. 2, a functional test case for testing login and extracting parameters is shown, the functional test case is formed by visually dragging a corresponding interface call tag and a logic node tag in a canvas by a user, and service logic relations of the functional test case are sequentially displayed in the canvas as follows: the method comprises the steps of a 'starting point' logic node label (used for starting a use case), a 'public login' interface call label (used for testing a public login interface for login operation), a 'loading event type hierarchy search' interface call label (used for testing loading event type hierarchy search interfaces for loading and searching data operation), a 'parameter extraction' logic node label (used for extracting data searched by a previous interface), an 'assertion' logic node label (used for judging whether the data searched by the previous interface are consistent with expected data or not, wherein the expected data can be preconfigured in an asserted test parameter), and an 'end point' logic node label (used for ending the use case).
S103: and generating json data according to the first functional test case.
And the electronic equipment generates json data according to the node relation of the functional test case generated by dragging the user in the canvas. The json data of the functional test case at least comprises node relation and node information, in the node relation, three types of data source nodes (source), target nodes (target) and types (type) can be provided for each node, the source data records identification numbers (identity document, id) of the source nodes, the target data records id of the target nodes, the type data records connection relation types of the source nodes and the target nodes, wherein the connection relation types can comprise unidirectional connection, bidirectional connection and the like, and for example, when the type is hvh, the connection relation types of the source nodes and the target nodes are represented as unidirectional connection.
In the node information, the node id, the node label (label) and the information of the node and the like of each node in the function test case are recorded, wherein the node label comprises one of an interface call label, a logic node label and the like, and if the node corresponds to the interface call label, the information of the node comprises the information of an interface name, a request path, a request parameter, a request header, the function of the interface and the like; if the node corresponds to the logical node label, the information of the node comprises the relevant preset parameters of the logical node.
Taking the node relationship between the starting point and the two public login nodes in the functional test case shown in fig. 2 as an example, the source is recorded in the node relationship of json data: "start1", target: "loadcase1655978104633" and type: and hvh, in the node information of json data, the label corresponding to the node with the id of "start1" is the "starting point", the label corresponding to the node with the id of "loadcase1655978104633" is the "public-login", and the "starting point" unidirectional connection "public-login" can be obtained by integrating the node relation in json data and the data recorded by the node information. Similarly, the electronic device can read the connection relation between each node and the information of each node from the json data, and complete the test of the first functional test case according to the connection relation between each node and the information of each node. The id of the node may be given by the electronic device to the node or a label corresponding to the node.
S104: and executing the json data and testing the first functional test case.
The electronic equipment obtains json data, and can sequentially execute operations corresponding to each node (such as sequentially calling interfaces corresponding to each node) according to the node relation recorded by the json data and the information of the plurality of nodes, so that the test of the first functional test case is realized, and a test report can be generated after the test.
In one possible implementation, an electronic device executes json data to test a first functional test case, including:
and converting json data into an execution script by using the RF conversion engine, and executing the execution script by using the RF execution engine to test the first functional test case. The RF conversion engine is used for acquiring the node relation and the node information of each node in json data, inputting the node relation and the node information of each node into a pre-compiled robot file template to obtain a robot file (namely an execution script) identifiable under the RF automatic test framework, and the RF execution engine is used for running the robot file to finish the test of the first functional test case.
In one possible implementation manner, the json data can be converted into execution scripts under QTP, jmeter and cuum automation test frames in the above manner, so as to complete the test of the first functional test case.
According to the method and the device, a plurality of interface call labels corresponding to the interfaces are generated according to the information of the interfaces, the dragging connection operation of the user on the interface call labels in the canvas is received, a first function test case corresponding to the service execution logic relationship of the interfaces is obtained, corresponding json data is generated according to the node relationship of each interface in the first function test case, the json data is executed, the first function test case is tested, the interfaces can be simply, conveniently and visually arranged to obtain the test cases, the test threshold of software is reduced, and the software test efficiency is improved.
Further, receiving a drag connection operation of a user on the plurality of interface call labels in the canvas to obtain a first functional test case corresponding to a service execution logic relationship of the plurality of interfaces, including:
receiving drag connection operation of a user on the interface call labels and the controller call labels corresponding to at least one controller in canvas to obtain a first function test case corresponding to the service execution logic relationship of the interfaces and the at least one controller;
wherein the controller comprises a circulation controller, a condition controller, a delay controller, a parameter extractor and the like.
In order to better realize the diversification and feasibility of the function test case, besides clicking interface call labels generated by information of an interface option input interface and logic node labels such as a start point, an end point and the like, various controller call labels can be added into the function test case as a new node so as to achieve the test effect expected by a user, wherein the various controller call labels can comprise one or more of a loop controller call label, a conditional controller call label, a delay controller call label, a parameter extractor call label and the like, are consistent with the realization principle of the interface call label, and the user only needs to click corresponding controller options by using any one controller call label of the various controller call labels and set basic parameters of the controller, so that the controller call label of the corresponding function is generated in a canvas.
On the basis of the above embodiments, in an embodiment of the present application, the method further includes:
receiving drag connection operation of a user on function test case labels corresponding to a plurality of function test cases in a canvas to obtain a scene test case corresponding to a service execution logic relationship of the plurality of function test cases, wherein the plurality of function test cases comprise the first function test case;
generating json data according to the scene test case;
and executing the json data and testing the scene test case.
In order to meet more complex and diverse service requirements, when implementing a complex scenario service, multiple functional test cases may be required to jointly complete the scenario service. The user can drag the connection line by using the function test case label of the stored function test case or the function test case label of the first function test case to be tested, so as to obtain a scene test case consisting of a plurality of function test cases. And receiving the business logic relation of the scene test cases in the canvas, generating json data, generating a corresponding execution script file according to the business logic relation recorded in the json data, and testing the scene test cases by running the execution script file.
Optionally, after receiving the information of the single interface input by the user, the electronic device may generate a corresponding interface use case according to the test item selected by the user, where the interface is used to test whether the test item selected by the user can be implemented.
On the basis of the foregoing embodiments, in order to facilitate the user to quickly find the error location, after testing the first functional test case, the method further includes:
if errors occur after the first functional test case is tested, reporting errors to an error interface in the first functional test case.
After the execution script file of the first functional test case is run for testing, a corresponding log file is generated, and if errors occur, the error position can be displayed on an interface call label in a corresponding canvas.
Fig. 3 is a schematic diagram of a test case visualization construction system according to an embodiment of the present application. As shown in fig. 3, the system comprises a display layer, a service interface layer, a service logic layer, database access, database storage and a server, wherein the display layer mainly comprises an Angular framework (the Angular framework comprises html, css, ts (TypeScript) functions and is a framework for constructing client applications) and a G6 canvas, and the display layer is used for providing a visual interface for a client display platform interface and carrying out interactive operations such as dragging, information inputting and the like; the service interface layer mainly comprises a Django (Django is a Web application framework of open source code) framework and a py (python) function; the business logic layer is composed of a case management, a case arrangement, an execution engine, task processing (the module is realized by Celery, which is a simple, flexible and reliable distributed system), a task queue (the module is realized by Redis, which is completely open-source and obeys BSD protocol, is a high-performance key-value database) and a report template, and the business interface layer and the business logic layer are mainly responsible for receiving the information of the interface input by the user and collected by the display layer, and performing operations such as case arrangement, case test and the like to complete the construction and test of the functional test case and the scene test case; the interface used for database access is psychropg 2 (psychropg 2 is a PostgreSQL database interface in Python language), the database storage part uses a PostgreSQL (PostgreSQL is an object-relational database management system of very well-characterized free software), and the database is mainly used for storing information for testing interfaces, interface cases, scene test cases and report logs after test function test cases or scene test cases; the server comprises a uwsgi server and an nginx server, and the server is mainly used for requesting corresponding data information from the database according to the requirements of the service layer.
Fig. 4 is a flowchart of a method for constructing a test case visualization according to an embodiment of the present application. As shown in FIG. 4, the test case layout and execution mainly comprises three parts, namely a layout interface, a functional test case and a scene test case, wherein the layout interface part can receive interface information of one or more interfaces input by a user and input the interface information of one or more interfaces into an execution script template to generate a corresponding execution script, can also receive the execution script input by the user and comprising one or more interfaces, runs the execution script through an interface execution engine, simulates the calling process of one or more interfaces included in the execution script, acquires the calling test result of one or more interfaces included in the execution script, and completes the debugging of the interfaces according to the calling test result. After obtaining a plurality of debugged interfaces, generating an interface call label corresponding to each interface, receiving drag connection operation of a user on the interface call labels in canvas displayed at the front end (optionally, the scheme uses jsplumb technology to realize a visualized drag editing process of the interface call labels), obtaining a functional test case, generating json data of the functional test case, calling an RF conversion engine to convert the functional test case into an execution script (namely a robot file), and using the RF execution engine to run the execution script to finish the test of the functional test case. Further, the electronic device can receive the drag connection operation of the user on the function test case labels corresponding to the plurality of function test cases in the canvas, obtain a scene test case, call the Robot_Runner engine, run execution scripts of the plurality of function test cases contained in the scene test case in batches, and complete the test of a complex service.
Based on the foregoing testing method, the present application provides a testing device, and fig. 5 is a schematic structural diagram of the testing device provided in the embodiment of the present application, where the testing device includes:
a processing module 501, configured to generate a plurality of interface call labels corresponding to a plurality of interfaces according to information of the interfaces;
an obtaining module 502, configured to receive a drag connection operation of a user on the plurality of interface call labels in a canvas, and obtain a first functional test case corresponding to a service execution logic relationship of the plurality of interfaces;
the processing module 501 is further configured to generate json data according to the first functional test case; and executing the json data and testing the first functional test case.
Further, when the processing module 501 executes the json data to test the first functional test case, the processing module is specifically configured to:
converting the json data into an execution script;
and running the execution script and testing the first functional test case.
Further, when the obtaining module 502 receives a drag connection operation of the user to call labels on the interfaces in the canvas to obtain a first functional test case corresponding to a service execution logic relationship of the interfaces, the first functional test case is further configured to:
receiving drag connection operation of a user on the interface call labels and the controller call labels corresponding to at least one controller in canvas to obtain a first function test case corresponding to the service execution logic relationship of the interfaces and the at least one controller; the controller comprises a circulation controller, a condition controller, a delay controller and a parameter extractor.
Further, the processing module 501 is further configured to:
receiving drag connection operation of a user on function test case labels corresponding to a plurality of function test cases in a canvas to obtain a scene test case corresponding to a service execution logic relationship of the plurality of function test cases, wherein the plurality of function test cases comprise the first function test case;
generating json data according to the scene test case;
and executing the json data and testing the scene test case.
Further, the interface information includes one or more of the following:
interface name, request path, request parameters, request header.
Further, after the processing module 501 tests the first functional test case, the processing module is further configured to:
if errors occur after the first functional test case is tested, reporting errors to an error interface in the first functional test case.
Fig. 6 is a schematic structural diagram of an electronic device. As shown in fig. 6, the electronic device includes: processor 601, communication interface 602, memory 603 and communication bus 604, wherein processor 601, communication interface 602, memory 603 accomplish each other's communication through communication bus 604.
The memory 603 has stored therein a computer program which, when executed by the processor 601, causes the processor 601 to implement the steps of any one of the test methods described above.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface 602 is used for communication between the electronic device and other devices described above.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; but also digital instruction processors (Digital Signal Processing, DSP), application specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
On the basis of the above embodiments, the embodiments of the present application further provide a computer readable storage medium, where a computer program executable by an electronic device is stored, where the program when executed on the electronic device causes the electronic device to implement the steps of any one of the above-mentioned test methods when executed.
The computer readable storage medium may be any available medium or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memories such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical memories such as CD, DVD, BD, HVD, etc., and semiconductor memories such as ROM, EPROM, EEPROM, nonvolatile memories (NAND FLASH), solid State Disks (SSD), etc.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the embodiments to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles and the practical application, to thereby enable others skilled in the art to best utilize the embodiments and various embodiments with various modifications as are suited to the particular use contemplated.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. A method of testing, the method comprising:
generating a plurality of interface call labels corresponding to a plurality of interfaces according to the information of the interfaces;
receiving drag connection operation of a user on the interface call labels in the canvas to obtain a first functional test case corresponding to the service execution logic relationship of the interfaces;
generating json data according to the first functional test case;
and executing the json data and testing the first functional test case.
2. The method of claim 1, wherein receiving a drag link operation of a user invoking a tag for the plurality of interfaces in a canvas to obtain a first functional test case corresponding to a business execution logic relationship of the plurality of interfaces comprises:
receiving drag connection operation of a user on the interface call labels and the controller call labels corresponding to at least one controller in canvas to obtain a first function test case corresponding to the service execution logic relationship of the interfaces and the at least one controller;
the controller comprises a circulation controller, a condition controller, a delay controller and a parameter extractor.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving drag connection operation of a user on function test case labels corresponding to a plurality of function test cases in a canvas to obtain a scene test case corresponding to a service execution logic relationship of the plurality of function test cases, wherein the plurality of function test cases comprise the first function test case;
generating json data according to the scene test case;
and executing the json data and testing the scene test case.
4. The method of claim 1, wherein the interface information comprises one or more of:
interface name, request path, request parameters, request header.
5. The method of claim 1, wherein after the testing the first functional test case, further comprising:
if errors occur after the first functional test case is tested, reporting errors to an error interface in the first functional test case.
6. A test apparatus, the apparatus comprising:
the processing module is used for generating a plurality of interface call labels corresponding to the interfaces according to the information of the interfaces;
the acquisition module is used for receiving the dragging connection operation of the user on the interface call labels in the canvas to obtain a first functional test case corresponding to the service execution logic relationship of the interfaces;
the processing module is further used for generating json data according to the first functional test case; and executing the json data and testing the first functional test case.
7. The apparatus of claim 6, wherein the obtaining module is configured to, when receiving a drag connection operation of a user to call labels for the plurality of interfaces in the canvas to obtain a first functional test case corresponding to a service execution logic relationship of the plurality of interfaces, specifically:
receiving drag connection operation of a user on the interface call labels and the controller call labels corresponding to at least one controller in canvas to obtain a first function test case corresponding to the service execution logic relationship of the interfaces and the at least one controller; the controller comprises a circulation controller, a condition controller, a delay controller and a parameter extractor.
8. The apparatus of claim 6, wherein the processing module is further configured to:
receiving drag connection operation of a user on function test case labels corresponding to a plurality of function test cases in a canvas to obtain a scene test case corresponding to a service execution logic relationship of the plurality of function test cases, wherein the plurality of function test cases comprise the first function test case;
generating json data according to the scene test case;
and executing the json data and testing the scene test case.
9. An electronic device comprising at least a processor and a memory, the processor implementing the method of any of claims 1-5 when executing a computer program or instructions stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a computer program or instructions which, when executed by a processor, implements the method according to any of the preceding claims 1-5.
CN202211631961.3A 2022-12-19 2022-12-19 Test method, device, equipment and storage medium Pending CN116185826A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211631961.3A CN116185826A (en) 2022-12-19 2022-12-19 Test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211631961.3A CN116185826A (en) 2022-12-19 2022-12-19 Test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116185826A true CN116185826A (en) 2023-05-30

Family

ID=86435522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211631961.3A Pending CN116185826A (en) 2022-12-19 2022-12-19 Test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116185826A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117389873A (en) * 2023-10-12 2024-01-12 厦门国际银行股份有限公司 Automatic testing method, device and equipment for interface service

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117389873A (en) * 2023-10-12 2024-01-12 厦门国际银行股份有限公司 Automatic testing method, device and equipment for interface service

Similar Documents

Publication Publication Date Title
CN109871326B (en) Script recording method and device
US10146672B2 (en) Method and system for automated user interface (UI) testing through model driven techniques
CN107291438B (en) Automatic script generation method and device and electronic equipment
WO2018010552A1 (en) Test method and device
CN103164328B (en) The regression testing method of a kind of business function, Apparatus and system
CN108763076A (en) A kind of Software Automatic Testing Method, device, equipment and medium
JP6387182B2 (en) Information processing method, apparatus, and computer storage medium
US10049031B2 (en) Correlation of violating change sets in regression testing of computer software
CN105022694B (en) Method for generating test case and system for mobile terminal test
CN104881355A (en) Method and system for testing test coverage
CN108804305A (en) A kind of method and device of automatic test
CN112380255A (en) Service processing method, device, equipment and storage medium
CN111382055B (en) Automatic unit testing method and device based on unified description language
CN112286814A (en) Automatic generation system and method of test case script
CN104657274A (en) Method and device for testing software interface
CN112241370B (en) API interface class checking method, system and device
CN107479866B (en) Method for realizing application data and functions of open terminal based on reconstruction technology
CN107622017B (en) Analysis method for universal automation software test
CN108923997A (en) A kind of cloud service node automatic test approach and device based on python
CN116185826A (en) Test method, device, equipment and storage medium
CN117931620A (en) Automatic test method for reducing test technical threshold of intelligent terminal system
CN113505895B (en) Machine learning engine service system, model training method and configuration method
CN112860587B (en) UI automatic test method and device
US20190303279A1 (en) Modeling system
CN116090380B (en) Automatic method and device for verifying digital integrated circuit, storage medium and terminal

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