A testing method, device, electronic equipment and medium

By automatically modifying the test script based on the identification information of the target business line, automatic and efficient testing of multiple business lines is achieved, and the problem of poor applicability of test scripts in the existing technology is solved, and the stability and effectiveness of the test are improved.

CN113127358BActive Publication Date: 2024-11-08BEIJING INKE CHEESE NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110440980.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2024-11-08
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

The existing business line automation regression test script cannot be fully applicable to other business lines, resulting in the risk of increasing defects and service stability that cannot be guaranteed, especially when middle-end services are modified, all business lines need to be regression tested.

Method used

By determining the request header information of the test request and the target business line identification information in the test script based on the identification of the target business line to be tested, requesting the interface data of the target business line, and running the test script in the target server to perform the target business line Testing to realize automatic and efficient multi-business line testing.

Benefits of technology

Automatic and efficient testing of multiple business lines is realized, which reduces the risk of test script modification, improves the stability and effectiveness of tests, and solves the problem of poor universality of test methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113127358B_ABST
    Figure CN113127358B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a testing method, device, electronic device and medium, which relate to the field of computer technology. The method includes: determining the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested; requesting the interface data of the target business line according to the request header information; in the target server deployed by the target business line, running the test script including the target business line identification information to test the target business line according to the interface data. The above scheme solves the current problems of difficulty in realizing automatic and efficient testing for multiple business lines and poor versatility of the testing methods, and realizes automatic modification of the identification information in the test script according to the identification of the target business to be tested to test the target business line, thereby realizing automatic and efficient testing of multiple business lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a testing method, device, electronic equipment and medium. Background Art

[0002] Currently, the middle-office service is connected to the company's various innovative products, and it is necessary to ensure the service stability of each innovative business line. Once a new product line is connected, it is necessary to return to the existing service in the new product line, and if the middle-office service is modified, all business lines need to be regressed and tested again.

[0003] The current business line automated regression test scripts cannot be fully applied to other business lines. When performing regression tests on other business lines, the scripts need to be modified, increasing the risk of defects. Moreover, without regular service inspections of each business line, the stability of the service cannot be guaranteed. Summary of the invention

[0004] Embodiments of the present invention provide a testing method, device, electronic device and medium to achieve automatic and efficient testing of multiple business lines.

[0005] In one embodiment, the present application provides a testing method, the method comprising:

[0006] Determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested;

[0007] Requesting interface data of the target service line according to the request header information;

[0008] In the target server where the target business line is deployed, a test script including the target business line identification information is run according to the interface data to test the target business line.

[0009] In another embodiment, the present application also provides a testing device, the device comprising:

[0010] A request header information determination module, used to determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested;

[0011] An interface data request module, used to request the interface data of the target service line according to the request header information;

[0012] An operation module is used to run a test script including target business line identification information in a target server deployed on the target business line according to the interface data to test the target business line.

[0013] In yet another embodiment, the present application also provides an electronic device, including: one or more processors;

[0014] A memory for storing one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the testing method described in any one of the embodiments of the present application.

[0016] In yet another embodiment, the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the test method described in any one of the embodiments of the present application is implemented.

[0017] In an embodiment of the present application, the request header information of the test request and the target business line identification information in the test script are determined according to the identification of the target business line to be tested; the interface data of the target business line is requested according to the request header information; in the target server deployed by the target business line, the test script including the target business line identification information is run according to the interface data to test the target business line. The above scheme solves the current problems of difficulty in realizing automatic and efficient testing for multiple business lines and poor universality of the testing methods, and realizes automatic modification of the identification information in the test script according to the identification of the target business to be tested to test the target business line, thereby realizing automatic and efficient testing of multiple business lines. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flow chart of a testing method provided by an embodiment of the present invention;

[0019] Figure 2 A flow chart of a testing method provided by another embodiment of the present invention;

[0020] Figure 3 A schematic diagram of the structure of a testing device provided by an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0023] Figure 1A flowchart of a test method provided by an embodiment of the present invention. The test method provided by the embodiment of the present application is applicable to the case of testing multiple business lines. Typically, the embodiment of the present application is applicable to the case of testing multiple business lines through a set of test scripts. The method can be specifically executed by a test device, which can be implemented by software and / or hardware, and the device can be integrated in an electronic device that can implement the test method. See Figure 1 , the method of the embodiment of the present application specifically includes:

