A test method and device for automatically detecting a test library of a multi-tenant system

CN117573550BActive Publication Date: 2026-11-03INSPUR GENERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311608587.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2026-11-03
Estimated Expiration
2043-11-28

AI Technical Summary

Technical Problem

The problem of data leakage between tenants in existing multi-tenant systems has not been effectively solved, leading to tenant data leakage and reduced competitiveness of software vendors.

Method used

By acquiring database query test requests, generating test scripts, filtering execution nodes, simulating user operation behaviors, and determining database query test results, automated detection is achieved.

Benefits of technology

In a test environment identical to the user's actual application scenario, accurately test whether the multi-tenant system has database cross-reference issues, reduce the risk of tenant data leakage, and ensure the normal operation of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117573550B_ABST
    Figure CN117573550B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and discloses a kind of test method and device for automatically detecting multi-tenant system string library, the method generates test script and determines the execution node of string library test request by obtaining string library test request, determines string library test result.This process, through the identification information in string library test request, generates test script, thereby simulating various operation behaviors that users can involve, and through the identification information, filters the execution node of string library test request, thereby meeting different application scenarios, so that in the same test environment as the actual application scenario of the user, simulate the database access behavior of the user under different conditions, and complete the automated testing of string library problems through the test script, thereby accurately testing whether the multi-tenant system has string library problems, reducing the risk of string library, thereby ensuring the normal operation of the multi-tenant system and avoiding the leakage of tenant data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and specifically to a testing method and apparatus for automatically detecting cross-database errors in multi-tenant systems. Background Technology

[0002] SaaS (Software-as-a-Service) is a software delivery model based on cloud computing technology. It provides a way to deliver applications and services to customers via the Internet. Compared to traditional on-premises software, SaaS is more flexible, scalable, convenient, and easy to manage, and is therefore increasingly popular with businesses and users.

[0003] Deploying ERP (Enterprise Resource Planning) software on SaaS, i.e., deploying a data and configuration isolated software system on the public cloud, to achieve a multi-tenant software system and ensure system stability and data security, is of great significance for protecting tenant data, providing stable and reliable services, complying with laws, regulations and compliance requirements, preventing data breaches and information security incidents, and enhancing competitiveness and reputation.

[0004] In related technologies, in multi-tenant systems, tenants can query or see each other's data. Once this happens, tenant data may be exploited, causing huge losses to enterprises and users, while reducing the competitiveness and reputation of software vendors. Therefore, testing for the database cross-referencing problem in multi-tenant systems is particularly important. Summary of the Invention

[0005] In view of this, the present invention provides an automated testing method and apparatus for detecting cross-database issues in multi-tenant systems, in order to solve the technical problem of cross-database issues that may occur in multi-tenant systems.

[0006] In a first aspect, the present invention provides an automated testing method for detecting database cross-referencing in a multi-tenant system. The method includes: obtaining a database cross-referencing test request, the database cross-referencing test request including identification information and database routing information; generating a test script based on the identification information; filtering the execution nodes of the database cross-referencing test request based on the identification information; sending the test script and database routing information to the execution nodes; and determining the database cross-referencing test result.

[0007] In conjunction with the first aspect, in one possible implementation of the first aspect, the identification information includes: operation information; and generating a test script based on the identification information includes: identifying the process information corresponding to the operation information based on the operation information and the preset functional operation process; and generating a test script based on the process information and the correspondence between the process information and the script execution data.

[0008] In conjunction with the first aspect, in one possible implementation of the first aspect, the identification information includes: browser information and system configuration information. Based on the identification information, the execution nodes of the serial library test request are filtered, including: determining the execution type of the serial library test request based on the browser information and system configuration information; and filtering the execution nodes of the serial library test request based on the execution type.

[0009] In conjunction with the first aspect, in one possible implementation of the first aspect, sending the test script and database routing information to the execution node and determining the database cross-test result includes: constructing a database based on the database routing information; executing the test script and determining at least one script execution data; and determining the database cross-test result based on the database and the script execution data.

