CN111045928A - Interface data testing method, device, terminal and storage medium - Google Patents

Interface data testing method, device, terminal and storage medium Download PDF

Info

Publication number
CN111045928A
CN111045928A CN201911113903.XA CN201911113903A CN111045928A CN 111045928 A CN111045928 A CN 111045928A CN 201911113903 A CN201911113903 A CN 201911113903A CN 111045928 A CN111045928 A CN 111045928A
Authority
CN
China
Prior art keywords
data
interface
preset
fixed
presetting
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.)
Granted
Application number
CN201911113903.XA
Other languages
Chinese (zh)
Other versions
CN111045928B (en
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.)
Yonyou Network Technology Co Ltd
Original Assignee
Yonyou Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yonyou Network Technology Co Ltd filed Critical Yonyou Network Technology Co Ltd
Priority to CN201911113903.XA priority Critical patent/CN111045928B/en
Publication of CN111045928A publication Critical patent/CN111045928A/en
Application granted granted Critical
Publication of CN111045928B publication Critical patent/CN111045928B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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
    • 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 relates to an interface data testing method, an interface data testing device, a terminal and a storage medium, wherein the method comprises the following steps: presetting basic data, inquiring data, requesting a service program and clearing data, and deleting newly added data when the basic data is preset; the invention solves the problems that when the mixed cloud multi-environment multi-tenant is switched at any time, the interface case can not be changed randomly and the effective interface test can not be carried out, provides a set of interface test method for testing the interface cases of the multi-environment multi-tenant, improves the test efficiency, reduces the maintenance cost and achieves the aims of one set of multi-use and no repeated writing and recording.

Description

