Full-link test method and device

By splitting the full-link test into tests of each constituent node and using pre-set interactive interfaces to conduct internal node testing, the problem of full-link test time in the existing technology is solved, and a more efficient test process is achieved.

CN119537192APending Publication Date: 2025-02-28BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310987494.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-07
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In software project testing, when there are many constituent nodes and the execution time is long, it is difficult for the existing technology to realize separate testing of internal constituent nodes, resulting in a long time-consuming and affecting efficiency.

Method used

Split the full-link test into tests for each constituent node, and realize the test of the internal constituent nodes through a pre-set interactive interface, and conduct full-link review tests after each node test is passed.

Benefits of technology

It effectively solves the problem that internal components of the node cannot be tested separately, avoids repeated full-link testing caused by node testing exceptions, shortens the test time and improves efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537192A_ABST
    Figure CN119537192A_ABST
Patent Text Reader

Abstract

The invention discloses a full-link testing method and device, and relates to the technical field of software testing. A specific embodiment of the method comprises the following steps: in response to a received full-link test request of an application program, obtaining composition nodes of a full link, and carrying out node test on each composition node; for internal composition nodes without interactive interfaces in the composition nodes, receiving node test requests and corresponding script files through the interactive interfaces preset in the application program, and executing the script files in the interactive interfaces so as to perform node tests on the internal composition nodes; and under the condition that the node test of each component node is passed, performing a recheck test on the full link of the application program. According to the embodiment, the node test can be flexibly performed on each composition node in the application program through the preset interactive interface, and the full-link recheck test is performed when each composition node passes the test, so that the test duration is effectively shortened, and the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to a method and device for full-link testing. Background Art

[0002] With the rapid development of computer technology, the scale and complexity of software projects have also increased. Software project testing, as one of the important means to discover software defects, plays a very important role in the entire software development cycle. Currently, in the testing of software projects, full-link testing is usually required based on the purpose and environment of the test.

[0003] In the process of implementing the present invention, the inventors found that the prior art has the following problems:

[0004] When there are many nodes in a software project and the execution time of the nodes is long, for example, in online trading scenarios, the user transaction application includes order nodes, settlement nodes, receipt confirmation nodes, after-sales nodes, preferential rights collection nodes, preferential rights message reminder nodes, etc., not every node has an external interactive interface, and the method of interface testing is not universally applicable; and the method of node testing by modifying the input data of a certain node cannot test the related code triggered by the data; even if white box testing is used, it will consume resources and time costs, and have high technical requirements for testers. In this case, if there is a problem with a node in the link, it may be necessary to retest from the starting node of the link, resulting in a long test time and affecting the test efficiency. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and device for full-link testing, which splits the full-link test into tests of each component node, implements node testing of internal component nodes through a pre-set interactive interface, and performs a full-link review test when each node test passes. This solves the problem that internal component nodes cannot perform node testing independently, thereby avoiding the problem of repeatedly re-performing full-link testing due to abnormal node testing of internal component nodes, effectively shortening the full-link test time and improving test efficiency.

[0006] To achieve the objective, according to one aspect of an embodiment of the present invention, a method for full-link testing is provided, including:

[0007] In response to receiving a full-link test request from an application, obtaining component nodes of the full link, and performing a node test on each of the component nodes;

[0008] For each of the component nodes that has no interactive interface, receiving a node test request and a corresponding script file through an interactive interface preset in the application, and executing the script file in the interactive interface to perform a node test on the internal component node;

[0009] When the node tests of the constituent nodes are passed, the entire link of the application is reviewed and tested.

[0010] Optionally, before receiving a node test request through an interactive interface pre-set within an application, the method further includes: generating an interactive interface code for creating the interactive interface, packaging the interactive interface code to obtain a load injection package, and injecting the load injection package into the application to create the interactive interface within the application.

[0011] Optionally, generating an interactive interface code for creating the interactive interface includes: determining the interface type of the interactive interface to be established based on the deployment environment of the application; generating an interactive interface code corresponding to the interface type, and encapsulating a script engine for executing the script file within the interactive interface code.

