Hierarchical quality coverage testing system, method and device for design editor

Through a layered quality coverage test system for design editors, the multi-layer test module is integrated for comprehensive quality evaluation, solving the problem of inefficient testing in the existing technology and achieving more efficient and comprehensive one-time testing.

CN119759779APending Publication Date: 2025-04-04XIAMEN HUANLEGUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411900186.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, the quality testing of the design editor is inefficient and it is difficult to test all use cases in full, resulting in insufficient testing.

Method used

A layered quality coverage testing system for design editors is designed, including unit testing, component testing, simulated user operation testing, editing performance testing, collaborative editing testing and front-end service testing, and comprehensive quality evaluation is achieved through the integrated multi-layer testing module.

Benefits of technology

Through the integration of the layered test module, each layer of the design editor can be tested simultaneously, significantly improving testing efficiency and coverage, ensuring the stability and user experience of the editor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759779A_ABST
    Figure CN119759779A_ABST
Patent Text Reader

Abstract

The present disclosure provides a hierarchical quality coverage test system, method and device for a design editor, including: a first test module for performing coverage test on logic code to obtain first test data; a second test module for performing coverage test on UI interaction to obtain second test data; a third test module for performing coverage test on design effect to obtain third test data; a fourth test module for performing coverage test on editing performance to obtain fourth test data; a fifth test module for performing coverage test on collaborative editing to obtain fifth test data; a sixth test module for performing coverage test on front-end and back-end services to obtain sixth test data; and a test quality assessment module for performing test quality assessment on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data. Thus, the test efficiency of the editor is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the technical field of quality testing, and in particular, to a hierarchical quality coverage testing system, method, and device applicable to a design editor. Background Art

[0002] The design editor is a drawing tool used by professional designers. After editing elements such as pictures and texts on the design editor, you can generate edited works such as posters and videos. The editor needs to provide users with stable services, otherwise it will affect the user's work efficiency and experience, so quality testing is essential.

[0003] In the related art, the quality test of the design editor is mainly implemented by QA test engineers. For example, the test engineer writes the test case according to the test requirements (such as UI interaction in the editor), and then the test acceptance is performed manually.

[0004] However, with the existing method, only one use case can be selected for testing, and it is difficult to fully test all use cases, resulting in low testing efficiency of the editor. Summary of the invention

[0005] The embodiments described herein provide a hierarchical quality coverage testing system, method, and device for a design editor, which overcome the above-mentioned problems.

[0006] In a first aspect, according to the content of the present disclosure, a hierarchical quality coverage testing system for a design editor is provided, comprising: a first test module, a second test module, a third test module, a fourth test module, a fifth test module, a sixth test module and a test quality assessment module;

[0007] The first test module is used to perform coverage testing on the logic code of the design editor in a unit test manner to obtain first test data;

[0008] The second test module is used to perform coverage testing on the UI interaction of the design editor in a component testing manner to obtain second test data;

[0009] The third test module is used to perform a coverage test on the design effect of the design editor by simulating a single user operation to obtain third test data;

[0010] The fourth test module is used to perform a coverage test on the editing performance of the design editor through a simulated execution of editing cases to obtain fourth test data;

[0011] The fifth test module is used to perform coverage testing on the collaborative editing of the design editor by simulating multi-user operations to obtain fifth test data;

[0012] The sixth test module is used to perform coverage testing on the front-end and back-end services of the design editor to obtain sixth test data;

[0013] The test quality assessment module is used to perform test quality assessment on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data.

[0014] In a second aspect, according to the content of the present disclosure, a hierarchical quality coverage testing method for a design editor is provided, comprising:

[0015] Performing a coverage test on the logic code of the design editor by using a unit test method to obtain first test data;

[0016] Performing a coverage test on the UI interaction of the design editor by using a component test method to obtain second test data;

[0017] Performing a coverage test on the design effect of the design editor by simulating a single user operation to obtain third test data;

[0018] Performing a coverage test on the editing performance of the design editor by simulating the execution of editing cases to obtain fourth test data;

[0019] Performing a coverage test on the collaborative editing of the design editor by simulating multi-user operations to obtain fifth test data;

[0020] Performing coverage testing on the front-end and back-end services of the design editor to obtain sixth test data;

[0021] A test quality assessment is performed on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data, and the sixth test data.

[0022] In a third aspect, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the hierarchical quality coverage testing method for the design editor in any of the above embodiments are implemented.

[0023] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the hierarchical quality coverage testing method for a design editor in any of the above embodiments are implemented.

