Test case operation method and system, medium and program product

By providing a test case library and test case combination generation method in CAD software testing, the problems of long testing time and high cost in CAD software testing are solved, the stability and smoothness of automated testing are improved, and test conflicts and data pressure are reduced.

CN120973687APending Publication Date: 2025-11-18SUZHOU CAD SOFTWARE CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202511242364.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-02
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing testing methods are difficult to apply effectively to CAD software testing, resulting in long testing times and high costs.

Method used

This paper provides a method for running test cases, including providing a test case library, obtaining test requirements, identifying test cases under related functional nodes and generating test case combinations, and improving the stability and smoothness of automated testing by updating the parameters of test elements and restoring scenarios.

Benefits of technology

By generating test case combinations and partially updating the test environment, conflicts in the automated testing process are reduced, the practicality and usability of test results are improved, and data pressure is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973687A_ABST
    Figure CN120973687A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of CAD testing, in particular to a test case operation method and system, a medium and a program product, and the method comprises the steps: providing a test case library; obtaining a test demand input by a test user, wherein the test demand comprises at least one to-be-tested operation function; obtaining at least one associated function node associated with the operation function to identify at least one test case under the associated function node; generating a case combination according to the at least one test case; the use case combination is run in a test combination, the test combination comprises a test target and a standard target, and the test target comprises at least one version of software. The invention provides an automatic implementation method for screening and running test cases. The method can improve the accuracy and reliability in an automatic test process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of CAD (Computer Aided Design) testing, and particularly relates to a test case running method, system, medium and program product. BACKGROUND

[0002] The function of CAD software is complex, and there are many repetitive tests, so the test takes a long time and costs a lot in the software development process.

[0003] At present, ordinary software usually adopts white box analysis for testing. For example, patent application 201711450712.3 discloses a white box testing method for a Java project, which includes: according to a preset execution order of each test tool, sequentially judging whether the Java project to be tested needs to execute the test items corresponding to each test tool, and when it is determined that the test items need to be executed, executing the corresponding test tool; after the execution of each test item corresponding to the plurality of test tools is completed, a unit test report is generated.

[0004] Patent application 201911012761.8 discloses a test case automatic generation and test process management method based on white box analysis, which includes: configuring a test environment, analyzing and displaying a user code structure; performing white box static analysis on the user code to obtain a white box analysis result; performing test process management based on the white box analysis result, including: obtaining a user's test requirements, designing a test process and corresponding test cases according to the test requirements, managing automatically generated and customer-defined test cases; performing dynamic testing based on the white box analysis result, including: sufficiency testing, coverage testing, function testing, time performance testing, variable dynamic analysis, dynamic memory analysis, and then generating a dynamic test report; executing the test cases based on the white box analysis result to obtain test results and coverage of each node in a function call relationship diagram.

[0005] However, the existing test scheme is difficult to apply to CAD software testing. SUMMARY

[0006] The present application aims to provide a test case running method to improve the stability and smoothness of the automatic testing process.

[0007] Specifically, the present application provides a test case running method, which includes: S400, providing a test case library, the test case library including: at least one language node, each language node corresponding to a plurality of function nodes, and at least one test case being recorded under each function node; S402, obtaining a test requirement input by a test user, the test requirement comprising at least one operation function to be tested; S404, obtaining at least one associated function node associated with the operation function; S406, identifying at least one test case under the associated function node; S408, generating a case combination according to at least one test case; S410, running the case combination in a test combination, the test combination comprising a test target and a standard target, the test target comprising at least one version of software.

[0008] In some embodiments, S410 comprises the steps of: running a first test case on the test target, the first test case comprising a first test element; identifying a first test parameter of the first test element, the first test parameter comprising one or more of size, coordinate, and state; identifying whether a second test element corresponding to the first test element exists in a second test case and has an initial second test parameter before running the second test case on the test target; if yes, performing the following steps: updating a current test environment according to the first test parameter and the second test parameter.

[0009] In some embodiments, the step of updating the current test environment according to the first test parameter and the second test parameter comprises: when the first test parameter and the second test parameter are different, modifying the first test parameter of the first test element to the second test parameter.

[0010] In some embodiments, the second test element comprises a same test element as the first test element and / or a test element associated with the first test element.

[0011] In some embodiments, S410 comprises the steps of: running a first test case on the test target; judging whether to perform a scene recovery on a current test environment before running a second test case on the test target; if yes, performing the scene recovery on the current test environment, and then running the second test case.

[0012] In some embodiments, the test cases include: a first type of test case and a second type of test case; the first type of test case is stored in a first resource area, and the second type of test case is stored in a second resource area; the second type of test case is stored in the second resource area, and an index of the second type of test case is stored in a dictionary; S410 includes the following steps: a plurality of first type of test cases are called from the first resource area, and the plurality of first type of test cases are copied into a main test program in a linking stage according to the plurality of first type of test cases; the main test program is started in the test target; when a second type of test case needs to be identified, the second type of test case is found through a corresponding index path, and a dynamic calling interface is generated for the second type of test case; the main test program runs the second type of test case through the dynamic calling interface.

[0013] In some embodiments, the index is a file name of the second type of test case.

[0014] The application further provides a running system, comprising: a test case library module configured to provide a test case library, the test case library comprising: at least one language node, one language node corresponding to a plurality of function nodes, and at least one test case recorded under one function node; an input module configured to obtain a test requirement input by a test user, the test requirement comprising: at least one operation function to be tested; an association module configured to obtain at least one associated function node associated with the operation function; an identification module configured to identify at least one test case under the associated function node; a combination module configured to generate a test case combination according to at least one test case; a running module configured to run the test case combination in a test combination, the test combination comprising: a test target and a standard target, and the test target comprising: at least one version of software.

