CN111221727B - Test method, test device, electronic equipment and computer readable medium - Google Patents

Test method, test device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN111221727B
CN111221727B CN201911405941.2A CN201911405941A CN111221727B CN 111221727 B CN111221727 B CN 111221727B CN 201911405941 A CN201911405941 A CN 201911405941A CN 111221727 B CN111221727 B CN 111221727B
Authority
CN
China
Prior art keywords
investigation
data source
service
service type
target
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
CN201911405941.2A
Other languages
Chinese (zh)
Other versions
CN111221727A (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.)
Ruiting Network Technology Shanghai Co ltd
Original Assignee
Ruiting Network Technology Shanghai 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 Ruiting Network Technology Shanghai Co ltd filed Critical Ruiting Network Technology Shanghai Co ltd
Priority to CN201911405941.2A priority Critical patent/CN111221727B/en
Publication of CN111221727A publication Critical patent/CN111221727A/en
Application granted granted Critical
Publication of CN111221727B publication Critical patent/CN111221727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The embodiment of the application discloses a testing method, a testing device, electronic equipment and a computer readable medium. An embodiment of the method comprises: receiving a service problem investigation request sent by a test terminal, wherein the service problem investigation request comprises a service type and an input parameter corresponding to a service problem to be investigated; invoking a target interface corresponding to the service type, wherein the target interface is packaged with a preset checking method, the checking method is used for indicating to execute at least one abnormal data positioning method according to a preset sequence, and different abnormal data positioning methods are used for positioning abnormal data in different data sources; inputting the input parameters to a target interface to obtain an investigation result output by the target interface, wherein the investigation result comprises data source information of abnormal data; and returning the checking result to the test terminal. According to the embodiment, the labor cost is reduced, and the checking efficiency of the business problems is improved.

Description