[0010] In conjunction with the first aspect, in one possible implementation of the first aspect, the database includes: a tenant database and a master database. Based on database routing information, the database is constructed by: determining the routing relationship between each tenant database and the master database based on the database routing information; and constructing at least one tenant database and master database based on the routing relationship.

[0011] In conjunction with the first aspect, in one possible implementation of the first aspect, the database cross-database test result is determined based on the database and script execution data, including: traversing at least one tenant database and the master database, determining the storage location of the script execution data based on the script execution data, and determining the database cross-database test result based on the storage location and the correspondence between the script execution data and at least one tenant database.

[0012] In conjunction with the first aspect, one possible implementation of the first aspect includes the following method: collecting user operation information, browser information, system configuration information, and database routing information in the browser; and generating a database test request based on the operation information, browser information, system configuration information, and database routing information.

[0013] Secondly, the present invention provides an automated testing device for detecting database cross-referencing in a multi-tenant system. The device includes: an acquisition module for acquiring a database cross-referencing test request, the database cross-referencing test request including identification information and database routing information; a generation module for generating a test script based on the identification information; a filtering module for filtering the execution nodes of the database cross-referencing test request based on the identification information; and a result determination module for sending the test script and database routing information to the execution nodes to determine the database cross-referencing test result.

[0014] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the automated testing method for detecting cross-linked libraries in a multi-tenant system as described in the first aspect or any corresponding embodiment.

[0015] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the automated testing method for detecting cross-linked libraries in a multi-tenant system as described in the first aspect or any corresponding embodiment.

[0016] The technical solution of this invention has the following advantages:

[0017] This invention provides an automated testing method and apparatus for detecting database cross-access issues in multi-tenant systems. The method determines the cross-access test result by acquiring cross-access test requests, generating test scripts, and identifying the execution nodes of the test requests. In this process, the test script is generated using identification information in the cross-access test request to simulate various user operations. The execution nodes of the cross-access test request are filtered using the identification information to meet different application scenarios. This allows for the simulation of user database access behavior under different conditions in a test environment identical to the actual user application scenario. The test script automates the testing of cross-access issues, enabling accurate testing for cross-access problems in multi-tenant systems, reducing the risk of cross-access, ensuring the normal operation of multi-tenant systems, and preventing the leakage of tenant data. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is an application diagram of a test system for automatically detecting cross-database errors in a multi-tenant system, provided by an embodiment of the present invention.

[0020] Figure 2 This is a flowchart illustrating a test method for automatically detecting cross-database issues in a multi-tenant system according to an embodiment of the present invention.

[0021] Figure 3 This is a flowchart illustrating another automated method for detecting cross-database issues in a multi-tenant system, provided by an embodiment of the present invention.

[0022] Figure 4 This is a structural block diagram of a test device for automatically detecting cross-database errors in a multi-tenant system, provided by an embodiment of the present invention.

[0023] Figure 5 This is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] This embodiment provides an automated testing system for detecting database cross-access in a multi-tenant system. The system includes: a server 101, worker nodes 102, 103, and 104. Upon receiving a cross-access test request, the server 101 filters worker nodes based on the information carried in the request, and selects worker nodes whose test environment matches the environment in which the cross-access test request is implemented as execution nodes. For example, if worker node 102 is selected as the execution node, it executes a test script to simulate user actions, thereby simulating user database access behavior under different conditions. It should be understood that the number of worker nodes includes, but is not limited to, [specific number of nodes]. Figure 1 As shown, the configuration can be tailored to specific operating conditions. The database includes a master database and tenant databases, with each tenant database corresponding to a specific tenant. It records the corresponding tenant's database access behavior, i.e., the relevant functional operations of that tenant. The master database is responsible for routing and distribution, i.e., setting the information paths for each isolated tenant database. The master and tenant databases can be deployed centrally on server 101, worker nodes 102, 103, and 104, or in a distributed manner. There are no specific restrictions, as long as connectivity between the master and tenant databases is guaranteed.