Interface data testing method, device, terminal and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to an interface data testing method, an interface data testing device, a terminal and a storage medium.
Background
Interface testing is a test that tests an interface between components of a system. The interface test is mainly used for detecting interaction points between external systems and between internal subsystems. The key point of the test is to check the exchange of data, transfer and control management processes, mutual logic dependency relationship between systems and the like.
Interface tests are broadly classified into the following two types:
1. the interface test method disclosed in Chinese patent document with similar application number ZL01126755.0 defines a universal command interface structure, records the relevant structure information of the interface by using a text file, converts the description in the file into a unified structure linked list by analyzing the grammar of the text file line by line, verifies whether the data from the outer layer is correct, and verifies whether the data sent to other layers is correct according to the prompt information input by a user.
2. Making a system graphic interface or a platform for operation, such as a software interface testing method and a device disclosed by Chinese patent application No. 200610057811.0, describing each software interface to be tested according to a preset syntax format, dynamically generating a graphic interface for testing the software interface according to each described software interface, and performing software testing according to description information corresponding to a penalized graphic interface, while Chinese patent application No. 201710134035.8 discloses an interface automatic testing method and a system thereof, sublimating the method into a system, and opening a corresponding test case interface according to an accepted test case; and calling a Uniform Resource Locator (URL) of a test case interface in the template file, sending a test request to the server through the URL, calling a pre-registered interface function after the server responds, analyzing a corresponding result of the server of the test request which is not empty to obtain an actual check value, and comparing an expected check value of the actual check value to obtain a test result of the test case.
In the above technical solution, the method 1 has two disadvantages, the first method requires extra effort and time for maintenance personnel to maintain the text file, and each change requires manual update. Secondly, the interface parameters and all information cannot be static data, are dynamically changed data, and need to be obtained from information returned from another interface. The 2 nd method still has several problems: (1) all requests of the hybrid cloud need basic data, the method cannot automatically preset the basic data in a centralized manner, and the basic data are not fixed, so that the response time of all the requests and the comparison of returned results are influenced; (2) under the situation of multiple tenants in a mixed cloud, one tenant is used for one set of use cases, and more tenants cannot meet the change requirement at any time and can only be described or recorded again when the next tenant is in the next environment, so that the maintenance cost is very high and the efficiency is very slow: (3) the hybrid cloud iteration is updated frequently, an interface is defined once, and the conversion is very likely to happen immediately, so that the daily iteration cannot be met by the method; (4) all basic data of the mixed cloud are bound under the tenant, all common staff inherit the basic data under the current tenant, and one tenant is changed, all the basic data cannot be reused, and the environment is changed at any time.
Disclosure of Invention
In order to solve the problems in the prior art, the embodiment of the invention provides an interface testing method for testing multiple environments and multiple tenants by using a set of interface use cases, so that the testing efficiency is improved, the maintenance cost is reduced, the purposes of multiple purposes and no repeated writing and recording are achieved, and the method for testing the multiple environments and the interfaces of the multiple tenants by using a set of use cases shared by a hybrid cloud is realized. How to perform the software interface test is not within the scope of the embodiments of the present invention as to the specific interface test form and method.
The technical scheme adopted by the invention for solving the technical problems is as follows:
in a first aspect, an embodiment of the present invention provides an interface data testing method, including:
presetting basic data, specifically, constructing a fixed list of unified program codes and a database, performing case operation of a single environment and a user to form first preset data, and presetting the basic data according to the first preset data and the fixed list;
data query, specifically, a fixed rule is established, first preset data is queried according to the fixed rule to obtain test data required by an interface, and the test data is parameterized and transmitted to the interface;
the service program request is specifically that request data at an interface is received, and a parameter value is returned to the interface for verification, wherein the request data is data obtained by reassembling the interface after the interface acquires needed parameterized test data;
and clearing data, and deleting newly added data when the basic data is preset.
Further, the fixed rules include fixed data, fixed format, and fixed data items.
Further, the basic data presetting step more specifically comprises the following steps:
selecting an environment, a tenant and a Web end for operation, and capturing packets of data presets to form a use case to obtain first preset data;
taking the use case as a base class package, presetting all data to carry out package capturing operation, issuing lists of all data, and fixing each data item in the data to obtain a fixed list;
and presetting basic data of all data according to the first preset data and the fixed list so as to add new data when the preset data operation is carried out, decouple and remove the interface dependent data.
Further, the specific process of acquiring the request data is that the interface dynamically acquires a data packet, obtains parameterized test data and performs service assembly.
Still further, the obtaining of the request data further comprises: and when repeated execution is carried out, the data of the previous step is dynamically acquired.
Further, when the data clearing step is performed, specifically, newly added data obtained in the basic data presetting is dynamically acquired, context transfer is performed on the returned data, and the fixed basic data is deleted.
In a second aspect, an embodiment of the present invention further provides an interface data testing apparatus, where the apparatus includes:
the basic data presetting module is used for constructing a fixed list of unified program codes and a database, carrying out case operation of a single environment and a user to form first preset data, and presetting basic data according to the first preset data and the fixed list;
the data query module is used for constructing a fixed rule, querying first preset data according to the fixed rule to obtain test data required by the interface, carrying out parameterization setting on the test data and transmitting the test data to the interface;
the service program request module is used for receiving request data at the interface and returning parameter values to the interface for verification, wherein the request data is data obtained by reassembling the interface after the interface acquires needed parameterized test data;
and the data clearing module is used for deleting the newly added data when the basic data is preset.
In a third aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
presetting basic data, specifically, constructing a fixed list of unified program codes and a database, performing case operation of a single environment and a user to form first preset data, and presetting the basic data according to the first preset data and the fixed list;
data query, specifically, a fixed rule is established, first preset data is queried according to the fixed rule to obtain test data required by an interface, and the test data is parameterized and transmitted to the interface;
the service program request is specifically that request data at an interface is received, and a parameter value is returned to the interface for verification, wherein the request data is data obtained by reassembling the interface after the interface acquires needed parameterized test data;
and clearing data, and deleting newly added data when the basic data is preset.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the interface testing method according to any embodiment of the present invention are implemented.
Compared with the prior art, the invention has the beneficial effects that:
the invention solves the problems that when the mixed cloud multi-environment multi-tenant is switched at any time, the interface case can not be changed randomly and the effective interface test can not be carried out, provides a set of interface test method for testing the interface cases of the multi-environment multi-tenant, improves the test efficiency, reduces the maintenance cost and achieves the aims of one set of multi-use and no repeated writing and recording.
Drawings
FIG. 1 is a flowchart illustrating a method for testing interface data according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart of a basic data presetting step according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a data query procedure according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a service program requesting step according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a data purge step according to an embodiment of the invention;
fig. 6 is a schematic structural block diagram of an interface data testing apparatus according to a second embodiment of the present invention;
fig. 7 is a schematic diagram of a terminal device according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention is applied to a mixed cloud multi-tenant scene. The hybrid cloud integrates public cloud and private cloud, and is a main mode and development direction of cloud computing in recent years. The private cloud is mainly oriented to enterprise users, for safety, enterprises prefer to store data in the private cloud, but meanwhile hope to obtain computing resources of the public cloud, in the situation, the hybrid cloud is adopted more and more, the public cloud and the private cloud are mixed and matched to obtain the best effect, and the personalized solution achieves the purposes of saving money and being safe.
Multi-tenant technology (english) or multi-tenancy technology is a software architecture technology that explores how to share the same system or program components in a multi-user environment and still ensures data isolation among users. Multi-tenant simply means that a single instance can serve multiple organizations. The multi-tenant technology is how to provide services, which are the same as or even customizable to a plurality of clients, in a single system architecture and service in a shared data center, and can still guarantee data isolation of customers. A system supporting multi-tenant technology needs to perform virtual partitioning on its data and configuration in design, so that each tenant or organization of the system can use a separate system instance, and each tenant can perform personalized configuration on the leased system instance according to its own needs. The multi-tenant technology can realize sharing of the system instances among a plurality of tenants, and meanwhile, can realize personalized customization of the system instances of the tenants. By using the multi-tenant technology, the shared part of the system commonality can be ensured, and the individual parts are isolated independently. Through resource multiplexing among a plurality of tenants, the resources are operated, managed and maintained, and the cost of development and application is effectively saved. Moreover, sharing a single instance of an application among tenants may enable all tenants to upgrade simultaneously when the application is upgraded. Meanwhile, as a plurality of tenants share the core code of the system, when the system is upgraded, only the same core code needs to be upgraded.
Example one
The technical scheme of the embodiment can be suitable for the situation of mixed cloud multi-tenant. The method can be executed by the interface data testing device provided by the embodiment of the invention, and the device can be realized in a software and/or hardware mode and is configured in a terminal, such as a computer, a mobile phone or a tablet computer, and an intelligent sound box.
The interface testing method in the embodiment of the invention is based on the premise that the mixed cloud multi-environment multi-tenant service program codes are consistent, and the database structures are consistent. The mixed cloud has multiple environments and multiple tenants, one environment and one tenant are selected to use case compiling on the premise that the consistent mixed cloud multi-environment and multi-tenant service program codes and the consistent database structure are ensured, and multiple environment and multiple tenants use the set to perform interface testing, and only the URL, the tenant user name and the tenant password need to be changed.
As shown in fig. 1, the method specifically includes the following operations:
s101, basic data presetting, specifically, a fixed list of unified program codes and a database is constructed, case operation of a single environment and a user is carried out to form first preset data, and basic data are preset according to the first preset data and the fixed list;
in this step, more specifically:
selecting an environment, a tenant and a Web end for operation, and capturing packets of data presets to form a use case to obtain first preset data;
taking the use case as a base class package, presetting all data to carry out package capturing operation, issuing lists of all data, and fixing each data item in the data to obtain a fixed list;
and presetting basic data of all data according to the first preset data and the fixed list so as to add new data when the preset data operation is carried out, decouple and remove the interface dependent data.
As shown in fig. 2, a mixed cloud multi-environment multi-tenant system selects an environment 1, a tenant 1, a Web end to operate, and packages are captured for data presets to form a use case, all data presets are used as a base package, and all data presets are captured to ensure that all data are newly added data and all data need to be provided with a list.
S102, data query, specifically, a fixed rule is established, first preset data are queried according to the fixed rule to obtain test data required by an interface, and the test data are parameterized and transmitted to the interface;
in this step, the fixed rule includes fixed data, fixed format, and fixed data items. As shown in fig. 3, according to the fixed format, the fixed data item performs preset data query, so as to ensure that the queried data is newly added data in the previous step, and the query is performed according to specific business key data, where it is noted that the queried data must be unique. The query result is analyzed, and the query result is needed by the service interface. And when multiple environments and multiple tenants exist, the query consistency after data presetting is ensured.
S103, a service program request is carried out, specifically, request data at an interface is received, a parameter value is returned to the interface for verification, wherein the request data is data obtained by reassembling the interface after the interface obtains needed parameterized test data;
in this step, the specific process of obtaining the request data is that the interface dynamically obtains a data packet, obtains parameterized test data, and performs service assembly, and further includes: during repeated execution, dynamically acquiring data of the previous step, performing service operation, capturing a data packet, wherein the current data is fixed data, dynamically acquiring the data queried in the previous step, performing service assembly, and ensuring that the data of the previous step is dynamically acquired in real time during repeated execution.
And S104, removing the data, and deleting the newly added data when the basic data is preset.
In this step, newly added data obtained by the basic data presetting is dynamically acquired, context referencing is performed on returned data, fixed basic data is deleted, as shown in fig. 5, a deleting operation is performed, which basic data is not fixedly deleted after the packet is captured, which basic data is changed into dynamic acquisition, context referencing is performed on returned data after the data is newly added in the first step, and the fixed basic data is deleted.
When the method provided by the embodiment is applied and implemented specifically, the use case writing principle is implemented according to the method:
firstly, the method comprises the following steps: all data are fixedly preset according to the preset planning list, all tenants in all environments perform business processes according to the data, and the mutual exclusion principle of the business processes is guaranteed to be followed.
Secondly, the method comprises the following steps: and inquiring the first preset data, wherein the inquiry conditions are inquired according to a fixed rule, and the inquiry is carried out according to fixed data, a fixed format and fixed data items.
Thirdly, the method comprises the following steps: and carrying out parameterization setting, context association, combination type, random number type, timestamp type and the like on all inquired data to ensure that data parameters required by the service are acquired and transmitted to a service interface.
Fourthly: and the service interface receives the transmission parameters, acquires the required data parameters according to the specific interface and assembles the data parameters.
Fifth, the method comprises the following steps: and after the service interface is reassembled, the service request is carried out, and the return value is checked.
Sixth: and deleting all the newly added data to ensure that the use case is repeatedly executed and no junk data is generated.
Example two
Fig. 6 is a block diagram of an interface data testing apparatus according to a second embodiment of the present invention. The device is used for executing the interface data testing method provided by any embodiment. The device includes:
the basic data presetting module 11 is used for constructing a fixed list of unified program codes and a database, performing case operation of a single environment and a user to form first preset data, and presetting basic data according to the first preset data and the fixed list;
the data query module 12 is configured to construct a fixed rule, query the first preset data according to the fixed rule, obtain test data required by the interface, perform parameterization setting on the test data, and transmit the test data to the interface;
a service program request module 13, configured to receive request data at an interface, and return a parameter value to the interface for verification, where the request data is obtained by reassembling the interface after obtaining required parameterized test data by the interface;
and the data clearing module 14 is used for deleting the newly added data when the basic data is preset.
The interface data testing device provided by the embodiment of the invention can execute the interface data testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
As shown in fig. 7, the terminal 2 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal 2 may include, but is not limited to, a processor 20, a memory 21. It will be appreciated by those skilled in the art that fig. 7 is merely an example of a terminal device 2 and does not constitute a limitation of the terminal 2 and may include more or less components than those shown, or some components may be combined, or different components, for example the terminal device may also include input output devices, network access devices, buses, etc.
The Processor 20 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 21 may be an internal storage unit of the terminal 2, such as a hard disk or a memory of the terminal 2. The memory 21 may also be an external storage device of the terminal 2, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) and the like provided on the terminal 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the terminal 2. The memory 21 is used for storing the computer program and other programs and data required by the terminal device. The memory 21 may also be used to temporarily store data that has been output or is to be output.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of each functional unit is merely illustrated, and in practical applications, the foregoing function distribution may be performed by different functional units according to needs, that is, the internal structure of the terminal device is divided into different functional units to perform all or part of the above-described functions. Each functional unit in the embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application. The specific working process of the units in the system may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed terminal device and method may be implemented in other ways. For example, the above-described terminal device embodiments are merely illustrative, and for example, the division of the units is only one logical function division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
Example four
The fourth embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the interface testing method according to any embodiment of the present invention are implemented.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the interface data testing method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. An interface data testing method, comprising:
presetting basic data, specifically, constructing a fixed list of unified program codes and a database, performing case operation of a single environment and a user to form first preset data, and presetting the basic data according to the first preset data and the fixed list;
data query, specifically, a fixed rule is established, first preset data is queried according to the fixed rule to obtain test data required by an interface, and the test data is parameterized and transmitted to the interface;
the service program request is specifically that request data at an interface is received, and a parameter value is returned to the interface for verification, wherein the request data is data obtained by reassembling the interface after the interface acquires needed parameterized test data;
and clearing data, and deleting newly added data when the basic data is preset.
2. The method for testing interface data according to claim 1, wherein: the fixed rules include fixed data, fixed format, and fixed data items.
3. The method for testing interface data according to claim 1, wherein the procedure of the basic data presetting step is more specifically:
selecting an environment, a tenant and a Web end for operation, and capturing packets of data presets to form a use case to obtain first preset data;
taking the use case as a base class package, presetting all data to carry out package capturing operation, issuing lists of all data, and fixing each data item in the data to obtain a fixed list;
and presetting basic data of all data according to the first preset data and the fixed list so as to add new data when the preset data operation is carried out, decouple and remove the interface dependent data.
4. The method for testing interface data according to claim 1, wherein: the specific process of acquiring the request data is that the interface dynamically acquires a data packet to obtain parameterized test data and carry out service assembly.
5. The method for testing interface data according to claim 4, wherein the obtaining of the request data further comprises: and when repeated execution is carried out, the data of the previous step is dynamically acquired.
6. The method for testing interface data according to claim 1, wherein: when the data clearing step is carried out, specifically, newly added data obtained in basic data presetting is dynamically obtained, context transfer is carried out on the returned data, and fixed basic data are deleted.
7. An interface data testing apparatus, comprising:
the basic data presetting module is used for constructing a fixed list of unified program codes and a database, carrying out case operation of a single environment and a user to form first preset data, and presetting basic data according to the first preset data and the fixed list;
the data query module is used for constructing a fixed rule, querying first preset data according to the fixed rule to obtain test data required by the interface, carrying out parameterization setting on the test data and transmitting the test data to the interface;
the service program request module is used for receiving request data at the interface and returning parameter values to the interface for verification, wherein the request data is data obtained by reassembling the interface after the interface acquires needed parameterized test data;
and the data clearing module is used for deleting the newly added data when the basic data is preset.
8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
presetting basic data, specifically, constructing a fixed list of unified program codes and a database, performing case operation of a single environment and a user to form first preset data, and presetting the basic data according to the first preset data and the fixed list;
data query, specifically, a fixed rule is established, first preset data is queried according to the fixed rule to obtain test data required by an interface, and the test data is parameterized and transmitted to the interface;
the service program request is specifically that request data at an interface is received, and a parameter value is returned to the interface for verification, wherein the request data is data obtained by reassembling the interface after the interface acquires needed parameterized test data;
and clearing data, and deleting newly added data when the basic data is preset.
9. A computer-readable storage medium storing a computer program, characterized in that: the computer program when executed by a processor implementing the steps of the interface testing method according to any one of claims 1 to 6.
CN201911113903.XA 2019-11-14 2019-11-14 Interface data testing method, device, terminal and storage medium Active CN111045928B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911113903.XA CN111045928B (en) 2019-11-14 2019-11-14 Interface data testing method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911113903.XA CN111045928B (en) 2019-11-14 2019-11-14 Interface data testing method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111045928A true CN111045928A (en) 2020-04-21
CN111045928B CN111045928B (en) 2024-03-26

