Embedded automatic testing system and testing method thereof
By designing an embedded automatic test system, the problems of cumbersome embedded operating system testing process and difficulty in data aggregation are solved, efficient testing process and scalability are achieved, and the diversified needs of embedded testing are met.
Patent Information
- Application Number
- CN202411021260.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-29
AI Technical Summary
The testing process of existing embedded operating systems is cumbersome, the testing efficiency is low, and large amounts of data cannot be effectively summarized and compared. The existing automated testing framework has insufficient scalability and portability and cannot meet the needs of embedded testing.
An embedded automatic testing system is designed, including interconnected test modules and functional modules, providing a variety of test functional units, supporting synchronous and sequential testing, integrated environment configuration, device management, log management, email sending, report generation and other functions , to meet the different testing needs of users.
It improves the testing efficiency, realizes the simultaneous or sequential execution of multiple tests, maximizes the use of test equipment, and can summarize the test data to form a highly readable document to meet the expansion needs of the embedded test system.
Smart Images

Figure CN118550839B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of automatic testing framework in embedded operating system, and in particular to an embedded automatic testing system and a testing method thereof. Background Art
[0002] Due to its own complexity, the embedded operating system is very cumbersome during the testing process. In many cases, a large number of tests are required to verify its functions and performance. For example, the testing efficiency is greatly reduced by manually calling the test program for verification, and a large amount of data cannot be summarized, resulting in the inability to compare the data.
[0003] In view of the current situation, automated testing is an indispensable testing tool. There are many existing automated testing frameworks on the market. Although they can temporarily meet the product testing process, their scalability and portability cannot fully meet the testing needs. Most of them have the following defects and shortcomings:
[0004] 1) The test environment construction and test execution are cumbersome, and the project cycle is prolonged;
[0005] 2) Multi-device testing and interactive testing completely rely on manual testing;
[0006] 3) There is too much test data to be aggregated into a standard document;
[0007] 4) The existing automated testing framework cannot meet the scalability requirements of embedded testing.
[0008] Therefore, there is an urgent need to provide an embedded automatic testing system and a testing method thereof to solve the defects and deficiencies in the above-mentioned prior art. Summary of the invention
[0009] In order to solve the defects and shortcomings in the prior art, the present invention provides an embedded automatic testing system and a testing method thereof.
[0010] The specific scheme provided by the present invention is:
[0011] An embedded automatic test system, characterized in that: the system comprises a test module and a function module connected to each other, the function module provides a corresponding function unit for the test selected by the user in the test module; wherein,
[0012] The test module integrates multiple tests and test information and test equipment information corresponding to the tests;
[0013] The functional module is provided with a functional unit corresponding to the test, and the functional unit is a test environment matching the corresponding test configuration, analyzes the test results, generates corresponding logs and reports based on the test results and sends them via email;
[0014] One end of the functional module is connected to a calling module, and a user can call a functional unit in the functional module through the calling module;
[0015] The other end of the functional module is connected to the node module to call the corresponding test equipment according to the test selected by the user in the test module.
[0016] As a further preferred embodiment of the present invention, the tests integrated in the test module include at least smoke test, BSP test, Kernel test, IDE test and cloud native module test.
[0017] As a further preferred embodiment of the present invention, the tests integrated in the test module can be performed in a synchronous manner or in a sequential manner according to the user's selection.
[0018] As a further preferred embodiment of the present invention, the functional units in the functional module include an environment configuration unit, a device management unit, an environment update unit, a test execution unit, a log management unit, an email sending unit, a report sending unit and a document processing unit; wherein,
[0019] The environment configuration unit provides a corresponding test environment according to the test selected by the user;
[0020] The device management unit manages the test devices and provides the use rights of the corresponding test devices according to the test selected by the user;
[0021] The environment updating unit updates the test environment provided to the user by the environment configuration unit;
[0022] The test execution unit performs corresponding tests using the test equipment in the updated test environment;
[0023] The log management unit writes the test steps and test results in the execution process into the test log in a preset format and saves them to the corresponding log server;
[0024] The mail sending unit and the report sending unit send the test log in the form of mail and report respectively;
[0025] The document processing unit edits the test data into a document and provides the document to the user.
[0026] As a further preferred embodiment of the present invention, the functional unit in the functional module further includes a network interface unit and a remote interface unit, wherein:
[0027] The network interface unit at least includes an ftp interface, an sftp interface and a tftp interface;
[0028] The remote interface unit at least includes a telnet interface and an ssh interface.
[0029] As a further preferred embodiment of the present invention, the functional unit in the functional module also includes a thread support unit, which provides corresponding thread function support for the test selected by the user, wherein the thread function support at least includes multi-threaded test script function support, concurrent test function support, system stability test function support and control communication interface function support.
[0030] As a further preferred embodiment of the present invention, the functional unit in the functional module also includes an extended functional unit, and the extended function at least includes a user experience function, a debugging tool integration function, a real-time feedback monitoring function and a remote testing support function.
[0031] As a further preferred embodiment of the present invention, the calling module includes a manual calling unit, a software calling unit and an interface calling unit.
[0032] As a further preferred embodiment of the present invention, the node module includes a variety of test devices, and provides corresponding test devices according to the test selected by the user.
[0033] Furthermore, the present invention also provides a testing method for an embedded automatic testing system, characterized in that it comprises the following steps:
[0034] 1) Users select the required test type as needed;
[0035] 2) Configure a test environment that matches the test type;
[0036] 3) Provide access to corresponding test equipment according to the test type;
[0037] 4) Update the parameters in the test environment;
[0038] 5) Use the test equipment to conduct corresponding tests in the updated test environment;
[0039] 6) Write the test results into the test log in a preset format and save it;
[0040] 7) Send the test logs by email and report respectively;
[0041] 8) Edit the test data into document form and provide it to users.
[0042] Compared with the prior art, the present invention can achieve the following technical effects:
[0043] 1) The present invention provides an embedded automatic test system and a test method thereof. Multiple tests can be performed synchronously or sequentially. The synchronous test can save test time and improve test efficiency, while the sequential test can maximize the effective use of test equipment and has a wide range of applications.
[0044] 2) The present invention provides an embedded automatic test system and a test method thereof, which can summarize the test data into a document form and provide it to the user with high readability.
[0045] 3) The present invention provides an embedded automatic testing system and a testing method thereof, which integrates multiple tests into the system, has a simple and convenient testing flow, an efficient testing process, and can meet different testing needs of users.
[0046] 4) The present invention provides an embedded automatic test system and a test method thereof, which are provided with a variety of functional units and extended functional units, and effectively meet the expansion needs of the embedded test system. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a logical structure diagram of the test system provided by the present invention.
[0048] Figure 2 A flow chart of the steps of the testing method provided by the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] In the description of the present invention, it should be noted that the terms "upper", "lower", "inner", "outer", "front end", "rear end", "two ends", "one end", "the other end" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0051] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0052] [First embodiment]
[0053] like Figure 1 The first embodiment of the present invention is shown, which provides an embedded automatic test system, including interconnected test modules and function modules, wherein the function module provides corresponding function units for the test selected by the user in the test module; wherein:
[0054] The test module integrates multiple tests and test information and test equipment information corresponding to the tests. In this embodiment, the tests integrated in the test module include at least smoke test, BSP test, Kernel test, IDE test and cloud native test, etc. The original separate tests are integrated through the system to meet the different testing needs of users.
[0055] Preferably, the tests integrated in the test module in this embodiment can be performed in multiple ways simultaneously or in sequence according to the user's choice. The simultaneous test can save test time and improve test efficiency, while the sequential test can maximize the effective use of test equipment and has a wide range of applications. The test module in this embodiment performs corresponding configuration management on the test program through a json table file, and the corresponding test program needs to be configured in the json table file in advance. When the user selects the corresponding test case set or the corresponding test program in the upper layer (in this process, the engineer can choose to perform the test simultaneously, in sequence, or according to the preset priority), the automated test framework will execute the test program in sequence according to the return value of the script in the upper layer.
[0056] like Figure 1 As shown, the system provided in this embodiment also includes a functional module,
[0057] The functional module is provided with functional units corresponding to the test, which are test environments that match the corresponding test configurations, analyze the test results, generate corresponding logs and reports from the test results and send them via email; wherein, the functional units in the functional module include an environment configuration unit, a device management unit, an environment update unit, a test execution unit, a log management unit, an email sending unit, a report sending unit and a document processing unit; wherein,
[0058] The environment configuration unit provides a corresponding test environment according to the test selected by the user;
[0059] The device management unit manages the test devices and provides the use rights of the corresponding test devices according to the test selected by the user;
[0060] The environment updating unit updates the test environment provided to the user by the environment configuration unit;
[0061] The test execution unit performs corresponding tests using the test equipment in the updated test environment;
[0062] The log management unit writes the test steps and test results in the execution process into the test log in a preset format and saves them to the corresponding log server;
[0063] The mail sending unit and the report sending unit send the test log in the form of mail and report respectively;
[0064] The document processing unit edits the test data into a document and provides it to the user.
[0065] At the same time, the functional units in the functional module also include a network interface unit and a remote interface unit to meet the needs of network connection and remote connection, wherein:
[0066] The network interface unit at least includes an ftp interface, an sftp interface and a tftp interface;
[0067] The remote interface unit at least includes a telnet interface and an ssh interface.
[0068] In this embodiment, if Figure 1 As shown, the functional unit in the functional module also includes a thread support unit, which provides corresponding thread function support for the test selected by the user, wherein the thread function support at least includes multi-threaded test script function support, concurrent test function support, system stability test function support and control communication interface function support. Among them, the multi-threaded test script function support enables the test script to run in one or more threads, and simulates the scene through multi-threading; the concurrent test function support enables multiple test scripts or tasks to be run simultaneously to check the discovery of multi-task and multi-concurrency of the embedded system; the system stability test function support can test the stability and reliability of the system under time operation and high load through multi-threaded testing; and the control communication interface function support can simultaneously use the telnet interface, ssh interface, ftp interface, and sftp interface concurrently, wherein the telnet interface is used to issue commands, the ftp interface is used to transfer files, the sftp interface is used to upload image files, and the ssh interface is used to log in to an account, etc.
[0069] In addition, as a preferred embodiment, the functional unit in the functional module also includes an extended functional unit, and the extended functions include at least a user experience function, a debugging tool integration function, a real-time feedback monitoring function, and a remote testing support function. Among them, the user experience function can be realized by adding a UI interface. Users can rely on simple script selection to execute the test program without feeling. All test programs are completely self-executed through the internal core engine, and finally presented in the form of data summary reports or line charts, bar charts, etc. and allowed to be called; the debugging tool integration function integrates advanced debugging tools, such as dynamic analysis tools and static code tools, to help developers identify and fix problems faster; the real-time feedback monitoring function provides real-time test feedback and system monitoring, so that developers and testers can understand the test progress and results in a timely manner; and the remote testing support function allows testers to perform tests in a remote environment, improving the flexibility and convenience of the test; by setting up a variety of functional units and extended functional units, the expansion needs of the embedded test system can be effectively met.
[0070] One end of the function module is connected to the calling module, and the user can call the function unit in the function module through the calling module; in this embodiment, Figure 1 As shown, the calling module includes a manual calling unit, a software calling unit and an interface calling unit, thereby providing multiple calling methods for user convenience.
[0071] The other end of the function module is connected to the node module to call the corresponding test equipment according to the test selected by the user in the test module; Figure 1 As shown, the node module includes a variety of test equipment, and provides the corresponding test equipment according to the test selected by the user. The test equipment in this embodiment uses an embedded test board. The choice of test equipment depends on the user's corresponding engineering script in the upper layer to define whether to select multiple nodes or a single node, and each node itself has its own corresponding CPU, so the process of testing data needs to rely on the performance of the test equipment itself.
[0072] [Second embodiment]
[0073] like Figure 2 As shown, the second embodiment of the present invention also provides a testing method for an embedded automatic testing system, comprising the following steps:
[0074] 1) Users select the required test type as needed;
[0075] 2) Configure a test environment that matches the test type;
[0076] 3) Provide access to corresponding test equipment according to the test type;
[0077] 4) Update the parameters in the test environment;
[0078] 5) Use the test equipment to conduct corresponding tests in the updated test environment;
[0079] 6) Write the test results into the test log in a preset format and save it;
[0080] 7) Send the test logs by email and report respectively;
[0081] 8) Edit the test data into document form and provide it to users.
[0082] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. An embedded automatic test system, characterized in that: The system includes interconnected test modules and function modules, wherein the function modules provide corresponding function units for the tests selected by the user in the test modules; The test module integrates multiple tests and test information and test equipment information corresponding to the tests; The functional module is provided with a functional unit corresponding to the test, and the functional unit is a test environment matching the corresponding test configuration, analyzes the test results, generates corresponding logs and reports based on the test results and sends them via email; One end of the functional module is connected to a calling module, and a user can call a functional unit in the functional module through the calling module; The other end of the functional module is connected to the node module to call the corresponding test equipment according to the test selected by the user in the test module; The tests integrated in the test module include at least smoke test, BSP test, Kernel test, IDE test and cloud native module test; The functional units in the functional module include an environment configuration unit, a device management unit, an environment update unit, a test execution unit, a log management unit, an email sending unit, a report sending unit and a document processing unit; wherein, The environment configuration unit provides a corresponding test environment according to the test selected by the user; The device management unit manages the test devices and provides the use rights of the corresponding test devices according to the test selected by the user; The environment updating unit updates the test environment provided to the user by the environment configuration unit; The test execution unit performs corresponding tests using the test equipment in the updated test environment; The log management unit writes the test steps and test results in the execution process into the test log in a preset format and saves them to the corresponding log server; The mail sending unit and the report sending unit send the test log in the form of mail and report respectively; The document processing unit edits the test data into a document form and provides it to the user; The functional units in the functional module also include a network interface unit and a remote interface unit, wherein: The network interface unit at least includes an ftp interface, an sftp interface and a tftp interface; The remote interface unit at least includes a telnet interface and an ssh interface; The functional unit in the functional module also includes a thread support unit, which provides corresponding thread function support for the test selected by the user, wherein the thread function support at least includes multi-threaded test script function support, concurrent test function support, system stability test function support and control communication interface function support; The functional unit in the functional module also includes an extended functional unit, and the extended function at least includes a user experience function, a debugging tool integration function, a real-time feedback monitoring function, and a remote testing support function; The calling module includes a manual calling unit, a software calling unit and an interface calling unit.
2. An embedded automatic test system according to claim 1, characterized in that: The tests integrated in the test module can be performed in multiple ways simultaneously or in multiple ways in sequence according to the user's choice.
3. An embedded automatic test system according to claim 1, characterized in that: The node module includes a variety of test devices, and provides corresponding test devices according to the test selected by the user.
4. A testing method for an embedded automatic testing system according to any one of claims 1 to 3, characterized in that: The following steps are involved: 1) Users select the required test type as needed; 2) Configure a test environment that matches the test type; 3) Provide access to corresponding test equipment according to the test type; 4) Update the parameters in the test environment; 5) Use the test equipment to conduct corresponding tests in the updated test environment; 6) Write the test results into the test log in a preset format and save it; 7) Send the test logs by email and report respectively; 8) Edit the test data into document form and provide it to users.
Citation Information
Patent Citations
Test system and service side thereof
CN104731702A
Test cloud platform system and test method for power business
CN110059008A
Automatic test framework based on embedded equipment
CN111190812A
Storage equipment testing method and device, computer equipment and storage medium
CN116382991A
