CN115408293A - Test environment building method, device, equipment and medium - Google Patents

Test environment building method, device, equipment and medium Download PDF

Info

Publication number
CN115408293A
CN115408293A CN202211121760.9A CN202211121760A CN115408293A CN 115408293 A CN115408293 A CN 115408293A CN 202211121760 A CN202211121760 A CN 202211121760A CN 115408293 A CN115408293 A CN 115408293A
Authority
CN
China
Prior art keywords
test
environment
server
address
sample
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.)
Pending
Application number
CN202211121760.9A
Other languages
Chinese (zh)
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.)
Ping An Consumer Finance Co Ltd
Original Assignee
Ping An Consumer Finance 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 Ping An Consumer Finance Co Ltd filed Critical Ping An Consumer Finance Co Ltd
Priority to CN202211121760.9A priority Critical patent/CN115408293A/en
Publication of CN115408293A publication Critical patent/CN115408293A/en
Pending legal-status Critical Current

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/3664Environments for testing or debugging software
    • 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/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of testing, and discloses a testing environment construction method, which comprises the following steps: acquiring an environment deployment request, and extracting a test task set from the environment deployment request; any test subtask is obtained from the test task set to serve as a sample test task, and environment information of a sample test environment corresponding to the sample test task is inquired; changing the address of the test server in the sample test environment into the address of a standard server corresponding to the test server according to the environment information, and constructing a standard test environment; inquiring a test server corresponding to each test subtask in the test task set, and acquiring the address of the inquired test server; and modifying the address of the server in the standard test environment into the address of the test server corresponding to each test subtask to obtain a plurality of constructed test environments. The invention also provides a test environment construction device, equipment and a storage medium. The invention can improve the building efficiency of the test environment.

Description