[0015] The application further provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement the steps of the method according to any one of the embodiments.

[0016] The application further provides a computer program product, comprising computer programs / instructions, wherein the computer programs / instructions are executed by a processor to implement the steps of the method according to any one of the embodiments.

[0017] Beneficial technical effects: the application provides an automatic operation method, which can generate application case combinations according to user's needs, so as to improve the practicability / availability of test results (such as improving the completeness of test functions or test data) to a certain extent through screening of the case combinations.

[0018] Further, by updating the test environment through the first test element and the second test element, the conflicts that may be generated in the automatic test process can be reduced or alleviated.

[0019] In other words, the application can update the test parameters of the associated elements through partial update of the test elements (i.e. focusing on the associated elements), so as to reduce the conflicts that may be generated in the automatic operation process of batch test cases, and reduce the data pressure of automatic verification. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. In all the drawings, similar elements or parts are generally identified by similar reference signs. In the drawings, each element or part is not necessarily drawn according to the actual scale. Obviously, the drawings described below are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0021] Figure 1 Flowchart of a software test method in an exemplary embodiment of the application; Figure 2 Flowchart of determining a data output scheme in an exemplary embodiment of the application; Figure 3 Application flowchart of a test case in an exemplary embodiment of the application; Figure 4 Application flowchart of a test case in another exemplary embodiment of the application; Figure 5 Partial schematic diagram of a selection interface of a test case in an exemplary embodiment of the application; Figure 6 Structural schematic diagram of a computer device in an exemplary embodiment of the application. DETAILED DESCRIPTION

[0022] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0023] Herein, the suffix such as "module", "part" or "unit" used to represent an element is only for the convenience of description of the present application, and has no specific meaning by itself. Therefore, "module", "part" or "unit" can be mixedly used.

[0024] Herein, the terms "upper", "lower", "inner", "outer", "front", "back", "one end", "the other end" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of description of the present application and simplification of the description, and do not indicate or imply that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.

[0025] Herein, unless otherwise explicitly specified and limited, the terms "mount", "provided with", "connected" and the like should be understood broadly, for example, "connected" can be fixedly connected, can be detachably connected, or integrally connected; can be mechanically connected, can be directly connected, or indirectly connected through an intermediate medium, can be the communication inside two elements. For a person of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0026] Herein, "and / or" includes any and all combinations of one or more listed associated items.

[0027] Herein, "a plurality of" means two or more, that is, it includes two, three, four, five, etc.

[0028] In the present specification, the term "about" typically means + / - 5% of the stated value, more typically + / - 4% of the stated value, more typically + / - 3% of the stated value, more typically + / - 2% of the stated value, even more typically + / - 1% of the stated value, even more typically + / - 0.5% of the stated value.

[0029] In this specification, certain embodiments can be disclosed in a format that is a range. It is to be understood that such a "range" format is merely used to simplify description of the embodiments, and is not intended to indicate that a "range" by itself as a entirety of disclosure. Therefore, all possible subranges or individual numerical values are to be considered as if explicitly written herein. For example, a range from 1 to 6 should be considered as disclosing individual numbers 1, 2, 3, 4, 5, and 6, as well as subranges like from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6 etc. No matter how a range is denoted, the principles described herein are to be applied.

[0030] Glossary: "Entity": In this specification, an entity refers to a graphic data on a drawing, such as a CAD file, which is displayed on a CAD drawing interface. An entity has attributes, i.e. data values that control specific visual characteristics (e.g. visibility, color, and line style) of the entity or element. In different embodiments, an entity can also be referred to as a "pixel", "primitive".

[0031] "Object": In this specification, an object refers to information on a CAD file that is not displayed on a CAD drawing interface (the specific values of these information can also be referred to as attributes), such as layers, text styles, annotation styles, etc. In this specification, a "style" refers to a named collection of attributes used to classify and define specific geometric and text elements (e.g. line styles or text styles).

[0032] "Element": In this specification, an element refers to all possible information on a CAD file, i.e. including "entities" and "objects", and also blocks, groups, unit definitions based on "entities" and / or "objects". Correspondingly, the attributes of these elements are also referred to as simulation data (or rendering data).

[0033] "Drawing": In this specification, a drawing can refer to various types of files that can be run on a CAD system for rendering, editing, modifying, storing, viewing CAD drawings. Common CAD drawing formats include, but are not limited to, DWG, DXF, DWT, DWF, DWL, DWS, DWX, MNU, MNC, MNL, MNS, CUI, CUIX, SHX, PAT, LIN, CTB, STB, PLT, PC3, etc.

[0034] "Software": In this specification, refers to a collection of computer data and instructions organized in a specific order. The software can include computer programs that can be run on a computer, and also documents related to these computer programs. In other words, the software can be a collection of programs and documents.

[0035] “Test environment”: In this context, the test environment of software refers to the combination of software and hardware specially configured for verifying the function, performance and stability of software, including one or more necessary components such as operating system, database, network configuration, test tool (such as test case) and the like. Its core goal is to simulate the running performance under real running scenarios (such as drawing of drawings, display of drawings, etc.).

