CN113986753A - Interface test method, device, equipment and storage medium - Google Patents

Interface test method, device, equipment and storage medium Download PDF

Info

Publication number
CN113986753A
CN113986753A CN202111327207.6A CN202111327207A CN113986753A CN 113986753 A CN113986753 A CN 113986753A CN 202111327207 A CN202111327207 A CN 202111327207A CN 113986753 A CN113986753 A CN 113986753A
Authority
CN
China
Prior art keywords
interface
test
script
target
testing
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
CN202111327207.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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202111327207.6A priority Critical patent/CN113986753A/en
Publication of CN113986753A publication Critical patent/CN113986753A/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/3688Test management for test execution, e.g. scheduling of test suites

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 application provides an interface testing method, an interface testing device, interface testing equipment and a storage medium, relates to the technical field of software, and can solve the problems of interface omission, low testing efficiency and high testing cost in the related technology. The method comprises the following steps: acquiring a test instruction; the test instruction is used for testing an interface set, and the interface set comprises one or more system interfaces; responding to the test instruction, and calling a preset script execution command; and executing the test script of each interface in the interface set according to the script execution command, and generating an execution result of the test script of each interface.

Description

Interface test method, device, equipment and storage medium
Technical Field
The present invention relates to the field of software technologies, and in particular, to a method, an apparatus, a device, and a storage medium for testing an interface.
Background
With the increasing abundance and sophistication of bank Internet Technology (IT) systems, some banks now even involve hundreds of IT systems. These systems do not operate independently, but rather are called by interfacing with each other to perform the corresponding functions. Therefore, after the system development is completed, the interface between the systems needs to be tested to verify the stability of the system for providing the service to the outside and ensure the normal development of banking business.
At present, the interface test of the bank system mainly depends on manual test. However, because the number of interfaces of the bank system is large and the interfaces are complex, the testing personnel can easily omit the interfaces during testing, and some interfaces are not tested; moreover, the testing efficiency is low during manual testing, and the testing cost is high.
Disclosure of Invention
The application provides an interface testing method, device, equipment and storage medium, which can solve the problems of interface omission, low testing efficiency and high testing cost in the related technology.
The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an interface testing method, where the method includes: acquiring a test instruction; the test instruction is used for testing an interface set, and the interface set comprises one or more system interfaces; responding to the test instruction, and calling a preset script execution command; and executing the test script of each interface in the interface set according to the script execution command, and generating an execution result of the test script of each interface.
Based on the first aspect, the electronic equipment responds to the test instruction, calls a preset script execution command, and sequentially executes the test script of each interface in the interface set according to the script execution command; because the interface set comprises one or more interfaces of the systems, namely the interfaces of the systems are uniformly integrated into the interface set, the electronic equipment can respond to the test instruction to uniformly test each interface in the interface set, the problem of interface omission in the test process is avoided, the test efficiency is improved, and the test cost is reduced.
Optionally, the test instruction is further configured to indicate a test type corresponding to the interface to be tested; the test type comprises at least one of a service flow test, an interface message test, a database test, an abnormal scene test, an interface parameter test or a performance test.
Optionally, the method further includes: when the execution result is abnormal, acquiring a test problem; the test problems comprise error information and error logs; determining a target interface corresponding to the test problem; and responding to the modification operation of the user on the program of the target interface, processing the test problem, and re-executing the test script of the target interface until the execution result of the test script of the target interface is normal.
Based on the optional mode, when the execution result is abnormal, the electronic equipment acquires the test problem and determines a test interface corresponding to the test problem. Therefore, developers can modify the corresponding target interface aiming at the test problem and test the target interface again until the execution result of the test script of the target interface is normal, and the test quality is further improved.
Optionally, the method further includes: when the number of the test problems of the target interface is less than or equal to a first preset value, determining that the target interface is a first type interface; when the number of the test problems of the target interface is larger than a first preset value and is smaller than or equal to a second preset value, determining that the target interface is a second type interface; and when the number of the test problems of the target interface is greater than a second preset value, determining that the target interface is a third type interface.
Based on the optional mode, the electronic equipment can grade the quality of the target interfaces according to the number of the target interfaces, and developers can determine different solutions for the target interfaces with different quality grades, so that the developers can conveniently process test problems in time, and the test quality is further improved.
Optionally, the method further includes: displaying a first prompt identifier under the condition that the target interface is a first type interface; displaying a second prompt identifier under the condition that the target interface is a second type interface; and displaying a third prompt identifier under the condition that the target interface is a third type interface.
Based on this optional mode, through marking different quality hierarchical target interface as different colours, can audio-visually demonstrate in the interface storehouse and have the interface of different test problem quantity to carry out the quality early warning (for example mark red) to the interface that test problem is more, so, can make things convenient for the audio-visual interface that sees test problem is more of developer, and handle.
Optionally, the method further includes: displaying a first interface; the first interface comprises a set of interfaces; responding to the editing operation of a user on the first interface, and editing the interface set; the editing operation includes one or more of adding, deleting, modifying, or finding.
Optionally, obtaining the test instruction includes: receiving a test instruction of a user; or acquiring a test instruction according to preset time; or acquiring a test instruction according to a preset period.
A second aspect and an embodiment of the present application provide an interface testing apparatus, where the interface testing apparatus may implement the functions performed by the testing apparatus in the above first aspect or the possible designs of the first aspect, and the functions may be implemented by executing corresponding software through hardware. The hardware or software comprises one or more modules corresponding to the functions. The testing device can comprise an acquisition module, a calling module and a first processing module; specifically, the acquisition module is configured to acquire a test instruction; the test instruction is used for testing an interface set, and the interface set comprises one or more interfaces of the system; the replacing module is configured to respond to the test instruction and call a preset script execution command; the first processing module is configured to execute the test script of each interface in the interface set according to the script execution command and generate an execution result of the test script of each interface.
Optionally, the test instruction is further used to indicate a test type corresponding to the interface to be tested. The test type comprises at least one of a service flow test, an interface message test, a database test, an abnormal scene test, an interface parameter test or a performance test.
Optionally, the testing apparatus further includes a second processing module; the second processing module is configured to acquire the test problem when the execution result is abnormal; the test problems comprise error information and error logs; determining a target interface corresponding to the test problem; and responding to the modification operation of the user on the program of the target interface, processing the test problem, and automatically executing the test script of the target interface until the execution result of the test script of the target interface is normal.
Optionally, the testing apparatus further includes a determining module; the determining module is configured to determine that the target interface is a first type interface when the number of the test problems of the target interface is less than or equal to a first preset value; when the number of the test problems of the target interface is larger than a first preset value and is smaller than or equal to a second preset value, determining that the target interface is a second type interface; and when the number of the test problems of the target interface is greater than a second preset value, determining that the target interface is a third type interface.
Optionally, the testing apparatus further includes a first display module; the first display module is configured to display a first prompt identifier if the target interface is a first type interface; displaying a second prompt identifier under the condition that the target interface is a second type interface; and displaying a third prompt identifier under the condition that the target interface is a third type interface.
Optionally, the testing device further includes a second display module; the second display module is configured to display the first interface; the first interface comprises a set of interfaces; responding to the editing operation of a user on the first interface, and editing the interface set; the editing operation includes one or more of adding, deleting, repairing, or finding.
Optionally, the obtaining module is further configured to receive a test instruction of a user; or acquiring a test instruction according to preset time; or acquiring a test instruction according to a preset period.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory and a processor. The memory is coupled to the processor. The memory is for storing computer program code comprising computer instructions. The computer instructions, when executed by a processor, cause an electronic device to perform a method as set forth in the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the method according to any one of the possible implementations of the first aspect or the second aspect.
A fifth aspect provides a computer program product comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method according to the first aspect or any one of the possible implementations of the first aspect.
It is understood that any one of the testing apparatuses, computer readable storage media, computer program products or chips provided above can be applied to the corresponding methods provided above, and therefore, the beneficial effects achieved by the testing apparatuses, the computer readable storage media, the computer program products or chips can refer to the beneficial effects in the corresponding methods, and are not described herein again.
These and other aspects of the present application will be more readily apparent from the following description.
Drawings
Fig. 1a is a schematic structural diagram of an interface test apparatus according to an embodiment of the present invention;
FIG. 1b is a schematic diagram illustrating a computer device according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an interface testing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a test type provided by an embodiment of the present invention;
fig. 4 is a schematic flowchart of another interface testing method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another interface testing method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an interface testing apparatus according to an embodiment of the present invention.
Detailed Description
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The terms "first" and "second" and the like in the description and drawings of the present application are used for distinguishing different objects or for distinguishing different processes for the same object, and are not used for describing a specific order of the objects.
Furthermore, the terms "including" and "having," and any variations thereof, as referred to in the description of the present application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the present application, the meaning of "a plurality" means two or more unless otherwise specified.
Before describing the embodiments of the present application, terms referred to in the present application will be described.
Interface testing: the method refers to testing interfaces among different systems, and is mainly used for testing interaction points among systems outside a bank and among subsystems inside the bank.
A Robot Process Automation (RPA) refers to software that can simulate a human to complete a series of computer operations, and uses a robot as a virtual labor force to interact with a system according to a preset program and complete an expected task. The RPA can be applied to any industry as long as the two principles of mass repetition and rule definition are satisfied. Wherein the RPA does not need special knowledge such as coding, programming or deep IT skill, the RPA software is easy to use and understand, and the built-in screen recorder component is used for capturing mouse click and keystroke, thereby quickly and easily creating the robot.
In the present application, the RPA may complete a series of tasks that need to be completed manually by means of some scripts that can be automatically executed, and may generally complete the generation and editing of the scripts through a graphical interface, and operate the scripts by recording the actions and step strokes of the mouse and keyboard of the operator (or may manually write the scripts). For example, bank account opening, bank card opening business, credit card online examination and approval, bank peer account checking, bank applying value-added tax, etc. may all use the RPA robot (or RPA module, or RPA software, etc.).
Therefore, in the embodiment of the application, the RPA tool and the interface automatic test platform are integrated, the robot automatic test is used for replacing the manual test, and the problems existing in the interface test of the current bank system can be solved. Exemplarily, as shown in fig. 1a, a schematic structural diagram of an interface test device provided in an embodiment of the present application is shown. The interface test equipment comprises an RPA module and an interface automatic test platform. The RPA module can receive a test instruction sent by the interface automatic test platform and test the interface to be tested. In some embodiments, the RPA module and the interface automation test platform may be separate devices. On this basis, the RPA module can test the interface based on the interface automatic test platform, namely the RPA module can replace manual test. In other embodiments, the RPA module and the interface automation test platform may be integrated into one device (e.g., an interface test device). On the basis, the interface test equipment has the functions of an RPA module and an interface automatic test platform at the same time, and can test the interface.
The application provides an interface test method, which can enable electronic equipment to respond to a test instruction, call a preset script execution command, and sequentially execute a test script of each interface in an interface set according to the script execution command; because the interface set comprises one or more interfaces of the systems, namely the interfaces of the systems are uniformly integrated into the interface set, the electronic equipment can respond to the test instruction to uniformly test each interface in the interface set, the problem of interface omission in the test process is avoided, the test efficiency is improved, and the test cost is reduced.
The basic hardware structures of the device where the RPA is located, the device where the interface automation test platform is located, and the interface test device are similar, and all include elements included in the computer apparatus shown in fig. 1 b. The following takes the computer apparatus shown in fig. 1b as an example to describe the hardware structures of the device where the RPA is located, the device where the interface automation test platform is located, and the interface test device.
As shown in fig. 1b, the computer apparatus may include a processor 101, a memory 102, a communication interface 103, and a bus 104. The processor 101, the memory 102, and the communication interface 103 may be connected by a bus 104.
The processor 101 is a control center of the computer device, and the processor 101 may be a single processor or a combination of a plurality of processing elements. For example, the processor 101 may be a Central Processing Unit (CPU), other general-purpose processors, or the like. Wherein a general purpose processor may be a microprocessor or any conventional processor or the like.
For one embodiment, processor 101 includes one or more CPUs, such as CPU 0 and CPU 1 shown in FIG. 1 b.
The memory 32 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
In one possible implementation, the memory 102 may exist separately from the processor 101, and the memory 102 may be connected to the processor 101 through the bus 104 for storing instructions or program code. The processor 101 can implement the detection method of unauthorized vulnerability provided by the following embodiments of the present application when calling and executing the instructions or program codes stored in the memory 102.
In another possible implementation, the memory 102 may also be integrated with the processor 101.
A communication interface 103, configured to enable the computer apparatus to connect with other devices through a communication network, where the communication network may be an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), or the like. The communication interface 103 may comprise a receiving unit for receiving data and a transmitting unit for transmitting data.
The bus 104 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG. 1b is shown with only one thick line, but does not show only one bus or one type of bus.
It is noted that the configuration shown in fig. 1b does not constitute a limitation of the computer arrangement, which may comprise more or less components than those shown in fig. 1b, or a combination of certain components, or an arrangement of different components, in addition to those shown in fig. 1 b.
The following describes embodiments of the present application in detail with reference to the drawings of the specification and taking an electronic device as an execution main body. The electronic device may be the interface test device described above.
Fig. 2 is a schematic flowchart of an interface testing method provided in an embodiment of the present application, and as shown in fig. 2, the method includes:
s200, the electronic equipment acquires a test instruction.
Wherein the test instruction is used for testing an interface set, and the interface set comprises one or more interfaces of the system.
In some embodiments, all interfaces included in the interface set may be interfaces within one system, or may be interfaces of multiple systems. The system may be a front-end system or a back-end system, which is not limited in this application. Illustratively, the system may be, for example, a bank core system, a channel-type system, a payment-type system, a transaction-type system, or a decision support system.
It should be noted that, in the systems shown in the above embodiments, each system may include a plurality of subsystems. For example, the payment system may include an online banking payment system, a pay payment system, a WeChat payment system, and the like.
In some embodiments, the set of interfaces includes interfaces of all systems of the bank. For example, the electronic device may create a visual interface library that includes interfaces of all systems of the bank. The electronic equipment can uniformly manage and test the interfaces among the systems, and is convenient for developers to process the interfaces. For example, the electronic device displays a first interface, which includes an interface library (e.g., an interface set); the developer can directly edit the interface library in the first interface. Illustratively, the editing operations include finding an interface, adding an interface, deleting an interface, and modifying an interface.
In some embodiments, the visualized interface library may be created by an interface automation test platform in the interface test equipment. The interface automatic test platform manages and tests the interfaces among the systems in a unified way.
Illustratively, the interface library also includes interface information for each interface. The interface information may include field name, type, length, and other information.
In some embodiments, the test instruction is further used to indicate a test type corresponding to the interface to be tested. The test type comprises at least one of a service flow test, an interface message test, a database test, an abnormal scene test, an interface parameter test or a performance test. On the basis, the tester can select the test type according to the actual requirement so as to test the interface to be tested. For example, a tester may select one or more of the test types described above to test the interface to be tested.
In some embodiments, the electronic device obtaining the test instructions comprises: the electronic equipment receives a test instruction triggered by a user; or the electronic equipment acquires a test instruction according to preset time; or the electronic equipment acquires the test instruction according to a preset period; or, the electronic device obtains the test instruction according to the preset frequency.
In a case that the electronic device is the interface testing device and the interface testing device includes an RPA module and an interface automation testing platform, for example, the RPA module receives a testing instruction sent by the interface automation testing platform. For example, the interface automation test platform receives a test instruction triggered by a user, so that the interface automation test platform acquires the test instruction. Illustratively, when the user presses the "test" control, the interface testification platform obtains the test instructions. For another example, the interface automation test platform obtains a test instruction according to preset time; or the interface testification platform acquires a test instruction according to a preset period; or the interface testification platform acquires the test instruction according to the preset frequency. Wherein the preset time, the preset period and the preset frequency are set by a tester. When the interface testing platform detects that the current time is preset time, or the interface testing platform detects a preset period, or the interface testing platform detects a preset frequency, the interface testing platform obtains a test instruction and tests the interface to be tested according to the test instruction.
For example, the predetermined time is 8:00(24 hours); on the basis, if the interface testing platform detects that the time is 8:00, the interface testing platform acquires a testing instruction and automatically triggers the test. For another example, the preset period is 3 hours; on the basis, the interface testing platform acquires a test instruction every 3 hours and automatically triggers the test. For another example, the predetermined frequency is three times 24 hours; on the basis, the interface testing platform can acquire three testing instructions within 24 hours and automatically and respectively trigger three tests.
S201, the electronic equipment responds to the test instruction and calls a preset script execution command.
For example, the preset script execution command may be an RPA command.
S202, the electronic equipment executes the test script of each interface in the interface set according to the script execution command and generates an execution result of the test script of each interface.
In some embodiments, a test script is established for each interface in the set of interfaces, and a test script library is established based on the test script for each interface. The tester can record scripts, edit the scripts and execute the scripts in the test script library.
For example, as shown in fig. 3, the test type of the test script of each interface may be divided into a service flow test, an interface message test, a database test, an abnormal scenario test, an interface parameter test, a performance test, and the like. The service process test comprises a service process test in a normal scene and a service process test in an abnormal scene; abnormal condition tests include idempotent (repeated submissions), concurrency, environmental anomalies, and high volume tests, among others; the performance test includes response time, throughput, concurrency, and server resource usage.
In some embodiments, the execution result of the test script of each interface is normal, or abnormal. And when the execution result is normal, the interface can normally operate. When the execution result is abnormal, it indicates that the interface has a problem, and a developer needs to check the interface for the test problem and adjust the interface in time.
In summary, in the present application, in response to the test instruction, the RPA invokes a preset script execution command, and executes the test script of each interface in the interface set in sequence according to the script execution command; because the interface set comprises one or more interfaces of the systems, namely the interfaces of the systems are uniformly integrated into the interface set, the electronic equipment can respond to the test instruction to uniformly test each interface in the interface set, the problem of interface omission in the test process is avoided, the test efficiency is improved, and the test cost is reduced.
In addition, the system can be a front-end system or a back-end system, so the interface test method can give consideration to both the system front-end service function test and the back-end data transmission message test, and can improve the test quality.
In some embodiments, as shown in fig. 4, the method further comprises:
and S203, when the execution result is abnormal, the electronic equipment acquires the test problem.
The test problem includes error information (also referred to as error information) and an error log (error log).
S204, the electronic equipment determines a target interface corresponding to the test problem.
With the above embodiment, each interface in the interface library corresponds to an established test script, that is, one interface corresponds to one test script. Therefore, when the test script of the interface has a test problem, the electronic device may determine the corresponding test script based on the test problem and find the corresponding target interface according to the test script.
S205, the electronic equipment responds to the modification operation of the user to the program of the target interface, processes the test problem, and automatically executes the test script of the target interface until the execution result of the test script of the target interface is normal.
For example, the electronic device automatically records the execution result of the test script based on the data (i.e., the transmitted test questions) transmitted by the test script of each interface, and captures error information and error logs of the interfaces to store all the test questions in a question bank. So that the developer can quickly locate the test problem.
On this basis, the developer can modify the target interface aiming at the test problem. And automatically executing the test script of the target interface for the target interface with the solved test problem, and testing again until the execution result of the test script of the target interface is normal.
In this embodiment, when the execution result is abnormal, the electronic device acquires the test question and determines a test interface corresponding to the test question. Therefore, developers can modify the corresponding target interface aiming at the test problem and test the target interface again until the execution result of the test script of the target interface is normal, and the test quality is further improved.
In some embodiments, as shown in fig. 5, the method further comprises:
s206, when the number of the test problems of the target interface is smaller than a first preset value, the electronic equipment determines that the target interface is a first type interface; when the number of the test problems of the target interface is larger than a first preset value and is smaller than or equal to a second preset value, the electronic equipment determines that the target interface is a second type interface; and when the number of the test problems of the target interface is greater than a second preset value, the electronic equipment determines that the target interface is a third type interface.
In some embodiments, the electronic device analyzes the test questions of the target interface and performs quality grading based on the number of test questions of the target interface. I.e. the target interface is divided into different types of interfaces according to the number of test problems. For example, the fewer the number of test problems, the better the quality of the target interface; conversely, the greater the number of test problems, the worse the quality of the target interface.
It should be noted that the first preset value may be, for example, 10, the second preset value may be, for example, 20, and the third preset value may be, for example, 30. The first preset value, the second preset value and the third preset value may also be other suitable values, which are subject to actual setting, and the application is not limited thereto. It should be understood that the first preset value, the second preset value and the third preset value are shown herein as an example only and do not constitute a limitation of the present application.
For example, when the test problem of the target interface is less than 10, that is, the number of test problems of the target interface is small, the quality of the target interface may be considered to be good (that is, determined to be the first type interface). When the number of test problems of the target interface is greater than 10 and less than or equal to 20, that is, the number of test problems of the target interface is medium, the quality of the target interface may be considered to be general (that is, determined to be the second type interface). When the number of test problems of the target interface is greater than 20, that is, the number of test problems of the target interface is greater, the quality of the target interface may be considered to be poor (that is, determined to be a third type interface). For a target interface with poor quality, a developer should consider whether there is a problem in the development of the target interface.
In this embodiment, the electronic device may grade the quality of the target interfaces according to the number of the target interfaces, and for target interfaces with different quality grades, developers may determine different solutions, so that the developers may handle the test problem in time, thereby further improving the test quality.
In some embodiments, the method further comprises: under the condition that the target interface is a first type interface, the electronic equipment displays a first prompt identifier; under the condition that the target interface is a second type interface, the electronic equipment displays a second prompt identifier; and under the condition that the target interface is the third type interface, the electronic equipment displays a third prompt identifier.
Illustratively, the first cue identification may be, for example, a first color (e.g., yellow); the second cue indicator may be, for example, a second color (e.g., orange); the third prompt indicia may be, for example, a third color (e.g., red).
In this embodiment, by marking the target interfaces with different quality grades as different colors, the interfaces with different test problem numbers can be visually displayed in the interface library, and quality early warning (for example, red marking) is performed on the interfaces with more test problems, so that developers can visually see the interfaces with more test problems and process the interfaces.
The above description mainly introduces the scheme provided by the embodiment of the present invention from the perspective of interaction between devices. It is to be understood that, in order to implement the above functions, the unauthorized vulnerability detection device and the like include a hardware structure and/or a software module corresponding to each function. Those of skill in the art will readily appreciate that the present invention can be implemented in hardware or a combination of hardware and computer software, with the exemplary elements and algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. 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 embodiment of the present invention, the detection device and the like may be divided into functional modules according to the above method examples, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 6 is an interface testing apparatus (hereinafter, referred to as a testing apparatus) 300 provided in this embodiment of the present application, for implementing the functions in the method described above when the functional modules are divided according to the respective functions. The testing device 300 is a device integrating the RPA function and the interface automation testing platform function. The testing apparatus 300 may include an obtaining module 301, a calling module 302, and a first processing module 303.
In particular, the obtaining module 301 is configured to obtain the test instruction. The test instruction is used for testing an interface set, and the interface set comprises one or more interfaces of the system. For example, as shown in connection with fig. 2, the obtaining module 301 may be configured to execute S200.
In some embodiments, the test instruction is further used to indicate a test type corresponding to the interface to be tested. The test type comprises at least one of a service flow test, an interface message test, a database test, an abnormal scene test, an interface parameter test or a performance test.
The replacement module 302 is configured to call a preset script execution command in response to the test instruction. For example, as shown in connection with fig. 2, the replacement module 302 may be configured to perform S201.
The first processing module 303 is configured to execute the test script of each interface in the interface set according to the script execution command, and generate an execution result of the test script of each interface. For example, as shown in connection with fig. 2, the first processing module 303 may be configured to execute S202.
Optionally, the testing apparatus 300 further includes a second processing module 304; the second processing module 304 is configured to obtain the test question when the execution result is abnormal; the test problems comprise error information and error logs; determining a target interface corresponding to the test problem; and responding to the modification operation of the user on the program of the target interface, processing the test problem, and automatically executing the test script of the target interface until the execution result of the test script of the target interface is normal. For example, as shown in connection with FIG. 4, the second processing module 304 may be configured to perform S203-S205.
Optionally, the testing apparatus 300 further includes a determining module 305; the determining module 305 is configured to determine that the target interface is a first type interface when the number of test problems of the target interface is less than or equal to a first preset value; when the number of the test problems of the target interface is larger than a first preset value and is smaller than or equal to a second preset value, determining that the target interface is a second type interface; and when the number of the test problems of the target interface is greater than a second preset value, determining that the target interface is a third type interface. For example, as shown in connection with fig. 5, the determining module 305 may be configured to perform S206.
Optionally, the testing apparatus 300 further includes a first display module 306; the first display module 306 is configured to display a first prompt identifier if the target interface is a first type interface; displaying a second prompt identifier under the condition that the target interface is a second type interface; and displaying a third prompt identifier under the condition that the target interface is a third type interface.
Optionally, the testing apparatus 300 further includes a second display module 307; the second display module 307 is configured to display the first interface; the first interface comprises a set of interfaces; responding to the editing operation of a user on the first interface, and editing the interface set; the editing operation includes one or more of adding, deleting, repairing, or finding.
Optionally, the obtaining module 301 is further configured to receive a test instruction of a user; or acquiring a test instruction according to preset time; or acquiring a test instruction according to a preset period.
As mentioned above, the testing apparatus 300 provided in the embodiments of the present application can be used to implement the functions in the methods implemented in the embodiments of the present application, and for convenience of description, only the portions related to the embodiments of the present application are shown, and details of the specific situation are not disclosed, please refer to the embodiments of the present application.
In actual implementation, the obtaining module 301, the calling module 302, the first processing module 303, the second processing module 304, the determining module 305, the first displaying module 306, and the second displaying module 307 may be implemented by the processor 101 shown in fig. 1b calling the program code in the memory 102, and the specific execution process may refer to the descriptions of the interface testing method portions shown in fig. 2, fig. 4, and fig. 5, which are not described herein again.
Further embodiments of the present application also provide a computer-readable storage medium, which may include a computer program, which, when run on a computer, causes the computer to perform the steps of the embodiments of fig. 2, 4 and 5 described above.
Further embodiments of the present application also provide a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the steps of the embodiments of figures 2, 4 and 5 described above.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. 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 be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. 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 application 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.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An interface testing method, comprising:
acquiring a test instruction; the test instruction is used for indicating a test interface set, and the interface set comprises interfaces of one or more systems;
responding to the test instruction, and calling a preset script execution command;
and executing the test script of each interface in the interface set according to the script execution command, and generating an execution result of the test script of each interface.
2. The method of claim 1, wherein the test instruction is further used to indicate a test type corresponding to the interface to be tested; the test type comprises at least one of a service flow test, an interface message test, a database test, an abnormal scene test, an interface parameter test or a performance test.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
when the execution result is abnormal, acquiring a test problem; the test problems comprise error information and error logs;
determining a target interface corresponding to the test problem;
and responding to the modification operation of the user on the program of the target interface, processing the test problem, and re-executing the test script of the target interface until the execution result of the test script of the target interface is normal.
4. The method of claim 3, further comprising:
when the number of the test problems of the target interface is less than or equal to a first preset value, determining that the target interface is a first type interface;
when the number of the test problems of the target interface is larger than the first preset value and is smaller than or equal to a second preset value, determining that the target interface is a second type interface;
and when the number of the test problems of the target interface is greater than the second preset value, determining that the target interface is a third type interface.
5. The method of claim 4, further comprising:
displaying a first prompt identifier under the condition that the target interface is a first type interface;
displaying a second prompt identifier under the condition that the target interface is a second type interface;
and displaying a third prompt identifier under the condition that the target interface is a third type interface.
6. The method according to any one of claims 1-5, further comprising:
displaying a first interface; the first interface comprises the set of interfaces;
editing the interface set in response to an editing operation of a user on the first interface; the editing operation includes one or more of adding, deleting, modifying, or finding.
7. The method of claim 1, wherein the fetching of the test instruction comprises:
receiving the test instruction of a user; alternatively, the first and second electrodes may be,
acquiring the test instruction according to preset time; alternatively, the first and second electrodes may be,
and acquiring the test instruction according to a preset period.
8. An interface testing apparatus, comprising:
an acquisition module configured to acquire a test instruction; the test instructions are used for testing an interface set, and the interface set comprises interfaces of one or more systems;
the calling module is configured to respond to the test instruction and call a preset script execution command;
and the first processing module is configured to execute the test script of each interface in the interface set according to the script execution command and generate an execution result of the test script of each interface.
9. An electronic device, comprising: one or more processors, and memory; the processor and the memory are coupled; the memory for storing computer program code, the computer program code comprising computer instructions;
the computer instructions, when executed by the processor, cause the electronic device to perform the interface testing method of any of claims 1-7.
10. A computer-readable storage medium, storing computer instructions or a program which, when run on an electronic device, causes the electronic device to perform the interface testing method according to any one of claims 1 to 7.
CN202111327207.6A 2021-11-10 2021-11-10 Interface test method, device, equipment and storage medium Pending CN113986753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111327207.6A CN113986753A (en) 2021-11-10 2021-11-10 Interface test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111327207.6A CN113986753A (en) 2021-11-10 2021-11-10 Interface test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113986753A true CN113986753A (en) 2022-01-28

