CN111611160B - Software testing method, device, equipment and storage medium - Google Patents

Software testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111611160B
CN111611160B CN202010412614.6A CN202010412614A CN111611160B CN 111611160 B CN111611160 B CN 111611160B CN 202010412614 A CN202010412614 A CN 202010412614A CN 111611160 B CN111611160 B CN 111611160B
Authority
CN
China
Prior art keywords
version
software
installation package
snapshot
soft connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010412614.6A
Other languages
Chinese (zh)
Other versions
CN111611160A (en
Inventor
刘洋
杨腾达
亓开元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Guangdong Inspur Smart Computing Technology Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202010412614.6A priority Critical patent/CN111611160B/en
Publication of CN111611160A publication Critical patent/CN111611160A/en
Application granted granted Critical
Publication of CN111611160B publication Critical patent/CN111611160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version

Abstract

The application discloses a software testing method, which comprises the following steps: establishing soft connection of an installation package to be used, wherein the installation package to be used at least comprises an installation package of a first version of software to be detected; configuring a testing basic environment; creating a snapshot of the system state; when a test request for a second version of the software to be tested exists, the system state is restored based on the snapshot; and replacing the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, installing and deploying the second version by using the soft connection of the installation package of the second version in a test basic environment, and testing the second version. By applying the technical scheme provided by the embodiment of the application, the time consumed by a large amount of repeated work can be reduced, the environment deployment process is simplified when the new software version is tested, the testing efficiency is improved, and the overall development progress is accelerated. The application also discloses a software testing device, equipment and a storage medium, which have corresponding technical effects.

Description

Software testing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a software testing method, apparatus, device, and storage medium.
Background
With the rapid development of computer technology, various functional software is gradually increased. Before the software is delivered for use, the software needs to be tested to ensure the usability, stability and the like of functions. When software testing is carried out, a complete testing environment needs to be built and deployed. If different versions of the same software are to be tested, a redeployment of the test environment is typically required.
Taking the test of Ambari (deployment monitoring and operation and maintenance management tools of big data components and clusters) as an example, when a new version of Ambari needs to be tested, the existing environment needs to be cleared, for example, the existing environment is cleared by a mode of restoring a system, then a modified part is placed into the Ambari and the component as an ISO file, the packed ISO file needs to be downloaded into the restored system to install and deploy Ambari, and the Ambari test can be carried out after the installation is finished.
The software new version is tested in a mode of redeploying the test environment, the deployment process is complicated, long time is consumed, the test efficiency is low, and the whole development progress is easy to slow.
Disclosure of Invention
The application aims to provide a software testing method, a software testing device, software testing equipment and a software testing storage medium, so that an environment deployment process is simplified when a new software version is tested, testing efficiency is improved, and the overall development progress is accelerated.
In order to solve the technical problem, the application provides the following technical scheme:
a software testing method, comprising:
establishing soft connection of an installation package to be used, wherein the installation package to be used at least comprises an installation package of a first version of software to be detected;
configuring a testing basic environment;
creating a snapshot of a system state based on the soft connection and the test base environment;
when a test request for a second version of the software to be tested exists, recovering the system state based on the snapshot, wherein the second version is any version of the software to be tested except the first version;
and replacing the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, installing and deploying the second version by using the soft connection of the installation package of the second version in the test basic environment, and testing the second version.
In a specific embodiment of the present application, the establishing a soft connection of an installation package to be used includes:
creating a folder corresponding to a directory where an installation package to be used is located;
and creating the soft connection of the installation packages to be used in the corresponding directory in each folder in a batch mode.
In a specific embodiment of the present application, the creating a snapshot of the system state includes:
if the test basic environment is a virtual machine environment, taking a snapshot of the system state by using a snapshot function of virtual machine software;
and if the test basic environment is the physical machine environment, making a snapshot of the system state by using a snapshot tool.
In a specific embodiment of the present application, the software to be tested is Ambari, and the configuring a test basic environment includes:
modifying configuration information in the configuration file, wherein the configuration information at least comprises host information, network card information and gateway information;
configuring a secure shell protocol (SSH) secret-free;
installing basic software, wherein the basic software at least comprises a development kit JDK, a network time protocol NTP, a hypertext transfer protocol HTTP and a relational database MySQL;
and modifying yum the source address of the Ambari installation source to the address of the soft connection of the Ambari installation package.
In a specific embodiment of the present application, the software to be tested is an component of Ambari, and the configuring a test basic environment includes:
modifying configuration information in the configuration file, wherein the configuration information at least comprises host information, network card information and gateway information;
configuring a secure shell protocol (SSH) secret-free;
installing basic software, wherein the basic software at least comprises a development kit JDK, a network time protocol NTP, a hypertext transfer protocol HTTP and a relational database MySQL;
modifying yum the installation source address of Ambari in the source to the address of the soft connection of the Ambari installation package;
installing and configuring Ambari and starting;
and establishing a cluster, and setting a URL (uniform resource locator) of a software library as the address of the soft connection of the component.
In a specific embodiment of the present application, the creating a cluster includes:
setting cluster attribute information;
and installing basic necessary components.
In a particular embodiment of the present application, the installation configuration Ambari comprises:
installing Ambari service;
configuring information of tools required to be used by Ambari;
the database is initialized.
A software testing apparatus comprising:
the software connection establishing module is used for establishing the soft connection of an installation package to be used, wherein the installation package to be used at least comprises an installation package of a first version of software to be detected;
the test basic environment configuration module is used for configuring a test basic environment;
the snapshot creating module is used for creating a snapshot of the system state based on the soft connection and the test basic environment;
a system state recovery module, configured to recover the system state based on the snapshot when there is a test request for a second version of the software to be tested, where the second version is any version of the software to be tested except for the first version;
and the new version testing module is used for replacing the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, installing and deploying the second version by using the soft connection of the installation package of the second version in the testing basic environment, and testing the second version.
A software testing device comprising:
a memory for storing a computer program;
a processor for implementing the steps of any of the above software testing methods when executing the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the software testing method of any one of the preceding claims.
By applying the technical scheme provided by the embodiment of the application, the soft connection of the installation package to be used at least comprising the installation package of the first version of the software to be tested is established, the test basic environment is configured, then the snapshot of the system state is created based on the soft connection and the test basic environment, when the test request for the second version of the software to be tested exists, the system state can be recovered based on the snapshot, the test basic environment is obtained again, the soft connection of the installation package of the first version is replaced by the soft connection of the installation package of the second version, the soft connection of the installation package of the second version is used for installation and deployment of the second version in the test basic environment, and the second version is tested. When a new version of the software to be tested is tested, the system state is restored through the snapshot, and the test basic environment can be quickly obtained, so that the new version can be installed and deployed in the test basic environment to test the new version without reconfiguring the test basic environment. By the incremental testing mode, time consumed by a large amount of repeated work can be reduced, the environment deployment process is simplified when the new software version is tested, the testing efficiency is improved, and the overall development progress is accelerated.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating an implementation of a software testing method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a software testing apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a software testing apparatus in an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a flowchart of an implementation of a software testing method provided in an embodiment of the present application is shown, where the method may include the following steps:
s110: and establishing soft connection of the installation package to be used.
The installation package to be used at least comprises the installation package of the first version of the software to be tested.
In the embodiment of the application, the software to be tested may be any software, and is the software which needs to be tested currently. The software to be tested may have different versions. The installation package to be used can be obtained by downloading, copying and the like. The installation package to be used at least comprises the installation package of the first version of the software to be tested. Of course, an installation package of components associated with the software under test may also be included.
In practical application, a developer develops software to be tested or components thereof, and can automatically package the software to be tested and each component after submitting codes. And then packaging the software package of the software to be tested and the software packages of all components into an ISO file (optical disc image file), namely an installation package, through a set timing packaging task.
After the installation package to be used is obtained, the soft connection of the installation package to be used can be established. By soft-connect is meant a file that is connected to another file system.
S120: and configuring a testing basic environment.
For testing any software, certain environment support is required. In the embodiment of the application, the test basic environment can be configured based on the attribute of the software to be tested and the like. Such as configuration host information, network card information, gateway information, installation base software, etc.
On the basis of a test foundation environment, software to be tested can be installed and deployed so as to test the software to be tested.
S130: based on the soft connection and the test base environment, a snapshot of the system state is created.
After the soft connection of the installation package to be used is established and the test basic environment is configured, a snapshot of the current system state can be created based on the soft connection and the test basic environment. Namely, various data at a certain time of the recording system can be restored to the system state during recording through the snapshot.
Specifically, if the test base environment is a virtual machine environment, a snapshot of the system state may be taken using a snapshot function of the virtual machine software. For example, a snapshot may be taken using a snapshot function of virtual machine software such as VMware work or VMware ESXi to preserve the state of the virtual machine for later restoration to the same state.
If the test base environment is a physical machine environment, a snapshot of the system state may be made using a snapshot tool. For example, snapshot tools such as Snapper may be used to make a snapshot of the current system state.
The snapshot is used to quickly clear and restore the test basic environment, which is especially suitable for the software to be tested which does not support the uninstallation or has residual uninstallation.
S140: and when a test request for the second version of the software to be tested exists, restoring the system state based on the snapshot.
The second version is any version of the software to be tested except the first version.
In practical applications, after creating the snapshot of the system state, the first version of the software to be tested may be installed and deployed, and the first version may be tested. In this case, the system state will change. With the continuous updating of the software, there may be a testing requirement for the second version of the software to be tested. For testing the second version of the software to be tested, if the system state is changed, the testing accuracy is difficult to guarantee.
Therefore, in the embodiment of the present application, when there is a test request for the second version of the software to be tested, the system state may be restored based on the snapshot. I.e. restore the system state to the state at the time the snapshot was created in order to retrieve the test base environment.
The second version is any version of the software to be tested except the first version. That is, after the snapshot of the system state is created, as long as there is a test request for any other version of the software to be tested except for the first version, the system state can be restored based on the snapshot, and the test basic environment is obtained again, so as to perform a test on the test basic environment.
S150: and replacing the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, installing and deploying the second version by using the soft connection of the installation package of the second version in a test basic environment, and testing the second version.
In the embodiment of the application, when there is a test request for the second version of the software to be tested, the installation package of the second version of the software to be tested can be obtained, and the soft connection of the installation package of the second version is established.
Based on the snapshot, after the system state is restored, the soft connection of the installation package of the first version can be replaced by the soft connection of the installation package of the second version. I.e., replace the original soft connection with the new one, the source is updated yum. And then in a test basic environment, deploying the second version by using the soft connection installation of the installation package of the second version, and testing the second version.
The installation package usually has a read-only characteristic, and the installation package required to be tested is modified and replaced in a soft connection mode, so that the redeployment of the test basic environment can be avoided.
The method provided by the embodiment of the application comprises the steps of firstly establishing soft connection of an installation package to be used, at least comprising an installation package of a first version of software to be tested, configuring a test basic environment, then creating a snapshot of a system state based on the soft connection and the test basic environment, recovering the system state based on the snapshot when a test request for a second version of the software to be tested exists, reacquiring the test basic environment, replacing the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, installing and deploying the second version by using the soft connection of the installation package of the second version in the test basic environment, and testing the second version. When a new version of the software to be tested is tested, the system state is restored through the snapshot, and the test basic environment can be quickly obtained, so that the new version can be installed and deployed in the test basic environment to test the new version without reconfiguring the test basic environment. By the incremental testing mode, time consumed by a large amount of repeated work can be reduced, the environment deployment process is simplified when the new software version is tested, the testing efficiency is improved, and the overall development progress is accelerated.
In an embodiment of the present application, the step S110 of establishing a soft connection of an installation package to be used may include the following steps:
the method comprises the following steps: creating a folder corresponding to a directory where an installation package to be used is located;
step two: and creating the soft connection of the installation packages to be used in the corresponding directories in each folder in batches.
In this embodiment, there may be a plurality of installation packages to be used, such as an installation package of the first version of the software to be tested, an installation package of a component of the software to be tested, and the like. Different types of installation packages may be placed in different directories. In practical application, folders corresponding to directories where the installation packages to be used are located can be created, and the soft connections of the installation packages to be used in the corresponding directories are created in batches in each folder. The efficiency of soft connection creation is improved.
For example, when the software to be tested is Ambari or an Ambari component, establishing the soft connection of the installation package to be used mainly includes establishing the soft connection of all installation packages in manager, hdp and hdp _ utils software libraries. Components refer to various application software suitable for use in a big data platform. Wherein, manager is a folder containing Ambari and related configuration files thereof, hdp is a folder containing all big data component installation packages, and hdp _ utils is a folder containing big data tool component installation packages. Namely, the Ambari installation package is in the manager directory, the big data component installation package is in the hdp directory, and the installation package of the required tool software is in the hdp _ utils directory. A soft connection for the installation package in each directory needs to be created separately.
Based on the directories, a folder a, a folder b and a folder c can be respectively created, then the soft connections of all Ambari installation packages in the manager directory are created in a batch mode in the folder a, the soft connections of all component installation packages in the hdp directory are created in a batch mode in the folder b, and the soft connections of all tool class software installation packages in the hdp _ utils directory are created in a batch mode in the folder c.
In an embodiment of the present application, the software to be tested is Ambari, and the step S120 configures a test basic environment, which may include the following steps:
the first step is as follows: modifying configuration information in the configuration file, wherein the configuration information at least comprises host information, network card information and gateway information;
the second step is that: configuring a secure shell protocol (SSH) secret-free;
the third step: installing basic software, wherein the basic software at least comprises a development kit JDK, a network time protocol NTP, a hypertext transfer protocol HTTP and a relational database MySQL;
the fourth step: and modifying yum the installation source address of Ambari in the source to be the address of the soft connection of the installation package of Ambari.
For ease of understanding, the above four steps are described in combination.
In the embodiment of the application, under the condition that the software to be tested is Ambari, the configuration of the testing basic environment mainly configures an environment capable of carrying out Ambari installation deployment and testing.
First, the configuration information in the configuration file may be modified. Specifically, the modification of the configuration information may be performed according to the device to be used. The configuration information may be host information, network card information, gateway information, and the like. The host information may be a host IP (Internet Protocol) address, a host name, and the like.
Second, SSH (Secure Shell) privacy-exempt may be configured.
Third, some basic software, such as JDK (java development kit), NTP (Network Time Protocol), HTTP (HyperText Transfer Protocol), MySQL (relational database), etc., may be installed.
Finally, the source yum can be updated by modifying yum the address of the soft connection of the installation package of which the installation source address of Ambari is Ambari in the source. Here Ambari's installation package is Ambari's first version installation package.
In an embodiment of the present application, the software to be tested is a component of Ambari, and the step S120 of configuring the testing basic environment may include the following steps:
the method comprises the following steps: modifying configuration information in the configuration file, wherein the configuration information at least comprises host information, network card information and gateway information;
step two: configuring a secure shell protocol (SSH) secret-free;
step three: installing basic software, wherein the basic software at least comprises a development kit JDK, a network time protocol NTP, a hypertext transfer protocol HTTP and a relational database MySQL;
step four: modifying yum the installation source address of Ambari in the source to the address of the soft connection of the Ambari installation package;
step five: installing and configuring Ambari and starting;
step six: and establishing a cluster, and setting the URL of the software library as the address of the soft connection of the component.
For ease of understanding, the above six steps are described in combination.
In this embodiment of the present application, in a case where the software to be tested is an Ambari component, configuring the test base environment mainly configures an environment capable of performing installation, deployment, and testing of the Ambari component, and the installation, deployment, and deployment of the Ambari component need to be established on the basis of completion of the installation, deployment of the Ambari component, so that the operations in steps one to four in this embodiment of the present application are intended to perform the installation and deployment of Ambari, and specific implementations of these four steps are consistent with those of the four steps in the previous embodiment, and are not described herein again.
After modifying the configuration information in the configuration file, configuring SSH secret-free, installing basic software, modifying yum the address of the soft connection of the installation package of which the installation source address of Ambari is Ambari in the source, the installation configuration of Ambari can be carried out.
Specifically, Ambari service, that is, Ambari-server, may be installed first, then information of tools that Ambari needs to use, such as information of a database, JDK, HTTP protocol, etc., may be configured, and finally the database may be initialized. The installation configuration of Ambari is completed.
After installing the configuration Ambari, Ambari may be started. And then a cluster can be created, and the URL of the software library is set as the address of the soft connection of the component, namely the address of the soft connection of the installation package of the first version of the component of Ambari.
Specifically, the process of creating the cluster may specifically be to set cluster attribute information and install basic necessary components. Such as setting cluster name and other necessary information, such as host list, SSH private key, SSH user name, port, etc.
In one embodiment of the application, Ambari and component rapid deployment and incremental testing are achieved in the form of taking snapshots and creating soft connections. The initial base environment is first configured and a soft connection is created, and then snapshot a is taken. And then, installing and deploying Ambari, creating a cluster after deployment is completed, setting the URL of a software library of the cluster as the address of the component soft connection, and shooting a snapshot B after the cluster is created. And when the Ambari needs to be tested, based on the snapshot A, recovering the system state, replacing the soft connection of the original Ambari installation package with the soft connection of the new Ambari installation package, and installing and testing the Ambari. And when the component needs to be tested, based on the snapshot B, recovering the system state, replacing the soft connection of the original installation package of the component with the soft connection of the new installation package of the component, and installing and testing the component. It should be noted that, for Ambari testing, the initial basic environment is the testing basic environment, and for component testing, the environment after Ambari installation and configuration on the basis of the initial basic environment is the testing basic environment.
The embodiment of the application can realize the repeated use of the Ambari environment, reduce the time cost and accelerate the development progress.
Corresponding to the above method embodiments, the present application further provides a software testing apparatus, and the software testing apparatus described below and the software testing method described above may be referred to correspondingly.
Referring to fig. 2, the apparatus may include the following modules:
a soft connection establishing module 210, configured to establish a soft connection of an installation package to be used, where the installation package to be used at least includes an installation package of a first version of software to be tested;
a test base environment configuration module 220, configured to configure a test base environment;
a snapshot creation module 230, configured to create a snapshot of a system state based on the soft connection and the test base environment;
a system state recovery module 240, configured to recover the system state based on the snapshot when there is a test request for a second version of the software to be tested, where the second version is any version of the software to be tested except for the first version;
and a new version testing module 250, configured to replace the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, and in the testing basic environment, deploy the second version by using the soft connection installation of the installation package of the second version, and test the second version.
By applying the device provided by the embodiment of the application, the soft connection of the installation package to be used at least comprising the installation package of the first version of the software to be tested is established, the test basic environment is configured, then the snapshot of the system state is created based on the soft connection and the test basic environment, when the test request for the second version of the software to be tested exists, the system state can be recovered based on the snapshot, the test basic environment is obtained again, the soft connection of the installation package of the first version is replaced by the soft connection of the installation package of the second version, the soft connection of the installation package of the second version is used for installation and deployment of the second version in the test basic environment, and the second version is tested. When a new version of the software to be tested is tested, the system state is restored through the snapshot, and the test basic environment can be quickly obtained, so that the new version can be installed and deployed in the test basic environment to test the new version without reconfiguring the test basic environment. By the incremental testing mode, time consumed by a large amount of repeated work can be reduced, the environment deployment process is simplified when the new software version is tested, the testing efficiency is improved, and the overall development progress is accelerated.
In an embodiment of the present application, the soft connection establishing module 210 is configured to:
creating a folder corresponding to a directory where an installation package to be used is located;
and creating the soft connection of the installation packages to be used in the corresponding directory in each folder in a batch mode.
In a specific embodiment of the present application, the snapshot creating module 230 is configured to:
if the test basic environment is a virtual machine environment, taking a snapshot of the system state by using a snapshot function of virtual machine software;
and if the test basic environment is the physical machine environment, making a snapshot of the system state by using a snapshot tool.
In a specific embodiment of the present application, the software to be tested is Ambari, and the test basic environment configuration module 220 is configured to:
modifying configuration information in the configuration file, wherein the configuration information at least comprises host information, network card information and gateway information;
configuring a secure shell protocol (SSH) secret-free;
installing basic software, wherein the basic software at least comprises a development toolkit JDK, a network time protocol NTP, a hypertext transfer protocol HTTP and a relational database MySQL;
and modifying yum the installation source address of Ambari in the source to be the address of the soft connection of the installation package of Ambari.
In a specific embodiment of the present application, the software to be tested is an Ambari component, and the test basic environment configuration module 220 is configured to:
modifying configuration information in the configuration file, wherein the configuration information at least comprises host information, network card information and gateway information;
configuring a secure shell protocol (SSH) secret-free;
installing basic software, wherein the basic software at least comprises a development kit JDK, a network time protocol NTP, a hypertext transfer protocol HTTP and a relational database MySQL;
modifying yum the source Ambari installation source address as the address of the soft connection of the Ambari installation package;
installing and configuring Ambari and starting;
and establishing a cluster, and setting the URL of the software library as the address of the soft connection of the component.
In one embodiment of the present application, the testing infrastructure configuration module 220 is configured to:
setting cluster attribute information;
and installing basic necessary components.
In one embodiment of the present application, the testing infrastructure configuration module 220 is configured to:
installing Ambari service;
configuring information of tools required to be used by Ambari;
the database is initialized.
Corresponding to the above method embodiment, an embodiment of the present application further provides a software testing device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the software testing method when executing the computer program.
As shown in fig. 3, which is a schematic diagram of a component structure of a software testing device, the software testing device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through a communication bus 13.
In the embodiment of the present application, the processor 10 may be a Central Processing Unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, etc.
The processor 10 may call a program stored in the memory 11, and in particular, the processor 10 may perform operations in an embodiment of the software testing method.
The memory 11 is used for storing one or more programs, the program may include program codes, the program codes include computer operation instructions, in this embodiment, the memory 11 stores at least the program for implementing the following functions:
establishing soft connection of an installation package to be used, wherein the installation package to be used at least comprises an installation package of a first version of software to be detected;
configuring a testing basic environment;
creating a snapshot of the system state based on the soft connection and the test base environment;
when a test request for a second version of the software to be tested exists, the system state is restored based on the snapshot, and the second version is any version of the software to be tested except the first version;
and replacing the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, installing and deploying the second version by using the soft connection of the installation package of the second version in a test basic environment, and testing the second version.
In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as a test function, a snapshot creation function), and the like; the storage data area may store data created during use, such as snapshot data, environmental data, and the like.
Further, the memory 11 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device.
The communication interface 13 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 3 does not constitute a limitation of the software testing apparatus in the embodiment of the present application, and in practical applications, the software testing apparatus may include more or less components than those shown in fig. 3, or some components in combination.
Corresponding to the above method embodiments, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the software testing method.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The principle and the implementation of the present application are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (8)