[0036] “Operation point”: In this context, the operation point refers to the operation position of the user in the digital interface (such as the display interface) of the computer controlled by the input device (such as the mouse, touchpad, touch screen, etc.), which is the direct action point of the user interacting with the system or software. It can be explicitly identified by visual symbols such as cursors and text insertion points, so that the user can intuitively perceive the operation object (such as entities or objects, etc.) and complete the instruction transmission through clicking, inputting, dragging and the like. For example, in some embodiments, when the user needs to draw a line segment in the current interface, the first operation point and the second operation point can be selected as the two endpoints of the line segment in the display interface.

[0037] Test function (referred to as function): Function refers to an independent unit that can complete a specific task or provide a specific service, for example, a function can be an operation command or an interactive module. Generally, the function is the core carrier of the interaction between the software and the user, and usually has clear input, processing and output logic.

[0038] Embodiment I: Referring to Figures 1-2 , the present application provides a software testing method.

[0039] As Figure 1 shown, the software testing method comprises: S300, acquiring a test combination, the test combination comprising: a test target and a standard target, the test target comprising: at least one version of the software to be tested, and the standard target comprising: at least one version of the comparison software; For example, in some embodiments, the test target can be a software to be tested selected by the user, and the standard target can be a software selected by the user from the existing market as a comparison benchmark.

[0040] S302, selecting a test case combination according to the test combination, the test case combination comprising: at least one test case, the test case being composed of at least one simulated operation instruction, and at least one test case corresponding to one test function; In some embodiments, the test combination comprises at least one test function.

[0041] For example, in some embodiments, the user can select one or more test functions according to test requirements to form a test combination, and according to the test combination, a corresponding test case combination can be selected from the test case database.

[0042] For example, in some embodiments, a plurality of test cases are pre-stored in the test case database, and each test case is marked with a label, and the label records test function information (such as test function name), so as to facilitate automatic selection of calling test cases according to test combinations.

[0043] S304, running the test combination in the test combination, and generating at least one set of first test data, the first test data including first data and second data obtained by respectively running the test case on the test target and the standard target.

[0044] Further, in some embodiments, the method further comprises the steps of: S306, filtering the first test data by using a filtering operation to generate an output scheme; wherein S306 comprises: S3060, calculating the difference between the first data and the second data; S3062, when the difference is less than or equal to a preset first difference threshold, and the data content of the corresponding data belongs to a preset type of record content, identifying the corresponding first test data as a type of data, and identifying other first test data as a type of data; S3064, generating a data output scheme according to data attributes, wherein the data attributes include the following attributes: data category.

[0045] In some embodiments, data attributes can be obtained from a preset attribute range. In the attribute range, at least one attribute category (or attribute type) can be pre-set by the user, such as data category, test function, etc.

[0046] In some embodiments, the attribute range can be selected according to the test scene. For example, the user can select the attribute range according to the test requirements or focus under the current test scene.

[0047] For example, in some embodiments, the output priority of the type of data is higher than that of the type of data.

[0048] For example, in some embodiments, the data output scheme can be: outputting the first test data in a document manner, and the sorting of the type of data output is before that of the type of data.

[0049] For example, in some embodiments, the test data includes test data of a plurality of test cases, and the test data of a test case can include a plurality of record contents (each record content can be marked with a different output priority). Specifically, for a plurality of record contents corresponding to a test case, the record content marked as the second type of data can be arranged in front of the record content marked as the first type of data.

[0050] For example, in some embodiments, a data mark can be generated for the output test data (or first data, second data) respectively, which is used to record the function category (such as function name, etc.), the data category (such as belonging to the first type of data or the second type of data).

[0051] For example, in some embodiments, the output order of the test data can also be sorted according to one or more types of data attributes, such as data category.

[0052] For example, the output priority of the second type of data is greater than the output priority of the first type of data. For example, different function categories are pre-set with importance, and the greater the importance, the higher the output priority.

[0053] For example, the output priority (also referred to as attention priority) can be determined according to the data category and the function category, and the weight ratio of the data category and the function category in determining the output priority can be set by the software test engineer as needed.

[0054] In some embodiments, the first type of record content includes one or more of: Pinch point position, text position, annotation position, coordinate accuracy.

[0055] In this embodiment, by filtering the first type of record content, the interference of software subtle design differences on overall performance evaluation can be reduced to a certain extent.

[0056] For example, when there is a subtle difference between two software in the pinch point operation accuracy (i.e. the coordinate accuracy of the pinch point), it may be due to the difference in the version of the software itself design, so the user can be guided not to pay attention when outputting the scheme.

[0057] That is, in some embodiments, when the difference is greater than the first difference threshold, or the data content of the data belongs to the second type of record content, the corresponding test data (such as the first data and / or the second data) is identified as the second type of data. Conversely, the remaining test data can also be identified as the first type of data.

[0058] That is, for a large amount of test content and test results, this embodiment provides a data output scheme for filtering core differences, so as to facilitate the user to quickly focus on the test results.

[0059] In some embodiments, the second type of record content can refer to a plurality of data contents other than the first type of record content, such as one or more of the following: (1) Core performance indicators: such as execution time (e.g., start-up time, file loading time, save time, rendering time, etc.), throughput (e.g., the number of operations that can be completed per unit of time, such as the number of elements that can be processed per second or the number of buffers that can be generated per second).

[0060] (2) Precision indicators: geometric operation precision (e.g., buffer analysis precision, overlay analysis precision, etc.), topological precision (e.g., the correctness of the software in maintaining and processing topological relationships (e.g., adjacency, connectivity, containment). For example, checking whether it can correctly identify and repair topological errors such as hanging lines, overlapping surfaces, gaps, etc.), mapping output precision.

