Software test platform and test method based on high-speed multi-interface ground inspection

By designing a software test platform based on high-speed multi-interface ground inspection, using asynchronous programming mode and parallel computing technology, the problems of multi-interface concurrent testing and data synchronization in the existing technology are solved, and the data consistency and real-time requirements are met.

CN120216369APending Publication Date: 2025-06-27SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510294196.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

When existing software testing platforms handle concurrent tests of multiple different types of high-speed interfaces, it is difficult to ensure data consistency and cannot effectively handle real-time requirements in high-speed data flow scenarios.

Method used

A software testing platform based on high-speed multi-interface ground inspection was designed. Using a combination of test chassis and upper computer testing software, it uses multiple different types of interface boards and PCI Express bus communication, combined with middleware layer and upper computer applications written in C++ and C# to realize asynchronous programming mode and parallel computing technology to enhance data processing capabilities and response speed.

Benefits of technology

Parallel testing of multiple interfaces of different types is implemented, ensuring the consistency of data transmission, avoiding data loss or errors, significantly improving data processing capabilities and response speed, and meeting the real-time requirements in high-speed data flow scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216369A_ABST
    Figure CN120216369A_ABST
Patent Text Reader

Abstract

The invention discloses a software test platform based on high-speed multi-interface ground inspection. The software test platform comprises a test case and upper computer test software, the test case is provided with a plurality of interface board cards of different types, and the interface board cards communicate with the test case through a PCI Express bus; the upper computer test software is set to be capable of being connected with, reading and writing data of different interface board cards at the same time, and the upper computer test software comprises a middleware layer written by C + + and an upper computer application program written by a C # language. The invention provides a software test platform and a test method based on high-speed multi-interface ground detection, which support a plurality of different types of interfaces, ensure the data transmission consistency in a multi-interface environment, avoid data loss or error, enhance the data processing capability and response speed, and ensure the real-time requirement in a high-speed data stream scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software testing, and particularly to a software testing platform and a testing method based on high-speed multi-interface ground testing. Background Art

[0002] With the rapid development of space technology, the launch frequency and the number of satellites in orbit are increasing continuously. Since it is very difficult to repair the faults of satellites in orbit, during the development process of satellites, strict and detailed ground testing of each on-board single device is a prerequisite for ensuring the normal operation of the overall functions of the satellites in orbit. For ground testing equipment with multiple different types of high-speed interfaces, a software testing platform that can efficiently detect is crucial.

[0003] In the development of satellite multi-interface ground testing equipment, the limitations of traditional software testing platforms are becoming increasingly apparent. For example, although the integrated satellite interface automated testing system designed by Chen Bo et al. has achieved wide compatibility of interfaces of various types of single devices and solved some compatibility problems by introducing an intelligent interface switching device, this system has not fully solved the problems of multi-interface concurrent testing and related data synchronization, especially the data consistency problem when dealing with high-speed interfaces has not been effectively solved.

[0004] The automated testing host computer software for multi-interface satellite ground testing equipment designed by Zhang Qiannan based on the Qt architecture has made progress in realizing the automated interface monitoring module. Methods such as graphic modeling of interface pin layouts and control of test service packets have indeed improved the testing efficiency and reliability. However, the real-time data synchronization and processing capabilities of this method in the multi-interface environment of complex satellite systems still need to be improved, especially when facing the need to test a large number of interfaces simultaneously, it seems powerless.

[0005] The high-speed interface design scheme for a general testing platform for satellite communication terminals proposed by Chen Jing et al. Although the transmission real-time performance and reliability of high-speed data interfaces in GPP-SDR have been effectively improved through the high-speed interface scheme of PCI-e, the research focus does not involve the overall solution for multi-interface testing, which limits its wide applicability in practical applications.

[0006] The method proposed by Liu Rui et al. realizes interface testing by controlling the connection of input and output ports to the single device under test and the testing equipment through a switch matrix. Although this method simplifies the interface testing process, there are still deficiencies in dealing with data synchronization and consistency problems of high-speed interfaces and cannot meet the testing requirements of high precision and high performance.

[0007] The automated test and measurement method for the power supply interface of small satellites by Wu Haichao et al. uses a customized special transfer cable to effectively connect the test board of the power supply device to the power supply interface to be tested, greatly saving test time and improving efficiency. However, this method is mainly optimized for the test of the power supply interface, and has limited support for other types of high-speed interfaces and their concurrent tests, and cannot fully cover the requirements of satellite multi-interface tests. Summary of the Invention

