CN110532170B - Method and device for building test environment, electronic equipment and medium - Google Patents

Method and device for building test environment, electronic equipment and medium Download PDF

Info

Publication number
CN110532170B
CN110532170B CN201910648542.2A CN201910648542A CN110532170B CN 110532170 B CN110532170 B CN 110532170B CN 201910648542 A CN201910648542 A CN 201910648542A CN 110532170 B CN110532170 B CN 110532170B
Authority
CN
China
Prior art keywords
environment
service
identifier
target
parameters
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
CN201910648542.2A
Other languages
Chinese (zh)
Other versions
CN110532170A (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.)
Beijing Wenyuanjia Technology Co ltd
Original Assignee
Beijing Wenyuanjia Technology 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 Beijing Wenyuanjia Technology Co ltd filed Critical Beijing Wenyuanjia Technology Co ltd
Priority to CN201910648542.2A priority Critical patent/CN110532170B/en
Publication of CN110532170A publication Critical patent/CN110532170A/en
Application granted granted Critical
Publication of CN110532170B publication Critical patent/CN110532170B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a method, a device, electronic equipment and a medium for building a test environment. In the application, after the construction request is obtained, the corresponding construction parameters can be obtained from the database based on the environment identifier and the service identifier in the construction request, and then the target test environment is generated according to the construction parameters and the target environment frame. By applying the technical scheme, the automatic generation of the target test environment can be realized by utilizing the construction parameters corresponding to the construction test environment request and the preset environment frame. And the problem of low efficiency caused by the fact that corresponding test environments are needed to be built for each set of test service manually in the related technology can be avoided.

Description