[0061] (3) Resource consumption indicators: memory usage (e.g., it can be free memory usage: the amount of memory used after the software is started without any operation; peak memory usage: the maximum memory usage during the execution of large and complex tasks. Memory leakage is usually manifested as a persistent increase in peak memory usage without release; working set memory: the amount of memory required for normal operation of the software); CPU usage; GPU usage; network bandwidth usage.

[0062] (4) Stability indicators: crash / error rate, large data processing capability (which is used to evaluate whether the software can normally open, render, and operate on a data set that is much larger than normal (e.g., GB-level raster data or vector data containing millions of elements) without crashing or experiencing a sharp decrease in performance).

[0063] For example, in some embodiments, data that does not belong to the first type of record content (e.g., first data or second data) is identified as second type data.

[0064] In some embodiments, the test function can be a text function (e.g., testing the accuracy of text display), a drawing performance (e.g., testing the accuracy, efficiency, and rendering efficiency of drawing data, etc.), an ecology function (e.g., stability, compatibility, etc.), etc.

[0065] In some embodiments, one test function can correspond to one or more record contents.

[0066] In some embodiments, the simulation operation instruction can be a pre-written operation code for the user to execute at least one functional task. For example, the simulation operation instruction can instruct the CAD software to perform a specific graphic or data operation, such as drawing a graphic element, modifying an object, managing a view, or controlling a file attribute, etc.

[0067] For example, in some embodiments, one simulation operation instruction is composed of multiple operation functions.

[0068] For example, in the case of a circle-drawing operation instruction, the circle-drawing operation instruction includes: operation function 1, for adding drawing data of a circle to the display interface; operation function 2, for storing the drawing data of the circle (such as coordinate position, diameter, etc.) into the drawing database of the drawing; and operation function 3, for refreshing the display interface according to the drawing data to display the newly added circle. Generally, the multiple operation functions have a set execution order for simulating the regular operation sequence of an engineer.

[0069] In some embodiments, step S3064 includes: (1) when the difference is greater than a preset second difference threshold, the first test data is marked as error data; (2) generating a focus priority of multiple error data according to a data attribute; For example, in some embodiments, the data attribute is a data category (such as class I or class II) corresponding to the test data. The focus priority is preferably used to define the order of data output, for example, the higher the focus priority, the higher the ranking of the output data.

[0070] (3) sorting the multiple error data according to the focus priority to form a corresponding data output scheme.

[0071] In this embodiment, the focus priority of class II data is preferably sorted according to the identification result of the data category. The focus priority of class I data can directly use the default output priority.

[0072] In some embodiments, the data attribute further includes the following attributes: test level of the test case, and error degree of the error data; correspondingly, step (2) includes: generating the focus priority of the error data according to the test level and the error degree.

[0073] For example, the test level can have a pre-set focus priority. For example, a software test engineer can set the test level of the test case according to different test requirements.

[0074] In some embodiments, the data attribute further includes the following attribute: associated function; correspondingly, step (2) includes: 1. obtaining a test function corresponding to error data with a first focus priority; 2. obtaining an associated function associated with the test function, and identifying at least one associated test case corresponding to the associated function; 3. obtaining a second attention priority of the first test data corresponding to the associated test case; For example, in some embodiments, the second attention priority can be a priority pre-set for the associated test case.

[0075] For another example, in some embodiments, the second attention priority can be a priority generated according to a data attribute of the first test data of the associated test case.

[0076] 4. verifying or updating the second attention priority according to the first attention priority.

[0077] For example, in some embodiments, when the first attention priority and the second attention priority differ by more than a first priority threshold, it is suggested to update the second attention priority according to the first attention priority to reduce the difference between the first attention priority and the second attention priority.

[0078] For example, in some embodiments, when the first attention priority is greater than the second attention priority, it is suggested to increase the second attention priority, such as updating the second attention priority to the same priority as the first attention priority.

[0079] For example, in some embodiments, when the first attention priority and the second attention priority are the same, the current priority can be maintained.

[0080] For another example, in some embodiments, when the first attention priority and the second attention priority are both greater than a second priority threshold, it is suggested to increase the first attention priority and the second attention priority synchronously.

[0081] For example, in some embodiments, a functional association relationship can be pre-set between different test functions. For example, when a user wants to test a text labeling function, a size recognition function can be associated and used.

[0082] For example, in some embodiments, the test function is pre-set with an association tag, and the association tag records test function information (such as name) associated with the test function.

[0083] In this embodiment, the errors that occur in batches and are focused on are preferably outputted in priority according to the error priority and the functional association, so as to guide the user to prioritize the processing of some errors with a larger impact.

[0084] It should be noted that the software testing method provided by the present application focuses on the software development stage. In the actual software development process, software engineers may update the software code every day. And the updated code needs to be verified in time. Usually, in the testing process, the main function or all functions of the software need to be tested completely, so the amount of test data is very large.

[0085] To this end, the present application proposes an automatic testing and output scheme that can sort and output data according to the attention priority. The automatic scheme sets the attention priority according to different dimensions such as function category, data category, and function relevance, thereby guiding the user to quickly focus on errors with a relatively large impact.