[0008] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is that there are difficulties in multi-interface concurrent testing and related data synchronization in the existing software test platform for ground inspection equipment with multiple different types of high-speed interfaces, unable to ensure data consistency, unable to cope with the situation of testing a large number of interfaces simultaneously, and insufficient timeliness, effectiveness, and test accuracy. Therefore, the present invention provides a software test platform and test method based on high-speed multi-interface ground inspection, which supports multiple different types of interfaces, ensures data transmission consistency in a multi-interface environment, avoids data loss or errors, enhances data processing capabilities and response speed, and ensures real-time requirements in high-speed data stream scenarios.

[0009] To achieve the above object, the present invention provides a software test platform based on high-speed multi-interface ground inspection, including a test chassis and a host computer test software;

[0010] The test chassis is configured with multiple different types of interface boards, and the interface boards communicate with the test chassis through the PCI Express bus;

[0011] The host computer test software is set to be able to simultaneously connect to and read and write data of different interface boards. The host computer test software includes a middleware layer written in C++ and a host computer application program written in C# language; among them, the middleware layer encapsulates functions for reading and writing interface board files and connecting to interface boards as dynamic link libraries DLLs, and provides an abstraction layer for identifying the identity of each interface board for the host computer application program to call, so as to achieve communication isolation and data synchronization between the host computer application program and each interface board.

[0012] Further, the functional functions encapsulated in the middleware layer allow the host computer application program to distinguish different interface boards through device IDs. The FPGA program of each interface board assigns a unique device ID corresponding to the board in the XDMA IP core, and at the same time calls the read and write functions of multiple boards to implement parallel tests of multiple different types of interfaces.

[0013] Further, the host computer application program uses an asynchronous programming mode and parallel computing technology to enhance the data processing capabilities and response speed of the platform, ensuring that the real-time requirements in high-speed data stream scenarios are met.

[0014] Further, the asynchronous programming model includes writing non-blocking code using the async / await asynchronous programming model provided by C#, enabling the application to continue executing other tasks while waiting for I / O operations to complete, which is suitable for handling I / O-intensive operations.

[0015] Further, the parallel computing technology includes using the Task Parallel Library in C# to implement data reading and writing for multiple interface boards, ensuring real-time processing of high-speed data read from each interface.

[0016] Another preferred embodiment of the present invention provides a test method for a software test platform based on high-speed multi-interface ground inspection, including the following steps:

[0017] Determine the implementation plan for parallel testing of multiple different types of interfaces;

[0018] Encapsulate the functions of the host computer reading and writing board files and connecting to the board into a dynamic link library (DLL) through C++, serving as the middleware layer;

[0019] The host computer application program written in C# directly calls the external DLL function to communicate with the interface board, differentiating different boards through the device ID;

[0020] Use the asynchronous programming model and parallel computing technology to meet the real-time response requirements.

[0021] Further, it also includes that for the data received from each interface board, it is first temporarily stored in the buffer area in the memory and then asynchronously written to the persistent storage to prevent data loss.

[0022] Further, it also includes that when it is necessary to update the data on the user interface, a timed refresh strategy is adopted instead of real-time refresh to maintain the smoothness of the UI response.

[0023] Further, determining the implementation plan for parallel testing of multiple different types of interfaces, such that each interface has an independent task queue and thread pool, specifically including task division and thread allocation. Among them, the task division is set to divide the test tasks of each interface into multiple subtasks, including board initialization, read and write operations, status check, file storage, and data display; the thread allocation is set to allocate an independent thread pool for each interface type to ensure that they can execute in parallel without interfering with each other.

[0024] Further, the host computer application program written in C# directly calls the external DLL function to communicate with the interface board, differentiating different boards through the device ID, specifically including the following steps:

[0025] Declare the DLL function in C#, and use the DllImport attribute to declare the function in the DLL for calling in C#;

[0026] Call OpenBoard() to initialize the board.

[0027] According to the communication protocol, format the data to be sent and parse the received data packets to extract valid data.

[0028] Write the preprocessed data into the board by calling the interface function WriteData(), and at the same time display the sending progress and status in real time on the sending interface.

[0029] Call the interface function ReadData() to read data.

[0030] Call CloseBoard() to close the board.

[0031] Technical effects