[0024] S110 . Determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested.

[0025] Among them, the target business line can be one of the pre-selected business lines that need to be tested, and is the business line that is about to be tested among the business lines that need to be tested. The identifier is used to uniquely mark each business line, such as the App_Key of the business line. The test request is used to request testing of the target business line. The request header information is used to identify which business line is currently to be tested. The test script is a series of instructions for a specific test, and these instructions can be executed by an automated testing tool. The test script includes identification information of the target business line to be tested. For different target business lines tested, the identification information in the test script is different. When testing the current target business line, the identification information in the test script needs to be modified to the identification information corresponding to the current target business line to be tested. The identification information in the test script can be determined based on the identification of the target business line.

[0026] Exemplarily, for the target business line to be tested, the identifier of the target business line is determined, and based on the identifier of the target business line, the request header information in the test request and the target business line identification information in the test script are determined. For example, the identifier of the target business line is used to replace the business line identifier in the request header information, and the identifier of the target business line is used to replace the identification information in the test script, so that the test request can identify which business line the test request is for, and the test script can effectively test the target business line based on the identification information.

[0027] S120. Request interface data of the target service line according to the request header information.

[0028] For example, when testing a target business line, it is necessary to call the interface data of the target business line to test the target business line according to the interface data to determine whether the business line can operate normally. Therefore, according to the request header information, a request is made to the interface data of the target business line in a targeted manner to effectively test the target business line according to the interface data obtained by the request.

[0029] In an embodiment of the present application, before testing the target business line, the basic data is maintained, such as managing the server side and creating services for each department, such as the middle office service. Manage modules. Create modules according to the project, such as the registration and login module, payment module, chat module, etc. under the middle office service. Create interfaces under each module, and classify the interfaces according to the modules to which they belong to facilitate query and retrieval. Manage interfaces, including debugging interfaces and creating interfaces. The debugging interface is the debugging interface function. According to the defined interface protocol, method parameters, etc., an interface request is made and the request result is viewed. According to the debugging result of the interface, an interface is directly created. Environment variable management, when testing the interface, regression testing will be performed in the production environment after the test environment test is completed, but some interface data is different in the test environment and the production environment, so environment variables are created. The environment variables create test environment values ​​and production environment values. The test case can reference the environment, and data switching between the test environment and the production environment can be realized. Data source management: When testing an interface, you may need to read the database or verify the database value. The basic connection information of the database can be created in the data source, and the basic connection information can use environment variables to implement the database switching function between the test environment and the production environment. Through the above maintenance of basic data, the interface data can be effectively called during the test of the target business line.

[0030] S130. In a target server where the target business line is deployed, run a test script including target business line identification information according to the interface data to test the target business line.

[0031] Exemplarily, each target business line corresponds to a target server deployed therein, for example, the target business line of company A is deployed on target server a, and the target service line of company B is deployed on target server b. When testing the target server, it is necessary to run the test in the target server where the target business line is deployed. Therefore, in the target server where the target business line is deployed, the test script including the target business line information is run according to the interface data to test the target business line.

[0032] In an embodiment of the present application, the request header information of the test request and the target business line identification information in the test script are determined according to the identification of the target business line to be tested; the interface data of the target business line is requested according to the request header information; in the target server deployed by the target business line, the test script including the target business line identification information is run according to the interface data to test the target business line. The above scheme solves the current problems of difficulty in realizing automatic and efficient testing for multiple business lines and poor universality of the testing methods, and realizes automatic modification of the identification information in the test script according to the identification of the target business to be tested to test the target business line, thereby realizing automatic and efficient testing of multiple business lines.

[0033] Figure 2 This is a flow chart of a test method provided by another embodiment of the present invention. This embodiment of the present application is a further optimization of the above embodiment. For details not described in detail in the embodiment of the present application, please refer to the above embodiment. Figure 2 , the testing method provided in the embodiment of the present application may include:

[0034] S210. Set different identifiers for different business lines to adjust the test scripts according to the different identifiers.

