Data leakage prevention system testing method, device, equipment and storage medium

By obtaining and using test control parameters to control multiple terminal devices for batch startup and behavior simulation, the problem that traditional testing framework cannot effectively perform automated testing of data leakage prevention system on multiple terminal devices is solved, and efficient automated testing is achieved.

CN114328196BActive Publication Date: 2025-03-25BEIJING WONDERSOFT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111547754.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2025-03-25
Estimated Expiration
2041-12-16

AI Technical Summary

Technical Problem

The traditional open source testing framework cannot effectively carry out automated testing of data leakage prevention systems when multiple terminal devices are running, resulting in low testing efficiency and poor testing results.

Method used

By responding to the received test instructions, obtain the test control parameters to be used in the automated test system, control multiple target terminals to perform batch startup behavior and terminal behavior, form a test environment, and perform automated testing of the data leakage prevention system in this environment to obtain test results.

Benefits of technology

It realizes efficient and automated testing of the data leakage prevention system when multiple terminal devices are running, improving testing efficiency and testing effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114328196B_ABST
    Figure CN114328196B_ABST
Patent Text Reader

Abstract

The present invention discloses a test method, device, equipment and storage medium for a data leakage prevention system. The method comprises: in response to a received test instruction, obtaining a test control parameter to be used in an automated test system, wherein the test control parameter is pre-configured by the system or input by a target object in real time; controlling multiple target terminals to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminal is a service object of the data leakage prevention system; and performing an automated test on the data leakage prevention system under the test environment to obtain a test result. The present invention solves the technical problem of low test efficiency and poor test effect caused by the inability of the traditional open source test framework to realize automated testing of the data leakage prevention system when multiple terminal devices are running simultaneously.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of system testing, and in particular to a testing method, device, equipment and storage medium for a data leakage prevention system. Background Art

[0002] As all industries pay more and more attention to data, data security issues have also received widespread attention from data users. As a relatively mature data security protection method, the security testing of data leakage prevention systems has also received more and more attention.

[0003] At present, the open source testing framework of the data leakage prevention system, for example, uses the open source testing tool Jmeter to build a distributed testing system, such as Figure 1 As shown, by deploying a master scheduling machine and multiple execution machines, sufficient pressure is generated on the system to be tested. At the same time, the tester tests the system to be tested by writing a test plan, setting test parameters such as the number of requests to be initiated, and finally generating a test result report. However, when using the above test system for stress testing, when executing a large number (such as 10,000) of simulated terminal threads, the central processing unit CPU context switches too frequently, and there are memory overflows in large concurrency scenarios, and excessive resource consumption leads to machine restarts. The deployment of the above test system depends on the Java environment, and requires a unified JDK and Jmeter version. The process is complicated and cannot be used out of the box. In addition, the test cases cannot fit the data leakage prevention system well, the writing process is cumbersome, and the learning cost is high.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a testing method, device, equipment and storage medium for a data leakage prevention system, so as to at least solve the technical problems of low testing efficiency and poor testing effect caused by the traditional open source testing framework being unable to realize automated testing of the data leakage prevention system when multiple terminal devices are running simultaneously.

[0006] According to one aspect of an embodiment of the present invention, a testing method for a data leakage prevention system is provided, the method comprising: responding to a received test instruction, obtaining test control parameters to be used in an automated testing system, wherein the test control parameters are pre-configured by the system or input by a target object in real time; controlling multiple target terminals to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminal is a service object of the data leakage prevention system; and performing automated testing on the data leakage prevention system under the test environment to obtain a test result.

[0007] Optionally, obtaining test control parameters to be used in the automated testing system includes: obtaining a test configuration file and a terminal behavior rule file, wherein the test configuration file includes: terminal description information, authentication certificate information, and user information; obtaining a target configuration file associated with the data leakage prevention system from the test configuration file, and obtaining a target rule file associated with the data leakage prevention system from the simulated terminal behavior rule file; and generating the test control parameters based on the target configuration file and the target rule file.

