Watermark test method, platform, equipment, storage medium and program product

By triggering the functions of the software system to be tested based on preset watermark test cases, receiving and analyzing the watermark information in the file displayed on the interface, automated watermark testing is realized, solving the problem of inefficient watermark testing in the existing technology, and improving the test speed and efficiency.

CN119576777APending Publication Date: 2025-03-07ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411656933.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, the watermark testing efficiency is low, mainly due to the slow manual testing speed, which cannot effectively improve the testing efficiency.

Method used

A watermark testing method is proposed, which triggers the relevant functions of the software system to be tested based on preset watermark test cases, presents the interactive interface, and receives the watermark information in the file, determines the watermark detection result of the interactive interface based on this information, and completes the watermark test.

Benefits of technology

This method does not require manual analysis of the interactive interface content, and can quickly complete the watermark test, significantly improving the efficiency of watermark testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576777A_ABST
    Figure CN119576777A_ABST
Patent Text Reader

Abstract

The invention discloses a watermark testing method, platform and device, a storage medium and a program product, and relates to the technical field of automated tests.The method comprises the steps that on the basis of a preset watermark testing case, related functions of a to-be-tested software system are triggered to present a corresponding interactive interface; based on a received interface display file sent by the to-be-tested software system after the interactive interface is presented, detecting contents displayed in the interactive interface to obtain a detection result, namely, completing a watermark test; the interface display file records the watermark information corresponding to the interactive interface, and the watermark information can reflect the watermark display condition of the interactive interface, so that the watermark test can be completed by determining the watermark detection result of the interactive interface based on the watermark information. The content in the interactive interface does not need to be analyzed through manual testing, the testing speed is increased, and the watermark testing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automated testing technology, and in particular to a watermark testing method, platform, device, storage medium and program product. Background Art

[0002] In order to prevent the leakage of internal information of the enterprise, the enterprise adds a watermark function in the internal system to prevent internal personnel from leaking internal information of the enterprise through downloading, screenshots, taking photos, etc.

[0003] Currently, the tests on the above watermark functions are all performed manually, which is slow and reduces the efficiency of watermark testing. Summary of the invention

[0004] The main purpose of this application is to provide a watermark testing method, platform, device, storage medium and program product, aiming to solve the technical problem of low efficiency of watermark testing.

[0005] To achieve the above objectives, the present application proposes a watermark testing method, the method comprising:

[0006] Based on the preset watermark test cases, the relevant functions of the software system under test are triggered to present the corresponding interactive interface;

[0007] Receiving an interface display file sent by the software system to be tested after presenting the interactive interface, wherein the interface display file records watermark information corresponding to the interactive interface;

[0008] Based on the watermark information, a watermark detection result of the interactive interface is determined to complete the watermark test.

[0009] In one embodiment, the step of determining a watermark detection result of the interactive interface based on the watermark information includes:

[0010] Determine whether there is a watermark field corresponding to the interactive interface in the watermark information, and obtain a determination result, wherein the watermark field in the watermark information is used to indicate that a watermark is displayed in the interactive interface;

[0011] Based on the judgment result, a watermark detection result of the interactive interface is determined.

[0012] In one embodiment, after the step of determining whether there is a watermark field corresponding to the interactive interface in the watermark information and obtaining the determination result, the step further includes:

[0013] If the watermark information contains a watermark field corresponding to the interactive interface, determining whether the interactive interface is presented when the relevant function of the software system to be tested is triggered for the first time;

[0014] If it is presented when the relevant function of the software system to be tested is triggered for the first time, the watermark detection result of the interactive interface is determined based on the watermark information and the preset watermark display rule to complete the watermark test.

[0015] In one embodiment, the preset watermark display rule includes at least one of a preset watermark position and a preset watermark density;

[0016] The watermark detection result includes a first judgment result and / or a second judgment result. The step of determining the watermark detection result of the interactive interface based on the watermark information and the preset watermark display rule to complete the watermark test includes at least one of the following:

[0017] Acquire position coordinate information of the watermark in the interactive interface from the watermark information, and determine whether the display position of the watermark in the interactive interface is the preset display position based on the position coordinate information and the preset watermark position, to obtain a first determination result;