[0035] Exemplarily, before testing the target business line, different identifiers are set for different business lines to uniquely identify different business lines. And according to the identifiers of different business lines, the relevant information of the target business line to be tested in the test script is adjusted so that the test script can be applied to test the target business line.

[0036] S220. Determine the servers deployed by different business lines.

[0037] Since different business lines do not belong to different servers, for example, business line A is deployed on server a, and business line B is deployed on server b. Before testing the target server, it is necessary to determine the servers deployed by different business lines, so that when testing the target business line, the server deployed by the target business line can be determined, so that the target business line can be tested in the server deployed by the target business line.

[0038] S230, traverse and test the selected target servers.

[0039] The target server is the test environment to be tested. In the embodiment of the present application, the test environment to be tested is first determined, such as server A, server B, and server C. For the target servers that have been determined to be tested, the target servers are traversed to determine the business lines deployed in each target server.

[0040] S240: Use the business line deployed in the currently traversed target server as the target business line.

[0041] For example, for a target server, not all business lines may be deployed. In the process of traversing the target servers, the business line deployed in the currently traversed target server is used as the target business line.

[0042] In an embodiment of the present application, the business line deployed in the currently traversed target server is taken as the target business line, including: determining whether there is a business line deployed in the target server based on servers deployed with different business lines in advance; and determining the business line deployed in the target server as the target business line.

[0043] For example, for a business line that has been determined to be tested, the server where the business line is deployed can be queried. When traversing the target server, for the currently traversed target server, determine which business lines are deployed in the server, so that the business line deployed in the server is used as the target business line.

[0044] S250: Determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested.

[0045] S260. Request interface data of the target service line according to the request header information.

[0046] S270: In the target server where the target business line is deployed, run a test script including target business line identification information according to the interface data to test the target business line.

[0047] In the embodiment of the present application, before testing the target business line, test management is also required, such as task management, that is, creating tasks and formulating test work for testers. Execution flow management, creating test execution information. The execution flow includes pre / post operations, interface use cases and checkpoints, etc. Pre / post operations can define temporary variables, and the life cycle of temporary variables is limited to the execution period of the execution flow. The variable value can be directly declared, or temporary variables can be defined according to the response of the interface or the data of the database, so as to realize mutual calls and data references between interfaces, and the function functions provided by the system can also be called. The interface use case can reference the interface (the interface defined in the interface management), and then modify the interface parameters to define the test case. The checkpoint can check the return value of the interface (based on the response of the previous interface) and the database information (reading the database through the data source). To execute the test, you can query the test execution flow, check the execution flow to be executed or directly execute all query result sets to execute the test. During execution, you can select the execution environment, such as: test environment, production environment. After the test is completed, you can view the test results, and both successful and failed use cases can be viewed directly. By clicking on a successful / failed use case, you can view the execution process information of each execution component, making it easier to locate the problem.

[0048] In an embodiment of the present application, in the target server where the target business line is deployed, before running the test script including the target business line identification information to test the target business line according to the interface data, it also includes: pre-setting the execution time for running the test script to test the target business line; in the target server where the target business line is deployed, running the test script including the target business line identification information to test the target business line according to the interface data, including: running the test script to test the target business line according to the pre-set execution time.

[0049] For example, in order to perform a timed test on the target business line to meet the test time requirement, the execution time for running the test script to test the target business line can be preset, and the execution time can be configured through controls or manually. In the target server where the target business line is deployed, the test script is run according to the preset execution time to test the target business line, thereby achieving a timed test on the target business line.

[0050] In an embodiment of the present application, in the target server where the target business line is deployed, a test script including target business line identification information is run according to the interface data to test the target business line, including: in the target server where the target business line is deployed, a preset number of test cases are run in sequence according to the interface data to test the target business line.

[0051] Among them, the preset number can be set according to the actual situation. A test case refers to a description of a test task for a specific software product, reflecting the test plan, method, technology and strategy. Its content includes test objectives, test environment, input data, test steps, expected results, test scripts, etc., which ultimately form a test execution flow. Simply put, a test case is a set of test inputs, execution conditions and expected results compiled for a special goal, which is used to verify whether a specific software requirement is met. For example, the number of test cases set for the target business line test. When testing the target business line, the preset number of test cases are run in sequence to determine whether the target business line can successfully execute each test case and realize each function.

