CN112306843A - Test method, test device and storage medium - Google Patents

Test method, test device and storage medium Download PDF

Info

Publication number
CN112306843A
CN112306843A CN201910691396.1A CN201910691396A CN112306843A CN 112306843 A CN112306843 A CN 112306843A CN 201910691396 A CN201910691396 A CN 201910691396A CN 112306843 A CN112306843 A CN 112306843A
Authority
CN
China
Prior art keywords
container
time
test
modifying
generating
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
CN201910691396.1A
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.)
Beijing Zhongguancun Kejin Technology Co Ltd
Original Assignee
Beijing Zhongguancun Kejin 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 Zhongguancun Kejin Technology Co Ltd filed Critical Beijing Zhongguancun Kejin Technology Co Ltd
Priority to CN201910691396.1A priority Critical patent/CN112306843A/en
Publication of CN112306843A publication Critical patent/CN112306843A/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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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
    • 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/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Abstract

The application discloses a test method. Wherein, the method comprises the following steps: determining a corresponding container mirror image according to the type of the test task, wherein the container mirror image comprises a compiled file for modifying time; generating a container for testing by using a container mirror image; calling an instruction which corresponds to the compiled file and is used for modifying time, and modifying the time of the container by using the compiled file; and performing the testing task in the container. Therefore, different test tasks can be operated in different containers without mutual interference, and the method is more flexible and efficient.

Description

