A cloud platform-based upgrade test method, device and medium

CN115237441BActive Publication Date: 2026-08-28JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210751010.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2026-08-28
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

现有的服务器虚拟化软件升级测试中,仅能手动将版本逐级升级,例如从版本V1.0升级到版本V2.0,若想升级到V5.0,则需要逐级升级,导致升级次数增多,升级的速度较慢,同时升级测试的版本较为死板

Benefits of technology

[0040]本发明提供的一种基于云平台的升级测试方法,包括获取服务器虚拟化软件对应的初始版本和目标版本;根据初始版本与目标版本确定升级测试路径,并根据升级测试路径以及对应的测试规模和测试场景组合得到测试配置文件;将测试配置文件在云平台上创建初始化测试环境;通过访问初始化测试环境,根据目标版本选择对应的脚本配置文件得到用例功能集合;根据升级测试路径和用例功能集合进行升级以完成从初始版本升级至目标版本的升级测试。该方法通过确定的升级测试路径进一步得到测试配置文件,进而配置云平台创建初始化测试环境以指定版本系统文件,根据版本功能差异选择目标版本适用的用例功能集合,根据用例功能集合和升级测试路径进行升级包的上传和升级。不仅可以实现版本的逐级升级,还可以实现多个版本的跨越升级,提高升级的速度,同时升级测试的版本较为灵活。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115237441B_ABST
    Figure CN115237441B_ABST
Patent Text Reader

Abstract

The application discloses a cloud platform-based upgrade test method and device and a medium, and is suitable for the technical field of software testing. An upgrade test path is determined according to an initial version and a target version, and a test configuration file is obtained according to the upgrade test path and corresponding test scale and test scene combination; an initialization test environment is accessed, a corresponding script configuration file is selected according to the target version to obtain a use case function set, and upgrading is performed according to the upgrade test path and the use case function set. The test configuration file is obtained through the determined upgrade test path, then the cloud platform is configured to create the initialization test environment to specify the version system file, the use case function set suitable for the target version is selected according to the version function difference, and the upgrade package is uploaded and upgraded according to the use case function set and the upgrade test path. The version can be upgraded level by level, the cross-version upgrade of multiple versions can be realized, the upgrade speed is improved, and the version of the upgrade test is relatively flexible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, and in particular to an upgrade testing method, apparatus and medium based on a cloud platform. Background Technology

[0002] Server virtualization technology is a "software-defined" technology that uses software to virtualize various hardware components, thereby enabling the simultaneous and independent operation of multiple virtual hosts (cloud servers) on a single hardware platform. Each cloud server uses its own dedicated Central Processing Unit (CPU), hard drive, memory, input / output (I / O) devices, network interface cards (NICs), and other hardware. Furthermore, different operating systems can be installed on these virtual machines to meet the diverse needs of different users.

[0003] In agile development models, software version updates are accelerated, with server virtualization software being upgraded from lower to higher versions to address defects and reflect increasing demand for new features. Current server virtualization software upgrade testing only allows for manual, incremental upgrades. For example, upgrading from version V1.0 to V2.0, and then upgrading to V5.0, requires a step-by-step process, leading to more upgrades, slower upgrade speeds, and a rigid set of versions for upgrade testing.

[0004] Therefore, how to make test version upgrades flexible is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide an upgrade testing method, device, and medium based on a cloud platform, enabling cross-version upgrades, improving upgrade speed, and providing greater flexibility in the versions to be tested.

[0006] To address the aforementioned technical problems, this invention provides an upgrade testing method based on a cloud platform, comprising:

[0007] Obtain the initial and target versions of the server virtualization software;

[0008] The upgrade test path is determined based on the initial version and the target version, and the test configuration file is obtained based on the upgrade test path and the corresponding test scale and test scenario combination.

[0009] Create and initialize the test environment on the cloud platform using the test configuration file;

[0010] By accessing the initial test environment, the set of test case functions can be obtained by selecting the corresponding script configuration file according to the target version.

[0011] Upgrades are performed based on the upgrade test path and test case function set to complete the upgrade test from the initial version to the target version.

