Server test environment migration method and system, electronic device and storage medium

CN115470111BActive Publication Date: 2026-08-07INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2022-08-25
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

然而却不适用于服务器测试的实际情况,无法实现在不同操作环境下搭建相似测试环境的需求

Benefits of technology

[0049]本申请提供了一种服务器测试环境迁移方法,包括:获取待迁移服务器的待迁移测试环境对应的软件环境特征值以及固件环境特征值并发送至测试环境系统库;查询待迁移服务器对应的第一操作系统以及目标服务器对应的第二操作系统;若所述第一操作系统与所述第二操作系统不一致,则利用所述测试环境系统库基于预设的操作系统对照表查询所述软件环境特征值、固件环境特征值在所述第二操作系统下对应的第一环境脚本;在所述目标服务器中运行所述第一环境脚本,以将所述待迁移测试环境迁移至所述目标服务器中。解决了在测试过程中切换操作系统环境的问题,可以实现相同操作系统服务器测试环境的快速复制,不同操作系统下快速构建相似测试环境以达到服务器测试环境复现的功能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115470111B_ABST
    Figure CN115470111B_ABST
Patent Text Reader

Abstract

The application provides a server test environment migration method and system, electronic equipment and storage medium, comprising: obtaining software environment characteristic values and firmware environment characteristic values corresponding to a to-be-migrated test environment of a to-be-migrated server and sending the values to a test environment system library; querying a first operating system corresponding to the to-be-migrated server and a second operating system corresponding to a target server; if the first operating system is inconsistent with the second operating system, using the test environment system library to query first environment scripts corresponding to the software environment characteristic values and the firmware environment characteristic values under the second operating system based on a preset operating system comparison table; and running the first environment scripts in the target server to migrate the to-be-migrated test environment to the target server. The application realizes rapid copying of server test environments of the same operating system, rapid construction of similar test environments under different operating systems, and the function of reproducing server test environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server technology, and in particular to a method, system, electronic device, and storage medium for migrating a server test environment. Background Technology

[0002] In server testing, it's necessary to test the server's performance under different operating systems. When a component fails during testing, switching to a different operating system to control variables is a common testing method. This usually requires test engineers to manually migrate the server test environment: by recording a series of parameters including operating system, software version, environment, and configuration variables, the test environment is reproduced manually on different test servers. However, when the operating environments for comparison testing differ significantly, such as Windows 2022 and Red Hat 8.4, engineers need to manually select the software that runs in the new environment, based on the tools used in the old environment. Furthermore, for developers, if they cannot arrive at the test server location in time, relying solely on the test engineer's description of the problem environment often leads to inaccuracies, making problem reproduction difficult and hindering accurate problem resolution.

[0003] In the current technological environment, to address the low efficiency and error-prone nature of manual installation, a method can be adopted that automates software environment detection, generates parameter tables, and automatically configures the software environment according to the tables; for example, CN1184561C. For personal computers, existing technology can use registration code scanning to collect the device's running software and settings, and then restore the office environment on another device via the registry; for example, TW200608212A. These existing solutions can detect the operating system's working environment, transmit environment information by generating identification codes, and restore the test environment under the same operating system. However, they are not suitable for the actual situation of server testing and cannot meet the need to build similar test environments under different operating conditions. Testers still need to manually compare the environment requirements of different operating systems and manually build the server test environment.

[0004] Therefore, there is an urgent need for a method that can migrate server testing environments under different operating systems to solve the aforementioned technical problems of existing technologies. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the main objective of this invention is to provide a server testing environment migration method, system, electronic device, and storage medium to solve the aforementioned technical problems of existing technologies.

[0006] To achieve the above objectives, in a first aspect, the present invention provides a method for migrating a server testing environment, the method comprising:

[0007] Obtain the software environment characteristic value and firmware environment characteristic value corresponding to the test environment of the server to be migrated and send them to the test environment system library;

[0008] Query the first operating system of the server to be migrated and the second operating system of the target server;

[0009] If the first operating system is inconsistent with the second operating system, the test environment system library is used to query the first environment script corresponding to the software environment feature value and firmware environment feature value under the second operating system based on the preset operating system lookup table;

[0010] The first environment script is run on the target server to migrate the test environment to the target server.

[0011] In some embodiments, the first environment script that uses a test environment system library to query the software environment feature value and firmware environment feature value corresponding to the second operating system based on a preset operating system lookup table includes:

