CN-121979773-A - Interface testing method, device and equipment of operating system
Abstract
The invention provides an interface testing method, device and equipment of an operating system, wherein the method comprises the steps of obtaining a plurality of target testing interface information of a target functional module of an embedded operating system; the method comprises the steps of determining test points of each target test interface according to the target test interface information, obtaining test cases for testing the target test interfaces, verifying the test points of the target test interfaces through a plurality of target functions of the test cases to obtain verification results, and obtaining test results of the target test interfaces in the target functional module according to the verification results. The scheme of the invention can carry out integrated test on the interface of the embedded operating system.
Inventors
- NI XIAOYU
- JIANG FAN
- ZHANG CHANG
- WANG HANYU
- ZHANG MENG
- LIU LUMING
- WANG WEI
- MA QINGXIN
Assignees
- 中船(北京)智能装备科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251204
Claims (10)
- 1. An interface testing method of an operating system, comprising: Acquiring a plurality of target test interface information of a target function module of an embedded operating system; determining a test point of each target test interface according to the target test interface information; acquiring a test case for testing the target test interface; verifying the test points of the target test interface through a plurality of target functions of the test case to obtain a verification result; and obtaining test results of a plurality of target test interfaces in the target functional module according to the verification result.
- 2. The method for testing an interface of an operating system according to claim 1, wherein obtaining a plurality of target test interface information of a target function module of an embedded operating system comprises: Acquiring a plurality of functional modules of an embedded operating system and interfaces in each functional module; Classifying the interfaces according to the functional modules, and determining interface definition, input parameters and output result information of each interface to obtain a plurality of target test interface information.
- 3. The method for testing an interface of an operating system according to claim 1, wherein determining a test point of each target test interface according to the plurality of target test interface information comprises: determining the function of each target test interface according to the target test interface information; and determining test points of each target test interface according to the function of each target test interface.
- 4. The method for testing an interface of an operating system according to claim 1, wherein obtaining a test case for testing the target test interface comprises: Determining an objective function required by verifying the test point according to the test point of each objective test interface; Determining an expected result under the condition that the test point is correct; And obtaining the test case according to the objective function and the expected result.
- 5. The method for testing an interface of an operating system according to claim 1, wherein verifying test points of a target test interface by a plurality of objective functions of a test case to obtain a verification result comprises: acquiring hardware configuration and software configuration for deploying the embedded operating system to obtain a test environment; Deploying the embedded operating system under the test environment and executing the test case to obtain execution results of a plurality of objective functions in the test case; And obtaining a verification result of the test point according to the execution result of the objective function.
- 6. The method for testing an interface of an operating system according to claim 5, wherein deploying the embedded operating system in the test environment and executing the test case, to obtain execution results of a plurality of objective functions in the test case, comprises: Executing the test case in the test environment to obtain return values of a plurality of objective functions in the test case; and obtaining an execution result according to the return value.
- 7. The method for testing an interface of an operating system according to claim 5, wherein obtaining a verification result of a test point according to an execution result of the objective function comprises: Comparing the execution result with the expected result, and obtaining a verification result which passes through test point verification when the execution result is consistent with the expected result; And when the execution result is inconsistent with the expected result, obtaining a verification result that the test point verification is not passed.
- 8. An interface testing apparatus for an operating system, comprising: The acquisition module is used for acquiring a plurality of target test interface information of a target function module of the embedded operating system; The processing module is used for determining test points of each target test interface according to the target test interface information, obtaining test cases for testing the target test interfaces, verifying the call of the test points of the target test interfaces through a plurality of target functions of the test cases to obtain verification results, and testing the plurality of target test interfaces in the target functional module through the test cases according to the verification results to obtain test results.
- 9. A computing device comprising a processor, a memory storing a computer program which, when executed by the processor, performs the method of any one of claims 1 to 7.
- 10. A computer readable storage medium storing instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7.
Description
Interface testing method, device and equipment of operating system Technical Field The present invention relates to the field of computer information processing technology, and in particular, to a method, an apparatus, and a device for testing an interface of an operating system. Background With the vigorous development of maritime aviation, communication traffic, industrial production automation and the like, embedded operating systems are widely focused and applied in various industries and fields, the functions of the embedded operating systems are correspondingly more and more complex, and the number of interfaces of the functions is also sharply increased. The interface test is mainly used for verifying the functionality and stability of each component of the tested system, and is characterized in that the overall system verification is carried out on the transmission, the processing, the control and the interaction of data, and meanwhile, the logic relationship of each subsystem and function is checked. Regarding the classification of software testing, it can be subdivided into a number of testing methods depending on different standards and perspectives. For example, the tests may be classified into unit tests, integrated tests, system tests, and acceptance tests according to the different test execution stages, and black box tests, white box tests, gray box tests, and the like according to the different test embodiments. In addition, there are many special tests such as functional test, performance test, interface test, security test, compatibility test, etc. for verifying the performance of software under specific environments. In the current test cases, most interface test cases are often only focused on functional verification of a single API interface, and the design work of the test cases is heavy and complex. Furthermore, this further increases the difficulty of testing due to the lack of a comprehensive interface test flow framework. In particular in cases where several interfaces are involved in cooperation, so-called integrated testing, the existing solutions do not provide an efficient support and solution. Disclosure of Invention The invention aims to provide an interface test method, device and equipment of an operating system, which can carry out integrated test on an interface of an embedded operating system. In order to solve the technical problems, the technical scheme of the invention is as follows: An interface testing method of an operating system, comprising: Acquiring a plurality of target test interface information of a target function module of an embedded operating system; determining a test point of each target test interface according to the target test interface information; acquiring a test case for testing the target test interface; verifying the test points of the target test interface through a plurality of target functions of the test case to obtain a verification result; and obtaining test results of a plurality of target test interfaces in the target functional module according to the verification result. Optionally, obtaining the multiple target test interface information of the target function module of the embedded operating system includes: Acquiring a plurality of functional modules of an embedded operating system and interfaces in each functional module; Classifying the interfaces according to the functional modules, and determining interface definition, input parameters and output result information of each interface to obtain a plurality of target test interface information. Optionally, determining the test point of each target test interface according to the multiple target test interface information includes: determining the function of each target test interface according to the target test interface information; and determining test points of each target test interface according to the function of each target test interface. Optionally, obtaining a test case for testing the target test interface includes: Determining an objective function required by verifying the test point according to the test point of each objective test interface; Determining an expected result under the condition that the test point is correct; And obtaining the test case according to the objective function and the expected result. Optionally, verifying the test point of the target test interface through a plurality of objective functions of the test case to obtain a verification result, including: acquiring hardware configuration and software configuration for deploying the embedded operating system to obtain a test environment; Deploying the embedded operating system under the test environment and executing the test case to obtain execution results of a plurality of objective functions in the test case; And obtaining a verification result of the test point according to the execution result of the objective function. Optionally, deploying the embedded operating system under the te