[0086] In other words, in the actual software development process, especially in the process of software function upgrade or adjustment, repeated adjustment or verification is often needed to determine the final complete scheme. In a single testing process, the amount of test data output is often very large, and the error categories that may occur are also very large. To this end, the present application sorts the error data by level to quickly focus the user on errors with a relatively large impact, thereby improving the efficiency of software optimization / improvement to a certain extent.

[0087] In some embodiments, before step (2), the method further includes the following steps: obtaining the number of error data; when the number is greater than or equal to a preset number threshold, selecting an attribute in a first attribute range as the data attribute in step (2); when the number is less than the number threshold, selecting an attribute in a second attribute range as the data attribute in step (2); wherein the first attribute range is greater than the second attribute range.

[0088] Further, the present embodiment also provides a scheme for sorting error data based on a limited attribute range.

[0089] Specifically, in the present embodiment, relatively important attribute factors are used to sort error data, so as to reduce the difficulty of priority generation on the basis of highlighting error highlights in the test document.

[0090] In another aspect, the scope of the priority generation factor (i.e. the attribute scope) can be selected according to the overall test condition (e.g. the number of error data) in the embodiment, so as to reduce the difficulty of priority generation on the one hand (avoiding the output efficiency of the test data being affected by the priority generation process, or the sorting scheme being too complex to obscure or affect the prominence of important issues), and on the other hand, the key data can be highlighted in time so that the user can quickly focus on the key issues. Further, the attention priority can also distinguish the display scheme of different test data.

[0091] For example, in some embodiments, the test result can be located to the code position of the test case outputting the result, and if the test result does not need to be focused on in subsequent tests, the level of the output result can be modified in the test case code, and the recorded result level when outputting and the comparison level configured by the comparison tool are used to determine the display mode of the result when comparing the results. Thus, only important results are seen on the comparison display interface.

[0092] In some embodiments, the data output scheme is also used to generate a score result, and further comprises: obtaining a first score result of the first version of the software in a first period; generating an attention priority of the error data using the first data attribute, and selecting a test function corresponding to the first attention priority as a target function; modifying the target function to obtain a second version of the software; obtaining a second score result of the second version of the software in a second period; calculating the score difference between the first score result and the second score result; When the score difference is less than a preset score threshold, an attribute adjustment signal is generated, which is used to update the attribute type of the data attribute in step (2), or in other words, the user is suggested to update the attribute type.

[0093] In some embodiments, the specific update scheme can be set or selected by the user.

[0094] That is, the attribute type (or attribute scope) can be adjusted by the optimization condition of the software in the embodiment, so as to improve the adaptability between the priority generation scheme and the current test requirement.

[0095] For example, in some embodiments, the score result refers to the score given to at least one test function using a preset scoring rule. Moreover, the basis of the score can be determined according to the test data of the test software.

[0096] For example, in some embodiments, different scoring tables can be set for different test functions. For example, in terms of resource occupation efficiency, different scores can be given according to the size of the occupation efficiency.

[0097] For example, in some embodiments, the test target is A professional CAD (the first version of the software refers to A professional CAD V1.0-0715, and the second version of the software refers to A professional CAD V1.0-0716), and the standard target is B professional CAD. The adjustment process of the attribute range according to the software optimization cycle / efficiency is exemplarily explained: A professional CAD V1.0-0715 (wherein 0715 represents the generation time or batch of the software) is tested to obtain first test data. According to the first test result, a first score result can be given. The first score result and the second score result are overall score results after the software is tested. That is, the score result is a comprehensive value of the scores of multiple test functions (such as the weighted sum result of multiple scores).

[0098] The error data in the first test data is sorted and output according to the order of the priority. The software engineer first focuses on one or more test data with high priority (the test function corresponding to which is referred to as the target function), and updates the code of A professional CAD V1.0-0715 according to the test data to obtain A professional CAD V1.0-0716. Further, A professional CAD V1.0-0716 is tested to obtain second test data, and a second score result is generated according to the second test data.

[0099] The first score result and the second score result are calculated to calculate the score difference (such as the difference between the two). When the difference is less than the score threshold, it is recommended to update the attribute type (or attribute range) of the data attribute.

[0100] Of course, the specific update scheme can be manually adjusted by the user.

[0101] In some embodiments, the two software A and B can be the software to be tested and the software of a competitor, respectively. Alternatively, the two software A and B can also be different software developed by the test manufacturer.

[0102] It can be understood that the sorting result of the error data can be tracked in the present embodiment. That is, when the user selects the test function corresponding to the higher priority for local optimization according to the current priority sorting result, the priority generation scheme can be adjusted according to the optimization efficiency to enhance the adaptability of the priority generation scheme to the test scene.

[0103] Further, in some embodiments, the test documents can be outputted in different data structures.

[0104] For example, in some embodiments, the outputted test documents are log contents organized in xml markup language, stored as binary byte files after encryption.

[0105] For example, in some embodiments, the method further comprises storing the test documents, for example, in some embodiments, the test result records marked / identified as important results can be stored.

[0106] In some embodiments, the log files (i.e. test results) outputted by the test cases can be loaded, parsed, and displayed.

[0107] And, in some embodiments, multiple log files can be loaded at once and compared to find differences.

[0108] In some embodiments, the test cases can include different categories. And, the test cases can be set with case labels, and the case labels can be marked with case categories of the test cases, such as perspective information, execution information (such as manual or automated execution), stage information (such as different stages of unit, integration, system, acceptance, etc.), or type information (such as different test types of function, performance, security, compatibility, etc.).

