Method and system for testing geometric modeling engine and electronic equipment
By automatically matching and executing test cases of geometric modeling engines, the problem of inefficiency in the existing technology is solved, and a more efficient and comprehensive testing process is achieved.
Patent Information
- Application Number
- CN202510326071.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The testing methods of existing geometric modeling engines rely on manual operations, resulting in inefficient testing and inability to fully cover all possible test scenarios.
By obtaining the test requirements of the geometry modeling engine, automatically match the target test case set, and calling the geometry modeling engine to execute test cases through the test call interface to achieve automated testing.
It improves the testing efficiency of the geometric modeling engine, ensures the comprehensiveness and targetedness of the test, reduces manual intervention and errors, and reduces test time and cost.
Smart Images

Figure CN119847942A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer design, and in particular, relates to a testing method, system and electronic equipment for a geometric modeling engine. Background Art
[0002] The geometric modeling engine is an important component for realizing 3D design, manufacturing and analysis in industrial design software such as Computer Aided Design (CAD) software, Computer Aided Manufacturing (CAM) software, and Computer Aided Engineering (CAE) software. The geometric modeling engine plays an important role in the field of industrial design and manufacturing, and its functions and performance have a significant impact on the development and application of industrial design software.
[0003] At present, there are many types of geometric modeling engines on the market, each with its own characteristics. By testing the geometric modeling engine, we can obtain the performance of the geometric modeling engine in terms of function and performance, so as to facilitate component selection and engine optimization. However, the testing method of the traditional geometric modeling engine is highly dependent on manual operation. The complex and diverse geometric modeling engines bring complex and diverse data formats, which increases the difficulty of configuring test cases. Due to the limitations of manual experience, the configured test cases are often difficult to fully cover all possible test scenarios. These factors will reduce the manual processing speed, resulting in low testing efficiency of the geometric modeling engine. Summary of the invention
[0004] The embodiments of the present application provide a testing method, system and electronic device for a geometric modeling engine to solve the problem of low testing efficiency of geometric modeling engines in the prior art.
[0005] A first aspect of an embodiment of the present application provides a method for testing a geometric modeling engine, comprising: Acquire the test requirements of the geometric modeling engine; the geometric modeling engine corresponds to a test calling interface, the test calling interface is used to call the geometric operation function and algorithm processing function of the geometric modeling engine according to the set operation specification, and the set operation specification is used to convert the test case into a data format executable by the geometric modeling engine; Matching a target test case set that meets the test requirements for the geometric modeling engine; The geometric modeling engine is called through the test calling interface to execute each test case in the target test case set.
[0006] A second aspect of an embodiment of the present application provides a testing system for a geometric modeling engine, comprising: An acquisition module, used for acquiring the test requirements of the geometric modeling engine; the geometric modeling engine corresponds to a test calling interface, the test calling interface is used to call the geometric operation function and algorithm processing function of the geometric modeling engine according to a set operation specification, and the set operation specification is used to convert the test case into a data format executable by the geometric modeling engine; A matching module, used for matching a target test case set that meets the test requirements for the geometric modeling engine; The test case execution module is used to call the geometric modeling engine to execute each test case in the target test case set through the test calling interface.
[0007] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0008] A fourth aspect of an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] As can be seen from the above, this application automatically matches the target test case set that can meet the test requirements for the geometric modeling engine according to the test requirements of the geometric modeling engine, and calls the geometric modeling engine to execute the test cases in the target test case set through the test call interface corresponding to the geometric modeling engine that implements the function call in accordance with the set operation specification. The matching of test requirements and test cases ensures the comprehensiveness of the test, reduces the test steps brought by unnecessary test cases, ensures the pertinence and effectiveness of the test, avoids the blindness of the test, and reduces the test time. The test call interface realizes the automatic conversion of test cases to the executable data format of the geometric modeling engine, ensuring that each test case in the target test case set can be accurately executed by the geometric modeling engine without being restricted by the data format, reducing the configuration difficulty. The synergy between the test requirement matching and the test call port greatly improves the test efficiency of the geometric modeling engine. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] 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 any creative work.
[0012] Figure 1 This is a process of testing a geometric modeling engine provided by an embodiment of the present application Figure 1 ; Figure 2 This is a process of testing a geometric modeling engine provided by an embodiment of the present application Figure 2 ; Figure 3 is a structural diagram of a test system for a geometric modeling engine provided in an embodiment of the present application; Figure 4 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0013] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0014] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0015] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0016] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0017] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0018] In a specific implementation, the terminal described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).
[0019] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.
[0020] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.
[0021] Various applications that can be executed on the terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within corresponding applications. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.
[0022] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0023] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0024] See also Figure 1 , Figure 1 This is a process of testing a geometric modeling engine provided by an embodiment of the present application Figure 1 .like Figure 1 As shown, a method for testing a geometric modeling engine comprises the following steps: Step 101, obtaining the test requirements of the geometric modeling engine.
[0025] Among them, the geometric modeling engine corresponds to a test calling interface, which is used to call the geometric operation function and algorithm processing function of the geometric modeling engine according to the set operation specifications, and the set operation specifications are used to convert the test case into a data format executable by the geometric modeling engine.
[0026] The test requirement refers to the requirement information input by the user to specify the function and / or performance of the geometric modeling engine to be tested. The test requirement includes the name, version number, test items, test configuration information of the geometric modeling engine, information of other geometric modeling engines to be tested and compared with the geometric modeling engine, and / or test time.
[0027] The test items include functional test items and performance test items. Among them, the functional test items include whether the geometric structure can be correctly created, edited and analyzed, etc. The performance test items include rendering speed, calculation efficiency, memory management, geometric accuracy, resource usage, concurrent performance, etc.
[0028] In some embodiments, the user can input test configuration information in the form of a test case. Multiple test factors, parameter values corresponding to each test factor, and output prediction reference information can be extracted from the test case or other test configuration information in other expressions. A test case refers to a scheme designed to verify the function and / or performance of a geometric modeling engine and includes test input information and expected output results. Test factors refer to variables involved in the test process, while parameter values refer to the specific values or states of these variables in specific test scenarios. Parameter values can be numerical values (such as the number of concurrent users, memory size, etc.), states (such as power mode, network connection status, etc.), or other quantities that can clearly describe the characteristics of the variables. Output prediction reference information is used to predict the test results of multiple test factors under different parameter value combinations, such as predicting the return value of a function or operation, rendering results, and / or whether the operation is successful.
[0029] In this application, users are allowed to input the name, version number, test items and other required information of the geometric modeling engine through the interactive interface. Users can customize the test of the geometric modeling engine based on the test requirements to meet the diverse test requirements of users and make the test more flexible.
[0030] In some embodiments, the reuse of test cases will affect the test efficiency of the geometric modeling engine. The reuse of test cases refers to the application of existing test cases to the testing of multiple geometric modeling engines during the testing process. By reusing existing test cases, it is possible to avoid repeatedly writing the same test cases, reduce workload, shorten the test cycle, improve test efficiency, and reduce test costs.
[0031] However, since different geometric modeling engines have different interfaces and functions, the adaptability of test cases to geometric modeling engines is poor, which makes it difficult to reuse test cases between multiple geometric modeling engines.
[0032] Before testing, the present application configures a test calling interface for each geometric modeling engine for calling the geometric modeling engine. The test calling interface can call the geometric operation function and algorithm processing function of the geometric modeling engine according to the set operation specification, and under the effect of the set operation specification, the test case can be converted into a data format executable by the geometric modeling engine, and the test information in a unified format can be output, thereby greatly improving the adaptability between the test case and the geometric modeling engine and enhancing the reusability of the test case.
[0033] In order to build these test calling interfaces, it is necessary to clarify the geometric operation functions and algorithm processing functions of each geometric modeling engine.
[0034] Geometric operation functions refer to a series of operation functions provided by the geometric modeling engine for creating, modifying and analyzing geometric structures. These operations cover the creation and transformation of basic points, lines, surfaces and bodies, as well as more complex geometric construction and editing.
[0035] The algorithm processing function refers to processing geometric data and performing geometric operations based on the algorithms inside the geometric modeling engine. The algorithm processing function can be specifically divided into two parts: geometric algorithm function and feature algorithm function. The geometric algorithm function is an algorithm used to process geometric shapes and structures, such as Boolean operations and surface fitting. The feature algorithm function is an algorithm used to process feature elements in the geometric model, such as sketch constraints, feature recognition and modification, etc.
[0036] Based on the various functions of the geometric modeling engine, combined with its data interaction format and the data format under the set operation specification, the input parameters, processing process and output result format of each geometric modeling engine corresponding interface on each function are defined to ensure that each function can be accurately called through the interface. Accordingly, the test calling interface corresponding to the geometric modeling engine is obtained.
[0037] By following the same set operation specifications to build the test call interface of each geometric modeling engine, different geometric modeling engines can interact through the same specifications, so that test cases can be flexibly reused in multiple geometric modeling engines, ensuring the consistency, adaptability and compatibility of test cases among multiple engines, laying a solid foundation for subsequent automated testing.
[0038] The creation of a test call interface with set operation specifications improves the reusability of test cases, allowing different geometric modeling engines to be tested based on the same set of test cases, thereby facilitating test comparisons and ensuring the comparability of test results between geometric modeling engines. At the same time, this method also significantly improves the adaptability and flexibility of the test, facilitating the automatic evaluation of test results for different geometric modeling engines based on the same standards and structures, and can also flexibly adjust the type of geometric modeling engine to be tested according to actual needs, thereby realizing the testing of multiple geometric modeling engines.
[0039] Step 102, matching a target test case set that meets the test requirements for the geometric modeling engine.
[0040] The target test case set contains multiple test cases.
[0041] In some embodiments, in response to a test requirement input by a user, a query is made as to whether there is a test case set matching the test requirement in a database. If so, a target test case set is obtained to achieve case matching.
[0042] In some embodiments, based on the user's testing requirements, a test case set that meets the testing requirements is generated to achieve matching of the target test case set.
[0043] Automatically match test cases that meet test requirements without manual configuration, reduce labor costs, avoid possible errors in manual configuration, ensure the reliability of matched test cases, avoid executing invalid and redundant test cases, save test time, and reduce the cost of hardware and software resources required for testing, thereby improving the accuracy and efficiency of testing.
[0044] In some embodiments, matching the target test case set that meets the test requirements for the geometric modeling engine includes: parsing the test requirements to obtain at least one test item; querying a first test case set for testing the test item from a database as the target test case set; or, parsing the test requirements to obtain at least one test item and test configuration information; the test configuration information includes multiple test factors, at least one parameter value corresponding to each of the test factors, and output prediction reference information; querying a second test case set having the test configuration information and used to test the test item from the database as the target test case set.
[0045] The test items are functional testability and / or performance test items.
[0046] In some embodiments, the test requirements are parsed to extract at least one functional test item and / or performance test item.
[0047] In some embodiments, the test requirement is parsed to identify at least one functional test item and / or performance test item and test configuration information.
[0048] In some embodiments, through parsing, test scenarios can also be extracted from the test configuration information, and the test scenarios and test items can be combined to analyze the impact range and importance of test factors and their parameter values, and further screen out key factors and key parameter values as test factors and parameter values used during matching.
[0049] In some embodiments, the test factor A, the test factor B, and the test factor C are analyzed, and the parameter value of each test factor has a value range of [-100, +100], and the amount of parameter value data is relatively large. The boundary condition judgment method can be used to screen the key parameter values, and select the boundary value, critical value, 0 value, positive value, negative value, etc. as the specific parameter value of the test factor. For example, 3 parameter values are taken for the three test factors respectively, and the 3 parameter values of the three test factors are all critical value -101, boundary value 100, and in-bounds value 0.
[0050] By selecting limited and representative parameter values to match the target test case set, the test is more targeted and the number of test cases is greatly reduced, which helps to improve test efficiency and reduce test costs. In addition, although the number of test cases is reduced, the selected parameter values are representative, so the matched test cases can still cover most of the test scenarios, ensuring the breadth of the test.
[0051] Analyzing the test requirements and identifying effective information for matching test cases will help match high-quality test cases, implement targeted testing, avoid blindness and arbitrariness in testing work, and improve testing efficiency.
[0052] In some embodiments, the matching method is determined based on the type of information obtained through parsing.
[0053] If at least one test item is obtained through the analysis, a first test case set for testing the test item is queried from the database as a target test case set.
[0054] The database stores test case sets, which can be generated by constructing orthogonal tables. Each time a new test case set is generated, the corresponding test case set will also be stored in the database to facilitate the reuse of the test case set.
[0055] If at least one test item and test configuration information are obtained through the analysis, a use case query is performed in the database based on the test item and the test configuration information, and a second test case set having the test configuration information and used to test the test item is used as a target test case set.
[0056] After identifying valid information, the present application can query whether there are test cases that meet the test requirements from the database based on the valid information, and match the test cases based on the database, which can promote the reuse of test cases and reduce the time wasted in repeatedly generating test cases.
[0057] The analysis of test requirements provides a matching basis for subsequent use case matching, and can efficiently implement test case matching based on the database, thereby improving the test case matching efficiency and helping to improve testing efficiency.
[0058] If the target test case set for testing the test item cannot be found from the database based on at least one test item, this information is fed back to the user end, and the test configuration information related to the test item is obtained from the user end. Subsequently, an orthogonal table can be constructed based on the parsed test item and the test configuration information provided by the user to generate the target test case set.
[0059] When the second test case set having the test configuration information and used to test the test item does not exist in the database, a target test case set can be generated by constructing an orthogonal table based on the test items and the test configuration information obtained by parsing.
[0060] Correspondingly, after parsing the test requirements and obtaining at least one of the test items and the test configuration information, it also includes: taking at least one of the parameter values corresponding to each of the test factors as the level of the test factor, and constructing an orthogonal table based on the test factors and the levels; predicting the test results of the multiple test factors in each row of the orthogonal table at the levels according to the output prediction reference information, and obtaining the expected output results of the multiple test factors in each row at the levels; taking the multiple test factors in each row of the orthogonal table and the levels corresponding to the multiple test factors and the expected output results of the multiple test factors at the levels as a test case, and obtaining the target test case set containing multiple test cases.
[0061] Constructing an orthogonal table requires factors and levels. Factors are variables in the test, i.e., test factors in the test configuration information, and factors are independent of each other. Levels are the values of each factor, i.e., the parameter values corresponding to the test factors in the test configuration information. This application constructs an orthogonal table based on multiple test factors and at least one parameter value corresponding to each test factor, i.e., level.
[0062] In some embodiments, based on the test factors and the levels, an orthogonal array is constructed by statistical analysis software, such as SPSS or Minitab, and the orthogonal array can be generated without development.
[0063] In some embodiments, an orthogonal table can also be constructed by an orthogonal experiment method. The orthogonal experiment method can achieve a high-quality combination of the levels of the test factors, that is, the parameter values, thereby ensuring the minimization of the number of test cases, improving the test efficiency, and at the same time ensuring that all possible parameter combinations are covered, which is more flexible and solves the problem that limits and boundaries are easily ignored in traditional tests, resulting in test blind spots, causing potential problems to be not discovered in time, affecting the test results, and requiring retesting, which reduces the test efficiency.
[0064] The process of constructing an orthogonal table is the process of combining the parameters of the test factors and screening the parameter combinations. It can efficiently generate the parameter combinations of the test factors that constitute the test cases, help reduce the number of repeated and redundant test cases, ensure test coverage, improve the quality of test cases, and thus improve test efficiency.
[0065] In some embodiments, there are test factors A, B and C, which are independent of each other and have three corresponding levels, and the three levels are -101, 0 and 100. An orthogonal table is constructed based on test factors A, B and C and the levels corresponding to each test factor, and an orthogonal table as shown in the following Table 1 can be obtained. Table 1 is an orthogonal table constructed based on test factors and levels provided in an embodiment of the present application.
[0066] Table 1 Orthogonal table constructed based on test factors and levels
[0067] Among them, the test factor A, test factor B and test factor C in each row of the orthogonal table and their corresponding levels can be used as test input information of a test case.
[0068] For example, the test factor A and its level -101, the test factor B and its level -101, and the test factor C and its level -101 in the second row of Table 1 are the test input information of one test case, and the test input information of 9 test cases is obtained accordingly.
[0069] In some embodiments, the parameter values of test factor A, test factor B, and test factor C range from [-100, +100], and the output prediction reference information indicates that the test factor fails if it crosses the range. Based on the output prediction reference information in the test configuration information, the test results of the test input information in each row of the orthogonal table in Table 1 are predicted, and a table as shown in Table 2 can be obtained. Table 2 is a test case table generated based on the orthogonal table and the output prediction reference information provided in an embodiment of the present application.
[0070] Table 2 Test case table generated based on orthogonal table and output prediction reference information
[0071] Based on the output prediction parameter information, the level of each test factor in each test input information can be evaluated, and the test factor description in Table 2 can be obtained, and the expected output result corresponding to each test input information can be further predicted. The test factor A, test factor B and test factor C in each row of Table 2 and their corresponding levels and expected output results can be used as a test case, and the test factor description can also be used as part of the test case, and 9 test cases are obtained accordingly. The multiple rows of the test case table constitute a target test case set containing multiple test cases, and Table 2 can be regarded as a test case set containing 9 test cases.
[0072] The expected output result can be used as an evaluation benchmark for subsequent evaluation of the geometric modeling engine to determine whether the actual test result of the geometric modeling engine is consistent with the expected output result.
[0073] By constructing an orthogonal table, we systematically generate parameter combinations corresponding to multiple test factors as test input information. Based on the output prediction reference information, we predict the test results of the test factors under the parameter combinations and obtain the expected output results. Finally, we combine the test factors, parameter values, i.e. levels, and expected output results into test cases to obtain a target test case set containing multiple test cases. We do not have to rely entirely on manual design of test cases, but can automatically and efficiently generate comprehensive coverage and redundant test cases, thereby improving test efficiency.
[0074] In some embodiments, the geometry processing task is to render a three-dimensional model. The test item is the rendering speed, and the test factors are the number of faces and the resolution of the three-dimensional model. The parameter values of the number of faces are 30, 54, 62, and 73, and the parameter values of the resolution are 640×480, 1280×720, and 1920×1080. The output prediction reference information is that the rendering speed is considered to be successful if it is within 65ms. Based on the number of faces and their levels of 30, 54, 62, and 73, and the resolution and its levels of 640×480, 1280×720, and 1920×1080, an orthogonal table is constructed to obtain multiple test input information, and the expected output result of each test input information is predicted. Each test input information and its corresponding expected output result constitute a test case, and multiple test cases are obtained accordingly.
[0075] In the present application, an orthogonal table of a suitable type is automatically selected according to the number of levels of multiple test factors to achieve a reasonable combination of the levels of multiple test factors. The types of orthogonal tables include equal-level orthogonal tables and mixed-level orthogonal tables. In an equal-level orthogonal table, the number of levels of all test factors is the same. In a mixed-level orthogonal table, the number of levels of multiple test factors is different.
[0076] In some embodiments, constructing an orthogonal table based on the test factors and the levels includes: comparing the number of the levels of multiple test factors; if the number of the levels of multiple test factors are the same, constructing an equal-level orthogonal table based on the test factors and the levels.
[0077] Assuming multiple test factors, each test factor has at least one level, compare the number of levels of multiple test factors.
[0078] If the test factor X has 3 levels, the test factor Y has 3 levels, and the test factor Z has 3 levels. After comparing the number of levels, the number of levels of the three test factors is the same. Based on the test factor X and its level, the test factor Y and its level, and the test factor Z and its level, an equal-level orthogonal table can be constructed.
[0079] When the number of levels of multiple test factors is the same, the equal-level orthogonal array is the most appropriate type of orthogonal array. In this case, an equal-level orthogonal array is directly constructed. The equal-level orthogonal array makes the design process simpler and more intuitive, helps reduce design complexity and errors, and improves the efficiency of orthogonal array construction.
[0080] In some embodiments, constructing an orthogonal table based on the test factors and the levels includes: if the numbers of the levels of a plurality of the test factors are different, and the number of categories corresponding to the different numbers of the levels is less than a threshold, then constructing a mixed-level orthogonal table based on the test factors and the levels.
[0081] If the test factor X has 3 levels, the test factor Y has 3 levels, the test factor Z has 2 levels, and the test factor W has 4 levels. After comparing the number of levels, the number of levels of the four test factors is different. The number of levels corresponding to the test factors X and Y is 3, the number of levels corresponding to the test factor Z is 2, and the number of levels corresponding to the test factor W is 4. Accordingly, the test factors are divided into 3 categories according to the number of levels, and the number of categories is 3. If the threshold is 5, a mixed level orthogonal table can be constructed based on the test factor X and its level, the test factor Y and its level, the test factor Z and its level, and the test factor W and its level.
[0082] Set thresholds to avoid blind construction in extremely complex situations, introduce mixed-level orthogonal tables, improve the flexibility of orthogonal table construction, and meet test requirements.
[0083] In the process of matching the orthogonal table according to the number of levels of the test factors, if the number of levels of multiple test factors is different, there may not be a just right equal-level orthogonal table or mixed-level orthogonal table that is adapted to the multiple test factors and corresponding levels. The present application adopts the quasi-level method to add levels to the test factors with fewer levels. On the one hand, a relatively matching orthogonal table can be obtained. On the other hand, the uniformity of the number of levels of multiple test factors is improved, which helps to reduce the difficulty of constructing the orthogonal table, reduce the generation time of test cases, and improve test efficiency. Among them, the quasi-level method is divided into the quasi-equal-level method and the quasi-mixed-level method. The quasi-equal-level method is used to match the equal-level orthogonal table, and the quasi-mixed-level method is used to match the mixed-level orthogonal table.
[0084] In some embodiments, after comparing the number of levels of the multiple test factors, it also includes: if the numbers of the levels of the multiple test factors are different, determining the first test factor with the largest number of levels from the multiple test factors; the number of levels corresponding to the first test factor is a first number, and there is at least one second test factor among the multiple test factors whose number of levels is lower than the first number; selecting a second number of levels from the levels of each of the second test factors as newly added levels of the second test factor, and the number of all levels of each of the second test factors after the levels are added is the first number; constructing the equal-level orthogonal table based on the first test factor and the levels of the first test factor, the second test factor and the levels of the second test factor, and the newly added levels.
[0085] By comparing the number of levels, it is possible to determine whether the number of levels is the same, and to identify the test factor with the largest number of levels, i.e., the first test factor, from among multiple test factors. The number of levels of the first test factor, i.e., the first number, is used as a basis for constructing an equal-level orthogonal array.
[0086] For each second test factor whose number of levels is lower than the first number, the second number of levels is selected from its original levels as the newly added levels, so that the total number of levels of the second test factor after the newly added levels are obtained is the same as the first number. In this way, the first test factor and the second test factor processed by the quasi-level method have the same number of levels, and an equal-level orthogonal table can be constructed based on the first test factor and its level, the second test factor and its original level and the newly added level. The quasi-level method in this process is the quasi-equal-level method.
[0087] Among them, selecting levels from the original levels as new levels can avoid the noise impact caused by levels that are irrelevant to the test factor values, and avoid their interference with the purity and availability of the test cases.
[0088] Using L n (m k ) represents the orthogonal array, where L means the orthogonal array, n is the number of experimental rows in the orthogonal array, m is the number of levels, k is the number of test factors, and n, m, and k are all positive integers.
[0089] If there are four test factors with 2 levels, two test factors with 3 levels, and one test factor with 4 levels, the orthogonal table format can be used, using the mathematical formula 2 4 ×3 2 ×4 clearly indicates the seven test factors and their levels.
[0090] By comparing the number of levels of the seven test factors, it is determined that the first number in this example is 4. Using the quasi-equal level method, four two-level test factors and two three-level test factors with levels less than 4 are added with new levels, thereby obtaining seven four-level test factors, which are expressed mathematically as 4 7 . Accordingly, an equal-level orthogonal table is constructed and matched to the equal-level orthogonal table L 32 (4 9 ). The number of factors in the matched equal-level orthogonal array must be greater than or equal to the number of test factors. Here, 9 is greater than 7, ensuring that the orthogonal array can provide enough factor (variable) space so that the construction of the orthogonal array can proceed smoothly.
[0091] By adjusting the number of levels of the test factors, it is easier to find a suitable orthogonal array, improve the flexibility of the design, and reduce the difficulty of construction. Constructing an equal-level orthogonal array makes the level combination design process simpler and more intuitive, helps reduce design complexity and errors, and again reduces the difficulty of construction.
[0092] In some embodiments, after comparing the number of levels of the multiple test factors, it also includes: if the numbers of the levels of the multiple test factors are different, determining from the multiple test factors a third test factor whose number of levels is only lower than the first number; the number of levels corresponding to the third test factor is a third number, and there is at least one fourth test factor among the multiple test factors whose number of levels is lower than the third number; selecting a fourth number of levels from the levels of each of the fourth test factors as the newly added levels of the fourth test factor, and the number of all levels of each of the fourth test factors after the newly added levels is the third number; constructing the mixed level orthogonal table based on the first test factor and the level of the first test factor, the third test factor and the level of the third test factor, the fourth test factor and the level of the fourth test factor and the newly added levels.
[0093] By comparing the number of levels, a test factor whose number of levels is only lower than the first number, i.e., the third test factor, can also be identified from multiple test factors with different numbers of levels. The number of levels of the third test factor, i.e., the third number, is used as a benchmark for constructing a mixed level orthogonal array. This construction method is applicable to scenarios where the number of level categories is greater than or equal to 3.
[0094] For each fourth test factor whose number of levels is lower than the third number, the fourth number of levels is selected from its original levels as the newly added levels, so that the total number of levels of the fourth test factor after the newly added levels are the same as the third number. The number of levels of the third test factor and the fourth test factor processed by the quasi-level method are the same, and a mixed level orthogonal table can be constructed based on the first test factor and its level, the third test factor and its level, the fourth test factor and its original level and the newly added level. The quasi-level method in this process is a quasi-mixed level method.
[0095] For the scenario where four test factors have 2 levels, two test factors have 3 levels, and one test factor has 4 levels, the third number is determined to be 3 using the above method. Using the quasi-mixed level method, add levels to the four two-level test factors with less than 3 levels, and then get six three-level test factors and one four-level test factor, which can be expressed mathematically as 3 6 ×4. Accordingly, a mixed level orthogonal table can be constructed to match the mixed level orthogonal table L 18 (3 6 ×4). Similarly, the number of factors corresponding to each level in the matched mixed-level orthogonal table should be greater than or equal to the number of test factors corresponding to the corresponding level, providing sufficient factor (variable) space for the test factors and ensuring that the orthogonal table can be successfully constructed.
[0096] For the above example scenario, there is also a quasi-mixed level method, which adds new levels to the two three-level test factors with less than 4 levels, thereby obtaining three four-level test factors and four two-level factors, which can be expressed mathematically as 2 4 ×4 3 Accordingly, a mixed level orthogonal table can be constructed to match the mixed level orthogonal table L 16 (2 6 ×4 3 ). That is, when constructing a mixed-level orthogonal table, levels can be added adaptively according to the number and category distribution of the levels of each test factor.
[0097] For complex numbers of levels, after adding new levels, you can also choose to build a mixed-level orthogonal array, which can provide a wider range of applicability. Mixed-level orthogonal arrays can also help reduce the complexity of the design, reduce errors caused by improper design, reduce unnecessary redundant test cases and repeated test cases, and improve test efficiency.
[0098] Step 103: Call the geometric modeling engine through the test calling interface to execute each test case in the target test case set.
[0099] Before starting to execute the test cases, the test environment has been pre-built, the geometry modeling engine to be tested has been correctly installed, the software and libraries it depends on have been configured, and the hardware resources can meet the test requirements to ensure that it can carry a variety of test scenarios, especially test scenarios with high requirements for memory usage, computing power, rendering, etc. Ensure that the test can be carried out in a stable environment to avoid test anomalies and inaccurate test results caused by environmental problems.
[0100] In some embodiments, after the environment is set up and a target test case set containing multiple test cases is obtained, the multiple test cases in the target test case set are imported into a test execution tool. The test execution tool calls the corresponding geometric modeling engine through a test call interface to execute the test cases, mainly executing the test input information in the test cases.
[0101] In some embodiments, each test case may be executed according to an execution order and a time schedule, for example, certain test cases may be executed first, or they may be executed in batches according to different geometry modeling engines and different test case sets.
[0102] Automated import of test cases and automated execution improves import efficiency and execution efficiency, avoids the problems of slow manual import and import errors, thereby greatly improving test efficiency and reducing manual intervention and error rates.
[0103] In the embodiment of the present application, according to the test requirements of the geometric modeling engine, a target test case set that can meet the test requirements is automatically matched for the geometric modeling engine, and the geometric modeling engine is called to execute the test cases in the target test case set through the test call interface corresponding to the geometric modeling engine that implements the function call in accordance with the set operation specification. The matching of the test requirements and the test cases ensures the comprehensiveness of the test, reduces the test steps brought by unnecessary test cases, ensures the pertinence and effectiveness of the test, avoids the blindness of the test, and reduces the test time. The test call interface realizes the automatic conversion of the test case to the executable data format of the geometric modeling engine, ensures that each test case in the target test case set can be accurately executed by the geometric modeling engine without being restricted by the data format, and reduces the configuration difficulty. The synergy between the test requirement matching and the test call port greatly improves the test efficiency of the geometric modeling engine.
[0104] See also Figure 2 , Figure 2 This is a process of testing a geometric modeling engine provided by an embodiment of the present application Figure 2 .like Figure 2 As shown, a method for testing a geometric modeling engine comprises the following steps: Step 201, obtaining the test requirements of the geometric modeling engine.
[0105] The implementation process of this step is the same as the implementation process of step 101 in the aforementioned embodiment, and will not be repeated here.
[0106] Step 202, matching a target test case set that meets the test requirements for the geometric modeling engine.
[0107] The implementation process of this step is the same as the implementation process of step 102 in the aforementioned embodiment, and will not be repeated here.
[0108] Step 203: Call the geometric modeling engine through the test calling interface to execute each test case in the target test case set.
[0109] The implementation process of this step is the same as the implementation process of step 103 in the aforementioned embodiment, and will not be repeated here.
[0110] Step 204: monitor first test information of the geometric modeling engine on multiple test items.
[0111] During the test, the test information of the test items is monitored in real time, such as rendering speed, memory usage, calculation accuracy, CPU load, etc. At the same time, resource consumption and possible errors or abnormal events such as program crashes, abnormal operation or operation timeouts are monitored.
[0112] The first test information and error abnormal events monitored are collected in real time.
[0113] Step 205, compare the first test information with the test reference information of the multiple test items, obtain the test performance and optimization suggestions of the geometric modeling engine and output them; and / or compare the first test information with the second test information of other geometric modeling engines on the multiple test items, obtain the engine difference information and output it.
[0114] In some embodiments, test reference information corresponding to each test item is provided, and the test reference information is an indicator expected to be achieved corresponding to the test item.
[0115] After the test is completed, automated analysis is performed based on the collected information to achieve an objective and comprehensive evaluation of the geometric modeling engine, reduce deviations and omissions caused by manual operations, and improve evaluation efficiency and the accuracy of evaluation results.
[0116] By comparing the first test information of multiple test items with the test reference information, it is possible to obtain test performance of whether the geometric modeling engine has achieved the expected indicators on each test item and how far it has compared with the expected indicators.
[0117] In some embodiments, by comparing test information of different test cases, performance bottlenecks can be identified and test performance can be obtained, such as slow rendering speed or high memory usage.
[0118] Furthermore, optimization suggestions for the geometry modeling engine can be made based on the test performance obtained by comparing the test information, such as the test performance under boundary conditions or extreme test situations, as well as the resource consumption during the test process and possible errors or abnormal events, such as functional defects and stability issues.
[0119] In some embodiments, test performance and optimization suggestions are output, and the user can improve the geometric modeling engine based on the test performance and optimization suggestions.
[0120] In some embodiments, the first test information is compared with the second test information of other geometric modeling engines on multiple test items to obtain engine difference information and output it. The other geometric modeling engines may be other types of geometric modeling engines or different versions of the same type of geometric modeling engines.
[0121] When multiple geometric modeling engines are compared horizontally, the test results under the same test case set are compared to improve the comparability and credibility of the comparison results.
[0122] In some embodiments, the capabilities of different geometric modeling engines in terms of function realization, performance optimization, resource usage, etc. are compared to obtain engine difference information, so as to facilitate the selection of the most appropriate geometric modeling engine, optimize the development of industrial design software, and improve the quality and stability of industrial design software. Among them, function realization includes the accuracy and completeness of functions such as geometric operations, algorithm processing, and feature modeling. For example, whether all supported geometric types can be processed correctly, and whether complex geometric operations can be performed stably. Performance optimization includes execution efficiency (such as rendering speed, calculation time) and performance in optimization algorithms, parallel computing, and memory management. Resource usage includes memory usage, CPU occupancy, etc.
[0123] In some embodiments, the comparison results between geometric modeling engines can be output in the form of three-dimensional graphs, etc., so as to intuitively see the test performance of different geometric modeling engines. It supports viewing and operating the test results of multiple geometric modeling engines at the same time, which is helpful to directly compare the performance differences of different engines.
[0124] Users can improve the geometry modeling engine based on test performance and optimization suggestions, and test the improved geometry modeling engine. At this time, the functions and / or performance of different versions of the geometry modeling engine before and after the improvement can be compared, that is, regression testing can be implemented. Regression testing helps verify whether the new version solves known problems, whether new problems are introduced, and whether performance and stability are improved.
[0125] During regression testing, test cases that performed poorly in previous tests can be selected for testing first. Record the execution results of each regression test case, including test environment information, execution time, memory usage, and other test information. Compare the test information of the new version and the old version to check whether the problem has been effectively fixed in the new version, whether the performance has been improved, whether new problems have been introduced, or whether the functional performance has degraded.
[0126] Through regression testing, we can effectively confirm whether the geometric modeling engine remains stable after the version update, ensuring that problems are fixed without affecting other functions and performance.
[0127] Compare the differences in functionality and / or performance between the new and old versions, compare the functional stability of the new and old versions, compare the performance of the new and old versions on known issues, compare the resource usage of the new and old versions, etc.
[0128] The ultimate goal of regression testing and result comparison is to ensure that each version update can effectively improve the performance and stability of the geometry modeling engine and provide users with more efficient and reliable modeling tools.
[0129] Regression testing and result comparison are used to optimize the problems and performance bottlenecks found, and to conduct targeted verification. As an important part of geometry modeling engine optimization, regression testing can effectively verify the performance stability and function repair of the geometry modeling engine after each version update, thus reducing potential risks.
[0130] This application is provided with a unified output format, and according to the set output format, accurate and relatively objective test performance, optimization suggestions and / or engine difference information of the geometric modeling engine are output. This information can be summarized into a test report and output together.
[0131] The output format may include input parameters, expected output, test information, test performance, optimization suggestions, comparison data and other information, and display them in a certain order. Among them, the input parameters list in detail the test factors and levels used in the test, such as geometric data, algorithm parameters, boundary conditions, configuration settings, etc. The expected output results include, for example, the return value of the function or operation, the rendering result (such as the display of the model or the transformation effect), whether the operation is successful (the mark of success or failure), possible performance indicators (such as rendering time, memory usage), etc. Test information includes, for example, rendering speed, memory usage, computing resource consumption (such as CPU load, hard disk input / output parameters), etc.
[0132] The unified output format not only helps to improve data processing efficiency, but also ensures the consistency and comparability of test results, making it easier for users to make horizontal comparisons between different geometric modeling engines and realize self-analysis and comparison.
[0133] In an embodiment of the present application, in the process of the geometric modeling engine executing each test case in the target test case set, the first test information of the geometric modeling engine on multiple test items is monitored in real time. The first test information is compared with the test reference information of the multiple test items to obtain and output the test performance and optimization suggestions of the geometric modeling engine, revealing its advantages and disadvantages and providing direction for further optimization. At the same time, the first test information can also be compared with the second test information of other geometric modeling engines on multiple test items to obtain and output engine difference information, which helps users understand the differences between different geometric modeling engines and select the appropriate geometric modeling engine. The automated monitoring and analysis of the present application makes the evaluation process faster and more accurate, and is convenient for guiding users to optimize and select geometric modeling engines.
[0134] See also Figure 3 , Figure 3 This is a structural diagram of a test system for a geometric modeling engine provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0135] The testing system 300 of the geometric modeling engine includes: an acquisition module 301 , a matching module 302 , and a use case execution module 303 .
[0136] Acquisition module 301 is used to obtain the test requirements of the geometric modeling engine; the geometric modeling engine corresponds to a test calling interface, and the test calling interface is used to call the geometric operation function and algorithm processing function of the geometric modeling engine according to the set operation specification, and the set operation specification is used to convert the test case into a data format executable by the geometric modeling engine.
[0137] The matching module 302 is used to match the target test case set that meets the test requirements for the geometric modeling engine.
[0138] The test case execution module 303 is used to call the geometric modeling engine to execute each test case in the target test case set through the test calling interface.
[0139] In some embodiments, the matching module is specifically used to: Parsing the test requirement to obtain at least one test item; Query a first test case set for testing the test item from a database as the target test case set; or, Parsing the test requirement to obtain at least one of the test items and test configuration information; the test configuration information includes a plurality of test factors, at least one parameter value corresponding to each of the test factors, and output prediction reference information; A second test case set having the test configuration information and used to test the test item is queried from the database as the target test case set.
[0140] In some embodiments, when the second test case set having the test configuration information and used to test the test item does not exist in the database, the matching module is further used to: Taking at least one parameter value corresponding to each of the test factors as the level of the test factor, and constructing an orthogonal table based on the test factors and the levels; According to the output prediction reference information, predict the test results of the multiple test factors in each row of the orthogonal table at the level to obtain the expected output results of the multiple test factors in each row at the level; The multiple test factors in each row of the orthogonal table, the levels corresponding to the multiple test factors, and the expected output results of the multiple test factors at the levels are taken as one test case to obtain the target test case set containing the multiple test cases.
[0141] In some embodiments, the matching module may also be used to: performing a numerical comparison on the levels of a plurality of the test factors; If the number of the levels of the plurality of test factors is the same, then an equal-level orthogonal array is constructed based on the test factors and the levels; or, If the numbers of the levels of the multiple test factors are different, and the number of categories corresponding to the different numbers of levels is less than a threshold, a mixed level orthogonal table is constructed based on the test factors and the levels.
[0142] In some embodiments, the matching module is further configured to: If the number of the levels of the multiple test factors is different, then determine the first test factor with the largest number of levels from the multiple test factors; the number of the levels corresponding to the first test factor is a first number, and there is at least one second test factor among the multiple test factors with a number of levels lower than the first number; Selecting a second number of the levels from the levels of each of the second test factors as newly added levels of the second test factors, the number of all levels of each of the second test factors after the newly added levels is the first number; The equal-level orthogonal table is constructed based on the first test factor and the level of the first test factor, the second test factor and the level of the second test factor, and the newly added level.
[0143] In some embodiments, the matching module may also be used to: If the numbers of the levels of the plurality of test factors are different, a third test factor whose number of levels is only lower than the first number is determined from the plurality of test factors; the number of levels corresponding to the third test factor is a third number, and there is at least one fourth test factor whose number of levels is lower than the third number among the plurality of test factors; Selecting a fourth number of levels from the levels of each of the fourth test factors as the newly added levels of the fourth test factor, the number of all levels of each of the fourth test factors after the newly added levels is the third number; The mixed-level orthogonal table is constructed based on the first test factor and the level of the first test factor, the third test factor and the level of the third test factor, the fourth test factor and the level of the fourth test factor and the newly added level.
[0144] In some embodiments, the system further comprises a comparison output module for: Monitoring first test information of the geometric modeling engine on a plurality of the test items; Comparing the first test information with the test reference information of the plurality of test items, obtaining and outputting the test performance and optimization suggestions of the geometric modeling engine; and / or, The first test information is compared with the second test information of other geometric modeling engines on the plurality of test items to obtain and output engine difference information.
[0145] The testing system for the geometric modeling engine provided in the embodiment of the present application can implement the various processes of the embodiment of the testing method for the geometric modeling engine described above, and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0146] Figure 4 4 is a structural diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device 4 of the embodiment includes: at least one processor 40 ( Figure 4 Only one is shown in the figure), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, wherein the processor 40 implements the steps of any of the above-mentioned method embodiments when executing the computer program 42.
[0147] The electronic device 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of the electronic device 4 and does not constitute a limitation of the electronic device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0148] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0149] The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used to store the computer program and other programs and data required by the electronic device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
[0150] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0151] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0152] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0153] In the embodiments provided in the present application, it should be understood that the disclosed systems / electronic devices and methods can be implemented in other ways. For example, the system / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the system or unit can be electrical, mechanical or other forms.
[0154] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0155] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0156] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0157] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be implemented through a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0158] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for testing a geometric modeling engine, characterized in that: include: Acquire the test requirements of the geometric modeling engine; the geometric modeling engine corresponds to a test calling interface, the test calling interface is used to call the geometric operation function and algorithm processing function of the geometric modeling engine according to the set operation specification, and the set operation specification is used to convert the test case into a data format executable by the geometric modeling engine; Matching a target test case set that meets the test requirements for the geometric modeling engine; The geometric modeling engine is called through the test calling interface to execute each test case in the target test case set.
2. The method according to claim 1, characterized in that The step of matching the geometric modeling engine with a target test case set that meets the test requirements includes: Parsing the test requirement to obtain at least one test item; Query a first test case set for testing the test item from a database as the target test case set; or, Parsing the test requirement to obtain at least one of the test items and test configuration information; the test configuration information includes a plurality of test factors, at least one parameter value corresponding to each of the test factors, and output prediction reference information; A second test case set having the test configuration information and used to test the test item is queried from the database as the target test case set.
3. The method according to claim 2, characterized in that In the case that the second test case set having the test configuration information and used for testing the test item does not exist in the database, after parsing the test requirement and obtaining at least one test item and the test configuration information, the method further includes: Taking at least one parameter value corresponding to each of the test factors as the level of the test factor, and constructing an orthogonal table based on the test factors and the levels; According to the output prediction reference information, predict the test results of the multiple test factors in each row of the orthogonal table at the level to obtain the expected output results of the multiple test factors in each row at the level; The multiple test factors in each row of the orthogonal table, the levels corresponding to the multiple test factors, and the expected output results of the multiple test factors at the levels are taken as one test case to obtain the target test case set containing the multiple test cases.
4. The method according to claim 3, characterized in that The constructing of an orthogonal table based on the test factors and the levels comprises: performing a numerical comparison on the levels of a plurality of the test factors; If the number of the levels of the plurality of test factors is the same, then an equal-level orthogonal array is constructed based on the test factors and the levels; or, If the numbers of the levels of the multiple test factors are different, and the number of categories corresponding to the different numbers of levels is less than a threshold, a mixed level orthogonal table is constructed based on the test factors and the levels.
5. The method according to claim 4, characterized in that After comparing the number of the levels of the plurality of test factors, the method further comprises: If the number of the levels of the multiple test factors is different, then determine the first test factor with the largest number of levels from the multiple test factors; the number of the levels corresponding to the first test factor is a first number, and there is at least one second test factor among the multiple test factors with a number of levels lower than the first number; Selecting a second number of the levels from the levels of each of the second test factors as newly added levels of the second test factors, the number of all levels of each of the second test factors after the newly added levels is the first number; The equal-level orthogonal table is constructed based on the first test factor and the level of the first test factor, the second test factor and the level of the second test factor, and the newly added level.
6. The method according to claim 5, characterized in that After comparing the number of the levels of the plurality of test factors, the method further comprises: If the numbers of the levels of the plurality of test factors are different, a third test factor whose number of levels is only lower than the first number is determined from the plurality of test factors; the number of levels corresponding to the third test factor is a third number, and there is at least one fourth test factor whose number of levels is lower than the third number among the plurality of test factors; Selecting a fourth number of levels from the levels of each of the fourth test factors as the newly added levels of the fourth test factor, the number of all levels of each of the fourth test factors after the newly added levels is the third number; The mixed-level orthogonal table is constructed based on the first test factor and the level of the first test factor, the third test factor and the level of the third test factor, the fourth test factor and the level of the fourth test factor and the newly added level.
7. The method according to claim 2, characterized in that: After calling the geometric modeling engine to execute each test case in the target test case set through the test calling interface, the method further includes: Monitoring first test information of the geometric modeling engine on a plurality of the test items; Comparing the first test information with the test reference information of the plurality of test items, obtaining and outputting the test performance and optimization suggestions of the geometric modeling engine; and / or, The first test information is compared with the second test information of other geometric modeling engines on the plurality of test items to obtain and output engine difference information.
8. A testing system for a geometric modeling engine, characterized in that: include: An acquisition module, used for acquiring the test requirements of the geometric modeling engine; the geometric modeling engine corresponds to a test calling interface, the test calling interface is used to call the geometric operation function and algorithm processing function of the geometric modeling engine according to a set operation specification, and the set operation specification is used to convert the test case into a data format executable by the geometric modeling engine; A matching module, used for matching a target test case set that meets the test requirements for the geometric modeling engine; The test case execution module is used to call the geometric modeling engine to execute each test case in the target test case set through the test calling interface.
9. An electronic device, characterized in that: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed, causes the method according to any one of claims 1 to 7 to be performed.
Citation Information
Patent Citations
Test case generation method and device, electronic equipment and computer readable medium
CN114238128A
Test method and device, electronic equipment and storage medium
CN116594897A
Automatic testing method, terminal equipment and computer readable storage medium
CN117435510A
Test case construction method and system based on knowledge base and storage medium
CN118672920A
Automatic testing method and device for electric energy meter
CN119247252A