Family

ID=70232016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911113903.XA Active CN111045928B (en) 2019-11-14 2019-11-14 Interface data testing method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111045928B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783791A (en) * 2021-02-08 2021-05-11 中国工商银行股份有限公司 Interface test case generation method and device
CN114461516A (en) * 2021-12-23 2022-05-10 连邦网络科技服务南通有限公司 Software graphical interface testing method capable of automatically deleting data and server

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183658A (en) * 2015-10-12 2015-12-23 用友网络科技股份有限公司 Software code testing method and device
US20160062879A1 (en) * 2014-08-29 2016-03-03 International Business Machines Corporation Testing a mobile application
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
CN107832230A (en) * 2017-12-04 2018-03-23 中国工商银行股份有限公司 Method of testing, equipment and system based on data tuning
US10127145B1 (en) * 2016-03-22 2018-11-13 EMC IP Holding Company LLC Automated testing system and method
CN109271326A (en) * 2018-11-28 2019-01-25 优刻得科技股份有限公司 Test method and its device, the equipment and storage medium of cloud database
CN110232016A (en) * 2019-03-08 2019-09-13 上海蔚来汽车有限公司 Interface testing case generation method, device and controller and medium
CN110287093A (en) * 2019-05-20 2019-09-27 平安普惠企业管理有限公司 Mobile terminal, data-interface test method and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160062879A1 (en) * 2014-08-29 2016-03-03 International Business Machines Corporation Testing a mobile application
CN105183658A (en) * 2015-10-12 2015-12-23 用友网络科技股份有限公司 Software code testing method and device
US10127145B1 (en) * 2016-03-22 2018-11-13 EMC IP Holding Company LLC Automated testing system and method
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
CN107832230A (en) * 2017-12-04 2018-03-23 中国工商银行股份有限公司 Method of testing, equipment and system based on data tuning
CN109271326A (en) * 2018-11-28 2019-01-25 优刻得科技股份有限公司 Test method and its device, the equipment and storage medium of cloud database
CN110232016A (en) * 2019-03-08 2019-09-13 上海蔚来汽车有限公司 Interface testing case generation method, device and controller and medium
CN110287093A (en) * 2019-05-20 2019-09-27 平安普惠企业管理有限公司 Mobile terminal, data-interface test method and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
GLEB RADCHENKO等: "Testing-as-a-Service Approach for Cloud Applications", 《2016 IEEE/ACM 9TH INTERNATIONAL CONFERENCE ON UTILITY AND CLOUD COMPUTING (UCC)》 *
GLEB RADCHENKO等: "Testing-as-a-Service Approach for Cloud Applications", 《2016 IEEE/ACM 9TH INTERNATIONAL CONFERENCE ON UTILITY AND CLOUD COMPUTING (UCC)》, 9 November 2016 (2016-11-09), pages 1 - 2 *
徐旼之: "基于云的接口自动化测试平台的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
徐旼之: "基于云的接口自动化测试平台的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 March 2017 (2017-03-15), pages 138 - 2518 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783791A (en) * 2021-02-08 2021-05-11 中国工商银行股份有限公司 Interface test case generation method and device
CN112783791B (en) * 2021-02-08 2024-05-24 中国工商银行股份有限公司 Interface test case generation method and device
CN114461516A (en) * 2021-12-23 2022-05-10 连邦网络科技服务南通有限公司 Software graphical interface testing method capable of automatically deleting data and server
CN114461516B (en) * 2021-12-23 2024-03-29 连邦网络科技服务南通有限公司 Software graphic interface test method capable of automatically deleting data and server