1. A software testing method, comprising:
establishing soft connection of an installation package to be used, wherein the installation package to be used at least comprises an installation package of a first version of software to be detected;
configuring a testing basic environment;
creating a snapshot of a system state based on the soft connection and the test base environment;
when a test request for a second version of the software to be tested exists, recovering the system state based on the snapshot, wherein the second version is any version of the software to be tested except the first version;
replacing the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, installing and deploying the second version by using the soft connection of the installation package of the second version in the test basic environment, and testing the second version;
wherein, the soft connection of the installation package to be used is established, including:
creating a folder corresponding to the directory where the installation package to be used is located;
creating soft connections of the installation packages to be used in the corresponding directories in each folder in batch;
the creating a snapshot of the system state comprises:
if the test basic environment is a virtual machine environment, shooting a snapshot of the system state by using a snapshot function of virtual machine software;
and if the test basic environment is a physical machine environment, making a snapshot of the system state by using a snapshot tool.
2. The method of claim 1, wherein the software under test is Ambari, and wherein configuring the test infrastructure comprises:
modifying configuration information in the configuration file, wherein the configuration information at least comprises host information, network card information and gateway information;
configuring a secure shell protocol (SSH) secret-free;
installing basic software, wherein the basic software at least comprises a development toolkit JDK, a network time protocol NTP, a hypertext transfer protocol HTTP and a relational database MySQL;
and modifying yum the installation source address of Ambari in the source to be the address of the soft connection of the installation package of Ambari.
3. The method of claim 1, wherein the software under test is a component of Ambari, and wherein configuring the test base environment comprises:
modifying configuration information in the configuration file, wherein the configuration information at least comprises host information, network card information and gateway information;
configuring a secure shell protocol (SSH) secret-free;
installing basic software, wherein the basic software at least comprises a development kit JDK, a network time protocol NTP, a hypertext transfer protocol HTTP and a relational database MySQL;
modifying yum the installation source address of Ambari in the source to the address of the soft connection of the Ambari installation package;
installing and configuring Ambari and starting;
and establishing a cluster, and setting a URL (uniform resource locator) of a software library as the address of the soft connection of the component.
4. The method of claim 3, wherein the creating a cluster comprises:
setting cluster attribute information;
and installing basic necessary components.
5. The method of claim 3, wherein installing the configuration Ambari comprises:
installing Ambari service;
configuring information of tools required to be used by Ambari;
the database is initialized.
6. A software testing apparatus, comprising:
the software connection establishing module is used for establishing the soft connection of an installation package to be used, wherein the installation package to be used at least comprises an installation package of a first version of software to be detected;
the test basic environment configuration module is used for configuring a test basic environment;
the snapshot creating module is used for creating a snapshot of the system state based on the soft connection and the test basic environment;
a system state recovery module, configured to recover the system state based on the snapshot when a test request for a second version of the software to be tested exists, where the second version is any version of the software to be tested except for the first version;
a new version testing module, configured to replace the soft connection of the installation package of the first version with the soft connection of the installation package of the second version, and in the testing basic environment, deploy the second version by using the soft connection installation of the installation package of the second version, and test the second version;
wherein, the soft connection of the installation package to be used is established, including:
creating a folder corresponding to the directory where the installation package to be used is located;
creating soft connections of the installation packages to be used in the corresponding directories in each folder in batch;
the creating a snapshot of the system state comprises:
if the test basic environment is a virtual machine environment, shooting a snapshot of the system state by using a snapshot function of virtual machine software;
and if the test basic environment is a physical machine environment, making a snapshot of the system state by using a snapshot tool.
7. A software testing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the software testing method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the software testing method according to any one of claims 1 to 5.
CN202010412614.6A 2020-05-15 2020-05-15 Software testing method, device, equipment and storage medium Active CN111611160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010412614.6A CN111611160B (en) 2020-05-15 2020-05-15 Software testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010412614.6A CN111611160B (en) 2020-05-15 2020-05-15 Software testing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111611160A CN111611160A (en) 2020-09-01
CN111611160B true CN111611160B (en) 2022-06-17