[0012] The test environment system library queries the target similar software and target similar firmware corresponding to the software environment feature value and the firmware environment feature value under the second operating system based on the operating system lookup table.

[0013] The test environment system generates the first environment script based on the target similar software and the corresponding setting and installation method of the target similar firmware.

[0014] In some embodiments, the method further includes:

[0015] If the first operating system is the same as the second operating system, then the second environment script is determined using the environment testing library based on the software environment feature value and the firmware environment feature value;

[0016] The second environment script is run on the target server to copy the test environment to be migrated to the target server.

[0017] In some embodiments, the test environment system library maintains the software and firmware information required for server testing in the form of feature values, and records the operating system lookup table;

[0018] The operating system lookup table is used to record the correspondence between similar software and similar firmware under different operating systems.

[0019] In some embodiments, obtaining the software environment feature values ​​and firmware environment feature values ​​corresponding to the test environment of the server to be migrated and sending them to the test environment system library further includes:

[0020] The software environment feature values ​​are compared with the software information feature values ​​maintained in the test environment system library.

[0021] If the software information feature values ​​that have been maintained include the software environment feature values, then they are directly stored in the test environment system library;

[0022] If the software environment feature value is not included in the maintained software information feature value, a first user confirmation request is generated to prompt the operator to confirm whether it is necessary to copy the software corresponding to the software environment feature value and / or select similar software that already exists in the test environment system library.

[0023] In some embodiments, the method further includes:

[0024] If the operator confirms that the software corresponding to the software environment feature value needs to be copied, then the software environment feature value is stored in the test environment system library;

[0025] If the operator selects a similar software that already exists in the test environment system library, the feature value corresponding to the similar software will be used as the software environment feature value and stored in the test environment system library.

[0026] In some embodiments, obtaining the software environment feature values ​​and firmware environment feature values ​​corresponding to the test environment of the server to be migrated and sending them to the test environment system library further includes:

[0027] Based on the firmware environment feature values, compare them with the firmware information feature values ​​maintained in the test environment system library;

[0028] If the firmware information feature values ​​that have been maintained contain the firmware environment feature values, then they are directly stored in the test environment system library.

[0029] If the firmware environment feature value is not included in the maintained firmware information feature value, a second user confirmation request is generated to prompt the operator to select a similar firmware that already exists in the test environment system library.

[0030] The feature values ​​corresponding to similar firmware that already exist in the test environment system library selected by the user are used as the firmware environment feature values ​​and stored in the test environment system library.

[0031] Secondly, this application provides a server testing environment migration system, the system comprising:

[0032] The environment identification module is used to obtain the software environment feature value and firmware environment feature value corresponding to the test environment of the server to be migrated and send them to the test environment system library.

[0033] The data processing module is used to query the first operating system corresponding to the server to be migrated and the second operating system corresponding to the target server.

[0034] The data processing module is also used to query the first environment script corresponding to the software environment feature value and firmware environment feature value under the second operating system when the first operating system and the second operating system are inconsistent, using the test environment system library based on a preset operating system lookup table;

[0035] The environment reproduction module is used to run the first environment script on the target server to migrate the test environment to be migrated to the target server.

[0036] Thirdly, this application provides an electronic device, the electronic device comprising:

[0037] One or more processors;

[0038] and a memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the following operations:

[0039] Obtain the software environment characteristic value and firmware environment characteristic value corresponding to the test environment of the server to be migrated and send them to the test environment system library;

[0040] Query the first operating system of the server to be migrated and the second operating system of the target server;

[0041] If the first operating system is inconsistent with the second operating system, the test environment system library is used to query the first environment script corresponding to the software environment feature value and firmware environment feature value under the second operating system based on the preset operating system lookup table;

[0042] The first environment script is run on the target server to migrate the test environment to the target server.

[0043] Fourthly, this application also provides a computer-readable storage medium storing a computer program that causes a computer to perform the following operations:

[0044] Obtain the software environment characteristic value and firmware environment characteristic value corresponding to the test environment of the server to be migrated and send them to the test environment system library;

[0045] Query the first operating system of the server to be migrated and the second operating system of the target server;

[0046] If the first operating system is inconsistent with the second operating system, the test environment system library is used to query the first environment script corresponding to the software environment feature value and firmware environment feature value under the second operating system based on the preset operating system lookup table;