Also Published As

Publication number Publication date
CN111045928B (en) 2024-03-26

Similar Documents

Publication Publication Date Title
CN107798038B (en) Data response method and data response equipment
CN110019080B (en) Data access method and device
US20150215376A1 (en) Systems and methods for deploying legacy software in the cloud
CN112925647A (en) Cloud edge coordination system, and control method and device of cluster resources
CN110324169A (en) A kind of method and apparatus of interface management
CN103077024A (en) Device and method for supporting customization and running of software-as-a-service (SaaS) application processes
CN102663009A (en) Web-service integration method supporting data privatization of enterprise users
CN112217656A (en) Method and device for synchronizing configuration information of network equipment in SD-WAN (secure digital-to-Wide area network) system
US10979515B1 (en) Resource discovery agent computing device, software application, and method
CN110738038A (en) Contract text generation method, device, equipment and computer readable storage medium
CN111045928B (en) Interface data testing method, device, terminal and storage medium
CN109391658B (en) Account data synchronization method and equipment, storage medium and terminal thereof
CN112363997B (en) Data version management method, device and storage medium
CN109299173A (en) Data transmission method, device and storage medium
CN111291045A (en) Service isolation data transmission method and device, computer equipment and storage medium
CN113709187B (en) Multi-server data request method, device, equipment and storage medium
CN113742369B (en) Data authority management method, system and storage medium
CN110347654A (en) A kind of method and apparatus of online cluster features
CN112650598A (en) Multi-application access method for workflow system
CN113765983A (en) Site service deployment method and device
CN113342845A (en) Data synchronization method, computer device and readable storage medium
JP5636394B2 (en) Information processing apparatus, information processing method, and program
KR20210128096A (en) Apparatus and method for interworking among internet of things platforms
CN113691575A (en) Communication method, device and system
CN104980329A (en) Address book management method address book management device and mobile agent server

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
GR01 Patent grant
GR01 Patent grant