[0026] This embodiment provides an automated testing method for detecting cross-library errors in multi-tenant systems, such as... Figure 2 As shown, it includes the following steps:

[0027] S201. The server responds to the database test request, generates a test script, and selects execution nodes.

[0028] Specifically, after receiving a database cross-test request, the server generates a test script based on the actions of the requester and selects execution nodes based on the execution environment of the requester.

[0029] S202, The server sends the first test script to the first execution node.

[0030] S203, The server sends the second test script to the second execution node.

[0031] Specifically, the server sends the test script to the first execution node and the second execution node respectively, based on the operation behavior and execution environment of the party initiating the database query test request. It should be understood that the first execution node and the second execution node can be the same or different worker nodes, and the selection is based on the execution environment of the party initiating the database query test request.

[0032] S204, The first execution node executes the first test script.

[0033] S205, The second execution node executes the second test script.

[0034] Specifically, the first execution node and the second execution node execute the first test script and the second test script respectively, thereby generating corresponding script execution data, that is, generating database access behavior for the corresponding tenant database in the database.

[0035] S206. The first execution node determines the first script execution data.

[0036] S207, The second execution node determines the second script execution data.

[0037] Specifically, the first script execution data and the second script execution data may have the same or different operation processes depending on the operation behavior of the initiator of the database test request. For example, both may be writing account information. However, both the first script execution data and the second script execution data have data identifiers to distinguish them.

[0038] S208. Traverse the tenant database and the master database to determine the results of the database cross-test.

[0039] Specifically, traversing the tenant database and the primary database to determine the cross-database test result means determining whether the first script execution data of the first execution node exists only in the tenant database corresponding to the first execution node, and whether the second script execution data of the second execution node exists only in the tenant database corresponding to the second execution node. If so, cross-database execution is considered not to have occurred; otherwise, cross-database execution is considered to have occurred.

[0040] S209. Send the test results to the server.

[0041] Specifically, test results can be sent to the server by generating a test report, which can then be sent to the relevant maintenance personnel via email or other means.

[0042] According to an embodiment of the present invention, a test method embodiment for automatically detecting cross-references in a multi-tenant system is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0043] This embodiment provides an automated testing method for detecting cross-library errors in multi-tenant systems, such as... Figure 3 As shown, it includes the following steps:

[0044] S301, Obtain the serial library test request.

[0045] Specifically, database cross-database test requests can be initiated proactively by maintenance personnel; or proactively initiated after installing software patches on a database consisting of a primary database and tenant databases; or initiated at fixed intervals through scheduled inspections. The database cross-database test request includes: identification information and database routing information. Database routing information refers to the path information between the primary database and the tenant database corresponding to the initiator of the cross-database test request.

[0046] In one alternative implementation, the method further includes, before obtaining the string library test request:

[0047] Collect user action information, browser information, system configuration information, and database routing information.

[0048] Generate a database test request based on operation information, browser information, system configuration information, and database routing information.

[0049] Specifically, collecting user operation information in the browser is to record user operation behavior; collecting browser information and system configuration information is to determine the user's implementation environment; and collecting database routing information is to determine the database information corresponding to the user. In this way, by determining the user's operation behavior, implementation environment, and database information, a data foundation is provided for subsequent simulation of the user's database access behavior under different conditions.

[0050] S302. Generate test scripts based on identification information.

[0051] Specifically, generating a test script based on identification information refers to identifying process information based on the operational information contained in the identification information, thereby generating a test script. The test script can be written in Python. This process is equivalent to determining the script execution data corresponding to the operational information through the generated test script, that is, determining the database access behavior caused by the user's operation.

[0052] S303. Based on the identification information, filter the execution nodes of the serial library test request.