Method and device for building test environment, electronic equipment and medium
Technical Field
The present application relates to data processing technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for building a test environment.
Background
With the rapid development of the internet, many software development technologies are improved, so that software testing is increasingly gaining importance for enterprises.
The existing software test requires a large number of test machines to be deployed by testers, and a test environment similar to a client environment is built in the test machines manually, so that the software test can be performed. Further, the test environment is a test environment which is simulated by a tester using a key tool or the like and is close to a real environment. In general, the test environment should have business data and business codes consistent with the real environment. The developer can conduct corresponding business development through the test environment.
However, in the related art, it takes a lot of time and effort for the tester to build a corresponding test environment for each set of test services, resulting in inefficiency for the tester.
Disclosure of Invention
The embodiment of the invention provides a method, a device, electronic equipment and a medium for building a test environment.
According to an aspect of the embodiment of the present application, a method for building a test environment is provided, which is characterized in that the method includes:
acquiring a construction request, wherein the construction request carries an environment identifier and a service identifier and is used for constructing a target test environment;
based on the environment identifier and the service identifier, acquiring corresponding construction parameters from a database;
and generating the target test environment according to the building parameters and the target environment frame.
Optionally, in another embodiment of the method according to the present application, the obtaining, based on the environment identifier and the service identifier, the corresponding building parameter from the database includes:
based on the environment identifier, acquiring corresponding environment parameters from the database;
and identifying the service identifier and determining the service environment type corresponding to the service identifier.
Optionally, in another embodiment of the method according to the present application, after the identifying the service identifier and determining a service environment type corresponding to the service identifier, the method further includes:
acquiring the target environment frame based on the service environment type;
and
The generating the target test environment according to the building parameters and the target environment frame includes:
and adapting the environment parameters to the target environment frame to generate the target test environment.
Optionally, in another embodiment based on the above method of the present application, the target test environment is logically isolated from other test environments by a namespace in a service resource pool, the service resource pool being composed of a plurality of different servers.
Optionally, in another embodiment of the method according to the present application, the obtaining, based on the environment identifier and the service identifier, the corresponding building parameter from the database further includes:
acquiring a target service type corresponding to the service identifier;
determining the priority of the target service type based on a priority list, wherein the priority list comprises construction priority information corresponding to a plurality of service types;
and when the priority of the target service type is determined to be in a preset range, acquiring the construction parameters from the database based on the environment identifier and the service identifier.
In addition, according to an aspect of the embodiments of the present application, there is provided an apparatus for building a test environment, including:
the first acquisition module is configured to acquire a construction request, wherein the construction request carries an environment identifier and a service identifier and is used for constructing a target test environment;
the second acquisition module is configured to acquire corresponding construction parameters from a database based on the environment identifier and the service identifier;
the generating module is configured to generate the target test environment according to the building parameters and a target environment frame.
Optionally, in the apparatus according to the present application, the method further includes:
the second acquisition module is configured to acquire corresponding environment parameters from the database based on the environment identifier;
the second acquisition module is configured to identify the service identifier and determine a service environment type corresponding to the service identifier.
Optionally, in the apparatus according to the present application, the method further includes:
the second acquisition module is configured to acquire the target environment frame based on the service environment type; and
the second obtaining module, configured to generate the target test environment according to the building parameters and the target environment frame, includes: and adapting the environment parameters to the target environment frame to generate the target test environment.
According to still another aspect of the embodiments of the present application, there is provided an electronic device including:
a memory for storing executable instructions; and
and the processor is used for displaying with the memory to execute the executable instructions so as to complete the operation of any method for building the test environment.
According to yet another aspect of the embodiments of the present application, there is provided a computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of any of the above-described methods of building a test environment.
In the application, after the construction request is obtained, the corresponding construction parameters can be obtained from the database based on the environment identifier and the service identifier in the construction request, and then the target test environment is generated according to the construction parameters and the target environment frame. By applying the technical scheme, the automatic generation of the target test environment can be realized by utilizing the construction parameters corresponding to the construction test environment request and the preset environment frame. And the problem of low efficiency caused by the fact that corresponding test environments are needed to be built for each set of test service manually in the related technology can be avoided.
The technical scheme of the present application is described in further detail below through the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and, together with the description, serve to explain the principles of the application.
The present application will be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a system architecture of a method of building a test environment according to the present application;
FIG. 2 is a schematic diagram of adapting environmental parameters by the environmental framework of the present application;
FIG. 3 is a schematic diagram of the physical resource pool divided into a plurality of environment frameworks according to the present application;
FIG. 4 is a schematic structural diagram of a device for building a test environment according to the present application;
fig. 5 is a schematic diagram of an electronic device according to the present application.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
It should be noted that all directional indicators (such as up, down, left, right, front, and rear … …) in the embodiments of the present application are merely used to explain the relative positional relationship, movement, etc. between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is correspondingly changed.
In addition, descriptions such as those related to "first," "second," and the like, are provided for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated in this application. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless explicitly defined otherwise.
In the present application, unless explicitly specified and limited otherwise, the terms "coupled," "secured," and the like are to be construed broadly, and for example, "secured" may be either permanently attached or removably attached, or integrally formed; can be mechanically or electrically connected; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art as the case may be.
In addition, the technical solutions of the embodiments of the present application may be combined with each other, but it is necessary to be based on the fact that those skilled in the art can implement the technical solutions, and when the technical solutions are contradictory or cannot be implemented, the combination of the technical solutions should be considered to be absent, and is not within the scope of protection claimed in the present application.
A method for performing a construction test environment according to an exemplary embodiment of the present application is described below in connection with fig. 1 to 4. It should be noted that the following application scenario is only shown for the convenience of understanding the spirit and principles of the present application, and embodiments of the present application are not limited in any way in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
The application also provides a method, a device, a target terminal and a medium for constructing the test environment.
Fig. 1 schematically shows a flow diagram of a method of building a test environment according to an embodiment of the present application. As shown in fig. 2, the method includes:
s101, acquiring a construction request, wherein the construction request carries an environment identifier and a service identifier, and the construction request is used for constructing a target test environment.
Firstly, it should be noted that the present application does not specifically limit the device for obtaining the building request. The build request may be obtained, for example, by a smart device. The build request may also be obtained by the server. In addition, the application is not limited to the intelligent device, and can be, for example, a mobile phone, a notebook computer, a Pad, and the like. The construction request in the application can carry the environment identifier and the service identifier
The building request is used for building a target test environment. Further, the test environment (Testing environment) refers to a description of the software and hardware environment on which the test is run, as well as any other software that interacts with the software under test, including drivers and stub. The test environment refers to the collective term of computer hardware, software, historical data, and network devices necessary to complete the software testing work.
Furthermore, the target test environment in the application can be used for testing the network communication equipment in the network online education, because the network communication equipment has multiple corresponding service types, each type of network communication equipment needs the corresponding test environment to test, the types of the test environments are also multiple, the network communication equipment can select the types and the numbers of the test environments based on the service test requirements, and the types and the numbers of the required test environments are different when different network services are tested. There are also many types of test environments that a developer needs to cooperate in developing a service for testing. Furthermore, the application can also manage and correspondingly build and/or configure each set of test environment through the server.
In addition, the server can be connected with each test device in a similar manner to a star networking connection mode, each test device is managed through the server, and the server is used for distributing corresponding test devices for the network communication devices to be tested based on the test requirements of the network communication devices to be tested, namely distributing the network communication devices of corresponding types and numbers for the network communication devices according to the requirements of the network communication devices to be tested on the types and numbers of the network communication devices to be tested in the test process of the network communication devices to be tested, the test devices distributed to the network communication devices to be tested and other test devices which are not distributed to the network communication devices to be tested belong to different broadcast domains, namely the network communication devices currently being tested occupy an independent broadcast domain in the networking system of the invention, and other idle test devices in the networking system can be used by other network communication devices to be tested under the isolation effect of the server, so that the test efficiency of the whole networking system is effectively improved, the concurrency of the same time is improved, and the full utilization of the resources of the test devices is carried out.
Moreover, the environment identifier and the service identifier are not particularly limited in this application. Wherein the environment identification may be used to indicate a service deploying the corresponding test environment. For example, the corresponding test environment may be confirmed in the form of a number. In addition, the service identifier in the present application may be used to indicate a corresponding service type. For example, the service type of the data communication class, the service type of the payment class, the service type of the live broadcast class, etc.
S102, based on the environment identification and the service identification, acquiring corresponding construction parameters from a database.
In the application, after the environment identifier and the service identifier corresponding to the building request are obtained, the corresponding building parameters can be searched from the database. So that the corresponding target test environment is generated according to the building parameters.
The construction parameters are not specifically limited in this application, and for example, the construction parameters may be corresponding parameters of a test environment suitable for deployment of the construction request. By acquiring the construction parameters, corresponding test environments can be directly deployed according to different test requirements.
In addition, the method and the device can determine the service type corresponding to the construction request according to the service identifier. And further, according to the service type, acquiring a corresponding test framework for automatically building a test environment. So that the corresponding test environment is automatically generated according to the test framework.
S103, generating a target test environment according to the construction parameters and the target environment frame.
The target environment frame in the present application may be a preset environment frame. The environment frame can be a frame suitable for any testing environment. The method and the device can achieve the purpose of automatically generating the target test environment by adapting corresponding building parameters in the target environment frame.
In the application, after the construction request is obtained, the corresponding construction parameters can be obtained from the database based on the environment identifier and the service identifier in the construction request, and then the target test environment is generated according to the construction parameters and the target environment frame. By applying the technical scheme, the automatic generation of the target test environment can be realized by utilizing the construction parameters corresponding to the construction test environment request and the preset environment frame. And the problem of low efficiency caused by the fact that corresponding test environments are needed to be built for each set of test service manually in the related technology can be avoided.
In an optional embodiment of the present application, at S102 (based on the environment identifier and the service identifier, the corresponding building parameters are obtained from the database), a specific embodiment is further included:
based on the environment identification, acquiring corresponding environment parameters from a database;
and identifying the service identifier and determining the service environment type corresponding to the service identifier.
In the application, variable parameters corresponding to the deployment test environment in the system can be acquired based on the environment identification. The environmental parameters are not specifically limited in this application. That is, the environmental parameters can be set to correspond to different environmental parameters according to different requirements of the test environment.
Furthermore, in the application, the service environment type corresponding to the construction target test environment can be determined according to the service identifier in the construction request. The service environment type is not specifically limited in the present application, and may be, for example, an environment type corresponding to a service of a data communication class, an environment type corresponding to a service of a payment class, an environment type corresponding to a service of a live broadcast class, and the like.
In the present application, different environment frameworks may correspond to different service environment types. Specifically, after the service environment type corresponding to the service identifier is obtained, a corresponding environment frame is searched from a database according to the service environment type.
Optionally, after identifying the service identifier and determining the service environment type corresponding to the service identifier, the following steps may be implemented:
based on the service environment type, a target environment frame is acquired.
And adapting the environment parameters to the target environment frame to generate a target test environment.
In the application, after the service environment type is acquired, the target environment frame corresponding to the environment type can be extracted from the database. The target environment frame may be any one of a plurality of environment frames corresponding to the type.
Wherein the target environment frame may be preconfigured with necessary parameters required for deploying the test environment. Furthermore, the application can generate the target test environment only by adapting the environment parameter to the target environment frame. For example, as shown in fig. 2, the parameter information is preset and deployed in the target environment frame, where the framed place is the position for adapting to the environmental parameter. In the application, the acquired environment parameters are input into the frame, so that a corresponding system capable of generating the target test environment can be completed, and after a tester inputs a corresponding instruction, the target test environment is generated.
Further optionally, before generating the target test environment according to the building parameters and the target environment frame, the following steps may be further implemented:
the target test environment is logically isolated from other test environments by namespaces in a service resource pool, which is composed of a plurality of different servers.
Specifically, the present application may first obtain a service resource pool based on a resource management tool;
for example: using Kubernetes, kubernetes may be used to manage containerized applications on multiple hosts in a cloud platform. The goal of Kubernetes is to make deploying a containerized application simple and efficient, further, it provides a mechanism for application deployment, planning, updating, and maintenance.
Furthermore, the method can be realized by a Kubernetes deployment container mode, each container is isolated from each other, each container is provided with a file system, processes among the containers cannot affect each other, and computing resources can be distinguished. Because the container can be deployed quickly relative to the virtual machine, it can migrate between different clouds, different versions of operating systems because the container is decoupled from the underlying facility, the machine file system. Thus, the service resource pool supported by multiple servers can be acquired based on Kubernetes in the present application. It should be noted that, the number of servers in the service resource pool is not specifically limited in this application. For example, the number of the components may be 5 or 10.
According to Namespace, a service resource pool is divided into a plurality of environment frameworks, and the plurality of environment frameworks are applied to different servers.
Further, namespace is used to control name conflicts for identifiers (e.g., variables, functions, classes, etc.). Therefore, in the application, the service resource pool can be logically isolated into a plurality of areas through Namespace, wherein each area corresponds to one test environment framework respectively. It should be noted that the multiple environment frameworks in the present application may be applied to different servers.
For example, as shown in fig. 3, the present application may assemble the servers 1, 2, 3, and 4 into a service resource pool through Kubernetes. And further, the service resource pool is divided into 10 environment frames by means of Namespace. Wherein each environment frame corresponds to a different test environment. And each test environment may be applied in a different server.
In another embodiment of the present application, after obtaining the building request, the method further includes the following implementation steps:
acquiring a target service type corresponding to the service identifier;
determining the priority of the target service type based on a priority list, wherein the priority list comprises construction priority information corresponding to a plurality of service types;
after the service identifier corresponding to the building request is obtained, the service identifier can be compared with each identifier in the priority building list. Thereby determining the priority level of the target service type corresponding to the service identifier. It can be appreciated that, when the priority of the target service type corresponding to the service identifier is higher, the priority of the target test environment is generated based on the building request.
Further, the priority setting up list in the present application may be a preset list. Wherein, can customize at will according to tester's demand. The present application is not limited in this regard.
And when the priority of the target service type is determined to be in the preset range, acquiring construction information from the database based on the environment identifier and the service identifier.
Further, when the priority level of the target service type is determined to be within the preset range, it may be determined that the priority level of the building request is higher. And then, according to the environment identifier and the service identifier, building parameters can be obtained from a database and used for generating a target test environment subsequently.
It should be noted that the preset range is not specifically limited in this application. For example, the preset range may be a range having a priority order of the first five in the priority build list, or the preset range may be a range having a priority order of the first ten in the priority build list.
In another embodiment of the present application, as shown in fig. 4, the present application further provides an apparatus for building a test environment, where the apparatus includes a first obtaining module 301, a second obtaining module 302, and a generating module 303, where,
the first acquisition module is configured to acquire a construction request, wherein the construction request carries an environment identifier and a service identifier and is used for constructing a target test environment;
the second acquisition module is configured to acquire corresponding construction parameters from a database based on the environment identifier and the service identifier;
the generating module is configured to generate the target test environment according to the building parameters and a target environment frame.
In the application, after the construction request is obtained, the corresponding construction parameters can be obtained from the database based on the environment identifier and the service identifier in the construction request, and then the target test environment is generated according to the construction parameters and the target environment frame. By applying the technical scheme, the automatic generation of the target test environment can be realized by utilizing the construction parameters corresponding to the construction test environment request and the preset environment frame. And the problem of low efficiency caused by the fact that corresponding test environments are needed to be built for each set of test service manually in the related technology can be avoided.
Optionally, in another embodiment of the present application, the second obtaining module 302 further includes:
a second obtaining module 302, configured to obtain corresponding environmental parameters from the database based on the environmental identifier;
a second obtaining module 302, configured to identify the service identifier, and determine a service environment type corresponding to the service identifier.
In another embodiment of the present application, the second obtaining module 302 further includes:
a second obtaining module 302 configured to obtain the target environment frame based on the service environment type; and
the generating the target test environment according to the building parameters and the target environment frame includes:
a second acquisition module 302 is configured to adapt the environmental parameters into the target environment frame, generating the target test environment.
In another embodiment of the present application, further comprises a generating module 303, wherein:
the generating module 303 is configured to logically isolate the target test environment from other test environments by a namespace in a service resource pool, where the service resource pool is composed of a plurality of different servers.
In another embodiment of the present application, further comprising, determining module 304, wherein:
a determining module 304, configured to obtain a target service type corresponding to the service identifier;
a determining module 304, configured to determine a priority of the target service type based on a priority list, where the priority list includes setup priority information corresponding to a plurality of service types;
the determining module 304 is configured to obtain the setting-up parameter from the database based on the environment identifier and the service identifier when determining that the priority level of the target service type is within a preset range.
Fig. 5 is a block diagram of a logical structure of an electronic device, according to an example embodiment. For example, electronic device 500 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 5, an electronic device 500 may include one or more of the following components: a processor 501 and a memory 502.
Processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 501 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 501 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 501 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 501 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 502 is used to store at least one instruction for execution by processor 501 to implement the interactive special effects calibration method provided by the method embodiments herein.
In some embodiments, the electronic device 500 may further optionally include: a peripheral interface 503 and at least one peripheral. The processor 501, memory 502, and peripheral interface 503 may be connected by buses or signal lines. The individual peripheral devices may be connected to the peripheral device interface 503 by buses, signal lines or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 504, touch display 505, camera 506, audio circuitry 507, positioning component 508, and power supply 509.
Peripheral interface 503 may be used to connect at least one Input/Output (I/O) related peripheral to processor 501 and memory 502. In some embodiments, processor 501, memory 502, and peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 501, memory 502, and peripheral interface 503 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 504 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuitry 504 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 504 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 504 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 504 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 504 may also include NFC (Near Field Communication ) related circuitry, which is not limited in this application.
The display 505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 505 is a touch display, the display 505 also has the ability to collect touch signals at or above the surface of the display 505. The touch signal may be input as a control signal to the processor 501 for processing. At this time, the display 505 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 505 may be one, providing a front panel of the electronic device 500; in other embodiments, the display 505 may be at least two, and disposed on different surfaces of the electronic device 500 or in a folded design; in still other embodiments, the display 505 may be a flexible display disposed on a curved surface or a folded surface of the electronic device 500. Even more, the display 505 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display 505 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 506 is used to capture images or video. Optionally, the camera assembly 506 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 506 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuitry 507 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 501 for processing, or inputting the electric signals to the radio frequency circuit 504 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple and separately disposed at different locations of the electronic device 500. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 501 or the radio frequency circuit 504 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuitry 507 may also include a headphone jack.
The location component 508 is used to locate the current geographic location of the electronic device 500 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 508 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
The power supply 509 is used to power the various components in the electronic device 500. The power supply 509 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 509 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 500 further includes one or more sensors 510. The one or more sensors 510 include, but are not limited to: an acceleration sensor 511, a gyro sensor 512, a pressure sensor 513, a fingerprint sensor 514, an optical sensor 515, and a proximity sensor 516.
The acceleration sensor 511 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the electronic device 500. For example, the acceleration sensor 511 may be used to detect components of gravitational acceleration on three coordinate axes. The processor 501 may control the touch display 505 to display a user interface in a landscape view or a portrait view according to a gravitational acceleration signal acquired by the acceleration sensor 511. The acceleration sensor 511 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 512 may detect a body direction and a rotation angle of the electronic apparatus 500, and the gyro sensor 512 may collect a 3D motion of the user on the electronic apparatus 500 in cooperation with the acceleration sensor 511. The processor 501 may implement the following functions based on the data collected by the gyro sensor 512: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 513 may be disposed at a side frame of the electronic device 500 and/or at an underlying layer of the touch screen 505. When the pressure sensor 513 is disposed on a side frame of the electronic device 500, a grip signal of the electronic device 500 by a user may be detected, and the processor 501 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 513. When the pressure sensor 513 is disposed at the lower layer of the touch display screen 505, the processor 501 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 505. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 514 is used for collecting the fingerprint of the user, and the processor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 501 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 514 may be provided on the front, back or side of the electronic device 500. When a physical key or vendor Logo is provided on the electronic device 500, the fingerprint sensor 514 may be integrated with the physical key or vendor Logo.
The optical sensor 515 is used to collect the ambient light intensity. In one embodiment, the processor 501 may control the display brightness of the touch screen 505 based on the ambient light intensity collected by the optical sensor 515. Specifically, when the intensity of the ambient light is high, the display brightness of the touch display screen 505 is turned up; when the ambient light intensity is low, the display brightness of the touch display screen 505 is turned down. In another embodiment, the processor 501 may also dynamically adjust the shooting parameters of the camera assembly 506 based on the ambient light intensity collected by the optical sensor 515.
A proximity sensor 516, also referred to as a distance sensor, is typically provided on the front panel of the electronic device 500. The proximity sensor 516 is used to collect the distance between the user and the front of the electronic device 500. In one embodiment, when the proximity sensor 516 detects a gradual decrease in the distance between the user and the front of the electronic device 500, the processor 501 controls the touch display 505 to switch from the bright screen state to the off screen state; when the proximity sensor 516 detects that the distance between the user and the front surface of the electronic device 500 gradually increases, the processor 501 controls the touch display screen 505 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 5 is not limiting of the electronic device 500 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium including instructions, such as memory 504 including instructions, executable by processor 520 of electronic device 500 to perform the method of building a test environment described above, the method comprising: acquiring a construction request, wherein the construction request carries an environment identifier and a service identifier and is used for constructing a target test environment; based on the environment identifier and the service identifier, acquiring corresponding construction parameters from a database; and generating the target test environment according to the building parameters and the target environment frame. Optionally, the above instructions may also be executed by the processor 520 of the electronic device 500 to perform the other steps involved in the above-described exemplary embodiments. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, there is also provided an application/computer program product comprising one or more instructions executable by the processor 520 of the electronic device 500 to perform the above-described method of building a test environment, the method comprising: acquiring a construction request, wherein the construction request carries an environment identifier and a service identifier and is used for constructing a target test environment; based on the environment identifier and the service identifier, acquiring corresponding construction parameters from a database; and generating the target test environment according to the building parameters and the target environment frame. Optionally, the above instructions may also be executed by the processor 520 of the electronic device 500 to perform the other steps involved in the above-described exemplary embodiments.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (6)