[0109] For example, from the perspective of testing, the test cases can include one or more of the following: Black box test cases, also known as functional tests or behavior tests. At this time, the tester (such as a software engineer) regards the system under test as a completely opaque "black box". The tester does not need to understand the internal code structure, implementation logic or working state of the system, but only cares about the input and output of the system; White box test cases, also known as structural tests, transparent box tests or glass box tests. The tester can completely see the internal structure of the system, such as source code, architecture, logic flow, etc. The design of the test case is based on these internal knowledge, aiming to verify whether the internal operation is executed as expected.

[0110] Gray box testing is a mixture of black box testing and white box testing. The tester has limited knowledge about the internal structure of the system (for example, database Schema, API interface definition, algorithm selection, system architecture diagram, etc.). However, it will not be as deep as white box testing to each line of code.

[0111] For another example, in some embodiments, the test cases further include manual test cases and / or automatic test cases.

[0112] As an exemplary embodiment, the present application provides a white-box automated test development method with self-verification, i.e., a user can perform more intuitive data analysis on a test process through test results.

[0113] Embodiment two The present application also provides a software test system, comprising: a test combination acquisition module, configured to acquire a test combination, the test combination comprising: a test target and a standard target, the test target comprising: at least one version of software; a use case combination acquisition module, configured to select a use case combination according to the test combination, the use case combination comprising: at least one test case, the test case consisting of at least one simulated operation instruction; a test module, configured to run the use case combination in the test combination, to correspondingly generate at least one set of first test data, the first test data comprising: first data and second data obtained by running the test case in the test target and the standard target, respectively; an output module, configured to filter the first test data by using a filtering operation to generate an output scheme; wherein the output module is further configured to perform the following steps: calculating a difference between the first data and the second data; when the difference is less than or equal to a preset first difference threshold, and the test case belongs to a preset type of test case, identifying the first test data as a type of data, and correspondingly identifying other first test data as a type of data; generating a data output scheme according to a data attribute, wherein the data attribute comprises: a data type.

[0114] It can be understood that the system in the present embodiment can be used to implement the method and / or steps in any one of the above embodiments, which will not be described here again.

[0115] Further, the present application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the software test method according to any one of the embodiments.

[0116] Further, the present application also provides a computer program product, comprising computer programs / instructions, which are executed by a processor to implement the steps of the software test method according to any one of the embodiments.

[0117] Embodiment three Referring to Figures 3-4 the present application provides a test case running method, comprising: S400, providing a test case library, the test case library including a plurality of pre-stored test cases.

[0118] Preferably, the test case library includes at least one language node, one language node corresponding to a plurality of function nodes, and at least one test case recorded under one function node. For example, referring to Figure 5 illustrates an exemplary test case library selection interface, which provides test cases in different languages (such as C++, dotnet and Lisp). The test case library provides a tree-like node selection interface.

[0119] For example, the node selection interface includes a language node (such as a C++ node), and a plurality of function nodes (such as text nodes and mtext nodes) are unfolded under the language node. Further, when one of the function nodes is selected, a plurality of test case nodes can be further unfolded, and a user can manually select a desired test case through node selection.

[0120] S402, obtaining a test requirement input by a test user, the test requirement including at least one operation function to be tested; S404, obtaining at least one associated function node associated with the operation function; S406, identifying at least one test case under the associated function node; S408, generating a case combination according to at least one test case; S410, running the case combination in a test combination, the test combination including a test target and a standard target, the test target including at least one version of software.

[0121] In some embodiments, S410 includes the following steps: (1) running a first test case on the test target, the first test case including a first test element; For example, in some embodiments, a test element can refer to an object or entity to be tested.

[0122] (2) identifying a first test parameter of the first test element, the first test parameter including one or more of size, coordinate, and state; (3) before running a second test case on the test target, identifying whether a second test element corresponding to the first test element (where the first test element and the second test element are also referred to as associated elements) exists in the second test case, and the second test element has an initial second test parameter; if yes, the following steps are performed: (4) updating a current test environment according to the first test parameter and the second test parameter.

[0123] For example, in some embodiments, a first test element is drawn in a tile A, and if the tile A needs to be edited in a second test case, it is considered that there is a second test element corresponding to the first test element in the second test case.

[0124] In some embodiments, the step of updating the current test environment according to the first test parameter and the second test parameter comprises: When the first test parameter and the second test parameter are different, the first test parameter of the first test element is modified to the second test parameter.

[0125] For example, in some embodiments, the first test element is an entity such as a rectangle, and the corresponding first test parameter includes a first size (for example, the length and width of the rectangle have a first value). Correspondingly, in the initial stage of running the second test case, the second test parameter includes a second size (for example, the length and width of the rectangle have a second value). Correspondingly, before executing the second test case, the first test parameter is modified to the second test parameter, that is, the length and width of the rectangle are modified from the first value to the second value.

[0126] For another example, in some embodiments, the test parameter can also be a state, for example, the entity can have a frozen state and an editable state.

[0127] In this embodiment, the test parameter of the associated element is updated by local updating of the test element, so as to reduce the conflict that may be caused in the process of automatically running the batch test case, and reduce the data pressure of automatic verification.

[0128] In some embodiments, the second test element includes the same test element as the first test element, and / or the test element associated with the first test element. Therefore, the second test element and the first test element are mutually referred to as associated elements.

[0129] For example, in some embodiments, the associated test element refers to a test element having a nesting, reference or connection relationship with the first test element.

[0130] For example, in some embodiments, the first test element is a water pipe arranged on a wall surface, and the second test element can be the wall surface.