Family

ID=72200001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010412614.6A Active CN111611160B (en) 2020-05-15 2020-05-15 Software testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111611160B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113032704A (en) * 2021-02-24 2021-06-25 广州虎牙科技有限公司 Data processing method, device, electronic equipment and medium
CN115016820A (en) * 2022-06-29 2022-09-06 广州高专资讯科技有限公司 Application program updating method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009003189A1 (en) * 2007-06-27 2008-12-31 Acresso Software, Inc. A method and system for software virtualization directly from an installation package
CN102799522A (en) * 2012-06-28 2012-11-28 浪潮(北京)电子信息产业有限公司 Managing method and system for software version tracing test
CN104021070A (en) * 2013-03-01 2014-09-03 腾讯科技(深圳)有限公司 Method, device and system for testing intelligent terminal software packages
CN104035860A (en) * 2013-03-07 2014-09-10 腾讯科技(深圳)有限公司 Method, device and system for generating test tasks of intelligent terminal software package
CN104035861A (en) * 2013-03-07 2014-09-10 腾讯科技(深圳)有限公司 Method, device and system for obtaining intelligent terminal software
CN105095089A (en) * 2015-09-14 2015-11-25 北京金山安全软件有限公司 Method and device for testing performance of application software
US10552610B1 (en) * 2016-12-22 2020-02-04 Fireeye, Inc. Adaptive virtual machine snapshot update framework for malware behavioral analysis
CN111104261A (en) * 2020-01-16 2020-05-05 重庆电子工程职业学院 Communication equipment software upgrading method and operation maintenance device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10180886B2 (en) * 2015-11-16 2019-01-15 Red Hat, Inc. Recreating a computing environment using tags and snapshots

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009003189A1 (en) * 2007-06-27 2008-12-31 Acresso Software, Inc. A method and system for software virtualization directly from an installation package
CN102799522A (en) * 2012-06-28 2012-11-28 浪潮(北京)电子信息产业有限公司 Managing method and system for software version tracing test
CN104021070A (en) * 2013-03-01 2014-09-03 腾讯科技(深圳)有限公司 Method, device and system for testing intelligent terminal software packages
CN104035860A (en) * 2013-03-07 2014-09-10 腾讯科技(深圳)有限公司 Method, device and system for generating test tasks of intelligent terminal software package
CN104035861A (en) * 2013-03-07 2014-09-10 腾讯科技(深圳)有限公司 Method, device and system for obtaining intelligent terminal software
CN105095089A (en) * 2015-09-14 2015-11-25 北京金山安全软件有限公司 Method and device for testing performance of application software
US10552610B1 (en) * 2016-12-22 2020-02-04 Fireeye, Inc. Adaptive virtual machine snapshot update framework for malware behavioral analysis
CN111104261A (en) * 2020-01-16 2020-05-05 重庆电子工程职业学院 Communication equipment software upgrading method and operation maintenance device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Evaluation of a Server-Grade Software-Only ARM Hypervisor";Alexey Smirnov等;《2013 IEEE Sixth International Conference on Cloud Computing》;20140217;第855-862页 *
"PReT: A Tool for Automatic Phase-Based Regression Testing";Arnamoy Bhattacharyya等;《2018 IEEE International Conference on Cloud Computing Technology and Science (CloudCom)》;20181227;第284-289页 *
"基于ClearCase的软件配置管理与持续集成";姜文等;《计算机技术与发展》;20160131;第26卷(第1期);第10-17页 *

