System performance test method, device, equipment, medium and product
By obtaining target access requests in an online environment and using test identifiers to distinguish database access from real users and testing users, the problem of being unable to accurately evaluate online system performance in the prior art is solved, and a more accurate system performance evaluation is achieved.
Patent Information
- Application Number
- CN202411731493.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-21
AI Technical Summary
The prior art is difficult to accurately evaluate system performance in online environments, and is limited by the isolation and independence of offline environments and online environments.
By obtaining the target access request, the database corresponding to the access request of the real user and the test user is determined using the system to be tested and the test identifier, the performance test system to be tested is performed based on these databases to obtain the test log.
It realizes performance testing directly on the online system, improves the accuracy of system performance evaluation, and avoids the problem of inaccurate evaluation caused by online/offline environment differences.
Smart Images

Figure CN119493719A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of testing technology, and in particular, to a system performance testing method, device, equipment, medium and product. Background Art
[0002] After the application is developed and before it goes online, it is usually necessary to test it in an offline environment. The offline environment is usually isolated from the online environment in terms of network equipment, application servers, databases, and other hardware and software environments. In order to verify its ability to operate smoothly and efficiently under high load, high concurrent access, and long-term operation, it is usually necessary to perform performance testing on it. Performance testing usually uses stress testing scripts to simulate real user behavior to initiate requests to the application. Depending on the purpose of the test, high-concurrency and long-term requests can be used to obtain the corresponding test data.
[0003] Due to the strict separation of online and offline environments, test requests can only be sent to the offline environment, and the test results can only reflect the various indicators of the offline system. If the test results of the offline system are to be used to evaluate the online system, it is usually only possible to simulate the software and hardware environment as much as possible, so as to approximately evaluate the performance indicators of the online system.
[0004] The biggest feature of traditional testing methods is that they strictly follow the process of offline testing-online release, that is, all tests are conducted in the offline environment. For functional testing, it is only necessary to ensure that the baseline version of the tested application is consistent with the online version, which can basically ensure that the test results of the offline environment can be stably reproduced in the online environment; but for performance testing, performance indicators are not only affected by the program code itself, but also by many factors such as hardware configuration, operating system, database and network environment. Therefore, due to the isolation and independence of the offline environment and the online environment, performance testing in the offline environment cannot accurately evaluate the performance of the online system. Summary of the invention
[0005] The embodiments of the present disclosure provide a system performance testing method, apparatus, device, medium and product, which enable performance testing to be performed directly on an online system, thereby improving the accuracy of system performance evaluation.
[0006] In a first aspect, a system performance testing method is provided, the method comprising:
[0007] Obtain a target access request; the target access request includes a first access request of a real user and a second access request of a test user, wherein the first access request and the second access request correspond to different test identifiers respectively;
[0008] Determine the first database corresponding to the first access request and the second database corresponding to the second access request by using the system to be tested and the test identifier; the system to be tested is a system in the actual business system that belongs to the test scope;
[0009] A performance test is performed on the system to be tested based on the first database and the second database respectively to obtain a corresponding test log.
[0010] In a second aspect, a system performance testing device is provided, comprising:
[0011] A request acquisition module, used to acquire a target access request; the target access request includes a first access request of a real user and a second access request of a test user, the first access request and the second access request respectively corresponding to different test identifiers;
[0012] A database determination module, used to determine a first database corresponding to the first access request and a second database corresponding to the second access request by using a system to be tested and a test identifier; the system to be tested is a system in an actual business system that belongs to a test scope;
[0013] The test module is used to perform performance test on the system to be tested based on the first database and the second database respectively, and obtain corresponding test logs.
[0014] In a third aspect, an electronic device is provided, including:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the system performance testing method as described in the first aspect above.
[0018] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the system performance testing method as described in the first aspect is implemented.
[0019] In a fifth aspect, a computer program product is provided, the computer program product comprising a computer program, and the computer program, when executed by a processor, implements the system performance testing method as described in the first aspect above.
[0020] The disclosed embodiments disclose a system performance testing method, apparatus, device, medium and product, including: obtaining a target access request; the target access request includes a first access request of a real user and a second access request of a test user, the first access request and the second access request respectively corresponding to different test identifiers; using the system to be tested and the test identifier to determine the first database corresponding to the first access request, and the second database corresponding to the second access request; the system to be tested is a system in the actual business system that belongs to the test scope; the system to be tested is subjected to performance testing based on the first database and the second database respectively, and corresponding test logs are obtained. This technical solution realizes performance testing directly in an online environment by distinguishing real users and test users through test identifiers, and transmitting access requests of real users and test users to the system to be tested, thereby avoiding the problem of being unable to accurately evaluate online system performance due to differences in online / offline environments, and improving the accuracy of system performance evaluation.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the embodiments of the present disclosure. Other features of the embodiments of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 is a flow chart of a system performance testing method provided in Embodiment 1 of the present disclosure;
[0024] Figure 2 This is the construction process of the first database and the second database provided in the first embodiment of the present disclosure;
[0025] Figure 3 It is a schematic diagram of the execution process of a system performance testing method provided in the first embodiment of the present disclosure;
[0026] Figure 4 is a schematic diagram of a system performance test process provided by Embodiment 1 of the present disclosure;
[0027] Figure 5 is an overall flow chart of a system performance test process provided by the first embodiment of the present disclosure;
[0028] Figure 6is a structural diagram of a system performance testing device provided in Embodiment 2 of the present disclosure;
[0029] Figure 7 It is a structural diagram of an electronic device provided in Embodiment 3 of the present disclosure. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solutions of the embodiments of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the embodiments of the present disclosure.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure 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 interchangeable where appropriate, so that the embodiments of the present disclosure 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.
[0032] Embodiment 1
[0033] Figure 1 This is a flowchart of a system performance test method provided in the first embodiment of the present disclosure. This embodiment is applicable to the case of performing performance test on the system. The method can be executed by a system performance test device. The system performance test device can be implemented in the form of hardware and / or software. The system performance test device can be configured in an electronic device, and the electronic device includes but is not limited to a computer, a terminal, a server and other devices with data processing capabilities. Figure 1 As shown, the method includes:
[0034] S110, obtaining a target access request; the target access request includes a first access request of a real user and a second access request of a test user, the first access request and the second access request respectively corresponding to different test identifiers.
[0035] In this embodiment, a target access request may be obtained, and the target access request may include a first access request of a real user and a second access request of a test user. The first access request and the second access request correspond to different test identifiers, respectively. Exemplarily, the test identifier may be a redundant check identifier, the redundant check identifier of the real user may be a number, and the redundant check identifier of the test user may be the letter "T".
[0036] S120, using the system to be tested and the test identifier, determining a first database corresponding to the first access request and a second database corresponding to the second access request; the system to be tested is a system in the actual business system that is within the test scope.
[0037] Specifically, the system to be tested may be a system in the actual business system that belongs to the test scope, and the actual business system may be a business system in the actual operation process. After the target access request is determined, the first database corresponding to the first access request and the second database corresponding to the second access request may be determined according to the system to be tested and the test identifier. It should be noted that the first access request of the real user and the second access request of the test user may be transmitted to the same system to be tested at the same time, and the first access request and the second access request carry the test identification information so as to use the system to be tested to distinguish between the real user and the test user. Among them, the system to be tested needs to have the ability to identify the test identifier and make special processing for the second access request, such as accessing the test database, writing the test log, mocking the response of the non-test system to avoid the test request from flowing into the non-test business system, etc. In order to prevent the risk of contaminating the real user data when performing performance testing on the online system to be tested, it is necessary to ensure the access requests between the real user and the test user, that is, the real user's request cannot be sent to the test user, and the test user's request cannot be sent to the real user. If cross requests are found, the system to be tested should intercept such requests,
[0038] The first database may contain real user data generated by real users during actual operation, such as the first database may be a production database, and the second database may contain test data of test users, such as the second database may be a stress testing database. Exemplarily, the production database accessible to real users may be determined using the system to be tested and the test identifier, and at the same time, the stress testing database accessible to test users may also be determined using the system to be tested and the test identifier. The meaning of stress testing in this technical solution is equivalent to performance testing.
[0039] S130 , performing performance testing on the system to be tested based on the first database and the second database respectively, and obtaining corresponding test logs.
[0040] In this embodiment, performance testing can be a method for evaluating the performance of an application. It usually simulates a large number of user accesses, continuously performs load testing on the system, etc., to discover the performance bottlenecks and capacity limitations of the system, detect the stability, security and reliability of the system, and ensure that the application can maintain stable and efficient operation under high load, high concurrent access and long-term operation.
[0041] In this embodiment, after the first database and the second database are determined, the performance test of the system to be tested can be performed based on the first database and the second database to obtain the corresponding test log. The test log can include a first test log and a second test log, the first test log is a log corresponding to the first database; the second test log is a log corresponding to the second database, and exemplarily, the first test log can be a real operation log corresponding to a real user. The second operation log can be a log generated by the test process corresponding to the test user.
[0042] It should be noted that, since the first database corresponds to real user data generated by real users in the actual operation process, the first test log obtained based on the first database can be a log obtained by a real user using the system to be tested to perform operations corresponding to the system to be tested; the second test log obtained based on the second database can be a log obtained by a test user using the system to be tested to test the functions of the system to be tested. Performance testing of the system to be tested based on the first database can also be understood as real users performing operations corresponding to the system to be tested on the system to be tested.
[0043] It should be noted that in order to avoid a large number of test logs entering the production log system, occupying disk space, and affecting production operations and maintenance, the logs generated by performance testing in the online environment need to be recorded separately, and the test logs generated by the test can be deleted after each test. The online environment can also be called the production environment, which usually refers to the physical or virtual environment used for the operation of the production system. The production environment usually includes servers, network equipment, databases, applications, and other related hardware and software. The offline environment can also be called the test environment, which usually refers to the virtual or physical environment used to test, debug, and verify systems or applications. The test environment usually includes test servers, network equipment, databases, applications, and other related hardware and software, and is usually completely isolated from the online environment.
[0044] This embodiment provides a system performance testing method, including: obtaining a target access request; the target access request includes a first access request from a real user and a second access request from a test user, the first access request and the second access request respectively corresponding to different test identifiers; using a system to be tested and a test identifier to determine a first database corresponding to the first access request, and a second database corresponding to the second access request; the system to be tested is a system in an actual business system that belongs to a test scope; performance testing is performed on the system to be tested based on the first database and the second database respectively, and corresponding test logs are obtained, thereby realizing performance testing directly in an online environment, avoiding the problem of being unable to accurately evaluate online system performance due to differences in online / offline environments, and improving the accuracy of system performance evaluation.
[0045] As an optional implementation of this embodiment, the system performance testing method provided in this embodiment, after the performance test of the system to be tested is performed based on the database to obtain the test log, the method further includes:
[0046] For each of the test logs, the test log is stored in a corresponding preset location according to a test identifier corresponding to the test log.
[0047] It can be known that the test log can be stored in a corresponding preset location according to the test identifier of the test log. The preset location can be a preset storage location. For example, the preset location can include a first preset location and a second preset location. The first test log can be stored in the first preset location, and the second test log can be stored in the second preset location.
[0048] As an optional implementation of this embodiment, obtaining a target access request includes:
[0049] The at least one external access request obtained is transmitted to a unified application gateway, so as to determine the target access request through the unified application gateway.
[0050] Specifically, at least one external access request obtained may be transmitted to a unified application gateway, and after receiving the external access request, the unified application gateway may determine the target access request based on the test identifier. The unified application gateway may be a common design pattern in a microservice architecture, which serves as a single entry point for all external requests, is responsible for processing incoming traffic, and routes it to appropriate backend services.
[0051] Optionally, determining the target access request by the unified application gateway includes:
[0052] 1) When the external access request does not include the test identifier, the unified application gateway determines the external access request that does not include the test identifier as the target access request, and transmits the target access request to the system to be tested.
[0053] Specifically, the unified application gateway may be used to determine whether the external access request contains a test identifier. If the external access request does not contain a test identifier, the external access request that does not contain a test identifier is determined as a target access request, and the target access request is transmitted to the system to be tested.
[0054] 2) When the external access request includes the test identifier and the test switch is turned on, the unified application gateway determines the external access request including the test identifier as the target access request, and transmits the target access request to the system to be tested.
[0055] Specifically, a unified application gateway can be used to determine whether an external access request contains a test identifier, and the unified application gateway can be used to determine whether the test switch is turned on; if the test switch is turned on, the external access request containing the test identifier is determined as a target access request, and the target access request is transmitted to the system to be tested; if the test switch is turned off, the unified application gateway is used to reject the external access request containing the test identifier.
[0056] It should be noted that the unified application gateway can decide whether to release or reject the performance test request based on whether the test switch is turned on. The switch should be turned off immediately after the performance test is completed; during the performance test, the system can be monitored. Once the system alarm threshold is reached or the real user business is affected, the switch should be turned off immediately and the performance test should be terminated.
[0057] As an optional implementation of this embodiment, the system performance testing method provided in this embodiment further includes:
[0058] Determine a first external system corresponding to the first access request and a second external access system corresponding to the second access request by using the system to be tested and the test identifier; the first external system and the second external system are systems that are not covered by the system to be tested;
[0059] The first external access system is used to generate an operation instruction based on the first access request, and send the operation instruction to the system to be tested, so that the system to be tested performs a corresponding operation;
[0060] The second external access system is used to generate a test instruction based on the second access request, and send the test instruction to the system to be tested, so that the system to be tested completes the performance test.
[0061] It needs to be explained that before the performance test of the system to be tested is performed, the test purpose and test scope need to be defined, that is, the first external system and the second external system need to be determined, wherein the external system can be understood as the system covered by the system to be tested.
[0062] The system to be tested can be used to determine the first external system corresponding to the first access request and the second external access system corresponding to the second access request according to the test identifier, wherein the first external access system is used to generate an operation instruction based on the first access request, and send the operation instruction to the system to be tested so that the system to be tested performs the corresponding operation; the second external access system is used to generate a test instruction based on the second access request, and send the test instruction to the system to be tested so that the system to be tested completes the performance test
[0063] Exemplarily, the second external system can be a virtual system, such as simulating its return in the form of Mock. Among them, Mock can be a programming concept for simulating the behavior of an object, which is usually used for unit testing, integration testing and end-to-end testing. The main purpose of Mock is to test the behavior of an application without actually calling the simulated object. Mock objects can simulate the behavior of simulated objects, such as returning specific values, throwing specific exceptions, etc. For example: real users of online systems need to request operators to send SMS verification codes in many scenarios, but during performance testing, operators cannot be requested to send SMS. At this time, you can choose scenarios where Mock requires SMS verification codes, such as configuring performance test default verification codes, etc. Among them, online systems can also be called online systems, network systems or electronic systems, etc., which refer to systems that provide users with information, services or functions through the Internet or other network connections. The online system in this technical solution refers to a system that provides services to real users, that is, the system to be tested. Relatively speaking, a system that is isolated from the online system and is specifically used by development testers is called an offline system.
[0064] As an optional implementation of this embodiment, the system performance testing method provided in this embodiment further includes:
[0065] 1) Determine historical construction information, where the historical construction information includes real user data and test user data.
[0066] It should be noted that the historical construction information can be data used to construct the first database and the second database, and the historical construction information includes real user data and test user data. It can be understood that before the test starts, test data (the first database and the second database) can be constructed in the system to be tested. Constructing test data means preparing data that meets the test objectives and scope in advance before the test, so that these data can be used during the test to verify the system function, performance, security, etc. It should be noted that before constructing the test data, a test script can be inserted into the system to be tested so that the test script transmits the historical construction information to the system to be tested. Among them, a script can be an automated tool written in a computer programming language for performing a series of specific operations or tasks, which can process large amounts of data, perform repetitive tasks, handle complex operations, etc.
[0067] Exemplarily, the real user data may include a mobile phone number and a generated unique request serial number. The unique request serial number may be a 32-digit unique serial number, which may include a date, a 23-digit random code, and an environment identification code. The environment identification code may be 1 or 2, where "1" may represent a real user request and "2" may represent a test user's test request. In order to distinguish it from the real user's mobile phone number, the first three digits of the test user's number may be selected from the "999" segment to avoid conflicts between the test user's and the real user's number segments.
[0068] It can be known that the steps of building test data can be roughly divided into: designing test data, preparing test scripts, and executing test scripts. In order to make the test data simulate the real data as much as possible, the format and elements of the test data can be kept consistent with the real data; at the same time, for the security of real user information data, the real user data and test user data in the historical construction information can be desensitized and converted to avoid directly using real user data for testing.
[0069] 2) Based on the historical construction information, generating user identification information using the actual business system; the user identification information includes preset user information and a test identification;
[0070] Specifically, the actual business system may be pre-embedded with a writing script, and the writing script may transmit historical construction information to the actual business system, and the actual business system may generate user identification information based on the historical construction information; the user identification information includes preset user information and a test identification. The preset user information may include a date and a 23-digit random code, and the test identification may be a redundant check code, and the redundant check code of the test user may be "T".
[0071] 3) Constructing the first database and the second database based on the test identifier and the preset user information.
[0072] Continuing with the above description, based on the test identifier, the user identification information can be distinguished, and the data of the real user represented by the test identifier can be constructed into a first database, and the data of the test user represented by the test identifier can be constructed into a second database.
[0073] Figure 2 The construction process of the first database and the second database provided in this embodiment is as follows: Figure 2 As shown, in order to avoid the test data from polluting the real user data (production data), this solution needs to establish a database (test database) dedicated to performance testing in the online business system, and the test data and production data are strictly isolated. The construction process of the first database and the second database can mainly include three processes: test script preparation, test data generation and test database. The historical construction information (real data and test data) can be obtained, and the real data and test data can be distinguished by modifying the first three digits of the user's mobile phone number and the last environmental flag code of the unique request serial number; specifically, the historical construction information can be passed on to the online business system (actual business system) through the test script, and then the actual business system is used to generate test data (user identification information) to distinguish between real user requests and test requests, thereby generating real user identification (Identification, ID) and test user ID respectively; finally, the generated real user ID and test user ID are respectively placed in the production database (first database) and the test database (second database), and the first database and the second database are successfully constructed in the system to be tested under the premise of ensuring the isolation of production / test data.
[0074] Figure 3 A schematic diagram of the execution process of a system performance testing method provided in this embodiment is shown in FIG. Figure 3 As shown, after starting the performance test, turn on the test switch and use the test script to pre-embed the test data (first database and second database). After the data is pre-embedded, the formal performance test can be carried out. During the test, if an online alarm occurs or affects the transactions of real online users, the test switch should be turned off immediately and the performance test should be stopped. The test should be restarted after optimizing the performance of the system to be tested. After the test is completed, the test switch should be turned off immediately, and then the test data should be collected, the test results should be analyzed, and a test report should be written. If the test results meet the expected test goals, the test is successfully completed. Otherwise, it is necessary to analyze the system bottleneck according to the specific test results, optimize the system performance, and re-test.
[0075] Figure 4 A schematic diagram of a system performance test process provided in this embodiment, such as Figure 4As shown, the real user and the test user transmit access requests (first access request and second access request) to the unified application gateway at the same time, and carry test identification information when issuing access requests to distinguish between real users and test users; the unified application gateway passes the test identification to the online system (system to be tested), and the system to be tested identifies the access request (first access request) of the real user and the access request (second access request) of the test user by identifying the test identification bit; when accessing the database, the online system accesses the first database (production database) and the second database (test database) according to the real user and the test user. This technical solution adds a specific test identification to the access request content to distinguish between real user requests and stress testing requests, and establishes a second database in the online system (system to be tested) to isolate test data and real transaction data; a performance test switch is set, and the control switch controls (system to be tested) to accept or reject performance test requests, so as to perform performance testing in an online environment under the premise of ensuring that real user transactions are not affected.
[0076] Figure 5 The overall flow chart of the system performance test process provided in this embodiment is as follows: Figure 5 As shown, the real user and the test user simultaneously send access requests (the first access request and the second access request) to the unified application gateway, and the unified application gateway passes the test identifier to the online business system (to be operated). The online business system (to be operated) diverts data and logs according to the test identifier and mocks the non-stress test business system (the second external system).
[0077] Compared with the traditional offline performance testing solution, the system performance testing solution provided by this technical solution has the following beneficial effects:
[0078] 1) Performance testing can be performed directly in the online environment, avoiding the problem of being unable to accurately evaluate online system performance due to differences in online / offline environments;
[0079] 2) By setting the test identifier, the online system can accurately identify the performance test request and store the test data and test log separately to avoid contamination of real user data;
[0080] 3) By setting the performance test switch, the online system can promptly reject performance test requests during non-testing periods and when the test triggers a system alarm, ensuring that the access of real online users to the system is not affected.
[0081] Embodiment 2
[0082] Figure 6 is a structural diagram of a system performance testing device provided in Embodiment 2 of the present disclosure; Figure 6As shown, the device includes: a request acquisition module 210, a database determination module 220, and a testing module 230.
[0083] The request acquisition module 210 is used to acquire a target access request; the target access request includes a first access request of a real user and a second access request of a test user, wherein the first access request and the second access request correspond to different test identifiers respectively;
[0084] The database determination module 220 is used to determine the first database corresponding to the first access request and the second database corresponding to the second access request by using the system to be tested and the test identifier; the system to be tested is a system in the actual business system that belongs to the test scope;
[0085] The testing module 230 is used to perform performance testing on the system to be tested based on the first database and the second database respectively, and obtain corresponding test logs.
[0086] The second embodiment of the present disclosure provides a system performance testing device, which realizes performance testing directly in an online environment, avoids the problem of being unable to accurately evaluate online system performance due to differences in online / offline environments, and improves the accuracy of system performance evaluation.
[0087] Furthermore, the device also includes:
[0088] The storage module is used to store each of the test logs to a corresponding preset location according to a test identifier corresponding to the test log.
[0089] Furthermore, the request acquisition module 210 is further used to:
[0090] The at least one external access request obtained is transmitted to a unified application gateway, so as to determine the target access request through the unified application gateway.
[0091] Further, determining the target access request by the unified application gateway includes:
[0092] When the external access request does not contain the test identifier, the unified application gateway determines the external access request that does not contain the test identifier as the target access request, and transmits the target access request to the system to be tested;
[0093] When the external access request includes the test identifier and the test switch is turned on, the unified application gateway determines the external access request including the test identifier as the target access request, and transmits the target access request to the system to be tested.
[0094] Furthermore, the device also includes:
[0095] an external system determination module, configured to determine a first external system corresponding to the first access request and a second external access system corresponding to the second access request by using the system to be tested and the test identifier; the first external system and the second external system are systems that are not covered by the system to be tested;
[0096] The first external access system is used to generate an operation instruction based on the first access request, and send the operation instruction to the system to be tested, so that the system to be tested performs a corresponding operation;
[0097] The second external access system is used to generate a test instruction based on the second access request, and send the test instruction to the system to be tested, so that the system to be tested completes the performance test.
[0098] Furthermore, the device also includes:
[0099] A historical construction information determination module, used to determine historical construction information, wherein the historical construction information includes real user data and test user data;
[0100] A user identification information determination module, configured to generate user identification information based on the historical construction information and using the actual business system; the user identification information includes preset user information and a test identification;
[0101] A database construction module is used to construct the first database and the second database based on the test identifier and the preset user information.
[0102] The system performance testing device provided in the embodiments of the present disclosure can execute the system performance testing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0103] Embodiment 3
[0104] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present disclosure described and / or claimed herein.
[0105] like Figure 7As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0106] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0107] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microprocessor, etc. The processor 11 executes the various methods and processes described above, such as a system performance test method.
[0108] In some embodiments, the system performance test method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the system performance test method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the system performance test method in any other appropriate manner (e.g., by means of firmware).
[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] The computer programs for implementing the methods of the embodiments of the present disclosure may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0111] In the context of the disclosed embodiments, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0112] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0115] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in the embodiments of the present disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions of the embodiments of the present disclosure can be achieved, and this document does not limit this.
[0116] The above specific implementations do not constitute a limitation on the protection scope of the embodiments of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the embodiments of the present disclosure shall be included in the protection scope of the embodiments of the present disclosure.
[0117] The embodiments of the present disclosure also provide a computer program product, including a computer program and / or instructions, which, when executed by a processor, implements the system performance testing method provided in any embodiment of the present application.
[0118] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to write computer program codes for performing the operation of the disclosed embodiments, the programming languages including object-oriented programming languages, such as Java, Smalltalk, C++, and also including conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0119] Note that the above are only preferred embodiments of the embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the embodiments of the present disclosure are not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present disclosure. Therefore, although the embodiments of the present disclosure are described in more detail through the above embodiments, the embodiments of the present disclosure are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present disclosure, and the scope of the embodiments of the present disclosure is determined by the scope of the attached claims.
Claims
1. A system performance testing method, characterized in that: The method comprises: Obtain a target access request; the target access request includes a first access request of a real user and a second access request of a test user, wherein the first access request and the second access request correspond to different test identifiers respectively; Determine the first database corresponding to the first access request and the second database corresponding to the second access request by using the system to be tested and the test identifier; the system to be tested is a system in the actual business system that belongs to the test scope; A performance test is performed on the system to be tested based on the first database and the second database respectively to obtain a corresponding test log.
2. The method according to claim 1, characterized in that After the performance test is performed on the system to be tested based on the database to obtain the test log, the method further includes: For each of the test logs, the test log is stored in a corresponding preset location according to a test identifier corresponding to the test log.
3. The method according to claim 1, characterized in that Get the target access request, including: The at least one external access request obtained is transmitted to a unified application gateway, so as to determine the target access request through the unified application gateway.
4. The method according to claim 3, characterized in that Determining the target access request by the unified application gateway includes: When the external access request does not contain the test identifier, the unified application gateway determines the external access request that does not contain the test identifier as the target access request, and transmits the target access request to the system to be tested; When the external access request includes the test identifier and the test switch is turned on, the unified application gateway determines the external access request including the test identifier as the target access request, and transmits the target access request to the system to be tested.
5. The method according to claim 1, characterized in that The method further comprises: Determine a first external system corresponding to the first access request and a second external access system corresponding to the second access request by using the system to be tested and the test identifier; the first external system and the second external system are systems that are not covered by the system to be tested; The first external access system is used to generate an operation instruction based on the first access request, and send the operation instruction to the system to be tested, so that the system to be tested performs a corresponding operation; The second external access system is used to generate a test instruction based on the second access request, and send the test instruction to the system to be tested, so that the system to be tested completes the performance test.
6. The method according to claim 1, characterized in that The method further comprises: Determining historical construction information, wherein the historical construction information includes real user data and test user data; Based on the historical construction information, generating user identification information using the actual business system; the user identification information includes preset user information and a test identification; The first database and the second database are constructed based on the test identifier and the preset user information.
7. A system performance testing device, characterized in that: include: A request acquisition module, used to acquire a target access request; The target access request includes a first access request of a real user and a second access request of a test user, wherein the first access request and the second access request correspond to different test identifiers respectively; A database determination module, used to determine a first database corresponding to the first access request and a second database corresponding to the second access request using a system to be tested and a test identifier; the system to be tested is a system in an actual business system that belongs to a test scope; The test module is used to perform performance test on the system to be tested based on the first database and the second database respectively, and obtain corresponding test logs.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the system performance testing method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the system performance testing method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the system performance testing method according to any one of claims 1 to 6.