[0012] Optionally, the interactive interface code is packaged to obtain a loading and injection package, including: performing a first packaging process on the files of the interactive interface code to obtain an interactive interface package; using probe technology to load the interactive interface package through a class loader to obtain a probe file; and performing a second packaging process on the probe file to obtain the loading and injection package.

[0013] Optionally, before loading the interactive interface package through a class loader, the method further includes: adding the interactive interface package to a specified class path so that the class loader can load it.

[0014] Optionally, injecting the loading injection package into the application includes: in response to a startup operation of the application, injecting the loading injection package into the application via a command line.

[0015] Optionally, the interactive interface code includes a script engine; executing the script file in the interactive interface includes: calling the code of the internal component node through the script engine to execute the method involved in the script file.

[0016] According to a second aspect of an embodiment of the present invention, a device for full-link testing is provided, including:

[0017] A component node acquisition module, configured to, in response to receiving a full-link test request from an application, acquire the component nodes of the full link and perform a node test on each of the component nodes;

[0018] An internal component node testing module, for receiving a node test request and a corresponding script file through an interactive interface preset in the application program for each internal component node without an interactive interface among the component nodes, and executing the script file in the interactive interface to perform a node test on the internal component node;

[0019] The full-link verification test module is used to conduct a verification test on the full link of the application program when the node test of each of the component nodes passes.

[0020] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for full-link testing, characterized in that it includes:

[0021] one or more processors;

[0022] a storage device for storing one or more programs,

[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.

[0024] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0025] An embodiment of the invention has the following advantages or beneficial effects: by responding to a full-link test request received from an application, the component nodes of the full link are obtained, and node tests are performed on each component node; for internal component nodes that do not have an interactive interface in each component node, the node test request and the corresponding script file are received through an interactive interface pre-set in the application, and the script file is executed in the interactive interface to perform node tests on the internal component nodes; when the node test of each component node passes, the technical solution of rechecking the full link of the application solves the problem that the internal component nodes cannot be tested individually, thereby avoiding the problem of repeatedly re-performing full-link tests due to abnormal node tests of internal component nodes, effectively shortening the full-link test time and improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0027] Figure 1is a schematic diagram of the main process of the full-link test method according to an embodiment of the present invention;

[0028] Figure 2 It is a schematic diagram of the composition of a probe file according to an embodiment of the present invention;

[0029] Figure 3 It is a schematic diagram of the principle of a method for node testing of an internal component node according to an embodiment of the present invention;

[0030] Figure 4 is a schematic diagram of a use scenario of a full-link test according to an embodiment of the present invention;

[0031] Figure 5 is a schematic diagram of main modules of a device for full-link testing according to an embodiment of the present invention;

[0032] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0033] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0034] It should be noted that in the technical solution of the present invention, the collection / collection, update, analysis, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken for user personal information to selectively block the use or access to personal information data to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. In addition, once these user personal information data are no longer needed, the risks should be minimized by limiting or even prohibiting data collection and / or deleting data.

[0035] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0036] In software project testing, when the project has many constituent nodes and the constituent nodes take a long time to execute, using the conventional full-link testing method, when an abnormality occurs in a constituent node, it is necessary to retest from the starting node of the link, which causes the test to be time-consuming, affects the test efficiency, and cannot meet the actual application requirements well.

[0037] In order to solve the above problems existing in the prior art, the present invention proposes a method for full-link testing, which splits the full-link test into node tests of each component node, implements the node test of the internal component nodes through a pre-set interactive interface, and performs a full-link review test when each node test passes. This solves the problem that the internal component nodes cannot perform node tests independently, thereby avoiding the problem of repeatedly re-performing full-link tests due to abnormal node tests of the internal component nodes, effectively shortening the full-link test time and improving the test efficiency.

[0038] In the introduction to the embodiments of the present invention, the terms and their meanings are as follows:

[0039] Java Agent: Also known as Java probe, it is a technology introduced in JDK1.5 that can dynamically modify Java bytecode. After Java class is compiled, bytecode is generated and executed by JVM. Before JVM executes the bytecode, it obtains the bytecode information and modifies the bytecode through bytecode converter to complete some additional functions.

[0040] Controller: The Controller layer in Spring MVC provides HTTP services to the outside world and can be accessed using HTTP.

[0041] Provider: A concept in microservices, a service provider that provides RPC calls to the outside world;

[0042] Groovy: is an agile dynamic language for the Java virtual machine.

[0043] Jar: Usually used to aggregate a large number of Java class files, related metadata and resource (text, pictures, etc.) files into one file to develop Java platform application software or libraries.

[0044] Figure 1 is a schematic diagram of the main process of the full-link test method according to an embodiment of the present invention, such as Figure 1 As shown, the full-link test method of an embodiment of the present invention includes the following steps S101 to S103.

[0045] Step S101: In response to receiving a full-link test request from an application, obtaining component nodes of the full link, and performing a node test on each of the component nodes.

[0046] Specifically, applications usually use modules or node codes as development units for software development and design, especially for applications with long business links, such as trading applications. From user orders and settlements to confirmation of receipt, after-sales, and then to the collection of trading rights and interests, the rights and interests message is reached, and the entire execution business link is very long. If the application is directly tested for the entire link, many testing problems may occur, and the various component nodes interact with each other, and the problems are not solved. Therefore, when a full-link test request is received, the component nodes of the application full-link test are obtained, and the code in each component node is tested at the node.

[0047] Step S102: For each internal component node without an interactive interface, a node test request and a corresponding script file are received through an interactive interface pre-set in the application, and the script file is executed in the interactive interface to perform a node test on the internal component node.

[0048] Specifically, the node test requires that each component node has an external interactive interface, and inquires whether each component node in the above-mentioned full link has an interactive interface. For the component nodes with interactive interfaces, the node test can be performed directly according to the corresponding script file. For the internal component nodes that do not have interactive interfaces among the component nodes of the full link, the node test request and the corresponding script file are received through the interactive interface pre-set in the application. The script file can be sent to the interactive interface as an input parameter of the node test request, or the script file can be encapsulated in the node test request according to the agreed encapsulation rules, and then the received node test request is parsed to obtain the script file corresponding to the node. The node test of the internal component node is performed by executing the corresponding script file in the interactive interface.

[0049] According to one embodiment of the present invention, before receiving a node test request through an interactive interface pre-set within an application, the method further includes: generating an interactive interface code for creating the interactive interface, packaging the interactive interface code to obtain a load injection package, and injecting the load injection package into the application to create the interactive interface within the application.

[0050] According to another embodiment of the present invention, generating an interactive interface code for creating the interactive interface includes: determining the interface type of the interactive interface to be established according to the deployment environment of the application; generating an interactive interface code corresponding to the interface type, and encapsulating a script engine for executing the script file within the interactive interface code.

[0051] Specifically, for node codes without interactive interfaces, the type of specific external interactive interface is determined according to the code and deployment environment of the application program in which it is located. For example, a web project can choose an interactive interface of the controller type that provides HTTP services to the outside, and a microservice project can choose an interactive interface of the provider type that provides RPC services to the outside, etc. The embodiment of the present invention takes the controller type as an example, creates and generates an interactive interface of the controller type by creating a new code file; considering that the interactive interface is mainly used to receive test script files and trigger the corresponding node code to test the node code by executing the script file, it is also necessary to determine the script engine of the corresponding script file according to the type of currently common script files in the created interactive interface, and encapsulate the script engine inside the interactive interface code for subsequent testing. In the embodiment of the present invention, the test script selects a Groovy script, and accordingly, the Groovy script engine is encapsulated in the created controller type interactive interface.

[0052] According to another embodiment of the present invention, the interactive interface code is packaged to obtain a loading and injection package, including: performing a first packaging process on the files of the interactive interface code to obtain an interactive interface package; using probe technology to load the interactive interface package through a class loader to obtain a probe file; and performing a second packaging process on the probe file to obtain the loading and injection package.