[0047] The first environment script is run on the target server to migrate the test environment to the target server.

[0048] The beneficial effects achieved by this application are as follows:

[0049] This application provides a method for migrating a server test environment, comprising: obtaining software environment feature values ​​and firmware environment feature values ​​corresponding to the test environment of the server to be migrated and sending them to a test environment system library; querying a first operating system corresponding to the server to be migrated and a second operating system corresponding to the target server; if the first operating system and the second operating system are inconsistent, using the test environment system library to query a first environment script corresponding to the software environment feature values ​​and firmware environment feature values ​​under the second operating system based on a preset operating system lookup table; and running the first environment script on the target server to migrate the test environment to be migrated to the target server. This method solves the problem of switching operating system environments during testing, enabling rapid replication of server test environments with the same operating system and rapid construction of similar test environments under different operating systems to achieve server test environment reproduction. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:

[0051] Figure 1 This is a schematic diagram of the server test environment migration method provided in the embodiments of this application;

[0052] Figure 2 This is a flowchart of the server test environment migration method provided in the embodiments of this application;

[0053] Figure 3 This is a diagram of the server test environment migration system architecture provided in the embodiments of this application;

[0054] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

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

[0056] It should be understood that, in the description of this application, unless the context explicitly requires it, the words "comprising," "including," and similar terms throughout the specification and claims should be interpreted as encompassing rather than being exclusive or exhaustive; that is, meaning "including but not limited to."

[0057] It should also be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0058] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0059] As can be seen from the background technology, existing technologies address the problems of low efficiency and error-proneness in manually configuring the operating system environment by manually installing corresponding test software and drivers. A solution based on automatic environment detection and automatic configuration of the software environment after confirming the parameter table has been proposed; however, this solution can only be implemented under the same operating system.

[0060] To address the aforementioned technical issues, this application presents a method applicable to different operating systems for migrating server testing environments; this solves the problem of needing to build the same testing environment to quickly switch operating system environments during server testing.

[0061] Example 1

[0062] like Figure 1 As shown, this application provides a method for migrating a server test environment. Specifically, the process of reproducing a server test environment using the method disclosed in this embodiment includes:

[0063] S1. Obtain the software environment characteristics and firmware environment characteristics of the server to be migrated.

[0064] Specifically, environment identification software, including a software environment identification system and a firmware environment identification system, can be installed via remote access or a function disk. Both systems are implemented by staff using code. The software environment identification system uses automated programs to detect all software information in the operating environment, including operating system information, installed software information, and software and hardware driver information. The firmware environment identification system automatically obtains firmware information such as server firmware status, firmware version, and firmware settings by communicating with the server's onboard controllers, such as the BIOS and BMC.

[0065] According to preset rules, the identified software information is converted into software environment feature values, and the identified firmware information is converted into firmware environment feature values. These preset rules can be configured according to specific user needs, specifically for the categorization and management of different types of information; for example, a certain version of software is recorded with the feature value R-AXXX-001, while subsequent versions are recorded with R-AXXX-A002; firmware information can be recorded in the format G-XXX-00X. These rules can be automatically accumulated and imported after being customized according to user needs, or the feature values ​​can be manually configured. It is worth noting that the server to be migrated corresponds to multiple software environment feature values ​​and firmware environment feature values.

[0066] S2, the test environment system library receives and stores the software environment characteristic values ​​and firmware environment characteristic values ​​of the server to be migrated.

[0067] The test environment system library manages all software and firmware information required for server testing using feature values. Software information includes automated execution steps such as software operation flows, while firmware information includes automated execution steps such as firmware setup methods. The library maintains all stored software and firmware information using a categorized storage and centralized retrieval method. It can retrieve all software and firmware information within the library based on feature values ​​and send the corresponding information to a designated address as needed. Furthermore, the library records an operating system lookup table, which records the correspondence between similar software and firmware under different operating systems. This table represents the correspondence between the test environments required for similar tests under different operating systems; for example, the relationship between the test environment required for performance testing of a component under Windows 2022 and the test environment required for similar performance testing of the same component under Red Hat 8.4.

[0068] The specific process of storing the software environment characteristics and firmware environment characteristics of the server to be migrated in the test environment system library includes:

[0069] The software environment feature values ​​of the server to be migrated are compared with the software information feature values ​​maintained in the environment system library. If the maintained software information feature values ​​include the aforementioned software environment feature values, they are directly stored in a specific area of ​​the test environment system library. If the maintained software information feature values ​​do not include some software environment feature values ​​of the server to be migrated, a first user confirmation request is generated to prompt the operator to determine whether, based on testing requirements, it is necessary to copy the software corresponding to the software environment feature value or to select a similar software already existing in the test environment system library to replace the software corresponding to the software environment feature value. If the operator confirms that the software corresponding to the software environment feature value needs to be copied, the software environment feature value is stored in a specific area of ​​the test environment system library; if the operator chooses to use a similar software already existing in the test environment system library for replacement, the feature value corresponding to the similar software is used as one of the software environment feature values ​​of the server to be migrated and stored in a specific area of ​​the test environment system library. The first user confirmation request may appear as a pop-up window to prompt the operator.

[0070] The firmware environment feature value of the server to be migrated is compared with the firmware information feature value maintained in the environment system library. If the maintained firmware information feature value includes the aforementioned firmware environment feature value, it is directly stored in a specific area of ​​the test environment system library. If the maintained firmware information feature value does not include the firmware environment feature value, a second user confirmation request is generated to prompt the operator to select a similar firmware already existing in the test environment system library. The second user confirmation request can be presented as a pop-up window. The feature value corresponding to the similar firmware already existing in the test environment system library selected by the user is used as one of the firmware environment feature values ​​corresponding to the server to be migrated and stored in a specific area of ​​the test environment system library. The specific area is used to store the software environment feature value and firmware environment feature value corresponding to the server to be migrated.

[0071] S3. Determine the environment script for reproducing the test environment based on the target server; run the environment script on the target server to migrate the test environment to the target server.

[0072] Specifically, the system queries the first operating system of the server to be migrated and the second operating system of the target server. If the first operating system is not the same as the second operating system (i.e., the server to be migrated and the target server are two different operating systems), it reads the software environment characteristic values ​​and firmware environment characteristic values ​​of the server to be migrated from a specific area of ​​the test environment system library. Using the correspondence between different operating systems stored in the operating system lookup table, it reads the similar software and firmware corresponding to the software environment characteristic values ​​and firmware environment characteristic values ​​of the server to be migrated under the second operating system environment, and encapsulates the setup and installation methods of the similar software and firmware into a first environment script. If the first operating system is the same as the second operating system, it only needs to read the software environment characteristic values ​​and firmware environment characteristic values ​​of the server to be migrated from a specific area of ​​the test environment system library, retrieve the corresponding software and firmware based on these characteristic values, and encapsulate the setup and installation methods of the corresponding software and firmware into a second environment script.

[0073] Preferably, an environment reproduction system can be set up on the target server to automatically download the first and second environment scripts for environment reproduction from the test environment system library. After downloading the environment scripts required for the reproduction environment, the environment reproduction system executes the environment scripts to automatically install the software environment required for the test environment of the server to be migrated, and modifies the settings of the corresponding server software, firmware, and other items to complete the environment migration under the same operating system and different operating systems. The firmware settings can be implemented through flashing or self-refreshing.

[0074] This application enables the reproduction of the environment required for testing similar servers under different operating systems, avoiding the losses caused by repeatedly building and setting up test environments. At the same time, leveraging the correspondence within the test system improves the accuracy and rigor of environment verification.

[0075] Example 2

[0076] Corresponding to the above embodiment one, as Figure 2 As shown in the figure, this application discloses a method for migrating a server testing environment, as detailed below:

[0077] 2100. Obtain the software environment characteristic value and firmware environment characteristic value corresponding to the test environment of the server to be migrated and send them to the test environment system library;

[0078] The test environment system library maintains the software and firmware information required for server testing in the form of feature values, and records the operating system lookup table.

[0079] The operating system lookup table is used to record the correspondence between similar software and similar firmware under different operating systems.

[0080] Preferably, the step of obtaining the software environment feature values ​​and firmware environment feature values ​​corresponding to the test environment of the server to be migrated and sending them to the test environment system library further includes:

[0081] 2110. Compare the software information feature values ​​maintained in the test environment system library with the software environment feature values ​​described above;

[0082] 2120. If the software environment feature value is included in the maintained software information feature value, it shall be directly stored in the test environment system library;