Also Published As

Publication number Publication date
CN111611160A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN106557384B (en) Data processing method, device and system based on Linux
US7543118B1 (en) Multiple variance platform for the management of mobile devices
US10795688B2 (en) System and method for performing an image-based update
CN111611160B (en) Software testing method, device, equipment and storage medium
CN106371881B (en) Method and system for updating program version in server
CN102334100A (en) Program update device, program update method, and information processing device
EP3474143B1 (en) Method and apparatus for incremental recovery of data
CN112181720A (en) Virtual data center backup method and device based on cloud management platform
US9043781B2 (en) Algorithm for automated enterprise deployments
CN112860282A (en) Upgrading method and device of cluster plug-in and server
EP1605353A2 (en) Method for imaging computer systems
CN112286543B (en) Application service deployment method and device
CN111104129B (en) Memory operating system manufacturing method and device, electronic equipment and storage medium
CN113485755A (en) Device driver verification method, device and storage medium
CN115129570A (en) Memory performance test method and related device
CN104239112A (en) Device driver installation method and device
CN110795113B (en) Redis cluster service installation method, server and medium
CN114721781A (en) Micro-service deployment method and device, computer equipment and storage medium
CN111371606A (en) Method for specifying monitor ip when using look to deploy ceph cluster
CN111158773A (en) Method and system for KS (Key sheet) guided automatic batch installation
CN117389713B (en) Storage system application service data migration method, device, equipment and medium
CN113986598B (en) Method, device, equipment and storage medium for determining starting failure cause
CN116383093B (en) Windows test environment deployment method and device, readable storage medium and electronic equipment
CN108733426B (en) Method and device for running application by electronic equipment and electronic equipment
CN114640687A (en) Software upgrading method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231117

Address after: Room 2301, No. 395 Linjiang Avenue, Tianhe District, Guangzhou City, Guangdong Province, 510655 (Location: Self made Unit 01)

Patentee after: Guangdong Inspur Intelligent Computing Technology Co.,Ltd.

Patentee after: INSPUR ELECTRONIC INFORMATION INDUSTRY Co.,Ltd.

Address before: No. 1036, Shandong high tech Zone wave road, Ji'nan, Shandong

Patentee before: INSPUR ELECTRONIC INFORMATION INDUSTRY Co.,Ltd.