[0008] Optionally, the method further includes: pre-defining the behaviors of multiple terminals to be tested, wherein the behaviors of the terminals to be tested include at least one of the following: selecting multiple target terminals from the multiple terminals to be tested, wherein the target terminals are terminals selected to participate in this test; determining the registration behaviors, login behaviors, logout behaviors, deregistration behaviors and startup time intervals of the multiple terminals to be tested.

[0009] Optionally, the method further includes: in response to the received test instruction, obtaining a test type and a server address of a test server when starting the test, wherein the test type includes: a one-way authentication test and a two-way authentication test.

[0010] Optionally, the method further includes: obtaining test load data of the automated test system; and determining whether to add a new test node to the automated test system based on the test load data to improve the load capacity of the automated test system.

[0011] Optionally, after performing automated testing on the data leakage prevention system under the test environment and obtaining the test results, the method further includes: responding to a received test result display instruction and displaying the test results, wherein the test results serve as a basis for the test object to determine whether to increase the test pressure, and the test results include the time consumption of each test logic in the current rule file and the time consumption of the related API interface.

[0012] Optionally, after performing automated testing on the data leakage prevention system under the test environment and obtaining the test results, the method further includes: counting all the test results associated with the data leakage prevention system, wherein the test results generated by all the test nodes in the automated testing system are periodically aggregated to a master control node in the automated testing system; generating a test report based on all the test results; and displaying the test report.

[0013] According to another aspect of an embodiment of the present invention, a testing device for a data leakage prevention system is also provided, the device comprising: an acquisition module, used to respond to a received test instruction and obtain test control parameters to be used in an automated testing system, wherein the test control parameters are pre-configured by the system or input by a target object in real time; a control module, used to control multiple target terminals to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminal is a service object of the data leakage prevention system; a testing module, used to perform automated testing on the data leakage prevention system under the test environment to obtain test results.

[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing any one of the above-mentioned data leakage prevention system testing methods.

[0015] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned data leakage prevention system testing methods.

[0016] In an embodiment of the present invention, a data leakage prevention system test method is adopted, and test control parameters to be used in the automated test system are obtained by responding to received test instructions, wherein the test control parameters are pre-configured by the system or input by the target object in real time; multiple target terminals are controlled to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminal is a service object of the data leakage prevention system; the data leakage prevention system is automatically tested under the test environment to obtain test results, thereby achieving the purpose of automatically testing the data leakage prevention system when multiple terminal devices are running in succession, thereby achieving the technical effect of improving the efficiency of automated testing and the test effect of the data leakage prevention system, and further solving the technical problem of low test efficiency and poor test effect caused by the traditional open source test framework being unable to realize automated testing of the data leakage prevention system when multiple terminal devices are running in succession. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 It is a schematic diagram of a test framework of a data leakage prevention system according to the prior art;

[0019] Figure 2 is a flow chart of a method for testing a data leakage prevention system according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of the structure of the interaction between an optional automated testing system and a data leakage prevention system according to an embodiment of the present invention;

[0021] Figure 4 is a flow chart of an optional method for testing a data leakage prevention system according to an embodiment of the present invention;

[0022] Figure 5 is a flow chart of another optional data leakage prevention system testing method according to an embodiment of the present invention;

[0023] Figure 6 is a flow chart of another optional data leakage prevention system testing method according to an embodiment of the present invention;

[0024] Figure 7 It is a structural schematic diagram of a testing device of a data leakage prevention system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] First, to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention are explained below:

[0028] Data leakage prevention (DLP) is a strategy that uses certain technical means to prevent an enterprise's designated data or information assets from flowing out of the enterprise in a form that violates security policy regulations.

[0029] Example 1

[0030] As various industries pay more and more attention to data, data security issues have also received greater attention from data users. Data security, as an important branch of information security, has also developed rapidly to meet the application needs of different industries. Among them, data leakage prevention systems, as a more mature means of data security protection, have also gradually developed in the direction of intelligence, and are increasingly in line with user habits. However, with the increase in data leakage prevention system terminals and functions, higher requirements are placed on the stability of the data leakage prevention system server.