[0032] The present invention provides a software test platform and test method based on high-speed multi-interface ground inspection, which can connect and test multiple different types of interfaces simultaneously; in a multi-interface environment, the data between each interface is highly synchronized to ensure data transmission consistency and avoid data loss or errors; adopting an asynchronous programming mode and parallel computing technology enhances the data processing ability and response speed of the platform, and ensures the real-time requirements in high-speed data flow scenarios. It is an intelligent, high-performance and easy-to-use automated test platform, specifically designed for complex systems with multiple high-speed data transmission interfaces. It not only solves many problems existing in traditional test methods, but also provides a powerful support tool for the strict test requirements in modern software development. Through this series of technological innovations, the present invention will significantly improve the work efficiency and reliability of software testing, and escort the successful release of software products.

[0033] The following will further illustrate the concept, specific structure and technical effects of the present invention in conjunction with the drawings to fully understand the purpose, features and effects of the present invention. Brief description of the drawings

[0034] Figure 1 It is a schematic diagram of the overall framework of a software test platform based on high-speed multi-interface ground inspection in a preferred embodiment of the present invention;

[0035] Figure 2 It is a logic diagram of the middleware layer of a software test platform based on high-speed multi-interface ground inspection in a preferred embodiment of the present invention;

[0036] Figure 3 It is an application of the asynchronous programming mode of a software test platform based on high-speed multi-interface ground inspection in a preferred embodiment of the present invention. Detailed implementation manners

[0037] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clear and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0038] In the following description, specific details such as specific internal programs and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.

[0039] As Figure 1 shown, the present invention provides a software test platform based on high-speed multi-interface ground inspection, including a test chassis and a host computer test software;

[0040] The test chassis is configured with multiple interface boards of different types, and the interface boards communicate with the test chassis through the PCI Express bus;

[0041] The host computer test software is set to be able to connect to and read and write data of different interface boards simultaneously. The host computer test software includes a middleware layer written in C++ and a host computer application program written in C# language; wherein, the middleware layer encapsulates the functions for reading and writing interface board files and connecting to interface boards as dynamic link libraries DLLs, and provides an abstraction layer for identifying the identity of each interface board for the host computer application program to call, so as to achieve communication isolation and data synchronization between the host computer application program and each interface board.

[0042] Further, the functional functions encapsulated in the middleware layer allow the host computer application program to distinguish different interface boards through the device ID. The FPGA program of each interface board assigns a unique device ID corresponding to the board in the XDMA IP core, and at the same time calls the read and write functions of multiple boards to implement parallel testing of multiple different types of interfaces.

[0043] Further, the host computer application program adopts an asynchronous programming mode and parallel computing technology to enhance the data processing ability and response speed of the test platform, and ensure that the real-time requirements in the high-speed data stream scenario are met.

[0044] Further, the asynchronous programming mode includes writing non-blocking code using the asynchronous programming model async / await provided by C#, so that the application program can continue to execute other tasks while waiting for the I / O operation to complete, which is suitable for processing I / O-intensive operations.

[0045] Further, the parallel computing technology includes using the Task Parallel Library of C# to implement data reading and writing for multiple interface boards, so as to ensure real-time processing of high-speed data read from each interface.

[0046] First, determine the implementation plan for parallel testing of multiple different types of interfaces. Considering that each type of interface board communicates with the test chassis through the PCI Express (PCIe) bus, in order to enable the host computer test software to easily connect to and read and write data from different interface boards (such as LVDS, RS422, 1553B, CAN, etc.) at the same time, encapsulate the functions of the host computer for reading and writing board files and connecting to the board in C++ into a dynamic link library (DLL) as the middleware layer for the host computer application program written in C# to call. In this way, the host computer can communicate with the interface board by directly calling external DLL functions. For multiple different types of interface boards, a single dll and a set of interface functions are shared. The host computer controls different boards by passing the device IDs of different interface boards as parameters into the DLL interface functions, and can simultaneously call the read and write functions of multiple interface boards to implement parallel testing of multiple different types of interfaces. The middleware layer can identify the identity of each interface board and provide an abstract interface layer for the host computer application program to call, enabling the application program to read and write data safely without caring about the underlying hardware details, thus achieving communication isolation between the host computer and each interface board. Data synchronization between each interface is achieved through thread synchronization and data integrity verification of the data synchronization module to avoid data errors.

