A test program execution and debugging method and system
The method and system enable remote execution and debugging of test programs through a network-based server system, addressing the inefficiencies of current automatic test systems by reducing travel and maintenance times while enhancing information sharing and monitoring.
Patent Information
- Application Number
- CN202010843365.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-20
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2040-08-20
AI Technical Summary
Current automatic test systems are limited to single-machine control, lacking network compatibility, leading to high personnel costs and low efficiency due to long business trips for on-site development and debugging, and hinder information sharing and unified monitoring.
A method and system for remotely executing and debugging test programs by calling them online, utilizing a server with a display control module, execution control module, and data cache module, and encapsulating the Visa library to control test instruments over a network without requiring local deployment of industrial computers.
This approach reduces debugging time and on-site maintenance, enabling efficient online development and debugging, facilitating information sharing and monitoring, and overcoming the limitations of existing technologies.
Smart Images

Figure CN111984435B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a method and system for executing and debugging a test program. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] The full name of the test system is automatic test system (ATS), also known as automatic test equipment (ATE), which refers to a system that automatically measures and processes data with little or no human involvement, and displays or outputs test results in an appropriate manner. Compared with manual testing, automatic testing saves time and effort.
[0004] The development of automatic test equipment (ATS) has gone through three stages:
[0005] (1) Use special testing equipment.
[0006] (2) Use the standardized general purpose interface bus (GPIB) to connect related devices.
[0007] (3) Integrate the computer and test equipment, use computer software to replace certain hardware functions in traditional equipment, and use the computer to generate stimuli, complete test functions, and generate test programs.
[0008] In the third stage of ATS development, the problem of integrated control of test instruments was well solved. However, in the current highly networked society, it has become a backward component that can only be controlled and executed by a single machine. If the test cannot be networked, it means that it cannot be compatible with many current networked resources, technologies, and implementation methods, and it is even more impossible to realize Industry 4.0.
[0009] Therefore, some manufacturers' test software has begun to transition from local development and local execution to local development and online execution. Currently, most solutions use local test program development software to develop and debug test programs, and a host computer in the network controls the test engine online, and uses the test program execution engine to perform the final local test execution. The engine is generally separated from the execution part of the executable program in the third stage.
[0010] However, this solution requires test developers to travel for a long time, conduct on-site development and debugging, which results in high personnel costs and low debugging efficiency. In addition, the local execution of the test program is not conducive to the sharing of test information and unified monitoring of the test status, and is even less conducive to information collection during the test process. Summary of the invention
[0011] In order to solve the above problems, the present disclosure proposes a test program execution and debugging method and system, which can call the test program online and send it to the test instrument for execution and debugging, thereby realizing remote online execution and debugging of the test program, and fundamentally solving the problems of long-term business trips, on-site development, on-site debugging, high costs and low efficiency of test developers.
[0012] To achieve the above objectives, the present disclosure adopts the following technical solutions:
[0013] In one or more embodiments, a method for executing and debugging a test program is provided, comprising:
[0014] Call the test program file online, start the debugging instructions, and parse the test program into test instrument control instructions;
[0015] The test instrument control instruction is sent to the test instrument, so that the test instrument executes the test instrument control instruction.
[0016] Furthermore, it also includes developing a test program online and storing the generated test program file.
[0017] Furthermore, it also includes determining whether the test instrument control instructions executed by the test instrument meet expectations and debugging the test program.
[0018] In one or more embodiments, a debugging system for a test instrument is provided, including a server, a test instrument connected to the server;
[0019] The server comprises:
[0020] Display control module, used to manage page display and user control;
[0021] The execution control module receives the display control module instruction, calls the Visa library, converts the webpage control command into the test instrument control instruction, and sends the test instrument control instruction to the test instrument;
[0022] Visa library, which converts web page control commands into test instrument control instructions;
[0023] The data cache module stores the edited test program and generates the test program file.
[0024] In one or more embodiments, a computer-readable storage medium is provided for storing computer instructions. When the computer instructions are executed by a processor, the steps of the test program execution and debugging method are completed.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] 1. The test program execution and debugging method disclosed in the present invention can develop the test program online, and call the test program online to send it to the test instrument for remote debugging, which fundamentally solves the problems of long-term business trips, on-site development, on-site debugging, high costs and low efficiency of test developers.
[0027] 2. The system disclosed in the present invention directly encapsulates the Visa library in the server, and can remotely control the test instruments connected to the network without deploying an industrial computer at the test station, thereby meeting the needs of online development and debugging of the test program; there is no need to perform secondary packaging of the test execution engine to perform online control of test resources, which greatly reduces the debugging time and on-site maintenance time required by test developers.
[0028] 3. The system disclosed in the present invention does not need to additionally encapsulate the communication protocol in the communication link, further reducing the debugging time and on-site maintenance time required by test developers. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0030] Figure 1 This is a structural block diagram of the server of the disclosed system;
[0031] Figure 2 The overall structure diagram of the disclosed system is as follows;
[0032] Figure 3 Develop a flowchart for this disclosure online;
[0033] Figure 4 This is the online debugging flow chart of the present disclosure;
[0034] Figure 5 Schematic diagram for remote online execution of existing test programs. DETAILED DESCRIPTION
[0035] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0036] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0037] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0038] In the present disclosure, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom" and the like indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present disclosure, and do not specifically refer to any part or element in the present disclosure and should not be understood as limitations on the present disclosure.
[0039] In the present disclosure, terms such as "fixed connection", "connected", "connection", etc. should be understood in a broad sense, indicating that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. For relevant scientific research or technical personnel in this field, the specific meanings of the above terms in the present disclosure can be determined according to specific circumstances, and they cannot be understood as limitations on the present disclosure.
[0040] Example 1
[0041] Currently, the popular automatic testing software on the market includes graphical integrated development tools such as the LabView development environment of National Instruments (NI), Teradyne's automated testing tool (TestStudio), and China Electronics Technology Group Corporation's test management tool (TestCenter), as well as code-level development tools such as NI's interactive C language development platform (LabWindows / CVI) and Microsoft's integrated development environment (Visual Studio). Among these test development tools, only NI's LabView supports remote control. The Datasocket network communication technology or remote panel technology developed by NI can be used to realize the publication and sharing of field test data. Datasocket technology can realize real-time data transmission. The server side (for data acquisition and publication) and the client side (for data access, display and storage, etc.) are developed separately to complete the design of the remote test system. To use LabView's remote panel technology, it is necessary to set relevant parameters in LabView, open and operate the front panel of the VI located on the remote field computer from the local computer, or open the remote panel on the server through the browser to realize remote testing and control. The remote test system design based on LabView is suitable for the LAN environment, and the remote test system must also install the LabView runtime library.
[0042] Datasocket technology is based on Microsoft's COM and ActiveX, and highly encapsulates the TCP / IP protocol to achieve real-time data sharing across computers, languages, and processes. Since this technology uses Microsoft's COM technology, it does not have cross-operating system characteristics, and NI's technology is not open, which greatly limits the availability of this technology in other test system software.
[0043] NI's LabView uses Datasocket technology or remote panel technology to achieve local development and debugging, and online execution. This solution will only be an intermediate transition in the future stage of automatic testing. The state of online development, debugging, and execution of test programs is the final form of automatic testing in the next stage.
[0044] Take the Datasocket technology developed by NI LabView as an example. This technology interacts with the remote end by encapsulating the communication layer outside the LabView execution engine, so that it can receive remote control for test execution and test status feedback, such as Figure 5 As shown, this method can meet the remote online execution of the test program, but cannot meet the online development and debugging of the test program.
[0045] like Figure 5 As shown, the communication protocol A end and the communication protocol B end are paired for instrument control. The advantage of this method is that manufacturers who develop test execution software can separate the test execution engine from the test execution software and make it independent. Combined with the communication protocol and server developed specifically, the test can be executed remotely online. The development workload is small and easy to implement. NI's Datasocket technology is implemented using this method.
[0046] This method can realize remote online control of the test, but it is difficult to carry out remote online development and debugging of the test.
[0047] In order to realize the online development, debugging and execution of the test program, a network-based test program online development, debugging and execution implementation method is proposed in this embodiment, wherein the network communication technology used is not limited to a certain technology, and any upper-layer communication protocol based on TCP or UDP extension can be adopted, which can satisfy the mutual communication between the network control end and the local execution end.
[0048] A method for executing and debugging a test program, comprising:
[0049] Develop test programs online and store generated test program files;
[0050] Call the test program file online, start the debugging instructions, and parse the test program into test instrument control instructions;
[0051] The test instrument control instruction is sent to the test instrument, so that the test instrument executes the test instrument control instruction.
[0052] Furthermore, it also includes: judging whether the test instrument control instructions executed by the test instrument meet expectations, and debugging the test program.
[0053] The process of online development is as follows Figure 3 As shown, including:
[0054] Step 1: The user enters the IP address and port number of the test instrument online;
[0055] Step 2: The user edits the test program required by the test instrument through the page;
[0056] Step 3: Store the test program edited by the user into the data cache module;
[0057] Step 4: Determine whether to add a new test instrument. If yes, jump to step 1. If no, go to step 5.
[0058] Step 5: When the user clicks Save, the database is recorded and a test program file is generated.
[0059] The process is performed online and includes:
[0060] Step 1: The user calls the test program file through the page;
[0061] Step 2: The user starts debugging through the page;
[0062] Step 3: The execution control module calls the Visa library;
[0063] Step 4: The execution control module parses the test program content into a test instrument control instruction, which contains multiple control statements;
[0064] Step 5: The execution control module sends a control statement to the test instrument through the network;
[0065] Step 6: The test instrument monitors and receives control statements and executes the control statements;
[0066] Step 7: End.
[0067] The process of online debugging includes: Figure 4 As shown, including:
[0068] Step 1: The user calls the test program file through the page;
[0069] Step 2: The user starts debugging through the page;
[0070] Step 3: The execution control module calls the Visa library;
[0071] Step 4: The execution control module parses the test program content into a test instrument control instruction, which contains multiple control statements;
[0072] Step 5: The execution control module sends a control statement to the test instrument through the network;
[0073] Step 6: The test instrument monitors and receives the control statement and executes the control statement to determine whether the control statement executed by the test instrument meets expectations. If so, jump to step 4; if not, jump to step 7.
[0074] Step 7: End.
[0075] Compared with the online debugging process, the online execution process is only to call the test program online and send it to the test instrument for execution; without judging whether the test program executed by the test instrument meets expectations.
[0076] The debugging method in this embodiment realizes the remote online calling of the test program for debugging and execution, and the online development of the test program, fundamentally solving the problems of long-term business trips, on-site development, on-site debugging, high costs and low efficiency of test developers, improving the efficiency of test program development, improving the level of test monitoring and information sharing, and facilitating information collection during the test process.
[0077] Example 2
[0078] In this embodiment, a debugging system for a test instrument is disclosed, such as Figure 2 As shown, it includes a server and a test instrument connected to the server.
[0079] The server consists of a display control module, an execution control module and a data cache module. The execution control module calls the Visa library, such as Figure 1 As shown, specifically:
[0080] Display control module, used to manage web page display and user control. Users can edit and call test programs through this module;
[0081] The execution control module receives the display control module instruction, calls the Visa library, converts the webpage control command into the test instrument control instruction, and sends the test instrument control instruction to the test instrument;
[0082] The data cache module is used to collect, summarize, store and analyze data, store edited test programs and generate test program files.
[0083] The display control module, execution control module and data cache module all have different processes and collaborative relationships for the development, debugging and execution of test programs.
[0084] There are two types of test instruments, one is the test instrument that is completely controlled by the network (LAN), and the other is the test instrument that is not completely controlled by the network (LAN). Among them, the network-controlled instrument can directly receive the control instructions sent by the server through the network, while the non-network-controlled instrument needs to be connected to the conversion terminal through a bus. The conversion terminal receives the control instructions sent by the server through the network, and converts the control instructions received through the network to the corresponding bus. The converted instructions are sent to the instrument not controlled by the network via the bus for debugging.
[0085] The buses include: GPIB bus, synchronous 232 bus, or synchronous 485 bus, etc.
[0086] The system of this embodiment breaks away from the limitation of existing local development software of test programs, upgrades the remote control technology of existing test program execution engines, proposes a network-based direct control solution for test instruments, and separates the server side into a display control module, an execution control module and a data cache module, thereby realizing online development, debugging and execution of test programs.
[0087] The core of this system is to separate and break the existing concept of test system (Auto Test System, ATS), form a new concept that all network resources can be controlled, and propose to upgrade the local call of Visa library and encapsulate it in the server system. It is not necessary to deploy the industrial computer of the test station to remotely control the test equipment and instruments connected to the network, so as to meet the online development and debugging of the test program; there is no need to perform secondary packaging of the test execution engine to control the test resources online, which greatly reduces the debugging time and on-site maintenance time required by test developers.
[0088] The present invention discloses a method for executing and debugging a test program, which realizes online development of the test program and online remote calling of the test program for debugging and execution, fundamentally solving the problem of long-term business trips, on-site development, and on-site debugging by test developers, which is costly and inefficient; solving the problem of online execution of the test program, while not being restricted by the current Datasocket technology of NI Company, and meeting the needs of independent research and development; in the online execution of the test program, it is no longer necessary to encapsulate the execution engine at the end of the communication link, and the test instrument control can be performed in the network; there is no need to additionally encapsulate the communication protocol in the communication link, which reduces the debugging time and on-site maintenance time required by the test developers.
[0089] Example 3
[0090] In this embodiment, a computer-readable storage medium is disclosed for storing computer instructions. When the computer instructions are executed by a processor, the steps of the execution and debugging method of a test program described in Example 1 are completed.
[0091] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0092] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A method for executing and debugging a test program, characterized in that: include: Call the test program file online, start the debugging instructions, and parse the test program into test instrument control instructions; Sending a test instrument control instruction to the test instrument so that the test instrument executes the test instrument control instruction; The Visa library is directly encapsulated in the server, and the test program is parsed into test instrument control instructions through the Visa library; Sending a test instrument control instruction to the test instrument via a network; Determine whether the test instrument control instructions executed by the test instrument are in line with expectations and debug the test program; Call the test program online and send it to the test instrument for execution and debugging, realizing remote online execution and debugging of the test program; Develop test programs online and store generated test program files, specifically: Enter the test instrument IP address and port number online; Edit the test program required by the test instrument through the page; Store the edited test program and generate a test program file.
2. A method for executing and debugging a test program as claimed in claim 1, characterized in that: Call the test program file through the page.
3. A debugging system for a test instrument, characterized in that: including, a server, and a test instrument connected to the server; The server software includes: Display control module, used to manage web page display and user control; The execution control module receives the display control module instruction, calls the Visa library, converts the webpage control command into the test instrument control instruction, and sends the test instrument control instruction to the test instrument; Data cache module, stores the edited test program and generates the test program file; The Visa library is directly encapsulated in the server, and the test program is parsed into test instrument control instructions through the Visa library; Sending a test instrument control instruction to the test instrument via a network; Determine whether the test instrument control instructions executed by the test instrument are in line with expectations and debug the test program; Call the test program online and send it to the test instrument for execution and debugging, realizing remote online execution and debugging of the test program; Develop test programs online and store generated test program files, specifically: Enter the test instrument IP address and port number online; Edit the test program required by the test instrument through the page; Store the edited test program and generate a test program file.
4. A debugging system for a test instrument as claimed in claim 3, characterized in that: The test instrument is either a network-controlled instrument or a non-network-controlled instrument.
5. A debugging system for a test instrument as claimed in claim 4, characterized in that: The network-controlled instrument directly receives the test instrument control instruction sent by the execution control module through the network; The instrument that does not accept network control is connected to the conversion terminal, and the conversion terminal receives the test instrument control instructions sent by the execution control module through the network and performs bus instruction conversion. The converted instructions are sent to the instrument that is not accepted by the network control for testing.
6. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the steps of a test program execution and debugging method as described in any one of claims 1-2.