[0131] In some embodiments, S410 comprises the following steps: running a first test case on the test target; determining whether to perform a scenario recovery on a current test environment before running a second test case on the test target; If yes, performing a scenario recovery on the current test environment before executing the second test case.

[0132] In some embodiments, the step of determining whether to perform a scenario recovery on a current test environment comprises: identifying whether a running process of the first test case can initiate a simulated switching operation, wherein the simulated switching operation is one or more of: resolution switching, perspective switching (such as switching between different perspectives such as spatial perspective, planar perspective, etc.), zoom ratio switching; If yes, suggesting to perform a scenario recovery on the test environment.

[0133] For example, in some embodiments, the scenario recovery can refer to undoing the simulated switching operation. For example, adjusting the zoom ratio modified by the first test case to an initial zoom ratio before the first test case is initiated.

[0134] For example, in some embodiments, performing a scenario recovery can be updating a coordinate of an operation point in a scenario (such as a display interface).

[0135] In this embodiment, the scenario recovery can further reduce the conflicts that can be generated in the automated running process.

[0136] In some embodiments, the test cases comprise: a first type of test case and a second type of test case; wherein the first type of test case is stored in a first resource area, and the second type of test case is stored in a second resource area; the second type of test case is stored in the second resource area, and an index of the second type of test case exists in a dictionary; S410 comprises the steps of: calling a plurality of first type of test cases from the first resource area, and copying the plurality of first type of test cases to a main test program in a linking stage according to the plurality of first type of test cases; initiating the main test program in the test target; that is, executing the first type of test case one by one; when a second type of test case needs to be identified, finding the second type of test case through a corresponding index path (for example, which refers to a storage address of the test case), enabling the second type of test case to generate a dynamic calling interface for at least one first type of test case; the main test program runs the first type of test case through the dynamic calling interface.

[0137] In this embodiment, the second type of test case is associated with at least one first type of test case.

[0138] For example, in some embodiments, the first resource area and the second resource area can be different resource areas.

[0139] For example, in some embodiments, the first resource area can be stored in an internal memory area, and the second resource area can be stored in an external memory area.

[0140] In some embodiments, the index symbol is a file name of the second type of use case, which can exist in a dictionary. In CAD, a dictionary is a core database container object for storing and managing a set of key-value pairs.

[0141] In some embodiments, the call frequency of the first type of use case is greater than the call frequency of the second type of use case. In this embodiment, the first type of use case refers to a test case commonly used in the test process, and the second type of use case refers to a test case with less startup conditions.

[0142] For example, in some embodiments, the first type of use case refers to a test case for running a certain software function. The second type of use case refers to a test case for starting at least one function. Specifically, one second type of use case can be associated with multiple first type of use cases, i.e., the second type of use case generates a call interface for multiple first type of use cases.

[0143] And the second type of use case is often less likely to be enabled (or the enabling time is relatively short), or in some cases, the second type of use case can be a test case that can be ignored or cannot be paid attention to in the test run, for example, these test cases can be one or more of the following types: mtext.grx, kernel.grx.

[0144] In this embodiment, by partitioning and storing different use cases, and differentially calling (such as enabling in different ways), the stability of the automated test run process can be improved, and to some extent, the running pressure of the computer in the test process can be relieved or reduced.

[0145] It can be understood that the software test method provided by the present application can improve the completeness of the test data to some extent, and can improve the stability in the test process (avoid or reduce the conflicts that can occur in the automated process) to some extent by updating / modifying the test parameters, or by scene recovery, etc.

[0146] Embodiment five: The present application also provides a software test system, which comprises the following steps: Obtaining a test combination, the test combination comprising: a test target and a standard target, the test target comprising: at least one version of the software to be tested, and the standard target comprising: at least one version of the comparison software; Selecting a use case combination according to the test combination, the use case combination comprising: at least one test case, the test case being composed of at least one simulation operation instruction, and at least one test case corresponding to one test function; running the use case combination in the test combination, corresponding to generating at least one set of first test data, the first test data comprising: first data and second data obtained by respectively running the test use case and the standard use case in the test target and the standard target; wherein, running the use case combination in the test combination comprises steps of: running a first test use case in the test target, the first test use case comprising a first test element; identifying a first test parameter of the first test element, the first test parameter comprising one or more of: size, coordinate, state; before running a second test use case in the test target, identifying whether there is a second test element corresponding to the first test element in the second test use case, and the second test element has an initial second test parameter; if yes, performing the following steps: updating the current test environment according to the first test parameter and the second test parameter.

[0147] It can be understood that the method in the embodiment can adopt the same or similar steps as in any one of the above-mentioned embodiments, which will not be described here.

[0148] Embodiment six: Another aspect of the present application also provides a test use case running method, comprising: providing a test use case library, the test use case library storing a plurality of test use cases; obtaining test user input test requirements, the test requirements comprising: at least one operation function to be tested; obtaining at least one associated function node associated with the operation function; identifying at least one test use case under the associated function node; generating a use case combination according to at least one test use case; running the use case combination in a test combination, the test combination comprising: a test target and a standard target, the test target comprising: at least one version of software; recording first test data, the first test data comprising: first data generated after running the use case combination in the test target, and second data generated after running the use case combination in the standard target.