[0083] 2130. If the software environment feature value is not included in the maintained software information feature value, a first user confirmation request is generated to prompt the operator to confirm whether it is necessary to copy the software corresponding to the software environment feature value and / or select similar software that already exists in the test environment system library.

[0084] Preferably, the method further includes:

[0085] 2140. If the operator confirms that the software corresponding to the software environment feature value needs to be copied, then the software environment feature value is stored in the test environment system library;

[0086] 2150. If the operator selects a similar software that already exists in the test environment system library, then the feature value corresponding to the similar software is used as the software environment feature value and stored in the test environment system library.

[0087] Preferably, the step of obtaining the software environment feature values ​​and firmware environment feature values ​​corresponding to the test environment of the server to be migrated and sending them to the test environment system library further includes:

[0088] 2160. Compare the firmware environment feature values ​​with the firmware information feature values ​​maintained in the test environment system library;

[0089] 2170. If the firmware information feature value already maintained contains the firmware environment feature value, then it is directly stored in the test environment system library.

[0090] 2180. If the firmware environment feature value is not included in the maintained firmware information feature value, a second user confirmation request is generated to prompt the operator to select a similar firmware that already exists in the test environment system library.

[0091] 2190. The feature values ​​corresponding to similar firmware already existing in the test environment system library selected by the user are used as the firmware environment feature values ​​and stored in the test environment system library.

[0092] 2200. Query the first operating system of the server to be migrated and the second operating system of the target server;

[0093] 2300. If the first operating system is inconsistent with the second operating system, the test environment system library is used to query the first environment script corresponding to the software environment feature value and firmware environment feature value under the second operating system based on the preset operating system lookup table;

[0094] Preferably, the step of using the test environment system library to query the software environment feature value and firmware environment feature value corresponding to the first environment script under the second operating system based on a preset operating system lookup table includes:

[0095] 2310. The test environment system library queries the target similar software and target similar firmware corresponding to the software environment feature value and the firmware environment feature value under the second operating system based on the operating system lookup table.

[0096] 2320. The test environment system generates the first environment script according to the setting and installation method corresponding to the target similar software and the target similar firmware.

[0097] 2400. Run the first environment script on the target server to migrate the test environment to be migrated to the target server.

[0098] Preferably, the method further includes:

[0099] 2500. If the first operating system is the same as the second operating system, then the second environment script is determined using the environment testing library based on the software environment feature value and the firmware environment feature value.

[0100] 2600. Run the second environment script on the target server to copy the test environment to be migrated to the target server.

[0101] Example 3

[0102] like Figure 3 As shown, corresponding to Embodiments 1 and 2 above, this application provides a server test environment migration system, the system comprising:

[0103] The environment identification module 310 is used to obtain the software environment feature value and firmware environment feature value corresponding to the test environment of the server to be migrated and send them to the test environment system library. The test environment system library maintains the software information and firmware information required in the server test in the form of feature values, and records the operating system lookup table. The operating system lookup table is used to record the correspondence between similar software and similar firmware under different operating systems.

[0104] Data processing module 320 is used to query the first operating system corresponding to the server to be migrated and the second operating system corresponding to the target server;

[0105] The data processing module 320 is further configured to, when the first operating system and the second operating system are inconsistent, use the test environment system library to query the first environment script corresponding to the software environment feature value and firmware environment feature value under the second operating system based on a preset operating system lookup table;

[0106] The environment reproduction module 330 is used to run the first environment script on the target server to migrate the test environment to be migrated to the target server.

[0107] In some embodiments, the data processing module 320 is further configured to use the test environment system library to query the target similar software and target similar firmware corresponding to the software environment feature value and the firmware environment feature value under the second operating system based on the operating system lookup table; the data processing module 320 is further configured to use the test environment system to generate the first environment script according to the setting and installation method corresponding to the target similar software and target similar firmware.

[0108] In some embodiments, the data processing module 320 is further configured to determine a second environment script based on the software environment feature value and firmware environment feature value using the environment testing library when the first operating system and the second operating system are the same; the environment reproduction module 330 is further configured to run the second environment script on the target server to copy the test environment to be migrated to the target server.