[0031] Traditional open source testing frameworks take up a lot of resources and do not support large-scale concurrent terminal testing, or the test case writing is cumbersome and the distributed support is limited. At the same time, protocol adaptation has a large workload, and different simulation terminal process controls require different adjustments. Based on this, the existing data leakage prevention system urgently needs a test system that supports large-scale concurrent terminal simulation, test process orchestration, and supports distributed loads to meet the requirements of system stability and performance testing.

[0032] Based on the above problems, an embodiment of the present invention provides a method embodiment for testing a data leakage prevention system. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] Figure 2 FIG. 1 is a flow chart of a method for testing a data leakage prevention system according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0034] Step S102, in response to the received test instruction, obtaining the test control parameters to be used in the automated test system, wherein the test control parameters are pre-configured by the system or input by the target object in real time;

[0035] Step S104, controlling multiple target terminals to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminals are service objects of the data leakage prevention system;

[0036] Step S106, performing an automated test on the data leakage prevention system under the test environment to obtain a test result.

[0037] In an embodiment of the present invention, a data leakage prevention system test method is adopted, and test control parameters to be used in the automated test system are obtained by responding to received test instructions, wherein the test control parameters are pre-configured by the system or input by the target object in real time; multiple target terminals are controlled to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminal is a service object of the data leakage prevention system; the data leakage prevention system is automatically tested under the test environment to obtain test results, thereby achieving the purpose of automatically testing the data leakage prevention system when multiple terminal devices are running in succession, thereby achieving the technical effect of improving the efficiency of automated testing and the test effect of the data leakage prevention system, and further solving the technical problem of low test efficiency and poor test effect caused by the traditional open source test framework being unable to realize automated testing of the data leakage prevention system when multiple terminal devices are running in succession.

[0038] Optionally, different test environments can be simulated by changing the test control parameters, that is, different test environments can be formed. For example, by changing the above test control parameters, multiple target terminals can be controlled to perform batch startup behaviors and terminal behaviors, so as to achieve the purpose of automatically testing the data leakage prevention system when multiple terminal devices are running in bursts, so as to meet the performance testing requirements such as stability and test effect of the data leakage prevention system.

[0039] Optionally, the data leakage prevention system controls batch startup of simulation terminals according to configuration or parameters input by the user when starting the test; and predefines the behavior of the simulation terminals through rule files, thereby controlling the behavior of the simulation terminals after startup.

[0040] Optionally, the target terminal may be but is not limited to being a simulation terminal in an automated testing system, wherein the automated testing system (i.e., automated testing framework) includes at least: a management subsystem and multiple worker subsystems, wherein the management subsystem includes: a command parsing module, a report aggregation module, and a report statistics module; the worker subsystem includes: a statistical indicator collection module, an executor module, a scheduler module, and a remote procedure call RPC module, and each worker subsystem corresponds to multiple simulation terminals. Figure 3 FIG. 1 is a schematic diagram of an optional structure of the interaction between the automated testing system and the data leakage prevention system according to an embodiment of the present invention. Figure 3 As shown, the above-mentioned automatic testing system is connected to the data leakage prevention system to provide a testing environment and perform automatic testing on the data leakage prevention system.

[0041] Optionally, the data leakage prevention system is automatically tested by single-machine testing or distributed testing, wherein the single-machine testing tests the data leakage prevention system by enabling a simulation terminal in a worker subsystem; the distributed testing tests the data leakage prevention system by enabling simulation terminals in multiple worker subsystems.

[0042] As an optional embodiment, Figure 4 is a flow chart of an optional data leakage prevention system testing method according to an embodiment of the present invention. Figure 4 As shown, obtaining the test control parameters to be used in the automated test system includes:

[0043] Step S202, obtaining a test configuration file and a simulated terminal behavior rule file, wherein the test configuration file includes: terminal description information, authentication certificate information, and user information;

