CN111400194A - Snapshot creating method, snapshot executing method, snapshot creating device, snapshot executing device and equipment based on test tool - Google Patents

Snapshot creating method, snapshot executing method, snapshot creating device, snapshot executing device and equipment based on test tool Download PDF

Info

Publication number
CN111400194A
CN111400194A CN202010304062.7A CN202010304062A CN111400194A CN 111400194 A CN111400194 A CN 111400194A CN 202010304062 A CN202010304062 A CN 202010304062A CN 111400194 A CN111400194 A CN 111400194A
Authority
CN
China
Prior art keywords
snapshot
test tool
creating
command
copy
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
CN202010304062.7A
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010304062.7A priority Critical patent/CN111400194A/en
Publication of CN111400194A publication Critical patent/CN111400194A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

One or more embodiments of the present specification provide a snapshot creating method, an execution method, an apparatus, and a device based on a test tool, where after an input parameter is obtained by the test tool, if a first snapshot creating command based on the test tool is obtained, a first snapshot is created based on the input parameter, so that when the input parameter needs to be used subsequently, the input parameter can be restored conveniently and quickly based on the created first snapshot, thereby implementing complete reproduction of the input parameter of the test tool, and facilitating use and sharing of the input parameter of the test tool.

Description

Snapshot creating method, snapshot executing method, snapshot creating device, snapshot executing device and equipment based on test tool
Technical Field
The present disclosure relates to the field of snapshot technologies, and in particular, to a snapshot creating method, a snapshot executing method, a snapshot creating apparatus, and a snapshot executing apparatus based on a test tool.
Background
Currently, in some big data application scenarios, in order to ensure a sufficient amount of data, data preparation needs to be performed based on task requirements. In order to improve the efficiency of data preparation, test data can be generated by means of a test tool, a user only needs to fill input parameters in the test tool to execute the test tool, and the test tool can generate test data with complex business operations.
Disclosure of Invention
In view of the above, one or more embodiments of the present disclosure provide a snapshot creating method, a snapshot executing device, and a snapshot creating apparatus based on a test tool, so as to facilitate subsequent use and sharing of a snapshot.
One or more embodiments of the present specification provide a test tool based snapshot creation method, including: acquiring input parameters based on the test tool; acquiring a first snapshot creating command based on the testing tool; and creating a first snapshot according to the first snapshot creating command based on the input parameters, wherein the first snapshot comprises a copy of the input parameters when the first snapshot creating command is acquired.
One or more embodiments of the present specification also provide a test tool-based snapshot execution method, including: acquiring a first snapshot execution command, wherein the first snapshot is created based on input parameters of the test tool according to a first snapshot creation command of the test tool, and the first snapshot comprises a copy of the input parameters when the first snapshot creation command is acquired; acquiring a copy of the input parameters of the test tool contained in the first snapshot according to the identifier of the first snapshot; and inputting the copy of the input parameter as an input parameter into the test tool so that the test tool generates test data according to the copy of the input parameter.
One or more embodiments of the present specification also provide a snapshot creating apparatus based on a test tool, including: the first acquisition module is used for acquiring input parameters based on the test tool; the second acquisition module is used for acquiring a first snapshot creating command based on the test tool; a first creating module, configured to create a first snapshot according to the first snapshot creating command based on the input parameter, where the first snapshot includes a copy of the input parameter when the first snapshot creating command is obtained.
One or more embodiments of the present specification also provide a snapshot executing apparatus based on a test tool, including: a fifth obtaining module, configured to obtain a first snapshot execution command, where the first snapshot is created based on an input parameter of the test tool according to a first snapshot creation command of the test tool, and the first snapshot includes a copy of the input parameter when the first snapshot creation command is obtained; a sixth obtaining module, configured to obtain, according to the identifier of the first snapshot, a copy of the input parameter of the test tool included in the first snapshot; and the input module is used for inputting the copy of the input parameter as an input parameter into the test tool so that the test tool generates test data according to the copy of the input parameter.
One or more embodiments of the present specification further provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any one of the above-mentioned test tool based snapshot creation methods or any one of the above-mentioned test tool based snapshot execution apparatuses.
As can be seen from the foregoing, in the snapshot creating method based on a test tool in one or more embodiments of the present specification, after the test tool obtains an input parameter, if a snapshot creating command based on the test tool is obtained, a snapshot of the test tool is created based on the input parameter, so that when the input parameter needs to be used subsequently, the input parameter can be conveniently and quickly restored based on the created snapshot, thereby completely reproducing the input parameter of the test tool, and facilitating use and sharing of the input parameter of the test tool.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of a test tool based snapshot creation system provided in accordance with one or more embodiments of the present description;
FIG. 2 is a flow diagram illustrating a test tool based snapshot creation method in accordance with one or more embodiments of the present description;
FIG. 3 is a schematic diagram of a shared snapshot shown in accordance with one or more embodiments of the present description;
FIG. 4 is a schematic diagram of a shared snapshot shown in accordance with one or more embodiments of the present description;
FIG. 5 is a flow diagram of a test tool based snapshot execution method in accordance with one or more embodiments of the present description;
FIG. 6 is a block diagram illustrating a test tool based snapshot creation apparatus in accordance with one or more embodiments of the present description;
FIG. 7 is a block diagram illustrating a test tool based snapshot execution apparatus in accordance with one or more embodiments of the present description;
fig. 8 is a schematic diagram illustrating a more specific hardware architecture of an electronic device according to one or more embodiments of the present disclosure.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that technical terms or scientific terms used in the embodiments of the present disclosure should have a general meaning as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
When data is prepared, because the types of test tools are many and complex, a user often needs to check various documents to know how to execute the test tools, for example, how to fill in input parameters, and after the input parameters are filled in, the user can execute the test tools to generate test data. If the execution data (including the input parameters and the test data) of the test tool still needs to be used subsequently, the execution data needs to be recorded manually or in a screenshot manner, and the recording manner is inconvenient for subsequent use and sharing of the execution data.
In one or more embodiments of the present description, a test tool based snapshot creation system is provided. Before describing the system, a brief explanation of the definition of the snapshot is first provided. A snapshot is, for example, a fully available copy with respect to a given data set, the copy comprising an image of the corresponding data at a certain point in time (the point in time at which the copy started). The snapshot may be a copy of the data it represents or may be a replica of the data. The user may choose to create a snapshot at a certain point in time. After the snapshot creation is completed, the data in the server may be restored to the time node of the snapshot at some point in time later. One basic use of snapshots is data backup. Note that this backup is a data backup for a node at a certain time. Because a snapshot may be a copy or replica of the data it represents, a snapshot may of course also be used by the data source.
Fig. 1 is a block diagram illustrating a snapshot system based on a test tool, such as a test data generation tool, according to one or more embodiments of the present disclosure, and the system relates to the test tool and a database, as shown in fig. 1. The test tool may, for example, provide a user interface in which input boxes are presented, in which the user can fill in input parameters. An "execute" button may also be provided on the user interface, and after the user has filled in the input parameters, the "execute" button is clicked, so that the test tool generates test data based on the input parameters. In addition, a "create snapshot" button may be provided on the user interface, which may be clicked by the user to create a snapshot. For example, after the user has filled in the input parameters, and clicks the "create snapshot" button, a first snapshot may be created based on the input parameters, and the input parameters are saved to the database; and after the user clicks the 'execute' button, the test tool generates test data based on the input parameters, and at the moment, the user clicks the 'create snapshot' button again, and then creates a second snapshot based on the test data and stores the test data into the database. After the first snapshot is created, the user does not need to fill input parameters in a user interface of the testing tool, the input parameters corresponding to the first snapshot can be recovered through the first snapshot of the testing tool created before, and the testing tool can be directly operated based on the input parameters, or the testing data corresponding to the second snapshot can be recovered through the second snapshot created before.
Optionally, the test data may be used for a software test tool to perform a software test.
FIG. 2 is a flow diagram illustrating a test tool based snapshot creation method, as shown in FIG. 2, in accordance with one or more embodiments of the present specification, the method comprising:
step 202: acquiring input parameters based on a test tool;
for example, the test tool may be presented in the form of a web page on which the user fills in the input parameters, or the input parameters may be stored in a database and retrieved from the database by the test tool.
Step 204: acquiring a first snapshot creating command based on the testing tool;
in the above example, a "create snapshot" button may be set on the web page, and after the user clicks the button, a first snapshot creating command may be generated, and the test tool creates a snapshot of the test tool according to the first snapshot creating command based on the current input parameters in the test tool.
Step 206: and creating a first snapshot according to the first snapshot creating command based on the input parameters, wherein the first snapshot comprises a copy of the input parameters when the first snapshot creating command is acquired.
Optionally, creating the first snapshot based on the input parameter may include storing the input parameter in a database and generating a link to the first snapshot.
In the snapshot creating method based on the test tool according to one or more embodiments of the present description, after the test tool obtains the input parameter, if the first snapshot creating command based on the test tool is obtained, the first snapshot is created based on the input parameter, so that when the input parameter needs to be used subsequently, the input parameter can be restored conveniently and quickly based on the created first snapshot, thereby completely reproducing the input parameter of the test tool, and facilitating use and sharing of the input parameter of the test tool.
In one or more embodiments of the present specification, the test tool based snapshot creating method may further include: after creating a first snapshot based on the input parameters according to the first snapshot creation command, naming the name of the first snapshot as the name of the test tool. Because the types of the test tools are more, after the snapshot is created and stored, in order to facilitate the subsequent use and sharing of the snapshot, the snapshot can be named according to the name of the test tool, so that if the input parameters are required to be used subsequently, the snapshot can be searched according to the name of the test tool, and the snapshot can be easily acquired by a subsequent user. Alternatively, in order to distinguish the data types contained in the snapshots, a field of the data type may be added on the basis of the name of the test tool, so that the name of the snapshot may further include the data type of the copy of the input parameter contained in the snapshot, for example, assuming that the name of the test tool is "a", the type of the data in the created first snapshot is b, the name of the first snapshot may be "a-b", and the type of the data in the created first snapshot is c, the name of the first snapshot may be "a-c", where the data type may include, for example, the input parameter or the test data.
In one or more embodiments of the present description, creating a first snapshot based on the input parameters according to the first snapshot creation command may include: and storing character strings corresponding to the input parameters in a database according to the attribute names of the input parameters. Optionally, the input parameter may be saved in the database by Map String, and the input parameter is stored in the Map String list, for example, the input parameter is stored in the database by using the attribute name of the input parameter as Key and the input parameter as Value. Wherein Map is an interface and represents a key-value pair, and String indicates that the input parameter is of a String type. Fig. 3 is a schematic diagram of a shared snapshot according to one or more embodiments of the present disclosure, and it is assumed that a first snapshot created based on an input parameter is pre-stored in a database in a server, for example, a user a, a user B, and a user C need to use test data generated based on the input parameter, and a link of the first snapshot can be directly clicked, so that a system can find a corresponding Value in a Map String list according to an attribute name of the input parameter, and thus, the input parameter can be automatically backfilled to a test tool and the test tool can be executed, so as to obtain the test data.
In one or more embodiments of the present specification, the test tool based snapshot creating method may further include: acquiring an execution command based on the test tool; and executing the test tool according to the execution command so that the test tool generates test data based on the input parameters. For example, an "execute" button is presented on a user interface of the test tool, and when a user clicks the "execute" button, an execution command is generated and the test tool is executed, and the test tool generates test data according to the input parameters.
In one or more embodiments of the present specification, the test tool based snapshot creating method may further include: after the test tool generates test data based on the input parameters, receiving a second snapshot creating command, and creating a second snapshot based on the test data according to the second snapshot creating command, wherein the second snapshot comprises a copy of the test data when the second snapshot creating command is acquired. The creation mode of the second snapshot is the same as the creation mode of the first snapshot, and details are not repeated here. After the second snapshot is created and stored, if the test data is needed to be used subsequently, the input parameters and the execution of the test tool do not need to be filled in the test tool, the second snapshot can be directly searched and clicked, the test tool can search the snapshot record in the database according to the name of the second snapshot to obtain the test data, for example, the test tool can find the corresponding value in the Map String list according to the attribute name of the test data to obtain the test data.
In one or more embodiments of the present description, creating a first snapshot based on the input parameters according to the first snapshot creation command may include: and generating a link of the first snapshot according to the first snapshot creating command. After the link of the first snapshot is generated, the link may be saved in the testing tool, so that a webpage of the testing tool may be opened by clicking the link later to present the input parameters in the webpage, and the testing tool may be executed based on the input parameters to generate the test data. Fig. 4 is a schematic diagram of sharing snapshots according to one or more embodiments of the present disclosure, where, as shown in fig. 4, a user D inputs an input parameter to a test tool, executes the test tool, creates a snapshot of the test tool, stores the input parameter in a database, generates a snapshot link, and shares the snapshot link with the user a, the user B, and the user C, so as to implement sharing of the input parameter.
Optionally, in the first embodiment, creating a second snapshot based on the test data according to the second snapshot creating command may include: and generating a link of the second snapshot according to the second snapshot creating command. For example, after the link of the second snapshot is generated, the link may be saved in the testing tool, so that a subsequent user may open a webpage of the testing tool by clicking the link to present the test data in the webpage, so that the user may obtain the test data based on the link directly without filling in the input parameters. And after the link of the second snapshot is obtained, forwarding the link to the equipment of other users so as to realize the sharing of the test data. Other users may present the user interface of the test tool on their devices and the test data in the user interface by clicking on the link.
In one or more embodiments of the present description, the first snapshot or the second snapshot may be, for example, UR L (Uniform Resource L locator) snapshot.
Fig. 5 is a flow diagram illustrating a test tool based snapshot execution method, as shown in fig. 5, in accordance with one or more embodiments of the present description, the method comprising:
step 502: acquiring a first snapshot execution command, wherein the first snapshot is created based on input parameters of the test tool according to a first snapshot creation command of the test tool, and the first snapshot comprises a copy of the input parameters when the first snapshot creation command is acquired;
for example, after the user clicks on the link of the first snapshot, the system generates a first snapshot execution command.
Step 504: acquiring a copy of the input parameters of the test tool contained in the first snapshot according to the identifier of the first snapshot;
alternatively, the identifier of the first snapshot may be, for example, a name of the first snapshot or a character string having a unique correspondence with the first snapshot.
In one example, the attribute name of the input parameter in the first snapshot may be determined according to the correspondence between the name of the first snapshot and the attribute name of the input parameter in the first snapshot, and a copy of the input parameter stored in advance may be obtained from the database according to the attribute name.
Step 506: and inputting the copy of the input parameter as an input parameter into the test tool so that the test tool generates test data according to the copy of the input parameter.
In one or more embodiments of the present specification, the test tool-based snapshot executing method may further include:
acquiring a second snapshot execution command, wherein the second snapshot is created according to a second snapshot creating command based on the testing tool after the testing tool generates historical testing data according to input parameters, and the second snapshot comprises a copy of the historical testing data when the second snapshot creating command is acquired; in one example, the user clicks on the link of the second snapshot and the system generates an execute command for the second snapshot.
Acquiring a copy of the historical test data according to the identifier of the second snapshot; alternatively, the identifier of the second snapshot may be, for example, a name of the second snapshot or a character string having a unique correspondence with the second snapshot.
In one example, the attribute name of the input parameter in the second snapshot may be determined according to the correspondence between the name of the second snapshot and the attribute name of the test data in the second snapshot, and a copy of the pre-stored test data may be obtained from the database according to the attribute name.
Outputting a copy of the historical test data in a page of the test tool.
In one or more embodiments of the present specification, obtaining a copy of the input parameters of the test tool contained in the first snapshot according to the identification of the first snapshot includes:
and acquiring the character string of the copy of the input parameter stored in a database according to the corresponding relation between the identifier of the first snapshot and the attribute name of the copy of the input parameter.
Fig. 6 is a block diagram of a snapshot creating apparatus based on a test tool according to one or more embodiments of the present specification, where, as shown in fig. 6, the apparatus 60 includes:
a first obtaining module 62 for obtaining input parameters based on the testing tool;
a second obtaining module 64, configured to obtain a first snapshot creating command based on the testing tool;
a first creating module 66, configured to create a first snapshot according to the first snapshot creating command based on the input parameter, where the first snapshot includes a copy of the input parameter when the first snapshot creating command is obtained.
In one or more embodiments of the present specification, the test tool based snapshot creating apparatus may further include: a naming module for naming a name of the first snapshot as a name of the test tool after creating the first snapshot based on the input parameter according to the first snapshot creating command.
In one or more embodiments of the present description, the first creation module may be operable to: and storing character strings corresponding to the input parameters in a database according to the attribute names of the input parameters.
In one or more embodiments of the present specification, the test tool based snapshot creating apparatus may further include: and the establishing module is used for establishing the corresponding relation between the attribute name and the name of the first snapshot after the character strings corresponding to the input parameters are stored in a database according to the attribute names of the input parameters.
In one or more embodiments of the present specification, the test tool based snapshot creating apparatus may further include: a third obtaining module, configured to obtain an execution command based on the test tool; and the generating module is used for executing the testing tool according to the executing command so as to enable the testing tool to generate testing data based on the input parameters.
In one or more embodiments of the present specification, the test tool based snapshot creating apparatus may further include: the fourth obtaining module is used for obtaining a second snapshot creating command after the test tool generates test data based on the input parameters; and the second creating module is used for creating a second snapshot according to the second snapshot creating command and based on the test data, wherein the second snapshot comprises a mapping of the test data when the second snapshot creating command is acquired.
In one or more embodiments of the present description, the second creation module may be operable to: and generating a link of the second snapshot according to the second snapshot creating command.
In one or more embodiments of the present description, the first creation module may be operable to: and generating a link of the first snapshot according to the first snapshot creating command.
Fig. 7 is a block diagram illustrating a test tool based snapshot execution apparatus according to one or more embodiments of the present disclosure, and as shown in fig. 7, the apparatus 70 may include:
a fifth obtaining module 72, configured to obtain a first snapshot executing command, where the first snapshot is created based on an input parameter of the testing tool according to a first snapshot creating command of the testing tool, and the first snapshot includes a copy of the input parameter when the first snapshot creating command is obtained;
a sixth obtaining module 74, configured to obtain, according to the identifier of the first snapshot, a copy of the input parameters of the test tool included in the first snapshot;
an input module 76, configured to input the copy of the input parameter as an input parameter into the testing tool, so that the testing tool generates testing data according to the copy of the input parameter.
In one or more embodiments of the present specification, the test tool based snapshot performing apparatus may further include:
a seventh obtaining module, configured to obtain a second snapshot execution command, where the second snapshot is created according to a second snapshot creating command based on the testing tool after the testing tool generates historical test data according to an input parameter, and the second snapshot includes a copy of the historical test data when the second snapshot creating command is obtained;
an eighth obtaining module, configured to obtain a copy of the historical test data according to the identifier of the second snapshot;
and the output module is used for outputting the copy of the historical test data in the page of the test tool.
In one or more embodiments of the present disclosure, the sixth obtaining module may be configured to:
and acquiring the character string of the copy of the input parameter stored in a database according to the corresponding relation between the identifier of the first snapshot and the attribute name of the copy of the input parameter.
One or more embodiments of the present specification further provide an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements any one of the test tool based snapshot creation methods described above when executing the program.
One or more embodiments of the present specification further provide an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements any one of the test tool based snapshot creation methods described above when executing the program.
It should be noted that the method of one or more embodiments of the present disclosure may be performed by a single device, such as a computer or server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the devices may perform only one or more steps of the method of one or more embodiments of the present disclosure, and the devices may interact with each other to complete the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Fig. 8 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to one or more embodiments of the present disclosure, where, as shown in fig. 8, the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the present disclosure, features in the above embodiments or in different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the present disclosure as described above, which are not provided in detail for the sake of brevity.
In addition, well known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures for simplicity of illustration and discussion, and so as not to obscure the disclosure. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the disclosure, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the present disclosure is to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The embodiments of the present disclosure are intended to embrace all such alternatives, modifications and variances that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalents, improvements, and the like that may be made within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.