[0109] In some embodiments, the environment identification module 310 is further configured to compare the software environment feature value with the software information feature value maintained in the test environment system library; the environment identification module 310 is further configured to directly store the software environment feature value in the test environment system library when the software environment feature value is included in the maintained software information feature value; the environment identification module 310 is further configured to generate a first user confirmation request to prompt the operator to confirm whether it is necessary to copy the software corresponding to the software environment feature value and / or select similar software that already exists in the test environment system library when the software environment feature value is not included in the maintained software information feature value.

[0110] In some embodiments, the environment identification module 310 is further configured to store the software environment feature value to the test environment system library when the operator confirms that the software corresponding to the software environment feature value needs to be copied; the environment identification module 310 is further configured to use the feature value corresponding to the similar software as the software environment feature value and store it in the test environment system library when the operator selects similar software that already exists in the test environment system library.

[0111] In some embodiments, the environment identification module 310 is further configured to compare the firmware environment feature value with the firmware information feature value maintained in the test environment system library; the environment identification module 310 is further configured to directly store the firmware environment feature value in the maintained firmware information feature value when the firmware environment feature value is included; the environment identification module 310 is further configured to generate a second user confirmation request to prompt the operator to select a similar firmware already existing in the test environment system library when the firmware environment feature value is not included in the maintained firmware information feature value; the environment identification module 310 is further configured to use the feature value corresponding to the similar firmware already existing in the test environment system library selected by the user as the firmware environment feature value and store it in the test environment system library.

[0112] Example 4

[0113] Corresponding to all the above embodiments, this application provides an electronic device, including:

[0114] One or more processors; and memory associated with the one or more processors, the memory storing program instructions that, when read and executed by the one or more processors, perform the following operations:

[0115] In some implementation scenarios, the following operations are also performed: obtain the software environment feature value and firmware environment feature value corresponding to the test environment to be migrated of the server to be migrated and send them to the test environment system library;

[0116] Query the first operating system of the server to be migrated and the second operating system of the target server;

[0117] If the first operating system is inconsistent with the second operating system, the test environment system library is used to query the first environment script corresponding to the software environment feature value and firmware environment feature value under the second operating system based on the preset operating system lookup table;

[0118] The first environment script is run on the target server to migrate the test environment to the target server.

[0119] in, Figure 4An exemplary architecture of an electronic device is shown, which may include a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, and a memory 420. The processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, and memory 420 can communicate with each other via a bus 430.

[0120] The processor 410 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to achieve the technical solution provided in this application.

[0121] The memory 420 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 420 can store the operating system 421 for controlling the execution of the electronic device 400, and the basic input / output system (BIOS) 422 for controlling the low-level operations of the electronic device 400. Additionally, it can store a web browser 423, a data storage management system 424, and an icon font processing system 425, etc. The aforementioned icon font processing system 425 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when the technical solution provided in this application is implemented through software or firmware, the relevant program code is stored in the memory 420 and is called and executed by the processor 410.

[0122] Input / output interface 413 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0123] Network interface 414 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0124] Bus 430 includes a pathway for transmitting information between various components of the device, such as processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, and memory 420.

[0125] In addition, the electronic device 400 can also obtain information on specific claim conditions from the virtual resource object claim condition information database for use in condition judgment, etc.

[0126] It should be noted that although the above-described device only shows the processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, memory 420, bus 430, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.

[0127] Example 6

[0128] Corresponding to all the above embodiments, this application also provides a computer-readable storage medium, characterized in that it stores a computer program that causes a computer to operate as follows:

[0129] Obtain the software environment characteristic value and firmware environment characteristic value corresponding to the test environment of the server to be migrated and send them to the test environment system library;

[0130] Query the first operating system of the server to be migrated and the second operating system of the target server;

[0131] If the first operating system is inconsistent with the second operating system, the test environment system library is used to query the first environment script corresponding to the software environment feature value and firmware environment feature value under the second operating system based on the preset operating system lookup table;

[0132] The first environment script is run on the target server to migrate the test environment to the target server.