[0024] The hierarchical quality coverage test system for a design editor provided in an embodiment of the present application includes: a first test module, a second test module, a third test module, a fourth test module, a fifth test module, a sixth test module and a test quality assessment module; the first test module is used to cover the logic code of the design editor in a unit test manner to obtain first test data; the second test module is used to cover the UI interaction of the design editor in a component test manner to obtain second test data; the third test module is used to cover the design effect of the design editor by simulating a single-user operation to obtain third test data; the fourth test module is used to cover the editing performance of the design editor by simulating the execution of editing cases to obtain fourth test data; the fifth test module is used to cover the collaborative editing of the design editor by simulating multi-user operations to obtain fifth test data; the sixth test module is used to cover the front-end and back-end services of the design editor to obtain sixth test data; the test quality assessment module is used to perform test quality assessment on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data. In this way, by integrating the hierarchical testing modules of various editors in the system, it is convenient to test each layer of the editor simultaneously, effectively improving the testing efficiency of the editor.

[0025] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure, wherein:

[0027] Figure 1 It is a structural diagram of a hierarchical quality coverage testing system for a design editor provided by the present disclosure.

[0028] Figure 2 It is a flowchart of a hierarchical quality coverage testing method for a design editor provided by the present disclosure.

[0029] Figure 3 It is a structural schematic diagram of a computer device provided by the present disclosure.

[0030] It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work also fall within the scope of protection of the present disclosure.

[0032] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by a person skilled in the art to which the subject matter of the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the specification and the relevant art, and will not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. As used herein, a statement that two or more parts are "connected" or "coupled" together shall mean that the parts are joined together directly or through one or more intermediate components.

[0033] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase "embodiments" in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0034] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists, A and B exist at the same time, and B exists. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. Terms such as "first" and "second" are only used to distinguish one component (or a part of a component) from another component (or another part of a component).

[0035] In the description of the present application, unless otherwise specified, "plurality" means more than two (including two), and similarly, "multiple groups" means more than two groups (including two).

[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0037] Figure 1 A structural diagram of a hierarchical quality coverage test system for a design editor provided in this embodiment. The hierarchical quality coverage test system for a design editor may include: a first test module 110, a second test module 120, a third test module 130, a fourth test module 140, a fifth test module 150, a sixth test module 160 and a test quality assessment module 170.

[0038] The first test module 110 is used to perform coverage testing on the logic code of the design editor in a unit test manner to obtain first test data.

[0039] Among them, the logic code coverage is irrelevant to UI (User Interface) interaction and backend communication, and the pure logic execution code is covered by unit testing.

[0040] In some embodiments, the first testing module 110 is specifically configured to:

[0041] Obtain the demand analysis data of the design editor; perform data simulation on the demand analysis data to verify whether the data design interface meets the expected interface conditions; run the preset test code when the data design interface meets the expected interface conditions to obtain the first test data.

[0042] Among them, the requirement analysis data of the design editor can be used to describe the design requirements of the design editor, such as design pictures and the like.

[0043] By designing the data design interface and corresponding parameters, we can simulate the demand analysis data, and verify whether the interface meets the expected conditions in a TDD (test-first design) manner. We then write actual implementation code to run the code and perform preset processing operations on the demand analysis data through the data design interface to verify that the preset test code also meets expectations.

[0044] The preset test code is used to perform preset processing operations on the demand analysis data through the data design interface. The preset processing operations may include but are not limited to: data sending, data receiving, data downloading, etc.

[0045] When the first test module 110 determines the first test data, it is specifically used to: if the test result obtained after running the preset test code does not meet expectations, determine the first test data to be a first value; if the test result obtained after running the preset test code meets expectations, determine the first test data to be a second value.

[0046] Therefore, when performing coverage testing on the logic code of the design editor, the finest interface-level granularity can be tested, which can significantly improve the branch coverage and boundary conditions of the code.

[0047] The second testing module 120 is used to perform coverage testing on the UI interaction of the design editor in a component testing manner to obtain second test data.

[0048] Among them, UI interaction covers the codes and components related to user interaction, which are covered one by one by component testing to reduce complexity. At the same time, user clicks and other behaviors are simulated to trigger code execution, and feedback such as data after triggering is verified.

[0049] In some embodiments, the second testing module 120 is specifically configured to:

[0050] A simulated trigger operation is performed on the interactive design component to obtain a current display state corresponding to the interactive design component; based on the current display state corresponding to the interactive design component and a preset display state corresponding to the interactive design component, the interactive design component is triggered and verified to obtain second test data.

[0051] Among them, when using component testing method for testing, by analyzing the design requirements, thinking about the interaction method of the components from the user's perspective, designing and implementing interactive components (i.e., interactive design components), and verifying whether the components run as expected by simulating user operations.

[0052] For example, the interactive component is an independent module that can be started. After starting, it exposes corresponding event interfaces such as user clicks and double clicks. The second test module 120 can verify whether the data of the interactive component is normal by calling the interface to determine whether the internal operation is correct. Each interactive component has its own model data, which indicates what state the component should currently display. This model data can be obtained to perform verification before and after the operation.

[0053] When the second test module 120 determines the second test data, it is specifically used to: if the current display state corresponding to the interactive design component and the preset display state corresponding to the interactive design component do not match, then determine that the second test data is the first value; if the current display state corresponding to the interactive design component and the preset display state corresponding to the interactive design component match, then determine that the second test data is the second value.

[0054] Therefore, we can ensure that the user's interaction with the editor is in line with expectations from the component level, such as image editing components, text input components, etc. Unit testing ensures the interface level, but it does not mean that the user's operation events can be completely correct after being combined together. Therefore, there is a need for tests combined into the operation component level to cover this layer.

[0055] The third test module 130 is used to perform coverage testing on the design effect of the design editor by simulating single-user operation to obtain third test data.

[0056] Among them, for the user's specific operation case, the user's click and other behaviors are simulated to trigger the execution of the corresponding code of the editor, and the current design effect is output in the form of drawing after the code is executed. At the same time, the background prepares the benchmark map of the design effect of the corresponding case in advance, and compares the current output result map with the benchmark map to verify whether the effect is passed.

[0057] In some embodiments, the third testing module 130 is specifically used to:

[0058] Obtain a pre-designed user operation case; execute the running code of the pre-designed user operation case by simulating a trigger operation to obtain a design effect display image corresponding to the user operation case; determine the third test data based on the design effect display image corresponding to the user operation case and the design effect benchmark image corresponding to the user operation case.

[0059] Among them, the user operation case can be a specific use case that the user wants to design, such as a picture.

[0060] For example, when a user is making a poster, he adds a picture and performs operations such as adding filters and strokes on the picture. At this time, he needs to verify from a visual perspective that the poster work obtained after this series of operations is in line with expectations, and there will be no problems such as missing filters or color cast.

[0061] When the third test module 130 determines the third test data, it is specifically used to: if the design effect display image corresponding to the user operation case and the design effect benchmark image corresponding to the user operation case do not match, then determine the third test data as the first value; if the design effect display image corresponding to the user operation case and the design effect benchmark image corresponding to the user operation case match, then determine the third test data as the second value.

[0062] The comparison benchmark image of the effect generated in the early stage can be reused indefinitely in the future, and it fully meets the user's subjective visual expectations, thus making up for the shortcoming that the machine cannot judge whether the design effect is correct.

[0063] The fourth test module 140 is used to perform coverage testing on the editing performance of the design editor through simulated execution of editing cases to obtain fourth test data.

[0064] Among them, editing performance covers editing cases that combine multiple elements such as pictures, texts, paths, etc. designed based on editor scenarios, and data embedding in a debugging environment on the core code link. Code execution is triggered by simulating editing cases and statistically output test data. At the same time, the background prepares the threshold data of the performance time consumption of the corresponding code module in advance, compares the currently output test results with the threshold, and verifies whether the performance passes.

[0065] In some embodiments, the fourth testing module 140 is specifically configured to:

[0066] Design a multi-element combination editing case; trigger the execution of the multi-element combination editing case by simulating a trigger operation, and determine the editor performance loss data obtained after executing the multi-element combination editing case; determine the fourth test data based on the editor performance loss data and the editor performance threshold data.

[0067] Among them, multiple elements may include: pictures, text, paths, etc. When designing a multi-element combination editing case, the user can add pictures, enter text, and control the anchor point changes of the path.

[0068] For example, when users edit text, each input will trigger tasks such as text typesetting and rendering. In these core tasks, statistical time consumption (i.e. editor performance loss data) is pre-embedded, and statistics and automatic analysis are performed in a test environment to check whether the threshold is exceeded.

[0069] When the fourth test module 140 determines the fourth test data, it is specifically used to: if the editor performance loss data and the editor performance threshold data do not match (that is, the error between the two is greater than the preset threshold), then determine the fourth test data as the first value; if the editor performance loss data and the editor performance threshold data match, then determine the fourth test data as the second value.

[0070] Therefore, it can be reused continuously and the data is completely objective, avoiding the situation where testers have different subjective feelings and are unaware of performance degradation. At the same time, the use case design is completely in line with the actual operation of the user, rather than a simple technical test, which can better obtain performance results in actual scenarios and avoid the problem of normal offline tests and abnormal online tests.

[0071] The fifth test module 150 is used to perform coverage testing on the collaborative editing of the design editor by simulating multi-user operations to obtain fifth test data.

[0072] Among them, professional design scenario editors generally have collaborative scenarios for multi-person editing. Therefore, the editor is designed to start multiple instances at the same time. Multiple editors are opened locally to simulate the scenario of multiple users editing at the same time, and the user's design process is simulated in this scenario. At the same time, it is verified whether the data consistency of multiple users passes the standards after the design action is completed.

[0073] In some embodiments, the fifth testing module 150 is specifically configured to:

[0074] Design a target editing case; simulate multiple users designing actions for the same target editing case at the same time to obtain action design data corresponding to each user; and determine the fifth test data based on the similarity between the action design data corresponding to multiple users.

[0075] Among them, the editor is an instance object that can be started independently in the current environment, and the internal environment has no mutual dependence and interference, so several editor instances can be started at the same time, just like several users are editing at the same time.

[0076] For example, create a test work (i.e., the target editing case) and set it to collaborative mode, inform several editors of the work ID, and each editor loads into the work editing mode and executes the corresponding test case actions to simulate user operations.

[0077] When the fifth test module 150 determines the fifth test data, it is specifically used to: if the similarity value between the action design data corresponding to multiple users is higher than the preset similarity threshold, then determine the fifth test data as the second value; if the similarity value between the action design data corresponding to multiple users is lower than the preset similarity threshold, then determine the fifth test data as the first value.

[0078] Therefore, it fully fits the actual operation of users and indirectly verifies the correctness of the front-end and back-end communication of collaborative editing. On this basis, the number of editors can be continuously increased to verify whether the collaborative stress test has passed.

[0079] The sixth test module 160 is used to perform coverage testing on the front-end and back-end services of the design editor to obtain sixth test data.

[0080] Among them, the front-end and back-end services cover testing the logic code of the front-end editor, the logic code of the back-end editor, and the communication between the front-end and back-end editors.

[0081] The front-end editor can mock the back-end interface and simulate triggering requests to verify the correctness of some editor logic. The back-end service code can be self-protected through unit testing and other methods. The communication between the front-end and back-end editors can establish a real connection through E2E testing to verify the correctness of the front-end and back-end communication. E2E testing is an environment that users actually access directly. It can simulate user operations at a relatively coarse granularity to further ensure that there will be no problems during actual use by users.

[0082] In some embodiments, the sixth testing module 160 is specifically configured to:

[0083] Simulate network access for requesting data through the front-end network interface to perform logic verification on the front-end editor; perform logic verification on the back-end editor through unit testing; perform communication verification between the front-end editor and the back-end editor by establishing a communication connection between the front-end editor and the back-end editor; determine the sixth test data based on the logic verification result of the front-end editor, the logic verification result of the back-end editor, and the communication verification result between the front-end editor and the back-end editor.

[0084] For example, when the front-end editor mocks the back-end interface and simulates the trigger request to verify the correctness of some of the editor's logic, it can access it by simulating the request data through the interface of the front-end network request. The back-end service code is all logical code, and the interface level can be covered by conventional unit testing methods. Tools such as Cypress can be used to create a real front-end project environment, and simulate user operation events in the environment to trigger front-end and back-end communication.

[0085] When the sixth test module 160 determines the sixth test data, it is specifically used to: if the logic verification result of the front-end editor, the logic verification result of the back-end editor, and the communication verification results between the front-end editor and the back-end editor all indicate that the verification is passed, then determine that the sixth test data is the second value; if at least one verification result among the logic verification result of the front-end editor, the logic verification result of the back-end editor, and the communication verification results between the front-end editor and the back-end editor indicates that the verification is not passed, then determine that the sixth test data is the first value.

[0086] The test quality assessment module 170 is used to perform test quality assessment on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data.

[0087] In some embodiments, the test quality assessment module 170 is specifically configured to:

[0088] Based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data, a quality test characterization value of the design editor is determined; and a preset evaluation threshold is used to perform a quality evaluation on the quality test characterization value of the design editor to obtain a test quality evaluation result of the design editor.

[0089] Among them, different weights can be set for the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data respectively and summed up to obtain the quality test characterization value of the design editor.

[0090] If the quality test characterization value of the design editor is greater than or equal to the preset evaluation threshold, the test quality evaluation result of the design editor is determined to be qualified; if the quality test characterization value of the design editor is less than the preset evaluation threshold, the test quality evaluation result of the design editor is determined to be unqualified.

[0091] In addition, the entire layered test architecture is automatically triggered and executed through CI (Continuous Integration). At the same time, a large number of log point functions are integrated in each layer and module to restore the scene and record real data. By collecting and classifying data, quality data is counted and output by day, week and other dimensions to facilitate analysis and summary.

[0092] For example, different trigger instructions are designed for different test categories, and different test links are configured in different development processes, and the processes are connected through automation tools such as Jenkins. For example, all the above test items will be executed every day, and the data of each test item will be counted, such as the test coverage of different modules, the test coverage of components, the time consumption data of performance tests, the success rate after batch export of works, etc., and notifications will be made in the work group every day, and then the daily results will be counted and sorted into average data on a weekly basis.