Claims (19)

1. A snapshot creating method based on a test tool comprises the following steps:
acquiring input parameters based on the test tool;
acquiring a first snapshot creating command based on the testing tool;
and creating a first snapshot according to the first snapshot creating command based on the input parameters, wherein the first snapshot comprises a copy of the input parameters when the first snapshot creating command is acquired.
2. The method of claim 1, wherein the method further comprises:
after creating a first snapshot based on the input parameters according to the first snapshot creation command, naming the name of the first snapshot as the name of the test tool.
3. The method of claim 1, wherein creating a first snapshot based on the input parameters according to the first snapshot creation command comprises:
and storing character strings corresponding to the input parameters in a database according to the attribute names of the input parameters.
4. The method of claim 3, wherein the method further comprises:
after the character strings corresponding to the input parameters are stored in a database according to the attribute names of the input parameters, establishing the corresponding relation between the attribute names and the names of the first snapshots.
5. The method of claim 1, wherein the method further comprises:
acquiring an execution command based on the test tool;
and executing the test tool according to the execution command so that the test tool generates test data based on the input parameters.
6. The method of claim 5, wherein the method further comprises:
and after the test tool generates test data based on the input parameters, acquiring a second snapshot creating command, and creating a second snapshot based on the test data according to the second snapshot creating command, wherein the second snapshot comprises a copy of the test data when the second snapshot creating command is acquired.
7. A test tool based snapshot execution method, comprising:
acquiring a first snapshot execution command, wherein the first snapshot is created based on input parameters of the test tool according to a first snapshot creation command of the test tool, and the first snapshot comprises a copy of the input parameters when the first snapshot creation command is acquired;
acquiring a copy of the input parameters of the test tool contained in the first snapshot according to the identifier of the first snapshot;
and inputting the copy of the input parameter as an input parameter into the test tool so that the test tool generates test data according to the copy of the input parameter.
8. The method of claim 7, wherein the method further comprises:
acquiring a second snapshot execution command, wherein the second snapshot is created according to a second snapshot creating command based on the testing tool after the testing tool generates historical testing data according to input parameters, and the second snapshot comprises a copy of the historical testing data when the second snapshot creating command is acquired;
acquiring a copy of the historical test data according to the identifier of the second snapshot;
outputting a copy of the historical test data in a page of the test tool.
9. The method of claim 7 or 8, wherein obtaining a copy of the input parameters of the test tool contained in the first snapshot in accordance with the identification of the first snapshot comprises:
and acquiring the character string of the copy of the input parameter stored in a database according to the corresponding relation between the identifier of the first snapshot and the attribute name of the copy of the input parameter.
10. A test tool based snapshot creation apparatus, comprising:
the first acquisition module is used for acquiring input parameters based on the test tool;
the second acquisition module is used for acquiring a first snapshot creating command based on the test tool;
a first creating module, configured to create a first snapshot according to the first snapshot creating command based on the input parameter, where the first snapshot includes a copy of the input parameter when the first snapshot creating command is obtained.
11. The apparatus of claim 10, wherein the apparatus further comprises:
a naming module for naming a name of the first snapshot as a name of the test tool after creating the first snapshot based on the input parameter according to the first snapshot creating command.
12. The apparatus of claim 10, wherein the first creation module is to:
and storing character strings corresponding to the input parameters in a database according to the attribute names of the input parameters.
13. The apparatus of claim 12, wherein the apparatus further comprises:
and the establishing module is used for establishing the corresponding relation between the attribute name and the name of the first snapshot after the character strings corresponding to the input parameters are stored in a database according to the attribute names of the input parameters.
14. The apparatus of claim 10, wherein the apparatus further comprises:
a third obtaining module, configured to obtain an execution command based on the test tool;
and the generating module is used for executing the testing tool according to the executing command so as to enable the testing tool to generate testing data based on the input parameters.
15. The apparatus of claim 14, wherein the apparatus further comprises:
the fourth obtaining module is used for obtaining a second snapshot creating command after the test tool generates test data based on the input parameters;
and the second creating module is used for creating a second snapshot according to the second snapshot creating command and based on the test data, wherein the second snapshot comprises a mapping of the test data when the second snapshot creating command is acquired.
16. A test tool based snapshot execution apparatus, comprising:
a fifth obtaining module, configured to obtain a first snapshot execution command, where the first snapshot is created based on an input parameter of the test tool according to a first snapshot creation command of the test tool, and the first snapshot includes a copy of the input parameter when the first snapshot creation command is obtained;
a sixth obtaining module, configured to obtain, according to the identifier of the first snapshot, a copy of the input parameter of the test tool included in the first snapshot;
and the input module is used for inputting the copy of the input parameter as an input parameter into the test tool so that the test tool generates test data according to the copy of the input parameter.
17. The apparatus of claim 16, wherein the apparatus further comprises:
a seventh obtaining module, configured to obtain a second snapshot execution command, where the second snapshot is created according to a second snapshot creating command based on the testing tool after the testing tool generates historical test data according to an input parameter, and the second snapshot includes a copy of the historical test data when the second snapshot creating command is obtained;
an eighth obtaining module, configured to obtain a copy of the historical test data according to the identifier of the second snapshot;
and the output module is used for outputting the copy of the historical test data in the page of the test tool.
18. The apparatus of claim 16 or 17, wherein the sixth obtaining means is configured to:
and acquiring the character string of the copy of the input parameter stored in a database according to the corresponding relation between the identifier of the first snapshot and the attribute name of the copy of the input parameter.
19. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the test tool based snapshot creation method of any one of claims 1 to 6 or the test tool based snapshot execution apparatus of any one of claims 7 to 9 when executing the program.
CN202010304062.7A 2020-04-17 2020-04-17 Snapshot creating method, snapshot executing method, snapshot creating device, snapshot executing device and equipment based on test tool Pending CN111400194A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010304062.7A CN111400194A (en) 2020-04-17 2020-04-17 Snapshot creating method, snapshot executing method, snapshot creating device, snapshot executing device and equipment based on test tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010304062.7A CN111400194A (en) 2020-04-17 2020-04-17 Snapshot creating method, snapshot executing method, snapshot creating device, snapshot executing device and equipment based on test tool