[0044] Step S204, obtaining a target configuration file associated with the data leakage prevention system from the test configuration file, and obtaining a target rule file associated with the data leakage prevention system from the simulated terminal behavior rule file;

[0045] Step S206: generating the test control parameters based on the target configuration file and the target rule file.

[0046] Optionally, the above authentication certificate information includes at least: a two-way authentication certificate and a one-way authentication certificate.

[0047] Optionally, when the test system is started, the target configuration file and the target rule file are specified through the test control parameters (ie, command line parameters).

[0048] In an optional embodiment, the above method further includes:

[0049] Step S302: pre-define terminal behaviors of multiple terminals to be tested.

[0050] Optionally, the behavior of the terminal to be tested includes at least one of the following: selecting multiple target terminals from the multiple terminals to be tested, wherein the target terminals are terminals selected to participate in this test; determining the registration behavior, login behavior, logout behavior, deregistration behavior and startup time interval of the multiple terminals to be tested.

[0051] Optionally, through the interface of the automated testing system (i.e., automated testing framework), the terminal behaviors of multiple simulated terminals (target terminals) are predefined using target rules, wherein the target rules are stored in a target rule file, and the target rules can be obtained in the form of but not limited to program writing.

[0052] In an optional embodiment, the above method further includes:

[0053] Step S402, in response to the received test instruction, obtain the test type and the server address of the test server when starting the test, wherein the test type includes: one-way authentication test and two-way authentication test.

[0054] Optionally, when starting the test, the one-way authentication port and the two-way authentication port of the data leakage prevention system are specified, wherein after the simulation terminal (i.e., the target terminal) is connected to the data leakage prevention system, interaction is performed through the one-way authentication port during registration; after successful registration, the authentication certificate is generated by the server of the data leakage prevention system and distributed to each simulation terminal, and then the simulation terminal and the data leakage prevention system interact through the two-way authentication port, and the server address of the data leakage prevention system is specified at the same time.

[0055] In an optional embodiment, the above method further includes:

[0056] Step S502, obtaining the test load data of the above-mentioned automated test system;

[0057] Step S504: Determine whether to add a new test node to the automated test system based on the test load data to improve the load capacity of the automated test system.

[0058] Optionally, after starting the test, new test nodes are added to the automated test system according to the test load, that is, the number of simulated terminals is increased to provide a larger load capacity and further test the performance of the data leakage system.

[0059] In an optional embodiment, after performing an automated test on the data leakage prevention system under the test environment and obtaining the test results, the method further includes:

[0060] Step S602, responding to the received test result display instruction, displaying the above test results.

[0061] Optionally, the above test results are used as a basis for the test object to determine whether to increase the test pressure. The above test results include the time consumption of each test logic in the current rule file and the time consumption of related API interfaces.

[0062] Optionally, after the system test starts, the current test results can be obtained in real time. The test results reflect the time consumption of each test logic in the current rule file and the time consumption of the relevant API interface. At the same time, the test pressure can be increased at any time according to the response of the data leakage prevention system (that is, the book power of the simulation terminal is increased). For example, when it is found that the current test pressure is not enough, a stop request is sent to the stop test interface, and then more simulation terminals are started, or the simulation terminals are started faster through the start interval parameter to test the load limit of the data leakage prevention system. It should be noted that after the newly added simulation terminal is started, the predefined behavior will be automatically triggered so that the relevant parameters can be automatically updated synchronously.

[0063] As an optional embodiment, Figure 5 FIG. 1 is a flow chart of another optional data leakage prevention system testing method according to an embodiment of the present invention. Figure 5 As shown, the data leakage prevention system is automatically tested under the test environment, and after the test results are obtained, the method further includes:

[0064] Step S702, counting all the test results associated with the data leakage prevention system;

[0065] Step S704, generating a test report based on all the above test results;

[0066] Step S706, displaying the above test report.