Test method, test device, electronic equipment and computer readable medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a testing method, a testing device, electronic equipment and a computer readable medium.
Background
With the development of computer technology, various Applications (APP) are becoming more and more powerful. For example, for a life information class application, various services such as renting houses, second hand goods trading, recruitment, etc. are often supported. With the increase of service functions, during the application and use process, some service problems are unavoidable, such as search results cannot be found, and errors occur in transaction information.
In the existing mode, after the service problem is found, a technician usually needs to manually check and locate abnormal data by means of inquiring bottom data, calling a service, checking a log and the like. Since each service usually involves multiple links, more manpower cost is usually required, and the problem-checking efficiency is low.
Disclosure of Invention
The embodiment of the application provides a testing method, a testing device, electronic equipment and a computer readable medium, so as to solve the technical problems of higher labor cost and lower investigation efficiency caused by manually performing problem investigation in the prior art.
In a first aspect, embodiments of the present application provide a test method, including: receiving a service problem investigation request sent by a test terminal, wherein the service problem investigation request comprises a service type and an input parameter corresponding to a service problem to be investigated; invoking a target interface corresponding to the service type, wherein the target interface is packaged with a preset checking method, the checking method is used for indicating to execute at least one abnormal data positioning method according to a preset sequence, and different abnormal data positioning methods are used for positioning abnormal data in different data sources; inputting the input parameters to a target interface to obtain an investigation result output by the target interface, wherein the investigation result comprises data source information of abnormal data; and returning the checking result to the test terminal.
In a second aspect, embodiments of the present application provide a test apparatus, the apparatus including: the receiving unit is configured to receive a service problem investigation request sent by the test terminal, wherein the service problem investigation request comprises a service type and an input parameter corresponding to a service problem to be investigated; the calling unit is configured to call a target interface corresponding to the service type, wherein the target interface is packaged with a preset checking method, the checking method is used for indicating to execute at least one abnormal data positioning method according to a preset sequence, and different abnormal data positioning methods are used for positioning abnormal data in different data sources; the input unit is configured to input the input parameters to the target interface to obtain an investigation result output by the target interface, wherein the investigation result comprises data source information with abnormal data; and the return unit is configured to return the checking result to the test terminal.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the method as described in the first aspect above.
In a fourth aspect, embodiments of the present application provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in the first aspect above.
According to the testing method, the testing device, the electronic equipment and the computer readable medium, the service type and the input parameters corresponding to the service problem to be checked are obtained by receiving the service problem checking request sent by the testing terminal; and then, calling a target interface corresponding to the service type, inputting the input parameters to the target interface, and obtaining an investigation result output by the target interface, thereby finally returning the investigation result to the test terminal. The target interface is packaged with a preset checking method, the checking method can be used for indicating to execute at least one abnormal data positioning method according to a preset sequence, and the abnormal data in different data sources can be positioned by each abnormal data positioning method, so that the abnormal data in at least one data source can be automatically positioned according to the corresponding checking sequence according to the service type. Compared with the mode of manually conducting problem investigation in the prior art, the method can reduce labor cost and improve problem investigation efficiency.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
FIG. 1 is a flow chart of one embodiment of a test method according to the present application;
FIG. 2 is a flow chart of yet another embodiment of a test method according to the present application;
FIG. 3 is a schematic diagram of the structure of one embodiment of a testing device according to the present application;
fig. 4 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present application.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Referring to FIG. 1, a flow 100 of one embodiment of a test method according to the present application is shown. The test method comprises the following steps:
and step 101, receiving a service problem investigation request sent by the test terminal.
In this embodiment, an execution body (e.g., an electronic device such as a server) of the test method may receive a service problem investigation request sent by the test terminal. In practice, the test terminal may be a terminal device used by a tester.
In one scenario, a tester may send a service problem investigation request to the execution body if a service problem is found during a test of a target application. The target Application may be any client Application (APP) to be tested, such as a life information Application, a transaction Application, and the like. The service problem may be that the search result cannot be found, and the transaction information is wrong.
In another scenario, if a business problem occurs during the process of using the target application by the user, the user may feed back the business problem to the customer service. And after the customer service is used for finishing the service problems, the relevant information of the service problems can be reported to equipment used by the testers. At this time, the tester can send a service problem investigation request to the execution body based on the information reported by the customer service.
In this embodiment, the service problem investigation request may include a service type corresponding to the service problem to be investigated. Wherein the service types may be pre-partitioned based on the services involved in the target application. For example, the services related to the application of the certain life information class include a house renting service, a second hand goods transaction service, a recruiting service, and the like, and the service type may include a house renting service class, a second hand goods transaction service class, a recruiting service class, and the like.
In this embodiment, the service problem investigation request may further include an input parameter corresponding to the service problem to be investigated. Here, the input parameter may be a parameter for input into an interface packaged with the investigation method. The input parameters may be determined based on the business problem to be examined. Different business problems may correspond to different parameters. The input parameters corresponding to each service problem can be set based on a preset input specification, and the specific form of the input parameters is not limited in the embodiment of the present application.
As an example, if the service problem is that order information cannot be found, the input parameters may include information such as an identifier of a service type to which the service problem belongs, an order number, and the like.
Step 102, calling a target interface corresponding to the service type, wherein the target interface is packaged with a preset checking method.
In this embodiment, different service types may correspond to different interfaces. Each interface may be packaged with a preset investigation method. The investigation method may be used to instruct the execution of at least one abnormal data localization method in a preset order. Different abnormal data locating methods may be used to locate abnormal data in different data sources. The abnormal data positioning method and the calling sequence of the abnormal data positioning method, which are called by the investigation method packaged by different interfaces, can be different.
Here, the abnormal data positioning method may be set in advance. For example, abnormal data localization methods for databases, abnormal data localization methods for HTTP (HyperText Transfer Protocol ) interfaces, abnormal data localization methods for SCF (SenparcCoreFramework) interfaces, and the like may be included, but are not limited to. The database, the HTTP interface and the SCF interface are data sources.
The method of locating anomalous data for different data sources may be different. Taking the business problem as an example that order information cannot be found, the abnormal data positioning method aiming at the database can be that firstly, the order number in the input parameters is obtained. And then searching the data corresponding to the order number from the database. If the data corresponding to the order number is not found from the database, it can be considered that there is abnormal data in the data source (i.e., database), and the abnormal data is the data corresponding to the order number. In practice, the database herein may be a relational database, such as mySQL database.
Taking the service problem as an example that order information cannot be found, the abnormal data positioning method for the HTTP interface can be to call the interface and input different test data into the interface. If feedback cannot be obtained after inputting certain test data, the HTTP interface can be considered to have abnormal data (i.e., bug).
The method for locating abnormal data for different data sources may be any of various conventional methods for locating abnormal data, or may be set as desired, and is not limited thereto.
In this embodiment, an interface corresponding to a service type may be used as a target interface, and the execution body may call the target interface, so as to obtain code information corresponding to the investigation method. The code information may be used to instruct the execution body to call at least one abnormal data positioning method sequentially according to a preset investigation order. Different abnormal data locating methods may be used to locate abnormal data in different data sources. Thus, the abnormal data in different data can be positioned.
As an example, the code information encapsulated by the target interface indicates that the abnormal data positioning method for the database, the abnormal data positioning method for the HTTP interface, and the abnormal data positioning method for the SCF interface are sequentially executed in order from first to last. At this time, the execution body may call the execution code of the corresponding abnormal data locating method according to the instruction of the code information, and execute the called code, thereby locating the abnormal data in the various data sources.
And step 103, inputting the input parameters to the target interface to obtain the investigation result output by the target interface.
In this embodiment, since the target interface is packaged with a preset checking method, the checking method is used for indicating to execute at least one preset abnormal data positioning method according to a preset checking sequence, and each different data positioning method is used for positioning abnormal data in different data sources, so that input parameters can be input to the target interface, and a checking result output by the target interface can be obtained.
In practice, after the input parameters are input to the target interface, the execution body may sequentially execute the different data positioning methods indicated by the methods according to the order indicated by the investigation method. After the execution of the various data positioning methods is finished, the investigation result output by the target interface can be obtained. Here, the result of the investigation includes data source information in which abnormal data exists. Wherein the data source information may be used to indicate the data source. For example, the data source information may be descriptive information of the data source, and may include, for example, a type, a name, and the like of the data source.
In some optional implementations of this embodiment, before invoking the target interface corresponding to the service type, the executing body may further use a user (e.g. a tester) sending the service problem investigation request as a target user, to determine whether the target user has investigation authority for the service problem of the service type. And if the target user has the checking authority for the service problems of the service types, executing the step of calling the target interface corresponding to the service types.
It should be noted that different users may have investigation rights for service problems of different service types. For example, a high-level tester may have troubleshooting permissions for business problems for all business types, while a low-level user may have troubleshooting permissions for business problems for a certain business type for which it is responsible.
And 104, returning an investigation result to the test terminal.
In this embodiment, after obtaining the output inspection result of the target interface, the execution body may return the inspection result to the test terminal. In practice, since the service problem investigation request may be sent by the equipment used by the tester, after the investigation result is obtained, the investigation result may be returned to the test terminal used by the tester.
In some optional implementations of this embodiment, the execution body may first use the data source information in the investigation result as target data source information, and determine whether the target user has a viewing authority for the target data source information. If the target user has the checking authority for the target data source information, the checking result can be returned to the test terminal.
According to the method provided by the embodiment of the application, the service type and the input parameters corresponding to the service problem to be inspected are obtained by receiving the service problem inspection request sent by the test terminal; and then, calling a target interface corresponding to the service type, inputting the input parameters to the target interface, and obtaining an investigation result output by the target interface, thereby finally returning the investigation result to the test terminal. Because the target interface is packaged with the preset checking method, the checking method can be used for indicating to execute at least one preset abnormal data positioning method according to the preset checking sequence, and the abnormal data in different data sources can be positioned by the different data positioning methods, so that the abnormal data in at least one data source can be automatically positioned according to the corresponding checking sequence aiming at the service type. Compared with the mode of manually conducting problem investigation in the prior art, the method can reduce labor cost and improve problem investigation efficiency.
With further reference to fig. 2, a flow 200 of yet another embodiment of a test method is shown. The flow 200 of the test method includes the steps of:
step 201, obtaining an abnormal data positioning method of each data source.
In this embodiment, an executing body (e.g., an electronic device such as a server) of the test method may acquire an abnormal data positioning method of each data source. Specifically, one abnormal data locating method may be acquired for each data source. Different abnormal data locating methods may be used to locate abnormal data in different data sources.
It should be noted that the abnormal data positioning method for different data sources may be different. Taking a business problem as an example that order information cannot be found, the abnormal data positioning method aiming at the database can be that firstly, order numbers in input parameters are obtained; and then searching the data corresponding to the order number from the database. If the data corresponding to the order number is not found from the database, it can be considered that there is abnormal data in the data source (i.e., database), and the abnormal data is the data corresponding to the order number. In practice, the database herein may be a relational database, such as mySQL database. As yet another example, an abnormal data localization method for an HTTP interface may be to call the interface and input different test data into the interface. If feedback cannot be obtained after inputting certain test data, the HTTP interface can be considered to have abnormal data (i.e., bug).
The method for locating abnormal data for different data sources may be any of various conventional methods for locating abnormal data, or may be set as desired, and is not limited thereto.
Step 202, setting data sources corresponding to each service type and checking sequence of the data sources.
In this embodiment, the execution body may set a data source corresponding to each service type and an investigation order of the data sources. The data source corresponding to each service type may be a data source related to each link related to the data in the service type, or a data source in which abnormal data has occurred in the service type. As an example, the data sources corresponding to each traffic type may include, but are not limited to, one or more of the following: database, HTTP interface, SCF interface, etc. Here, for each service type, the investigation order of the data sources corresponding to the service type may be preset according to various manners. For example, the setting may be performed randomly or may be performed in advance according to a certain sort result.
In some optional implementations of this embodiment, the executing body may set the data sources corresponding to the service types and the investigation sequence of the data sources through the following steps:
first, obtaining a history service problem meeting preset conditions.
Here, the preset condition may be set as needed, for example, may be set such that the occurrence frequency is greater than a preset threshold value or the like.
And secondly, inquiring a history checking result corresponding to each history service problem.
Here, the history checking result may include history data source information in which abnormal data exists. The historical investigation result may be an investigation result obtained using the prior art. For example, the result of the investigation may be obtained by using a manual investigation method.
And thirdly, dividing the acquired history checking result according to the service type.
In practice, the service types may be pre-partitioned based on the services involved in the current application to be tested. For example, the services related to the application of the certain life information class include a house renting service, a second hand goods transaction service, a recruiting service, and the like, and the service type may include a house renting service class, a second hand goods transaction service class, a recruiting service class, and the like.
Fourth, based on the historical data source information in the historical investigation result corresponding to each service type, determining the data source corresponding to each service type and the investigation sequence of the data sources.
Specifically, for each service type, each historical data source information in the historical investigation result corresponding to the service type may be first used as target historical data source information, and the data source indicated by each target historical data source information may be used as the data source corresponding to the service type. And then, ordering the target historical data source information according to the sequence of the occurrence times from large to small, and taking the sequence of the target historical data source information as the investigation sequence of the corresponding data source.
Step 203, creating an investigation method corresponding to each service type based on the abnormal data investigation method of the data source corresponding to each service type and the investigation sequence of the data source.
In this embodiment, the execution body may create the investigation method corresponding to each service type based on the data source and the investigation order corresponding to each service type. The checking method is used for indicating to execute at least one preset abnormal data positioning method according to a preset checking sequence. In practice, the investigation method corresponding to each service type can be created by a technician through writing a script. The script can be written in java, php and other languages.
And 204, packaging the investigation methods corresponding to the different service types into different interfaces respectively.
In this embodiment, the execution body may encapsulate the investigation methods corresponding to different service types into different interfaces (such as HTTP interfaces) respectively, so as to facilitate subsequent calls.
And step 205, receiving a service problem investigation request sent by the test terminal.
In this embodiment, the execution body may receive a service problem investigation request sent by the test terminal. The service problem investigation request may include a service type and an input parameter corresponding to the service problem to be investigated. Here, the input parameter may be a parameter for input into an interface packaged with the investigation method.
Step 206, calling the target interface corresponding to the service type.
Step 207, input parameters are input to the target interface, and the investigation result output by the target interface is obtained.
And step 208, returning the checking result to the test terminal.
It should be noted that, in the present embodiment, the steps 205 to 208 may refer to the steps 101 to 104 of the corresponding embodiment in fig. 1, and are not described herein.
As can be seen from fig. 2, compared with the embodiment corresponding to fig. 1, the flow 200 of the testing method in this embodiment involves the steps of setting the data source, the investigation order and the investigation method corresponding to each service type based on the history service problem and the history investigation result. Therefore, the scheme described in this embodiment can automatically execute the corresponding investigation method according to the service type, and locate the abnormal data in at least one data source according to the corresponding investigation sequence. Compared with the mode of manually conducting problem investigation in the prior art, the method can reduce labor cost and improve problem investigation efficiency.
With further reference to fig. 3, as an implementation of the method shown in the foregoing figures, the present application provides an embodiment of a testing apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 1, and the apparatus is particularly applicable to various electronic devices.
As shown in fig. 3, the test apparatus 300 according to the present embodiment includes: a receiving unit 301, configured to receive a service problem investigation request sent by a test terminal, where the service problem investigation request includes a service type and an input parameter corresponding to a service problem to be investigated; the calling unit 302 is configured to call a target interface corresponding to the service type, wherein the target interface is packaged with a preset checking method, the checking method is used for indicating to execute at least one abnormal data positioning method according to a preset sequence, and different abnormal data positioning methods are used for positioning abnormal data in different data sources; an input unit 303 configured to input the input parameter to the target interface, and obtain an inspection result output by the target interface, where the inspection result includes data source information including abnormal data; and a return unit 304 configured to return the above-mentioned investigation result to the test terminal.
In some optional implementations of this embodiment, the apparatus further includes: an acquisition unit configured to acquire an abnormal data positioning method of each data source; the setting unit is configured to set the data sources corresponding to the service types and the investigation sequence of the data sources; the creation unit is configured to create an investigation method corresponding to each service type based on the abnormal data positioning method of the data source corresponding to each service type and the investigation sequence of the data source respectively; and the packaging unit is configured to package the investigation methods corresponding to the different service types into different interfaces respectively.
In some optional implementations of this embodiment, the setting unit is further configured to: acquiring historical service problems meeting preset conditions; inquiring a history checking result corresponding to each history service problem, wherein the history checking result comprises history data source information with abnormal data; dividing the acquired history checking result according to the service type; and determining the data sources corresponding to the service types and the investigation sequence of the data sources based on the historical data source information in the historical investigation results corresponding to the service types.
In some optional implementations of this embodiment, the setting unit is further configured to: for each service type, the following steps are performed: taking each historical data source information in the historical investigation result corresponding to the service type as target historical data source information, and taking the data source indicated by each target historical data source information as the data source corresponding to the service type; and sequencing the target historical data source information according to the sequence of the occurrence times from large to small, and taking the sequence of the target historical data source information as the investigation sequence of the corresponding data source.
In some optional implementations of this embodiment, the apparatus further includes: a determining unit configured to determine whether a user who transmits the service problem investigation request has investigation authority for the service problem of the service type, as a target user; and the execution unit is configured to execute the step of calling the target interface corresponding to the service type if the target user has the checking authority of the service problem of the service type.
In some optional implementations of this embodiment, the return unit is further configured to: taking the data source information in the checking result as target data source information, and determining whether the target user has the checking authority on the target data source information; and if the target user has the checking authority for the target data source information, returning the checking result to the test terminal.
According to the device provided by the embodiment of the application, the service type and the input parameters corresponding to the service problem to be inspected are obtained by receiving the service problem inspection request sent by the test terminal; and then, calling a target interface corresponding to the service type, inputting the input parameters to the target interface, and obtaining an investigation result output by the target interface, thereby finally returning the investigation result to the test terminal. Because the target interface is packaged with the preset checking method, the checking method can be used for indicating to execute at least one abnormal data positioning method according to the preset checking sequence, and the abnormal data in different data sources can be positioned by the different data positioning methods, so that the abnormal data in at least one data source can be automatically positioned according to the corresponding checking sequence according to the service type. Compared with the mode of manually conducting problem investigation in the prior art, the method can reduce labor cost and improve problem investigation efficiency.
Referring now to FIG. 4, a schematic diagram of a computer system 400 suitable for use in implementing the electronic device of the present embodiments is shown. The electronic device shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments herein.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In RAM 403, various programs and data required for the operation of system 400 are also stored. The CPU401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output portion 407 including a Liquid Crystal Display (LCD) or the like, a speaker or the like; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. The drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 409 and/or installed from the removable medium 411. The above-described functions defined in the method of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 401. It should be noted that, the computer readable medium described in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, 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 of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units may also be provided in a processor, wherein the names of the units do not in some cases constitute a limitation of the unit itself.
As another aspect, the present application also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: receiving a service problem investigation request sent by a test terminal, wherein the service problem investigation request comprises a service type and an input parameter corresponding to a service problem to be investigated; invoking a target interface corresponding to the service type, wherein the target interface is packaged with a preset checking method, the checking method is used for indicating to execute at least one abnormal data positioning method according to a preset sequence, and different abnormal data positioning methods are used for positioning abnormal data in different data sources; inputting the input parameters to a target interface to obtain an investigation result output by the target interface, wherein the investigation result comprises data source information of abnormal data; and returning the checking result to the test terminal.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the invention referred to in this application is not limited to the specific combinations of features described above, but it is intended to cover other embodiments in which any combination of features described above or equivalents thereof is possible without departing from the spirit of the invention. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.