[0053] Specifically, selecting the execution node for the database query test request based on the identification information refers to determining the execution node based on the browser information and system configuration information contained in the identification information. This process is equivalent to selecting the test environment, ensuring that the test environment of the execution node is the same as the user's actual application scenario.

[0054] S304. Send the test script and database routing information to the execution node and confirm the database cross-test results.

[0055] Specifically, sending test scripts and database routing information to the execution node to determine the results of the database cross-referencing test means simulating user behavior in the corresponding application scenario at the execution node by sending the test scripts and database routing information to the execution node, thereby determining whether there is a risk of database cross-referencing.

[0056] This embodiment provides an automated testing method for detecting database cross-access issues in multi-tenant systems. The method determines the test results by acquiring cross-access test requests, generating test scripts, and identifying the execution nodes of these requests. In this process, the test script is generated using identification information from the cross-access test request to simulate various user operations. The execution nodes of the cross-access test request are filtered using the identification information to meet different application scenarios. This allows for the simulation of user database access behavior under different conditions in a test environment identical to the actual user application scenario. The test script automates the testing of cross-access issues, enabling accurate testing for cross-access problems in multi-tenant systems, reducing the risk of cross-access, ensuring the normal operation of multi-tenant systems, and preventing the leakage of tenant data.

[0057] In one optional implementation, the identification information includes: operation information; based on the identification information, a test script is generated, including:

[0058] (1) Based on the operation information and the preset functional operation process, identify the process information corresponding to the operation information.

[0059] Specifically, operation information refers to data that can be used to identify user operation behaviors, while process information refers to the execution actions corresponding to operation information. For example, taking the account information creation function as an example, writing account information corresponds to process information, while writing corresponds to operation information. Among them, the preset functional operation process refers to the implementation of commonly used and critical full-featured functional operation processes as automated script tasks, thereby identifying process information based on operation information.

[0060] (2) Based on the process information, test scripts are generated by matching the process information with the script execution data.

[0061] Specifically, script execution data refers to database access behavior caused by user operations. Taking the writing of account information as an example, when tenant A1 writes account information, data B1 should be added to the tenant database C1 corresponding to A1. Here, the added data B1 corresponds to script execution data, and the correspondence between tenant A1 and the added data B1 corresponds to the correspondence between process information and script execution data.

[0062] By implementing this example, a test script is generated using the identification information in the database serialization test request, thereby simulating various user operations. In this process, the process information is identified by comparing the operation information with the preset functional operation flow, and the test script is generated by the correspondence between the process information and the script execution data. This provides a data foundation for sending the test script to the execution machine for execution and determining the database serialization test results.

[0063] In one optional implementation, the identification information includes: browser information and system configuration information. Based on the identification information, the execution nodes for the string library test request are filtered, including:

[0064] (1) Determine the execution type of the serial library test request based on browser information and system configuration information.

[0065] Specifically, determining the execution type of a serial library test request based on browser information and system configuration information means determining the type of execution environment required for the corresponding serial library test request based on browser information and system configuration information.

[0066] (2) Filter the execution nodes of the string library test request based on the execution type.

[0067] Specifically, based on the execution type, selecting the execution node for the serial library test request means determining the working node with the same execution environment type as the corresponding serial library test request as the execution node, thereby ensuring that the test environment is the same as the user's actual application scenario.

[0068] By implementing this embodiment, the execution nodes of the serial library test request are filtered by the identification information. In this process, the execution type of the serial library test request is determined, and the execution nodes of the serial library test request are filtered by the execution type. This ensures that different application scenarios are the same as the user's actual application scenario, thereby providing a data foundation for sending the test script to the execution machine for execution and determining the serial library test results.

[0069] In one optional implementation, the test script and database routing information are sent to the execution node, and the database cross-test result is determined, including:

[0070] (1) Construct a database based on database routing information.

[0071] In one alternative implementation, the database includes: a tenant database and a master database. The database is constructed based on database routing information, including:

[0072] Based on the database routing information, the routing relationship between each tenant database and the master database is determined.