[0052] In the embodiment of the present application, the method further includes: sending the test result of the target business line to the recipient according to the preset recipient information.

[0053] For example, the recipient information is set, and after the test of the target business line is completed, the test results of the target business line are automatically sent to the recipient, so that the recipient can click the link to view the execution results in the email to open the detailed information of this execution job. In the execution result overview, you can view the creation status of interfaces and use cases, such as: the total number of interfaces, the total number of use cases, the coverage rate of interface use cases, the creation status in the past 7 days, the test execution success rate, etc.

[0054] The solution in the embodiment of the present application sets different identifiers for different business lines, adjusts the test script according to the different identifiers, and determines the servers deployed by different business lines. According to the identifier of the target business line to be tested, the request header information of the test request and the target business line identification information in the test script are determined, thereby realizing automatic testing of multiple business lines through one test script, without the need to manually modify the test script, reducing the risk of problems caused by the modification, and improving the stability and effectiveness of the test.

[0055] Figure 3 This is a schematic diagram of the structure of a test device provided by an embodiment of the present invention. The device can be applied to the case of testing multiple business lines. Typically, the embodiment of the present application is applicable to the case of testing multiple business lines through a set of test scripts. The device can be implemented by software and / or hardware, and the device can be integrated in an electronic device. Figure 3 , the device specifically comprises:

[0056] The request header information determination module 310 is used to determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested;

[0057] An interface data request module 320, configured to request the interface data of the target service line according to the request header information;

[0058] The running module 330 is used to run a test script including target business line identification information in a target server deployed on the target business line according to the interface data to test the target business line.

[0059] In the embodiment of the present application, the device further includes:

[0060] An adjustment module is used to set different identifiers for different business lines so as to adjust the test scripts according to the different identifiers;

[0061] The business line deployment module is used to determine the servers deployed by different business lines.

[0062] In the embodiment of the present application, the device further includes:

[0063] The traversal module is used to traverse the selected target server for testing;

[0064] The target business line determination module is used to take the business line deployed in the currently traversed target server as the target business line.

[0065] In an embodiment of the present application, the target business line determination module includes:

[0066] A determination unit, configured to determine whether there is a business line deployed in the target server according to the predetermined servers deployed by different business lines;

[0067] The business line determination unit is used to determine the business line deployed in the target server as a target business line.

[0068] In the embodiment of the present application, the device further includes:

[0069] An execution time setting module is used to pre-set the execution time of running the test script to test the target business line;

[0070] The operation module 330 is specifically used for:

[0071] Run the test script to test the target business line according to the pre-set execution time.

[0072] In the embodiment of the present application, the operation module 330 is specifically used to:

[0073] In the target server deployed on the target business line, a preset number of test cases are sequentially run according to the interface data to test the target business line.

[0074] In the embodiment of the present application, the device further includes:

[0075] The recipient information determination module is used to send the test result of the target business line to the recipient according to the preset recipient information.

[0076] The testing device provided in the embodiments of the present application can execute the testing method provided in any embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method.

[0077] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 A block diagram of an exemplary electronic device 412 suitable for implementing embodiments of the present application is shown. Figure 4 The electronic device 412 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0078] like Figure 4As shown, the electronic device 412 may include: one or more processors 416; a memory 428, which is used to store one or more programs. When the one or more programs are executed by the one or more processors 416, the one or more processors 416 implement the test method provided in the embodiment of the present application, including:

[0079] Determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested;

[0080] Requesting interface data of the target service line according to the request header information;

[0081] In the target server where the target business line is deployed, a test script including the target business line identification information is run according to the interface data to test the target business line.

[0082] Components of the electronic device 412 may include, but are not limited to, one or more processors or processor 416 , memory 428 , and a bus 418 that connects the various device components (including the memory 428 and the processor 416 ).

[0083] Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, a Processor-Type ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0084] The electronic device 412 typically includes a variety of computer-readable storage media. These storage media can be any available storage media that can be accessed by the electronic device 412, including volatile and non-volatile storage media, removable and non-removable storage media.

