Browser plug-in-based cloud platform end-to-end test method, system and equipment
By using a browser plugin to snapshot and record operations on the cloud platform environment, end-to-end test cases are generated. This solves the problem of high costs in environment management and script maintenance in traditional cloud platform testing, and achieves efficient test environment consistency and low-cost test coverage.
Patent Information
- Application Number
- CN202511126381.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-12-09
AI Technical Summary
Traditional cloud platform software products face challenges in end-to-end testing, including difficulties in environment management, high script maintenance costs, and low execution efficiency. In particular, inconsistent resource configurations at different stages lead to fluctuations in test results, and parallel execution is difficult.
The browser plugin takes a snapshot of the current environment of the cloud platform, records user operations and generates atomic operation instruction sequences. It then combines the environment initialization script and assertion logic rules to generate end-to-end test cases, which are run on the test cloud platform to ensure environment consistency.
It achieves consistency between the test environment and the production environment, improves end-to-end testing efficiency, reduces script maintenance costs, and supports test coverage for more scenarios.
Smart Images

Figure CN121092437A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer software technology, and in particular to a technology for end-to-end testing of cloud platforms based on browser plugins. Background Technology
[0002] A comprehensive front-end testing strategy should encompass multiple levels of testing, from the most granular unit tests to end-to-end (E2E) tests that simulate real user behavior. With the increasing complexity of cloud platform software systems and the widespread adoption of agile development methodologies, end-to-end testing has become a crucial element in ensuring the quality of cloud platform software products.
[0003] Traditional end-to-end (E2E) testing for cloud platform software products has the following shortcomings:
[0004] 1. Difficulties in environmental management
[0005] E2E testing relies on specific environment configurations (such as browser version, operating system, resolution, and private cloud platform resource configuration). Even with the same cloud platform, the resource configurations of the cloud platform are different at different stages, such as the status and quantity of physical machines and main storage. Setting up the test environment is not only time-consuming, but also cannot guarantee complete consistency, which can easily lead to fluctuations in test results due to environmental differences.
[0006] 2. High script maintenance costs
[0007] When writing E2E test scripts, it is necessary to frequently adapt to UI (User Interface) changes and there is a lack of coverage of real user operation paths. It is necessary to ensure the consistency of resource names in each test.
[0008] 3. Low execution efficiency
[0009] Local E2E testing is difficult to parallelize, and cloud-based testing environments are slow to start and costly. Summary of the Invention
[0010] In order to at least partially address the above-mentioned shortcomings in E2E testing of traditional cloud platform software products, the purpose of this application is to provide a method, system, and device for end-to-end testing of cloud platforms based on browser plugins.
[0011] According to one aspect of this application, a method for end-to-end testing of a cloud platform based on a browser plugin is provided, wherein the method includes:
[0012] By using the pre-installed browser plugin in the browser, a snapshot of the current environment of the First Cloud Platform is taken to obtain an environment snapshot, and user operation behavior is recorded. Based on each user operation behavior, corresponding operation instructions are generated to obtain an atomic operation instruction sequence.
[0013] The preset environment initialization script, the atomic operation instruction sequence, and the preset assertion logic rules are combined to obtain end-to-end test cases;
[0014] The environment snapshot and the end-to-end test cases are uploaded to the second cloud platform, and the end-to-end test cases are run on the second cloud platform to call the environment initialization script, create a test environment based on the environment snapshot, and run the atomic operation instruction sequence in the test environment and judge the operation result of the corresponding atomic operation instruction according to the preset assertion logic rules.
[0015] Optionally, the step of taking a snapshot of the current environment of the first cloud platform through a pre-installed browser plugin in the browser to obtain an environment snapshot includes:
[0016] The browser plugin pre-installed in the browser is used to obtain the hardware configuration information of the current environment of the First Cloud Platform and generate a hardware configuration file.
[0017] Perform transactional consistency backups on all state services of the current environment of the first cloud platform and generate backup files;
[0018] Use the hardware configuration file and the backup file as an environment snapshot.
[0019] Optionally, the step of performing transactional consistency backups on all state services of the current environment of the first cloud platform and generating backup files includes:
[0020] Call the snapshot API to obtain all status service information of the current environment of the first cloud platform;
[0021] Record all the status service information to the newly created backup file.
[0022] Optionally, the step of calling the environment initialization script to create a test environment based on the environment snapshot includes:
[0023] The environment initialization script is invoked to create a virtual hardware topology based on the hardware configuration file of the environment snapshot, and to restore all state service information from the backup file of the environment snapshot, thus obtaining the test environment.
[0024] Optionally, running the end-to-end test cases includes:
[0025] Start an end-to-end test service using a container, and run the end-to-end test cases through the end-to-end test service.
[0026] Optionally, the method for end-to-end testing of a cloud platform based on a browser plugin further includes:
[0027] The relevant atomic operation instructions and their corresponding test results are recorded and displayed on the second cloud platform.
[0028] According to another aspect of this application, a system for end-to-end testing of a cloud platform based on a browser plugin is provided, wherein the system includes:
[0029] The browser, including a pre-installed browser plugin, is used to perform snapshot processing on the current environment of the first cloud platform to obtain an environment snapshot, record user operation behavior, and generate corresponding operation instructions based on each user operation behavior to obtain an atomic operation instruction sequence; the preset environment initialization script, the atomic operation instruction sequence and the preset assertion logic rules are combined to obtain end-to-end test cases;
[0030] The first cloud platform is used to provide the current environment and interact with users;
[0031] The second cloud platform is used to run the end-to-end test cases, call the environment initialization script, create a test environment based on the environment snapshot, and run the atomic operation instruction sequence in the test environment and judge the operation result of the corresponding atomic operation instruction according to the preset assertion logic rules.
[0032] Optionally, the second cloud platform is also used for:
[0033] Record and display the relevant atomization operation instructions and their corresponding test results.
[0034] Compared with existing technologies, this application provides a method, system, and device for end-to-end testing of a cloud platform based on a browser plugin. The method includes: taking a snapshot of the current environment of a first cloud platform using a pre-installed browser plugin to obtain an environment snapshot, recording user operation behaviors, and generating corresponding operation instructions based on each user operation behavior to obtain an atomic operation instruction sequence; combining a preset environment initialization script, the atomic operation instruction sequence, and preset assertion logic rules to obtain end-to-end test cases; uploading the environment snapshot and the end-to-end test cases to a second cloud platform, and running the end-to-end test cases on the second cloud platform to call the environment initialization script, create a test environment based on the environment snapshot, and run the atomic operation instruction sequence in the test environment and determine the operation result of the corresponding atomic operation instructions according to the preset assertion logic rules. This application utilizes a pre-installed browser plugin to take a snapshot of the cloud platform production environment upon which user operations depend. It then records user actions, generates corresponding atomic operation instruction sequences, and combines these with a pre-defined environment initialization script and assertion logic rules to obtain end-to-end test cases. The environment snapshot and end-to-end test cases are then uploaded to a test cloud platform, constructing a test environment identical to the production environment. The end-to-end test cases are then run in this test environment to obtain test results. This ensures consistency between the test and production environments, improves end-to-end testing efficiency, eliminates the need for manual test script writing, enhances script maintenance efficiency, reduces script maintenance costs, and covers a wider range of cloud platform end-to-end testing scenarios. Attached Figure Description
[0035] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0036] Figure 1 A schematic diagram illustrating a method for end-to-end testing of a cloud platform based on a browser plugin, according to one aspect of this application;
[0037] Figure 2 This diagram illustrates a system schematic for end-to-end testing of a cloud platform based on a browser plugin, according to another aspect of this application.
[0038] The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation
[0039] The present application will now be described in further detail with reference to the accompanying drawings.
[0040] In a typical configuration of various embodiments of this application, the method execution entity, each trusted party of the system, and / or each module of the device may include one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0041] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0042] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0043] To further illustrate the technical means adopted and the effects achieved in this application, the technical solution of this application will be clearly and completely described below in conjunction with the accompanying drawings and preferred embodiments.
[0044] Figure 1 The diagram illustrates a method for end-to-end testing of a cloud platform based on a browser plugin according to one aspect of this application, wherein one embodiment of the method includes:
[0045] S101 uses a pre-installed browser plugin in the browser to take a snapshot of the current environment of the First Cloud Platform to obtain an environment snapshot, record user operation behavior, and generate corresponding operation instructions based on each user operation behavior to obtain an atomic operation instruction sequence.
[0046] S102 combines the preset environment initialization script, the atomic operation instruction sequence, and the preset assertion logic rules to obtain end-to-end test cases;
[0047] S103 uploads the environment snapshot and the end-to-end test cases to the second cloud platform, and runs the end-to-end test cases on the second cloud platform to call the environment initialization script, create a test environment based on the environment snapshot, and run the atomic operation instruction sequence in the test environment and judge the operation result of the corresponding atomic operation instruction according to the preset assertion logic rules.
[0048] In the application scenario of this application, users can access the cloud platform through a browser (or front-end) to perform end-to-end testing and other related operations. The technical solution for end-to-end testing of the cloud platform provided in this application is implemented based on a browser plugin pre-installed on the browser.
[0049] The browser and cloud platform can be software deployed on computer devices and / or in the cloud. The computer devices include, but are not limited to, personal computers, laptops, industrial computers, embedded computers, servers, network hosts, single network servers, or network server clusters. The cloud consists of a large number of computers or network servers based on cloud computing, where cloud computing is a type of distributed computing that consists of a virtual supercomputer composed of a loosely coupled set of computers.
[0050] The computer equipment and / or cloud described herein are merely examples. Other existing or future equipment and / or resource platforms that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0051] End-to-end testing of cloud platforms mainly involves simulating the process of users interacting with applications in the actual cloud platform environment to ensure that the integration and collaboration between various components, modules and / or services of the cloud platform meet expectations.
[0052] In this embodiment, in step S101, the current environment of the first cloud platform is snapshotted by the pre-installed browser plugin in the front-end browser to obtain an environment snapshot, and user operation behavior is recorded. Based on each user operation behavior, corresponding operation instructions are generated to obtain an atomic operation instruction sequence.
[0053] The system integrates a pre-developed browser plugin into the front-end browser. This plugin encapsulates functions such as environment snapshotting, recording user interactions with the browser, and generating complete end-to-end test cases using preset environment initialization scripts and preset assertion logic rules. Users can access the production (or operational) First Cloud Platform through the front-end browser. Before interacting, the pre-installed browser plugin allows for snapshotting of the First Cloud Platform's current environment, recording the current environment configuration, including but not limited to hardware, network, and virtual resources. This snapshot is used to build a test environment identical to the current First Cloud Platform environment used by the user, ensuring consistency between the test and production environments. After snapshotting, the pre-installed browser plugin initiates recording to capture every user interaction with the cloud platform, such as form clicks and input operations. Based on each user action, corresponding operation instructions are generated; for example, a click function instruction is generated for a form click, and an input function instruction is generated for an input operation. After the user completes all interactive operations, an atomic sequence of operation instructions is generated, including the operation instructions corresponding to each operation. For example, by pre-installing a browser plugin, information corresponding to each user interaction operation, such as DOM events, network requests, and storage changes, can be monitored and recorded to generate an atomic sequence of operation instructions for each operation.
[0054] Continuing in this embodiment, in step S102, the pre-installed browser plugin can be used to combine the preset environment initialization script, the atomic operation instruction sequence, and the preset assertion logic rules to obtain end-to-end test cases.
[0055] This pre-installed test plugin automatically combines a preset environment initialization script, an atomic operation instruction sequence, and preset assertion logic rules to generate a set of end-to-end test cases. Each end-to-end test case corresponds to one or more user operations. The process requires no manual intervention, significantly improving the efficiency of end-to-end test case generation and reducing maintenance costs.
[0056] Continuing in this embodiment, in step S103, the environment snapshot and the end-to-end test case are uploaded to the second cloud platform, and the end-to-end test case is run on the second cloud platform to call the environment initialization script, create a test environment according to the environment snapshot, and run the atomic operation instruction sequence in the test environment and judge the operation result of the corresponding atomic operation instruction according to the preset assertion logic rules.
[0057] The obtained environment snapshot and end-to-end test cases are uploaded to a second cloud platform for end-to-end testing. The end-to-end test cases are run on the second cloud platform. By calling the environment initialization script, a test environment completely consistent with the environment generated by the first cloud platform is created based on the environment snapshot. The atomic operation instruction sequence is run in the test environment. According to the preset assertion logic rules, it is determined whether the operation result of one or more atomic operation instructions is as expected.
[0058] In this embodiment, it is not limited whether the first cloud platform (the cloud platform providing the production environment) and the second cloud platform (the cloud platform providing the testing environment) belong to the same vendor. A test environment identical to the production environment can be quickly created on the second cloud platform used for testing, ensuring consistency between the two. The automatic generation of end-to-end test cases supporting assertions, and their execution on the second cloud platform used for testing, can greatly improve the efficiency of end-to-end test case generation, reduce maintenance costs, and provide intuitive test results.
[0059] Optionally, in step S101, the step of taking a snapshot of the current environment of the first cloud platform through a pre-installed browser plugin in the browser to obtain an environment snapshot includes:
[0060] The browser plugin pre-installed in the browser is used to obtain the hardware configuration information of the current environment of the First Cloud Platform and generate a hardware configuration file.
[0061] Perform transactional consistency backups on all state services of the current environment of the first cloud platform and generate backup files;
[0062] Use the hardware configuration file and the backup file as an environment snapshot.
[0063] Specifically, a pre-installed browser plugin can be used to obtain the hardware configuration information of the current environment of the First Cloud Platform. Based on this information, a hardware configuration file corresponding to the current production environment can be generated. For example, the cloud platform SDK adaptation layer can encapsulate relevant APIs from third-party cloud vendors, such as AWSEC2 / Azure VM / GCP Compute Engine, to enable differentiated calls and obtain hardware configuration information of the current production environment of the First Cloud Platform, such as CPU, memory, disk, and network device information, and generate a standardized hardware configuration file to save this information.
[0064] Furthermore, through a pre-installed browser plugin, transactional consistency backups can be performed on all state services (which can be considered virtual resources) of the database, middleware, etc. in the current environment of the first cloud platform, generating backup files.
[0065] Use the obtained hardware configuration files and backup files as environment snapshots.
[0066] Optionally, the step of performing transactional consistency backups on all state services of the current environment of the first cloud platform and generating backup files includes:
[0067] Call the snapshot API to obtain all status service information of the current environment of the first cloud platform;
[0068] Record all the status service information to the newly created backup file.
[0069] This involves calling relevant snapshot APIs, such as `mysqldump` for the MySQL database deployed on the first cloud platform, `pg_dump` for the PostgreSQL database deployed on the first cloud platform, and the vendor-native snapshot API for the third-party cloud middleware deployed on the first cloud platform. This allows obtaining all status service information for the database and / or third-party cloud middleware in the current environment of the first cloud platform, and recording all obtained status service information into a newly created backup file. If the backup file is large, it can also be stored in an object storage repository (such as S3) or a versioned repository to save local storage space.
[0070] Optionally, in step S103, the step of calling the environment initialization script to create a test environment based on the environment snapshot includes:
[0071] The environment initialization script is invoked to create a virtual hardware topology based on the hardware configuration file of the environment snapshot, and to restore all state service information from the backup file of the environment snapshot, thus obtaining the test environment.
[0072] On the second cloud platform, the environment initialization script in the end-to-end test cases can be invoked, a hardware simulator can be called, a virtual hardware topology can be created based on the hardware configuration files in the environment snapshot, and all state service information of the database and / or middleware can be restored from the backup files in the environment snapshot through the backup and recovery engine to obtain a test environment that is completely consistent with the production environment. The hardware simulator can shield the underlying differences between different cloud platforms, achieving compatibility between cloud platforms from different vendors. Therefore, it is not limited whether the first and second cloud platforms are from the same vendor.
[0073] Optionally, in step S103, running the end-to-end test case includes:
[0074] Start an end-to-end test service using a container, and run the end-to-end test cases through the end-to-end test service.
[0075] Depending on the cloud platform used in the scenario, lightweight containers can be used, such as cgroups + namespaces, to start a pre-configured end-to-end test service. This pre-configured end-to-end test service can be packaged into a container image and started using a container. Through this end-to-end test service, end-to-end test cases are run, which calls a preset environment initialization script to create a test environment based on an environment snapshot. Within this test environment, atomic operation instruction sequences are run, and the operation results of the corresponding atomic operation instructions are determined according to preset assertion logic rules.
[0076] Optionally, the method for end-to-end testing of a cloud platform based on a browser plugin further includes:
[0077] The relevant atomic operation instructions and their corresponding test results are recorded and displayed on the second cloud platform.
[0078] The system can also record and display the atomic operation instructions related to the end-to-end test cases after they are run on the second cloud platform, as well as the test results, including the results of all operations corresponding to the atomic operation instructions, based on the preset assertion logic rules. This is to facilitate understanding by users or relevant personnel and to further guide subsequent development, testing and other related work.
[0079] The method for end-to-end testing of cloud platforms based on browser plugins, provided in the above embodiments and / or optional embodiments, utilizes browser plugins pre-installed in the browser. These plugins possess environment initialization and reproducibility capabilities, automatically obtaining a snapshot of the production environment and complete end-to-end test cases, including environment initialization, execution, and assertions, without requiring manual supplementation of context and dependencies. On the test cloud platform used for end-to-end testing, a test environment consistent with the production environment is created through the environment snapshot, allowing direct execution of end-to-end test cases and direct acquisition of test results.
[0080] Figure 2 The diagram illustrates a system schematic for end-to-end testing of a cloud platform based on a browser plugin according to another aspect of this application, wherein, in one embodiment, the system includes:
[0081] The browser, including a pre-installed browser plugin, is used to perform snapshot processing on the current environment of the first cloud platform to obtain an environment snapshot, record user operation behavior, and generate corresponding operation instructions based on each user operation behavior to obtain an atomic operation instruction sequence; the preset environment initialization script, the atomic operation instruction sequence and the preset assertion logic rules are combined to obtain end-to-end test cases;
[0082] The first cloud platform is used to provide the current environment and interact with users;
[0083] The second cloud platform is used to run the end-to-end test cases, call the environment initialization script, create a test environment based on the environment snapshot, and run the atomic operation instruction sequence in the test environment and judge the operation result of the corresponding atomic operation instruction according to the preset assertion logic rules.
[0084] In this embodiment, a pre-installed browser plugin is used to take a snapshot of the current environment of the first cloud platform to obtain an environment snapshot. This snapshot records the current environment configuration, including but not limited to hardware resources, network resources, and virtual resources. This snapshot is used to build a test environment on the test cloud platform that is identical to the current environment of the first cloud platform with which the user interacts, ensuring consistency between the test environment and the production environment. After the snapshot is taken, the pre-installed browser plugin starts recording to capture every user interaction with the cloud platform, such as form clicks and input operations. Based on each user action, a corresponding operation instruction is generated; for example, a click function instruction is generated for a form click, and an input function instruction is generated for an input operation. After the user completes all interactions, an atomic sequence of operation instructions is obtained, including the operation instructions corresponding to each action. Then, the pre-installed test plugin automatically combines the preset environment initialization script, the atomic operation instructions, and the preset assertion logic rules to automatically generate end-to-end test cases.
[0085] In this embodiment, the user interacts with the first cloud platform that provides the current production environment through a browser so that the browser can perform snapshot processing on the current production environment through the pre-installed browser plugin, obtain an environment snapshot, and each user operation behavior during the interaction. Based on each user operation behavior, corresponding operation instructions are generated. After the user completes all interactive operations, an atomic operation instruction sequence including the operation instructions corresponding to each operation behavior is obtained.
[0086] After the environment snapshot and end-to-end test cases are uploaded to the second cloud platform for end-to-end testing, in this embodiment, the end-to-end test cases are run on the second cloud platform to create a test environment that is completely consistent with the environment generated by the first cloud platform by calling the environment initialization script therein, and to run the atomic operation instruction sequence therein in the test environment, and to determine whether the operation result of one or more atomic operation instructions is as expected according to the preset assertion logic rules.
[0087] Optionally, the second cloud platform is further used for:
[0088] Record and display the relevant atomization operation instructions and their corresponding test results.
[0089] In this optional embodiment, the atomic operation instructions related to the end-to-end test cases and the test results, including all operation results corresponding to the atomic operation instructions, can be recorded and displayed in the second cloud platform after the end-to-end test cases are run, so as to facilitate users or relevant personnel to understand and further guide subsequent development, testing and other related work.
[0090] In the above system embodiments and / or optional embodiments, any method steps that are not mentioned in the executable method steps of each component of the system are the same as those in the aforementioned related method embodiments and / or optional embodiments, and will not be repeated here.
[0091] According to another aspect of this application, a computer-readable medium is also provided, the computer-readable medium storing computer-readable instructions that can be executed by a processor to implement some or all of the foregoing method embodiments and / or optional embodiments.
[0092] It should be noted that the method embodiments and / or optional embodiments in this application do not strictly limit the order of execution of each step, as long as the method embodiments and / or optional embodiments can solve the defects existing in the prior art, achieve the inventive purpose of this application, and obtain beneficial effects. The method embodiments and / or optional embodiments in this application can be implemented in software and / or combinations of software and hardware. The software program involved in this application can be executed by a processor to implement the steps or functions of the above embodiments. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium.
[0093] Furthermore, part or all of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. The program instructions invoking the methods of this application may be stored in a fixed or removable recording medium, and / or transmitted via data streams in broadcast or other signal carrying media, and / or stored in the working memory of a computer device operating according to the program instructions.
[0094] According to another aspect of this application, a device for end-to-end testing of a cloud platform based on a browser plugin is also provided. The device includes: a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to run part or all of the methods and / or technical solutions of the foregoing embodiments.
[0095] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0096] In this application, when terms such as "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," and "longitudinal" are used, the indicated orientation and / or positional relationship is based on the orientation and / or positional relationship shown in the accompanying drawings. These terms are primarily for the purpose of better describing this application and its embodiments, and are not intended to limit the indicated device, element, or component to having a specific orientation, or to be constructed and operated in a specific orientation. Furthermore, some of the above terms, in addition to indicating orientation or positional relationship, can also be used to indicate other meanings; for example, the term "upper" can also be used in some cases to indicate a certain dependency or connection relationship. Those skilled in the art can understand the specific meaning of these terms in this application according to the specific circumstances.
[0097] Furthermore, the terms "installation," "setup," "equipped with," "connection," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral structure; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection via an intermediate medium; and they can refer to an internal connection between two devices, components, or constituent parts. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0098] Furthermore, the terms "first," "second," etc., are primarily used to distinguish different devices, units, modules, elements, circuits, or components (which may be the same or different in specific type and construction), and are not intended to indicate or imply the relative importance, order, and / or quantity of the indicated devices, units, modules, elements, circuits, or components. Unless otherwise stated, "a plurality of" means two or more.
[0099] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device through software and / or hardware.
Claims
1. A method for end-to-end testing of a cloud platform based on a browser plugin, characterized in that, The method includes: By using the pre-installed browser plugin in the browser, a snapshot of the current environment of the First Cloud Platform is taken to obtain an environment snapshot, and user operation behavior is recorded. Based on each user operation behavior, corresponding operation instructions are generated to obtain an atomic operation instruction sequence. The preset environment initialization script, the atomic operation instruction sequence, and the preset assertion logic rules are combined to obtain end-to-end test cases; The environment snapshot and the end-to-end test cases are uploaded to the second cloud platform, and the end-to-end test cases are run on the second cloud platform to call the environment initialization script, create a test environment based on the environment snapshot, and run the atomic operation instruction sequence in the test environment and judge the operation result of the corresponding atomic operation instruction according to the preset assertion logic rules.
2. The method according to claim 1, characterized in that, The step of taking a snapshot of the current environment of the first cloud platform through a pre-installed browser plugin to obtain an environment snapshot includes: The browser plugin pre-installed in the browser is used to obtain the hardware configuration information of the current environment of the First Cloud Platform and generate a hardware configuration file. Perform transactional consistency backups on all state services of the current environment of the first cloud platform and generate backup files; Use the hardware configuration file and the backup file as an environment snapshot.
3. The method according to claim 2, characterized in that, The step of performing transactional consistency backups on all state services of the current environment of the first cloud platform and generating backup files includes: Call the snapshot API to obtain all status service information of the current environment of the first cloud platform; Record all the status service information to the newly created backup file.
4. The method according to claim 2, characterized in that, The step of calling the environment initialization script to create a test environment based on the environment snapshot includes: The environment initialization script is invoked to create a virtual hardware topology based on the hardware configuration file of the environment snapshot, and to restore all state service information from the backup file of the environment snapshot, thus obtaining the test environment.
5. The method according to claim 1, characterized in that, Running the end-to-end test cases includes: Start an end-to-end test service using a container, and run the end-to-end test cases through the end-to-end test service.
6. The method according to claim 1, characterized in that, The method further includes: The relevant atomic operation instructions and their corresponding test results are recorded and displayed on the second cloud platform.
7. A system for end-to-end testing of a cloud platform based on a browser plugin, characterized in that, The system includes: The browser, including a pre-installed browser plugin, is used to perform snapshot processing on the current environment of the first cloud platform to obtain an environment snapshot, record user operation behavior, and generate corresponding operation instructions based on each user operation behavior to obtain an atomic operation instruction sequence; the preset environment initialization script, the atomic operation instruction sequence and the preset assertion logic rules are combined to obtain end-to-end test cases; The first cloud platform is used to provide the current environment and interact with users; The second cloud platform is used to run the end-to-end test cases, call the environment initialization script, create a test environment based on the environment snapshot, and run the atomic operation instruction sequence in the test environment and judge the operation result of the corresponding atomic operation instruction according to the preset assertion logic rules.
8. The system according to claim 7, characterized in that, The second cloud platform is also used for: Record and display the relevant atomization operation instructions and their corresponding test results.
9. A computer-readable medium, characterized in that, It stores computer-readable instructions that are executed by a processor to implement part or all of the method as claimed in any one of claims 1 to 6.
10. A device for end-to-end testing of a cloud platform based on a browser plugin, characterized in that, The device includes: One or more processors; and A memory storing computer-readable instructions, which, when executed, cause the processor to perform some or all of the operations of the method as described in any one of claims 1 to 6.