[0012] Preferably, the upgrade test path is determined based on the initial version and the target version, including:

[0013] Retrieve the overridden and skipped version numbers between the initial version and the target version;

[0014] Determine the initial upgrade path between the initial and target versions based on their relationship;

[0015] The initial upgrade path is traversed to obtain the upgrade test path by filtering out the version numbers that are covered and skipped.

[0016] Preferably, the test configuration file is used to create an initial test environment on the cloud platform, including:

[0017] The test configuration file is parsed to obtain configuration parameters and information about the system under test;

[0018] The corresponding SDK interface of the cloud platform software is called according to the configuration parameters to create multiple scales and cloud servers;

[0019] Configure the system information under test on multiple cloud servers to create an initial test environment.

[0020] Preferably, by accessing the initialization test environment, the set of test case functions is obtained by selecting the corresponding script configuration file according to the target version, including:

[0021] Identify the target version by accessing the initial test environment;

[0022] Select the corresponding script configuration file based on the target version to form a set of test case functions.

[0023] Preferably, after obtaining the test case function set, and before upgrading based on the upgrade test path and the test case function set, the method further includes:

[0024] Resource pre-embedding and system configuration are performed in the initialization test environment to verify the upgraded target version after the upgrade is completed.

[0025] Preferably, after upgrading according to the upgrade test path and test case function set, the method further includes:

[0026] To reclaim resources from cloud servers for future upgrades and testing.

[0027] Preferably, after upgrading according to the upgrade test path and test case function set, the method further includes:

[0028] Call the SDK interface to create a snapshot of the cloud server;

[0029] Collect log information from the cloud server for subsequent verification.

[0030] To address the aforementioned technical problems, the present invention also provides an upgrade testing device based on a cloud platform, comprising:

[0031] The acquisition module is used to obtain the initial and target versions of the server virtualization software.

[0032] The determination module is used to determine the upgrade test path based on the initial version and the target version, and to obtain the test configuration file based on the upgrade test path and the corresponding test scale and test scenario combination;

[0033] Create a module to initialize the test environment on the cloud platform using the test configuration file;

[0034] The selection module is used to obtain a set of test case functions by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version.

[0035] The upgrade module is used to perform upgrades based on the upgrade test path and test case function set to complete the upgrade test from the initial version to the target version.

[0036] To address the aforementioned technical problems, the present invention also provides an upgrade testing device based on a cloud platform, comprising:

[0037] Memory, used to store computer programs;

[0038] The processor is used to execute computer programs to implement the steps of the cloud-based upgrade testing method described above.

[0039] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the cloud-based upgrade testing method described above.

[0040] This invention provides a cloud platform-based upgrade testing method, comprising: obtaining the initial and target versions of the server virtualization software; determining the upgrade test path based on the initial and target versions, and obtaining a test configuration file based on the upgrade test path and the corresponding test scale and test scenario combination; creating an initialization test environment on the cloud platform using the test configuration file; obtaining a set of test cases by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version; and performing an upgrade according to the upgrade test path and the set of test cases to complete the upgrade test from the initial version to the target version. This method further obtains the test configuration file through the determined upgrade test path, then configures the cloud platform to create an initialization test environment to specify the version system files, selects the set of test cases applicable to the target version based on version function differences, and uploads and upgrades the upgrade package according to the set of test cases and the upgrade test path. This method not only enables step-by-step upgrades but also allows for cross-version upgrades, improving upgrade speed and providing greater flexibility in the versions being upgraded.

[0041] In addition, the present invention also provides an upgrade testing device and medium based on a cloud platform, which has the same beneficial effects as the upgrade testing method based on a cloud platform described above. Attached Figure Description

[0042] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart illustrating an upgrade testing method based on a cloud platform, provided as an embodiment of the present invention;

[0044] Figure 2 A structural diagram of an upgrade testing device based on a cloud platform provided in an embodiment of the present invention;

[0045] Figure 3 A structural diagram of another cloud-based upgrade testing device provided in an embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram illustrating the application of a cloud-based upgrade testing device provided in another embodiment of the present invention. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0048] The core of this invention is to provide an upgrade testing method, device, and medium based on a cloud platform, enabling cross-version upgrades, improving upgrade speed, and providing greater flexibility in the versions to be tested.

