A three-dimensional CAD software testing method and system based on a unified test case script
By adopting a unified test case script and a C++-integrated Python interface in 3D CAD software, the problem of poor applicability of existing automated testing tools is solved, realizing automated testing and performance monitoring of 3D CAD software, improving the objectivity and efficiency of testing, and promoting the development of domestic software.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2026-03-31
AI Technical Summary
Existing general-purpose automated testing tools are difficult to apply to 3D CAD software, mainly because 3D CAD tools rely heavily on user interaction, result determination is complex and requires monitoring of performance characteristics, cannot be determined by image or data comparison, and it is difficult to compare the performance indicators of different versions.
An automated testing approach based on unified test case scripts is adopted. By integrating a Python interface with C++, the unified standard test API interface of the 3D CAD software is called to achieve automated testing, including functional testing and performance testing. The modeling process is automatically completed through the unified interface, saving users from manual drawing operations.
This study enables quantitative comparability testing of different 3D CAD software, helps domestic 3D CAD software identify gaps, improves the objectivity and efficiency of testing, reduces the impact of human operation, provides an objective evaluation of domestic software, and promotes the application of domestic 3D CAD software.
Smart Images

Figure CN114546834B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D CAD software testing technology, and more specifically, to a 3D CAD software testing method and system based on a unified test case script. Background Technology
[0002] From the overall development trend of 3D CAD software both domestically and internationally, driven by new technologies such as big data, the Internet of Things, and cloud computing, 3D CAD software is becoming increasingly intelligent, cloud-based, and customized. Foreign 3D CAD started earlier, and software giants have fully mastered the underlying core technologies, forming a monopoly in the 3D CAD market. However, domestic 3D CAD software, to date, still lags significantly behind mainstream international products in terms of software technology, performance, and commercialization and market penetration. 3D CAD software is the core and foundation of product innovation and design; its technological level and performance directly affect the R&D level of new products and data security in fields such as national defense and military industries.
[0003] To ensure the quality of domestically produced 3D CAD software, comprehensive software testing is essential. This ensures that the functional, performance, and stability indicators of the 3D CAD system fully meet the practical requirements of modern industrial design and manufacturing. However, due to the complexity of 3D CAD software functions and the numerous evaluation indicators, test results are greatly influenced by human operator proficiency and subjective experience, making efficient, objective, and quantifiable manual testing difficult. Therefore, it is necessary to develop automated testing software tools to achieve automated testing.
[0004] Most existing general-purpose automated testing tools on the market currently use image recognition and global hooks to capture user operations and parameter inputs, creating recorded scripts. During automated testing, these scripts can be used to drive the software under test to perform corresponding operations. However, these general-purpose automated testing tools are not well-suited for 3D CAD software, mainly for the following reasons:
[0005] 1. 3D CAD tools heavily rely on user interaction. Users must draw graphics / models by clicking and moving the mouse within the canvas area provided by the 3D CAD tool. Automated testing tools cannot easily simulate this type of operation.
[0006] 2. The result judgment of 3D CAD is more complex. In general software, the operation result can be judged by simply judging whether the corresponding operation feedback is consistent with the expectation based on the stored data or the page display. However, the operation object of 3D CAD is a 3D model, and the result cannot be judged directly by comparing the data of images or data files.
[0007] 3. Automated testing of 3D CAD needs to monitor its performance characteristics simultaneously and be able to make horizontal comparisons of the performance indicators of different versions / software, so as to reflect the performance differences between CAD tools. Summary of the Invention
[0008] This invention addresses the technical problem of poor applicability of existing 3D CAD software testing tools.
[0009] This invention provides a method for testing 3D CAD software based on a unified test case script, comprising the following steps:
[0010] S1, the automatic testing function can be started by a button or menu, and automatic testing can be achieved by calling the entry function of the unified test case script through the C++ integrated Python interface;
[0011] S2, the unified test case script uses Python to integrate C++ component interface technology to call the unified standard test API interface of 3D CAD software;
[0012] Each unified test case script has an entry function for completing automated testing. By running the same unified test case script on different 3D CAD software and outputting the same model and performance data test results, conditions are provided for the comparability testing of various 3D CAD software.
[0013] Preferably, the unified standard API interface called by the unified test case script includes: a functional test API abstract interface and a performance test API abstract interface.
[0014] Preferably, S1 specifically includes: embedding an automated testing tool into the 3D CAD software as a plugin using a C++-integrated Python approach.
[0015] Preferably, S2 specifically includes: a unified test case script calls the corresponding functions of the 3D CAD software by executing a series of unified standard test interface API functions to generate model and performance data.
[0016] Preferably, the corresponding functional module includes: a 3D CAD automatic testing tool that can perform testing functions such as 3D graphic drawing, 3D entity editing, accurate 3D graphic drawing, 3D graphic dimension annotation, 3D entity projection of 2D graphics, 3D parametric drawing, 3D entity assembly, and 3D entity rendering, and generate result models and performance data.
[0017] Preferably, after step S2, the method further includes: repeating steps S1 to S2 to perform the same functional tests on the 3D CAD software under test and the foreign benchmark 3D CAD software respectively, and comparing and analyzing the test results data of the two to find out the differences between the 3D CAD software under test and the foreign benchmark 3D CAD software.
[0018] This invention also provides a 3D CAD software testing system based on a unified test case script. The detection and extraction system is used to implement a 3D CAD software testing method based on a unified test case script, including:
[0019] A C++ module integrating Python is used to launch automated testing functionality via buttons or menus. Automated testing is achieved by calling the entry function of a unified test case script through C++-integrated Python technology.
[0020] This Python module integrates with C++ to call the unified standard test API of 3D CAD software using a unified test case script through Python-integrated-C++ component interface technology.
[0021] Each unified test case script has an entry function for completing automated testing. By running the same test case on different 3D CAD software and outputting the same model and performance data test results, conditions are provided for the comparability testing of various 3D CAD software.
[0022] The present invention also provides an electronic device, including a memory and a processor, wherein the processor is used to implement the steps of a three-dimensional CAD software testing method based on a unified test case script when executing a computer management program stored in the memory.
[0023] The present invention also provides a computer-readable storage medium storing a computer management program thereon, wherein the computer management program, when executed by a processor, implements the steps of a three-dimensional CAD software testing method based on a unified test case script.
[0024] Beneficial Effects: This invention provides a 3D CAD software testing method and system based on a unified test case script. The method includes: S1, activating the automatic testing function via a button or menu, and using a C++-integrated Python interface to call the entry function of the unified test case script to achieve automatic testing; S2, the unified test case script using a Python-integrated C++ component interface to call the unified standard test API interface of the 3D CAD software. Each entry function corresponds to a test case. By running the same test case on different 3D CAD software, the same model and performance data test results are output, providing conditions for the comparability testing of various 3D CAD software. Activating the automatic testing function via a button or menu executes the corresponding test case script. The test script completes automatic functional and performance testing by calling a series of standard API interfaces encapsulated by the 3D CAD system, generating test result model files and performance data. Using a unified interface 3D CAD system automated testing tool, the model modeling process is automatically completed with a single click, eliminating the need for users to draw graphics / models by clicking and moving the mouse within the canvas area provided by the 3D CAD tool. Attached Figure Description
[0025] Figure 1 A flowchart of a 3D CAD software testing method based on a unified test case script is provided for this invention.
[0026] Figure 2 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;
[0027] Figure 3 This is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. Detailed Implementation
[0028] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0029] Figure 1 The present invention provides a 3D CAD software testing method based on a unified test case script, comprising the following steps:
[0030] S1, the automatic testing function can be started by a button or menu, and automatic testing can be achieved by calling the entry function of the unified test case script through the C++ integrated Python interface;
[0031] S2, the unified test case script uses Python to integrate C++ component interface technology to call the unified standard test API interface of 3D CAD software;
[0032] Each unified test case script has an entry function for automating testing. By running the same test case on different 3D CAD software programs and outputting identical model and performance data test results, it provides conditions for comparability testing of various 3D CAD software programs. The standard API interfaces of the 3D CAD software are called through a Python-integrated C++ component interface, which then executes the corresponding functional modules within the 3D CAD software to complete the modeling and performance data generation.
[0033] The automated testing function can be activated via a button or menu to execute the corresponding test case script. This test case script is a Python test case script, which is called through a C++ integrated Python interface. By connecting to the standard API interface of the 3D CAD software through the Python integrated C++ component interface, various module functions corresponding to the standard API interface of the 3D CAD software are implemented, such as extrusion operations. This completes automated functional and performance testing, generating test result model files and performance data. Using a unified interface 3D CAD system automated testing tool, the model building process is automatically completed with a single click, eliminating the need for users to manually draw graphics / models within the canvas area provided by the 3D CAD tool.
[0034] This solution enables bidirectional integration of the Python and C++ interfaces.
[0035] In a preferred embodiment, the standard API interface includes a functional testing API abstraction interface and a performance testing API abstraction interface. A bidirectional integration of Python and C++ interfaces is implemented for the 3D CAD automated testing tool.
[0036] The preferred solution, S1, specifically includes: using a C++-integrated Python approach to embed automated testing tools as plug-ins into the 3D CAD system. Standard API interfaces are executed through script entry functions to perform automated testing functions. For example, tensile functional modeling and testing can be completed automatically with a single click.
[0037] The preferred solution, S2, specifically includes: calling the corresponding functional modules of the 3D CAD software according to the entry function within the unified standard test API interface to generate models and performance data. The corresponding functional modules include: automatically completing the extrusion modeling of a specified sketch, creating the model, and saving it as an STP model file, while simultaneously recording the execution time of each interface and saving it to the corresponding log file.
[0038] In the preferred embodiment, S4 follows S3: Steps S1 to S3 are repeated to perform the same functional tests on both the 3D CAD software under test and the standard 3D CAD software. Comparing and analyzing the test results reveals the differences between the two. An automated testing tool plugin, implemented through bidirectional integration of Python and C++ interfaces, performs the same operations, calling the functional interfaces of both the 3D CAD software under test and the standard 3D CAD software to complete the corresponding functional tests. The test results are then compared and analyzed to identify the deficiencies of the 3D CAD software under test, facilitating targeted improvements by engineers.
[0039] This solution activates the automatic testing function via a button or menu, executing the corresponding test case scripts. These scripts call a series of standard API interfaces encapsulated by the 3D CAD system to complete automated functional and performance testing, generating test result model files and performance data. Using a unified interface 3D CAD system automated testing tool, the modeling process is completed automatically with a single click, eliminating the need for users to manually draw graphics / models within the canvas area provided by the 3D CAD tool.
[0040] This makes different 3D CAD software comparable in a quantitative way, which helps domestic 3D CAD software identify its gaps and improve its development. It also helps domestic enterprise users to objectively evaluate domestic 3D CAD software, eliminate doubts, and promote the application of domestic 3D CAD software.
[0041] This invention also provides a 3D CAD software testing system based on a unified test case script, comprising:
[0042] The C++ module integrates a Python module, which can be used to start the automatic testing function via a button or menu, and can call Python test case scripts through the C++ integrated Python interface;
[0043] Python integrates C++ modules, and Python test case scripts execute the standard API interface of 3D CAD software through the Python integrated C++ component interface;
[0044] The test call module generates model and performance data through standard API interfaces for testing.
[0045] Please see Figure 2 This is a schematic diagram illustrating an embodiment of the electronic device provided in this invention. For example... Figure 2As shown, an embodiment of the present invention provides an electronic device, including a memory 1310, a processor 1320, and a computer program 1311 stored in the memory 1310 and executable on the processor 1320. When the processor 1320 executes the computer program 1311, it performs the following steps: S1, the automatic testing function is started by a button or menu, and the automatic testing is achieved by calling the entry function of the unified test case script through the C++ integrated Python interface.
[0046] S2, the unified test case script calls the unified standard test API interface of 3D CAD software through Python integration with C++ component interface;
[0047] This method involves running the same test case on different 3D CAD software programs and outputting the same model and performance data test results, thus providing conditions for the comparability testing of various 3D CAD software programs.
[0048] Please see Figure 3 This is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. (See diagram below.) Figure 3 As shown, this embodiment provides a computer-readable storage medium 1400, on which a computer program 1411 is stored. When the computer program 1411 is executed by the processor, it performs the following steps: S1, the automatic testing function is started by a button or menu, and the automatic testing is achieved by calling the entry function of the unified test case script through the C++ integrated Python interface.
[0049] S2, the unified test case script calls the unified standard test API interface of 3D CAD software through Python integration with C++ component interface;
[0050] This method involves running the same test case on different 3D CAD software programs and outputting the same model and performance data test results, thus providing conditions for the comparability testing of various 3D CAD software programs.
[0051] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0052] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0053] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0054] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0055] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0056] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0057] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for testing three-dimensional CAD software based on a unified test case script, characterized in that, It comprises the following steps: S1, starting the automatic test function through a button or a menu, and realizing the automatic test by calling an entry function of a unified test case script through a C++ integrated Python interface; S2, calling a unified standard test API interface of a three-dimensional CAD software through a Python integrated C++ component interface technology by the unified test case script; Each unified test case script has an entry function for completing the automatic test function; the same test case is run on different three-dimensional CAD software to output the same model and performance data test results, thereby providing conditions for the comparability test of each three-dimensional CAD software; The unified standard API interface called by the unified test case script comprises a function test API abstract interface and a performance test API abstract interface; S1 specifically comprises embedding the automatic test tool into the three-dimensional CAD software in the form of a plug-in through a C++ integrated Python mode; S2 specifically comprises calling the corresponding function of the three-dimensional CAD software by the unified test case script through a series of unified standard test interface API function execution to generate the model and performance data.
2. The three-dimensional CAD software testing method based on a unified test case script according to claim 1, characterized in that, The corresponding function module comprises three-dimensional CAD automatic test tools which can complete three-dimensional graph drawing, three-dimensional entity editing, accurate three-dimensional graph drawing, three-dimensional graph dimension marking, three-dimensional entity projection two-dimensional graph, three-dimensional parameterized drawing, three-dimensional entity assembly, three-dimensional entity rendering and other test functions to generate the result model and performance data.
3. The three-dimensional CAD software testing method based on a unified test case script according to claim 1, characterized in that, S2 further comprises repeating steps S1 to S2 to respectively perform the same function test on the three-dimensional CAD software to be tested and the foreign benchmark three-dimensional CAD software, and comparing and analyzing the test result data of the two three-dimensional CAD software to obtain the difference between the three-dimensional CAD software to be tested and the foreign benchmark three-dimensional CAD software.
4. A three-dimensional CAD software testing system based on a unified test case script, characterized by, The detection extraction system is used to realize the three-dimensional CAD software test method based on the unified test case script, and comprises: A C++ integrated Python module is used to start the automatic test function through a button or a menu, and realize the automatic test by calling the entry function of the unified test case script through the C++ integrated Python technology; A Python integrated C++ module is used to call the unified standard test API interface of the three-dimensional CAD software through the Python integrated C++ component interface technology by the unified test case script; Each test case has an entry function for completing the automatic test function; the same test case is run on different three-dimensional CAD software to output the same model and performance data test results, thereby providing conditions for the comparability test of each three-dimensional CAD software; The unified standard API interface called by the unified test case script comprises a function test API abstract interface and a performance test API abstract interface; The C++ integrated Python module is specifically used to embed the automatic test tool into the three-dimensional CAD software in the form of a plug-in through the C++ integrated Python mode; Python integrated C++ modules, specifically for uniform test case scripts to invoke corresponding functions of a 3D CAD software by executing a series of uniform standard test interface API function calls to generate model and performance data.
5. An electronic device, comprising: A computer program product comprising a memory and a processor configured to implement the steps of the method of any one of claims 1 to 3 when executing a computer program product stored in the memory.
6. A computer readable storage medium characterized by, A computer program product comprising a memory and a processor configured to implement the steps of the method of any one of claims 1 to 3 when executing a computer program product stored in the memory.
Citation Information
Patent Citations
Method for generating and using automatic test script
CN101571798A
Three dimension mode construction software automatic testing method based on script
CN1752944A