[0053] Specifically, based on the interactive interface code files created above, the code files are packaged. In the embodiment of the present invention, the controller type interactive interface code files are packaged into Jar package files. The packaging process enables the files in the Jar package to depend on the class files of a unified version. Moreover, the Jar package is a standard for processing embedded in the Java platform, which is convenient for direct use on various platforms.

[0054] According to yet another embodiment of the present invention, before loading the interactive interface package through a class loader, the method further includes: adding the interactive interface package to a specified class path so that the class loader can load it.

[0055] Specifically, Java Agent is an interceptor that runs before the main method. Its default method is called premain, which means that the premain method is executed first and then the main method. Before loading the controller type interaction interface Jar package through the class loader AppClassLoader, the controller type interaction interface Jar package needs to be added to the specified class path through the appendTo SystemClassLoaderSearch method of the Instrumentation API that supports dynamic changes and operations of class definitions, so that it can be loaded by the subsequent class loader AppClassLoader. Then load the controller type interaction interface Jar package through the class loader to obtain the complete code file of the Java Agent, that is, the probe file, and finally package the probe file into a Jar package file to obtain the loading injection package.

[0056] Figure 2 The premain method of the Java Agent is used to load the Jar package of the preset interactive interface through the class loader AppClassLoader before executing the main method.

[0057] According to another embodiment of the present invention, injecting the loading injection package into the application comprises: in response to a startup operation of the application, injecting the loading injection package into the application by way of a command line.

[0058] Specifically, based on the above packaging and loading processing of the interactive interface code, an interactive interface package and a loading injection package are obtained, and these two package files are placed in the local device where the application project to be tested is located, so that when the loading injection package is injected into the application, the system can find the interactive interface package and load the class loader. When starting the application project, the file name of the loading injection package is added to the startup project through the command line. For example, enter "-javaagent: the file name of the loading injection package.jar" in the startup command to inject the interactive interface code into the application project non-invasively through the Java Agent.

[0059] Furthermore, after the above-mentioned interactive interface is injected into the application, when performing node testing, the node test request is sent to the interactive interface that has been injected into the application, providing a path for the node interface testing.

[0060] According to an embodiment of the present invention, the interactive interface code includes a script engine; executing the script file in the interactive interface includes: calling the code of the internal component node through the script engine to execute the method involved in the script file.

[0061] Specifically, through the script engine corresponding to the script file encapsulated in the interactive interface, the script file in the node test request can be dynamically executed. Through the script engine, the corresponding internal node code is called from the application code, and the script text is executed in the interactive interface according to the code method involved in the script file to test the node code. There is no need to start the test from the starting node of the application.

[0062] Figure 3 It is a principle schematic diagram of the method for node testing of the internal component nodes of the embodiment of the present invention. According to the deployment environment of the application, the interactive interface code for creating the interactive interface is generated, the files of the interactive interface code are packaged to obtain the interactive interface package, and then the interactive interface package is loaded using the probe technology, and packaged into a loading injection package, which is injected into the application project, and the corresponding interactive interface is set for the node in the application; a node test request including a Groovy script file is received through the interactive interface; the Groovy script file received can be dynamically executed through the Groovy script engine encapsulated in the interactive interface to implement the test of the node code in the application.

[0063] By performing node testing on each node code included in the application, and then executing full-link testing on the application after each node code has passed the node test, you can effectively avoid the problem of software problems in individual node codes causing repeated re-testing of the full link and affecting the test time.

[0064] Figure 4 This is a schematic diagram of the use scenario of the full-link test of the embodiment of the present invention. Taking the transaction rights collection project of the Internet trading platform as an example, it includes the order placement node, the receipt confirmation node, the rights collection node (this node requires at least 1 day to wait), the rights arrival message reminder node and the rights expiration message reminder node. According to the test method of the embodiment of the present invention, any of the nodes can be tested, and the time-consuming full-link test will not be required because the individual component nodes do not have an interactive interface.