[0049] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0050] With the increasing convenience of the network environment and the rapid development of the Internet of Things (IoT), IoT devices are experiencing significant fragmentation due to varying product positioning. This necessitates iterative updates, resulting in diverse and complex products with specific requirements for real-time performance and stability. It's worth noting that server virtualization software upgrade testing lacks automated multi-version continuous testing, cross-version upgrade testing, user scenario coverage, and automatic creation and verification of cloud platform resources before upgrades. The cloud-based upgrade testing method provided by this invention avoids these aforementioned barriers. The method and apparatus for automatically running resource creation and verification scripts allow for manual or automatic triggering of test tasks on a test task management platform. This involves calling scripts, deploying a specified system on a cloud server on the cloud platform, executing pre-upgrade resource pre-installation, upgrading the server virtual machine software to a specified version, and continuously testing the post-upgrade environment status.

[0051] Figure 1 A flowchart of an upgrade testing method based on a cloud platform provided in an embodiment of the present invention is shown below. Figure 1 As shown, the method includes:

[0052] S11: Obtain the initial and target versions of the server virtualization software;

[0053] S12: Determine the upgrade test path based on the initial version and the target version, and obtain the test configuration file based on the upgrade test path and the corresponding test scale and test scenario combination;

[0054] S13: Create and initialize the test environment on the cloud platform using the test configuration file;

[0055] S14: By accessing the initialization test environment, select the corresponding script configuration file according to the target version to obtain the test case function set;

[0056] S15: Perform the upgrade test based on the upgrade test path and test case function set to complete the upgrade test from the initial version to the target version.

[0057] Obtaining the initial and target versions of the server virtual software is crucial. These versions can be sequential or cross-version, and the received output parameters are used for subsequent scheduling. Besides obtaining the versions, it's also necessary to acquire test scenario parameters corresponding to the software testing, such as the scale, stress, or potential failures.

[0058] The upgrade test path is determined based on the obtained initial and target versions. The number of paths can be obtained using a certain algorithm, which is not specifically limited in this invention. Alternatively, it can be calculated using the number of version numbers that differ between the initial and target versions. For example, n is the number of version numbers that differ between the initial and target versions. The upgrade test path is obtained using the following formula:

[0059] Upgrade test path = n(n+1) / 2

[0060] To facilitate subsequent upgrade path testing, stable version numbers can be skipped in all upgrade test paths, or versions with significant requirement changes that must include version information, or versions with significant requirement changes that do not require coverage of either of the above two types of versions during the upgrade from the initial version to the target version, and which are also ignored. This results in a final number of upgrade test paths that is less than the original number of upgrade test paths that only consider the upgrade path from the initial version number to the target version number. This invention does not specifically limit the type of upgrade test path used; it can be set according to the actual situation.

[0061] Based on the upgrade test path, test scale, and test scenario, a test configuration file is obtained by combining these elements. For example, if the software test scale is M, the test scenario parameters (such as stress or fault) are S, and the determined upgrade test path is R, then the test configuration file is R*M*S. It's important to understand that the combination method is not specifically limited; it can be an existing combination of upgrade tests or a specific combination based on the initial version number and the target version number, set according to the actual situation.

[0062] After obtaining the test configuration file, since this invention is an upgrade testing method based on a cloud platform, an initialization test environment needs to be created on the cloud platform. This mainly involves creating system environments corresponding to cloud servers of different sizes and configurations. The initialization test environment needs to meet the memory and other requirements of the created cloud servers, as well as the hardware compatibility and operating system of the virtual machines. The created initialization test environment is used to support later development testing and other internal business operations.

[0063] After creating the initial test environment for the cloud platform, the script is run. By accessing the initial test environment, the target version number is identified. Based on the target version number, the corresponding script configuration file is selected to form an automated test case set. The test case set includes tests for controls such as text boxes and buttons, as well as a set of search and replace operations, insertion operations, and interface test cases.

