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

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

Info

Publication number
CN111679989A
CN111679989A CN202010547692.7A CN202010547692A CN111679989A CN 111679989 A CN111679989 A CN 111679989A CN 202010547692 A CN202010547692 A CN 202010547692A CN 111679989 A CN111679989 A CN 111679989A
Authority
CN
China
Prior art keywords
test
interface
parameter
tested
verification
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
CN202010547692.7A
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.)
Beike Technology Co Ltd
Original Assignee
Beike Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beike Technology Co Ltd filed Critical Beike Technology Co Ltd
Priority to CN202010547692.7A priority Critical patent/CN111679989A/en
Publication of CN111679989A publication Critical patent/CN111679989A/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/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

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 embodiment of the disclosure discloses a method and a device for testing interface robustness, electronic equipment and a storage medium, wherein the method comprises the following steps: determining input parameter data based on the parameter type of the interface to be tested; generating a test case set of the interface to be tested according to the parameter data; executing the test cases in the test case set to obtain corresponding test return values; and verifying the test return value by using a set verification rule to obtain a test result. The embodiment of the disclosure can automatically generate the test case without manual intervention; and moreover, the test return value corresponding to each test case is not required to be checked by the tester one by one, so that the workload of the tester is reduced, and the test efficiency is improved.

Description

Interface robustness testing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of test technologies, and in particular, to a method and an apparatus for testing robustness of an interface, an electronic device, and a storage medium.
Background
The interface robustness test is also called fault tolerance test, and refers to a test for neglecting service difference and checking the robustness of the interface, and is used for checking the correct processing of the system under invalid or abnormal input, so that the safety and reliability of the system are improved.
In the related art, when performing a robustness test on an interface, a tester is usually required to compile a test code and a test case for a target interface, then test the interface based on the compiled test code and the test case to obtain an interface return value, and then verify the interface return value to obtain a test result of the interface. The interface robustness testing method of the related technology depends on manual experience accumulation, the requirement on the professional degree of a tester is high, and whether the tester can design a perfect test case directly influences the accuracy of an interface testing result; in addition, the related art needs to verify the test return value corresponding to each test case one by one, which also causes the problems of heavy workload of the tester, long test time consumption and the like.
Disclosure of Invention
One technical problem to be solved by the embodiments of the present disclosure is: an interface robustness testing method, an interface robustness testing device, electronic equipment and a storage medium are provided.
According to an aspect of the embodiments of the present disclosure, there is provided an interface robustness testing method, including:
determining input parameter data based on the parameter type of the interface to be tested;
generating a test case set of the interface to be tested according to the parameter data;
executing the test cases in the test case set to obtain corresponding test return values;
and verifying the test return value by using a set verification rule to obtain a test result.
In yet another embodiment of the present disclosure, the method further comprises:
and setting a parameter entry strategy set, wherein parameter entry rules corresponding to different parameter types are set in the parameter entry strategy set.
In another embodiment of the present disclosure, determining the input parameter data based on the parameter type of the interface to be tested includes:
acquiring a parameter entry rule corresponding to the parameter type from the parameter entry strategy set;
and generating the parameter entry data corresponding to the parameter type based on the parameter entry rule.
In yet another embodiment of the present disclosure, the method further comprises:
and setting a verification strategy set, wherein the verification strategy set is provided with set verification rules corresponding to different compiling specifications.
In another embodiment of the present disclosure, the verifying the test return value by using a set verification rule includes:
determining a set verification rule corresponding to the interface to be tested based on the compiling specification of the interface to be tested;
and checking the test return value by using the checking rule.
In yet another embodiment of the present disclosure, the method further comprises:
receiving an updating operation triggered by a user;
and updating the verification rules in the verification strategy set based on the updating operation.
According to still another aspect of the embodiments of the present disclosure, there is provided an interface robustness testing apparatus, the apparatus including:
the determining module is used for determining input parameter data based on the parameter type of the interface to be tested;
the generating module is used for generating a test case set of the interface to be tested according to the parameter data;
the execution module is used for executing the test cases in the test case set to obtain corresponding test return values;
and the checking module is used for checking the test return value by using a set checking rule to obtain a test result.
In an embodiment of the present disclosure, the apparatus further comprises:
the first setting module is used for setting a parameter entry strategy set, and parameter entry rules corresponding to different parameter types are set in the parameter entry strategy set.
In yet another embodiment of the present disclosure, the determining module includes:
the obtaining submodule is used for obtaining the parameter entering rules corresponding to the parameter types from the parameter entering strategy set;
and the generation submodule is used for generating the parameter entry data corresponding to the parameter type based on the parameter entry rule.
In yet another embodiment of the present disclosure, the apparatus further comprises:
and the second setting module is used for setting a verification strategy set, and the verification strategy set is provided with set verification rules corresponding to different compiling specifications.
In still another embodiment of the present disclosure, the verification module includes:
the determining submodule is used for determining a set verification rule corresponding to the interface to be tested based on the compiling specification of the interface to be tested;
and the checking submodule is used for checking the test return value by using the checking rule.
In yet another embodiment of the present disclosure, the apparatus further comprises:
the receiving module is used for receiving the updating operation triggered by the user;
and the updating module is used for updating the verification rules in the verification strategy set based on the updating operation.
According to still another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a memory for storing a computer program;
a processor for executing the computer program stored in the memory, and when the computer program is executed, the interface robustness testing method is realized.
According to still another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described interface robustness testing method.
Based on the interface robustness testing method and device, the electronic device and the storage medium provided by the embodiment of the disclosure, when the interface to be tested is tested, the parameter type of the interface to be tested can be used for determining the parameter data for generating the test case, then the test case can be generated, and when the test return value is obtained, the set check rule can be directly used for checking the test return value. Therefore, the test case can be automatically generated without manual intervention; and moreover, the test return value corresponding to each test case is not required to be checked by the tester one by one, so that the workload of the tester is reduced, and the test efficiency is improved.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The present disclosure may be more clearly understood from the following detailed description, taken with reference to the accompanying drawings, in which:
FIG. 1 is a flow chart of one embodiment of a method for interface robustness testing of the present disclosure;
FIG. 2 is a flow chart of yet another embodiment of an interface robustness testing method of the present disclosure;
FIG. 3 is a flow chart of yet another embodiment of an interface robustness testing method of the present disclosure;
FIG. 4 is a schematic block diagram illustrating one embodiment of an interface robustness testing apparatus according to the present disclosure;
FIG. 5 is a schematic structural diagram of yet another embodiment of an interface robustness testing apparatus of the present disclosure;
fig. 6 is a block diagram of an electronic device according to an exemplary embodiment of the disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The disclosed embodiments may be applied to electronic devices such as computer systems/servers, which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as computer systems/servers, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems, and the like.
The electronic device, such as a computer system/server, may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Exemplary embodiments
FIG. 1 is a flow chart of one embodiment of a method for interface robustness testing of the present disclosure; the interface robustness testing method can be applied to a testing platform, as shown in fig. 1, and comprises the following steps:
in step 101, the parameter input data is determined based on the parameter type of the interface to be tested.
In one embodiment, there are typically a large number of interfaces in a system, such as input interfaces, output interfaces, login interfaces, registration interfaces, search query interfaces, and the like. In order to manage the interfaces conveniently, an interface document is needed to be set, each interface in the system is defined in the interface document, and the parameter type, the access address host, the parameter attribute and the like of each interface can be defined in the interface document.
When an interface needs to be tested, the parameter type of the interface to be tested can be obtained from the interface document, wherein the parameter type can be a character type, an enumeration type and the like.
In this embodiment, in order to improve the testing efficiency of the robustness test on each interface to be tested in the system, in the specific implementation, a parameter entry policy set may be preset, and parameter entry rules corresponding to different parameter types are set in the parameter entry policy set.
In an embodiment, when the test platform needs to test the interface to be tested, the test platform may first obtain the corresponding parameter type from the interface document, and then determine the parameter entry data for the interface to be tested by using the parameter entry rule set in the parameter entry policy set. For example, for a parameter of a character type, the parameter entry rule may be to determine various data as parameter entry data, such as: numbers, strings, floating point types, long data, short data, null data, special characters (e.g., '123', 'abc', '345.66', 'abcdefghijklmnnopqrstuvwxyz …', '# $% &') etc., while for enumerated type parameters, the entry rules may be such that all contract enumerated values, as well as values other than the contract enumerated values, are determined as entry data.
In step 102, a test case set of the interface to be tested is generated according to the input parameter data.
In an embodiment, the test case set refers to a set of all test cases for testing the interface to be tested.
In an embodiment, since one interface to be tested may have more than one interface parameter, for example, one login interface may have two interface parameters, such as a user name and a password, after determining the input parameter data of each interface parameter through the operation of step 101, the input parameter data of each interface parameter may be arranged and combined, and then the request parameters are automatically assembled to obtain a plurality of test cases, that is, to obtain one test case set.
In step 103, the test cases in the test case set are executed to obtain corresponding test return values.
In an embodiment, the process of executing the test case may refer to the prior art, and is not described in detail here, in order to accurately test the robustness of the interface, it is necessary to test each test case in the test case set and obtain a test return value corresponding to each test case.
In step 104, the test return value is verified by using the set verification rule, so as to obtain a test result.
In an embodiment, the setting of the verification rule may be understood as a verification policy set before testing the interfaces in the system, and in order to improve the testing efficiency of the robustness test on each interface to be tested in the system, in this embodiment, a verification policy set may be preset, and the verification policy set is provided with verification rules corresponding to different writing specifications. Generally, the code writing specification in a system is uniform, so when checking the robustness of an interface in a system, a set of checking strategies can be preset, for example, if a specification written by an interface in a system is that when the value of a code field is 1, the result is pass, a simple checking strategy can be set:
{‘rule_key’:’code’,’pass’:’1’,’block’:’0,100,400’}
based on the checking policy, when the value of the code field in the test return value is 1, the test result is "pass", and if "0,100,400", the test result is "fail".
Based on the above step 101-104, when the interface to be tested is tested, the parameter type of the interface to be tested may be used to determine the parameter data for generating the test case, and then the test case may be generated, and when the test return value is obtained, the test return value may be directly verified by using the set verification rule. Therefore, the test case can be automatically generated without manual intervention; and moreover, the test return value corresponding to each test case is not required to be checked by the tester one by one, so that the workload of the tester is reduced, and the test efficiency is improved.
To better illustrate the interface robustness testing scheme of the present application, another embodiment is described below.
FIG. 2 is a flow chart of yet another embodiment of an interface robustness testing method of the present disclosure; the embodiment exemplifies how to perform the robustness test, as shown in fig. 2, and includes the following steps:
in step 201, a parameter type of an interface to be tested is obtained.
In one embodiment, the parameter type of the interface to be tested can be extracted from the defined interface document.
In step 202, an entry rule corresponding to the parameter type is obtained from the entry policy set.
In an embodiment, since the parameter type and the parameter entry rule are stored in the parameter entry policy set, the parameter entry rule can be obtained from the parameter entry policy set based on the parameter type, and the parameter entry rule is a rule for automatically generating data required by the test interface.
In step 203, the parameter entry data corresponding to the parameter type is generated based on the parameter entry rule.
In one embodiment, corresponding entry data may be generated for each interface parameter of the interface under test, and the generated entry data may cover all possible input values for the test interface.
In an embodiment, if the test person considers that the parameter entry rule included in the parameter entry policy set cannot cover all typical parameter combinations, the parameter entry rule may be modified and updated, and the updated parameter entry rule is updated to the parameter entry policy set, so that when other interfaces are tested in a later stage, all typical parameter combinations can be covered, and a best test effect is achieved.
In step 204, a test case set of the interface to be tested is generated according to the input parameter data.
In step 205, the test cases in the test case set are executed to obtain corresponding test return values.
In step 206, the test return value is verified by using the set verification rule to obtain a test result.
In one embodiment, the description of steps 204-206 may be found in the embodiment shown in FIG. 1 and will not be described in detail here.
Based on the above step 201 and 206, when the test case is generated, the test platform can automatically generate the test case based on the join policy set without manual intervention of the tester, and the generated test case can cover all typical parameter combinations, so that the technical scheme of the embodiment of the disclosure not only greatly reduces the workload of the tester, but also improves the test effect.
FIG. 3 is a flow chart of yet another embodiment of an interface robustness testing method of the present disclosure; the embodiment exemplifies how to perform the robustness test, as shown in fig. 3, and includes the following steps:
in step 301, the parameter input data is determined based on the parameter type of the interface to be tested.
In step 302, a test case set of the interface to be tested is generated according to the input parameter data.
In step 303, the test cases in the test case set are executed to obtain corresponding test return values.
In one embodiment, the description of steps 301-303 can be referred to the description of steps 101-103 in the embodiment shown in FIG. 1, and will not be described in detail here.
In step 304, a set verification rule corresponding to the interface to be tested is determined based on the writing specification of the interface to be tested.
In one embodiment, the writing specification may be understood as a specification used by an interface designer to write an interface, and the writing specification of the present application mainly refers to a specification on writing contents, for example, when the value of the code field is 1, the result is pass, and when the value of the code field is "0,100,400", the result is fail; or it can also be written that when the value of the code field is 0, the result is pass, and when the value of the code field is "1,100,400", the result is fail, so the writing specification mentioned in this embodiment is not a rule in the code form (requirement in indentation and annotation), but some writing habits and specifications in the content.
In an embodiment, because the compiling specifications of each interface in the system are basically uniform, a set of verification rules corresponding to a set of compiling specifications can be adopted to verify the test return values of all the interfaces of one system, and the testing efficiency of the interfaces can be greatly improved.
In an embodiment, if the tester considers that the set verification rule cannot accurately verify the test return value of the interface to be tested, the set verification rule may be modified and updated, and the updated verification rule is updated to the verification policy set, so that the set verification rule can be used in the later stage of testing other interfaces.
In an embodiment, the test platform may update the verification rules in the verification policy set based on the update operation of the user after receiving the update operation triggered by the user. During specific implementation, a rule updating function module can be arranged in the test page so as to facilitate a user to update the verification rule.
In step 305, the test return value is verified using a verification rule.
Based on the above step 301 and 305, when the test return values of the test cases are verified, the set verification rule can be used to verify the test return values, and the test personnel is not required to verify the test return values corresponding to each test case one by one, so that the scheme of the embodiment of the disclosure greatly reduces the workload of the test personnel and improves the test efficiency.
Corresponding to the embodiment of the interface robustness testing method, the disclosure also provides a corresponding embodiment of the interface robustness testing device.
Fig. 4 is a schematic structural diagram of an embodiment of an interface robustness testing apparatus according to the present disclosure, which is applied to a testing platform, and as shown in fig. 4, the apparatus includes:
a determining module 41, configured to determine input parameter data based on a parameter type of an interface to be tested;
the generating module 42 is configured to generate a test case set of the interface to be tested according to the input parameter data;
the execution module 43 is configured to execute the test cases in the test case set to obtain corresponding test return values;
and the checking module 44 is configured to check the test return value by using a set checking rule to obtain a test result.
Fig. 5 is a schematic structural diagram of another embodiment of the interface robustness testing apparatus according to the present disclosure, as shown in fig. 5, and based on the embodiment shown in fig. 4, in an embodiment, the apparatus further includes:
the first setting module 45 is configured to set a parameter entry policy set, where parameter entry rules corresponding to different parameter types are set in the parameter entry policy set.
In one embodiment, the determining module 41 includes:
the obtaining sub-module 411 is configured to obtain a parameter entry rule corresponding to the parameter type from the parameter entry policy set;
and the generating submodule 412 is configured to generate parameter entry data corresponding to the parameter type based on the parameter entry rule.
In an embodiment, the apparatus further comprises:
and a second setting module 46, configured to set a verification policy set, where the verification policy set is provided with set verification rules corresponding to different writing specifications.
In one embodiment, the verification module 44 includes:
the determining submodule 441 is used for determining a set verification rule corresponding to the interface to be tested based on the writing specification of the interface to be tested;
the checking sub-module 442 is configured to check the test return value using a checking rule.
In an embodiment, the apparatus further comprises:
a receiving module 47, configured to receive an update operation triggered by a user;
and the updating module 48 is used for updating the verification rules in the verification policy set based on the updating operation.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
In the following, an electronic device according to an embodiment of the present disclosure is described with reference to fig. 6, in which an apparatus implementing a method according to an embodiment of the present disclosure may be integrated. Fig. 6 is a block diagram of an electronic device according to an exemplary embodiment of the disclosure, and as shown in fig. 6, the electronic device 6 includes one or more processors 61, one or more memories 62 of a computer-readable storage medium, and a computer program stored on the memories and executable on the processors. The interface robustness testing method described above may be implemented when executing the program of the memory 62.
In particular, in practical applications, the electronic device may further include an input device 63, an output device 64, and the like, which are interconnected via a bus system and/or other types of connection mechanisms (not shown). Those skilled in the art will appreciate that the configuration of the electronic device shown in fig. 6 is not intended to be limiting of the electronic device and may include more or fewer components than shown, or certain components, or a different arrangement of components. Wherein:
the processor 61 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities that performs various functions and processes data by running or executing software programs and/or modules stored in the memory 62 and invoking data stored in the memory 62 to thereby monitor the electronic device as a whole.
The memory 62 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, Random Access Memory (RAM), cache memory (or the like). The non-volatile memory may include, for example, Read Only Memory (ROM), a hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer readable storage medium and executed by the processor 61 to implement the sound source localization methods of the various embodiments of the present disclosure above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
The input device 63 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The output device 64 may output various information including the determined distance information, direction information, and the like to the outside. The output devices 64 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.
The electronic device may further include a power supply for supplying power to the various components, and may be logically connected to the processor 61 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system. The power supply may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Of course, for simplicity, only some of the components of the electronic device 6 relevant to the present disclosure are shown in fig. 6, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device 6 may include any other suitable components, depending on the particular application.
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the sound source localization method according to various embodiments of the present disclosure described in the above-mentioned "exemplary methods" section of this specification.
The computer program product may write program code for performing the operations of embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the steps in the sound source localization method according to various embodiments of the present disclosure described in the "exemplary methods" section above in this specification.
A computer-readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the disclosure in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the disclosure and the practical application, and to enable others of ordinary skill in the art to understand the disclosure for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (10)

1. A method for interface robustness testing, the method comprising:
determining input parameter data based on the parameter type of the interface to be tested;
generating a test case set of the interface to be tested according to the parameter data;
executing the test cases in the test case set to obtain corresponding test return values;
and verifying the test return value by using a set verification rule to obtain a test result.
2. The method of claim 1, further comprising:
and setting a parameter entry strategy set, wherein parameter entry rules corresponding to different parameter types are set in the parameter entry strategy set.
3. The method of claim 2, wherein determining the input parameter data based on the parameter type of the interface to be tested comprises:
acquiring a parameter entry rule corresponding to the parameter type from the parameter entry strategy set;
and generating the parameter entry data corresponding to the parameter type based on the parameter entry rule.
4. The method of claim 1, further comprising:
and setting a verification strategy set, wherein the verification strategy set is provided with set verification rules corresponding to different compiling specifications.
5. The method of claim 4, wherein the verifying the test return value using the set verification rule comprises:
determining a set verification rule corresponding to the interface to be tested based on the compiling specification of the interface to be tested;
and checking the test return value by using the checking rule.
6. The method of claim 4, further comprising:
receiving an updating operation triggered by a user;
and updating the verification rules in the verification strategy set based on the updating operation.
7. An interface robustness testing apparatus, the apparatus comprising:
the determining module is used for determining input parameter data based on the parameter type of the interface to be tested;
the generating module is used for generating a test case set of the interface to be tested according to the parameter data;
the execution module is used for executing the test cases in the test case set to obtain corresponding test return values;
and the checking module is used for checking the test return value by using a set checking rule to obtain a test result.
8. The apparatus of claim 7, further comprising:
the first setting module is used for setting a parameter entry strategy set, and parameter entry rules corresponding to different parameter types are set in the parameter entry strategy set.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing a computer program stored in the memory, and when executed, implementing the method of any of the preceding claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of the preceding claims 1 to 6.
CN202010547692.7A 2020-06-16 2020-06-16 Interface robustness testing method and device, electronic equipment and storage medium Pending CN111679989A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010547692.7A CN111679989A (en) 2020-06-16 2020-06-16 Interface robustness testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010547692.7A CN111679989A (en) 2020-06-16 2020-06-16 Interface robustness testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111679989A true CN111679989A (en) 2020-09-18

Family

ID=72455150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010547692.7A Pending CN111679989A (en) 2020-06-16 2020-06-16 Interface robustness testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111679989A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181749A (en) * 2020-10-19 2021-01-05 龙尚科技(上海)有限公司 Hardware testing method and device, electronic equipment and storage medium
CN112328486A (en) * 2020-11-06 2021-02-05 深圳壹账通智能科技有限公司 Interface automation test method and device, computer equipment and storage medium
CN112367220A (en) * 2020-10-27 2021-02-12 深圳市优必选科技股份有限公司 Interface testing method and device, storage medium and electronic equipment
CN113176968A (en) * 2021-05-25 2021-07-27 平安国际智慧城市科技股份有限公司 Safety test method, device and storage medium based on interface parameter classification
CN115408277A (en) * 2022-08-29 2022-11-29 南京领行科技股份有限公司 Interface testing method and device
CN118051433A (en) * 2024-02-18 2024-05-17 北京安锐卓越信息技术股份有限公司 Method, device and medium for automatically generating analog interface parameter data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268285A (en) * 2013-05-31 2013-08-28 百度在线网络技术(北京)有限公司 Method and device for automatic generation of robustness test case of API interface
CN108427632A (en) * 2017-02-14 2018-08-21 腾讯科技(深圳)有限公司 Automatic test approach and device
CN110908888A (en) * 2018-09-17 2020-03-24 百度在线网络技术(北京)有限公司 Server testing method and device
CN111274131A (en) * 2020-01-17 2020-06-12 北京达佳互联信息技术有限公司 Interface testing method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103268285A (en) * 2013-05-31 2013-08-28 百度在线网络技术(北京)有限公司 Method and device for automatic generation of robustness test case of API interface
CN108427632A (en) * 2017-02-14 2018-08-21 腾讯科技(深圳)有限公司 Automatic test approach and device
CN110908888A (en) * 2018-09-17 2020-03-24 百度在线网络技术(北京)有限公司 Server testing method and device
CN111274131A (en) * 2020-01-17 2020-06-12 北京达佳互联信息技术有限公司 Interface testing method and device, electronic equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181749A (en) * 2020-10-19 2021-01-05 龙尚科技(上海)有限公司 Hardware testing method and device, electronic equipment and storage medium
CN112367220A (en) * 2020-10-27 2021-02-12 深圳市优必选科技股份有限公司 Interface testing method and device, storage medium and electronic equipment
CN112328486A (en) * 2020-11-06 2021-02-05 深圳壹账通智能科技有限公司 Interface automation test method and device, computer equipment and storage medium
CN113176968A (en) * 2021-05-25 2021-07-27 平安国际智慧城市科技股份有限公司 Safety test method, device and storage medium based on interface parameter classification
CN113176968B (en) * 2021-05-25 2023-08-18 平安国际智慧城市科技股份有限公司 Security test method, device and storage medium based on interface parameter classification
CN115408277A (en) * 2022-08-29 2022-11-29 南京领行科技股份有限公司 Interface testing method and device
CN115408277B (en) * 2022-08-29 2024-05-31 南京领行科技股份有限公司 Interface testing method and device
CN118051433A (en) * 2024-02-18 2024-05-17 北京安锐卓越信息技术股份有限公司 Method, device and medium for automatically generating analog interface parameter data

