CN116501618A - Analog interface test method, device, computer equipment and readable storage medium - Google Patents

Analog interface test method, device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN116501618A
CN116501618A CN202310366003.6A CN202310366003A CN116501618A CN 116501618 A CN116501618 A CN 116501618A CN 202310366003 A CN202310366003 A CN 202310366003A CN 116501618 A CN116501618 A CN 116501618A
Authority
CN
China
Prior art keywords
analog interface
interface
request data
effective time
analog
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
CN202310366003.6A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202310366003.6A priority Critical patent/CN116501618A/en
Publication of CN116501618A publication Critical patent/CN116501618A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for testing an analog interface, a computer device, and a readable storage medium, where the method includes: configuring an analog interface based on an interface name and a uniform resource locator, and configuring effective time for the analog interface; when request data is received, judging whether the request data needs to use the analog interface according to interface information carried in the request data; if yes, adding the request data in the analog interface; and returning response data according to the request data and the effective time. According to the embodiment of the invention, the effective time is configured for the analog interface, so that the analog interface is effective only in a specific time, the influence on other real test services is effectively avoided, the starting and closing of the analog interface by manpower is greatly reduced, and the efficiency of research and development test is improved.

Description

Analog interface test method, device, computer equipment and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for testing an analog interface, a computer device, and a readable storage medium.
Background
With the development of mobile internet technology, software testing is a very important ring in ensuring software and quality, wherein Mock testing is a common debugging means in software engineering, and refers to a testing method for creating a virtual object for testing some objects which are not easy to construct or easy to obtain in the testing process. Scenes that typically use Mock are: abnormal test environment, difficult preparation of interfaces or real data, etc. However, at present, the corresponding analog interface needs to be configured in the test of some special service scenes, but the analog interface may not need to be used in the test in the subsequent test of other service scenes, but the test is abnormal or the test is not a real service interface but an analog interface due to the configuration of the previous analog interface.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a simulation interface testing method, a simulation interface testing device, a simulation interface testing computer device and a computer device which can be used in the fields of financial science and technology or other related fields, so that the simulation interface is set to be effective in a specific time, the influence on other real testing services is effectively avoided, the starting and closing of the simulation interface by manpower is greatly reduced, and the efficiency of research and development testing is improved.
In a first aspect, an embodiment of the present invention provides a method for testing an analog interface, including:
configuring an analog interface based on an interface name and a uniform resource locator, and configuring effective time for the analog interface;
when request data is received, judging whether the request data needs to use the analog interface according to interface information carried in the request data;
if yes, adding the request data in the analog interface;
and returning response data according to the request data and the effective time.
In one embodiment, after the valid time is configured for the analog interface, the method further includes:
judging whether the effective time is configured successfully or not;
if not, automatically configuring the effective time with preset duration for the analog interface, so that the use of the analog interface is stopped after the effective time is finished.
In one embodiment, after the valid time is configured for the analog interface, the method further includes:
and configuring an effective period for the effective time so that the analog interface is in a usable state each time within the effective time of the effective period.
In one embodiment, the returning response data according to the request data and the valid time includes:
judging whether the analog interface is in the usable state according to the effective time;
if yes, responding to the request data based on the simulation interface, and returning the response data.
In one embodiment, after the determining whether the analog interface is in the usable state, the method further includes:
if not, forwarding the request data to a real interface so that the real interface responds to the request data and returns the response data.
In one embodiment, the determining whether the analog interface is in the usable state includes:
if the current time is within the effective time range, determining that the analog interface is in the usable state;
and if the current time is not in the effective time range, determining that the analog interface is in an unavailable state.
In one embodiment, each test application that matches the analog interface is configured to the analog interface such that the test application uses the analog interface for the effective time, wherein the information of the test application includes a computer domain name, an application name, an IP address, and a port.
In a second aspect, an embodiment of the present invention provides an analog interface testing apparatus, including:
the configuration module is used for configuring the simulation interface based on the interface name and the uniform resource locator and configuring effective time for the simulation interface;
the judging module is used for judging whether the request data needs to use the analog interface according to the interface information carried in the request data when the request data is received;
the adding module is used for adding the request data in the analog interface if yes;
and the response module is used for returning response data according to the request data and the effective time.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program executes the above-mentioned analog interface testing method when running on the processor.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the method for testing an analog interface as described above.
The embodiment of the invention provides an analog interface testing method, an analog interface testing device, computer equipment and a readable storage medium, wherein the method comprises the following steps: configuring an analog interface based on an interface name and a uniform resource locator, and configuring effective time for the analog interface; when request data is received, judging whether the request data needs to use the analog interface according to interface information carried in the request data; if yes, adding the request data in the analog interface; and returning response data according to the request data and the effective time. Compared with the prior art, the embodiment of the invention ensures that the analog interface takes effect only in a specific time by configuring the effective time for the analog interface, can effectively avoid the influence on other real test services, greatly reduces the starting and closing of the analog interface by manpower, and improves the efficiency of research and development test.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are required for the embodiments will be briefly described, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope of the present invention. Like elements are numbered alike in the various figures.
Fig. 1 is a schematic flow chart of an analog interface testing method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart after a valid time of configuration provided by an embodiment of the present invention;
FIG. 3 is a schematic flow chart of returning response data according to an embodiment of the present invention;
fig. 4 shows a block diagram of an analog interface testing apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments.
The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present invention, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the invention belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the invention.
With the development of mobile internet technology, software testing is one of the most important links in the development of technology, wherein Mock testing is a common debugging means in software engineering, the application scenario is very wide, at present, the testing in some special service scenarios needs to configure a corresponding analog interface, however, the analog interface may not be required to be used in the subsequent testing in other service scenarios, but due to the configuration of the previous analog interface, the testing is abnormal, or the testing is not a real service interface but an analog interface. Aiming at the problems, the embodiment of the invention provides a simulation interface testing method, a simulation interface testing device, a simulation interface testing computer device and a simulation interface readable storage medium which can be used in the financial science and technology or other related fields, so that the simulation interface can only be used in the effective time by setting the simulation interface at the specific effective time, the interference and the influence on other real testing services are effectively avoided, the starting and closing of the simulation interface by manpower are greatly reduced, and the efficiency of research and development testing is improved.
Example 1
Referring to fig. 1, an embodiment of the present invention provides a method for testing an analog interface, which specifically includes the following steps:
step S110: based on the interface name and the uniform resource locator, configuring an analog interface, and configuring effective time for the analog interface.
It will be appreciated that when a project starts to develop, it is usually the case that the development of the front end and the development of the background are performed simultaneously, but many cases that the background provides the interface first and then the front end starts to write the page, however, this results in slow development project progress, so that in actual test work, many simulation interfaces need to be configured.
Specifically, URL (uniform resource locator ) is a compact representation of the location and access method of resources available on the internet, each interface having only one corresponding interface name and uniform resource locator, i.e. the same interface name and uniform resource locator, only one analog interface can be created. Therefore, the embodiment can realize independent testing of a plurality of interfaces, and release the coupling dependence of the interfaces among the project groups, so that the testing environment is more independent, and the maintenance and the use are easy.
The valid time refers to the time that the analog interface can be used, and when the analog interface is not in the valid time, the analog interface cannot respond to any request data. Illustratively, the effective time may be configured to be 12:00-16:00 on day 1 of 10 months 2022, i.e., the effective duration is 4 hours, then the analog interface may be enabled for use during 12:00-16:00 of the day 1 of 10 months 2022. The effective time can be configured to be 8:00-10:00 and 12:00-14:00 of the day 1 of the 10 month of 2022, so that the effective time can be set according to the actual project test time, and the effective time is not limited herein.
After the effective time is configured for the analog interface, whether the configuration of the effective time is effective or not needs to be judged, so that the timeliness of the analog interface is further ensured, and further, referring to fig. 2, the following steps are further included after the effective time is configured for the analog interface:
step S160: and judging whether the effective time is configured successfully or not.
If not, go to step S170: and automatically configuring the effective time with preset duration for the analog interface so as to stop the use of the analog interface after the effective time is finished.
Specifically, by automatically configuring the effective time of the preset duration for the analog interfaces, even if manual configuration is not performed, it can be ensured that each analog interface can set the effective time. The effective time of the preset duration is 30 minutes, the analog interface is effective within 30 minutes after the analog interface is created, that is, the analog interface is capable of responding to the request data meeting the requirements until 30 minutes completely pass, and the analog interface automatically fails, so that the normal service interface is restored. Specifically, if the valid time configuration is successful, step S120 is directly executed, and if the valid time configuration is failed, step S170 is executed first, and then step S120 is executed.
Step S120: when request data is received, judging whether the request data needs to use the analog interface according to interface information carried in the request data.
Illustratively, the interface information includes, but is not limited to, an interface name, an interface type, a method name, a Primary parameter name, and the like, so that whether the request data requires the use of the analog interface can be accurately determined according to the interface information. If the interface information is consistent with the interface information corresponding to the analog interface, the analog interface is considered to be needed to be used for the request data, and if the interface information is inconsistent with the interface information, the analog interface is not needed to be used for the request data.
Therefore, the matching of the interface information can add all the request data which accords with the calling of the simulation interface to the simulation interface, so that the simulation interface can process the request data which needs to use the simulation interface, thereby effectively avoiding the influence on other real test services and ensuring the correctness of the test.
Specifically, if it is determined that the analog interface is required to be used for the request data, step S130 is executed: the request data is added in the analog interface. If it is determined that the analog interface is not needed for the request data, step S150 is executed: and controlling the analog interface to refuse to add the request data.
It will be appreciated that only the request data added to the analog interface will the analog interface respond to the request data. Further, successful request data is added to the analog interface, which is capable of responding to the request data within a valid time.
Step S140: and returning response data according to the request data and the effective time.
Illustratively, if the valid time is determined to be successful in the step S160, the request data is responded according to the valid time configured in the step S110. If the effective time is determined to be successful in configuration in step S160, the request data is responded according to the effective time of the preset duration automatically configured in step S170, and then response data is returned to the client.
Therefore, the embodiment of the invention ensures that the analog interface takes effect only in a specific time by configuring the effective time for the analog interface, effectively avoids the influence on other real test services, greatly reduces the starting and closing of the analog interface by manpower and improves the efficiency of research and development tests.
In one embodiment, after the valid time is configured for the analog interface in step S110, the method further includes:
and configuring an effective period for the effective time so that the analog interface is in a usable state each time within the effective time of the effective period.
Illustratively, the time for starting the validation and the time for ending the validation of the analog interface can be configured by using a cron expression, so that the configuration of the validation period is completed, and the periodicity of using the analog interface is realized, wherein the cron expression is a group of character strings formed by a plurality of numbers, spaces and symbols according to a certain rule, so that the time information is expressed. cron expression format: { seconds } { minutes } { hours } { dates } { months } { weeks } { years }, which may be omitted in general, for example, setting cron expression to "0 0.12.0. Wed" means that the analog interface is set to: execution begins at 12:00 pm on three days per week.
Referring to fig. 3, in one embodiment, the step S140 specifically includes:
step S141: and judging whether the analog interface is in the usable state according to the effective time.
In particular, the active time is configured for the analog interface, essentially setting a limit time for the use of the analog interface, so that the analog interface is not available at any time. Therefore, before responding to the request data, a determination needs to be made as to the status of the analog interface. It will be appreciated that the analog interface can only be used, i.e. in a usable state, when the analog interface is in an active time.
Therefore, if the analog interface is in the usable state, step S142 is performed: responding to the request data based on the simulation interface, and returning the response data.
If the analog interface is not in the usable state, step S143 is executed: and forwarding the request data to a real interface so that the real interface responds to the request data and returns the response data.
It can be understood that the request data are different, the returned response data are also different, and the simulation interface is enabled to be effective through the effective time and/or the effective period when the automatic test script runs, and meanwhile, the use of the real business interface is not affected by the simulation interface outside the automatic test running period.
In one embodiment, the step S141 includes:
if the current time is within the effective time range, determining that the analog interface is in the usable state;
and if the current time is not in the effective time range, determining that the analog interface is in an unavailable state.
Alternatively, the internal system clock of the computer may be used to monitor the time, so as to quickly and accurately determine whether the analog interface is in an available state or an unavailable state. For example, the configuration valid time is 2022, 10, 8:00 to 9:00, and at this time, the time read by the internal system clock is 9:30 of the day, then the analog interface is in an unavailable state, and therefore, whether the request data has been added or not added to the analog interface is forwarded to the real interface, so that the real interface responds to the request data; if the time read by the internal system clock is 8:30 of the day, the analog interface is in a usable state, and the analog interface can respond to the request data of the analog interface and return the response data to the client.
In one embodiment, the analog interface testing method further includes:
and configuring each test application matched with the simulation interface to the simulation interface so that the test application uses the simulation interface in the effective time, wherein the information of the test application comprises a computer domain name, an application name, an IP address and a port.
The Domain Name (also called as a network Domain) is the Name of a certain computer or computer group on the Internet, which is formed by a series of names separated by points, and is used for positioning and identifying the computer during data transmission; the internet can be accessed more conveniently by the computer domain name. The IP address (Internet Protocol Address) is a unified address format provided by the IP protocol, and is the number of devices connected to the Internet, and each network and host has a logical address, so that when data is exchanged, communication errors on the network can be effectively prevented through the IP address. Thus, a test application in a particular computer device is configured to the analog interface so that the test application can use the analog interface for an effective time. Further, different network tests can be distinguished further accurately by the limitation of the ports.
Example 2
Referring to fig. 4, fig. 4 is a block diagram of an analog interface testing apparatus 100 according to an embodiment of the present invention, and specifically, the analog interface testing apparatus 100 includes: a configuration module 110, a judgment module 120, an addition module 130 and a response module 140.
The configuration module 110 is configured to configure an analog interface based on the interface name and the uniform resource locator, and configure a valid time for the analog interface.
And the judging module 120 is configured to judge whether the analog interface is needed to be used for the request data according to the interface information carried in the request data when the request data is received.
And the adding module 130 is configured to add the request data in the analog interface if yes.
And the response module 140 is used for returning response data according to the request data and the effective time.
Optionally, the configuration module 110 specifically includes:
the first judging submodule is used for judging whether the effective time is configured successfully or not;
and the first configuration submodule is used for automatically configuring the effective time with preset duration for the analog interface if not, so that the use of the analog interface is stopped after the effective time is finished.
Optionally, the configuration module 110 specifically further includes:
and the second configuration submodule is used for configuring an effective period for the effective time so that the analog interface is in a usable state each time within the effective time of the effective period.
Optionally, the response module 140 specifically includes:
the second judging submodule judges whether the analog interface is in the usable state according to the effective time;
and the response sub-module is used for responding to the request data based on the analog interface and returning the response data if yes.
Optionally, the response module 140 specifically further includes:
and the forwarding sub-module forwards the request data to a real interface if not, so that the real interface responds to the request data and returns the response data.
Optionally, the second judging sub-module further includes:
the first determining unit is used for determining that the analog interface is in the usable state if the current time is within the effective time range;
and the second determining unit is used for determining that the analog interface is in an unavailable state if the current time is not in the effective time range.
Optionally, the analog interface testing device 100 is specifically further configured to configure each test application matched with the analog interface to the analog interface, so that the test application uses the analog interface in the valid time; the information of the test application comprises a computer domain name, an application name, an IP address and a port.
The analog interface testing device provided in the embodiment of the present application corresponds to each step of the analog interface testing method in embodiment 1, and the options in embodiment 1 are also applicable to this embodiment, so they are not repeated here.
The embodiment of the invention also provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program, and the computer program realizes the simulation interface testing method in the embodiment 1 when being executed by the processor.
In this embodiment, the computer device is a device capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance. For example, it may be a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers), etc.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the method for testing the analog interface is realized.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. that are provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer-readable storage medium is typically used to store an operating system and various types of application software installed on a computer device. Furthermore, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the invention may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention.