[0067] Optionally, the test results generated by all test nodes in the automated testing system are periodically aggregated to a master control node in the automated testing system.

[0068] Optional, still as Figure 2 As shown, after starting the test, the worker node (i.e., worker node) of the worker system corresponding to the simulation terminal will be started and a test report will be generated. The test report corresponding to the worker node will be periodically summarized to the master control node (i.e., the node corresponding to the manager subsystem). The test report of the current data leakage prevention system can be obtained through the system interface.

[0069] As an optional embodiment, Figure 6 FIG. 1 is a flow chart of another optional data leakage prevention system testing method according to an embodiment of the present invention. Figure 6As shown, the above test method includes a simulation terminal test configuration file, rule configuration, test start and stop, and test result collection, specifically: generate a data file of the simulation terminal according to the configuration, wherein the above data file includes description information of the simulation terminal (i.e., one-way authentication certificate information, two-way authentication certificate information, user information, etc.) and a simulation terminal behavior rule file, wherein the above rule file is generated according to a rule file template predefined by the user; when the test system is started, the metadata directory and the rule file directory are specified through command line parameters, that is, the above data file and the behavior rule file are specified through command line parameters; after the test system is started, the tester sends a test instruction to the test system in the form of http, specifies the load node of the test and the number of simulation terminals according to the test scenario, and the simulation terminal follows the defined behavior rule file for testing; after the system test starts, the tester can obtain the current test results in real time, and the test results reflect the time consumption of each test logic in the current rule file, as well as the time consumption of the related API interface. At the same time, the test pressure can be increased at any time according to the response of the system. For example, when it is found that the test pressure is not enough, send an http request to stop the test interface to stop the test, and then start more simulation terminals, or start the simulation terminal faster through the start interval parameter. After these simulation terminals are started, they will perform predefined behaviors concurrently to measure the system's limits. After the test is completed, the stop command is executed, and the system will compile a report of all relevant data for the tester to review.

[0070] The embodiments of the present invention can at least achieve the following technical effects: the test method involved in the embodiments of the present invention supports the stable operation of 15,000 simulation terminals on a single machine, which is a significant improvement over the thousands of simulation terminals on a single machine of Jmeter; it only needs to automatically generate the data file of the simulation terminal and start the binary program without dependency, and it can be used out of the box in any x86 environment; the integrated rule engine allows testers to adjust the rule file more flexibly to achieve stress testing simulation of different scenarios and logics. Testers can dynamically adjust the test rules in real time according to the test situation, which is more interactive.

[0071] Example 2

[0072] According to an embodiment of the present invention, there is also provided an apparatus embodiment for implementing the test method of the above data leakage prevention system. Figure 7 is a structural schematic diagram of a test device for a data leakage prevention system according to an embodiment of the present invention. Figure 7 As shown, the test device of the data leakage prevention system is applied to an automated test system, and the automated test system is used to perform automated tests on multiple target terminals connected to the data leakage prevention system, including: an acquisition module 800, a control module 802, and a test module 804, wherein:

[0073] The acquisition module 800 is used to respond to the received test instruction and acquire the test control parameters to be used in the automated test system, wherein the test control parameters are pre-configured by the system or input by the target object in real time;

[0074] The control module 802 is used to control multiple target terminals to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminals are service objects of the data leakage prevention system;

[0075] The test module 804 is used to perform an automated test on the data leakage prevention system under the test environment to obtain a test result.

[0076] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0077] It should be noted that the acquisition module 800, the control module 802, and the test module 804 correspond to steps S102 to S106 in Example 1, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the modules as part of the device can be run in a computer terminal.

[0078] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.

[0079] The above-mentioned data leakage prevention system testing device may also include a processor and a memory. The above-mentioned acquisition module 800, control module 802, test module 804, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions.

[0080] The processor includes a kernel, which retrieves the corresponding program unit from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0081] According to an embodiment of the present application, an embodiment of a computer-readable storage medium is also provided. Optionally, in this embodiment, the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned data leakage prevention system testing methods.