[0085] The memory 428 may include computer device readable storage media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. The electronic device 412 may further include other removable / non-removable, volatile / non-volatile computer device storage media. By way of example only, the storage system 434 may be used to read and write non-removable, non-volatile magnetic storage media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical storage medium) may be provided. In these cases, each drive may be connected to bus 418 via one or more data storage medium interfaces. Memory 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0086] A program / utility 440 having a set (at least one) of program modules 442 may be stored, for example, in the memory 428, such program modules 442 including, but not limited to, operating devices, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 442 generally perform the functions and / or methods of the embodiments described herein.

[0087] The electronic device 412 may also communicate with one or more external devices 414 (e.g., keyboards, pointing devices, displays 424, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 412, and / or may communicate with any device that enables the electronic device 412 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 422. Furthermore, the electronic device 412 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 420. Figure 4 As shown, the network adapter 420 communicates with other modules of the electronic device 412 via the bus 418. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 412, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, and data backup storage devices.

[0088] The processor 416 executes various functional applications and data processing by running at least one of the other programs among the multiple programs stored in the memory 428, such as implementing a testing method provided in an embodiment of the present application.

[0089] An embodiment of the present invention provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to perform a test method when executed by a computer processor, including:

[0090] Determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested;

[0091] Requesting interface data of the target service line according to the request header information;

[0092] In the target server where the target business line is deployed, a test script including the target business line identification information is run according to the interface data to test the target business line.

[0093] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable storage media. The computer-readable storage medium can be a computer-readable signal storage medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor equipment, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present application, a computer-readable storage medium can be any tangible storage medium containing or storing a program, which can be used by an instruction execution device, device or device or used in combination with it.

[0094] A computer-readable signal storage medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal storage medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution device, apparatus, or device.

[0095] The program code contained on the computer-readable storage medium may be transmitted using any appropriate storage medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0096] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0097] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A testing method, characterized in that: The method comprises: Set different identifiers for different business lines to adjust the test scripts according to different identifiers; Determine the servers deployed by different business lines; Determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested; wherein the target business line is one of the pre-selected business lines to be tested; and for different target business lines, the identification information in the test script is different; Requesting interface data of the target service line according to the request header information; Presetting an execution time for running the test script to test the target business line; In the target server where the target business line is deployed, a test script including target business line identification information is run according to the interface data to test the target business line, including: according to the pre-set execution time, the test script is run to test the target business line; wherein the target server is a test environment for testing.

2. The method according to claim 1, characterized in that Before determining the request header information of the test request and the business line identification information in the test script according to the identification of the target business line to be tested, the method further includes: Traverse the selected target servers for testing; The business line deployed in the currently traversed target server is used as the target business line.

3. The method according to claim 2, characterized in that The business line deployed in the currently traversed target server is used as the target business line, including: Determining whether there is a business line deployed in the target server according to the predetermined servers deployed by different business lines; The business line deployed in the target server is determined as the target business line.

4. The method according to claim 1, characterized in that: In the target server where the target business line is deployed, running a test script including the target business line identification information to test the target business line according to the interface data, including: In the target server deployed on the target business line, a preset number of test cases are sequentially run according to the interface data to test the target business line.

5. The method according to claim 1, characterized in that The method further comprises: According to the preset recipient information, the test result of the target business line is sent to the recipient.

6. A testing device, characterized in that: The device comprises: An adjustment module is used to set different identifiers for different business lines so as to adjust the test scripts according to the different identifiers; The business line deployment module is used to determine the servers deployed by different business lines; A request header information determination module, used to determine the request header information of the test request and the target business line identification information in the test script according to the identification of the target business line to be tested; wherein the target business line is one of the pre-selected business lines to be tested; for different target business lines, the identification information in the test script is different; An interface data request module, used to request the interface data of the target service line according to the request header information; An execution time setting module, used to pre-set the execution time for running the test script to test the target business line; An operation module, configured to run a test script including target business line identification information in a target server deployed by the target business line according to the interface data to test the target business line; wherein the target server is a test environment for testing; The running module is specifically used to run the test script to test the target business line according to the preset execution time.

7. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the testing method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the testing method according to any one of claims 1 to 5 is implemented.