Test environment building method, device, equipment and medium
Technical Field
The invention relates to the technical field of testing, in particular to a method, a device, equipment and a medium for building a testing environment.
Background
With the change of network technology and intelligent equipment, the release of various software applications is faster and faster, and great convenience is provided for various aspects of work, life, learning, entertainment and the like of people. In this process, software developers need to constantly perform application development and performance optimization on software applications in order to provide more and superior services to users.
In order to ensure the stability of software application to be released, before the software application is released, a test environment deployment needs to be performed on a new software application or an updated software application so as to test the new software application or the updated software application, most of the existing test environment construction methods are full deployment, that is, a test environment is reconstructed for each link of the same software application which needs to be tested, however, the test environment construction method has the problems of occupying more computing resources in actual application and causing low test efficiency.
Disclosure of Invention
The invention provides a test environment construction method, a test environment construction device, test environment construction equipment and a test environment construction medium, and mainly aims to improve the construction efficiency of a test environment.
In order to achieve the above object, the present invention provides a test environment construction method, including:
acquiring an environment deployment request, and extracting a test task set from the environment deployment request;
acquiring any test subtask from the test task set as a sample test task, and inquiring environment information of a sample test environment corresponding to the sample test task;
changing the address of the test server in the sample test environment into the address of a standard server corresponding to the test server according to the environment information to construct a standard test environment;
inquiring a test server corresponding to each test subtask in the test task set, and acquiring an address of the inquired test server;
and modifying the address of the server in the standard test environment into the address of the test server corresponding to each test subtask to obtain a plurality of constructed test environments.
Optionally, modifying the address of the server in the standard test environment to the address of the test server corresponding to each test subtask includes:
acquiring the service functions of each server and the test server in the standard test environment;
comparing the service action of the test server with the service action of each server in the standard test environment, and obtaining a corresponding server of the test server in the standard test environment when the service action of the test server is the same as the service action of the server in the standard test environment;
and modifying the address of the corresponding server in the standard test environment into the address of the corresponding test server to construct a plurality of test environments.
Optionally, the querying a test server corresponding to each test subtask in the test task set, and obtaining an address of the queried test server includes:
acquiring environment information of a test environment corresponding to each test subtask, and acquiring a service identifier of each test server from the test environment according to the environment information of each corresponding test environment;
and inquiring the corresponding relation between the address of each test server and each service identification, and acquiring the address of each test server from the environment information according to the corresponding relation between the address of the test server and the service identification.
Optionally, the acquiring any test subtask from the test task set as a sample test task includes:
acquiring a test requirement corresponding to the test task set according to the environment deployment request;
and inquiring the test branch and the branch name of the test requirement, dividing each test subtask in the test task set based on the test branch and the branch name of the test requirement, and selecting any test subtask as a sample test task.
Optionally, the querying environmental information of the sample testing environment corresponding to the sample testing task includes:
and constructing a sample testing environment based on the sample testing task.
Optionally, the constructing a sample testing environment based on the sample testing task includes:
acquiring a configuration index of the sample testing task, and acquiring a testing environment type and a version number corresponding to the sample testing task based on the configuration index;
calling a test tool image file corresponding to the test environment type and the version number from a preset data repository;
and building a sample test environment of the sample test task based on the test tool image file.
In order to solve the above problem, the present invention also provides a test environment construction apparatus, including:
the test task acquisition module is used for acquiring an environment deployment request and extracting a test task set from the environment deployment request;
a standard environment construction module, configured to obtain any test subtask from the test task set as a sample test task, query environment information of a sample test environment corresponding to the sample test task, change an address of a test server in the sample test environment to an address of a standard server corresponding to the test server according to the environment information, and construct a standard test environment;
the server address query module is used for querying the test server corresponding to each test subtask in the test task set and acquiring the queried address of the test server;
and the test environment building module is used for modifying the address of the server in the standard test environment into the address of the test server corresponding to each test subtask to obtain a plurality of built test environments.
Optionally, the querying a test server corresponding to each test subtask in the test task set, and obtaining an address of the queried test server includes:
acquiring environment information of a test environment corresponding to each test subtask, and acquiring a service identifier of each test server from the test environment according to the environment information of each corresponding test environment;
and inquiring the corresponding relation between the address of each test server and each service identification, and acquiring the address of each test server from the environment information according to the corresponding relation between the address of the test server and the service identification.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the test environment set-up method as described above.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, comprising a storage data area and a storage program area, wherein the storage data area stores the created data, and the storage program area stores a computer program; wherein the computer program, when executed by a processor, implements a test environment set-up method as described above.
In the embodiment of the invention, an environment deployment request is obtained, a test task set is extracted from the environment deployment request to realize the acquisition of the test tasks, then any test subtask is obtained from the test task set as a sample test task, the environment information of the sample test environment corresponding to the sample test task is inquired, the address of a server is changed according to the environment information to construct a standard test environment, the construction of a constructed environment template is achieved, then the test server corresponding to each test subtask in the test task set is inquired, the inquired address of the test server is obtained, the address of the server in the standard test environment is modified into the address of the test server corresponding to each test subtask, and a plurality of test environments are constructed. Therefore, the invention constructs a plurality of test environments by extracting the tasks in the environment deployment request to construct the standard test environment and then replacing the addresses of the servers in the standard test environment by the test servers corresponding to the test subtasks, thereby improving the construction efficiency of the test environments.
Drawings
Fig. 1 is a schematic flow chart of a test environment construction method according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart illustrating a step in a test environment setup method according to an embodiment of the present invention;
FIG. 3 is a detailed flowchart illustrating a step in a test environment setup method according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a test environment setup apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an internal structure of an electronic device for implementing a test environment setup method according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a test environment building method. The execution subject of the test environment building method includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server and a terminal. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. In other words, the test environment construction method may be executed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Referring to fig. 1, a schematic flow chart of a test environment setup method according to an embodiment of the present invention is shown. In this embodiment, the test environment construction method includes the following steps S1 to S5:
s1, acquiring an environment deployment request, and extracting a test task set from the environment deployment request.
In the embodiment of the invention, the test environment of each software application is deployed through the environment deployment request.
In the embodiment of the invention, the environment deployment request is a deployment request of a test environment and is a request sent by a worker based on the purpose of deploying the test environment, wherein the environment deployment request has a test task and can be split to obtain a test task set consisting of a plurality of test subtasks.
Furthermore, the test environment is used for testing the software to be tested running on the test environment, and the test environment comprises the software to be tested, a hardware support, a network support, a data support and a test tool.
In the embodiment of the invention, the test task set is provided with a plurality of subtasks, namely, a plurality of test directions of the software to be tested can be tested through the test subtasks in the test task set, and each test direction can be split into one test subtask.
For example, a live shopping link is added in a certain shopping software application, a live shopping task of the shopping software needs to be tested before formal online, and further, the live shopping task comprises a live viewing subtask, an online shopping subtask and an online payment subtask.
S2, any test subtask is obtained from the test task set to serve as a sample test task, and environment information of a sample test environment corresponding to the sample test task is inquired.
In the embodiment of the invention, the sample testing task is a testing subtask used as a reference, and in the scheme, a standard testing environment is constructed by replacing a server in the sample testing task.
Further, before the querying the environment information of the sample testing environment corresponding to the sample testing task, the method further includes:
and constructing a sample testing environment based on the sample testing task.
In the embodiment of the invention, the sample testing environment is a testing environment established according to the sample testing task and is used as a sample of the testing environment.
Referring to fig. 2, further, the constructing a sample testing environment based on the sample testing task includes:
s20, obtaining a configuration index of the sample testing task, and obtaining a testing environment type and a version number corresponding to the sample testing task based on the configuration index;
s21, calling a test tool image file corresponding to the test environment type and the version number from a preset data repository;
and S22, building a sample test environment of the sample test task based on the test tool image file.
In the embodiment of the invention, the data storage library stores a test tool image file for constructing a test environment. The testing environment type and the version number are used for selecting the testing tool image file from the data repository.
Further, the test tool image file is an image file of a test tool with completed parameter configuration. Wherein, the testing tools are Java tools and JMeter tools.
It can be understood that, since the test subtasks are all taken from the same test task set, and all the test subtasks in the test task set are from the same environment deployment request, the number and arrangement of servers in the test environment constructed according to each test subtask in the test task set are substantially the same, and the difference is only that each test server in the test environment is responsible for testing, so that after a test server in a certain test environment is replaced, a standard test environment can be obtained as a template of the test environment, and finally, the server in the standard test environment is further replaced to construct the test environment corresponding to each test subtask.
Further, the acquiring any test subtask from the test task set as a sample test task includes:
acquiring a test requirement corresponding to the test task set according to the environment deployment request;
and inquiring the test branch and the branch name of the test requirement, dividing each test subtask in the test task set based on the test branch and the branch name of the test requirement, and selecting any test subtask as a sample test task.
In the embodiment of the invention, the test branches and the branch names are used for distinguishing the test subtasks in the test task set and determining the purpose of each test subtask.
In the embodiment of the present invention, the test requirement is used to specify which links and tasks of a software application to be tested are to be tested, wherein the test requirement has the following characteristics: must be executable, contain no specific test data and specify normal preconditions to meet the test requirements.
Furthermore, the test data should be solved in the test design link, so the test requirement should not contain the test data, and in addition, the test requirement should indicate a normal precondition satisfying the test requirement, and also indicate an error condition when the test requirement is not satisfied.
In the embodiment of the present invention, the test task performed through the test environment belongs to an integrated test, and specifically, there are 4 test steps in the software application development process, which are respectively a unit test: the method is used for source code testing, naming specification testing, page script testing and the like, and comprises the following steps of: the system is used for functional testing, pressure testing, safety testing and the like, and the system testing comprises the following steps: the method is used for installation test, connection integrity test, UI rationality test and the like, acceptance test, page integrity test, prompt text test and the like.
And S3, changing the address of the test server in the sample test environment into the address of a standard server corresponding to the test server according to the environment information, and constructing a standard test environment.
In the embodiment of the present invention, the test server is a server that performs an actual test function in a constructed standard test environment, and belongs to a functional server, including but not limited to one, that is, among a plurality of servers in the test environment, some servers are necessary to support the test environment, and some servers perform an actual test function for the test environment.
Further, the standard server is a server corresponding to the test server, but the test server plays a test role in terms of business function, and the standard server is a structural server and only plays a role in supporting the construction of a test environment.
The standard server may obtain another testing subtask from the testing task set, construct a reference testing environment according to the testing subtask, and search for the standard server corresponding to the testing server in the sample testing environment from the reference testing environment. Further, if the server found at one time is still a server with a testing function rather than a structural standard server, another testing subtask can be repeatedly acquired to construct the reference testing environment.
In the embodiment of the invention, the standard test environment only plays a structural role under the environment deployment request, but does not have a test environment with actual test value, but each server in the standard test environment can be replaced by a server with a test function, so that a plurality of test environments with actual test value are constructed.
And S4, inquiring a test server corresponding to each test subtask in the test task set, and acquiring the address of the inquired test server.
In the embodiment of the present invention, the test server corresponding to each test subtask also includes, but is not limited to, one test server.
Referring to fig. 3, further, the querying a test server corresponding to each test subtask in the test task set, and acquiring an address of the queried test server includes:
s40, acquiring environment information of a test environment corresponding to each test subtask, and acquiring a service identifier of each test server from the test environment according to the environment information of each corresponding test environment;
s41, inquiring the corresponding relation between the address of each test server and each service identification, and acquiring the address of each test server from the environment information according to the corresponding relation between the address of the test server and the service identification.
In the embodiment of the present invention, the service identifier is an identifier for distinguishing each of the test servers.
And S5, modifying the address of the server in the standard test environment into the address of the test server corresponding to each test subtask to obtain a plurality of constructed test environments.
In the embodiment of the invention, the test environment belongs to an incremental test environment, the test environment constructed by the server is added in the original test environment, and the test requirements of new test tasks such as new functions can be tested through the constructed test environment.
In the embodiment of the present invention, modifying the address of the server in the standard test environment to the address of the test server corresponding to each of the test subtasks to obtain a plurality of constructed test environments includes:
acquiring the service roles of each server and the test server in the standard test environment;
comparing the service action of the test server with the service action of each server in the standard test environment, and obtaining a corresponding server of the test server in the standard test environment when the service action of the test server is the same as the service action of the server in the standard test environment;
and modifying the address of the corresponding server in the standard test environment into the address of the corresponding test server to construct a plurality of test environments.
In the embodiment of the present invention, the service role is used to determine the service scope of each server, that is, what role the server plays in the test environment forms the basis of the test environment or is responsible for the test of the software application.
For example, the standard test environment is a test environment for a live shopping function in online shopping application software, and includes 4 servers, namely, a server a, a server b, a server c and a server d, wherein the server a and the server d are used for supporting a system function of the online shopping application software, the server b is used for supporting the online shopping function, the server c is used for supporting the online live broadcasting function, and finally, the server in the standard test environment is replaced according to a service range of the test server, if the test server is used for the online shopping service, the server b is replaced, and if the test server is used for the online live broadcasting service, the server c is replaced. Further, replacing the server is implemented by replacing the address of the server in the test environment.
In the embodiment of the invention, an environment deployment request is obtained, a test task set is extracted from the environment deployment request to realize the acquisition of test tasks, any test subtask is then obtained from the test task set as a sample test task, the environment information of the sample test environment corresponding to the sample test task is inquired, the address of a server is changed according to the environment information to construct a standard test environment, the construction of an environment construction template is achieved, then a test server corresponding to each test subtask in the test task set is inquired, the inquired address of the test server is obtained, the address of the server in the standard test environment is modified into the address of the test server corresponding to each test subtask, and a plurality of test environments are constructed. Therefore, the invention constructs a plurality of test environments by extracting the tasks in the environment deployment request to construct the standard test environment and then replacing the addresses of the servers in the standard test environment by the test servers corresponding to the test subtasks, thereby improving the construction efficiency of the test environments.
Fig. 4 is a schematic diagram of a module of the test environment building apparatus according to the present invention.
The test environment construction apparatus 100 according to the present invention may be installed in an electronic device. According to the realized functions, the test environment construction device can comprise a test task obtaining module 101, a standard environment construction module 102, a server address query module 103 and a test environment construction module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the test task obtaining module 101 is configured to obtain an environment deployment request, and extract a test task set from the environment deployment request;
a standard environment construction module 102, configured to obtain any test subtask from the test task set as a sample test task, query environment information of a sample test environment corresponding to the sample test task, change an address of a test server in the sample test environment to an address of a standard server corresponding to the test server according to the environment information, and construct a standard test environment;
the server address query module 103 is configured to query a test server corresponding to each test subtask in the test task set, and obtain an address of the queried test server;
and the test environment building module 104 is configured to modify the address of the server in the standard test environment into the address of the test server corresponding to each test subtask, so as to obtain multiple built test environments.
In detail, when the modules in the test environment construction apparatus 100 according to the embodiment of the present invention are used, the same technical means as the test environment construction method described in fig. 1 to 3 are adopted, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device for implementing a test environment establishment method according to the present invention.
The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program, such as a test environment setup program, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules (for example, executing a test environment building program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used to store not only application software installed in the electronic device and various types of data, such as codes of a test environment construction program, but also data that has been output or will be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are commonly used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 5 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the embodiments described are illustrative only and are not to be construed as limiting the scope of the claims.
The test environment construction program stored in the memory 11 of the electronic device is a combination of a plurality of computer programs, which when run in the processor 10, can implement:
acquiring an environment deployment request, and extracting a test task set from the environment deployment request;
acquiring any test subtask from the test task set as a sample test task, and inquiring environment information of a sample test environment corresponding to the sample test task;
changing the address of the test server in the sample test environment into the address of a standard server corresponding to the test server according to the environment information to construct a standard test environment;
inquiring a test server corresponding to each test subtask in the test task set, and acquiring an address of the inquired test server;
and modifying the address of the server in the standard test environment into the address of the test server corresponding to each test subtask to obtain a plurality of constructed test environments.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring an environment deployment request, and extracting a test task set from the environment deployment request;
acquiring any test subtask from the test task set as a sample test task, and inquiring environment information of a sample test environment corresponding to the sample test task;
changing the address of the test server in the sample test environment into the address of a standard server corresponding to the test server according to the environment information to construct a standard test environment;
inquiring a test server corresponding to each test subtask in the test task set, and acquiring an address of the inquired test server;
and modifying the address of the server in the standard test environment into the address of the test server corresponding to each test subtask to obtain a plurality of constructed test environments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it will be obvious that the term "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the same, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A test environment construction method is characterized by comprising the following steps:
acquiring an environment deployment request, and extracting a test task set from the environment deployment request;
acquiring any test subtask from the test task set as a sample test task, and inquiring environment information of a sample test environment corresponding to the sample test task;
changing the address of the test server in the sample test environment into the address of a standard server corresponding to the test server according to the environment information to construct a standard test environment;
querying a test server corresponding to each test subtask in the test task set, and acquiring an address of the queried test server;
and modifying the address of the server in the standard test environment into the address of the test server corresponding to each test subtask to obtain a plurality of constructed test environments.
2. The method for building the test environment according to claim 1, wherein the modifying the address of the server in the standard test environment to the address of the test server corresponding to each of the test subtasks comprises:
acquiring the service roles of each server and the test server in the standard test environment;
comparing the service action of the test server with the service action of each server in the standard test environment, and obtaining a corresponding server of the test server in the standard test environment when the service action of the test server is the same as the service action of the server in the standard test environment;
and modifying the address of the corresponding server in the standard test environment into the address of the corresponding test server to construct a plurality of test environments.
3. The method for building a test environment according to claim 1, wherein the querying a test server corresponding to each test subtask in the test task set and obtaining an address of the queried test server comprises:
acquiring environment information of a test environment corresponding to each test subtask, and acquiring a service identifier of each test server from the test environment according to the environment information of each corresponding test environment;
and inquiring the corresponding relation between the address of each test server and each service identification, and acquiring the address of each test server from the environment information according to the corresponding relation between the address of the test server and the service identification.
4. The test environment construction method according to claim 1, wherein the obtaining any test subtask from the set of test tasks as a sample test task comprises:
acquiring a test requirement corresponding to the test task set according to the environment deployment request;
and inquiring the test branch and the branch name of the test requirement, dividing each test subtask in the test task set based on the test branch and the branch name of the test requirement, and selecting any test subtask as a sample test task.
5. The test environment construction method according to claim 1, wherein before the query of the environment information of the sample test environment corresponding to the sample test task, the method further comprises:
and constructing a sample testing environment based on the sample testing task.
6. The test environment construction method according to claim 5, wherein the constructing a sample test environment based on the sample test task comprises:
acquiring a configuration index of the sample testing task, and acquiring a testing environment type and a version number corresponding to the sample testing task based on the configuration index;
calling a test tool image file corresponding to the test environment type and the version number from a preset data repository;
and building a sample test environment of the sample test task based on the test tool image file.
7. A test environment construction apparatus, characterized in that the apparatus comprises:
the system comprises a test task acquisition module, a test task scheduling module and a test task scheduling module, wherein the test task acquisition module is used for acquiring an environment deployment request and extracting a test task set from the environment deployment request;
the standard environment construction module is used for acquiring any test subtask from the test task set as a sample test task, inquiring the environment information of a sample test environment corresponding to the sample test task, changing the address of a test server in the sample test environment into the address of a standard server corresponding to the test server according to the environment information, and constructing a standard test environment;
the server address query module is used for querying the test server corresponding to each test subtask in the test task set and acquiring the queried address of the test server;
and the test environment building module is used for modifying the address of the server in the standard test environment into the address of the test server corresponding to each test subtask to obtain a plurality of built test environments.
8. The apparatus for encrypting lightweight communication data according to claim 7, wherein the querying a test server corresponding to each of the test subtasks in the test task set and obtaining an address of the queried test server includes:
acquiring environment information of a test environment corresponding to each test subtask, and acquiring a service identifier of each test server from the test environment according to the environment information of each corresponding test environment;
and inquiring the corresponding relation between the address of each test server and each service identification, and acquiring the address of each test server from the environment information according to the corresponding relation between the address of the test server and the service identification.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the test environment construction method of any one of claims 1 to 6.
10. A computer-readable storage medium comprising a storage data area storing created data and a storage program area storing a computer program; wherein the computer program, when executed by a processor, implements the test environment setup method of any of claims 1 to 6.
CN202211121760.9A 2022-09-15 2022-09-15 Test environment building method, device, equipment and medium Pending CN115408293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211121760.9A CN115408293A (en) 2022-09-15 2022-09-15 Test environment building method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211121760.9A CN115408293A (en) 2022-09-15 2022-09-15 Test environment building method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115408293A true CN115408293A (en) 2022-11-29

Family

ID=84166829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211121760.9A Pending CN115408293A (en) 2022-09-15 2022-09-15 Test environment building method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115408293A (en)

Similar Documents

Publication Publication Date Title
CN112085217A (en) Method, device, equipment and computer medium for deploying artificial intelligence service
CN114185895A (en) Data import and export method and device, electronic equipment and storage medium
CN114356530A (en) Task scheduling method and device, electronic equipment and storage medium
CN113468175A (en) Data compression method and device, electronic equipment and storage medium
CN113297180A (en) Data migration method and device, electronic equipment and storage medium
CN113360139A (en) Integration method and device of front-end frame, electronic equipment and storage medium
CN112631903A (en) Task testing method and device, electronic equipment and storage medium
CN112580079A (en) Authority configuration method and device, electronic equipment and readable storage medium
CN114185588A (en) Incremental package generation method, device, equipment and storage medium
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN115757121A (en) Test method, device, equipment and storage medium built based on test environment
CN114721952A (en) Method, device, equipment and storage medium for synchronously deploying multiple sets of test environments
CN114896164A (en) Interface optimization method and device, electronic equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN115174541A (en) H5 resource loading method and device, electronic equipment and storage medium
CN114895942A (en) Application skin changing method, device, equipment and storage medium
CN114398282A (en) Test script generation method, device, equipment and storage medium
CN114510400A (en) Task execution method and device, electronic equipment and storage medium
CN114461531A (en) Platform adaptability test method, device, equipment and storage medium of test case
CN115408293A (en) Test environment building method, device, equipment and medium
CN113918305A (en) Node scheduling method and device, electronic equipment and readable storage medium
CN112686759A (en) Account checking monitoring method, device, equipment and medium
CN114860314B (en) Deployment upgrading method, device, equipment and medium based on database compatibility
CN114357534B (en) Classroom training platform construction method, device, equipment and medium based on block chain
CN114721744A (en) Interface modification evaluation method and device, electronic equipment and readable storage medium

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