[0018] Identify the text corresponding to the watermark displayed in the interactive interface, determine the total number of texts corresponding to the watermark displayed in the interactive interface, and based on the preset interface display size corresponding to the interactive interface and the total number of texts, judge whether the density of the watermark displayed in the interactive interface meets the preset density requirement to obtain a second judgment result.

[0019] In one embodiment, the step of determining whether the interactive interface is presented when the relevant function of the software system under test is triggered for the first time includes:

[0020] If the interactive interface is presented when the relevant function of the software system under test is triggered for the first time, prompt information and the preset watermark display rule are displayed to allow the user to determine whether the content displayed in the interactive interface complies with the preset watermark display rule.

[0021] In one embodiment, the interaction interface presented when the relevant function of the software system to be tested is triggered for the first time is the initial interaction interface;

[0022] The step of triggering relevant functions of the software system to be tested based on the preset watermark test case to present a corresponding interactive interface includes:

[0023] Obtain all button elements in the page elements corresponding to the initial interactive interface;

[0024] The click events corresponding to all the button elements are triggered in sequence to present the target interaction interfaces corresponding to the button elements in sequence.

[0025] In addition, to achieve the above purpose, the present application also proposes a watermark testing platform, which includes:

[0026] A trigger module is used to trigger relevant functions of the software system under test based on a preset watermark test case to present a corresponding interactive interface;

[0027] A receiving module, used for receiving an interface display file sent by the software system under test after presenting the interactive interface, wherein the interface display file records watermark information corresponding to the interactive interface;

[0028] The detection module is used to determine the watermark detection result of the interactive interface based on the watermark information to complete the watermark test.

[0029] In addition, to achieve the above objectives, the present application also proposes a watermark testing device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the watermark testing method described above.

[0030] In addition, to achieve the above purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the watermark testing method described above are implemented.

[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the watermark testing method described above are implemented.

[0032] One or more technical solutions proposed in this application have at least the following technical effects:

[0033] The present application triggers relevant functions of the software system to be tested based on preset watermark test cases to present a corresponding interactive interface; based on the received interface display file sent by the software system to be tested after presenting the interactive interface, the content displayed in the interactive interface is detected to obtain the detection result, thereby completing the watermark test; since the interface display file records the watermark information corresponding to the interactive interface, the watermark information can reflect the watermark display situation of the interactive interface, therefore, based on the watermark information, the watermark detection result of the interactive interface is determined to complete the watermark test, without the need for manual testing to analyze the content in the interactive interface, thereby improving the test speed, that is, improving the watermark test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0036] Figure 1 A schematic diagram of a flow chart provided for the first embodiment of the watermark testing method of the present application;

[0037] Figure 2 A schematic diagram of a scenario provided for the first embodiment of the watermark testing method of the present application;

[0038] Figure 3 A schematic diagram of a flow chart provided for the second embodiment of the watermark testing method of the present application;

[0039] Figure 4 This is a schematic diagram of the module structure of the watermark testing platform of the embodiment of the present application;

[0040] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the watermark testing method in the embodiment of the present application.

[0041] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0042] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0043] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0044] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a watermark testing platform, etc. The following takes the watermark testing platform as an example to illustrate this embodiment and the following embodiments.

[0045] Based on this, the present application embodiment provides a watermark testing method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the watermark testing method of the present application.

[0046] In this embodiment, the watermark testing method includes steps S10 to S30:

[0047] Step S10, based on the preset watermark test case, triggering the relevant functions of the software system to be tested to present a corresponding interactive interface;

[0048] It should be noted that the above-mentioned watermark testing method can be applied to a watermark testing platform, which can be subordinate to a watermark testing device, wherein the watermark testing device can be a computer, a mobile phone, a tablet or other device with an interactive interface; the watermark testing device needs to install the watermark testing platform and have a testing environment to execute the watermark testing method.