[0082] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group, and the computer-readable storage medium includes a stored program.

[0083] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: respond to the received test instructions, obtain the test control parameters to be used in the automated testing system, wherein the test control parameters are pre-configured by the system or input by the target object in real time; control multiple target terminals to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminal is the service object of the data leakage prevention system; perform automated testing on the data leakage prevention system under the test environment to obtain test results.

[0084] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: obtain a test configuration file and a simulated terminal behavior rule file, wherein the test configuration file includes: terminal description information, authentication certificate information, and user information; obtain a target configuration file associated with the data leakage prevention system from the test configuration file, and obtain a target rule file associated with the data leakage prevention system from the simulated terminal behavior rule file; generate the test control parameters based on the target configuration file and the target rule file.

[0085] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: pre-define the behaviors of multiple terminals to be tested, wherein the behaviors of the terminals to be tested include at least one of the following: selecting multiple target terminals from the multiple terminals to be tested, wherein the target terminals are terminals selected to participate in this test; determining the registration behaviors, login behaviors, logout behaviors, deregistration behaviors and startup time intervals of the multiple terminals to be tested.

[0086] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: respond to the above-mentioned test instructions received, obtain the test type and the server address of the test server when starting the test, wherein the above-mentioned test types include: one-way authentication test and two-way authentication test.

[0087] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: obtaining the test load data of the above-mentioned automated testing system; and determining whether to add a new test node to the above-mentioned automated testing system based on the above-mentioned test load data to improve the load capacity of the above-mentioned automated testing system.

[0088] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: respond to the received test result display instruction, and display the above test results, wherein the above test results serve as the basis for the test object to determine whether to increase the test pressure, and the above test results include the time consumption of each test logic in the current rule file, and the time consumption of the related API interface.

[0089] Optionally, when the program is running, the device where the computer-readable storage medium is located is controlled to perform the following functions: count all the above test results associated with the above data leakage prevention system, wherein the above test results generated by all test nodes in the above automated testing system are periodically summarized to the main control node in the automated testing system; generate a test report based on all the above test results; and display the above test report.

[0090] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein when the program is run, any of the above-mentioned data leakage prevention system testing methods is executed.

[0091] According to an embodiment of the present application, an embodiment of an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned data leakage prevention system testing methods.

[0092] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, the program is suitable for executing the steps of initializing the test method of any one of the above-mentioned data leakage prevention systems.

[0093] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: responding to a received test instruction, obtaining test control parameters to be used in the automated testing system, wherein the above-mentioned test control parameters are pre-configured by the system or input by the target object in real time; controlling multiple target terminals to execute batch startup behaviors and terminal behaviors according to the above-mentioned test control parameters to obtain a test environment, wherein the above-mentioned target terminal is the service object of the above-mentioned data leakage prevention system; performing automated testing on the above-mentioned data leakage prevention system under the above-mentioned test environment to obtain test results.

[0094] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0095] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0096] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.

[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0098] In addition, each functional unit in each embodiment of the present invention 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.

[0099] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, 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 computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0100] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for testing a data leakage prevention system, characterized in that: include: In response to the received test instruction, obtaining a test control parameter to be used in the automated test system, wherein the test control parameter is pre-configured by the system or input by the target object in real time; Controlling multiple target terminals to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminals are service objects of the data leakage prevention system; Performing automated testing on the data leakage prevention system under the test environment to obtain test results; Wherein, obtaining the test control parameters to be used in the automated test system includes: obtaining a test configuration file and a simulated terminal behavior rule file, wherein the test configuration file includes: terminal description information, authentication certificate information, and user information; obtaining a target configuration file associated with the data leakage prevention system from the test configuration file, and obtaining a target rule file associated with the data leakage prevention system from the simulated terminal behavior rule file; generating the test control parameters based on the target configuration file and the target rule file; The method further includes: pre-defining the terminal behaviors to be tested of a plurality of terminals to be tested, wherein the terminal behaviors to be tested include at least one of the following: selecting a plurality of target terminals from the plurality of terminals to be tested, wherein the target terminals are terminals selected to participate in the current test; determining the registration behaviors, login behaviors, logout behaviors, deregistration behaviors, and startup time intervals of the plurality of terminals to be tested; The method further includes: specifying a one-way authentication port and a two-way authentication port of the data leakage prevention system when starting the test, wherein after the target terminal is connected to the data leakage prevention system, interaction is performed through the one-way authentication port during registration; after successful registration, an authentication certificate is generated by the server of the data leakage prevention system and distributed to the target terminal, and then the target terminal interacts with the data leakage prevention system through the two-way authentication port, and the server address of the data leakage prevention system is specified.