1. A method of constructing a test environment, comprising:
acquiring a construction request, wherein the construction request carries an environment identifier and a service identifier, and the construction request is used for constructing a target test environment which is used for testing network communication equipment in network online education;
based on the environment identifier and the service identifier, acquiring corresponding construction parameters from a database, wherein the environment identifier is used for indicating the deployment of the service of the corresponding test environment, and the service identifier is used for indicating the service type corresponding to the network communication equipment;
generating the target test environment according to the building parameters and a target environment frame;
the obtaining, based on the environment identifier and the service identifier, the corresponding construction parameters from the database includes:
based on the environment identifier, acquiring corresponding environment parameters from the database;
identifying the service identifier and determining a service environment type corresponding to the service identifier;
the generating the target test environment according to the building parameters and the target environment frame includes:
and adapting the environment parameters to the target environment frame acquired based on the service environment type to generate the target test environment.
2. The method of claim 1, wherein the target test environment is logically isolated from other test environments by namespaces in a service resource pool, the service resource pool being comprised of a plurality of different servers.
3. The method of claim 1, wherein the obtaining the corresponding construction parameters from the database based on the environment identifier and the service identifier further comprises:
acquiring a target service type corresponding to the service identifier;
determining the priority of the target service type based on a priority list, wherein the priority list comprises construction priority information corresponding to a plurality of service types;
and when the priority of the target service type is determined to be in a preset range, acquiring the construction parameters from the database based on the environment identifier and the service identifier.
4. A device for building a test environment, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire a construction request, the construction request carries an environment identifier and a service identifier, the construction request is used for constructing a target test environment, and the target test environment is used for testing network communication equipment in network online education;
the second acquisition module is configured to acquire corresponding construction parameters from a database based on the environment identifier and the service identifier, wherein the environment identifier is used for indicating the deployment of the service of the corresponding test environment, and the service identifier is used for indicating the service type corresponding to the network communication equipment;
the generation module is configured to generate the target test environment according to the building parameters and a target environment frame;
wherein the second acquisition module is specifically configured to:
based on the environment identifier, acquiring corresponding environment parameters from the database;
identifying the service identifier and determining a service environment type corresponding to the service identifier;
the generation module is specifically configured to adapt the environment parameters to the target environment frame acquired based on the service environment type, and generate the target test environment.
5. An electronic device, comprising:
a memory for storing executable instructions; the method comprises the steps of,
a processor for displaying with the memory to execute the executable instructions to perform the operations of the method of building a test environment of any one of claims 1-3.
6. A computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of the method of building a test environment of any one of claims 1-3.
CN201910648542.2A 2019-07-18 2019-07-18 Method and device for building test environment, electronic equipment and medium Active CN110532170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910648542.2A CN110532170B (en) 2019-07-18 2019-07-18 Method and device for building test environment, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910648542.2A CN110532170B (en) 2019-07-18 2019-07-18 Method and device for building test environment, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN110532170A CN110532170A (en) 2019-12-03
CN110532170B true CN110532170B (en) 2023-08-08