Claims (10)

1. A method for testing an analog interface, comprising:
configuring an analog interface based on an interface name and a uniform resource locator, and configuring effective time for the analog interface;
when request data is received, judging whether the request data needs to use the analog interface according to interface information carried in the request data;
if yes, adding the request data in the analog interface;
and returning response data according to the request data and the effective time.
2. The method for testing an analog interface according to claim 1, wherein after said configuring said analog interface with a valid time, further comprising:
judging whether the effective time is configured successfully or not;
if not, automatically configuring the effective time with preset duration for the analog interface, so that the use of the analog interface is stopped after the effective time is finished.
3. The method for testing an analog interface according to claim 1, wherein after said configuring said analog interface with a valid time, further comprising:
and configuring an effective period for the effective time so that the analog interface is in a usable state each time within the effective time of the effective period.
4. A method according to claim 3, wherein said returning response data based on said request data and said validity time comprises:
judging whether the analog interface is in the usable state according to the effective time;
if yes, responding to the request data based on the simulation interface, and returning the response data.
5. The method according to claim 4, wherein after determining whether the analog interface is in the usable state, further comprising:
if not, forwarding the request data to a real interface so that the real interface responds to the request data and returns the response data.
6. The method according to claim 4 or 5, wherein the determining whether the analog interface is in the usable state includes:
if the current time is within the effective time range, determining that the analog interface is in the usable state;
and if the current time is not in the effective time range, determining that the analog interface is in an unavailable state.
7. The analog interface testing method according to claim 1, further comprising:
and configuring each test application matched with the simulation interface to the simulation interface so that the test application uses the simulation interface in the effective time, wherein the information of the test application comprises a computer domain name, an application name, an IP address and a port.
8. An analog interface testing device, comprising:
the configuration module is used for configuring the simulation interface based on the interface name and the uniform resource locator and configuring effective time for the simulation interface;
the judging module is used for judging whether the request data needs to use the analog interface according to the interface information carried in the request data when the request data is received;
the adding module is used for adding the request data in the analog interface if yes;
and the response module is used for returning response data according to the request data and the effective time.
9. A computer device comprising a memory and a processor, the memory storing a computer program that, when run on the processor, performs the analog interface testing method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the analog interface testing method according to any of claims 1 to 7.
CN202310366003.6A 2023-03-28 2023-03-28 Analog interface test method, device, computer equipment and readable storage medium Pending CN116501618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310366003.6A CN116501618A (en) 2023-03-28 2023-03-28 Analog interface test method, device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310366003.6A CN116501618A (en) 2023-03-28 2023-03-28 Analog interface test method, device, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116501618A true CN116501618A (en) 2023-07-28