Publications (1)

Publication Number Publication Date
CN111400194A true CN111400194A (en) 2020-07-10

Family

ID=71437033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010304062.7A Pending CN111400194A (en) 2020-04-17 2020-04-17 Snapshot creating method, snapshot executing method, snapshot creating device, snapshot executing device and equipment based on test tool

Country Status (1)

Country Link
CN (1) CN111400194A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294184A (en) * 2016-08-30 2017-01-04 广州华多网络科技有限公司 The graphical creation method of test scene, device and terminal unit
CN108717462A (en) * 2018-05-28 2018-10-30 郑州云海信息技术有限公司 A kind of database snapshot verification method and system
CN109298983A (en) * 2018-10-24 2019-02-01 郑州云海信息技术有限公司 A kind of snapshot characteristic test method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294184A (en) * 2016-08-30 2017-01-04 广州华多网络科技有限公司 The graphical creation method of test scene, device and terminal unit
CN108717462A (en) * 2018-05-28 2018-10-30 郑州云海信息技术有限公司 A kind of database snapshot verification method and system
CN109298983A (en) * 2018-10-24 2019-02-01 郑州云海信息技术有限公司 A kind of snapshot characteristic test method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107729246B (en) Auxiliary test method, device and equipment for target application and storage medium
CN104423961A (en) Method and system for generating testing script
CN112214210A (en) Logistics business rule engine and configuration method, device, equipment and storage medium thereof
CN112463135A (en) Code generation method, code generator, electronic device, and storage medium
CN113885935A (en) Resource packaging method and device, electronic equipment and computer readable storage medium
CN111917579A (en) Distributed training method, device, equipment and storage medium
CN104956326A (en) Test script creation based on abstract test user controls
CN117215910A (en) Interface test frame generation method, test method, electronic device and storage medium
WO2023273621A1 (en) Script generation method and apparatus, device and medium
CN111400194A (en) Snapshot creating method, snapshot executing method, snapshot creating device, snapshot executing device and equipment based on test tool
CN114546823B (en) Method for reproducing debug scenario of logic system design and related equipment
CN114924830A (en) Online IDE code management method based on NAS storage and related equipment
CN115618363A (en) Vulnerability path mining method and related equipment
CN115291963A (en) Method for configuring hardware resources, electronic device and storage medium
CN112560413B (en) Report form expansion method, device and equipment based on configuration mode
CN111001157B (en) Method and device for generating reference information, storage medium and electronic device
CN112000319A (en) Logistics service code generation method, client, electronic equipment and system
CN112487773A (en) Report generation method, device, equipment and storage medium
CN114254232A (en) Cloud product page generation method and device, computer equipment and storage medium
CN111309331B (en) Business processing method and device, electronic equipment and storage medium
CN117130946B (en) Test scene generation method and device, electronic equipment and readable storage medium
CN115390912B (en) Resource discovery method, device, computer equipment and storage medium
CN114968447A (en) Online webpage generation and management method and related equipment
CN112379915A (en) Source code processing method and device
CN115688816A (en) Method and related equipment for translating model characters

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200710