Family

ID=68660283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910648542.2A Active CN110532170B (en) 2019-07-18 2019-07-18 Method and device for building test environment, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN110532170B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026089B (en) * 2019-12-25 2021-06-15 卡斯柯信号(北京)有限公司 Automatic deployment method and device for train control center test environment
CN113377187A (en) * 2020-03-09 2021-09-10 Oppo广东移动通信有限公司 Power consumption optimization parameter configuration method and device, storage medium and electronic equipment
CN111506358B (en) * 2020-03-23 2023-10-20 聚好看科技股份有限公司 Method and device for updating container configuration
CN111597189B (en) * 2020-05-13 2023-09-01 北京三快在线科技有限公司 Method, device, equipment and storage medium for acquiring data
CN112598420B (en) * 2020-11-23 2023-05-09 贝壳技术有限公司 Online regression verification method and device
CN113179399B (en) * 2021-04-19 2022-08-26 深圳市慧鲤科技有限公司 Live-action-based construction method and related product
CN113608994A (en) * 2021-06-30 2021-11-05 天津五八到家货运服务有限公司 Request processing method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8850396B2 (en) * 2010-05-27 2014-09-30 Red Hat Israel, Ltd. Performing software testing based on grouping of tests using test list entity
CN105591782A (en) * 2014-10-24 2016-05-18 中兴通讯股份有限公司 Management method and apparatus for testing device
CN108108297A (en) * 2016-11-25 2018-06-01 腾讯科技(深圳)有限公司 The method and apparatus of automatic test
CN108399114A (en) * 2018-03-21 2018-08-14 财付通支付科技有限公司 A kind of system performance testing method, apparatus and storage medium
CN108763076A (en) * 2018-05-22 2018-11-06 深圳乐信软件技术有限公司 A kind of Software Automatic Testing Method, device, equipment and medium
CN109189856A (en) * 2018-08-15 2019-01-11 中国联合网络通信集团有限公司 Distributed data base service management, device, server and storage medium
CN109495559A (en) * 2018-11-06 2019-03-19 用友网络科技股份有限公司 Service registration and call method, the registration and calling system of micro services client
CN109933594A (en) * 2019-02-15 2019-06-25 北京大米科技有限公司 Obtain method, apparatus, electronic equipment and the medium of data

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150154097A1 (en) * 2012-10-05 2015-06-04 Compact Solutions, Llc System and method for automated testing
CN106656650B (en) * 2016-10-08 2020-01-14 腾讯科技(深圳)有限公司 Method and system for generating service test environment, and method, device and system for service test
CN108763090B (en) * 2018-05-31 2024-04-05 天航长鹰(江苏)科技有限公司 Test environment deployment method, device, computer equipment and storage medium
CN109240924B (en) * 2018-09-03 2024-03-08 中国平安人寿保险股份有限公司 Application program testing method and device
CN109828870A (en) * 2018-12-15 2019-05-31 中国平安人寿保险股份有限公司 Interface testing environmental management technique, device, electronic equipment and storage medium
CN109871328B (en) * 2019-02-26 2022-04-05 网宿科技股份有限公司 Software testing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8850396B2 (en) * 2010-05-27 2014-09-30 Red Hat Israel, Ltd. Performing software testing based on grouping of tests using test list entity
CN105591782A (en) * 2014-10-24 2016-05-18 中兴通讯股份有限公司 Management method and apparatus for testing device
CN108108297A (en) * 2016-11-25 2018-06-01 腾讯科技(深圳)有限公司 The method and apparatus of automatic test
CN108399114A (en) * 2018-03-21 2018-08-14 财付通支付科技有限公司 A kind of system performance testing method, apparatus and storage medium
CN108763076A (en) * 2018-05-22 2018-11-06 深圳乐信软件技术有限公司 A kind of Software Automatic Testing Method, device, equipment and medium
CN109189856A (en) * 2018-08-15 2019-01-11 中国联合网络通信集团有限公司 Distributed data base service management, device, server and storage medium
CN109495559A (en) * 2018-11-06 2019-03-19 用友网络科技股份有限公司 Service registration and call method, the registration and calling system of micro services client
CN109933594A (en) * 2019-02-15 2019-06-25 北京大米科技有限公司 Obtain method, apparatus, electronic equipment and the medium of data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
众包软件测试技术研究进展;章晓芳 等;《软件学报》;第29卷(第1期);69-88 *