[0064] The upgrade is performed based on the selected upgrade test path and test case functionality set to complete the upgrade test from the initial version to the target version. Understandably, during the upgrade, the upgrade package needs to be uploaded, and the upgrade script needs to be executed automatically.

[0065] This invention provides a cloud platform-based upgrade testing method, comprising: obtaining the initial and target versions of the server virtualization software; determining an upgrade test path based on the initial and target versions; obtaining a test configuration file based on the upgrade test path and the corresponding test scale and test scenario combination; creating an initialization test environment on the cloud platform using the test configuration file; obtaining a set of test cases by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version; and performing an upgrade based on the upgrade test path and the set of test cases to complete the upgrade test from the initial version to the target version. This method further obtains the test configuration file through the determined upgrade test path, then configures the cloud platform to create an initialization test environment to specify the version system files, selects the set of test cases applicable to the target version based on version function differences, and uploads and upgrades the upgrade package according to the set of test cases and the upgrade test path. This not only enables step-by-step upgrades but also allows for cross-version upgrades, improving upgrade speed and providing greater flexibility in the versions being upgraded.

[0066] Based on the above embodiments, in order to facilitate configuration files for subsequent path upgrade tests and reduce unnecessary path tests, step S12, which determines the upgrade test path based on the initial version and the target version, includes:

[0067] Retrieve the overridden and skipped version numbers between the initial version and the target version;

[0068] Determine the initial upgrade path between the initial and target versions based on their relationship;

[0069] The initial upgrade path is traversed to obtain the upgrade test path by filtering out the version numbers that are covered and skipped.

[0070] It should be noted that the first step is to obtain the version numbers that are overridden and skipped between the initial version and the target version. In this embodiment, the skipped version numbers are mainly for very stable versions, while the overridden version numbers are mainly for versions with significant changes in requirements. The paths involved in these two types of version numbers are then filtered. Therefore, the initial upgrade path between the two versions needs to be determined based on the relationship between the initial version and the target version.

[0071] The upgrade test path is obtained by subtracting the upgrade paths corresponding to the covered and skipped version numbers from the initial upgrade path. Specifically, all upgrade paths are iterated through, and upgrade paths that need to be skipped or contain covered version numbers are removed. The remaining upgrade test paths are the final usable upgrade test paths R. If the usable upgrade test path R is 0, it means there are no upgrade test cases, and the test ends.

[0072] This invention provides a method for obtaining the overridden and skipped version numbers between the initial version and the target version; determining the initial upgrade path between the initial version and the target version based on their relationship; and iterating through the initial upgrade path to filter out the overridden and skipped version numbers to obtain the upgrade test path. This facilitates subsequent test upgrades and improves the efficiency of test upgrades.

[0073] Based on the above embodiments, step S13, which involves creating an initial test environment on the cloud platform using the test configuration file, includes:

[0074] The test configuration file is parsed to obtain configuration parameters and information about the system under test;

[0075] The corresponding SDK interface of the cloud platform software is called according to the configuration parameters to create multiple scales and cloud servers;

[0076] Configure the system information under test on multiple cloud servers to create an initial test environment.

[0077] Specifically, the test configuration file is parsed to obtain configuration parameters and information about the system under test. Then, based on the configuration parameters, the cloud platform's software development kit (SDK) interface is called. An SDK is generally a collection of development tools used by software engineers to build application software, including software packages, frameworks, hardware platforms, and operating systems. It is essentially a toolkit provided by a third-party service provider to implement a specific function of a software product. It is equivalent to a collection of Application Programming Interfaces (APIs) and other files. A usable SDK can provide complete interfaces and related development environments, allowing for the creation of multiple scales and cloud servers. Using an SDK can improve development efficiency and facilitate the relatively simple integration of a function. The information about the system under test is configured on the cloud server to complete the creation of the current initial test environment. If the cloud platform cannot support the creation of the test scale, the current upgrade test must be stopped.

[0078] This embodiment parses the test configuration file to obtain configuration parameters and information about the system under test; it then calls the corresponding SDK interface of the cloud platform software based on the configuration parameters to create multiple cloud servers of different sizes; finally, it configures the information about the system under test on multiple cloud servers to create an initial test environment. This facilitates the creation of cloud servers of different sizes and configurations, while simultaneously improving development efficiency by calling the SDK interface.