[0073] Specifically, database routing information refers to the path information between the master database and the tenant database in the database corresponding to the initiator of the database serialization test request. Based on the database routing information, determining the routing relationship between each tenant database and the master database means determining the database information of the initiator of the database serialization test request, namely the number of tenant databases, the corresponding relationship, and the path information between the master database and each tenant database.

[0074] Based on routing relationships, construct at least one tenant database and a master database.

[0075] Specifically, constructing at least one tenant database and master database based on routing relationships means considering the number of tenant databases, their correspondence, and the path information between the master database and each tenant database in the database where the database serial database test request initiator is located. It should be understood that the database serial database test request initiator has one and only one corresponding tenant database.

[0076] (2) Execute the test script and determine at least one script execution data.

[0077] Specifically, script execution data refers to database access behavior caused by user operations. Taking the writing of account information as an example, when tenant A1 performs the process of writing account information, data B1 should be added to the tenant database C1 corresponding to A1. Among them, the added data B1 corresponds to script execution data.

[0078] Specifically, each script execution data has a corresponding data identifier, and each data identifier can be used to identify the corresponding script execution data.

[0079] (3) Determine the results of the database test based on the database and script execution data.

[0080] In one optional implementation, the database and script execution data are used to determine the results of the string test, including:

[0081] Iterate through at least one tenant database and the master database, and determine the storage location of the script execution data based on the script execution data.

[0082] Specifically, traversing at least one tenant database and the master database, and determining the storage location of the script execution data based on the script execution data means determining the storage location of the script execution data in the database through the data identifier of the script execution data, that is, in which tenant database or master database it is stored.

[0083] Based on the storage location, the database cross-database test results are determined by mapping the data executed by the script to at least one tenant database.

[0084] Specifically, based on the storage location, the database cross-database test result is determined by the correspondence between the script execution data and at least one tenant database. This means determining whether the script execution data exists only in the corresponding tenant database. If so, it is considered that no database cross-database ...

[0085] Taking the creation of account information as an example, tenant A1 corresponds to tenant database C1, and the corresponding script execution data is "new B1". Tenant A2 corresponds to tenant database C2, and the corresponding script execution data is "new B2". Tenant databases C1 and C2 belong to the same master database C. If data B1 and B2 are not found in the master database, it means that there is no cross-database transfer between tenant databases. If B1 is found in database C2, it means that cross-database transfer between tenant databases has occurred, and so on.

[0086] By implementing this embodiment, test scripts and database routing information are sent to execution nodes to meet different application scenarios through different working nodes. This allows for the simulation of user database access behavior under different conditions in a test environment identical to the user's actual application scenario. The test scripts also automate the testing of cross-database issues, thereby accurately testing whether cross-database problems exist in multi-tenant systems, reducing the risk of cross-database issues, ensuring the normal operation of multi-tenant systems, and preventing the leakage of tenant data.

[0087] This embodiment also provides a test apparatus for automatically detecting cross-references in multi-tenant systems. This apparatus is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0088] This embodiment provides a test device for automatically detecting cross-database issues in multi-tenant systems, such as... Figure 4 As shown, it includes:

[0089] The acquisition module 401 is used to acquire the database serialization test request, which includes identification information and database routing information. For details, please refer to the description of step S301 in the above embodiments, which will not be repeated here.

[0090] The generation module 402 is used to generate test scripts based on the identification information. For details, please refer to the description of step S302 in the above embodiments, which will not be repeated here.

[0091] The filtering module 403 is used to filter the execution nodes of the string library test request based on the identification information. For details, please refer to the description of step S303 in the above embodiments, which will not be repeated here.

[0092] The result determination module 404 is used to send the test script and database routing information to the execution node to determine the database cross-test result. For details, please refer to the description of step S304 in the above embodiments, which will not be repeated here.