2. The method according to claim 1, characterized in that The method further comprises: In response to the received test instruction, a test type and a server address of a test server are obtained when the test is started, wherein the test type includes: a one-way authentication test and a two-way authentication test.

3. The method according to claim 1, characterized in that The method further comprises: Acquiring test load data of the automated test system; According to the test load data, it is determined whether to add a new test node to the automated test system to improve the load capacity of the automated test system.

4. The method according to claim 1, characterized in that: After performing an automated test on the data leakage prevention system under the test environment and obtaining the test result, the method further includes: In response to the received test result display instruction, the test result is displayed, wherein the test result serves as the basis for the test object to determine whether to increase the test pressure, and the test result includes the time consumption of each test logic in the current rule file and the time consumption of the related API interface.

5. The method according to claim 1, characterized in that After performing an automated test on the data leakage prevention system under the test environment and obtaining the test result, the method further includes: Counting all the test results associated with the data leakage prevention system, wherein the test results generated by all test nodes in the automated testing system are periodically summarized to a master control node in the automated testing system; generating a test report based on all of the test results; The test report is displayed.

6. A test device for a data leakage prevention system, characterized in that: Applied to an automated testing system, the automated testing system is used to perform automated testing on multiple target terminals connected to the data leakage prevention system, the device comprising: An acquisition module, used to respond to the received test instruction and acquire the test control parameters to be used in the automated test system, wherein the test control parameters are pre-configured by the system or input by the target object in real time; A control module, used to control multiple target terminals to execute batch startup behaviors and terminal behaviors according to the test control parameters to obtain a test environment, wherein the target terminals are service objects of the data leakage prevention system; A testing module, used to perform an automated test on the data leakage prevention system under the test environment to obtain a test result; The acquisition module is further used to: acquire a test configuration file and a simulated terminal behavior rule file, wherein the test configuration file includes: terminal description information, authentication certificate information, and user information; acquire a target configuration file associated with the data leakage prevention system from the test configuration file, and acquire a target rule file associated with the data leakage prevention system from the simulated terminal behavior rule file; and generate the test control parameters based on the target configuration file and the target rule file; The device is also used to: predefine the terminal behaviors to be tested of multiple terminals to be tested, wherein the terminal behaviors to be tested include at least one of the following: selecting multiple target terminals from the multiple terminals to be tested, wherein the target terminals are terminals selected to participate in this test; determining the registration behaviors, login behaviors, logout behaviors, deregistration behaviors and startup time intervals of the multiple terminals to be tested; The device is also used to: specify a one-way authentication port and a two-way authentication port of the data leakage prevention system when starting the test, wherein after the target terminal is connected to the data leakage prevention system, interaction is performed through the one-way authentication port during registration; after successful registration, an authentication certificate is generated by the server of the data leakage prevention system and distributed to the target terminal, and then the target terminal interacts with the data leakage prevention system through the two-way authentication port, and the server address of the data leakage prevention system is specified at the same time.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executed by the method for testing a data leakage prevention system according to any one of claims 1 to 5.

8. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the data leakage prevention system testing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Game testing method, device, system and equipment and cloud platform

    CN111400184A

  • Pressure measurement method and device, electronic equipment and storage medium

    CN113127356A