[0133] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a cloud server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0134] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0135] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for migrating a server testing environment, characterized in that, The method includes: The system acquires the software environment characteristic values ​​and firmware environment characteristic values ​​corresponding to the test environment of the server to be migrated and sends them to the test environment system library. The software environment characteristic values ​​are generated by an automated program that detects and converts the operating system information, installed software information, and hardware / software driver information of the server to be migrated according to preset rules. The firmware environment characteristic values ​​are generated by communicating with the onboard controller to acquire the firmware information of the server to be migrated and converting it according to preset rules. The test environment system library maintains the software and firmware information required for server testing in the form of characteristic values, and records the operating system lookup table. The operating system lookup table records the correspondence between similar software and similar firmware under different operating systems. Query the first operating system of the server to be migrated and the second operating system of the target server; If the first operating system and the second operating system are inconsistent, the test environment system library queries the software environment feature value and the firmware environment feature value under the second operating system based on the operating system lookup table to find the target similar software and target similar firmware. The test environment system generates a first environment script according to the setting and installation method corresponding to the target similar software and target similar firmware. The first environment script is run on the target server to migrate the test environment to be migrated to the target server; If the first operating system is the same as the second operating system, then the second environment script is determined using the environment testing library based on the software environment feature value and the firmware environment feature value; The second environment script is run on the target server to copy the test environment to be migrated to the target server.

2. The method according to claim 1, characterized in that, The step of obtaining the software environment feature values ​​and firmware environment feature values ​​corresponding to the test environment of the server to be migrated and sending them to the test environment system library also includes: The software environment feature values ​​are compared with the software information feature values ​​maintained in the test environment system library. If the software information feature values ​​that have been maintained include the software environment feature values, then they are directly stored in the test environment system library; If the software environment feature value is not included in the maintained software information feature value, a first user confirmation request is generated to prompt the operator to confirm whether it is necessary to copy the software corresponding to the software environment feature value and / or select similar software that already exists in the test environment system library.

3. The method according to claim 1, characterized in that, The method further includes: If the operator confirms that the software corresponding to the software environment feature value needs to be copied, then the software environment feature value is stored in the test environment system library; If the operator selects a similar software that already exists in the test environment system library, the feature value corresponding to the similar software will be used as the software environment feature value and stored in the test environment system library.

4. The method according to claim 3, characterized in that, The step of obtaining the software environment feature values ​​and firmware environment feature values ​​corresponding to the test environment of the server to be migrated and sending them to the test environment system library also includes: Based on the firmware environment feature values, compare them with the firmware information feature values ​​maintained in the test environment system library; If the firmware information feature values ​​that have been maintained contain the firmware environment feature values, then they are directly stored in the test environment system library. If the firmware environment feature value is not included in the maintained firmware information feature value, a second user confirmation request is generated to prompt the operator to select a similar firmware that already exists in the test environment system library. The feature values ​​corresponding to similar firmware that already exist in the test environment system library selected by the user are used as the firmware environment feature values ​​and stored in the test environment system library.

5. A server test environment migration system, characterized in that, The system includes: The environment identification module is used to acquire the software environment feature values ​​and firmware environment feature values ​​corresponding to the test environment of the server to be migrated and send them to the test environment system library. The software environment feature values ​​are generated by an automated program that detects and converts the operating system information, installed software information, and hardware / software driver information of the server to be migrated according to preset rules. The firmware environment feature values ​​are generated by acquiring the firmware information of the server to be migrated through communication with the onboard controller and converting it according to preset rules. The test environment system library maintains the software and firmware information required for server testing in the form of feature values, and records the operating system lookup table. The operating system lookup table records the correspondence between similar software and similar firmware under different operating systems. The data processing module is used to query the first operating system corresponding to the server to be migrated and the second operating system corresponding to the target server. The data processing module is further configured to, when the first operating system and the second operating system are inconsistent, query the software environment feature value and the firmware environment feature value corresponding to the target similar software and target similar firmware under the second operating system based on the operating system lookup table; and generate a first environment script according to the setting and installation method corresponding to the target similar software and target similar firmware. When the first operating system and the second operating system are the same, the second environment script is determined using the environment testing library based on the software environment feature value and the firmware environment feature value; The environment reproduction module is used to run the first environment script on the target server to migrate the test environment to be migrated to the target server, or to run the second environment script on the target server to copy the test environment to be migrated to the target server.

6. An electronic device, characterized in that, The electronic device includes: One or more processors; And a memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the method of any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, It stores a computer program that causes the computer to perform the method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Method, device for structure actuation enviroment

    CN1184561C

  • Computer working environment switching system and method

    TW200608212A

  • Method for determining compatibility between different versions of device drivers and operating systems of e.g. mobile computer apparatus, involves determining compatibility of driver to actual system under application of test environment

    DE102013013192A1