Family

ID=87325776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310366003.6A Pending CN116501618A (en) 2023-03-28 2023-03-28 Analog interface test method, device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116501618A (en)

Similar Documents

Publication Publication Date Title
WO2018000607A1 (en) Method and electronic apparatus for identifying test case failure causes
CN113014475B (en) Message pushing integration method and device
CN108984389A (en) A kind of applied program testing method and terminal device
CN109491889B (en) Method and device for automatic test in NFV
CN113900941A (en) Micro-service processing method, micro-service system, electronic device and storage medium
CN111858376A (en) Request message generation method and interface test method
CN116204438A (en) Test case generation method, automatic test method and related device
CN107357721B (en) Method and device for testing system
CN113608692A (en) Method, system, equipment and medium for verifying data consistency of storage system
CN110278272B (en) Universal method for simulating Socket request
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN112260885B (en) Industrial control protocol automatic test method, system, device and readable storage medium
CN112015651A (en) Data processing method and device
CN112685077A (en) Data modification method, system, computer device and computer readable storage medium
CN116501618A (en) Analog interface test method, device, computer equipment and readable storage medium
CN115242872A (en) Data processing method and device, computer equipment and readable storage medium
CN112612848B (en) Method, device, system, electronic equipment and storage medium for data real-time synchronization
CN114817340A (en) Data tracing method and device, computer equipment and storage medium
CN114037539A (en) Method and device for detecting single-link failure of insurance
CN114416420A (en) Equipment problem feedback method and system
CN113986747A (en) Data generation method and device, electronic equipment and storage medium
CN111143644B (en) Identification method and device of Internet of things equipment
CN112463810A (en) Data processing method, device, equipment and storage medium based on distributed transaction
CN110221952B (en) Service data processing method and device and service data processing system
CN111225075A (en) Configuration method and device for Internet of things directional access service

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