Test method, test device and storage medium
Technical Field
The present application relates to the field of server testing, and in particular, to a testing method, device and storage medium.
Background
With the rapid development of the software industry, web application programs are widely applied, the business process is more and more complex, more and more application systems are provided, so that the test scene is more and more complex, and more test environments are required. There are also many requirements that require a certain amount of time to trigger certain specific interfaces for testing, which requires modification of system time. However, due to the limitation of cost, more than one system is generally deployed in a set of test environment, forced modification time can affect test work of other systems, a container technology (such as docker) can be used for solving the environment, and application deployment is prone to errors and low in efficiency. However, the container time cannot be modified, the modification time of the physical machine affects all the container time, different application systems and automatic test tasks require a user to write corresponding Dockerfile, the technical cost is high, standardization is not facilitated, and more manual intervention is required.
Aiming at the technical problems that the container time cannot be modified by using the container, all the container time is influenced by the modification time of a physical machine, and corresponding Dockerfile needs to be written by users for different application systems and automatic test tasks, so that the technical cost is high, the standardization is not facilitated, and more manual intervention is needed, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the disclosure provides a testing method, which is used for at least solving the technical problems that in the prior art, container time cannot be modified by using a container, all container time is influenced by the modification time of a physical machine, and different application systems and automatic testing tasks need users to compile corresponding Dockerfile, so that the technical cost is high, the standardization is not facilitated, and more manual intervention is needed.
According to an aspect of an embodiment of the present disclosure, there is provided a test method including: determining a corresponding container mirror image according to the type of the test task, wherein the container mirror image comprises a compiled file for modifying time; generating a container for testing by using a container mirror image; calling an instruction which corresponds to the compiled file and is used for modifying time, and modifying the time of the container by using the compiled file; and performing the testing task in the container.
According to another aspect of the embodiments of the present disclosure, there is also provided a storage medium including a stored program, wherein the method of any one of the above is performed by a processor when the program is executed.
According to another aspect of the embodiments of the present disclosure, there is also provided a test apparatus including: the determining module is used for determining a corresponding container mirror image according to the type of the test task, wherein the container mirror image comprises a compiled file for modifying time; the generating module is used for generating a container for testing by using the container mirror image; the modification module is used for calling an instruction which corresponds to the compiled file and is used for modifying time, and modifying the time of the container by utilizing the compiled file; and an execution module for executing the test task in the container.
In the embodiment of the disclosure, based on a container technology mode, by calling an instruction for modifying time, an automatic platform independent management test case is achieved, and the purpose of more flexibility is achieved, so that different test tasks run in different containers, cannot interfere with each other, and are more flexible and efficient, and a test structure is more durable. Furthermore, the technical problems that time cannot be modified by using a docker, time of all containers can be influenced by modifying time of a physical machine, corresponding Dockerfile needs to be written by users for different application systems and automatic test tasks, technical cost is high, standardization is not facilitated, and much manual intervention is needed in the prior art are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:
fig. 1 is a block diagram of a hardware structure of a computer terminal for implementing the method according to embodiment 1 of the present disclosure;
FIG. 2 is a schematic flow chart of a testing method according to embodiment 1 of the present disclosure;
fig. 3 is a schematic diagram of a testing method according to embodiment 1 of the present disclosure;
FIG. 4 is a schematic diagram of a testing apparatus according to embodiment 2 of the present disclosure; and
fig. 5 is a schematic diagram of a testing apparatus according to embodiment 3 of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It is to be understood that the described embodiments are merely exemplary of some, and not all, of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some of the nouns or terms appearing in the description of the embodiments of the present disclosure are applicable to the following explanations:
docker: docker is an open source application container engine, which allows developers to package their applications and rely on the packages to a portable container and then distribute them to any popular Linux machine, and also to implement virtualization. The containers are fully sandboxed without any interface between each other.
Libfacktime libfaketime intercepts the current date and time of various system calls that the program uses to retrieve. The date and time of modification (forgery) is then reported (as assigned to these programs by you (the user). this means you can modify the system time seen by the program without having to change the time within the system.
Example 1
There is also provided, in accordance with the present embodiment, a method of testing, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
The method provided by the embodiment can be executed in a mobile terminal, a computer terminal or a similar operation device. Fig. 1 shows a hardware block diagram of a computer terminal (or mobile device) for implementing the testing method. As shown in fig. 1, the computer terminal 10 (or mobile device 10) may include one or more (shown as 102a, 102b, … …, 102 n) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors 102 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuit may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computer terminal 10 (or mobile device). As referred to in the disclosed embodiments, the data processing circuit acts as a processor control (e.g., selection of a variable resistance termination path connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the method for displaying the reply short video in the embodiment of the present disclosure, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the method for displaying the reply short video of the application program. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computer terminal 10 (or mobile device).
It should be noted here that in some alternative embodiments, the computer device (or mobile device) shown in fig. 1 described above may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in the computer device (or mobile device) described above.
In the above operating environment, according to the first aspect of the present embodiment, a testing method is provided, where the method is implemented by the computing device shown in fig. 1, where the computing device shown in fig. 1 may be, for example, a testing platform capable of automatically executing testing tasks. Fig. 3 shows a flow diagram of the method, which, with reference to fig. 3, comprises:
s102: determining a corresponding container mirror image according to the type of the test task, wherein the container mirror image comprises a compiled file for modifying time;
s104: generating a container for testing by using a container mirror image;
s106: calling an instruction which corresponds to the compiled file and is used for modifying time, and modifying the time of the container by using the compiled file; and
s108: a test task is performed in the container.
Fig. 3 is a schematic diagram of a test system for executing the test method according to the embodiment. Wherein the test system shown in figure 3 runs on the computing device shown in figure 1. Referring to fig. 3, the automated testing platform determines corresponding container images according to the type of the testing task, such as a database type container image, a middleware type container image, and an application type container image. And wherein the container image contains a compiled file (e.g., libfaketime. so.1) for the modification time.
Then, the automated testing platform generates a container for testing using the container image, and calls an instruction (e.g., FAKETIME) for modifying time corresponding to the compilation file libfaketime.so.1, thereby modifying the time of the container using the compilation file libfaketime.so.1. The automated testing platform then performs the testing task in the container.
As described in the background, there is a problem in the prior art that the container time of a container cannot be modified individually, and the modification time at a physical machine affects all the container times.
Aiming at the technical problems in the prior art. Referring to fig. 3, according to the type of the test task, a corresponding container image is set in the automated test platform, and a compiled file for modification time is set in the container image. For example, a database container mirror, a middleware container mirror, and an application container mirror are made according to the types of the database test task, the middleware test task, and the application test task. The compiled file for the modified time may be, for example, Libfaketime. so.1 and its dependent package compiled by Libfaketime, and then both Libfaketime. so.1 and its dependent package compiled by Libfaketime are set in the container mirror.
Further, when the container time of the container needs to be modified, the automated testing platform calls an instruction for modifying time corresponding to the compilation file (for example, an instruction for modifying time corresponding to the compilation file libfaketime. so.1). Thus, the time of the container can be modified using FAKETIME. In this way, when the container time of a predetermined container is changed, the container time of the other container is not affected. Therefore, the problem that the container time of the container can not be independently modified and all the container time can be influenced when the time is modified by a physical machine in the prior art is solved.
It should be noted that, although in the present embodiment, the scheme of the present embodiment is described by taking FAKETIME as an example of an instruction for modifying time. The solution of the present embodiment is equally applicable to other types of instructions for modifying time.
It should be noted that, although in the present embodiment, the solution of the present embodiment is described by taking the database, the middleware, and the application as examples of different types of containers. The solution of the embodiment is equally applicable to other types of containers.
Optionally, before generating the test container, the method further includes: and compiling to generate a configuration file for deploying the test environment according to the first configuration information, wherein the first configuration information at least comprises information related to the container mirror.
Specifically, the automated testing platform configures the container mirror image according to the type of the testing task, wherein the configuration information includes: compiling information such as the type of the container mirror image, the code git address, the commit version, the memory allocation, the start script and the like. And generating a compiled file Libfaketime.so.1 according to the configuration information. And executing the compiled file libfaketime.so.1 to generate dockerfile.
Thus, configuration information for container images is determined for configuring different types of container images at different times. And based on cloud container technology, the mirror image is automatically generated, and the problem that in the prior art, a tester needs to manually write dockerfile, so that the technical cost is high is solved.
Optionally, the operation of generating a container for testing using a container image comprises: and deploying the test environment according to the configuration file, and generating a container.
Specifically, the automated testing platform can deploy a testing environment according to the configuration file dockerfile and generate containers of different types. Such as database containers, middleware containers, application containers, and the like. Therefore, by the mode, when the container is generated, the configuration file dockerfile does not need to be written manually, and the testing environment is deployed according to the configuration file dockerfile generated by the automatic testing platform to generate the container. The problem of exist among the prior art, need the tester to compile dockerfile manually, lead to technical cost high is solved.
Optionally, after the container is generated, the method further includes: the method comprises the following operations of acquiring the time of a container, calling an instruction for modifying the time corresponding to a compiled file, and modifying the time of the container by using the compiled file, and further comprises the following steps: calling instructions to modify the acquired container time in an increasing or decreasing manner; and modifying the time of the container based on the modified time using the compiled file.
Specifically, after the different containers are generated, as shown with reference to fig. 3, after the database container, the middleware container, and the application container are generated. When the time of a certain container needs to be modified (for example, a database container), the automatic test platform acquires the time of the container and calls a FAKETIME instruction to modify the acquired time of the container in an increasing or decreasing mode. The automated testing platform then modifies the time of the container based on the modified time using a compiled file (e.g., libfaketime.
Therefore, by using the FAKETIME, the internal time of different containers can be modified conveniently, and the problems that the time cannot be modified in the containers and the time of all the containers can be influenced in the modification time of the physical machine are solved. Thereby the human cost can be practiced thrift.
Optionally, before the time of modifying the container, further comprising: a test task is set up and initiated in the container. In particular, before the time of modifying the container, a test task needs to be set up and started in the container. Therefore, the test cases are independently managed by using the automation platform, and the test cases are more flexible and convenient.
Optionally, the operation of establishing and initiating a test task in the container includes: compiling and generating second configuration information corresponding to the test task according to the test task; and establishing and starting a test task according to the second configuration information.
Specifically, different types of containers compile and generate configuration information corresponding to the test tasks according to different types of test tasks, and establish and start different test tasks according to the configuration information. For example, a database type container, a middleware type container, and an application type container establish and start a database type test task, a middleware type test task, and an application type task according to respective corresponding types of test tasks.
Therefore, the test task is started and established, the test is automated, and the labor cost is saved.
Optionally, the method further comprises: and placing the test result into a file server, deleting the container after the test task is completed, and releasing corresponding resources.
Specifically, the test result is placed in the file server, and after the task needing to be tested is tested, the container is deleted, and the resource is released.
Therefore, when the task needing to be tested is finished, the resource does not need to be occupied, and the resource can be saved.
Optionally, the method further comprises: and (5) the test result is proposed from the file server and displayed.
Specifically, the test result is finally extracted from the file server and displayed on the automation platform. Therefore, the test platform is favorable for the test personnel to check and use, and is convenient for platform display and result comparison.
Therefore, according to the embodiment, based on a container technology mode, through calling the instruction for modifying time, the purpose that the test cases can be independently managed by the automatic platform and are more flexible is achieved, and therefore the technical effects that different test tasks run in different containers, cannot interfere with each other, are more flexible and efficient, and the test structure is more durable are achieved. Furthermore, the technical problems that time cannot be modified when the container is used, time of all containers can be influenced when the physical machine is modified, corresponding Dockerfile compiling is required by users for different application systems and automatic testing tasks, technical cost is high, standardization is not facilitated, and much manual intervention is required in the prior art are solved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
Fig. 4 shows a testing device 400 according to the first aspect of the present embodiment, which device 400 corresponds to the method according to the first aspect of embodiment 1. Referring to fig. 4, the apparatus 400 includes: a determining module 410, configured to determine a corresponding container image according to the type of the test task, where the container image includes a compiled file for modifying time; a generation module 420 for generating a container for testing using the container image; a modification module 430, configured to invoke an instruction for modifying time corresponding to the compiled file, and modify the time of the container using the compiled file; and an execution module 440 for executing the test task in the container.
Optionally, the method further comprises: and a compiling module, configured to compile to generate a configuration file for deploying the test environment according to first configuration information before the generating module 420 generates the test container, where the first configuration information at least includes information related to the container image.
Optionally, the generating module 420 includes: and the generation submodule is used for deploying the test environment according to the configuration file and generating the container.
Optionally, the method further comprises: an obtaining module for obtaining a time of the container after the generating module generates the container, and the modifying module further includes: the calling submodule is used for calling an instruction and modifying the acquired time of the container in an increasing or decreasing mode; and a modification submodule for modifying the time of the container based on the modified time using the compiled file.
Optionally, the method further comprises: and the starting module is used for establishing and starting the test task in the container before the time for modifying the container.
Optionally, the execution module 440 includes: the compiling submodule is used for compiling and generating second configuration information corresponding to the test task according to the test task; and the establishing submodule is used for establishing and starting a test task according to the second configuration information.
Optionally, the method further comprises: the input module is used for inputting the test result into the file server; and the deleting module is used for deleting the container and releasing the corresponding resources after the testing task is completed.
Optionally, the method further comprises: and the display module is used for extracting and displaying the test result from the file server.
Therefore, according to the embodiment, based on the container technology, the purpose that the test cases can be independently managed by the automation platform and are more flexible is achieved by calling the instruction for modifying the time, and therefore the technical effects that different test tasks run in different containers, cannot interfere with each other, are more flexible and efficient, and the test structure is more durable are achieved. Furthermore, the technical problems that time cannot be modified when the container is used, time of all containers can be influenced when the physical machine is modified, corresponding Dockerfile compiling is required by users for different application systems and automatic testing tasks, technical cost is high, standardization is not facilitated, and much manual intervention is required in the prior art are solved.
Example 3
Fig. 5 shows a testing device 500 according to the first aspect of the present embodiment, the device 500 corresponding to the method according to the first aspect of embodiment 1. Referring to fig. 5, the apparatus 500 includes: a processor 510; and a memory 520 coupled to processor 510 for providing processor 510 with instructions to process the following process steps:
determining a corresponding container mirror image according to the type of the test task, wherein the container mirror image comprises a compiled file for modifying time; generating a container for testing by using a container mirror image; calling an instruction which corresponds to the compiled file and is used for modifying time, and modifying the time of the container by using the compiled file; and performing the testing task in the container.
Optionally, before generating the test container, the method further includes: and compiling to generate a configuration file for deploying the test environment according to the first configuration information, wherein the first configuration information at least comprises information related to the container mirror.
Optionally, the operation of generating a container for testing using a container image comprises: and deploying the test environment according to the configuration file, and generating a container.
Optionally, after the container is generated, the method further includes: the method comprises the following operations of acquiring the time of a container, calling an instruction for modifying the time corresponding to a compiled file, and modifying the time of the container by using the compiled file, and further comprises the following steps: calling instructions to modify the acquired container time in an increasing or decreasing manner; and modifying the time of the container based on the modified time using the compiled file.
Optionally, before the time of modifying the container, further comprising: a test task is set up and initiated in the container.
Optionally, the operation of establishing and initiating a test task in the container includes: compiling and generating second configuration information corresponding to the test task according to the test task; and establishing and starting a test task according to the second configuration information.
Optionally, the method further comprises: putting the test result into a file server; and deleting the container and releasing the corresponding resources after the test task is completed.
Optionally, the method further comprises: and (5) the test result is proposed from the file server and displayed.
Therefore, according to the embodiment, based on a container technology mode, through calling the instruction for modifying time, the purpose that the test cases can be independently managed by the automatic platform and are more flexible is achieved, and therefore the technical effects that different test tasks run in different containers, cannot interfere with each other, are more flexible and efficient, and the test structure is more durable are achieved. Furthermore, the technical problems that time cannot be modified when the container is used, time of all containers can be influenced when the physical machine is modified, corresponding Dockerfile compiling is required by users for different application systems and automatic testing tasks, technical cost is high, standardization is not facilitated, and much manual intervention is required in the prior art are solved.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units 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, and can also be realized in a form of a software functional unit.
The integrated 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 computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of testing, comprising:
determining a corresponding container mirror image according to the type of the test task, wherein the container mirror image comprises a compiled file for modifying time;
generating a container for testing using the container image;
calling an instruction for modifying time corresponding to the compiled file, and modifying the time of the container by using the compiled file; and
executing the test task in the container.
2. The method of claim 1, further comprising, prior to generating the test receptacles: compiling and generating a configuration file for deploying the test environment according to the first configuration information, wherein
The first configuration information includes at least information related to the container image.
3. The method of claim 2, wherein the operation of generating a container for testing using the container image comprises:
and deploying a test environment according to the configuration file, and generating the container.
4. The method of claim 1, after generating the container, further comprising: the time of the container is obtained, and
calling an instruction for modifying time corresponding to the compiled file, and modifying the time of the container by using the compiled file, wherein the operation further comprises the following steps:
calling the instruction, and modifying the acquired time of the container in an increasing or decreasing mode; and
modifying, using the compiled file, the time of the container based on the modified time.
5. The method of claim 1, further comprising, prior to the time the container is modified: the test task is established and initiated in the container.
6. The method of claim 5, wherein establishing and initiating the test task in the container comprises:
compiling and generating second configuration information corresponding to the test task according to the test task; and
and establishing and starting the test task according to the second configuration information.
7. The method of claim 1, further comprising: putting the test result into a file server; and deleting the container and releasing the corresponding resources after the test task is completed.
8. The method of claim 1, further comprising: and the test result is proposed from the file server and displayed.
9. A storage medium comprising a stored program, wherein the method of any one of claims 1 to 8 is performed by a processor when the program is run.
10. A test apparatus, comprising:
the determining module is used for determining a corresponding container mirror image according to the type of the test task, wherein the container mirror image comprises a compiled file for modifying time;
the generating module is used for generating a container for testing by using the container mirror image;
the modification module is used for calling an instruction which is corresponding to the compiled file and is used for modifying time, and the compiled file is used for modifying the time of the container; and
an execution module to execute the test task in the container.
CN201910691396.1A 2019-07-29 2019-07-29 Test method, test device and storage medium Pending CN112306843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910691396.1A CN112306843A (en) 2019-07-29 2019-07-29 Test method, test device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910691396.1A CN112306843A (en) 2019-07-29 2019-07-29 Test method, test device and storage medium

Publications (1)

Publication Number Publication Date
CN112306843A true CN112306843A (en) 2021-02-02

Family

ID=74328990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910691396.1A Pending CN112306843A (en) 2019-07-29 2019-07-29 Test method, test device and storage medium

Country Status (1)

Country Link
CN (1) CN112306843A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501652A (en) * 2023-06-29 2023-07-28 绿城科技产业服务集团有限公司 Automatic testing method and system for sustainable integration based on SAAS (software as a service) system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017020770A1 (en) * 2015-07-31 2017-02-09 中兴通讯股份有限公司 Lxc-based continuous integration method and device
CN106933635A (en) * 2017-03-15 2017-07-07 北京搜狐新媒体信息技术有限公司 Docker mirror images generation method and Docker containers
CN107515783A (en) * 2016-06-16 2017-12-26 阿里巴巴集团控股有限公司 Application container management-control method and device based on application container cluster tool
CN107766126A (en) * 2017-11-15 2018-03-06 腾讯科技(深圳)有限公司 Construction method, system, device and the storage medium of container mirror image
CN108427641A (en) * 2018-01-29 2018-08-21 中国互联网络信息中心 A kind of multi-task scheduling automated testing method and system based on Docker containers
US20190034313A1 (en) * 2017-07-31 2019-01-31 Oracle International Corporation System and method to execute and manage load tests using containers
CN109324799A (en) * 2018-09-25 2019-02-12 珠海市筑巢科技有限公司 A kind of code compiling method, computer installation and computer readable storage medium
CN109344079A (en) * 2018-10-31 2019-02-15 广东高云半导体科技股份有限公司 Placement-and-routing's regression testing method, system, equipment and storage medium
CN109491662A (en) * 2018-10-31 2019-03-19 珠海市筑巢科技有限公司 Code packaging method, computer installation and computer readable storage medium, code packaging system
CN109684194A (en) * 2018-10-25 2019-04-26 北京中关村科金技术有限公司 A kind of automatic flow regression test system
CN110008106A (en) * 2018-01-04 2019-07-12 北京奇虎科技有限公司 Code test method, device and computer readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017020770A1 (en) * 2015-07-31 2017-02-09 中兴通讯股份有限公司 Lxc-based continuous integration method and device
CN107515783A (en) * 2016-06-16 2017-12-26 阿里巴巴集团控股有限公司 Application container management-control method and device based on application container cluster tool
CN106933635A (en) * 2017-03-15 2017-07-07 北京搜狐新媒体信息技术有限公司 Docker mirror images generation method and Docker containers
US20190034313A1 (en) * 2017-07-31 2019-01-31 Oracle International Corporation System and method to execute and manage load tests using containers
CN107766126A (en) * 2017-11-15 2018-03-06 腾讯科技(深圳)有限公司 Construction method, system, device and the storage medium of container mirror image
CN110008106A (en) * 2018-01-04 2019-07-12 北京奇虎科技有限公司 Code test method, device and computer readable storage medium
CN108427641A (en) * 2018-01-29 2018-08-21 中国互联网络信息中心 A kind of multi-task scheduling automated testing method and system based on Docker containers
CN109324799A (en) * 2018-09-25 2019-02-12 珠海市筑巢科技有限公司 A kind of code compiling method, computer installation and computer readable storage medium
CN109684194A (en) * 2018-10-25 2019-04-26 北京中关村科金技术有限公司 A kind of automatic flow regression test system
CN109344079A (en) * 2018-10-31 2019-02-15 广东高云半导体科技股份有限公司 Placement-and-routing's regression testing method, system, equipment and storage medium
CN109491662A (en) * 2018-10-31 2019-03-19 珠海市筑巢科技有限公司 Code packaging method, computer installation and computer readable storage medium, code packaging system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MARKSUGAR: "linuxea:如何单单修改docker容器的系统时间", Retrieved from the Internet <URL:https://www.linuxea.com/2316.html> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501652A (en) * 2023-06-29 2023-07-28 绿城科技产业服务集团有限公司 Automatic testing method and system for sustainable integration based on SAAS (software as a service) system
CN116501652B (en) * 2023-06-29 2023-09-12 绿城科技产业服务集团有限公司 Automatic testing method and system for sustainable integration based on SAAS (software as a service) system

Similar Documents

Publication Publication Date Title
CN111527474B (en) Dynamic delivery of software functions
CN105164644A (en) Hook framework
CN108920370B (en) Compatibility problem detection method, device and equipment
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN111399840B (en) Module development method and device
CN111930382B (en) Application page access method, device and equipment
CN107370804B (en) Software application processing method and device
CN108733553A (en) Configuration method, the device and system of test device based on docker
CN113312083B (en) Application generation method, device and equipment
CN108733370B (en) Stylized display method, device, terminal and storage medium of native APP
CN112068850A (en) Method and device for creating service product instance and electronic equipment
CN112631649A (en) Intelligent contract management method, device, terminal equipment and medium
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN110941634A (en) Data processing method and device, storage medium and electronic device
CN112217731B (en) Target application generation method and device and storage medium
CN112306843A (en) Test method, test device and storage medium
CN113452556A (en) Product skill configuration method and device, storage medium and electronic device
CN110908652A (en) Method and device for creating active page and compiling active page
CN112214701A (en) Page display method and system, storage medium and electronic device
CN110597717A (en) Code testing method, device and storage medium
CN112416734A (en) Test method, device and storage medium
CN114637549A (en) Data processing method, system and storage medium for service grid-based application
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN110673879A (en) One-key adjustment method and device for element style of configuration software
CN110609781A (en) Interface test method, device 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