[0149] Further, in some embodiments, the method further comprises: filtering the first test data by using a filtering operation to generate an output scheme; which comprises: calculating the difference between the first data and the second data; When the difference is less than or equal to a preset first difference threshold, and the data content of the corresponding data belongs to a preset type of record content, the corresponding first test data is identified as type one data, and other first test data is identified as type two data. According to the data attribute, a data output scheme is generated, wherein the data attribute comprises the following attributes: data category.

[0150] In some embodiments, after the use case combination is selected, the test target and the standard target can be run synchronously to record the test data (i.e., the first data and the second data).

[0151] In some embodiments, the second data can also be historical data recorded after the last run.

[0152] It can be understood that the method in the embodiment can adopt the same or similar steps as in any one of the above embodiments, which will not be described here.

[0153] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method in any one of the embodiments.

[0154] The application further provides a computer program product comprising instructions, which, when the computer program product is run on an electronic device, enable the electronic device to implement the method in any one of the embodiments.

[0155] Please refer to Figure 6 , Figure 6 is a structural schematic block diagram of a computer device provided by the embodiment of the application. The computer program can be run on the computer device as Figure 6 shown. As Figure 6 shown, the computer device comprises a processor, a memory and a network interface connected through a system bus, wherein the memory can comprise a non-volatile storage medium and an internal memory.

[0156] The non-volatile storage medium can store an operating system and a computer program. The computer program comprises program instructions, which, when executed, can enable the processor to execute the method in any one of the embodiments.

[0157] The processor is used to provide computing and control capabilities to support the operation of the entire computer device.

[0158] The internal memory provides an environment for the running of the computer program in the non-volatile storage medium, and the computer program, when executed by the processor, can enable the processor to execute the method in any one of the embodiments.

[0159] The network interface is used for network communication, such as sending the assigned task, etc. Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0160] It should be noted that in this document, the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles, or devices that include a series of elements not only include those elements, but also include other elements not explicitly listed, or further include elements inherent to such processes, methods, articles, or devices. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.

[0161] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a computer terminal (which can be a mobile phone, computer, server, or network device, etc.) execute the methods described in various embodiments of the present application.

[0162] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, which are only illustrative and not limiting. Those skilled in the art can make many forms under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, which are all within the protection of the present application.

Claims

1. A method of running a test case, the method comprising: Comprising: S400, providing a test case library, the test case library comprising: at least one language node, one language node corresponding to a plurality of function nodes, and at least one test case recorded under one function node; S402, obtaining a test requirement input by a test user, the test requirement comprising: at least one operation function to be tested; S404, obtaining at least one associated function node associated with the operation function; S406, identifying at least one test case under the associated function node; S408, generating a case combination according to at least one test case; S410, running the case combination in a test combination, the test combination comprising: a test target and a standard target, the test target comprising: at least one version of software.

2. The method of claim 1, wherein, S410 comprises the steps of: running a first test case on the test target, the first test case comprising a first test element; identifying a first test parameter of the first test element, the first test parameter comprising one or more of: size, coordinate, state; before running a second test case on the test target, identifying whether there is a second test element corresponding to the first test element in the second test case, and the second test element has an initial second test parameter; if yes, performing the following steps: updating the current test environment according to the first test parameter and the second test parameter.

3. The method of claim 2, wherein, The step of updating the current test environment according to the first test parameter and the second test parameter comprises: when the first test parameter and the second test parameter are different, modifying the first test parameter of the first test element to the second test parameter.

4. The method of claim 2, wherein, The second test element comprises: the same test element as the first test element, and / or a test element associated with the first test element.

5. The method of claim 2, wherein, S410 comprises the steps of: running a first test case on the test target; before running a second test case on the test target, determining whether to perform scene recovery on the current test environment; if yes, performing scene recovery on the current test environment, and then executing the second test case.

6. The method of claim 2, wherein, The test case comprises: a first type of case and a second type of case; wherein the first type of case is stored in a first resource area, and the second type of case is stored in a second resource area; the second type of case is stored in the second resource area, and an index symbol of the second type of case exists in a dictionary; S410 comprises the steps of: calling a plurality of first type of cases from the first resource area, and copying the plurality of first type of cases to a main test program in a linking stage according to the plurality of first type of cases; starting the main test program in the test target; when a second type of case needs to be identified, finding the second type of case through a corresponding index path, and generating a dynamic calling interface for the second type of case; the main test program runs the second type of case through the dynamic calling interface.

7. The method of claim 6, wherein, The index symbol is a file name of the second type of case.

8. A test case execution system, characterized by, Comprising: A use case library module is configured to provide a test use case library, the test use case library comprising: at least one language node, one language node corresponding to a plurality of function nodes, and at least one test use case recorded under one function node; An input module is configured to acquire a test requirement input by a test user, the test requirement comprising: at least one operation function to be tested; An association module is configured to acquire at least one associated function node associated with the operation function; An identification module is configured to identify at least one test use case under the associated function node; A combination module is configured to generate a use case combination according to at least one test use case; A running module is configured to run the use case combination in a test combination, the test combination comprising: a test target and a standard target, and the test target comprising: at least one version of software.

9. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to implement the steps of the method according to any one of claims 1 to 7.

10. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instruction is executed by the processor to implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • White box testing method and device for Java project and computer equipment

    CN109976994A

  • Methods for Automatic Test Case Generation and Test Process Management Based on White-Box Analysis

    CN110750459B

  • Test case generating method and device, computer equipment and storage medium

    CN107992409A

  • Method for automatically generating Ice interface test case and test script

    CN113419946A

  • Software testing method and device and electronic equipment

    CN115185809A