[0079] In a preferred embodiment, step S14, which involves accessing the initialization test environment and selecting the corresponding script configuration file based on the target version to obtain the test case function set, includes:

[0080] Identify the target version by accessing the initial test environment;

[0081] Select the corresponding script configuration file based on the target version to form a set of test case functions.

[0082] After creating the initial test environment for the cloud platform, the script is run. By accessing the initial test environment, the target version number is identified. Based on the target version number, the corresponding script configuration file is selected to form an automated test case set. The test case set includes tests for controls such as text boxes and buttons, as well as a set of search and replace operations, insertion operations, and interface test cases.

[0083] This embodiment provides a method to obtain a set of test case functions by accessing the initial test environment and selecting the corresponding script configuration file according to the target version, which facilitates subsequent version upgrade testing. Adaptive function sets are generated based on different version numbers to achieve verification in the test environment before and after the upgrade.

[0084] Based on the above embodiments, after obtaining the test case function set in step S14, and before performing the upgrade based on the upgrade test path and the test case function set in step S15, the method further includes:

[0085] Resource pre-embedding and system configuration are performed in the initialization test environment to verify the upgraded target version after the upgrade is completed.

[0086] Specifically, this involves pre-planning resources and configuring the system before performing the upgrade. Resources are used to create environment resources for virtual machines, and system configuration is used to simulate the client environment. Pre-planning resources mainly reserves resources for system daemons and components, so that even if the node is running at full load, there will be no contention for resources that could cause the node to crash.

[0087] The resource pre-installation and system configuration provided in this embodiment are mainly used to verify the upgraded version number, verify the resources and system configuration before the upgrade, and check the environmental status after the upgrade in terms of scripts after the upgrade test is completed.

[0088] This embodiment provides a method for pre-installing resources and configuring the system in the initialization test environment to verify the upgraded target version after the upgrade is completed. The upgrade process is based on a cloud platform, covering various real-world customer scenarios and facilitating the verification of the target version upgrade.

[0089] Based on the above embodiments, after upgrading according to the upgrade test path and test case function set in step S15, the method further includes:

[0090] To reclaim resources from cloud servers for future upgrades and testing.

[0091] Understandably, reclaiming cloud server resources after an upgrade serves two purposes: firstly, to reclaim resources configured during the current upgrade process if it fails; and secondly, to reclaim other resources generated during the current upgrade process to prevent resource occupation during subsequent upgrades.

[0092] This embodiment describes a method for reclaiming cloud server resources after an upgrade to facilitate subsequent upgrade testing. This avoids resource waste, saves space occupied by resources, and enables multiple upgrade tests to be completed on a platform with limited resources.

[0093] Based on the above embodiments, after upgrading according to the upgrade test path and test case function set in step S15, the method further includes:

[0094] Call the SDK interface to create a snapshot of the cloud server;

[0095] Collect log information from the cloud server for subsequent verification.

[0096] Specifically, a snapshot is a backup file of the cloud disk data state at a specific point in time. In the event of system failure or erroneous operation, a snapshot can be used to roll back the cloud disk, reducing unnecessary losses. Cloud server snapshots are a data backup method provided by server providers for cloud servers, used to recover data lost due to machine failure or human error. Snapshot technology originates from photography, recording the image content at a specific point in time. Applied to the field of cloud computing storage, snapshot technology has emerged, which preserves data on a specific disk at a specific point in time, serving as a data backup.

[0097] Snapshots can capture the status, data, and hardware configuration of a running cloud server. When a server is attacked, infected with malware, or lost due to human error, the snapshot function can easily retrieve all important files and data from before.

[0098] Collecting cloud server log information serves a similar purpose to snapshots, facilitating verification during the upgrade process. If verification fails, the log information can be used to view the specific details of the upgrade process for subsequent upgrade testing.

[0099] This embodiment provides the ability to call the SDK interface to create a snapshot of the cloud server; collect the cloud server's log information for subsequent verification; and the snapshot function can easily retrieve all previously important files and data.

