An automatic test system and method based on a non-real-time system
By setting up host computer communication control software and 485 communication board in Windows system, generating and sending test command sequences, the problem of inaccurate communication performance index testing in non-real-time systems is solved, and high-precision device performance testing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INST OF ENVIRONMENTAL FEATURES
- Filing Date
- 2023-12-12
- Publication Date
- 2026-07-21
AI Technical Summary
Windows is a non-real-time system, which leads to inaccurate test results for device communication performance indicators.
By setting up host computer communication control software on the test computer to generate test command sequences, and using the 485 communication board to send the command sequences to the device under test, the capacity of the sending buffer is monitored to ensure that it is not empty, and the response data in the receiving buffer is read to achieve high-precision communication performance index testing.
It enables high-precision communication performance testing in non-real-time systems, making equipment performance testing more comprehensive.
Smart Images

Figure CN117785666B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication testing technology, and in particular to an automatic testing system and method based on a non-real-time system. Background Technology
[0002] Windows is an operating system developed by Microsoft Corporation of the United States, based on a graphical user interface. It is primarily used in devices such as computers and smartphones. It has several sub-series, including standard editions, server editions, mobile editions, and embedded editions, and is one of the most widely used operating systems globally.
[0003] In related technologies, the operating environment of computer display control software is mostly Windows system, but this system is not real-time, which leads to inaccurate test results for device communication performance indicators.
[0004] Therefore, there is an urgent need for an automated testing system and method based on non-real-time systems to solve the above-mentioned technical problems. Summary of the Invention
[0005] To effectively improve the accuracy of communication performance test results, this invention provides an automatic testing system and method based on a non-real-time system.
[0006] In a first aspect, embodiments of the present invention provide an automated testing system based on a non-real-time system, comprising:
[0007] The test computer is equipped with host computer communication control software, which is used to generate test command sequences and send the test command sequences to the 485 communication board in batches according to a preset first cycle. At the same time, it monitors the transmit buffer capacity of the 485 communication board to ensure that the transmit content of the 485 communication board is not blank. The host computer communication control software is also used to read the response data of the device under test in the receive buffer of the 485 communication board to obtain the test results.
[0008] The 485 communication board, installed on the test computer, is used to receive the test command sequence and, using the communication board control software, send the test command sequence to the device under test according to a preset second cycle. At the same time, it receives and stores the response data returned by the device under test into the receive buffer.
[0009] In one possible design, the test instruction sequence includes a random test instruction sequence and a real test instruction sequence.
[0010] In one possible design, the random test instruction sequence is randomly generated using the host computer communication control software.
[0011] In one possible design, the actual test instruction sequence is obtained by reading the data file using the host computer communication control software.
[0012] In one possible design, the first cycle is longer than the second cycle.
[0013] In one possible design, the test computer and the device under test are connected via a communication cable.
[0014] In one possible design, the communication board control software is embedded software.
[0015] Secondly, embodiments of the present invention also provide an automatic testing method based on a non-real-time system, including:
[0016] The host computer communication control software is used to generate a test instruction sequence;
[0017] The host computer communication control software is used to send the test instruction sequence to the 485 communication board in batches according to a preset first cycle.
[0018] The test command sequence is sent to the device under test according to a preset second cycle using the 485 communication board, in order to receive the response data from the device under test;
[0019] The test results of the device under test are obtained by reading the response data using the host computer communication control software.
[0020] In one possible design, the method further includes: using the host computer communication control software to monitor the transmission buffer of the 485 communication board to ensure that the transmission content of the 485 communication board is not blank.
[0021] In one possible design, the test instruction sequence includes a random test instruction sequence and a real test instruction sequence.
[0022] This invention provides an automatic testing system and method based on a non-real-time system. A host computer generates a corresponding sequence based on test commands, then writes the test command sequence into the buffer of a communication board in batches at regular intervals. The communication board then sends the buffered test command sequence to the test device at a preset period, thereby achieving real-time communication with the device under test. Finally, the real-time response data returned by the device under test is stored in a receiving buffer, awaiting retrieval by the host computer. This system does not rely on an operating system. By combining host computer software and embedded software, it achieves high-precision testing of communication performance indicators. Simultaneously, the host computer communication control software uses randomly generated test sequences or reads data files to pre-configure parameters, allowing for flexible changes to parameters even for short-cycle commands, resulting in more comprehensive device performance testing. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of an automatic testing system based on a non-real-time system provided in an embodiment of the present invention;
[0025] Figure 2 This is a flowchart of an automatic testing method based on a non-real-time system provided by an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0027] Please refer to Figure 1 This invention provides an automated testing system based on a non-real-time system, the system comprising:
[0028] The test computer is equipped with host computer communication control software, which is used to generate test command sequences and send the test command sequences to the 485 communication board in batches according to the preset first cycle. At the same time, it monitors the transmit buffer capacity of the 485 communication board to ensure that the transmit content of the 485 communication board is not blank. The host computer communication control software is also used to read the response data of the device under test in the receive buffer of the 485 communication board to obtain the test results.
[0029] The 485 communication board, installed on the test computer, is used to receive test command sequences and, using the communication board control software, send the test command sequences to the device under test according to a preset second cycle. At the same time, it receives and stores the response data returned by the device under test into the receive buffer.
[0030] Specifically, the host computer communication control software can generate test command sequences in two ways: the first is a random test command sequence automatically generated by the software, such as random numbers or incrementing numbers; the second is a real test command sequence obtained by reading a data file. The command sequence generation method must be selected through the host computer communication control software interface.
[0031] Furthermore, the host computer communication control software reads multiple test instruction sequences at once and writes the generated or read test instruction sequences into the cache of the 485 communication board in batches at regular intervals.
[0032] Furthermore, the host computer communication control software needs to monitor the transmit buffer capacity of the 485 communication board, check the number of test instructions in the current transmit buffer, and when the number of test instructions is lower than the set threshold (such as 50 instructions), the host computer communication control software performs a new batch of test instruction cache writing operation to ensure that the transmit buffer is not empty.
[0033] Finally, the response data returned by the device under test is read from the receive buffer of the 485 communication board to complete a complete test process and obtain the performance test results of the device under test.
[0034] In this embodiment of the invention, the preset first period mentioned above is greater than the preset second period. Once the second period is determined, the first period can be automatically set according to the multiple relationship. The specific values of the first period and the second period can be adjusted by those skilled in the art according to actual needs, and will not be elaborated on here.
[0035] In this embodiment of the invention, the communication board control software is embedded software, and the test computer and the device under test are connected through a communication cable. These settings can effectively achieve the testing of high-precision communication performance indicators.
[0036] like Figure 2 As shown in the embodiments of this specification, an automatic testing method based on a non-real-time system is also provided. Employing the automatic testing system based on a non-real-time system mentioned in any of the above embodiments, the method includes:
[0037] Step 200: Generate a test instruction sequence using the host computer communication control software;
[0038] Step 202: Use the host computer communication control software to send the test instruction sequence to the 485 communication board in batches according to a preset first cycle;
[0039] Step 204: Use the 485 communication board to send the test command sequence to the device under test according to a preset second cycle, so as to receive the response data from the device under test;
[0040] Step 206: Use the host computer communication control software to read the response data and obtain the test results of the device under test.
[0041] In this embodiment of the invention, the method further includes using host computer communication control software to monitor the transmission buffer of the 485 communication board to ensure that the transmission content of the 485 communication board is not blank.
[0042] In this embodiment of the invention, the test instruction sequence includes a random test instruction sequence and a real test instruction sequence.
[0043] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An automated testing system based on a non-real-time system, comprising: The test computer is equipped with host computer communication control software, which is used to generate test command sequences and send the test command sequences to the 485 communication board in batches according to a preset first cycle. At the same time, it monitors the transmit buffer capacity of the 485 communication board to ensure that the transmit content of the 485 communication board is not blank. The host computer communication control software is also used to read the response data of the device under test in the receive buffer of the 485 communication board to obtain the test results. The 485 communication board, installed on the test computer, is used to receive the test command sequence and, using the communication board control software, send the test command sequence to the device under test according to a preset second cycle. At the same time, it receives and stores the response data returned by the device under test into the receive buffer.
2. The system according to claim 1, characterized in that, The test instruction sequence includes a random test instruction sequence and a real test instruction sequence.
3. The system according to claim 2, characterized in that, The random test instruction sequence is randomly generated using the host computer communication control software.
4. The system according to claim 2, characterized in that, The actual test instruction sequence is obtained by reading the data file using the host computer communication control software.
5. The system according to claim 1, characterized in that, The first period is longer than the second period.
6. The system according to claim 1, characterized in that, The test computer and the device under test are connected via a communication cable.
7. The system according to claim 1, characterized in that, The communication board control software is embedded software.
8. An automatic testing method based on a non-real-time system, characterized in that, An automated testing system based on a non-real-time system, as described in any one of claims 1-7, comprises: The host computer communication control software is used to generate a test instruction sequence; The host computer communication control software is used to send the test instruction sequence to the 485 communication board in batches according to a preset first cycle. The test command sequence is sent to the device under test according to a preset second cycle using the 485 communication board, in order to receive the response data from the device under test; The test results of the device under test are obtained by reading the response data using the host computer communication control software.
9. The method according to claim 8, characterized in that, Also includes: The host computer communication control software is used to monitor the transmission buffer of the 485 communication board to ensure that the transmission content of the 485 communication board is not blank.
10. The method according to claim 9, characterized in that, The test instruction sequence includes a random test instruction sequence and a real test instruction sequence.