Claims (12)

1. A method of testing, the method comprising:
acquiring an abnormal data positioning method of each data source;
setting data sources corresponding to each service type and checking sequence of the data sources;
creating an investigation method corresponding to each service type based on the abnormal data positioning method of the data source corresponding to each service type and the investigation sequence of the data source;
packaging the investigation methods corresponding to different service types into different interfaces respectively;
receiving a service problem investigation request sent by a test terminal, wherein the service problem investigation request comprises a service type and an input parameter corresponding to a service problem to be investigated;
invoking a target interface corresponding to the service type, wherein the target interface is packaged with a preset checking method, the checking method is used for indicating to execute at least one abnormal data positioning method according to a preset sequence, and different abnormal data positioning methods are used for positioning abnormal data in different data sources;
inputting the input parameters to the target interface to obtain an investigation result output by the target interface, wherein the investigation result comprises data source information with abnormal data;
and returning the checking result to the test terminal.
2. The method of claim 1, wherein the setting the data source and the investigation order of the data sources corresponding to each service type includes:
acquiring historical service problems meeting preset conditions;
inquiring a history checking result corresponding to each history service problem, wherein the history checking result comprises history data source information with abnormal data;
dividing the acquired history checking result according to the service type;
and determining the data sources corresponding to the service types and the investigation sequence of the data sources based on the historical data source information in the historical investigation results corresponding to the service types.
3. The method according to claim 2, wherein determining the data source corresponding to each service type and the investigation order of the data sources based on the historical data source information in the historical investigation result corresponding to each service type comprises:
for each service type, the following steps are performed:
taking each historical data source information in the historical investigation result corresponding to the service type as target historical data source information, and taking the data source indicated by each target historical data source information as the data source corresponding to the service type;
and sequencing the target historical data source information according to the sequence of the occurrence times from large to small, and taking the sequence of the target historical data source information as the investigation sequence of the corresponding data source.
4. The method of claim 1, wherein prior to said invoking the target interface corresponding to the service type, the method further comprises:
a user sending the service problem investigation request is taken as a target user, and whether the target user has investigation authority for the service problem of the service type is determined;
and if the target user has the investigation authority for the service problems of the service type, executing the step of calling the target interface corresponding to the service type.
5. The method of claim 1, wherein the returning the inspection result to the test terminal comprises:
taking the data source information in the investigation result as target data source information, and determining whether a target user has viewing authority for the target data source information;
and if the target user has the viewing authority of the target data source information, returning the checking result to the test terminal.
6. A test apparatus, the apparatus comprising:
an acquisition unit configured to acquire an abnormal data positioning method of each data source;
the setting unit is configured to set the data sources corresponding to the service types and the investigation sequence of the data sources;
the creation unit is configured to create an investigation method corresponding to each service type based on the abnormal data positioning method of the data source corresponding to each service type and the investigation sequence of the data source respectively;
the packaging unit is configured to package the investigation methods corresponding to different service types into different interfaces respectively;
the system comprises a receiving unit, a testing terminal and a judging unit, wherein the receiving unit is configured to receive a service problem checking request sent by the testing terminal, and the service problem checking request comprises a service type and an input parameter corresponding to a service problem to be checked;
the calling unit is configured to call a target interface corresponding to the service type, the target interface is packaged with a preset checking method, the checking method is used for indicating to execute at least one abnormal data positioning method according to a preset sequence, and different abnormal data positioning methods are used for positioning abnormal data in different data sources;
the input unit is configured to input the input parameters to the target interface to obtain an investigation result output by the target interface, wherein the investigation result comprises data source information with abnormal data;
and the return unit is configured to return the checking result to the test terminal.
7. The apparatus of claim 6, wherein the setting unit is further configured to:
acquiring historical service problems meeting preset conditions;
inquiring a history checking result corresponding to each history service problem, wherein the history checking result comprises history data source information with abnormal data;
dividing the acquired history checking result according to the service type;
and determining the data sources corresponding to the service types and the investigation sequence of the data sources based on the historical data source information in the historical investigation results corresponding to the service types.
8. The apparatus of claim 7, wherein the setting unit is further configured to:
for each service type, the following steps are performed:
taking each historical data source information in the historical investigation result corresponding to the service type as target historical data source information, and taking the data source indicated by each target historical data source information as the data source corresponding to the service type;
and sequencing the target historical data source information according to the sequence of the occurrence times from large to small, and taking the sequence of the target historical data source information as the investigation sequence of the corresponding data source.
9. The apparatus of claim 6, wherein the apparatus further comprises:
a determining unit configured to determine whether a user who transmits the service problem investigation request has investigation authority for the service problem of the service type, as a target user;
and the execution unit is configured to execute the step of calling the target interface corresponding to the service type if the target user has the investigation authority of the service problem of the service type.
10. The apparatus of claim 6, wherein the return unit is further configured to:
taking the data source information in the investigation result as target data source information, and determining whether a target user has viewing authority for the target data source information;
and if the target user has the viewing authority of the target data source information, returning the checking result to the test terminal.
11. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-5.
12. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
CN201911405941.2A 2019-12-30 2019-12-30 Test method, test device, electronic equipment and computer readable medium Active CN111221727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911405941.2A CN111221727B (en) 2019-12-30 2019-12-30 Test method, test device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911405941.2A CN111221727B (en) 2019-12-30 2019-12-30 Test method, test device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN111221727A CN111221727A (en) 2020-06-02
CN111221727B true CN111221727B (en) 2024-03-08