Also Published As

Publication number Publication date
CN110532170A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN110532170B (en) Method and device for building test environment, electronic equipment and medium
CN113204298B (en) Method and device for displaying release progress, electronic equipment and storage medium
CN108959361B (en) Form management method and device
CN110784370B (en) Method and device for testing equipment, electronic equipment and medium
CN110659127A (en) Method, device and system for processing task
CN111192005A (en) Government affair service processing method and device, computer equipment and readable storage medium
CN112052354A (en) Video recommendation method, video display method and device and computer equipment
CN113837709A (en) Online processing method and device of business process, terminal and readable storage medium
CN111754564B (en) Video display method, device, equipment and storage medium
CN112991439A (en) Method, apparatus, electronic device, and medium for positioning target object
CN113467663B (en) Interface configuration method, device, computer equipment and medium
CN113051485B (en) Group searching method, device, terminal and storage medium
CN113377647B (en) Page processing method, device, server, terminal and readable storage medium
CN114329292A (en) Resource information configuration method and device, electronic equipment and storage medium
CN112988254B (en) Method, device and equipment for managing hardware equipment
CN111064657B (en) Method, device and system for grouping concerned accounts
CN110570123B (en) Resource information management method, system and device based on block chain
CN113051494A (en) Information display method and device, electronic equipment and storage medium
CN112579926A (en) Method and device for acquiring target resource, electronic equipment and storage medium
CN113076452A (en) Application classification method, device, equipment and computer readable storage medium
CN112132472A (en) Resource management method and device, electronic equipment and computer readable storage medium
CN113204724A (en) Method and device for creating interactive information, electronic equipment and storage medium
CN111539794A (en) Voucher information acquisition method and device, electronic equipment and storage medium
CN110544108B (en) Social user classification method and device, electronic equipment and medium
CN114189703B (en) Resource information processing method and device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant