CN108427613B - Abnormal interface positioning method and device, computer equipment and storage medium - Google Patents

Abnormal interface positioning method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN108427613B
CN108427613B CN201810199672.8A CN201810199672A CN108427613B CN 108427613 B CN108427613 B CN 108427613B CN 201810199672 A CN201810199672 A CN 201810199672A CN 108427613 B CN108427613 B CN 108427613B
Authority
CN
China
Prior art keywords
interface
data
test
identifier
identification
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.)
Active
Application number
CN201810199672.8A
Other languages
Chinese (zh)
Other versions
CN108427613A (en
Inventor
舒清
郑鹰飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201810199672.8A priority Critical patent/CN108427613B/en
Publication of CN108427613A publication Critical patent/CN108427613A/en
Application granted granted Critical
Publication of CN108427613B publication Critical patent/CN108427613B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers

Landscapes

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

Abstract

The application relates to an abnormal interface positioning method, an abnormal interface positioning device, computer equipment and a storage medium. The method comprises the following steps: receiving a test failure notice, wherein the test failure notice carries a case identifier; searching a test case corresponding to the case identification; acquiring an interface identifier of an interface corresponding to a test case, and extracting an identifier input parameter from the test case; searching a test data flow diagram corresponding to the interface identifier, and extracting a data table associated with the interface identifier from the test data flow diagram; performing data mapping verification on data in the data table according to the identification reference value to obtain an interface identification corresponding to the data in the data table, wherein the data mapping verification fails; and judging the interface corresponding to the acquired interface identifier as an abnormal interface. By adopting the method, the positioning efficiency of the abnormal interface can be tested.

Description

Abnormal interface positioning method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for locating an abnormal interface, a computer device, and a storage medium.
Background
In order to ensure that the system can provide normal service for the external system, testing the system server is an important link. The test of the system server mainly comprises the steps of detecting data interaction, transmission, control management, realization of service functions and the like between the system and an external system. During testing, the situation that the execution of the test case fails often occurs, and when the failure reason is searched, the failure reason is difficult to locate due to the long test case. Generally, the abnormal interface is searched by searching a database or a test log, but due to the dispersed data storage in the test case, a lot of time is spent on positioning the abnormal interface, and the manual positioning of the tester also causes the searching efficiency of the test abnormal interface to be very low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an abnormal interface positioning method, an abnormal interface positioning apparatus, a computer device, and a storage medium, which can improve the efficiency of positioning an abnormal interface during testing.
An abnormal interface positioning method, the method comprising:
receiving a test failure notice, wherein the test failure notice carries a case identifier;
searching a test case corresponding to the case identification;
acquiring an interface identifier of an interface corresponding to the test case, and extracting an identifier input parameter value from the test case;
searching a test data flow diagram corresponding to the interface identifier, and extracting a data table associated with the interface identifier from the test data flow diagram;
performing data mapping verification on the data in the data table according to the identifier entry parameter to acquire an interface identifier corresponding to the data in the data table, wherein the data mapping verification fails; and judging the interface corresponding to the acquired interface identifier as an abnormal interface.
In one embodiment, the generation manner of the test data flow chart includes:
acquiring an interface interconnection information table;
acquiring interface identifiers of interfaces corresponding to the test cases, and connecting the interface identifiers according to the interface interconnection information table to generate an interface connection diagram;
acquiring a data table associated with an interface identifier and reading and writing operation logics of the interface corresponding to the interface identifier on the data table;
adding the data table to the interface connection diagram according to the interface identification;
and adding a read-write direction corresponding to the read-write operation logic in the interface connection diagram to generate a test data flow diagram.
In one embodiment, the extracting the identification parameter from the test data of the test case includes:
acquiring test parameter of the test case;
searching an application scene identifier corresponding to the case identifier, and acquiring an identifier parameter corresponding to the application scene identifier;
and extracting identification parameter values corresponding to the identification parameters from the test parameter.
In one embodiment, the performing, according to the identifier entry parameter, data mapping verification on the data in the data table includes:
acquiring write operation parameters of the interface corresponding to the interface identifier to the corresponding data table;
screening out a data set containing the identification parameter values from the data table;
and when the parameter values corresponding to the corresponding write operation parameters exist in the data set, judging that the data mapping verification of the data table associated with the interface identifier is successful.
In one embodiment, the method further comprises:
when a first data set is queried, searching whether a second data set associated with the first data set exists in the screened data set; parameter values corresponding to the corresponding write operation parameters do not exist in the first data set;
when the second data set is found, judging whether a parameter value corresponding to the corresponding write operation parameter exists in the second data set;
and when the parameter value corresponding to the corresponding write operation parameter does not exist in the second data set, judging that the data mapping verification of the data table associated with the interface identifier fails.
In one embodiment, the screening out the data set corresponding to the identifier entry parameter from the data table includes:
when the data set containing the identification access parameter value is not searched from the data table, acquiring a user registry, and searching a basic parameter value corresponding to the identification access parameter value from the user registry;
and screening out a data set containing the basic parameter values from the data table.
In one embodiment, the method further comprises:
and when the data set containing the basic parameter values is not found, judging the interface corresponding to the interface identification associated with the data table as an abnormal interface.
An abnormal interface locating device, the device comprising:
a notification receiving module, configured to receive a test failure notification, where the test failure notification carries a case identifier;
the case searching module is used for searching the test case corresponding to the case identifier;
the entry value extraction module is used for acquiring an interface identifier of an interface corresponding to the test case and extracting an identifier entry value from the test case;
the flow chart searching module is used for searching a test data flow chart corresponding to the interface identifier and extracting a data table associated with the interface identifier from the test data flow chart;
the abnormal positioning module is used for carrying out data mapping verification on the data in the data table according to the identifier input parameter and acquiring an interface identifier corresponding to the data in the data table, wherein the data mapping verification fails; and judging the interface corresponding to the acquired interface identifier as an abnormal interface.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the above method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the abnormal interface positioning method, the abnormal interface positioning device, the computer equipment and the storage medium, when the test case fails to be executed, according to the interface identification corresponding to the test case which fails to be executed, the corresponding test data flow diagram can be found, and the data table with abnormal data can be quickly found out by performing data traversal verification on the data table associated in the test data flow diagram, and the abnormal interface is positioned, so that the data is prevented from being searched and analyzed from a database with scattered data, and the searching and positioning efficiency of the test abnormal problem is effectively improved.
Drawings
FIG. 1 is a diagram illustrating an exemplary scenario for an application of the method for locating an abnormal interface;
FIG. 2 is a flowchart illustrating an abnormal interface location method according to an embodiment;
FIG. 3 is a schematic diagram of a test data flow graph in one embodiment;
FIG. 4 is a flow chart illustrating the steps in generating a test data flow chart in one embodiment;
FIG. 5 is a block diagram of an embodiment of an interface locating apparatus;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The abnormal interface positioning method provided by the application can be applied to the application environment shown in fig. 1. Wherein, the server communicates with the test terminal through the network. When the test case on the test terminal fails to be executed, the test terminal can send a test failure notification to the server, wherein the test failure notification carries the case identifier of the test case which fails to be tested. After receiving the test failure notification, the server extracts a case identification from the test failure notification, searches a test case corresponding to the case identification, obtains an interface identification of an interface corresponding to the test case, extracts an identification entry parameter value from the test case, searches a test data flow diagram corresponding to the interface identification, extracts a data table associated with the interface identification from the test data flow diagram, performs data mapping verification on data in the data table according to the extracted identification entry parameter value, and judges whether the interface corresponding to the verification data is abnormal according to a verification result. The test terminal may be, but is not limited to, various computers, notebook computers, and other devices, and the server may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, an abnormal interface positioning method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step 210, receiving a test failure notification, where the test failure notification carries a case identifier.
The system to be tested consists of a test terminal and a server, the test case is executed on the test terminal, and the test terminal and the server carry out data interaction. When a system to be tested is tested, after the test cases are executed, a tester can select the test cases with execution failure on a test terminal to perform execution failure reason positioning, and generate a test failure notification according to the case identification of the selected test cases, wherein the test failure notification carries the case identification of the test cases needing execution failure reason positioning, and the case identification is used for uniquely identifying the test cases and can be a case code, a case number and the like. And the test terminal sends the generated test failure notification to the server, and the server reads the case identification from the test failure notification after receiving the test failure notification. In other embodiments, the test case may also be executed on the server, and after the test case fails to be executed, the server automatically obtains a case identifier of the test case that fails to be executed, and searches for a failure reason according to the case identifier.
Step 220, finding the test case corresponding to the case identifier.
The server stores various data related to the test, and the data may include, but is not limited to, a test case, data related to an interface included in a system to be tested, various data tables generated during the test, and the like. The server finds out the test case corresponding to the read case identification.
The test case is used for testing a certain service function of a system to be tested, one service function usually comprises a plurality of service process steps, correspondingly, the corresponding test case also comprises a plurality of test process steps, the service for carrying out the service for carrying.
And step 230, acquiring an interface identifier of an interface corresponding to the test case, and extracting an identifier entry parameter from the test case.
And the server acquires the interface identification of the interface corresponding to the test case. The test case may involve a plurality of functional interfaces, the interface information related to the test case may be stored in association with the test case, and the interface identifier of the interface associated with the test case may be found according to the case identifier of the test case. The test case can also be composed of a plurality of interface test cases, and the server acquires the interface identifications of the plurality of interface test cases.
The test case comprises a plurality of test parameter values, and the server extracts the identification parameter values from the test parameter values of the test case. The identification parameter is test data with unique identification to the test case, such as data of user mobile phone number, user ID number, etc.
Step 240, searching a test data flow diagram corresponding to the interface identifier, and extracting a data table associated with the interface identifier from the test data flow diagram.
The test data flow diagram is composed of an interface identifier of the test interface and a data table having a read-write operation relation with the test interface, and can reflect the data transmission direction in the test case execution process. A system corresponds to a plurality of test data flow diagrams, and cross overlapping of interfaces or data tables may occur between different test data flow diagrams.
And the server matches the acquired interface identification with the interface identification in each test data flow diagram, and when the server finds the test data flow diagram completely containing the acquired interface identification, the server judges that the test data flow diagram is successfully matched. The successfully matched test data flow diagram may also include an interface identifier other than the interface identifier corresponding to the test case, and the server acquires a data table associated with the acquired interface identifier in the successfully matched test data flow diagram.
Referring to fig. 3, fig. 3 is a schematic diagram of a test data flow diagram, which is composed of interface identifiers of 4 interfaces, where interface 1 is associated with data table 1, interface 2 is associated with data table 2 and data table 3, interface 4 is associated with data table 4, and the arrow direction of the connection line between the interface identifier and the data table represents the read-write direction of the corresponding interface. For example, the direction of the arrow connecting interface 1 and data table 1 points to data table 1, indicating that interface 1 writes data into data table 1, and the direction of the arrow connecting interface 2 and data table 1 points to interface 2, indicating that interface 2 reads data from data table 1. The specific data reading and writing direction can be defined by the tester, and is not limited to the manner described in this embodiment.
Step 250, performing data mapping verification on data in the data table according to the identifier input parameter, and acquiring an interface identifier corresponding to data with data mapping verification failure in the data table; and judging the interface corresponding to the acquired interface identifier as an abnormal interface.
After the server extracts the data tables, performing data mapping verification on the extracted data tables according to the extracted identification entry parameters, searching data corresponding to the identification entry parameters from each data table, performing data verification on the data tables according to the read-write rules of each interface and the corresponding data table in the test data flow diagram, judging whether the data in the data tables are abnormal or not, judging that the interface corresponding to the interface identification is an abnormal interface when the verification result of the data in the data tables corresponding to the interface identification is abnormal, and judging that the interface corresponding to the interface identification is a normal interface when the data in all the data tables corresponding to the interface identification are verified to be normal.
When the test case fails to be executed, the server can search the corresponding test data flow diagram according to the interface identification corresponding to the test case which fails to be executed, and the server can quickly search the data table with abnormal data by performing data traversal verification on the data table associated in the test data flow diagram, and can locate the abnormal interface according to the abnormal data table, so that the work of searching and analyzing data from a database with scattered data is reduced, and the efficiency of searching and locating test abnormal problems is effectively improved.
In one embodiment, as shown in fig. 4, a generation manner of a test data flow diagram is provided, which may be applied to the server shown in fig. 1, and may also be applied to a test terminal or other devices, and includes the following steps:
step 410, an interface interconnection information table is obtained.
The server acquires interface data of each interface in the system, specifically, the server scans codes of the interfaces, acquires data such as request paths, input parameters, data types of the input parameters, output parameters, data types of the output parameters, interface identifiers and the like of the interfaces, and encapsulates and stores the interface data.
The server acquires an interface interconnection information table, which is generated and stored in advance according to the interface data. The interface interconnection data table stores the calling relationship among the interfaces, such as the interface registration calls the interface login, the interface login calls the interface information modification, and the like. And the server reads the calling relation among the interfaces from the interface interconnection information table.
And step 420, acquiring interface identifiers of interfaces corresponding to the test cases, and connecting the interface identifiers according to the interface interconnection information table to generate an interface connection diagram.
The server obtains the currently stored test case and searches the interface identification of the interface corresponding to the test case, the server can search the interface identification of the interface associated with the test case according to the case identification of the test case, and the association relationship between the test case and the interface is stored in advance. When the test case is composed of a plurality of interface test cases, the server may obtain the interface identifications of the plurality of interface test cases composing the test case. And connecting the interfaces according to the call relation among the interfaces in the read interface interconnection information table to generate an interface connection diagram corresponding to the test case. For example, with reference to fig. 3, if one test case corresponds to four interfaces, and the calling relationships of the four interfaces are that interface 1 calls interface 2, interface 2 calls interface 3, and interface 3 calls interface 4, interface 1, interface 2, interface 3, and interface 4 are sequentially connected to generate an interface connection diagram.
In other embodiments, the interface connection diagrams may not correspond to the test cases one to one, and the server may obtain the interface identifiers of all the interfaces included in the system, and connect the interface identifiers according to the interface call relationship to generate the interface connection diagram, where, unlike the interface connection diagram corresponding to the test case, the interface connection diagram generated by directly connecting the interface identifiers of the system interfaces may have a cross-overlapping condition of interfaces and data tables.
Step 430, acquiring the data table associated with the interface identifier and the read-write operation logic of the interface corresponding to the interface identifier to the data table.
And after the server generates the interface connection diagram, acquiring a data table associated with each interface from the interface data. And acquiring the read-write operation logic of each interface and the associated data table from the interface data, wherein the read-write operation logic refers to whether the interface writes data into the associated data table or reads data from the associated data table, and some interfaces may read data from the data table and write data into the data table. For example, the synchronous payment interface has three associated data tables, which are a synchronous payment table, a periodic payment record table and a user asset table, and reads data from the synchronous payment table and writes data into the periodic payment record table and the user asset table.
Step 440, adding the data table to the interface connection diagram according to the interface identification.
And the server adds the data table into the interface connection diagram according to the incidence relation between the interface identification and the data table. Specifically, the data table is wired with its associated interface. As shown in FIG. 3, data Table 1 is associated with both interface 1 and interface 2, with data Table 1 being wired to interface 1 and data Table 1 being wired to interface 2.
And step 450, adding a read-write direction corresponding to the read-write operation logic in the interface connection diagram to generate a test data flow diagram.
And after the server adds the data table into the interface connection diagram, determining the read-write direction of the interface to the data table according to the read-write operation logic of the interface and the associated data table, and representing the determined read-write direction in the interface connection diagram to generate a test data flow diagram. As shown in FIG. 3, the read/write operation logic of interface 1 and data table 1 is that interface 1 writes data into data table 1, and then an arrow pointing to data table 1 is added to the connection between interface 1 and data table 1.
The test data flow graph is generated and then stored, and can be called by a server, a test terminal or other test related equipment.
In one embodiment, the step 230 of extracting the identification parameter values from the test data of the test case may comprise: acquiring test parameter of the test case; searching an application scene identifier corresponding to the case identifier, and acquiring an identifier parameter corresponding to the application scene identifier; and extracting the identification parameter value corresponding to the identification parameter from the test parameter.
And the server searches the application scene identification corresponding to the case identification. In this embodiment, the test cases are classified according to the application scenarios of the business, for example, the business can be classified into a loan business application scenario, a financing business application scenario, and the like. The application scene identifier is used for uniquely identifying the application scene, and can be a code, a number and the like.
Due to different service requirements, identification parameters used by services of different application scenarios may be different, and the identification parameters are used for uniquely identifying the test case, where a user mobile phone number may be used as the identification parameter in some application scenarios, and a user ID number may be used as the identification parameter in some application scenarios. The corresponding relation between the application scene and the identification parameters is stored in the server in advance, and the server searches the identification parameters corresponding to the application scene identification. And the server acquires the test parameter of the test case and extracts the identifier parameter value corresponding to the searched identifier parameter from the test parameter. If the identification parameter is the user ID number, the server extracts an identification parameter value 'U329480' corresponding to the user ID number from the test parameter. The test cases are divided according to the application scene, so that the parameter searching and extracting are convenient.
In one embodiment, the step 250 of performing a data mapping check on the data in the data table according to the identification parameter may include: acquiring write operation parameters of an interface corresponding to the interface identifier to a corresponding data table; screening out a data set containing the identification parameter from the data table; and when the parameter values corresponding to the corresponding write operation parameters exist in the data set, judging that the data mapping verification of the data table associated with the interface identifier is successful.
When the server performs data mapping verification, the server acquires write operation parameters of the interface corresponding to each interface identifier in the test data flow graph to the data table associated with the interface identifier one by one, the write operation parameters can be stored in the interface data in advance, and the server can search the write operation parameters corresponding to the interface identifier and the table name of the data table. The write operation parameter may include a plurality of parameters. For example, the write operation parameters corresponding to the synchronous payment interface and the associated installment payment table may include parameters such as a payment account number, a payment amount, a payment schedule, and the like.
And the server screens out a data set containing the identification parameter from the data table corresponding to the interface. Specifically, the data table includes a plurality of data sets, and the data sets may be in the form of data tables or in other forms. Preferably, the data sets may be named with the representation parameter values to facilitate set lookup. Each data set stores relevant test data of a test user, and the relevant test data can comprise basic information parameters of the test user, read operation parameters and write operation parameters in the test process and the like. And the server searches a data set of the test data corresponding to the test user of the test case according to the interface identification. And after screening out the data set, the server searches parameter values corresponding to the write operation parameters from the data set, and when the parameter values corresponding to all the write operation parameters are searched from the data set, the server indicates that the corresponding interface writes all the write operation parameters into the data table, and judges that the data in the data table is successfully verified.
In one embodiment, the method further comprises: when the first data set is queried, searching whether a second data set associated with the first data set exists in the screened data set; parameter values corresponding to the corresponding write operation parameters do not exist in the first data set; when the second data set is found, judging whether a parameter value corresponding to the corresponding write operation parameter exists in the second data set; and when the parameter value corresponding to the corresponding write operation parameter does not exist in the second data set, judging that the data mapping verification of the data table associated with the interface identifier fails.
When the server finds that the first data set of the parameter values corresponding to the corresponding write operation parameters does not exist in the data, namely the parameter values corresponding to all or part of the corresponding write operation parameters cannot be found in the first data set, the server searches whether a second data set associated with the first data set exists in the data set screened out correspondingly to the interface identifier. The first data set and the second data set are included in the screened data set corresponding to the interface identifier, and the first data set and the second data set are used for distinguishing different data sets without other special meanings.
The data sets are associated with other data sets, which means that the data tables to which the data sets belong have synchronous business operation relationship. Sometimes, one interface may be associated with a plurality of data tables, and it needs to specifically determine which data table needs to be written with data according to a parameter value read by the interface, and not every data table corresponding to the interface needs to be written with data. For example, after payment is completed, the synchronous payment interface needs to be called when synchronous payment data is needed, when a payment type parameter value read by the synchronous payment interface is a pay-by-date type, the synchronous payment interface needs to write data into a periodic payment table, and when the payment type parameter value read by the synchronous payment interface is a pay-in-advance type, the synchronous payment interface needs to write data into a user asset table besides the periodic payment table. The user asset table and the periodic repayment table are associated data tables, and when the data corresponding to the write operation parameters are inquired in the user asset table, the synchronous repayment interface is not necessarily abnormal.
And when the server cannot find the second data set associated with the first data set, judging that the data mapping check of the data table associated with the interface identification fails. When the server finds the second data set associated with the first data set, the server obtains the data table to which the second data set belongs and the write operation parameters of the corresponding interface, judges whether the parameter values corresponding to all the corresponding write operation parameters can be found from the second data set, judges that the data table data mapping verification associated with the interface identifier is successful when the parameter values corresponding to all the corresponding write operation parameters are found from the second data set, and judges that the data table data mapping verification associated with the interface identifier fails when the parameter values corresponding to the corresponding write operation parameters cannot be found from the second data set or only a part of the parameter values corresponding to the corresponding write operation parameters can be found.
When the data mapping verification of the data table is carried out, the correlation relation between the data tables corresponding to the interfaces is considered, so that the error judgment is avoided, and the accuracy of the data verification can be improved.
In one embodiment, screening a data set corresponding to the identified parameter from the data table comprises: when the data set containing the identification entry parameter value is not searched from the data table, acquiring a user registry, and searching a basic parameter value corresponding to the identification entry parameter value from the user registry; and screening a data set containing basic parameter values from the data table.
When the server cannot find the data set containing the identification entry parameter value from the data table, the server acquires a user registration table, wherein basic parameters of each test user are stored in the user registration table, and the basic parameters are basic information of the user, such as a mobile phone number of the user, a user ID number, a user code and the like. And all the basic information parameters of the same test user are stored in an associated manner. The server searches other basic parameters corresponding to the identification parameter values from the user registry and screens out data sets containing other basic parameters from the data table.
In one embodiment, the method further comprises: and when the data set containing the basic parameter values is not found, judging the interface corresponding to the interface identification associated with the data table as the abnormal interface.
When the server does not find the corresponding data set after traversing and searching all the basic parameter values, the interface can not carry out normal reading and writing operation of the basic parameters, the server judges that the interface corresponding to the data table of the data set which does not find the basic parameter values is an abnormal interface,
the basic parameters are some basic information necessary for each service, so that the interface transfers the basic information in the data transfer process, each data table contains the basic parameters, the identification parameter is only one of the basic information, some data tables may only record one or more of the basic parameters, the basic parameters set in the data tables may not be different, and when the data mapping is verified, the traversal verification is performed on all the basic parameters, so that the coverage rate of the data mapping verification can be improved, and the accuracy of the data verification process can be improved.
It should be understood that although the steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided an abnormal interface locating apparatus, including: a notification receiving module 510, a case finding module 520, an entry parameter extracting module 530, a flow graph finding module 540, and an anomaly locating module 550, wherein:
a notification receiving module 510, configured to receive a test failure notification, where the test failure notification carries a case identifier.
The case searching module 520 is configured to search for a test case corresponding to the case identifier.
And a parameter value extracting module 530, configured to obtain an interface identifier of an interface corresponding to the test case, and extract a parameter value from the test case.
And the flow diagram searching module 540 is configured to search a test data flow diagram corresponding to the interface identifier, and extract a data table associated with the interface identifier from the test data flow diagram.
The anomaly positioning module 550 is configured to perform data mapping verification on data in the data table according to the identifier entry parameter, and obtain an interface identifier corresponding to data in the data table, where the data mapping verification fails; and judging the interface corresponding to the acquired interface identifier as an abnormal interface.
In one embodiment, the abnormal interface locating device may further include:
and the interconnection table acquisition module is used for acquiring the interface interconnection information table.
And the connection diagram generation module is used for acquiring the interface identification of the interface corresponding to the test case and connecting the interface identification according to the interface interconnection information table to generate an interface connection diagram.
And the operation logic operation module is used for acquiring the data table associated with the interface identifier and the read-write operation logic of the interface corresponding to the interface identifier to the data table.
And the data table adding module is used for adding the data table into the interface connection diagram according to the interface identification.
And the direction adding module is used for adding the read-write direction corresponding to the read-write operation logic in the interface connection diagram to generate a test data flow diagram.
In one embodiment, the parameter extraction module 530 may include:
and the parameter acquiring module is used for acquiring the test parameter of the test case.
And the identification parameter searching module is used for searching the application scene identification corresponding to the case identification and acquiring the identification parameter corresponding to the application scene identification.
And the identification value extraction module is used for extracting the identification parameter value corresponding to the identification parameter from the test parameter.
In one embodiment, the anomaly locating module 550 may include:
and the writing parameter acquisition module is used for acquiring the writing operation parameters of the interface corresponding to the interface identifier to the corresponding data table.
And the set screening module is used for screening out the data set containing the identification parameter values from the data table.
And the set verification judging module is used for judging that the data mapping verification of the data table associated with the interface identifier is successful when the parameter values corresponding to the corresponding write operation parameters exist in the data set.
In one embodiment, the abnormal interface locating device may further include:
the second set searching module is used for searching whether a second data set associated with the first data set exists in the screened data sets when the first data set is searched; parameter values corresponding to respective write operation parameters are not present in the first data set.
And the second set mapping module is used for judging whether the parameter values corresponding to the corresponding write operation parameters exist in the second data set when the second data set is found.
And the second set judgment module is used for judging that the data mapping check of the data table associated with the interface identifier fails when the parameter value corresponding to the corresponding write operation parameter does not exist in the second data set.
In one embodiment, the set filtering module may include:
a basic value searching module for obtaining the user registration table when the data set containing the identification parameter value is not searched from the data table, and searching the basic parameter value corresponding to the identification parameter value from the user registration table
And the basic value screening module is used for screening out a data set containing basic parameter values from the data table.
In one embodiment, the abnormal interface locating device may further include:
and the basic value judging module is used for judging the interface corresponding to the interface identifier associated with the data table as the abnormal interface when the data set containing the basic parameter value is not found.
For the specific definition of the abnormal interface positioning device, reference may be made to the above definition of the abnormal interface positioning method, which is not described herein again. The modules in the above-mentioned abnormal interface positioning device can be wholly or partially implemented by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing test data related to the positioning of the abnormal interface. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an exception interface location method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a test failure notice, wherein the test failure notice carries a case identifier; searching a test case corresponding to the case identification; acquiring an interface identifier of an interface corresponding to a test case, and extracting an identifier input parameter from the test case; searching a test data flow diagram corresponding to the interface identifier, and extracting a data table associated with the interface identifier from the test data flow diagram; performing data mapping verification on data in the data table according to the identification reference value to obtain an interface identification corresponding to the data in the data table, wherein the data mapping verification fails; and judging the interface corresponding to the acquired interface identifier as an abnormal interface.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring an interface interconnection information table; acquiring interface identifiers of interfaces corresponding to the test cases, and connecting the interface identifiers according to an interface interconnection information table to generate an interface connection diagram; acquiring a data table associated with the interface identifier and reading and writing operation logic of the interface corresponding to the interface identifier to the data table; adding the data table into the interface connection diagram according to the interface identification; and adding a read-write direction corresponding to the read-write operation logic in the interface connection diagram to generate a test data flow diagram.
In one embodiment, the step of extracting the identification parameter from the test data of the test case is further performed by the processor executing the computer program to: acquiring test parameter of the test case; searching an application scene identifier corresponding to the case identifier, and acquiring an identifier parameter corresponding to the application scene identifier; and extracting the identification parameter value corresponding to the identification parameter from the test parameter.
In one embodiment, the processor, when executing the computer program, further performs the step of performing data mapping check on the data in the data table according to the identification entry parameter, to: acquiring write operation parameters of an interface corresponding to the interface identifier to a corresponding data table; screening a data set containing identification parameter values from the data table; and when the parameter values corresponding to the corresponding write operation parameters exist in the data set, judging that the data mapping verification of the data table associated with the interface identifier is successful.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the first data set is queried, searching whether a second data set associated with the first data set exists in the screened data set; parameter values corresponding to the corresponding write operation parameters do not exist in the first data set; when the second data set is found, judging whether a parameter value corresponding to the corresponding write operation parameter exists in the second data set; and when the parameter value corresponding to the corresponding write operation parameter does not exist in the second data set, judging that the data mapping verification of the data table associated with the interface identifier fails.
In one embodiment, the processor when executing the computer program performs the step of filtering out the data set corresponding to the identified parameter from the data table is further configured to: when the data set containing the identification entry parameter value is not searched from the data table, acquiring a user registry, and searching a basic parameter value corresponding to the identification entry parameter value from the user registry; and screening a data set containing basic parameter values from the data table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when the data set containing the basic parameter values is not found, judging the interface corresponding to the interface identification associated with the data table as the abnormal interface.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a test failure notice, wherein the test failure notice carries a case identifier; searching a test case corresponding to the case identification; acquiring an interface identifier of an interface corresponding to a test case, and extracting an identifier input parameter from the test case; searching a test data flow diagram corresponding to the interface identifier, and extracting a data table associated with the interface identifier from the test data flow diagram; performing data mapping verification on data in the data table according to the identification reference value to obtain an interface identification corresponding to the data in the data table, wherein the data mapping verification fails; and judging the interface corresponding to the acquired interface identifier as an abnormal interface.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring an interface interconnection information table; acquiring interface identifiers of interfaces corresponding to the test cases, and connecting the interface identifiers according to an interface interconnection information table to generate an interface connection diagram; acquiring a data table associated with the interface identifier and reading and writing operation logic of the interface corresponding to the interface identifier to the data table; adding the data table into the interface connection diagram according to the interface identification; and adding a read-write direction corresponding to the read-write operation logic in the interface connection diagram to generate a test data flow diagram.
In one embodiment, the computer program when executed by the processor for extracting the identification parameter from the test data for the test case is further operable to: acquiring test parameter of the test case; searching an application scene identifier corresponding to the case identifier, and acquiring an identifier parameter corresponding to the application scene identifier; and extracting the identification parameter value corresponding to the identification parameter from the test parameter.
In one embodiment, the computer program when executed by the processor further performs the step of performing a data mapping check on the data in the data table according to the identifier entry parameter: acquiring write operation parameters of an interface corresponding to the interface identifier to a corresponding data table; screening a data set containing identification parameter values from the data table; and when the parameter values corresponding to the corresponding write operation parameters exist in the data set, judging that the data mapping verification of the data table associated with the interface identifier is successful.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the first data set is queried, searching whether a second data set associated with the first data set exists in the screened data set; parameter values corresponding to the corresponding write operation parameters do not exist in the first data set; when the second data set is found, judging whether a parameter value corresponding to the corresponding write operation parameter exists in the second data set; and when the parameter value corresponding to the corresponding write operation parameter does not exist in the second data set, judging that the data mapping verification of the data table associated with the interface identifier fails.
In one embodiment, the computer program when executed by the processor further operable to: when the data set containing the identification entry parameter value is not searched from the data table, acquiring a user registry, and searching a basic parameter value corresponding to the identification entry parameter value from the user registry; and screening a data set containing basic parameter values from the data table.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when the data set containing the basic parameter values is not found, judging the interface corresponding to the interface identification associated with the data table as the abnormal interface.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An abnormal interface positioning method, the method comprising:
receiving a test failure notification when the test system is tested, wherein the test failure notification carries case identification corresponding to a test case with test failure;
searching a test case corresponding to the case identification, wherein the test case is used for testing the service function of the test system, the test case comprises a plurality of interfaces, each interface is associated with a plurality of data tables, and the interfaces perform corresponding data reading and writing operations on the associated data tables in the execution process of the test case;
acquiring an interface identifier of the interface corresponding to the test case, and extracting an identifier parameter value from the test case, wherein the identifier parameter value is test data with unique identifier to the test case;
searching a test data flow diagram corresponding to the interface identifier, and extracting a data table associated with the interface identifier from the test data flow diagram, wherein the test data flow diagram is formed by the interface identifier of the interface and the data table with a read-write operation relation with the interface, and the test data flow diagram reflects a data transmission direction in the execution process of the test case;
performing data mapping verification on the data in the data table according to the identifier entry parameter to acquire an interface identifier corresponding to the data in the data table, wherein the data mapping verification fails; and judging the interface corresponding to the acquired interface identifier as an abnormal interface.
2. The method of claim 1, wherein the manner of generating the test data flow graph comprises:
acquiring an interface interconnection information table;
acquiring interface identification of the interface corresponding to the test case, and connecting the interface identification according to the interface interconnection information table to generate an interface connection diagram;
acquiring a data table associated with an interface identifier and reading and writing operation logics of the interface corresponding to the interface identifier on the data table;
adding the data table to the interface connection diagram according to the interface identification;
and adding a read-write direction corresponding to the read-write operation logic in the interface connection diagram to generate a test data flow diagram.
3. The method of claim 1, wherein extracting the identification parameter from the test data for the test case comprises:
acquiring test parameter of the test case;
searching an application scene identifier corresponding to the case identifier, and acquiring an identifier parameter corresponding to the application scene identifier;
and extracting identification parameter values corresponding to the identification parameters from the test parameter.
4. The method of claim 1, wherein performing a data mapping check on the data in the data table according to the identifier entry parameter comprises:
acquiring write operation parameters of the interface corresponding to the interface identifier to the corresponding data table;
screening out a data set containing the identification parameter values from the data table;
and when the parameter values corresponding to the corresponding write operation parameters exist in the data set, judging that the data mapping verification of the data table associated with the interface identifier is successful.
5. The method of claim 4, further comprising:
when a first data set is queried, searching whether a second data set associated with the first data set exists in the screened data set; parameter values corresponding to the corresponding write operation parameters do not exist in the first data set;
when the second data set is found, judging whether a parameter value corresponding to the corresponding write operation parameter exists in the second data set;
and when the parameter value corresponding to the corresponding write operation parameter does not exist in the second data set, judging that the data mapping verification of the data table associated with the interface identifier fails.
6. The method of claim 4, wherein the screening the data set corresponding to the identification parameter from the data table comprises:
when the data set containing the identification access parameter value is not searched from the data table, acquiring a user registry, and searching a basic parameter value corresponding to the identification access parameter value from the user registry;
and screening out a data set containing the basic parameter values from the data table.
7. The method of claim 6, further comprising:
and when the data set containing the basic parameter values is not found, judging the interface corresponding to the interface identification associated with the data table as an abnormal interface.
8. An abnormal interface positioning device, comprising:
the notification receiving module is used for receiving a notification of test failure when the test system is tested, wherein the notification of test failure carries a case identifier corresponding to a test case with test failure;
the case searching module is used for searching a test case corresponding to the case identifier, the test case is used for testing the service function of the system to be tested, the test case comprises a plurality of interfaces, each interface is associated with a plurality of data tables, and the interfaces perform corresponding data reading and writing operations on the associated data tables in the execution process of the test case;
the entry parameter value extraction module is used for acquiring an interface identifier of an interface corresponding to the test case and extracting an identifier entry parameter value from the test case, wherein the identifier entry parameter value is test data with unique identifier to the test case;
the flow diagram searching module is used for searching a test data flow diagram corresponding to the interface identifier and extracting a data table associated with the interface identifier from the test data flow diagram, wherein the test data flow diagram is formed by the interface identifier of the interface and the data table with a read-write operation relation with the interface, and the test data flow diagram reflects a data transmission direction in the test case execution process;
the abnormal positioning module is used for carrying out data mapping verification on the data in the data table according to the identifier input parameter and acquiring an interface identifier corresponding to the data in the data table, wherein the data mapping verification fails; and judging the interface corresponding to the acquired interface identifier as an abnormal interface.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201810199672.8A 2018-03-12 2018-03-12 Abnormal interface positioning method and device, computer equipment and storage medium Active CN108427613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810199672.8A CN108427613B (en) 2018-03-12 2018-03-12 Abnormal interface positioning method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810199672.8A CN108427613B (en) 2018-03-12 2018-03-12 Abnormal interface positioning method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108427613A CN108427613A (en) 2018-08-21
CN108427613B true CN108427613B (en) 2021-02-09

Family

ID=63158195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810199672.8A Active CN108427613B (en) 2018-03-12 2018-03-12 Abnormal interface positioning method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108427613B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522206B (en) * 2018-09-26 2023-09-26 平安科技(深圳)有限公司 Abnormal data positioning method, device, computer equipment and storage medium
CN110414242B (en) * 2019-08-02 2021-12-07 中国工商银行股份有限公司 Method, device, equipment and medium for detecting business logic loophole
CN110659293B (en) * 2019-09-24 2022-02-11 支付宝(杭州)信息技术有限公司 Data table determining method and device based on change codes
CN111694923A (en) * 2020-04-27 2020-09-22 平安科技(深圳)有限公司 Name mapping-based parameter assignment method and device, and computer equipment
CN113992549B (en) * 2020-07-08 2023-06-13 大唐移动通信设备有限公司 Test method, test device, electronic equipment and storage medium
CN112098816A (en) * 2020-09-09 2020-12-18 中国航空工业集团公司雷华电子技术研究所 Digital processing module testing method, device, computer equipment and storage medium
CN112181816B (en) * 2020-09-22 2023-06-02 建信金融科技有限责任公司 Scene-based interface testing method and device, computer equipment and medium
CN112363920A (en) * 2020-11-06 2021-02-12 广州品唯软件有限公司 Test case repairing method and device, computer equipment and storage medium
CN113377668A (en) * 2021-06-29 2021-09-10 南京苏宁软件技术有限公司 Automatic testing method and device for service interface and computer equipment
CN116822424B (en) * 2023-07-11 2023-12-22 北京云枢创新软件技术有限公司 Source file modifying and positioning system and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090295A (en) * 2007-07-25 2007-12-19 中兴通讯股份有限公司 Test system and method for ASON network
CN103491555A (en) * 2012-06-13 2014-01-01 中国移动通信集团湖南有限公司 Method, equipment and system for positioning IP link fault based on service information
CN107656874A (en) * 2017-11-07 2018-02-02 中国银行股份有限公司 A kind of interface test method, device, simulation baffle plate and system
CN107688526A (en) * 2017-08-25 2018-02-13 上海壹账通金融科技有限公司 Performance test methods, device, computer equipment and the storage medium of application program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6675333B1 (en) * 1990-03-30 2004-01-06 Texas Instruments Incorporated Integrated circuit with serial I/O controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090295A (en) * 2007-07-25 2007-12-19 中兴通讯股份有限公司 Test system and method for ASON network
CN103491555A (en) * 2012-06-13 2014-01-01 中国移动通信集团湖南有限公司 Method, equipment and system for positioning IP link fault based on service information
CN107688526A (en) * 2017-08-25 2018-02-13 上海壹账通金融科技有限公司 Performance test methods, device, computer equipment and the storage medium of application program
CN107656874A (en) * 2017-11-07 2018-02-02 中国银行股份有限公司 A kind of interface test method, device, simulation baffle plate and system

Also Published As

Publication number Publication date
CN108427613A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
CN108427613B (en) Abnormal interface positioning method and device, computer equipment and storage medium
CN109446068B (en) Interface test method, device, computer equipment and storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN110209652B (en) Data table migration method, device, computer equipment and storage medium
CN109800258B (en) Data file deployment method, device, computer equipment and storage medium
CN108491321B (en) Method and device for determining test case range and storage medium
CN111611021B (en) Log data transmission method, device, computer equipment and storage medium
CN109726134B (en) Interface test method and system
CN112559365A (en) Test case screening method and device, computer equipment and storage medium
CN112395202B (en) Interface automation test method and device, computer equipment and storage medium
CN110362479B (en) System upgrade test method and system
CN113342685A (en) Precise test method and device, computer equipment and storage medium
CN112115005B (en) Test data acquisition method and device, computer equipment and storage medium
CN114328243A (en) Abnormal operation data processing method, device, equipment and storage medium
CN113282513B (en) Interface test case generation method and device, computer equipment and storage medium
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN110674145A (en) Data consistency detection method and device, computer equipment and storage medium
CN111459796B (en) Automated testing method, apparatus, computer device and storage medium
CN113377669A (en) Automatic testing method and device, computer equipment and storage medium
CN117391306A (en) Homeland space planning result examination method, device, equipment and storage medium
CN112612706A (en) Automated testing method, computer device and storage medium
CN112463431B (en) BIOS error positioning method, device, equipment and storage medium
CN113704114A (en) Automatic testing method, device, equipment and medium for functional interface
CN111444093B (en) Method and device for determining quality of project development process and computer equipment
CN112416781A (en) Cross-system interface determination method and device, computer 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
GR01 Patent grant
GR01 Patent grant