Similar Documents

Publication Publication Date Title
CN111679989A (en) Interface robustness testing method and device, electronic equipment and storage medium
US8838964B2 (en) Package audit tool
US11036491B1 (en) Identifying and resolving firmware component dependencies
US8738822B2 (en) System and method for controlling operation of a component on a computer system
US7757015B2 (en) Device, method and computer program product readable medium for determining the identity of a component
US9122843B2 (en) Software license reconciliation facility
TW201415214A (en) Robust hardware fault management system, method and framework for enterprise devices
US7478380B2 (en) Dynamically updatable and easily scalable command line parser using a centralized data schema
US11294666B1 (en) Data structures for managing configuration versions of cloud-based applications
US9582270B2 (en) Effective feature location in large legacy systems
CN110515647A (en) A kind of static resource management method, device, equipment and storage medium
US7814334B2 (en) Method and apparatus for changing and adding activation keys for functions of digital content without having to change and recompile the digital content
US20200410423A1 (en) Mining process logs for generation of workflow for service request completion
CN111966630B (en) File type detection method, device, equipment and medium
CN116661758A (en) Method, device, electronic equipment and medium for optimizing log framework configuration
US7818756B2 (en) SKU determination mechanism and API
Furda et al. A practical approach for detecting multi-tenancy data interference
CN114527993A (en) Application deployment method, device, equipment and medium
CN115185819A (en) System testing method, device, equipment and computer readable storage medium
KR101534493B1 (en) Source code security weakness detection apparatus and method based on structure conversion
US9354870B2 (en) Maintaining integrity of output of code generators
JP5900212B2 (en) Test data generation apparatus, program, and method
US20120304152A1 (en) Realtime tracking of software components
US11703833B2 (en) Program providing device, program providing method, and program providing system
WO2023188092A1 (en) Information processing device, information processing method, and computer-readable recording 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200918

RJ01 Rejection of invention patent application after publication