[0049] It should also be noted that in order to prevent the leakage of internal information of the enterprise, the enterprise adds a watermark function in the internal system to prevent internal personnel of the enterprise from leaking internal information of the enterprise through downloading, screenshots, taking photos, etc., wherein the internal system can be a software system to be tested, and the software system to be tested includes applications, browsers, embedded systems, operating systems, etc. For example, the software system to be tested can be an APP (application), H5 (HyperText Markup Language 5, a web page), a mini-program, a web site (a set of interrelated web pages accessed through the Internet), a ToB (Business-to-Business, enterprise-oriented) system, etc.

[0050] Currently, the tests on the above watermark functions are all performed manually, which is slow and reduces the efficiency of watermark testing.

[0051] In order to solve the above problems, this embodiment triggers the relevant functions of the software system to be tested based on the preset watermark test case to present the corresponding interactive interface; it can be understood that the preset watermark test case includes the login method of the software system to be tested, specifically, Figure 2 As shown, the watermark test process including URL (uniform resource locator, uniform resource locator system) login, elements to be obtained, login account, automatic login, etc., as well as the corresponding interactive interface of the software system to be tested can be pre-configured.

[0052] Therefore, based on the login method of the software system under test, the software system under test can be automatically logged in, and based on the watermark test process of the interactive interface corresponding to the software system under test, the page to be tested can be determined. For example, a watermark test can be performed on the homepage of the software system under test after login, and / or a watermark test can be performed on the page corresponding to the specific business of the software system under test, etc.

[0053] Through the above method, the behavior of a user logging in and using the software system under test can be simulated, thereby triggering relevant functions of the software system under test, for example, triggering the software system under test to display, switch or pop up the interactive interface function.

[0054] It can be understood that if the watermark function of the software system under test is normal, then after triggering the relevant functions of the software system under test, the software system under test will generate a watermark while presenting the interactive interface. If the watermark function of the software system under test is abnormal, then after triggering the relevant functions of the software system under test, the software system under test will not generate a watermark while presenting the interactive interface, or will generate an incorrect watermark, etc.

[0055] Therefore, refer to Figure 2 This embodiment triggers relevant functions of the software system to be tested based on a preset watermark test case to present a corresponding interactive interface, and captures the corresponding interactive interface presented to the software system to be tested to understand the display of the watermark in the interactive interface.

[0056] It should be noted that, in order to achieve comprehensive testing of the interactive interfaces corresponding to the various functions of the software system under test, this embodiment tests the interactive interfaces corresponding to the various functions of the software system under test in sequence based on a preset order.

[0057] Specifically, refer to Figure 2 , the interactive interface presented when the relevant function of the software system to be tested is triggered for the first time is the initial interactive interface; in order to automatically test other interactive interfaces after testing the watermark function of the initial interactive interface, the specific implementation method of triggering the relevant function of the software system to be tested based on the preset watermark test case to present the corresponding interactive interface may be:

[0058] Acquire all button elements in the page elements corresponding to the initial interaction interface; trigger click events corresponding to all the button elements in sequence to present the target interaction interface corresponding to each button element in sequence.

[0059] Specifically, since each interactive interface corresponds to a page element, which refers to a basic component constituting a web page, all button elements in the initial interactive interface can be acquired based on the page element corresponding to the initial interactive interface.

[0060] For example, the page elements are searched based on button attributes, where the button attributes may include button type or name, etc. Specifically, based on the field type="button", all button elements in the initial interactive interface may be searched from the page elements.

[0061] In order to test the interactive interface of the software system under test in an orderly manner, the target interactive interface corresponding to each button element can be presented in sequence by triggering the click events corresponding to all the button elements in sequence; for example, when the click event corresponding to the first button element is triggered, the first target interactive interface is displayed; when the click event corresponding to the nth button element is triggered, the nth target interactive interface is displayed, where n is greater than or equal to 0.

[0062] Step S20, receiving an interface display file sent by the software system to be tested after presenting the interactive interface, wherein the interface display file records watermark information corresponding to the interactive interface;

[0063] Since the above-mentioned preset watermark test cases are based on the relevant functions of the software system under test, the corresponding interactive interfaces are presented in sequence when the relevant functions of the software system under test are triggered. It can be understood that each time an interactive interface is presented, the server of the software system under test will return the interface display file corresponding to the interactive interface to the watermark test platform.