[0093] The hierarchical quality coverage test system for the design editor in this embodiment includes: a first test module, a second test module, a third test module, a fourth test module, a fifth test module, a sixth test module and a test quality assessment module; the first test module is used to cover the logic code of the design editor by unit testing to obtain first test data; the second test module is used to cover the UI interaction of the design editor by component testing to obtain second test data; the third test module is used to cover the design effect of the design editor by simulating single-user operation to obtain third test data; the fourth test module is used to cover the editing performance of the design editor by simulating the execution of editing cases to obtain fourth test data; the fifth test module is used to cover the collaborative editing of the design editor by simulating multi-user operation to obtain fifth test data; the sixth test module is used to cover the front-end and back-end services of the design editor to obtain sixth test data; the test quality assessment module is used to perform test quality assessment on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data. In this way, by integrating the hierarchical testing modules of various editors in the system, it is convenient to test each layer of the editor simultaneously, effectively improving the testing efficiency of the editor.

[0094] Figure 2 is a flow chart of a hierarchical quality coverage testing method for a design editor provided by an embodiment of the present disclosure, such as Figure 2 As shown in the figure, the specific process of the hierarchical quality coverage testing method for the design editor includes:

[0095] S210. Perform a coverage test on the logic code of the design editor using a unit test method to obtain first test data.

[0096] Among them, the logic code coverage is irrelevant to UI (User Interface) interaction and backend communication, and the pure logic execution code is covered by unit testing.

[0097] In some embodiments, a unit test method is used to perform coverage testing on the logic code of the design editor to obtain first test data, including:

[0098] Obtain the requirement analysis data of the design editor; perform data simulation on the requirement analysis data to verify whether the data design interface meets the expected conditions of the interface; run the preset test code when the data design interface meets the expected conditions of the interface to obtain the first test data, and the preset test code is used to perform preset processing operations on the requirement analysis data through the data design interface.

[0099] Among them, the requirement analysis data of the design editor can be used to describe the design requirements of the design editor, such as design pictures and the like.

[0100] By designing the data design interface and corresponding parameters, we can simulate the demand analysis data, and verify whether the interface meets the expected conditions in a TDD (test-first design) manner. We then write actual implementation code to run the code and perform preset processing operations on the demand analysis data through the data design interface to verify that the preset test code also meets expectations.

[0101] The preset test code is used to perform preset processing operations on the demand analysis data through the data design interface. The preset processing operations may include but are not limited to: data sending, data receiving, data downloading, etc.

[0102] When the data design interface meets the expected conditions of the interface, running the preset test code to obtain the first test data may include: if the test result obtained after running the preset test code does not meet the expectations, determining the first test data to be a first value; if the test result obtained after running the preset test code meets the expectations, determining the first test data to be a second value.

[0103] Therefore, when performing coverage testing on the logic code of the design editor, the finest interface-level granularity can be tested, which can significantly improve the branch coverage and boundary conditions of the code.

[0104] S220. Perform a coverage test on the UI interaction of the design editor using a component testing method to obtain second test data.

[0105] Among them, UI interaction covers the codes and components related to user interaction, which are covered one by one by component testing to reduce complexity. At the same time, user clicks and other behaviors are simulated to trigger code execution, and feedback such as data after triggering is verified.

[0106] In some embodiments, a component test method is used to perform coverage testing on the UI interaction of the design editor to obtain second test data, including:

[0107] A simulated trigger operation is performed on the interactive design component to obtain a current display state corresponding to the interactive design component; based on the current display state corresponding to the interactive design component and a preset display state corresponding to the interactive design component, the interactive design component is triggered and verified to obtain second test data.

[0108] Among them, when using component testing method for testing, by analyzing the design requirements, thinking about the interaction method of the components from the user's perspective, designing and implementing interactive components (i.e., interactive design components), and verifying whether the components run as expected by simulating user operations.

[0109] For example, the interactive component is an independent module that can be started. After starting, it exposes corresponding event interfaces such as user clicks and double clicks. The second test module 120 can verify whether the data of the interactive component is normal by calling the interface to determine whether the internal operation is correct. Each interactive component has its own model data, which indicates what state the component should currently display. This model data can be obtained to perform verification before and after the operation.

[0110] Based on the current display state corresponding to the interactive design component and the preset display state corresponding to the interactive design component, the interactive design component is triggered and verified to obtain the second test data, which may include: if the current display state corresponding to the interactive design component and the preset display state corresponding to the interactive design component do not match, then determining that the second test data is the first value; if the current display state corresponding to the interactive design component and the preset display state corresponding to the interactive design component match, then determining that the second test data is the second value.

[0111] Therefore, we can ensure that the user's interaction with the editor is in line with expectations from the component level, such as image editing components, text input components, etc. Unit testing ensures the interface level, but it does not mean that the user's operation events can be completely correct after being combined together. Therefore, there is a need for tests combined into the operation component level to cover this layer.

[0112] S230. Perform a coverage test on the design effect of the design editor by simulating a single-user operation to obtain third test data.

[0113] Among them, for the user's specific operation case, the user's click and other behaviors are simulated to trigger the execution of the corresponding code of the editor, and the current design effect is output in the form of drawing after the code is executed. At the same time, the background prepares the benchmark map of the design effect of the corresponding case in advance, and compares the current output result map with the benchmark map to verify whether the effect is passed.

[0114] In some embodiments, a coverage test is performed on the design effect of the design editor by simulating a single user operation to obtain third test data, including:

[0115] Obtain a pre-designed user operation case; execute the running code of the pre-designed user operation case by simulating a trigger operation to obtain a design effect display image corresponding to the user operation case; determine the third test data based on the design effect display image corresponding to the user operation case and the design effect benchmark image corresponding to the user operation case.

[0116] Among them, the user operation case can be a specific use case that the user wants to design, such as a picture.

[0117] For example, when a user is making a poster, he adds a picture and performs operations such as adding filters and strokes on the picture. At this time, he needs to verify from a visual perspective that the poster work obtained after this series of operations is in line with expectations, and there will be no problems such as missing filters or color cast.

[0118] Determining the third test data based on the design effect display image corresponding to the user operation case and the design effect benchmark image corresponding to the user operation case may include: if the design effect display image corresponding to the user operation case and the design effect benchmark image corresponding to the user operation case do not match, then determining the third test data to be a first value; if the design effect display image corresponding to the user operation case and the design effect benchmark image corresponding to the user operation case match, then determining the third test data to be a second value.

[0119] The comparison benchmark image of the effect generated in the early stage can be reused indefinitely in the future, and it fully meets the user's subjective visual expectations, thus making up for the shortcoming that the machine cannot judge whether the design effect is correct.

[0120] S240. Perform a coverage test on the editing performance of the design editor by simulating the execution of editing cases to obtain fourth test data.

[0121] Among them, editing performance covers editing cases that combine multiple elements such as pictures, texts, paths, etc. designed based on editor scenarios, and data embedding in a debugging environment on the core code link. Code execution is triggered by simulating editing cases and statistically output test data. At the same time, the background prepares the threshold data of the performance time consumption of the corresponding code module in advance, compares the currently output test results with the threshold, and verifies whether the performance passes.

[0122] In some embodiments, the editing performance of the design editor is covered by testing through simulation execution of editing cases to obtain fourth test data, including:

[0123] Design a multi-element combination editing case; trigger the execution of the multi-element combination editing case by simulating a trigger operation, and determine the editor performance loss data obtained after executing the multi-element combination editing case; determine the fourth test data based on the editor performance loss data and the editor performance threshold data.

[0124] Among them, multiple elements may include: pictures, text, paths, etc. When designing a multi-element combination editing case, the user can add pictures, enter text, and control the anchor point changes of the path.

[0125] For example, when users edit text, each input will trigger tasks such as text typesetting and rendering. In these core tasks, statistical time consumption (i.e. editor performance loss data) is pre-embedded, and statistics and automatic analysis are performed in a test environment to check whether the threshold is exceeded.

[0126] Determining the fourth test data based on the editor performance loss data and the editor performance threshold data may include: if the editor performance loss data and the editor performance threshold data do not match (that is, the error between the two is greater than a preset threshold), determining the fourth test data to be a first value; if the editor performance loss data and the editor performance threshold data match, determining the fourth test data to be a second value.

[0127] Therefore, it can be reused continuously and the data is completely objective, avoiding the situation where testers have different subjective feelings and are unaware of performance degradation. At the same time, the use case design is completely in line with the actual operation of the user, rather than a simple technical test, which can better obtain performance results in actual scenarios and avoid the problem of normal offline tests and abnormal online tests.

[0128] S250. Perform a coverage test on the collaborative editing of the design editor by simulating multi-user operations to obtain fifth test data.

[0129] Among them, professional design scenario editors generally have collaborative scenarios for multi-person editing. Therefore, the editor is designed to start multiple instances at the same time. Multiple editors are opened locally to simulate the scenario of multiple users editing at the same time, and the user's design process is simulated in this scenario. At the same time, it is verified whether the data consistency of multiple users passes the standards after the design action is completed.

[0130] In some embodiments, a fifth test data is obtained by performing a coverage test on the collaborative editing of the design editor by simulating multi-user operations, including:

[0131] Design a target editing case; simulate multiple users designing actions for the same target editing case at the same time to obtain action design data corresponding to each user; and determine the fifth test data based on the similarity between the action design data corresponding to multiple users.

[0132] Among them, the editor is an instance object that can be started independently in the current environment, and the internal environment has no mutual dependence and interference, so several editor instances can be started at the same time, just like several users are editing at the same time.

[0133] For example, create a test work (i.e., the target editing case) and set it to collaborative mode, inform several editors of the work ID, and each editor loads into the work editing mode and executes the corresponding test case actions to simulate user operations.

[0134] Determining the fifth test data based on the similarity between the action design data corresponding to multiple users may include: if the similarity value between the action design data corresponding to multiple users is higher than a preset similarity threshold, determining the fifth test data to be the second value; if the similarity value between the action design data corresponding to multiple users is lower than the preset similarity threshold, determining the fifth test data to be the first value.

[0135] Therefore, it fully fits the actual operation of users and indirectly verifies the correctness of the front-end and back-end communication of collaborative editing. On this basis, the number of editors can be continuously increased to verify whether the collaborative stress test has passed.

[0136] S260. Perform coverage testing on the front-end and back-end services of the design editor to obtain sixth test data.

[0137] Among them, the front-end and back-end services cover testing the logic code of the front-end editor, the logic code of the back-end editor, and the communication between the front-end and back-end editors.

[0138] The front-end editor can mock the back-end interface and simulate triggering requests to verify the correctness of some editor logic. The back-end service code can be self-protected through unit testing and other methods. The communication between the front-end and back-end editors can establish a real connection through E2E testing to verify the correctness of the front-end and back-end communication. E2E testing is an environment that users actually access directly. It can simulate user operations at a relatively coarse granularity to further ensure that there will be no problems during actual use by users.

[0139] In some embodiments, a coverage test is performed on the front-end and back-end services of the design editor to obtain sixth test data, including:

[0140] Simulate network access for requesting data through the front-end network interface to perform logic verification on the front-end editor; perform logic verification on the back-end editor through unit testing; perform communication verification between the front-end editor and the back-end editor by establishing a communication connection between the front-end editor and the back-end editor; determine the sixth test data based on the logic verification result of the front-end editor, the logic verification result of the back-end editor, and the communication verification result between the front-end editor and the back-end editor.

[0141] For example, when the front-end editor mocks the back-end interface and simulates the trigger request to verify the correctness of some of the editor's logic, it can access it by simulating the request data through the interface of the front-end network request. The back-end service code is all logical code, and the interface level can be covered by conventional unit testing methods. Tools such as Cypress can be used to create a real front-end project environment, and simulate user operation events in the environment to trigger front-end and back-end communication.

[0142] Determining the sixth test data based on the logic verification results of the front-end editor, the logic verification results of the back-end editor, and the communication verification results between the front-end editor and the back-end editor may include: if the logic verification results of the front-end editor, the logic verification results of the back-end editor, and the communication verification results between the front-end editor and the back-end editor all indicate that the verification passed, determining the sixth test data to be the second value; if at least one of the logic verification results of the front-end editor, the logic verification results of the back-end editor, and the communication verification results between the front-end editor and the back-end editor indicates that the verification failed, determining the sixth test data to be the first value.

[0143] S270 . Perform test quality assessment on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data, and the sixth test data.

[0144] In some embodiments, performing test quality assessment on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data, and the sixth test data includes:

[0145] Based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data, a quality test characterization value of the design editor is determined; and a preset evaluation threshold is used to perform a quality evaluation on the quality test characterization value of the design editor to obtain a test quality evaluation result of the design editor.

[0146] Different weights may be set for the first test data, the second test data, the third test data, the fourth test data, the fifth test data, and the sixth test data, respectively, and the weights are summed to obtain a quality test characterization value of the design editor.

[0147] If the quality test characterization value of the design editor is greater than or equal to the preset evaluation threshold, the test quality evaluation result of the design editor is determined to be qualified; if the quality test characterization value of the design editor is less than the preset evaluation threshold, the test quality evaluation result of the design editor is determined to be unqualified.

[0148] Thus, each layer of the editor is tested simultaneously, effectively improving the testing efficiency of the editor.

[0149] The present application also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.

[0150] The computer device includes a memory 310 and a processor 320 that are connected to each other through a system bus. It should be noted that the figure only shows a computer device with a memory 310 and a processor 320, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0151] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0152] The memory 310 includes at least one type of readable storage medium, and the readable storage medium includes a non-volatile memory or a volatile memory, for example, a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc., and the RAM may include a static RAM or a dynamic RAM. In some embodiments, the memory 310 may be an internal storage unit of a computer device, for example, a hard disk or a memory of the computer device. In other embodiments, the memory 310 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, or a flash card (FlashCard) equipped on the computer device. Of course, the memory 310 may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory 310 is generally used to store the operating system and various application software installed on the computer device, such as the program code of the above method. In addition, the memory 310 may also be used to temporarily store various data that have been output or are to be output.

[0153] The processor 320 is generally used to perform the overall operation of the computer device. In this embodiment, the memory 310 is used to store program codes or instructions, the program code includes computer operation instructions, and the processor 320 is used to execute the program codes or instructions stored in the memory 310 or process data, such as running the program code of the above method.

[0154] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0155] Another embodiment of the present application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads a computer-readable program code stored in the computer-readable medium, so that the processor can execute the functional actions specified in each step or a combination of steps in the above method; and generate a device for implementing the functional actions specified in each block or a combination of blocks in the block diagram.

[0156] Computer-readable media include but are not limited to electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any appropriate combination of the foregoing, the memory is used to store program codes or instructions, the program codes include computer operating instructions, and the processor is used to execute the program codes or instructions of the above methods stored in the memory.

[0157] For the definitions of memory and processor, please refer to the description of the aforementioned computer device embodiment and will not be repeated here.

[0158] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and 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, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0159] Each functional unit or module 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.

[0160] If the integrated 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 technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0161] In the claims, any reference symbols placed between brackets shall not be construed as limiting the claims. The word "comprising" described in the present application does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented with the aid of hardware comprising several different elements and with the aid of a suitably programmed computer. In a unit claim that lists a number of devices, several units of these devices may be embodied by the same hardware item. The use of first, second, and third, etc. does not indicate any order, and these words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

[0162] The above embodiments 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, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these 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.

Claims

1. A hierarchical quality coverage testing system for design editors, characterized in that: include: A first test module, a second test module, a third test module, a fourth test module, a fifth test module, a sixth test module and a test quality assessment module; The first test module is used to perform coverage testing on the logic code of the design editor in a unit test manner to obtain first test data; The second test module is used to perform coverage testing on the UI interaction of the design editor in a component testing manner to obtain second test data; The third test module is used to perform a coverage test on the design effect of the design editor by simulating a single user operation to obtain third test data; The fourth test module is used to perform a coverage test on the editing performance of the design editor through a simulated execution of editing cases to obtain fourth test data; The fifth test module is used to perform coverage testing on the collaborative editing of the design editor by simulating multi-user operations to obtain fifth test data; The sixth test module is used to perform coverage testing on the front-end and back-end services of the design editor to obtain sixth test data; The test quality assessment module is used to perform test quality assessment on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data and the sixth test data.

2. The system according to claim 1, characterized in that The first test module is specifically used for: Obtaining demand analysis data of the design editor; Performing data simulation on the demand analysis data to verify whether the data design interface meets the expected interface conditions; When the data design interface meets the expected conditions of the interface, a preset test code is run to obtain the first test data, and the preset test code is used to perform a preset processing operation on the demand analysis data through the data design interface.

3. The system according to claim 1, characterized in that The second test module is specifically used for: Performing a simulated trigger operation on the interactive design component to obtain a current display state corresponding to the interactive design component; Based on the current display state corresponding to the interactive design component and the preset display state corresponding to the interactive design component, the interactive design component is triggered and verified to obtain the second test data.

4. The system according to claim 1, characterized in that The third test module is specifically used for: Get pre-designed user operation cases; By simulating the trigger operation, the running code of the pre-designed user operation case is executed to obtain the design effect display image corresponding to the user operation case; The third test data is determined based on the design effect display image corresponding to the user operation case and the design effect reference image corresponding to the user operation case.

5. The system according to claim 1, characterized in that The fourth test module is specifically used for: Design multi-element combination editing cases; Triggering the execution of the multi-element combination editing case by simulating a trigger operation, and determining the editor performance loss data obtained after executing the multi-element combination editing case; Based on the editor performance loss data and the editor performance threshold data, the fourth test data is determined.

6. The system according to claim 1, characterized in that The fifth test module is specifically used for: Design goal editing case; Simulating multiple users to simultaneously design actions for the same target editing case, and obtaining action design data corresponding to each user; The fifth test data is determined based on the similarity between the action design data corresponding to multiple users.

7. The system according to claim 1, characterized in that The sixth test module is specifically used for: Simulate network access to request data through the front-end network interface to perform logic verification on the front-end editor; perform logic verification on the back-end editor through unit testing; Performing communication verification between the front-end editor and the back-end editor by establishing a communication connection between the front-end editor and the back-end editor; The sixth test data is determined based on a logic verification result of the front-end editor, a logic verification result of the back-end editor, and a communication verification result between the front-end editor and the back-end editor.

8. The system according to claim 1, characterized in that The test quality assessment module is specifically used for: determining a quality test characterization value of the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data, and the sixth test data; A preset evaluation threshold is used to perform quality evaluation on the quality test characterization value of the design editor to obtain a test quality evaluation result of the design editor.

9. A hierarchical quality coverage testing method for design editors, characterized in that: include: Performing a coverage test on the logic code of the design editor by using a unit test method to obtain first test data; Performing a coverage test on the UI interaction of the design editor by using a component test method to obtain second test data; Performing a coverage test on the design effect of the design editor by simulating a single user operation to obtain third test data; Performing a coverage test on the editing performance of the design editor by simulating the execution of editing cases to obtain fourth test data; Performing a coverage test on the collaborative editing of the design editor by simulating multi-user operations to obtain fifth test data; Performing coverage testing on the front-end and back-end services of the design editor to obtain sixth test data; A test quality assessment is performed on the design editor based on the first test data, the second test data, the third test data, the fourth test data, the fifth test data, and the sixth test data.

10. A computer device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the hierarchical quality coverage testing method for a design editor as claimed in claim 9 is implemented.