[0093] The automated testing device for detecting multi-tenant system serial libraries in this embodiment is presented in the form of functional units. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0094] This invention also provides a computer device having the above-described features. Figure 4 The test apparatus shown is an automated device for detecting cross-database errors in multi-tenant systems.

[0095] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the computer device includes one or more processors 501, memory 502, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 501 as an example.

[0096] Processor 501 may be a central processing unit, a network processor, or a combination thereof. Processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0097] The memory 502 stores instructions executable by at least one processor 501 to cause the at least one processor 501 to perform the method shown in the above embodiments.

[0098] Memory 502 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, memory 502 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 502 may optionally include memory remotely located relative to processor 501, and this remote memory may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0099] Memory 502 may include volatile memory, such as random access memory; memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; memory 502 may also include combinations of the above types of memory. The computer device also includes a communication interface 503 for communicating with other devices or communication networks.

[0100] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0101] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A test method for automatically detecting cross-library errors in a multi-tenant system, characterized in that, The method includes: Obtain a database routing test request, which includes identification information and database routing information; the identification information includes: operation information, browser information, and system configuration information. Based on the identification information, a test script is generated; Based on the identification information, the execution nodes of the string library test requests are selected; Send the test script and the database routing information to the execution node to determine the database cross-test result; The step of generating a test script based on the identification information includes: Based on the operation information and the preset functional operation process, identify the process information corresponding to the operation information; Based on the process information, a test script is generated by mapping the process information to the script execution data. The step of filtering the execution nodes for the string library test request based on the identification information includes: Based on the browser information and the system configuration information, determine the execution type of the serial library test request; Based on the execution type, the execution nodes for the string library test request are filtered.

2. The method according to claim 1, characterized in that, Sending the test script and the database routing information to the execution node, and determining the database cross-test result, includes: Based on the database routing information, a database is constructed; Execute the test script to determine at least one script execution data; Based on the database and the script execution data, the results of the string library test are determined.

3. The method according to claim 2, characterized in that, The database includes: The tenant database and the primary database, wherein the database is constructed based on the database routing information, includes: Based on the database routing information, the routing relationship between each tenant database and the master database is determined; Based on the routing relationship, at least one tenant database and the master database are constructed.

4. The method according to claim 3, characterized in that, The process of determining the database test results based on the database and the script execution data includes: Traverse at least one of the tenant databases and the master database, and determine the storage location of the script execution data based on the script execution data; Based on the storage location, the database cross-database test result is determined by the correspondence between the script execution data and at least one of the tenant databases.

5. The method according to any one of claims 1 to 4, characterized in that, Before obtaining the string library test request, the method further includes: Collect user action information, browser information, system configuration information, and database routing information in the browser; A database test request is generated based on the operation information, browser information, system configuration information, and database routing information.

6. A test apparatus for automatically detecting cross-database errors in a multi-tenant system, characterized in that, The device includes: The acquisition module is used to acquire database test requests, which include identification information and database routing information; the identification information includes: operation information, browser information and system configuration information. A generation module is used to generate a test script based on the identification information; the generation of the test script based on the identification information includes: identifying process information corresponding to the operation information based on the operation information and a preset functional operation process; and generating a test script based on the process information and the correspondence between the process information and script execution data. A filtering module is used to filter the execution nodes of the database test request based on the identification information; the filtering of the execution nodes of the database test request based on the identification information includes: determining the execution type of the database test request based on the browser information and the system configuration information; and filtering the execution nodes of the database test request based on the execution type. The result determination module is used to send the test script and the database routing information to the execution node to determine the database cross-test result.

7. A computer device, characterized in that, include: A memory and a processor are interconnected, the memory stores computer instructions, and the processor executes the computer instructions to perform the automated testing method for detecting cross-libraries in a multi-tenant system as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the automated test for detecting cross-libraries in a multi-tenant system as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Multi-tenant-oriented SaaS platform test method and device, equipment and medium

    CN116680203A

  • Multi-tenant data processing method and device based on distributed deployment and medium

    CN117112266A