[0064] Specifically, the interface display file records watermark information corresponding to the interactive interface, wherein the watermark information includes format information and attribute information of the watermark displayed in the interface.

[0065] It can be understood that the watermark information can reflect the display status of the watermark in the corresponding interactive interface.

[0066] It should be noted that the interface display file is a JavaScript file, which is used to implement dynamic functions and interactive effects of the web page.

[0067] Step S30: Based on the watermark information, determine the watermark detection result of the interactive interface to complete the watermark test.

[0068] It can be understood that after obtaining watermark information that can reflect the display status of the watermark in the corresponding interactive interface, the watermark detection result of the interactive interface can be determined based on the watermark information, for example, determining whether the display format and display properties of the watermark in the interactive interface are correct, etc., to complete the watermark test.

[0069] In addition, the specific implementation of determining the watermark detection result of the interactive interface based on the watermark information may also be:

[0070] Determine whether there is a watermark field corresponding to the interactive interface in the watermark information, and obtain a determination result, wherein the watermark field in the watermark information is used to indicate that a watermark is displayed in the interactive interface; and determine a watermark detection result of the interactive interface based on the determination result.

[0071] It should be noted that the watermark field in the watermark information is used to characterize that a watermark is displayed in the interactive interface. For example, if there is a watermark field corresponding to the interactive interface in the watermark information, it is considered that a watermark is displayed in the interactive interface. If there is no watermark field corresponding to the interactive interface in the watermark information, it is considered that no watermark is displayed in the interactive interface.

[0072] It can be understood that if it is believed that a watermark is displayed in the interactive interface, the watermark detection result of the interactive interface is determined to be qualified or has a watermark, etc. If it is believed that no watermark is displayed in the interactive interface, the watermark detection result of the interactive interface is determined to be unqualified or has no watermark, etc.

[0073] Specifically, the watermark fields corresponding to the watermarks displayed on different interactive interfaces may be different, thereby improving the diversity of watermark display.

[0074] Furthermore, after detecting each interactive interface of the software system to be tested that needs to be tested in the preset watermark test case, the watermark display problem of the software system to be tested can be determined based on the watermark detection result. Based on the watermark display problem, a detailed test report can be generated, and the test report and the test process can be sent to the user end or stored in the watermark test platform through the log sending module and the report generation module to complete the watermark test. When sending the test report and the test process, it is necessary to add a watermark before sending it to improve confidentiality.

[0075] Taking into account the possibility of missed tests in manual testing, for example, there are multiple interactive interfaces or multiple pop-up boxes in the software system to be tested, manual testing is likely to result in missed tests, which consumes a lot of manpower and time, and wastes enterprise resources and costs. Therefore, in this embodiment, the software system to be tested is integrated or connected to a watermark testing platform, which can be built based on the Java-testmng testing framework.

[0076] When the user needs to perform a watermark test on the software system under test, the user can use the watermark test platform and click the start test button. The watermark test platform will execute the above watermark test method and quickly complete the watermark test, thereby saving the company's testing costs during the testing phase.

[0077] Furthermore, in order to ensure the security of different users using the watermark testing platform, tenant management can be achieved by building an infrastructure and designing tenant isolation.

[0078] Specifically, you can first select a deployment environment: for example, build your own server or private cloud, and then perform containerized deployment: for example, use Docker (application container engine) to containerize Jenkins (a continuous integration tool developed based on Java) to facilitate deployment and management; finally, design tenant isolation: for example, create an independent Jenkins instance or namespace for each tenant, use different Jenkins plug-ins (such as Multitenancy Plugin) to support a multi-tenant environment, allocate fixed computing resources (such as CPU, memory) to each tenant, and set storage limits to prevent a single tenant from occupying too many resources.