[0065] Step S103: When the node test of each of the component nodes passes, a review test is performed on the entire link of the application.

[0066] Specifically, if the node tests of all component nodes of the full link are passed, it means that all component nodes meet the node development requirements. At this time, the full link of the application is reviewed and tested, that is, the entire business execution process from the starting node to the ending node is tested as a whole to verify that the application code meets the project development requirements.

[0067] Through the full-link testing method of the embodiment of the present invention, the application can be flexibly tested based on the component nodes. After each component node is tested, the full-link overall test is performed, which solves the problem that internal component nodes cannot be tested individually, and thus avoids the problem of repeatedly re-performing full-link tests due to abnormal node tests of internal component nodes, effectively shortening the full-link test time and improving test efficiency.

[0068] Figure 5 Schematic diagram of the main modules of the device for full-link testing according to an embodiment of the present invention. Figure 5 As shown, the full-link test device 500 mainly includes a component node acquisition module 501, an internal component node test module 502 and a full-link review test module 503.

[0069] The component node acquisition module 501 is used to obtain the component nodes of the full link in response to receiving a full link test request from the application, and perform a node test on each of the component nodes;

[0070] The internal component node testing module 502 is used to receive a node test request and a corresponding script file through an interactive interface preset in the application program for each internal component node without an interactive interface among the component nodes, and execute the script file in the interactive interface to perform a node test on the internal component node;

[0071] The full-link verification test module 503 is used to perform a verification test on the full link of the application program when the node test of each of the component nodes passes.

[0072] According to one embodiment of the present invention, the device 500 for the full-link test also includes an interface creation module (not shown in the figure), which is used to: before receiving a node test request through an interactive interface pre-set in an application, generate an interactive interface code for creating the interactive interface, package the interactive interface code to obtain a load injection package, and inject the load injection package into the application to create the interactive interface in the application.

[0073] According to another embodiment of the present invention, the interface creation module (not shown in the figure) is used to: determine the interface type of the interactive interface to be established according to the deployment environment of the application; generate an interactive interface code corresponding to the interface type, and encapsulate a script engine for executing the script file inside the interactive interface code.

[0074] According to another embodiment of the present invention, the interface creation module (not shown in the figure) is also used to: perform a first packaging process on the files of the interactive interface code to obtain an interactive interface package; use probe technology to load the interactive interface package through a class loader to obtain a probe file; perform a second packaging process on the probe file to obtain the loaded injection package.

[0075] According to another embodiment of the present invention, the device 500 for full-link testing also includes a path adding module (not shown in the figure), which is used to: before loading the interaction interface package through the class loader, add the interaction interface package to the specified class path so that the class loader can load it.

[0076] According to another embodiment of the present invention, the interface creation module (not shown in the figure) is further used to: in response to the startup operation of the application, inject the loading injection package into the application by means of a command line.

[0077] According to another embodiment of the present invention, the interactive interface code includes a script engine; the internal component node testing module 502 is further used to: call the code of the internal component node through the script engine to execute the method involved in the script file.

[0078] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention can be applied.

[0079] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0080] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603, such as a full-link test application, etc. (only as an example).

[0081] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0082] The server 605 may be a server that provides various services, such as a background management server (only an example) that provides support for the full-link test performed by the user using the terminal devices 601, 602, and 603. The background management server may receive a node test request through an interactive interface pre-set in the application; obtain a script file corresponding to the node from the node test request; execute the script file in the interactive interface to test the node in the application, and feed back the processing result (such as a test result, etc. - only an example) to the terminal device.

[0083] It should be noted that the method for full-link testing provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device for full-link testing is generally arranged in the server 605 .

[0084] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0085] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 7 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0086] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0087] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0088] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.

[0089] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: 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 the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination thereof.

[0090] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0091] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be set in a processor, for example, may be described as: a processor including: a component node acquisition module, an internal component node test module and a full link review test module.