[0047] To simultaneously connect to and test multiple different types of interfaces (such as LVDS, RS422, 1553B, CAN, etc.), in the embodiments of the present invention, all types of interface boards are connected to the test chassis through the PCIe bus, ensuring a high-speed and stable communication link. The communication of these interface boards is managed by the driver provided by the hardware vendor. Encapsulate the functions of the host computer for reading and writing board files, connecting to the board, and closing the board in C++ into a dynamic link library (DLL) as the middleware layer. These functions include, but are not limited to: initializing the board connection, closing the board connection, reading a file to the board, and writing a file to the board. The host computer differentiates different boards by the device ID.

[0048] Such as Figure 2As shown in the figure, the middleware layer includes an abstract interface module, a board management module, a low-level driver interface, a data synchronization module, and an error handling module. The abstract interface module provides standardized function interfaces (such as OpenBoard, CloseBoard, ReadData, WriteData, etc.) to the host computer and forwards the call requests from the host computer to the low-level driver. The board management module provides operations for registering and unregistering board instances through the board ID parameter passed by the host computer to the interface function, differentiates different boards through the device ID, and this module also maintains a board information table to record the information of the connected boards. The board driver interface module provides low-level hardware operation functions for each type of board (such as LVDS, RS422, 1553B, CAN, etc.), encapsulates initialization, reading, and writing operations, and this module directly interacts with the corresponding hardware board. The data synchronization module uses a thread synchronization mechanism (a mutex lock is adopted in the present invention) to manage multi-threaded access, ensures the atomicity of operations, and avoids data conflicts caused by multiple threads simultaneously reading and writing the same board, or data state inconsistencies caused by disordered operation sequences between different boards. The data synchronization module provides a data verification function. In multi-board operations, data may be lost or damaged during transmission. The data synchronization module needs to ensure the integrity and accuracy of the data. The specific operation is to verify the data before and after it is transmitted from the middleware layer to the hardware. The CRC verification is adopted in the present invention. The error handling module can capture exceptions in hardware operations, provide error codes and information, and feedback them to the host computer through the abstract interface module.

[0049] The main function of the middleware layer is to isolate the communication between the host computer and the interface board, ensuring data security and synchronization. It achieves this goal by encapsulating hardware operations, providing abstract interfaces, managing board identities, synchronizing data, and handling errors. The specific implementation process is as follows:

[0050] (1) Initialize the board: The host computer calls the OpenBoard() function and passes the device ID of the corresponding board into this function. The board management module checks the board information to complete the registration of the board, and the board driver interface completes the hardware initialization and returns the result. If the return value of this function is not empty, it indicates that the board initialization is successful.

[0051] (2) Read and write data: The host computer calls ReadData() or WriteData(). The board management module locates the board through the passed-in device ID, and the data synchronization module acquires the thread lock to ensure the atomicity of data operations. Call the low-level driver function of the corresponding board to complete data reading or writing. At the same time, the data synchronization module verifies the integrity and consistency of the data, and finally returns the read data or the write result to the host computer.

[0052] (3) Closing the board: The host computer calls the CloseBoard() function. The board management module deregisters the board from the board information table, calls the closing function of the underlying driver of the corresponding board, releases the hardware resources, and finally returns the closing result to the host computer.

[0053] Secondly, determine the solution for how the test platform can meet the real-time response requirements when processing a large amount of high-speed data streams. Considering that each type of interface board communicates with the test chassis in real time through the PCIe bus, the test platform needs to have high data processing capabilities and response speeds when sending and receiving a large amount of high-speed data streams. The solution is to flexibly apply the asynchronous programming model and parallel computing technology.

[0054] C# provides a powerful asynchronous programming model, and the core keywords are async and await. Use the async and await keywords provided by C# to write non-blocking code, allowing the application to continue executing other tasks while waiting for I / O operations (such as network requests, file reading and writing) to complete. In this way, non-blocking code can be written, allowing the application to continue executing other tasks while waiting for I / O operations (such as network requests, file reading and writing, etc.) to complete, which is very suitable for handling I / O-intensive operations. For example, quickly reading and writing files from each interface board and quickly storing a large amount of processed test data locally can be achieved by adopting asynchronous programming.

[0055] For storing a large amount of test data locally, in addition to adopting asynchronous programming, a caching mechanism also needs to be introduced to ensure that data is not lost. Use the Task Parallel Library (TPL) of C# to parallelize complex calculation logic, make full use of multi-core processor resources, and accelerate data processing speed. For example, data from multiple interfaces can be processed in parallel to reduce latency and increase throughput. The Task Parallel Library (TPL) of C# provides a simple and efficient way to parallelize code and can easily implement complex parallel calculation logic, thus ensuring the real-time processing of high-speed data read and written from each interface.