[0079] In this embodiment, based on a preset watermark test case, the relevant functions of the software system to be tested are triggered to present a corresponding interactive interface; based on the received interface display file sent by the software system to be tested after presenting the interactive interface, the content displayed in the interactive interface is detected to obtain a detection result, thereby completing the watermark test; since the interface display file records the watermark information corresponding to the interactive interface, the watermark information can reflect the watermark display situation of the interactive interface, and therefore, based on the watermark information, the watermark detection result of the interactive interface is determined to complete the watermark test, without the need for manual testing to analyze the content in the interactive interface, thereby improving the test speed, that is, improving the watermark test efficiency.

[0080] Furthermore, this embodiment provides a watermark testing platform, which has a universal setting, and the data, logic, and configuration are managed in isolation, which is convenient for platform maintenance; it is also convenient for watermark testing of different software systems to be tested, and can provide online watermark testing to improve the efficiency of watermark testing and save manpower and time costs; by changing the configuration information of the watermark testing platform, different software systems to be tested can be connected to quickly complete the watermark testing; the watermark testing platform can be integrated into storage devices such as hard disks, floppy disks, and U disks, which can conveniently provide one-stop watermark testing services and improve the convenience of watermark testing; the watermark testing platform can also be deployed as a SaaS (Software as a Service) platform and rented to tenants who need to do watermark testing.

[0081] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 After the step of determining whether there is a watermark field corresponding to the interactive interface in the watermark information and obtaining the determination result, the step further includes steps S01-S02:

[0082] Step S01, if the watermark information contains a watermark field corresponding to the interactive interface, determining whether the interactive interface is presented when the relevant function of the software system to be tested is triggered for the first time;

[0083] It should be noted that, in order to improve test efficiency, this embodiment can determine whether the interactive interface is presented when the relevant function of the software system under test is first triggered when a watermark field corresponding to the interactive interface exists in the watermark information.

[0084] It can be understood that if it is determined that the interactive interface is not presented when the relevant function of the software system to be tested is triggered for the first time, it can be directly determined whether there is a watermark in the interactive interface presented this time, thereby improving the test efficiency.

[0085] Specifically, the triggering number may be updated each time the relevant function of the software system under test is triggered, and by reading the recorded triggering number, it is determined whether the interactive interface is presented when the relevant function of the software system under test is triggered for the first time.

[0086] Step S02: if it is presented when the relevant function of the software system to be tested is triggered for the first time, then based on the watermark information and the preset watermark display rules, the watermark detection result of the interactive interface is determined to complete the watermark test.

[0087] Furthermore, in order to improve the comprehensiveness of the test of the watermark function, when the interactive interface is presented when the relevant function of the software system to be tested is triggered for the first time, the watermark of the interactive interface can be further detected based on the watermark information and the preset watermark display rules, so as to determine the watermark detection result of the interactive interface and complete the watermark test, that is, compare the watermark display of the page, refer to Figure 2 .

[0088] It can be understood that this embodiment only needs to determine the watermark detection result of the interactive interface based on the watermark information and the preset watermark display rules when the relevant function of the software system to be tested is triggered for the first time and there is a watermark in the interactive interface, so as to ensure that the format or attributes of the watermark displayed subsequently are correct; when the relevant function of the software system to be tested is not triggered for the first time, and / or there is no watermark in the interactive interface, there is no need to determine the watermark detection result of the interactive interface based on the watermark information and the preset watermark display rules, that is, it is only necessary to determine whether there is a watermark, thereby improving the test efficiency.

[0089] Based on the above, on the basis of detecting whether there is a watermark on the interactive interface, the correctness of the watermark displayed in the interactive interface can be detected, thereby achieving a comprehensive test of the watermark.

[0090] It should be noted that the preset watermark display rule includes at least one of a preset watermark position and a preset watermark density, and the watermark detection result includes a first judgment result and / or a second judgment result.

[0091] Specifically, the step of determining the watermark detection result of the interactive interface based on the watermark information and the preset watermark display rule to complete the watermark test includes at least one of the following feasible implementations:

[0092] First, the position coordinate information of the watermark in the interactive interface can be obtained from the watermark information, and based on the position coordinate information and the preset watermark position, it is determined whether the display position of the watermark in the interactive interface is the preset display position to obtain a first judgment result.