Family

ID=70827968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911405941.2A Active CN111221727B (en) 2019-12-30 2019-12-30 Test method, test device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN111221727B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849362B (en) * 2020-06-28 2024-06-04 腾讯科技(深圳)有限公司 Business service platform management method, device and computer readable storage medium
CN113760696A (en) * 2020-07-01 2021-12-07 北京沃东天骏信息技术有限公司 Program problem positioning method and device, electronic equipment and storage medium
CN112148783A (en) * 2020-09-28 2020-12-29 微医云(杭州)控股有限公司 Data exchange method, device and equipment
CN112215501B (en) * 2020-10-15 2021-11-26 拉扎斯网络科技(上海)有限公司 Method and device for generating problem troubleshooting flow data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958992A (en) * 2017-05-18 2018-12-07 北京京东尚科信息技术有限公司 test method and device
WO2019153592A1 (en) * 2018-02-06 2019-08-15 平安科技(深圳)有限公司 User authority data management device and method, and computer readable storage medium
CN110597651A (en) * 2019-09-18 2019-12-20 深圳前海微众银行股份有限公司 Method, device and equipment for troubleshooting business anomaly and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958992A (en) * 2017-05-18 2018-12-07 北京京东尚科信息技术有限公司 test method and device
WO2019153592A1 (en) * 2018-02-06 2019-08-15 平安科技(深圳)有限公司 User authority data management device and method, and computer readable storage medium
CN110597651A (en) * 2019-09-18 2019-12-20 深圳前海微众银行股份有限公司 Method, device and equipment for troubleshooting business anomaly and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王勇利 ; 李军锋 ; .基于业务流程分析的船舶信息系统接口测试设计模式研究.硅谷.2015,(第01期),全文. *