[0056] It is also necessary to keep the UI response smooth, so that even when a large amount of data processing is taking place in the background, it will not affect the user experience. Combining asynchronous programming and parallel computing, multiple parallel tasks can be started without blocking the main thread. At this time, the background will not affect the user interface, but the data to be displayed on the interface needs to return to the main thread for updating. Therefore, in order to ensure a smooth and responsive interface, the display speed on the interface cannot be matched according to the data processing speed, otherwise the interface will freeze or even become unresponsive. If the interface really needs to reflect the progress of data acquisition or processing, it can be updated at regular intervals instead of in real time.

[0057] Another preferred embodiment of the present invention provides a test method for a software test platform based on high-speed multi-interface ground inspection, including the following steps:

[0058] 1. Determine the implementation plan for parallelly testing multiple different types of interfaces.

[0059] The test system needs to process data from multiple different interfaces, where the interface types include LVDS, RS422, 1553B, and CAN. To efficiently parallelly test these interfaces, the present invention designs a scheme in which each interface has an independent task queue and thread pool. The specific steps are as follows:

[0060] Task division: Divide the test tasks of each interface into multiple subtasks, including board card initialization, read and write operations, status check, file storage, data display, etc.;

[0061] Thread allocation: Allocate an independent thread pool for each interface type to ensure that they can execute in parallel without interfering with each other.

[0062] 2. Package functions such as the upper computer reading and writing board card files and connecting to the board card into a dynamic link library DLL through C++ as the middleware layer. As Figure 2 shown, the specific implementation steps are as follows:

[0063] S1. First, create a new C++ dynamic link library (DLL) project in Visual Studio. This project will serve as the middleware layer to encapsulate the interaction functions between the upper computer application and the hardware board card.

[0064] S2. Define a set of general interface functions in the header file of the created DLL project, including OpenBoard(), CloseBoard(), ReadData(), WriteData(), etc. These functions will serve as the public interfaces of the DLL for the upper computer to call.

[0065] S3. Create a board card management module to manage the driver instances of the board cards using a mapping table. This module will initialize the corresponding board card drivers according to the device ID. Create and initialize the corresponding driver instance according to the device ID in OpenBoard(). Release the driver instance in CloseBoard().

[0066] S4. Obtain the driver instance corresponding to the device ID from the board card management module, and call ReadData() and WritedData() to forward the call requests of the upper computer to the specific hardware board card driver.

[0067] S5. Implement the actual driver functions for each type of board card, receive requests from the abstract interface module, including initializing and releasing the board card, reading from and writing to the board card, etc., and implement the interaction with the hardware board card.

[0068] S6. Use mutex locks to protect shared resources, including board card driver instances, buffers for read and write operations, etc., and perform data verification after read and write operations using CRC verification to ensure data correctness.

[0069] S7. Capture and handle exceptions that may occur during board card operations, use a logging library to record error messages, and be able to feedback to the interface function, which then feedbacks the error message to the host application.

[0070] 3. The host application written in C# directly calls external DLL functions to communicate with the interface board card, and differentiates different board cards through device IDs.

[0071] First, declare the DLL functions in C#, and use the DllImport attribute to declare the functions in the DLL for calling in C#.

[0072] Furthermore, device ID management is implemented. Define a device ID manager in C# to store and manage the device IDs of different board cards.

[0073] Furthermore, the communication logic between the host computer and the board card is implemented. Taking one of the board cards as an example, as Figure 3 shown. The specific implementation steps are as follows:

[0074] Open the board card: Call OpenBoard() to initialize the board card.

[0075] Data preprocessing: According to the communication protocol, format the data to be sent, including adding packet headers, packet tails, check bits, etc.; parse the received data packets to extract valid data.

[0076] Send data: Write the preprocessed data to the board card by calling the interface function WriteData(). At the same time, the sending progress and sending status are displayed in real time on the sending interface.

[0077] Receive data: Call the interface function ReadData() to read data. After data preprocessing, the data is stored in two buffer areas respectively. One is used to extract data and store it locally, and the other is used to extract data and display it on the receiving interface.

[0078] Close the board card: Call CloseBoard() to close the board card.

[0079] 4. Use the asynchronous programming model and parallel computing technology to meet the real-time response requirements.

[0080] In the present invention, it is necessary to receive data from multiple interfaces and perform real-time processing on the data. The data processing process involves the following steps:

[0081] Data reception: Asynchronous programming is adopted, and the async and await keywords are used to asynchronously read data from multiple interfaces. The data reading operations for each interface are independent and do not block the main thread.

[0082] Data processing: The Task Parallel Library (TPL) is used to perform parallel computing on the data collected from multiple interfaces, including performing CRC checks (Cyclic Redundancy Check), calculating the mean, variance, etc. on the data. Since the collected data is a long data frame, in order to speed up the calculation, parallel processing is adopted. The basic principle of CRC check is to regard the data as a binary polynomial, and then calculate a check code through modulo-2 division. Steps for parallel CRC check: First, divide the large data into multiple small chunks, calculate the CRC for each chunk independently, then use Parallel.For or Parallel.ForEach of TPL to calculate the CRC of each chunk in parallel, and finally merge the CRC values of each chunk into the final CRC check code.

[0083] Data storage: Asynchronous programming is adopted, and the async and await keywords are used to asynchronously store the processed statistics into a buffer or a local file.

[0084] In another preferred embodiment of the present invention, for the data received from each interface board, it is first temporarily stored in a buffer in the memory and then asynchronously written to persistent storage to prevent data loss.

[0085] In another preferred embodiment of the present invention, when it is necessary to update the data on the user interface, a timed refresh strategy rather than a real-time refresh is adopted to maintain the smoothness of UI response.

[0086] As Figure 3 shown, taking the processing of data from one interface board as an example, the asynchronous programming of the present invention is applied in file reading and writing and the caching mechanism, and the asynchronous programming mode is also applicable when processing data from multiple interface boards simultaneously. In addition, when processing data from multiple different interfaces (such as LVDS, RS422, 1553B, CAN, etc.), the parallel computing technology is used to decompose the data processing tasks into multiple subtasks and allocate them to multiple processing units (such as CPU cores, GPUs, etc.) to execute simultaneously to improve the efficiency of data processing.

[0087] The Task Parallel Library (TPL) in C# provides a simple and efficient way to parallelize code, enabling complex parallel computing logic to be easily implemented. For example, after reading data from multiple interface boards, these data can be processed or analyzed through parallel tasks. For data streams that require real-time processing, the Parallel.ForEach in TPL or other parallel iteration methods can be used to accelerate the processing process. At the same time, combined with asynchronous programming, multiple parallel tasks can be started without blocking the main thread to accelerate the processing process.

[0088] In addition to quickly reading and writing test data from multiple interfaces, this test platform also needs to quickly store a large amount of test data locally. For the quick storage of a large amount of test data, in addition to using asynchronous programming, a caching mechanism also needs to be introduced to ensure that data is not lost. The embodiment of the present invention defines and implements a circular buffer class RingBuffer <t>To efficiently manage a data buffer with a flexibly settable size, which is very suitable for processing streaming data. When high-speed data is collected and processed, it is first stored in this buffer, and then the data is retrieved in another task and stored locally, which can ensure that the data is not lost. The size of the buffer should be flexibly set according to the scale of the data stream.

[0089] To ensure the smoothness and response speed of the user interface (UI), the UI thread and the worker thread should be separated. Through asynchronous programming, all time-consuming operations are executed in the background thread without blocking the UI thread. The Ui interface serves as the main thread. Even though some time-consuming tasks such as performing complex calculations and I / O operations adopt the asynchronous programming mode to ensure that they do not block the main thread, all display operations in the background tasks must return to the main thread for execution because UI updates can only be returned to the UI thread and cannot be updated across threads. When the update rate of a UI update task is too fast, it may cause the main thread to be occupied for a long time and appear busy, resulting in an unsmooth user operation interface.

[0090] Therefore, when it is necessary to reflect the data interaction or processing progress, the present invention updates the UI at regular intervals through the DispatcherTimer class, rather than updating it in real time according to the data processing speed, which can avoid performance problems caused by frequent refreshing. As Figure 3 shown, a timer module is implemented through the DispatcherTimer class to retrieve the data in the buffer at regular intervals and update the UI interface at regular intervals. DispatcherTimer is a class in WPF (Windows Presentation Foundation) used to trigger events regularly on the user interface thread. It can safely update UI elements without encountering cross-thread access problems and is particularly suitable for scenarios where certain operations need to be performed regularly but without blocking the UI thread, such as updating UI elements and periodically checking status.

[0091] Thus, it can be seen that the present invention provides an intelligent and high-performance automated test platform based on high-speed multi-interface ground inspection, significantly improving the work efficiency and reliability of software testing. It not only solves many problems existing in traditional testing methods but also provides strong support for the strict testing requirements in modern software development.

[0092] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative labor. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field based on the concept of the present invention through logical analysis, reasoning, or limited experiments on the basis of the prior art should fall within the protection scope determined by the claims.< / t>

Claims

1. A software testing platform based on high-speed multi-interface ground detection, characterized in that: Including test chassis and host computer test software; The test chassis is configured with a plurality of different types of interface boards, and the interface boards communicate with the test chassis via a PCI Express bus; The host computer test software is configured to simultaneously connect and read and write data of different interface boards, and the host computer test software includes a middleware layer written in C++ and a host computer application written in C# language; wherein the middleware layer encapsulates the functions of reading and writing interface board files and connecting interface boards as a dynamic link library DLL, and provides an abstract layer for identifying the identity of each interface board for the host computer application to call, so as to achieve communication isolation and data synchronization between the host computer application and each interface board.

2. A software testing platform based on high-speed multi-interface ground detection as claimed in claim 1, characterized in that: The functional functions encapsulated in the middleware layer allow the host computer application to distinguish different interface boards by device ID. The FPGA program of each interface board allocates a unique device ID corresponding to the board in the XDMA IP core, and calls the read and write functions of multiple boards at the same time to realize parallel testing of multiple different types of interfaces.

3. A software testing platform based on high-speed multi-interface ground detection as claimed in claim 1, characterized in that: The host computer application uses asynchronous programming mode and parallel computing technology to enhance the platform's data processing capabilities and response speed, ensuring that real-time requirements in high-speed data flow scenarios are met.

4. A software testing platform based on high-speed multi-interface ground detection as claimed in claim 3, characterized in that: The asynchronous programming model includes using the asynchronous programming model async / await provided by C# to write non-blocking code, allowing the application to continue executing other tasks while waiting for the I / O operation to complete. It is suitable for processing I / O intensive operations.

5. A software testing platform based on high-speed multi-interface ground detection as claimed in claim 3, characterized in that: The parallel computing technology includes utilizing the Task Parallel Library of C# to realize the reading and writing of data of multiple interface boards, so as to ensure the real-time processing of the high-speed data read from each interface.

6. A testing method using a software testing platform based on high-speed multi-interface ground detection as claimed in any one of claims 1 to 6, characterized in that: The following steps are involved: Identify implementation options for testing multiple different types of interfaces in parallel; The functions of reading and writing board files and connecting boards on the host computer are encapsulated into a dynamic link library DLL through C++ as the middleware layer; The host computer application written in C# directly calls the external DLL function to communicate with the interface board, and distinguishes different boards through the device ID; Use asynchronous programming patterns and parallel computing techniques to meet real-time response requirements.

7. The testing method according to claim 6, characterized in that: It also includes temporarily storing the data received from each interface board in a cache area in the memory and then asynchronously writing it to persistent storage to prevent data loss.

8. The testing method according to claim 6, characterized in that: It also includes adopting a timed refresh strategy instead of real-time refresh when data on the user interface needs to be updated to maintain the smoothness of UI response.

9. The testing method according to claim 6, characterized in that: Determine an implementation plan for parallel testing of multiple different types of interfaces, so that each interface has an independent task queue and thread pool, including task division and thread allocation. Task division is set to divide the test task of each interface into multiple subtasks, including board initialization, read and write operations, status check, file storage, and data display; thread allocation is set to allocate an independent thread pool for each interface type to ensure that they can be executed in parallel without interfering with each other.

10. The testing method according to claim 6, characterized in that: The host computer application written in C# directly calls the external DLL function to communicate with the interface board, and distinguishes different boards by device ID. The specific steps include: Declare DLL functions in C# and use the DllImport attribute to declare functions in the DLL so that they can be called in C#; Call OpenBoard() to initialize the board; According to the communication protocol, the data to be sent is formatted and the received data is parsed to extract valid data; The pre-processed data is written to the board by calling the interface function WriteData(), and the sending interface displays the sending progress and status in real time; Call the interface function ReadData() to read data; Call CloseBoard() to close the board.