[0093] It can be understood that since the sizes and positions of different pop-up boxes and different pages are different, the watermark position displayed in the corresponding interactive interface should change accordingly. Therefore, in order to test the watermark display position, the position coordinate information of the watermark in the interactive interface can be obtained from the watermark information.

[0094] Specifically, the position coordinate information of the watermark in the interactive interface can be determined based on the x-axis coordinate of the watermark starting position and the y-axis coordinate of the watermark starting position in the watermark information; the preset watermark position can be determined from a pre-set watermark display standard corresponding to the interactive interface, and the watermark display standard can be changed based on different software systems to be tested.

[0095] By determining whether the display position of the watermark in the interactive interface is the preset display position, a first judgment result can be obtained. If the display position of the watermark in the interactive interface is the preset display position, then the first judgment result is that the watermark position is displayed correctly or the display position is qualified, etc. Otherwise, the first judgment result is that the watermark position is displayed incorrectly or the display position is unqualified, etc.

[0096] And / or, secondly, the total number of characters corresponding to the watermark displayed in the interactive interface can be determined by identifying the characters corresponding to the watermark displayed in the interactive interface, and based on the preset interface display size corresponding to the interactive interface and the total number of characters, it can be judged whether the density of the watermark displayed in the interactive interface meets the preset density requirement to obtain a second judgment result.

[0097] It should be noted that, in order to make the interactive interface beautiful and to ensure that the watermark does not affect the text content of the interactive interface, the density of the watermark displayed in the interactive interface can be tested.

[0098] Specifically, the watermark is generally displayed in the form of a picture at the top of the interactive interface. Therefore, the text corresponding to the watermark displayed in the interactive interface can be identified by pytesseract (Python interface) and PIL (Python Imaging Library, a Python library for processing images).

[0099] Based on the total number of words corresponding to the watermark displayed in the interactive interface, the density of the watermark displayed in the interactive interface is determined, and it is judged whether the density of the watermark displayed in the interactive interface meets the preset density requirement to obtain a second judgment result.

[0100] The preset watermark position may be determined from a preset watermark display standard corresponding to the interactive interface.

[0101] Furthermore, in order to improve the comprehensiveness of the watermark test, after the step of determining whether the interactive interface is presented when the relevant function of the software system to be tested is triggered for the first time, there are also the following feasible implementation methods:

[0102] If the interactive interface is presented when the relevant function of the software system under test is triggered for the first time, prompt information and the preset watermark display rule are displayed to allow the user to determine whether the content displayed in the interactive interface complies with the preset watermark display rule.

[0103] It can be understood that the preset watermark display rule also includes at least one of the preset watermark transparency, the preset watermark row and column number, the preset watermark font, the preset watermark color, the preset watermark length and width, and the preset watermark inclination.

[0104] If the interactive interface is presented when the relevant function of the software system to be tested is triggered for the first time, the prompt information and the preset watermark display rules are displayed. It can be understood that the prompt information and the preset watermark display rules can be displayed through the watermark testing platform. During the process of the user performing a watermark test through the watermark testing platform, the user can judge the transparency, number of rows and columns, font, color, length, width and inclination of the watermark based on the displayed prompt information and the preset watermark display rules. If the user believes that the display is incorrect, an alarm can be issued.

[0105] In this embodiment, the developer is prompted to adjust the watermark with errors. The user does not need to manually click on the interactive interface, nor does he need to detect the watermark position and watermark density. He only needs to detect simple contents such as the transparency, number of rows and columns, font, color, length, width and inclination of the interactive interface when the relevant function of the software system to be tested is triggered for the first time. The user does not need to have an in-depth understanding of Java, Python code, etc., but only needs to simply understand the technical meaning of the field to complete the watermark test, thereby lowering the user usage threshold.

[0106] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the watermark testing method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0107] This application also provides a watermark testing platform, please refer to Figure 4 , the watermark testing platform comprises:

[0108] The trigger module 10 is used to trigger the relevant functions of the software system to be tested based on the preset watermark test case to present the corresponding interactive interface;

[0109] A receiving module 20, configured to receive an interface display file sent by the software system under test after presenting the interactive interface, wherein the interface display file records watermark information corresponding to the interactive interface;

