Automatic testing method, device and equipment for embedded operating system and medium
By determining the embedded operating system and test files, generating test package files and deploying them to the target platform, the problem of low compatibility of embedded operating system tests is solved, and multi-platform automated testing and efficiency improvement is achieved.
Patent Information
- Application Number
- CN202411089584.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-03
AI Technical Summary
The prior art is less efficient when testing embedded operating system compatibility and lacks methods that can ensure the testing efficiency of embedded operating systems.
By determining the embedded operating system and target test files to be tested, including multiple sets of test case codes, determining the test platform information and architecture categories, generating test package files for each architecture category, and deploying the embedded operating system to the target test platform Carry out tests to achieve full-process automated testing.
It realizes the full automatic testing of embedded operating systems at the same time for multiple target test platforms of different architectural categories, improving the automated testing efficiency of embedded operating systems and ensuring test compatibility.
Smart Images

Figure CN119065967A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to an automated testing method, device, equipment and medium for an embedded operating system. Background Art
[0002] The embedded operating system itself is very complex, involving multiple levels such as hardware, software, and drivers. Therefore, the functional testing process is very cumbersome.
[0003] At present, if the compatibility of an embedded operating system is tested, the embedded operating system needs to be deployed on test platforms of different architectures and functional tests need to be performed in sequence, but the test efficiency is often poor. Therefore, there is a lack of a method to ensure the efficiency of the embedded operating system test on the basis of achieving the compatibility test of the embedded operating system. Summary of the invention
[0004] The present invention provides an automated testing method, device, equipment and medium for an embedded operating system, so as to solve the technical problem that the efficiency of the embedded operating system test cannot be guaranteed on the basis of testing the compatibility of the embedded operating system.
[0005] According to one aspect of the present invention, there is provided an automated testing method for an embedded operating system, wherein the method comprises:
[0006] In response to the system test operation, determining an embedded operating system to be tested and a target test file, wherein the target test file includes a plurality of groups of test case codes;
[0007] Determine the test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and an architecture category corresponding to each of the target test platforms;
[0008] For each of the architecture categories, determining a test package file corresponding to the architecture category, wherein a target format of target data in the test package file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file;
[0009] Determine the test packaging file for each of the target test platforms based on the architecture category;
[0010] For each of the target test platforms, the embedded operating system is deployed on the target test platform, and the embedded operating system deployed on the target test platform is tested through the target test file to obtain a system test result.
[0011] According to another aspect of the present invention, there is provided an automated testing device for an embedded operating system, wherein the device comprises:
[0012] A system file determination module, used to determine an embedded operating system to be tested and a target test file in response to a system test operation, wherein the target test file includes a plurality of groups of test case codes;
[0013] A test platform determination module, used to determine the test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and the architecture category corresponding to each of the target test platforms;
[0014] A category file packaging module, used for determining, for each of the architecture categories, a test packaging file corresponding to the architecture category, wherein a target format of target data in the test packaging file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file;
[0015] A package file sending module, used for determining the test package file of each target test platform based on the architecture category;
[0016] The system test module is used to deploy the embedded operating system on each target test platform, test the embedded operating system deployed on the target test platform through the target test file, and obtain the system test result.
[0017] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the automated testing method for an embedded operating system described in any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the automated testing method for an embedded operating system described in any embodiment of the present invention when executed.
[0022] The technical solution of the embodiment of the present invention is to determine the embedded operating system and the target test file to be tested in response to the system test operation, wherein the target test file includes multiple groups of test case codes; determine the test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and the architecture category corresponding to each target test platform; for each architecture category, determine the test package file corresponding to the architecture category, wherein the target format of the target data in the test package file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file; determine the test package file of each target test platform based on the architecture category; for each target test platform, deploy the embedded operating system on the target test platform, and test the embedded operating system deployed on the target test platform through the target test file to obtain the system test result. The present invention can realize the full-process automated testing of the embedded operating system for multiple target test platforms of different architecture categories at the same time, and improve the efficiency of the automated testing of the embedded operating system on the basis of realizing the compatibility test of the embedded operating system.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 is a flow chart of an automated testing method for an embedded operating system provided according to Embodiment 1 of the present invention;
[0026] Figure 2 is a flow chart of an automated testing method for an embedded operating system provided according to Embodiment 2 of the present invention;
[0027] Figure 3 is an architectural diagram of an automated testing system for an embedded operating system provided according to an embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of the structure of an automatic testing device for an embedded operating system provided according to Embodiment 3 of the present invention;
[0029] Figure 5 It is a structural schematic diagram of an electronic device for implementing the automated testing method of an embedded operating system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 A flowchart of an automated testing method for an embedded operating system is provided for the first embodiment of the present invention. This embodiment is applicable to the case where a multi-platform test is performed on an embedded operating system at the same time. The method can be executed by an automated testing device for an embedded operating system. The automated testing device for an embedded operating system can be implemented in the form of hardware and / or software. The automated testing device for an embedded operating system can be configured in a computer. Figure 1 As shown, the method includes:
[0034] S110 . In response to a system test operation, determine an embedded operating system to be tested and a target test file, wherein the target test file includes a plurality of groups of test case codes.
[0035] The system test operation can be understood as an operation that needs to be performed by the user before the automated test of the embedded operating system is performed. In the embodiment of the present invention, the system test operation can be preset according to the scenario requirements and is not specifically limited here.
[0036] Optionally, the system test operation may include one or more of an operation of selecting the embedded operating system to be tested, an operation of importing the pre-compiled target test file including multiple groups of test case codes, and an operation of starting the system test.
[0037] The target test file can be used to test the embedded operating system. The target test file can be a lightweight data exchange format (JavaScript Object Notation, JSON) file.
[0038] The test case code can be understood as the code corresponding to the test case. In the embodiment of the present invention, a group of the test case codes can represent a test scenario, and a test scenario can be a set of operation processes that a user may execute for the embedded operating system.
[0039] In an embodiment of the present invention, the test case code may be pre-compiled according to scenario requirements, which is not specifically limited here. Optionally, before determining the embedded operating system to be tested and the target test file in response to the system test operation, the method further includes:
[0040] In response to a user's use case compilation operation, the target test file is determined, wherein the use case compilation operation may include at least one of compiling test case codes, setting test case code groups, configuring the execution order of target test cases in each group of test case codes, and setting test case parameters.
[0041] In an embodiment of the present invention, the use case compilation operation can be performed based on user requirements and test requirements. The present invention achieves the effect of automated testing of embedded operating systems based on user and scenario requirements, can provide and implement highly complex tests, improve test flexibility, and enhance user experience.
[0042] Optionally, after determining the embedded operating system to be tested and the target test file, it also includes:
[0043] In response to the use case update operation on the target test file, an updated target test file is obtained.
[0044] Among them, the use case update operation can be understood as an operation of updating the target test file, and can also be understood as an operation of updating the test case code. Optionally, the use case update operation can include one or more of the operations of adding, deleting and modifying the test case code. For example, adding, deleting or modifying target test cases, adjusting test case code groups, adjusting the execution order of target test cases, or modifying test case parameters, etc. In an embodiment of the present invention, the same target test case can be used to test multiple different target test platforms.
[0045] In an embodiment of the present invention, the test case code includes multiple target test cases and the execution order between the target test cases. Correspondingly, the test case update operation can be used to update the target test cases and / or the execution order.
[0046] In an embodiment of the present invention, the test case code of the embedded operating system to be tested can be updated based on user needs or test needs, so that the test case code is more compatible with the functions of the embedded operating system and closer to user needs.
[0047] S120. Determine test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and an architecture category corresponding to each of the target test platforms.
[0048] The test platform information may be understood as information of a test platform corresponding to the embedded operating system to be tested.
[0049] Specifically, the test platform information corresponding to the embedded operating system is determined through a target database, wherein the target database may include one or more of multiple candidate operating systems, multiple candidate test platforms, a mapping relationship between candidate operating systems and candidate test platforms, an identifier corresponding to each candidate operating system, an architecture category corresponding to each candidate operating system, and an identifier corresponding to each candidate test platform.
[0050] The target test platform can be understood as a test platform of the embedded operating system.
[0051] The architecture category can be understood as the category corresponding to the architecture of the target test platform. Optionally, the architecture category may include arm, aarch64, mips, loongarch, risc-v, sparc, x86 and x86-64, etc.
[0052] The technical solution of the present invention deploys the embedded operating system to be tested on multiple target test platforms of different architecture categories for system testing, thereby avoiding the problem of a single test platform in the traditional operating system testing process and being unable to test the compatibility performance of the operating system on multiple test platforms, and realizing platform compatibility testing of multiple test platforms for the embedded operating system.
[0053] S130. For each of the architecture categories, determine a test package file corresponding to the architecture category, wherein a target format of target data in the test package file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file.
[0054] The test package file may include the embedded operating system in the target format and the target test file in the target format. In the embodiment of the present invention, the target format may be understood as a format that can be recognized by the target test platform of the current architecture category.
[0055] Optionally, the target formats corresponding to different architecture categories may be different.
[0056] Optionally, the determining of the test package file corresponding to the architecture category includes:
[0057] Compiling the embedded operating system and the target test file respectively based on the architecture category to obtain the embedded operating system in the target format and the target test file in the target format in turn;
[0058] The embedded operating system in the target format and the target test file in the target format are packaged to obtain the test package file.
[0059] In the embodiment of the present invention, there may be multiple target test platforms of one architecture category. Specifically, for one architecture category, one test package file is determined.
[0060] The technical solution of the present invention, for compiling a target test file, can be a process of compiling the format of the target test file into a target format recognizable by a target test platform. The present invention ensures the recognizability of the acquired test packaging file by each of the target test platforms.
[0061] S140: Determine the test packaging file for each of the target test platforms based on the architecture category.
[0062] Optionally, determining the test package file for each target test platform based on the architecture category includes:
[0063] For each of the architecture categories, at least one of the target test platforms corresponding to the architecture category is determined, and the test package file corresponding to the architecture category is transmitted to the at least one of the target test platforms corresponding to the architecture category.
[0064] In the embodiment of the present invention, the target test platform corresponding to each architecture category may be one or more.
[0065] The technical solution of the present invention does not need to package files for each target test platform. It only needs to package files for the target test platform of each architecture category first, and then, for each architecture category, transmit the test packaging file corresponding to the architecture category to at least one target test platform corresponding to the architecture category, thereby achieving the effect of allocating the test packaging file in a recognizable target format to each target test platform.
[0066] S150. For each of the target test platforms, deploy the embedded operating system on the target test platform, test the embedded operating system deployed on the target test platform through the target test file, and obtain a system test result.
[0067] The system test result may be understood as a result indicating whether the embedded operating system can run normally on the target test platform. Optionally, the system test result may include a normal system test and / or an abnormal system test.
[0068] Optionally, after obtaining the system test result, the method further includes:
[0069] In response to the test query operation, a test report of the queried target test platform is returned.
[0070] The test query operation can be understood as an operation of querying the automated test data of the embedded operating system. Optionally, the test query operation can be used to query the automated test data corresponding to the target test platform of the target query, wherein the automated test data can include test data streams and system test results.
[0071] The test report may be understood as a report of an automated test of an embedded operating system.
[0072] It can be understood that, before returning the queried test report of the target test platform in response to the test query operation, it also includes:
[0073] Generate the test report. In the embodiment of the present invention, the test report is automatically generated without the intervention of manual operation.
[0074] The technical solution of the embodiment of the present invention is to determine the embedded operating system and the target test file to be tested in response to the system test operation, wherein the target test file includes multiple groups of test case codes; determine the test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and the architecture category corresponding to each target test platform; for each architecture category, determine the test package file corresponding to the architecture category, wherein the target format of the target data in the test package file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file; determine the test package file of each target test platform based on the architecture category; for each target test platform, deploy the embedded operating system on the target test platform, and test the embedded operating system deployed on the target test platform through the target test file to obtain the system test result. The present invention can realize the full-process automated testing of the embedded operating system for multiple target test platforms of different architecture categories at the same time, and improve the efficiency of the automated testing of the embedded operating system on the basis of realizing the compatibility test of the embedded operating system.
[0075] Embodiment 2
[0076] Figure 2 This is a flowchart of an automated testing method for an embedded operating system provided in the second embodiment of the present invention. This embodiment is to test the embedded operating system deployed on the target test platform through the target test file in the above embodiment, and refine the system test results obtained. Figure 2 As shown, the method includes:
[0077] S210: In response to the system test operation, determine the embedded operating system to be tested and the target test file.
[0078] S220: Determine the test platform information corresponding to the embedded operating system.
[0079] S230: For each of the architecture categories, determine a test package file corresponding to the architecture category.
[0080] S240: Determine the test packaging file for each of the target test platforms based on the architecture category.
[0081] S250: For each of the target test platforms, deploy the embedded operating system on the target test platform.
[0082] Optionally, each group of the test case codes includes multiple target test cases and an execution order between the target test cases.
[0083] Among them, the target test case can be understood as a test case for testing the embedded operating system deployed on the target test platform. In an embodiment of the present invention, the target test case can be pre-configured or set according to scenario requirements, which is not specifically limited here. Optionally, the target test case includes at least one of a binary test case, a driver test case, and an instruction test case. Among them, one of the binary test cases can include multiple test parameters, wherein the test parameters can be flexibly configured according to the application scenario and user needs.
[0084] The execution order can be understood as the order in which the multiple target test cases are executed. In an embodiment of the present invention, the execution order can be pre-compiled according to the scenario requirements, and no specific settings are made here. For example, a set of test case codes includes test case A, test case B, and test case C. Accordingly, the execution order can be to execute test case A first, then execute test case B, and finally execute test case C; it can also be to execute test case B first, then execute test case A, and finally execute test case C, etc.
[0085] In the embodiment of the present invention, the groups and execution order of the test cases can be pre-customized in the test configuration file through user operations based on user requirements or test requirements.
[0086] In the technical solution of the present invention, for embedded operating systems, it is possible to implement testing of complex scenarios such as use case scenario testing, device testing, multi-use case testing, and multi-parameter testing based on user-defined test scenarios (test cases, test sequences, and test parameters).
[0087] S260: Test the embedded operating system deployed on the target test platform using the target test case and the execution sequence to obtain a test log.
[0088] The test log can be understood as a file that records specific data of the automated test of the embedded operating system. Optionally, the test log includes a group test result corresponding to each group of the test case code, and the group test result includes a sub-test result corresponding to each target test case.
[0089] Optionally, the testing the embedded operating system deployed on the target test platform by using the target test case and the execution order includes:
[0090] Determine the target test case to be executed based on the execution order, and if the target test case includes a counter-test device, start the counter-test device to execute the target test case;
[0091] The test equipment includes a test equipment corresponding to the target test platform and / or other test equipment corresponding to the target test platform, and the test equipment includes a distributed device.
[0092] The test equipment may be understood as a test equipment that needs to perform data interaction test between the test equipments. The test equipment is a device connected to the target test platform.
[0093] In an embodiment of the present invention, each of the target test platforms can be connected to multiple test devices. For example, the test devices corresponding to target test platform A are device 1 and device 2; the test devices corresponding to target test platform B are device 3 and device 4, and device 1, device 2, device 3 and device 4 can be distributed devices located in different geographical locations. The technical solution of the present invention can realize distributed testing.
[0094] Exemplarily, if the target test case to be executed is to send a signal from device 1 to device 2 so that device 2 determines a target result and returns the target result to device 1, then the target test case to be executed includes the devices under test, namely device 1 and device 2.
[0095] The technical solution of the present invention can realize multi-point collaborative testing, that is, to perform automated interactive testing between multiple test devices corresponding to the same or different target test platforms based on target test cases.
[0096] S270: Determine the system test result based on the test log.
[0097] The technical solution of the embodiment of the present invention tests the embedded operating system deployed on the target test platform through the target test case and the execution order to obtain a test log, wherein the test log includes a group test result corresponding to each group of the test case code, and the group test result includes a sub-test result corresponding to each target test case; the system test result is determined based on the test log. The test log of the present invention includes comprehensive test data of the automated test of the embedded operating system, so as to facilitate the traceability of the automated test of the embedded operating system.
[0098] Figure 3 1 is an architecture diagram of an automated testing system for an embedded operating system provided according to an embodiment of the present invention. Figure 3 As shown, the execution subject of the present invention can be an automated testing system. The overall process of the automated testing method of the embedded operating system based on the automated testing system can be:
[0099] 1. Automatically pull the latest or specified version of embedded operating system and test case code;
[0100] 2. According to the requirements of the front-end device management module, match the specified target test platform, and compile and package the embedded operating system and test case code based on the architecture category of the target test platform to obtain the test package file. At the same time, push the test package file to the mirror server and start the automatic test engine Fpats to perform system testing;
[0101] 3. Through the automatic test engine Fpats, according to the device management module and the test management module, the embedded operating system in the test package file is automatically deployed to the target test platform, and the system test is performed based on the test case code;
[0102] 4. Interpret the lightweight data exchange format (JavaScript Object Notation, JSON) file including the test case code in the test management module, form a test scenario including multiple target test cases and the execution order between multiple test cases, and test the embedded operating system based on the test equipment of the target test platform deployed with the embedded operating system and the target test case.
[0103] 5. During the test process, the test log information and test results are obtained, a test report is generated, the test report is uploaded to the test result server, and sent to relevant users. Relevant users can log in to the automated test system online and view the test results through the result server.
[0104] The present invention adopts a JSON format configuration file, which can facilitate visual viewing and manual real-time updating of target test cases, facilitate real-time editing of test case codes with more complex test scenarios based on test requirements, and achieve scalability of target test cases.
[0105] With the continuous upgrading of embedded operating system functions, the traditional method of testing one function through one test case can no longer meet user needs. The present invention adopts a group design in which a set of test case codes corresponds to one test scenario. A set of test case codes designs multiple test cases and test processes between test cases. The test case can be set with multiple attribute characteristics. The present invention supports target test cases in different formats, such as driver files, system built-in commands, and general application executable files. The present invention also supports not changing the test case but only modifying the configuration file, flexibly configuring multiple input parameters according to test requirements, supporting restarting the test equipment during the test, supporting ultra-long time system testing, etc.
[0106] Exemplarily, the present invention groups multiple target test cases in order and requires a restart device to execute; if it depends on other devices, the server is started first, and then the test cases of this device are executed, that is, the test between devices; before executing a certain test case, it depends on this device to execute the specified driver first, and the test case can have multiple test parameters.
[0107] The present invention realizes the effects of simultaneously performing full-process automated testing of embedded operating systems on multiple target test platforms of different architecture categories, testing between test devices, expanding test cases based on test requirements, fully automated system testing, improving system testing efficiency, automatically generating test reports, and supporting multiple test cases (binary test cases, driver test cases, and instruction test cases) for system testing.
[0108] Embodiment 3
[0109] Figure 4 This is a schematic diagram of the structure of an automated testing device for an embedded operating system provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a system file determination module 310, a test platform determination module 320, a category file packaging module 330, a packaging file sending module 340 and a system test module 350.
[0110] Among them, the system file determination module 310 is used to determine the embedded operating system and the target test file to be tested in response to the system test operation, wherein the target test file includes multiple groups of test case codes; the test platform determination module 320 is used to determine the test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and the architecture category corresponding to each of the target test platforms; the category file packaging module 330 is used to determine the test packaging file corresponding to each of the architecture categories, wherein the target format of the target data in the test packaging file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file; the packaging file sending module 340 is used to determine the test packaging file for each of the target test platforms based on the architecture category; the system test module 350 is used to deploy the embedded operating system on the target test platform for each of the target test platforms, test the embedded operating system deployed on the target test platform through the target test file, and obtain the system test result.
[0111] The technical solution of the embodiment of the present invention is to determine the embedded operating system and the target test file to be tested in response to the system test operation, wherein the target test file includes multiple groups of test case codes; determine the test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and the architecture category corresponding to each target test platform; for each architecture category, determine the test package file corresponding to the architecture category, wherein the target format of the target data in the test package file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file; determine the test package file of each target test platform based on the architecture category; for each target test platform, deploy the embedded operating system on the target test platform, and test the embedded operating system deployed on the target test platform through the target test file to obtain the system test result. The present invention can realize the full-process automated testing of the embedded operating system for multiple target test platforms of different architecture categories at the same time, and improve the efficiency of the automated testing of the embedded operating system on the basis of realizing the compatibility test of the embedded operating system.
[0112] Optionally, the category file packaging module 330 is specifically used for:
[0113] Compiling the embedded operating system and the target test file respectively based on the architecture category to obtain the embedded operating system in the target format and the target test file in the target format in turn;
[0114] The embedded operating system in the target format and the target test file in the target format are packaged to obtain the test package file.
[0115] Optionally, the packaged file sending module 340 is specifically used to:
[0116] For each of the architecture categories, at least one of the target test platforms corresponding to the architecture category is determined, and the test package file corresponding to the architecture category is transmitted to the at least one of the target test platforms corresponding to the architecture category.
[0117] Optionally, each group of the test case codes includes a plurality of target test cases and an execution order between the target test cases; the system test module 350 includes: a system test unit and a result determination unit;
[0118] Wherein, the system test unit is used to test the embedded operating system deployed on the target test platform through the target test case and the execution order to obtain a test log, wherein the test log includes a group test result corresponding to each group of the test case code, and the group test result includes a sub-test result corresponding to each of the target test cases;
[0119] The result determination unit is used to determine the system test result based on the test log.
[0120] Optionally, the system testing unit is specifically used for:
[0121] Determine the target test case to be executed based on the execution order, and if the target test case includes a counter-test device, start the counter-test device to execute the target test case;
[0122] The test equipment includes a test equipment corresponding to the target test platform and / or other test equipment corresponding to the target test platform, and the test equipment includes a distributed device.
[0123] Optionally, the automated testing device for the embedded operating system further includes: a test query module, which is used to return a test report of the queried target test platform in response to a test query operation after the system test result is obtained.
[0124] Optionally, the automated testing device for the embedded operating system further includes: a use case update module, which is used to obtain an updated target test file in response to a use case update operation on the target test file after determining the embedded operating system and the target test file to be tested.
[0125] The automatic testing device for an embedded operating system provided in the embodiment of the present invention can execute the automatic testing method for an embedded operating system provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.
[0126] Embodiment 4
[0127] Figure 5A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0128] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0129] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0130] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as an automated testing method for an embedded operating system.
[0131] In some embodiments, the automated testing method for an embedded operating system may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the automated testing method for an embedded operating system described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the automated testing method for an embedded operating system in any other appropriate manner (e.g., by means of firmware).
[0132] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0133] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0134] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0135] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0136] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0137] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0138] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0139] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An automated testing method for an embedded operating system, characterized in that: include: In response to the system test operation, determining an embedded operating system to be tested and a target test file, wherein the target test file includes a plurality of groups of test case codes; Determine the test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and an architecture category corresponding to each of the target test platforms; For each of the architecture categories, determining a test package file corresponding to the architecture category, wherein a target format of target data in the test package file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file; Determine the test packaging file for each of the target test platforms based on the architecture category; For each of the target test platforms, the embedded operating system is deployed on the target test platform, and the embedded operating system deployed on the target test platform is tested through the target test file to obtain a system test result.
2. The method according to claim 1, characterized in that The step of determining the test package file corresponding to the architecture category includes: Compiling the embedded operating system and the target test file respectively based on the architecture category to obtain the embedded operating system in the target format and the target test file in the target format in turn; The embedded operating system in the target format and the target test file in the target format are packaged to obtain the test package file.
3. The method according to claim 1, characterized in that: The step of determining the test package file for each target test platform based on the architecture category includes: For each of the architecture categories, at least one of the target test platforms corresponding to the architecture category is determined, and the test package file corresponding to the architecture category is transmitted to the at least one of the target test platforms corresponding to the architecture category.
4. The method according to claim 1, characterized in that: Each group of test case codes includes a plurality of target test cases and an execution order between the target test cases; The method of testing the embedded operating system deployed on the target test platform through the target test file to obtain a system test result includes: The embedded operating system deployed on the target test platform is tested by the target test case and the execution sequence to obtain a test log, wherein the test log includes a group test result corresponding to each group of the test case code, and the group test result includes a sub-test result corresponding to each target test case; The system test result is determined based on the test log.
5. The method according to claim 4, characterized in that The step of testing the embedded operating system deployed on the target test platform by using the target test case and the execution sequence includes: Determine the target test case to be executed based on the execution order, and if the target test case includes a counter-test device, start the counter-test device to execute the target test case; The test equipment includes a test equipment corresponding to the target test platform and / or other test equipment corresponding to the target test platform, and the test equipment includes a distributed device.
6. The method according to claim 1, characterized in that After obtaining the system test result, the method further includes: In response to the test query operation, a test report of the queried target test platform is returned.
7. The method according to claim 1, characterized in that After determining the embedded operating system to be tested and the target test file, it also includes: In response to the use case update operation on the target test file, an updated target test file is obtained.
8. An automated testing device for an embedded operating system, characterized in that: include: A system file determination module, used to determine an embedded operating system to be tested and a target test file in response to a system test operation, wherein the target test file includes a plurality of groups of test case codes; A test platform determination module, used to determine the test platform information corresponding to the embedded operating system, wherein the test platform information includes multiple target test platforms and the architecture category corresponding to each of the target test platforms; A category file packaging module, used for determining, for each of the architecture categories, a test packaging file corresponding to the architecture category, wherein a target format of target data in the test packaging file corresponds to the architecture category, and the target data includes the embedded operating system and the target test file; A package file sending module, used for determining the test package file of each target test platform based on the architecture category; The system test module is used to deploy the embedded operating system on each target test platform, test the embedded operating system deployed on the target test platform through the target test file, and obtain the system test result.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the automated testing method for an embedded operating system according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the automated testing method for an embedded operating system according to any one of claims 1 to 7 when executed.