[0100] The foregoing has described in detail various embodiments of the cloud platform-based upgrade testing method. Based on this, the present invention also discloses a cloud platform-based upgrade testing apparatus corresponding to the aforementioned apparatus and method. Figure 2 This is a structural diagram of an upgrade testing device based on a cloud platform, provided as an embodiment of the present invention. Figure 2 As shown, the upgrade testing device based on the cloud platform includes:

[0101] Module 11 is used to obtain the initial version and target version of the server virtualization software.

[0102] Module 12 is used to determine the upgrade test path based on the initial version and the target version, and to obtain the test configuration file based on the upgrade test path and the corresponding test scale and test scenario combination.

[0103] Create module 13 to initialize the test environment on the cloud platform by creating the test configuration file;

[0104] Select module 14 to obtain the test case function set by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version;

[0105] Upgrade module 15 is used to perform upgrades based on the upgrade test path and test case function set to complete the upgrade test from the initial version to the target version.

[0106] Since the embodiments of the device part correspond to the embodiments described above, please refer to the embodiments described in the method part for the embodiments of the device part, and will not be repeated here.

[0107] This invention provides a cloud platform-based upgrade testing device, comprising: obtaining the initial and target versions of server virtualization software; determining an upgrade test path based on the initial and target versions; obtaining a test configuration file based on the upgrade test path and the corresponding test scale and test scenario combination; creating an initialization test environment on the cloud platform using the test configuration file; obtaining a set of test cases by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version; and performing an upgrade based on the upgrade test path and the set of test cases to complete the upgrade test from the initial version to the target version. This device further obtains the test configuration file through the determined upgrade test path, then configures the cloud platform to create an initialization test environment to specify the version system files, selects the set of test cases applicable to the target version based on version function differences, and uploads and upgrades the upgrade package according to the set of test cases and the upgrade test path. It can not only achieve step-by-step version upgrades but also cross-version upgrades, improving upgrade speed, and providing greater flexibility in the versions being upgraded.

[0108] Figure 3 A structural diagram of another cloud-based upgrade testing device provided in an embodiment of the present invention is shown below. Figure 3 As shown, the device includes:

[0109] Memory 21 is used to store computer programs;

[0110] Processor 22 is used to implement steps of a cloud-based upgrade testing method when executing computer programs.

[0111] The cloud-based upgrade testing device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.

[0112] The processor 22 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 22 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor, also known as the CPU, is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 22 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 22 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.

[0113] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 21 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 22, is capable of implementing the relevant steps of the cloud-based upgrade testing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the cloud-based upgrade testing method, etc.

[0114] In some embodiments, the cloud-based upgrade testing device may further include a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27.

[0115] Those skilled in the field can understand, Figure 3 The structure shown does not constitute a limitation on cloud-based upgrade testing equipment and may include more or fewer components than illustrated.

[0116] The processor 22 implements the cloud-based upgrade testing method provided in any of the above embodiments by calling instructions stored in the memory 21.

[0117] This invention provides a cloud platform-based upgrade testing device, comprising: obtaining the initial and target versions of server virtualization software; determining an upgrade test path based on the initial and target versions; obtaining a test configuration file based on the upgrade test path and the corresponding test scale and test scenario combination; creating an initialization test environment on the cloud platform using the test configuration file; obtaining a set of test cases by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version; and performing an upgrade based on the upgrade test path and the set of test cases to complete the upgrade test from the initial version to the target version. This device further obtains the test configuration file through the determined upgrade test path, then configures the cloud platform to create an initialization test environment to specify the version system files, selects the set of test cases applicable to the target version based on version function differences, and uploads and upgrades the upgrade package according to the set of test cases and the upgrade test path. It can not only achieve step-by-step version upgrades but also cross-version upgrades, improving upgrade speed, and providing greater flexibility in the versions being upgraded.

[0118] Furthermore, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by processor 22, implements the steps of the cloud platform-based upgrade testing method described above.

[0119] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0120] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiments. The present invention will not be described in detail here, but it has the same beneficial effects as the above-described cloud platform-based upgrade testing method.