Family

ID=79747692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111327207.6A Pending CN113986753A (en) 2021-11-10 2021-11-10 Interface test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113986753A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114924991A (en) * 2022-07-19 2022-08-19 深圳市亿联无限科技有限公司 Method and system for reproducing probabilistic problem under specific operation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274526A (en) * 2018-08-31 2019-01-25 平安科技(深圳)有限公司 Test defect automatic early warning method, device, computer equipment and storage medium
CN112131127A (en) * 2020-09-28 2020-12-25 北京同邦卓益科技有限公司 Interface testing method, device and system and electronic equipment
CN113312260A (en) * 2021-05-28 2021-08-27 建信金融科技有限责任公司 Interface testing method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109274526A (en) * 2018-08-31 2019-01-25 平安科技(深圳)有限公司 Test defect automatic early warning method, device, computer equipment and storage medium
CN112131127A (en) * 2020-09-28 2020-12-25 北京同邦卓益科技有限公司 Interface testing method, device and system and electronic equipment
CN113312260A (en) * 2021-05-28 2021-08-27 建信金融科技有限责任公司 Interface testing method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114924991A (en) * 2022-07-19 2022-08-19 深圳市亿联无限科技有限公司 Method and system for reproducing probabilistic problem under specific operation

Similar Documents

Publication Publication Date Title
CN111078482B (en) Communication navigation equipment test system, method, equipment and readable storage medium
US9465718B2 (en) Filter generation for load testing managed environments
CN114546738B (en) Universal test method, system, terminal and storage medium for server
CN108920370B (en) Compatibility problem detection method, device and equipment
CN111176984A (en) Signal-oriented automatic test implementation method
US20160275000A1 (en) System and method of automated application screen flow generation for detecting aberration in mobile application
CN114168471A (en) Test method, test device, electronic equipment and storage medium
CN113986753A (en) Interface test method, device, equipment and storage medium
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN112817869A (en) Test method, test device, test medium, and electronic apparatus
CN116719736A (en) Test case generation method and device for testing software interface
CN116860608A (en) Interface testing method and device, computing equipment and storage medium
CN116932360A (en) Page testing method and device, computer equipment and storage medium
CN115437903A (en) Interface test method, device, apparatus, storage medium, and program
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium
CN113791980A (en) Test case conversion analysis method, device, equipment and storage medium
CN111625455A (en) Program testing method, device, equipment and medium
CN110096430B (en) Third party SDK access test method, device, terminal and storage medium
CN108363663B (en) Application of intelligent POS terminal to inspection bank card detection center authentication
CN114816990A (en) Method for evaluating application level of automated test and related equipment
CN116860585A (en) Impulse testing method, impulse testing device, and readable storage medium
CN117632727A (en) Abnormality positioning method, device, equipment and storage medium
Karmore et al. Development of software interface for testing of embedded system
CN117931632A (en) Automatic integrated test method, device, equipment and storage medium
CN117056211A (en) Low-code automatic test method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination