A software testing system for core framework
By designing a software test system for server and client in the core framework, using CORBA transmission and xml configuration to achieve independent component startup, the compatibility and resource occupation of unit test systems in the existing technology is solved, and the coverage is provided and targeted Strong testing solutions improve testing efficiency and accuracy.
Patent Information
- Application Number
- CN202411109857.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-14
AI Technical Summary
The unit testing system of the existing core framework has problems such as incompatibility, component updates are not synchronized, and component and platform incompatibility, and lacks a wide coverage, strong targeted and completely independent testing solution.
A software testing system including server and client is designed. The executable files and execution parameters of file system service are sent through CORBA, the server creates process execution files, modify the xml startup file configuration to enable each component to start independently, and reduce resource usage. , and start the test with a command on the client.
It realizes a unit test system with wide coverage, strong targetedness and completely independent coverage, reduces resource occupation, simplifies the test process, avoids test failures caused by different server models, and improves testing efficiency and accuracy.
Smart Images

Figure CN118626400B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of testing technology, and more specifically, relates to a software testing system for a core framework. Background Art
[0002] The CF (Core Framework) core framework is a set of infrastructure for implementing the SCA specification. It defines the basic elements, interfaces and services required to build, integrate and manage software radio systems. It aims to achieve a highly modular, configurable and extensible software radio system. CF uses the design concept of separating software and hardware to enable radio functions to adapt to changing communication technologies and standards through software updates.
[0003] Unit testing, also known as module testing, is a test that verifies the correctness of program modules. It can check and verify the smallest testable unit in the software in isolation from other parts of the program. In procedural programming, a unit test is a single program, function, or process. Unit testing is performed in an automated manner, so performing unit testing in a large number of regression testing scenarios can improve testing efficiency.
[0004] The current CF components are constantly updated and iterated over time, including domain managers, device managers, application factories, applications, and various services. Each component upgrade may be accompanied by different problems: incompatibility with other components, asynchronous updates between components, incompatibility between components and platforms, etc. Therefore, the current core framework urgently needs a unit test system with wide coverage, strong pertinence, and complete independence to help developers find bugs in the development process. Summary of the invention
[0005] The present invention provides a software testing system for a core framework, and intends to provide a unit testing system with wide coverage, strong pertinence, and complete independence.
[0006] A software testing system for the core framework, including a server and a client;
[0007] A simulation device is built in the client, and the simulation device only includes basic parameters and basic initialization and release functions;
[0008] The client sends the executable file of the file system service to the server through CORBA, and then the client organizes execution parameters according to the executable file, and sends the execution parameters to the server through CORBA, the server creates a process based on the received executable file and execution parameters, and executes the executable file with the execution parameters based on the created process;
[0009] Each execution file corresponds to a test item, and the test components corresponding to each test item are configured by modifying the XML startup file so that each component is started independently through the program.
[0010] The present invention modifies the startup file configuration of xml so that each component is independently started through a program. Therefore, the present invention determines the number of startup components according to the difference of the test components during testing, which can effectively reduce the resource occupation during testing. The client sends the executable file of the file system service to the server through CORBA, and then the client organizes the execution parameters according to the executable file, and sends the execution parameters to the server through CORBA. The server creates a process based on the received executable file and the execution parameters, and executes the executable file with the execution parameters based on the created process. Therefore, the test can be started by typing a command once through the client. Based on this, a unit test system with wide coverage, strong pertinence and complete independence is provided.
[0011] Preferably, the server and the client establish communication based on an object reference identifier (IOR) or CORBALOC;
[0012] After the server is started, it generates an IOR for connection. The client directly connects to the server IP by obtaining the IOR or starting CORBALOC communication on the server.
[0013] Preferably, the server includes a file transfer module, a lightweight executable device module and a COBRA server module;
[0014] The lightweight executable device module includes an execution unit (execue unit), a termination unit (terminate unit), a loading unit (load unit) and an unloading unit (unload unit).
[0015] Preferably, the client includes a CF component startup configuration module, a file transfer and lightweight executable device module, and an oe environment abnormality judgment module;
[0016] The CF component startup configuration module is used to initialize parameter configuration;
[0017] The file transfer and lightweight executable device module is used to start the component to be tested;
[0018] The oe environment abnormality judgment module is used to judge whether the data received by the client is abnormal.
[0019] Preferably, the CF component startup configuration module constructs a component class for each component, and the component class stores information of the corresponding component;
[0020] Based on the CF component startup configuration module, each component is configured before startup.
[0021] Preferably, the CF component startup configuration module performs configuration on each component before startup, including: XML file parsing, startup parameter setting, and adding class pointers to the Testpart initialization configuration to perform unified component initialization;
[0022] During the initialization process, the initialized data is returned to the class object of the instance in the test item. After all configurations are completed, unified component initialization is performed. The Testpart initialization configuration executes the initialization function of each added class pointer one by one.
[0023] Preferably, the client includes a CF unit test framework; the CF unit test framework integrates test items;
[0024] When testing is required, the CF unit test framework sends different test resource files according to different unit test items; the server starts the corresponding component for component testing according to the test resource files and commands sent by the client's CF unit test framework.
[0025] Preferably, the test resource files include: XML files, dtd files, executable files of each component and server files required for testing.
[0026] The beneficial effects of the present invention include at least:
[0027] The present invention modifies the startup file configuration of xml so that each component is independently started through a program. Therefore, the present invention determines the number of startup components according to the difference of the test components during testing, which can effectively reduce the resource occupation during testing. The client sends the executable file of the file system service to the server through CORBA, and then the client organizes the execution parameters according to the executable file, and sends the execution parameters to the server through CORBA. The server creates a process based on the received executable file and the execution parameters, and executes the executable file with the execution parameters based on the created process. Therefore, the test can be started by typing a command once through the client. Based on this, a unit test system with wide coverage, strong pertinence and complete independence is provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0029] Figure 1 A system framework diagram provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] See also Figure 1 As shown, a software testing system for a core framework includes a server and a client;
[0032] A simulation device is built in the client, and the simulation device only includes basic parameters and basic initialization and release functions;
[0033] The client sends the executable file of the file system service to the server through CORBA, and then the client organizes execution parameters according to the executable file, and sends the execution parameters to the server through CORBA, the server creates a process based on the received executable file and execution parameters, and executes the executable file with the execution parameters based on the created process;
[0034] Each execution file corresponds to a test item, and the test components corresponding to each test item are configured by modifying the XML startup file so that each component is started independently through the program.
[0035] The present invention modifies the startup file configuration of xml so that each component is independently started through a program. Therefore, the present invention determines the number of startup components according to the difference of the test components during testing, which can effectively reduce the resource occupation during testing. The client sends the executable file of the file system service to the server through CORBA, and then the client organizes the execution parameters according to the executable file, and sends the execution parameters to the server through CORBA. The server creates a process based on the received executable file and the execution parameters, and executes the executable file with the execution parameters based on the created process. Therefore, the test can be started by typing a command once through the client. Based on this, a unit test system with wide coverage, strong pertinence and complete independence is provided.
[0036] As a possible implementation of this embodiment, the server and the client establish communication based on IOR or CORBALOC;
[0037] After the server is started, it generates an IOR for connection. The client directly connects to the server IP by obtaining the IOR or starting CORBALOC communication on the server.
[0038] As a possible implementation of this embodiment, the server includes a file transfer module, a lightweight executable device module and a COBRA server module;
[0039] The lightweight executable device module includes an execute unit, a terminate unit, a load unit and an unload unit.
[0040] As a possible implementation of this embodiment, the client includes a CF component startup configuration module, a file transfer and lightweight executable device module, and an oe environment abnormality judgment module;
[0041] The CF component startup configuration module is used to initialize parameter configuration;
[0042] The file transfer and lightweight executable device module is used to start the component to be tested; based on the client, the relevant executable files and startup parameters are sorted out, and the executable files are loaded to the server through the load unit. The client calls the execue unit and transmits the startup parameters to the server through the execue unit. After the server receives the startup parameters, it calls the process startup function of the target component system; for example: fork and execv of the Linux system, fork creates a process, execv loads executable files and startup parameters, and the purpose of remotely starting the process is achieved based on this. After execution, the client calls the terminate unit to terminate the process started by the server, and finally calls the unload unit to unload the file loaded by the server.
[0043] The oe environment exception judgment module is used to judge whether the data received by the client is abnormal. If the server runs an exception during the execution of the test item, the server will pass the exception information to the client through CORBA, and the client will then capture the relevant exception (try, catch) through the oe environment exception judgment; if it is a manufactured exception, the test item will be carried out smoothly; if it is an unmanufactured exception, the exception will be printed and the program will end.
[0044] Preferably, the CF component startup configuration module constructs a component class for each component, and the component class stores information of the corresponding component;
[0045] Preferably, the CF component startup configuration module performs configuration on each component before startup, including: XML file parsing, startup parameter setting, and adding class pointers to the Testpart initialization configuration to perform unified component initialization;
[0046] The client has its own set of component configuration information classes, which are inherited from the parent class Testpart; for example, the DomainManager class, whose class members store the information of dmd.xml; the class member functions have functions specifically for initialization and termination. When initializing a class, its own class pointer is stored in the dynamic array of the parent class. Finally, the parent class calls the initialization function for unified initialization. Since the initialization function of the parent class is a virtual function, it will enter the initialization function of the child class and then perform a series of initialization operations.
[0047] During the initialization process, the initialized data is returned to the class object of the instance in the test item. After all configurations are completed, unified component initialization is performed. The Testpart initialization configuration executes the initialization function of each added class pointer one by one.
[0048] The class declares an object in the test item, and then the test item calls the virtual function of the parent class TestPart to execute the subclass initialization function; therefore, you can access initialized public data through the class object, or access private member data through public member functions.
[0049] These initialization configurations are the initialization of the client, while the TestPart initialization configuration is the client telling the server how to start the component. For example, the initialization of the client DomainManager tells the server how to start the domain manager component. All components constitute the CF platform.
[0050] Exemplary:
[0051] The first step is to initialize the class and assign values to private members. The second step is to parse the dmd file and add the parsed spd, scd and dtd files and the domain manager executable file to the Testpart initialization configuration. The third step is to set the startup parameters of the domain manager and add them to the custom Testpart initialization configuration. The initialized data will be returned to the test item that calls it. After all configurations are completed, the unified component initialization will be performed. The Testpart initialization configuration will execute each added initialization configuration one by one. For the domain manager, the parsed file is sent to the server, and then the startup parameters are sent. Finally, the client calls the execute of the file transfer and lightweight executable device module to let the server start the domain manager component.
[0052] As a possible implementation of this embodiment, the client includes a CF unit test framework; the CF unit test framework integrates test items;
[0053] When testing is required, the CF unit test framework sends different test resource files according to different unit test items; the server starts the corresponding component for component testing according to the test resource files and commands sent by the client's CF unit test framework.
[0054] As a possible implementation of this embodiment, the test resource file includes: an XML file, a dtd file, executable files of each component, and a server-side file required for the test.
[0055] Based on this embodiment, when testing the file system, the client sends the executable file of the file system service to the server through CORBA, and then the client organizes the execution parameters and sends them to the server again. After receiving the data, the server will create a process to execute the executable file of the file system service with parameters; the client obtains the command service of the file system through the domain manager, thereby performing CORBA communication with the server file system;
[0056] Traditional model deployment will start all components at once, including the domain manager, device manager, devices, applications, etc.; however, if you want to test a single component, you do not need to start all components. Therefore, the components required for each test item are designed independently, that is, by modifying the XML startup file configuration, each component is started independently through the program, and there is no need to start multiple components to occupy program resources during testing; for example, when testing the manager component, the program only needs to start the domain manager, and no longer starts the device manager and application, which can greatly reduce the startup time.
[0057] When testing devices, traditional devices are created and produced in modeling software, and this embodiment takes this point into consideration during design. Therefore, in the client's CF file transfer and startup framework, a simulation device without an entity is constructed, which is only used as an empty device for testing. It has the basic parameters of the device, including identifier and profile, but no other functions, nor does it have a complete executable file like other devices. It only exists in the client and has the most basic initialization release like other CF component startup configurations. For example, when testing the installation and uninstallation of the device manager, there is no need to know the function of the device, only the device ID is needed. This operation can reduce resource usage during testing and speed up testing.
[0058] In addition, in this embodiment, each test item in the CF unit test framework is independent, and its success or failure will not affect the progress of other test items; moreover, each test item will deploy the model separately and close it after the test is completed, thus avoiding the change or stop of the model due to a certain test, which will hinder other tests.
[0059] In summary, compared with traditional tests, the present invention determines the number of startup components according to the different test components, which can effectively reduce the resource usage during testing. In addition, all tests are automated tests. After starting the program, you only need to type a command once to start the test. After the test is completed, the program prints the success and failure items of the test, and each error item also records the program location where the error occurs and the error code, which is convenient for developers to view.
[0060] The server and the client are isolated. You only need to put the server on the target platform and start the client on the PC to perform the test. You no longer need to put the various components and XML files required for the test on the server. All files are sent to the server through the client, which fundamentally solves the problem of testing being unable to proceed due to different server models.
[0061] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A software testing system for a core framework, characterized in that: Including server and client; The client is constructed with a simulated device as an empty device used for testing; The client sends the executable file of the file system service to the server through CORBA, and then the client organizes execution parameters according to the executable file, and sends the execution parameters to the server through CORBA, the server creates a process based on the received executable file and execution parameters, and executes the executable file with the execution parameters based on the created process; Each execution file corresponds to a test item, and the test component corresponding to each test item is configured by modifying the xml startup file so that each test component is independently started through the program; The client includes a CF unit test framework; the CF unit test framework integrates test items; When testing is required, the CF unit test framework sends different test resource files according to different unit test items; The server starts the corresponding component for component testing based on the test resource files and commands sent by the client's CF unit test framework.
2. A software testing system for a core framework according to claim 1, characterized in that: The server and the client establish communication based on an object reference identifier or CORBALOC; After the server is started, it generates an object reference identifier for the connection. The client directly connects to the server IP by obtaining the object reference identifier or starting CORBALOC communication on the server.
3. A software testing system for a core framework according to claim 1, characterized in that: The server includes a file transfer module, a lightweight executable device module and a COBRA server module; The lightweight executable device module includes an execution unit, a termination unit, a loading unit and an unloading unit.
4. A software testing system for a core framework according to claim 1, characterized in that: The client includes a CF component startup configuration module, a file transfer and lightweight executable device module, and an oe environment abnormality judgment module; The CF component startup configuration module is used to initialize parameter configuration; The file transfer and lightweight executable device module is used to start the component to be tested; The oe environment abnormality judgment module is used to judge whether the data received by the client is abnormal.
5. A software testing system for a core framework according to claim 4, characterized in that: The CF component startup configuration module constructs a component class for each component, and the component class stores information of the corresponding component; Based on the CF component startup configuration module, each component is configured before startup.
6. A software testing system for a core framework according to claim 5, characterized in that: The CF component startup configuration module performs configuration on each component before startup, including: XML file parsing, startup parameter setting, and adding class pointers to the Testpart initialization configuration to perform unified component initialization; During the initialization process, the initialized data is returned to the class object of the instance in the test item. After all configurations are completed, unified component initialization is performed. The Testpart initialization configuration executes the initialization function of each added class pointer one by one.
7. A software testing system for a core framework according to claim 1, characterized in that: The test resource files include: XML files, dtd files, executable files of each component and server files required for testing.