[0121] As one example, Figure 4 This is an application diagram of a cloud-based upgrade testing device provided in another embodiment of the present invention, such as... Figure 4As shown, the device includes a management device, a scheduling device, a configuration device, a scripting device, and an upgrade device. After determining the version of the server virtualization software to be tested, the management device starts a test task on the test management platform and transmits test parameters to the scheduling device. The scheduling device parses the configuration file information to be tested, calculates the available upgrade path, and transmits the test parameters to the configuration device. Based on the received parameters, the configuration device configures the cloud server to install the specified version of the system software by calling the SDK interface. After deployment, the system testability is verified. The scripting device logs into the environment to be tested, obtains the version information to be tested, executes relevant scripts according to the version, and creates test resources for the applicable version. The upgrade device uploads the upgrade package and performs the upgrade operation according to the current version information and the scheduling device's policy. After the upgrade is completed, the scripting device verifies the status of the upgraded test resources.

[0122] To achieve effective coordination among management devices, scheduling devices, configuration devices, scripting devices, and upgrade devices, the following steps are mainly included:

[0123] Step 1. The scheduling device selects the upgrade test path according to the test version requirements, and the upgrade device uploads the upgrade package according to the path;

[0124] Step 2. The scheduling device schedules test scenarios and test scales, and the configuration device initializes and configures the test environment based on the cloud server on the cloud platform;

[0125] Step 3. The script device identifies the test environment version adaptive function set and verifies the test environment before and after the upgrade.

[0126] The specific implementation process is as follows:

[0127] 1) Determine the upgrade test path to the target version number;

[0128] a. The management device receives input parameters and transmits them to the scheduling device, including the initial version number, the destination version number, the intermediate version numbers that need to be covered and skipped, the software test scale M, and test scenario parameters S such as stress or fault.

[0129] b. The scheduling device calculates all upgrade paths between the initial version number and the destination version number, n(n+1) / 2, where n is the number of version numbers that differ between the initial version number and the destination version number;

[0130] c. The scheduling device iterates through all upgrade paths and removes the remaining available upgrade test paths R that need to skip version numbers and contain overridden version numbers;

[0131] d. The upgrade test path, test scale, and test scenario can be used to form the upgrade test configuration file R*M*S to be tested;

[0132] e. The test ends when there are no upgrade test cases for the scheduling device;

[0133] 2) Configure the device to install and upgrade test case configuration files, and initialize the test environment on the cloud computing platform;

[0134] a. The configuration device parses the configuration file, calls the cloud computing platform software development kit (SDK) interface according to the configuration parameters, creates cloud servers of different sizes and configurations, installs the system on the cloud server, and configures the information of the system under test;

[0135] b. The configuration device calls the SDK to create a snapshot of the cloud server every time the upgrade device completes an upgrade;

[0136] c. Upgrade test cases complete the resource reclamation of cloud servers, enabling multiple upgrade tests to be completed on a limited resource platform;

[0137] d. If the cloud computing platform cannot meet the test scale requirements, the upgrade test will be stopped;

[0138] 3) The script device identifies the version number to be tested and automatically combines the function set.

[0139] a. After the environment under test is initialized, the script device runs, accesses the environment under test, and identifies the version number of the environment under test;

[0140] b. The script device selects the corresponding script configuration file according to the version number to form an automated test case function set, and performs resource pre-installation and system configuration before upgrade on the environment under test;

[0141] c. After the upgrade is completed, the script device verifies the upgraded version number, verifies the resources and system configuration before the upgrade, and inspects the environmental status after the upgrade.

[0142] 4) The upgrade device performs the upgrade according to the upgrade test path selected by the scheduling device, uploads the upgrade package, and automatically executes the upgrade script;

[0143] 5) After the upgrade device is upgraded, it triggers the configuration device to take a snapshot or reclaim the cloud server, and collects the cloud server logs at the same time;

[0144] For a description of the cloud-based upgrade testing device provided in another embodiment of the present invention, please refer to the above method embodiments. The present invention will not be described again here, but it has the same beneficial effects as the cloud-based upgrade testing method described above.