[0110] The detection module 30 is used to determine the watermark detection result of the interactive interface based on the watermark information to complete the watermark test.

[0111] Furthermore, the detection module 30 also includes:

[0112] A first judgment submodule is used to judge whether there is a watermark field corresponding to the interactive interface in the watermark information, and obtain a judgment result, wherein the watermark field in the watermark information is used to indicate that a watermark is displayed in the interactive interface;

[0113] The detection submodule is used to determine the watermark detection result of the interactive interface based on the judgment result.

[0114] The first judgment submodule also includes:

[0115] A first judging unit, configured to judge whether the interactive interface is presented when the relevant function of the software system under test is triggered for the first time, if a watermark field corresponding to the interactive interface exists in the watermark information;

[0116] The detection unit is used to determine the watermark detection result of the interactive interface based on the watermark information and preset watermark display rules to complete the watermark test if it is presented when the relevant function of the software system to be tested is triggered for the first time.

[0117] The preset watermark display rule includes at least one of a preset watermark position and a preset watermark density; the watermark detection result includes a first judgment result and / or a second judgment result, and the detection unit includes at least one of the following:

[0118] A first judgment subunit is used to obtain the position coordinate information of the watermark in the interactive interface from the watermark information, and judge whether the display position of the watermark in the interactive interface is the preset display position based on the position coordinate information and the preset watermark position, so as to obtain a first judgment result;

[0119] The second judgment sub-unit is used to identify the text corresponding to the watermark displayed in the interactive interface, determine the total number of texts corresponding to the watermark displayed in the interactive interface, and based on the preset interface display size corresponding to the interactive interface and the total number of the texts, judge whether the density of the watermark displayed in the interactive interface meets the preset density requirement to obtain a second judgment result.

[0120] The step of determining whether the interactive interface is presented when the relevant function of the software system to be tested is triggered for the first time includes:

[0121] The display module is used to display prompt information and the preset watermark display rules if the interactive interface is presented when the relevant function of the software system under test is triggered for the first time, so that the user can judge whether the content displayed in the interactive interface complies with the preset watermark display rules.

[0122] The interactive interface presented when the relevant function of the software system to be tested is triggered for the first time is the initial interactive interface; the trigger module 10 includes:

[0123] An acquisition submodule, used to acquire all button elements in the page elements corresponding to the initial interaction interface;

[0124] The trigger submodule is used to trigger the click events corresponding to all the button elements in sequence, so as to present the target interaction interface corresponding to each of the button elements in sequence.

[0125] The watermark testing platform provided by the present application adopts the watermark testing method in the above embodiment, which can solve the technical problem of low efficiency of watermark testing. Compared with the prior art, the beneficial effects of the watermark testing platform provided by the present application are the same as those of the watermark testing method provided by the above embodiment, and other technical features in the watermark testing platform are the same as those disclosed in the above embodiment method, which will not be described in detail here.

[0126] The present application provides a watermark testing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the watermark testing method in the above-mentioned embodiment 1.

[0127] Reference below Figure 5 , which shows a schematic diagram of the structure of a watermark test device suitable for implementing the embodiment of the present application. The watermark test device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The watermark testing device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0128] like Figure 5As shown, the watermark test device may include a processing platform 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage platform 1003 to a random access memory (RAM) 1004. In RAM 1004, various programs and data required for the operation of the watermark test device are also stored. The processing platform 1001, ROM 1002, and RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input platform 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output platform 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage platform 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication platform 1009. The communication platform 1009 can allow the watermark test device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a watermark test device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0129] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication platform, or installed from a storage platform 1003, or installed from ROM 1002. When the computer program is executed by the processing platform 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0130] The watermark test device provided by the present application adopts the watermark test method in the above embodiment, which can solve the technical problem of low watermark test efficiency. Compared with the prior art, the beneficial effects of the watermark test device provided by the present application are the same as the beneficial effects of the watermark test method provided by the above embodiment, and other technical features in the watermark test device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0131] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0132] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0133] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the watermark testing method in the above embodiment.