[0092] Among them, the names of these modules do not constitute a limitation of the module itself in some cases. For example, the full-link review test module can also be described as "a module used to review the full link of the application when the node tests of each of the component nodes pass."

[0093] On the other hand, the present invention also provides a computer-readable medium, which may be included in the device described in the embodiment; or it may exist independently without being assembled into the device. The computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the device includes: in response to receiving a full-link test request from an application, obtaining the component nodes of the full link, and performing a node test on each of the component nodes; for each of the internal component nodes that does not have an interactive interface, receiving a node test request and a corresponding script file through an interactive interface pre-set in the application, and executing the script file in the interactive interface to perform a node test on the internal component nodes; when the node test of each of the component nodes passes, the full link of the application is reviewed and tested.

[0094] According to the technical solution of the embodiment of the present invention, it has the following advantages or beneficial effects: in response to receiving a full-link test request from an application, obtaining the component nodes of the full link, and performing a node test on each component node; for internal component nodes that do not have an interactive interface in each component node, receiving the node test request and the corresponding script file through an interactive interface pre-set in the application, and executing the script file in the interactive interface to perform a node test on the internal component node; when the node test of each component node passes, the technical solution of performing a review test on the full link of the application solves the problem that the internal component nodes cannot perform node tests independently, thereby avoiding the problem of repeatedly re-performing full-link tests due to abnormal node tests of internal component nodes, effectively shortening the full-link test time and improving the test efficiency.

[0095] The specific implementation methods described herein do not constitute limitations on the scope of protection of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A full-link testing method, characterized in that: include: In response to receiving a full-link test request from an application, obtaining component nodes of the full link, and performing a node test on each of the component nodes; For each of the component nodes that has no interactive interface, receiving a node test request and a corresponding script file through an interactive interface preset in the application, and executing the script file in the interactive interface to perform a node test on the internal component node; When the node tests of the constituent nodes are passed, the entire link of the application is reviewed and tested.

2. The method according to claim 1, characterized in that: Before receiving the node test request through the interactive interface preset in the application, the method further includes: Generate an interactive interface code for creating the interactive interface, package the interactive interface code to obtain a load injection package, and inject the load injection package into the application to create the interactive interface in the application.

3. The method according to claim 2, characterized in that Generate an interactive interface code for creating the interactive interface, including: Determining the interface type of the interactive interface to be established according to the deployment environment of the application; An interactive interface code corresponding to the interface type is generated, and a script engine for executing the script file is encapsulated inside the interactive interface code.

4. The method according to claim 2, characterized in that: The interactive interface code is packaged to obtain a loading injection package, including: Performing a first packaging process on the interactive interface code file to obtain an interactive interface package; Using the probe technology, the interactive interface package is loaded through the class loader to obtain a probe file; The probe file is subjected to a second packaging process to obtain the loading injection package.

5. The method according to claim 4, characterized in that Before loading the interactive interface package through the class loader, the method further includes: The interactive interface package is added to the specified class path so that the class loader can load it.

6. The method according to claim 4, characterized in that Injecting the loading injection package into the application comprises: In response to the startup operation of the application, the loading injection package is injected into the application through a command line.

7. The method according to claim 1, characterized in that The interactive interface code includes a script engine; Executing the script file in the interactive interface includes: The script engine calls the code of the internal component node and executes the method involved in the script file.

8. A device for full-link testing, characterized in that: include: A component node acquisition module, configured to, in response to receiving a full-link test request from an application, acquire the component nodes of the full link and perform a node test on each of the component nodes; An internal component node testing module, for receiving a node test request and a corresponding script file through an interactive interface preset in the application program for each internal component node without an interactive interface among the component nodes, and executing the script file in the interactive interface to perform a node test on the internal component node; The full-link verification test module is used to conduct a verification test on the full link of the application program when the node test of each of the component nodes passes.

9. A mobile electronic device terminal, characterized in that: include: one or more processors; a storage device 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 method according to any one of claims 1 to 7.

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