Also Published As

Publication number Publication date
CN111221727A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN111221727B (en) Test method, test device, electronic equipment and computer readable medium
CN108197036B (en) Method and apparatus for determining coverage information for incremental codes
CN109684188B (en) Test method and device
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
CN109840192B (en) Method and device for automatic testing
CN114281663A (en) Test processing method, test processing device, electronic equipment and storage medium
CN113420010B (en) Database management method, device, electronic equipment and storage medium
CN107562629B (en) Method and device for testing
CN113360365B (en) Flow test method and flow test system
CN114721943A (en) Method and device for determining test range
CN112084114A (en) Method and apparatus for testing an interface
CN113127362A (en) Object testing method, object testing device, electronic device, and readable storage medium
CN108287792B (en) Method and apparatus for outputting information
CN111694556A (en) Verification method and system, computer system and medium
CN112783753B (en) Testing method and device for stream data processing system
CN112749767B (en) Article inspection method and apparatus
CN113268417B (en) Task execution method and device
CN115484200B (en) Buried point testing method, buried point testing device, server, storage medium and buried point testing system
CN117152861A (en) Automatic inspection method, device, electronic equipment and computer readable medium
CN116257432A (en) Service system testing method and device
CN114911770A (en) Method, device, equipment and medium for evaluating database migration
CN115857994A (en) IPv6 protocol-based automatic application program delivery method and device
CN116107908A (en) Unit test code generation method and device
CN114780429A (en) Method, device and equipment for determining code coverage rate and storage medium
CN118312695A (en) Page display method and device

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