[0134] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0135] The computer-readable storage medium mentioned above may be included in the watermark testing device; or may exist independently without being assembled into the watermark testing device.

[0136] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the watermark testing device, the watermark testing device executes the watermark testing method.

[0137] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0138] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0139] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0140] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned watermark testing method, and can solve the technical problem of low efficiency of watermark testing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the watermark testing method provided in the above-mentioned embodiment, and will not be elaborated here.

[0141] The present application also provides a computer program product, including a computer program, which implements the steps of the watermark testing method as described above when executed by a processor.

[0142] The computer program product provided by this application can solve the technical problem of low efficiency of watermark testing. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the watermark testing method provided by the above embodiment, which will not be repeated here.

[0143] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A watermark testing method, characterized in that: The method includes: Based on the preset watermark test cases, the relevant functions of the software system under test are triggered to present the corresponding interactive interface; Receiving an interface display file sent by the software system to be tested after presenting the interactive interface, wherein the interface display file records watermark information corresponding to the interactive interface; Based on the watermark information, a watermark detection result of the interactive interface is determined to complete the watermark test.

2. The method according to claim 1, characterized in that The step of determining the watermark detection result of the interactive interface based on the watermark information includes: Determine whether there is a watermark field corresponding to the interactive interface in the watermark information, and obtain a determination result, wherein the watermark field in the watermark information is used to indicate that a watermark is displayed in the interactive interface; Based on the judgment result, a watermark detection result of the interactive interface is determined.

3. The method according to claim 2, characterized in that After the step of determining whether there is a watermark field corresponding to the interactive interface in the watermark information and obtaining the determination result, the method further includes: If the watermark information contains a watermark field corresponding to the interactive interface, determining whether the interactive interface is presented when the relevant function of the software system to be tested is triggered for the first time; If it is presented when the relevant function of the software system to be tested is triggered for the first time, the watermark detection result of the interactive interface is determined based on the watermark information and the preset watermark display rule to complete the watermark test.

4. The method according to claim 3, characterized in that The preset watermark display rule includes at least one of a preset watermark position and a preset watermark density; The watermark detection result includes a first judgment result and / or a second judgment result. The step of determining the watermark detection result of the interactive interface based on the watermark information and the preset watermark display rule to complete the watermark test includes at least one of the following: Acquire position coordinate information of the watermark in the interactive interface from the watermark information, and determine whether the display position of the watermark in the interactive interface is the preset display position based on the position coordinate information and the preset watermark position, to obtain a first determination result; Identify the text corresponding to the watermark displayed in the interactive interface, determine the total number of texts corresponding to the watermark displayed in the interactive interface, and based on the preset interface display size corresponding to the interactive interface and the total number of texts, judge whether the density of the watermark displayed in the interactive interface meets the preset density requirement to obtain a second judgment result.

5. The method according to claim 3, characterized in that The step of determining whether the interactive interface is presented when the relevant function of the software system to be tested is triggered for the first time includes: If the interactive interface is presented when the relevant function of the software system under test is triggered for the first time, prompt information and the preset watermark display rule are displayed to allow the user to determine whether the content displayed in the interactive interface complies with the preset watermark display rule.

6. The method according to claim 1, characterized in that The interactive interface presented when the relevant function of the software system under test is triggered for the first time is the initial interactive interface; The step of triggering relevant functions of the software system to be tested based on the preset watermark test case to present a corresponding interactive interface includes: Obtain all button elements in the page elements corresponding to the initial interactive interface; The click events corresponding to all the button elements are triggered in sequence to present the target interaction interfaces corresponding to the button elements in sequence.

7. A watermark testing platform, characterized in that: The watermark testing platform comprises: A trigger module is used to trigger relevant functions of the software system under test based on a preset watermark test case to present a corresponding interactive interface; A receiving module, used for receiving an interface display file sent by the software system under test after presenting the interactive interface, wherein the interface display file records watermark information corresponding to the interactive interface; The detection module is used to determine the watermark detection result of the interactive interface based on the watermark information to complete the watermark test.

8. A watermark testing device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the watermark testing method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the watermark testing method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the watermark testing method according to any one of claims 1 to 6 are implemented.