[0145] The above provides a detailed description of the cloud-based upgrade testing method, apparatus, and medium provided by this invention. The various embodiments are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the claims of this invention.

[0146] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A cloud platform-based upgrade testing method, characterized in that, include: Obtain the initial and target versions of the server virtualization software; The upgrade test path is determined based on the initial version and the target version, and the test configuration file is obtained based on the upgrade test path and the corresponding test scale and test scenario combination. The test configuration file is used to create an initial test environment on the cloud platform; By accessing the initialization test environment, the test case function set is obtained by selecting the corresponding script configuration file according to the target version; The upgrade is performed according to the upgrade test path and the set of test cases to complete the upgrade test from the initial version to the target version. Correspondingly, determining the upgrade test path based on the initial version and the target version includes: Obtain the version numbers that are overwritten and skipped between the initial version and the target version; Determine the initial upgrade path between the initial version and the target version based on the relationship between the initial version and the target version; The initial upgrade path is traversed to filter out the version numbers that are covered and skipped to obtain the upgrade test path; Correspondingly, the step of creating an initial test environment on the cloud platform using the test configuration file includes: The test configuration file is parsed to obtain configuration parameters and information about the system under test; Based on the configuration parameters, the corresponding SDK interface of the cloud platform software is invoked to create multiple scale and cloud servers; Configure the system information under test on multiple cloud servers to create the initialization test environment; Correspondingly, the step of obtaining the test case function set by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version includes: The target version is identified by accessing the initialization test environment; The corresponding script configuration file is selected based on the target version to form the set of use case functions.

2. The upgrade testing method based on a cloud platform according to claim 1, characterized in that, After obtaining the set of use case functions, and before performing the upgrade based on the upgrade test path and the set of use case functions, the method further includes: Resource pre-embedding and system configuration are performed in the initialization test environment to verify the upgraded target version after the upgrade is completed.

3. The upgrade testing method based on a cloud platform according to claim 1, characterized in that, After upgrading according to the upgrade test path and the test case function set, the process further includes: The cloud server resources will be reclaimed for subsequent upgrade testing.

4. The upgrade testing method based on a cloud platform according to claim 1, characterized in that, After upgrading according to the upgrade test path and the test case function set, the process further includes: The SDK interface is invoked to create a snapshot of the cloud server; Collect the log information of the cloud server for subsequent verification.

5. An upgrade testing device based on a cloud platform, characterized in that, include: The acquisition module is used to obtain the initial and target versions of the server virtualization software. The determination module is used to determine the upgrade test path based on the initial version and the target version, and to obtain the test configuration file based on the upgrade test path and the corresponding test scale and test scenario combination. A module is created to initialize the test environment on the cloud platform using the test configuration file. The selection module is used to obtain a set of test case functions by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version. The upgrade module is used to perform upgrades according to the upgrade test path and the test case function set to complete the upgrade test from the initial version to the target version; Correspondingly, determining the upgrade test path based on the initial version and the target version includes: Obtain the version numbers that are overwritten and skipped between the initial version and the target version; Determine the initial upgrade path between the initial version and the target version based on the relationship between the initial version and the target version; The initial upgrade path is traversed to filter out the version numbers that are covered and skipped to obtain the upgrade test path; Correspondingly, the step of creating an initial test environment on the cloud platform using the test configuration file includes: The test configuration file is parsed to obtain configuration parameters and information about the system under test; Based on the configuration parameters, the corresponding SDK interface of the cloud platform software is invoked to create multiple scale and cloud servers; Configure the system information under test on multiple cloud servers to create the initialization test environment; Correspondingly, the step of obtaining the test case function set by accessing the initialization test environment and selecting the corresponding script configuration file according to the target version includes: The target version is identified by accessing the initialization test environment; The corresponding script configuration file is selected based on the target version to form the set of use case functions.

6. An upgrade testing device based on a cloud platform, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the cloud-based upgrade testing method as described in any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the cloud-based upgrade testing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Upgrading test method and device, electronic equipment and storage medium

    CN113836026A

  • Differential package upgrading method and system, intelligent electronic equipment and storage medium

    CN114610366A