CN111382073A - Automatic test case determination method, device, equipment and storage medium - Google Patents

Automatic test case determination method, device, equipment and storage medium Download PDF

Info

Publication number
CN111382073A
CN111382073A CN202010156568.8A CN202010156568A CN111382073A CN 111382073 A CN111382073 A CN 111382073A CN 202010156568 A CN202010156568 A CN 202010156568A CN 111382073 A CN111382073 A CN 111382073A
Authority
CN
China
Prior art keywords
test case
target
determining
function
code
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
CN202010156568.8A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010156568.8A priority Critical patent/CN111382073A/en
Publication of CN111382073A publication Critical patent/CN111382073A/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

Abstract

The application discloses a method, a device, equipment and a storage medium for determining an automatic test case, wherein the method comprises the following steps: acquiring a target code; when the target code is changed iteratively, determining a change code; determining a target function dynamic call link set corresponding to a change code; determining a target automation test case set matched with the target function dynamic call link set based on a preset database; the construction method of the preset database comprises the following steps: in the running process of each automatic test case, codes are injected in a section-oriented programming mode, and function dynamic call links are collected; determining an automatic test case corresponding to each function dynamic call link; and constructing a preset database based on the mapping relation between each function dynamic call link and the automatic test case. The method and the device can determine the automatic test cases influenced by the change codes, avoid verifying all the automatic test cases, and improve the verification efficiency.

Description

Automatic test case determination method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of automated testing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for determining an automated test case.
Background
The automatic test is a process of converting a test behavior driven by human into machine execution, and is a test method which saves manpower and time cost and improves test efficiency. The automatic testing technology is widely applied to the field of software testing and is mainly used for performing fast regression verification on software to be on-line. The automatic test needs to convert the manual test case into a script language executed by a machine, and the process is called automatic case development, which is the key and difficult work of the automatic test.
With the diversification and complication of services, testers can write more and more automatic test cases so as to facilitate regression verification or continuous verification of a continuous integrated basic flow. However, as the number of the automatic test cases increases, the time for regression verification or basic flow verification also increases, and further the test instant feedback efficiency and the development iteration efficiency of the project continuous integration are increased.
Therefore, it is necessary to provide a method, an apparatus, a device, and a storage medium for determining an automatic test case, in which a dynamic call link of a function is determined by updating a code, and an automatic test case corresponding to the dynamic call link is further determined, so as to determine a test case affected by a changed code, facilitate verification of the determined automatic test case, avoid verification of all automatic test cases, and improve verification efficiency.
Disclosure of Invention
The application provides an automatic test case determination method, device, equipment and storage medium, which can determine the test case influenced by the change code, facilitate the verification of the determined automatic test case, avoid the verification of all the automatic test cases and improve the verification efficiency.
In one aspect, the present application provides an automated test case determination method, including:
acquiring a target code;
when the target code is changed iteratively, determining a change code;
determining a target function dynamic call link set corresponding to the change code;
determining a target automation test case set matched with the target function dynamic call link set based on a preset database;
the preset database construction method comprises the following steps:
in the running process of each automatic test case, codes are injected in a section-oriented programming mode, and function dynamic call links are collected;
determining an automatic test case corresponding to each function dynamic call link;
and constructing the preset database based on the mapping relation between each function dynamic call link and the automatic test case.
In some embodiments, the method further comprises:
and storing a dynamic call link corresponding to each target function based on a blockchain system, wherein the blockchain system comprises a plurality of nodes, and a point-to-point network is formed among the nodes.
In another aspect, an apparatus for automated test case determination is provided, the apparatus including:
the target code acquisition module is used for acquiring a target code;
the change code determining module is used for determining a change code when the target code is changed in an iterative way;
a target function dynamic call link set determining module, configured to determine a target function dynamic call link set corresponding to the change code;
the target automatic test case set determining module is used for determining a target automatic test case set matched with the target function dynamic call link set based on a preset database;
still include and predetermine database construction module, predetermine database construction module includes:
the function dynamic call link collection submodule is used for injecting codes in a section-oriented programming mode in the running process of each automatic test case and collecting a function dynamic call link;
the automatic test case determining submodule is used for determining an automatic test case corresponding to each function dynamic call link;
and the preset database construction submodule is used for constructing the preset database based on the mapping relation between each function dynamic call link and the automatic test case.
Another aspect provides an automated test case determination device, where the device includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the automated test case determination method described above.
Another aspect provides a computer storage medium having at least one instruction or at least one program stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the automated test case determination method as described above.
The method, the device, the equipment and the storage medium for determining the automatic test case have the following technical effects:
the method and the device perform one-to-one association on the automatic test case and the full function call link collected based on the AOP; and then, according to the code line change information, retrieving the influence range of the full function call link collected based on the AOP, and recommending the automatic test case to be verified after the change, thereby avoiding verifying all the automatic test cases and improving the verification efficiency.
Drawings
In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of an automated test case determination system according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of an automated test case determination method according to an embodiment of the present application;
fig. 3 is a method for determining a target function dynamic call link set corresponding to the change code according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a full-function dynamic call link according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a blockchain system according to an embodiment of the present disclosure;
FIG. 6 is a block diagram according to an embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of a full function dynamic call link associated with an automated test case according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a targeted automated test case provided by an embodiment of the present application;
fig. 9 is an automated test case determining apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above 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 application described herein are capable of operation in sequences other than those illustrated or 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 server 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.
Referring to fig. 1, fig. 1 is a schematic diagram of an automated test case determination system according to an embodiment of the present disclosure, and as shown in fig. 1, the automated test case determination system may at least include a server 01 and a client 02.
Specifically, in this embodiment of the present disclosure, the server 01 may include a server that operates independently, or a distributed server, or a server cluster composed of a plurality of servers. The server 01 may comprise a network communication unit, a processor, a memory, etc. Specifically, the server 01 may be configured to determine an automation test case affected by the change code.
Specifically, in the embodiment of the present disclosure, the client 02 may include a physical device such as a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, and a smart wearable device, and may also include software running in the physical device, such as a web page provided by some service providers to a user, and an application provided by the service providers to the user. Specifically, the client 02 may be configured to change a code in response to a trigger operation of a user, and query an automated test case affected by the changed code.
An automated test case determination method of the present application is described below, and fig. 2 is a flowchart of an automated test case determination method provided in an embodiment of the present application, and the present specification provides method operation steps as described in the embodiment or the flowchart, but more or less operation steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In practice, the system or server product may be implemented in a sequential or parallel manner (e.g., parallel processor or multi-threaded environment) according to the embodiments or methods shown in the figures. Specifically, as shown in fig. 2, the method may include:
s201: and acquiring the target code.
In this embodiment of the present specification, the object code may be a code corresponding to an object application.
In an embodiment of the present specification, after the step of obtaining the object code, the method further includes:
and responding to the code change request, and performing iterative change on the target code.
In this embodiment of the present specification, each iteration requirement of the user may cause a code to be updated so as to satisfy each sub-requirement in the project iteration, and a new code changed based on the object code is obtained by iteratively changing the object code.
S203: when the object code is changed iteratively, change code is determined.
In the embodiments of the present specification, the changed code is a code in which a change has occurred in the target code.
S205: and determining a target function dynamic call link set corresponding to the change code.
In this embodiment, when the change code corresponds to a plurality of target functions and each target function corresponds to a different dynamic call link, the set of target function dynamic call links may include a plurality of target function dynamic call links.
In this embodiment of the present specification, as shown in fig. 3, the determining a target function dynamic call link set corresponding to the change code includes:
s2051: determining a target function corresponding to the change code;
in an embodiment of this specification, the change code includes an added code, a modified code, and a deleted code, the objective function includes an add function, a modify function, and a delete function, and determining the objective function corresponding to the change code includes:
determining an increasing function corresponding to the increased codes;
determining a modification function corresponding to the modified code;
and determining a deleting function corresponding to the deleted code.
S2053: and determining at least one dynamic call link corresponding to the target function to obtain the target function dynamic call link set.
In the embodiment of the present specification, each target function corresponds to one or more dynamic call links, and each dynamic call link may include a plurality of sub call functions. The target function dynamic call link set comprises one or more target function dynamic call links.
S207: and determining a target automation test case set matched with the target function dynamic call link set based on a preset database.
In the embodiment of the present specification, a mapping relationship between a function dynamic call link and an automated test case is stored in a preset database, and generally one automated test case corresponds to one function dynamic call link.
In an embodiment of the present specification, the determining, based on a preset database, a target automation test case set matched with the target function dynamic call link set includes:
determining each target function dynamic call link in the target function dynamic call link set;
searching a target automatic test case corresponding to each target function dynamic call link from the preset database;
and determining a set formed by the target automatic test cases corresponding to each target function dynamic call link as the target automatic test case set.
In the embodiment of the present specification, the function dynamic call links may be collected in a facet-oriented programming manner, and a correspondence between each function dynamic call link and a corresponding automated test case is stored.
In an embodiment of the present specification, a method for constructing the preset database includes:
s301: in the running process of each automatic test case, codes are injected in a section-oriented programming mode, and function dynamic call links are collected;
in an embodiment of this specification, the injecting code in a section-oriented programming manner during the running process of each automatic test case, and collecting the function dynamic call link includes:
determining state information of a function corresponding to each automatic test case in the running process of each automatic test case;
and when the state of the function corresponding to the automatic test case is a compiling period or a running period, injecting codes into the function corresponding to each automatic test case in a section-oriented programming mode, and collecting a function dynamic call link.
The method includes extracting a tangent plane in a business processing process and dynamically switching codes into a designated method and a designated position.
In the embodiment of the present specification, the code enhancement technology may be not only code injection in compile time (such as AspectJ) but also code injection in runtime (such as Instrumentation + ASM scheme).
In the embodiment of the description, a dynamic call link corresponding to a function can be determined through an identifier and a characteristic value of the function corresponding to an automatic test case;
specifically, the method may include:
determining a target function with an association relation according to the characteristic value of each function;
and determining a dynamic calling link of each target function through each target function and the identifier of the sub-function corresponding to the target function.
In this embodiment of the present specification, an identifier corresponding to one sub-call of each target function may be determined according to the identifier of the target function;
and determining the identifier corresponding to the N +1 sub-calls of the target function according to the identifier corresponding to the N sub-calls of the target function, wherein N is 1, 2, … …, M is more than or equal to 3, and M is a positive integer.
In this specification embodiment, the identifier of its corresponding sub-function may be determined according to the identifier of the target function, for example, the sequence number in the hierarchy is increased based on the identifier of the target function.
In this embodiment, the identifier may be a root identifier of each function call link, and the root part of the identifier of this part is marked, and the sequence number in the hierarchy is increased based on this identifier in the subsequent sub-call.
S303: determining an automatic test case corresponding to each function dynamic call link;
in the embodiment of the present specification, one function dynamic call link may correspond to one automation test case.
S305: and constructing the preset database based on the mapping relation between each function dynamic call link and the automatic test case.
In an embodiment of the present specification, the method further comprises:
and performing regression verification or continuous verification on each target automatic test case in the target automatic test case set.
In an embodiment of the present specification, after the step of obtaining the object code, the method further includes:
and responding to the code change request, and performing iterative change on the target code.
In this embodiment, the user may send a code change request to the server through the terminal.
In some embodiments, the method further comprises:
and storing a dynamic call link corresponding to each target function based on a blockchain system, wherein the blockchain system comprises a plurality of nodes, and a point-to-point network is formed among the nodes.
In a specific embodiment, FIG. 4 is a full function real-time call link; as shown in fig. 4, in blockchain service, AOP code enhancement injection is performed on blockchain servers. And running the automatic test cases one by one in a test environment or an automatic test environment, starting collection of full-function dynamic call links while running, and associating the automatic test cases with the dynamic links. After the code is changed iteratively, the associated full function dynamic call link is searched out through the code line change information, and the related automatic test case is reversely deduced. Wherein the function I is an add function and the function Y is a delete function. The sub-call function B, C, D of the request entry function a is a synchronous operation process, in the function F process an asynchronous operation is started, and the asynchronous operation starts from the packed entry function H, where one DataKey in the packed entry function is the same as the DataKey of the request entry function a; similarly, the function L starts asynchronous operation, which starts with the verification entry function K; the function T starts asynchronous operation, and the asynchronous operation starts from the submission inlet function Q; function Z opens asynchronous operations that start with the store entry function M. The correlation of the links is called dynamically by the functions of different data processing parts to assist in analyzing the overall process of data processing. And performing key point injection on entry functions of different processing parts, acquiring key features of data, namely unique identifiers such as the hash of transactions and the hash of blocks through a reflection mechanism, and recording the unique identifiers into a log. And real-time calling link tracking and recording of different parts are realized by calling link injection, and are recorded in a hierarchical relationship. The entry function has two fields, LeveLNo and DataKey. The level no is the root identifier of each function call link, marks the identifier root part of the part, and subsequent sub-calls increase the sequence number in the hierarchy based on the root identifier, for example, the level no is 10340, the level no of the first sub-call is 10340.1, the second sub-call is 10340.2, and the next sub-call of the first sub-call is 10340.1.1, thereby recording the condition of the whole dynamic call link. For example, function A includes a series of sub-calls therein, e.g.
Figure BDA0002404256940000091
Where functions B and D are the sub-calls of A.
The DataKey is a data key characteristic value of an entry function, and is used as a unique identifier of data processing for associating different parts of function call links.
In some embodiments, the blockchain system may be the structure shown in fig. 5, a Peer-To-Peer (P2P) network is formed among a plurality of nodes, and the P2P Protocol is an application layer Protocol running on top of a Transmission Control Protocol (TCP). In the blockchain system, any machine such as a server and a terminal can be added to become a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer.
The functions of each node in the blockchain system shown in fig. 5 involve:
1) routing, a basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) the application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization functions to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks.
In some embodiments, the Block Structure (Block Structure) may be the Structure shown in fig. 6, where each Block includes a hash value of the Block storing the transaction record (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a Block chain. The block may include information such as a time stamp at the time of block generation. A Block chain (Block chain), which is essentially a decentralized database, is a series of data blocks associated by using cryptography, and each data Block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next Block.
In a specific embodiment, as shown in FIG. 7, AOP version services are deployed in a test environment or an automated test environment, full function dynamic links are collected and associated to each automated test case. Wherein the automated test cases A, C, D are respectively associated with three different functional dynamic links; and analyzing the change condition of the current iteration from the version manager to acquire the condition of function change, such as adding, modifying or deleting specific logic inside the function. And associating the full function dynamic call link according to the changed function name, and recommending an automatic test case according to the binding relation. As shown in fig. 8, when the code of the function G is added and the code of the function F is partially deleted, the function F corresponds to two dynamic links, and the two dynamic links are respectively associated with the automated test case C, D, and the function G corresponds to one dynamic link, and the dynamic link is associated with the automated test case D; it may be determined that code changes to function G, F affect automated test case C, D, requiring verification of automated test case C, D. For the application program, the application program version iteration change influence range can be accurately analyzed, and the continuous verification efficiency is improved while the version quality is ensured.
According to the technical scheme provided by the embodiment of the specification, the embodiment of the specification determines the function dynamic call link by updating the code and further determines the automatic test case corresponding to the dynamic call link, so that the test case influenced by the changed code is determined, the determined automatic test case is convenient to verify, all the automatic test cases are prevented from being verified, and the verification efficiency is improved.
An embodiment of the present application further provides an automatic test case determining apparatus, as shown in fig. 9, the apparatus includes:
an object code obtaining module 910, configured to obtain an object code;
a change code determination module 920, configured to determine a change code when the target code is changed iteratively;
a target function dynamic call link set determining module 930, configured to determine a target function dynamic call link set corresponding to the change code;
a target automatic test case set determining module 940, configured to determine, based on a preset database, a target automatic test case set that matches the target function dynamic call link set;
further comprises a preset database construction module 950, which comprises:
the function dynamic call link collection submodule 9510 is used for injecting codes in a section-oriented programming mode in the running process of each automatic test case and collecting a function dynamic call link;
the automatic test case determining sub-module 9520 is configured to determine an automatic test case corresponding to each function dynamic call link;
and the preset database construction sub-module 9530 is configured to construct the preset database based on a mapping relationship between each function dynamic call link and the automated test case.
In some embodiments, the target function dynamic call linkset determination module may include:
the target function determining submodule is used for determining a target function corresponding to the change code;
and the target function dynamic call link set determining submodule is used for determining at least one dynamic call link corresponding to the target function to obtain the target function dynamic call link set.
In some embodiments, the change code includes added code, modified code, and deleted code, the objective function includes an add function, a modify function, and a delete function, and the objective function determination submodule may include:
an increasing function determining unit, configured to determine an increasing function corresponding to the increased code;
a modification function determining unit, configured to determine a modification function corresponding to the modified code;
and the deleting function determining unit is used for determining a deleting function corresponding to the deleted code.
In some embodiments, the function dynamic call link collection submodule may include:
the state information determining unit is used for determining the state information of the function corresponding to each automatic test case in the running process of each automatic test case;
and the function dynamic call link collection unit is used for injecting codes into each function corresponding to the automatic test case in a section-oriented programming mode and collecting function dynamic call links when the state of the function corresponding to the automatic test case is a compiling period or a running period.
In some embodiments, the target automated test case set determination module comprises:
the target function dynamic call link determining submodule is used for determining each target function dynamic call link in the target function dynamic call link set;
the target automatic test case determining submodule is used for searching a target automatic test case corresponding to each target function dynamic call link from the preset database;
and the target automatic test case set determining submodule is used for determining a set formed by the target automatic test cases corresponding to each target function dynamic call link as the target automatic test case set.
In some embodiments, the apparatus may further comprise:
and the verification module is used for performing regression verification or continuous verification on each target automatic test case in the target automatic test case set.
In some embodiments, the apparatus may further comprise:
and the iterative change module is used for responding to the code change request and carrying out iterative change on the target code.
The device and method embodiments in the device embodiment described are based on the same inventive concept.
The embodiment of the application provides an automatic test case determining device, which includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the automatic test case determining method provided by the above method embodiment.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may be disposed in a terminal to store at least one instruction or at least one program for implementing an automatic test case determination method in the method embodiment, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the automatic test case determination method provided in the method embodiment.
Alternatively, in embodiments of the present specification, the computer storage medium may be located on at least one of a plurality of network servers of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: 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 memory described in the embodiments of the present disclosure may be used to store software programs and modules, and the processor may execute various functional applications and data processing by operating the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
The embodiment of the method for determining the automatic test case provided by the embodiment of the application can be executed in a mobile terminal, a computer terminal, a server or a similar operation device. Taking the example of running on a server, fig. 10 is a hardware structure block diagram of the server of the method for determining an automated test case provided in the embodiment of the present application. As shown in fig. 10, the server 1000 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 1010 (the processor 1010 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1030 for storing data, and one or more storage media 1020 (e.g., one or more mass storage devices) for storing applications 1023 or data 1022. Memory 1030 and storage media 1020 may be, among other things, transient or persistent storage. The program stored in the storage medium 1020 may include one or more modules, each of which may include a series of instruction operations for a server. Still further, the central processor 1010 may be configured to communicate with the storage medium 1020 and execute a series of instruction operations in the storage medium 1020 on the server 1000. The server 1000 may also include one or more power supplies 1060, one or more wired or wireless network interfaces 1050, one or more input-output interfaces 1040, and/or one or more operating systems 1021, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
Input-output interface 1040 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 1000. In one example, i/o Interface 1040 includes a Network adapter (NIC) that may be coupled to other Network devices via a base station to communicate with the internet. In one example, the input/output interface 1040 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 10 is merely illustrative and is not intended to limit the structure of the electronic device. For example, server 1000 may also include more or fewer components than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
According to the method, the device, the server or the storage medium for determining the automatic test cases, the function dynamic call link is determined by updating the codes, and the automatic test cases corresponding to the dynamic call link are further determined, so that the test cases influenced by the changed codes are determined, the determined automatic test cases are convenient to verify, all the automatic test cases are prevented from being verified, and the verification efficiency is improved.
It should be noted that: the sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And specific embodiments thereof have been described above. 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.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, device, and storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. An automated test case determination method, the method comprising:
acquiring a target code;
when the target code is changed iteratively, determining a change code;
determining a target function dynamic call link set corresponding to the change code;
determining a target automation test case set matched with the target function dynamic call link set based on a preset database;
the preset database construction method comprises the following steps:
in the running process of each automatic test case, codes are injected in a section-oriented programming mode, and function dynamic call links are collected;
determining an automatic test case corresponding to each function dynamic call link;
and constructing the preset database based on the mapping relation between each function dynamic call link and the automatic test case.
2. The method of claim 1, wherein the determining the target function dynamic call linkset to which the change code corresponds comprises:
determining a target function corresponding to the change code;
and determining at least one dynamic call link corresponding to the target function to obtain the target function dynamic call link set.
3. The method of claim 2, wherein the modified code comprises added code, modified code, and deleted code, wherein the objective function comprises an add function, a modify function, and a delete function, and wherein determining the objective function to which the modified code corresponds comprises:
determining an increasing function corresponding to the increased codes;
determining a modification function corresponding to the modified code;
and determining a deleting function corresponding to the deleted code.
4. The method of claim 1, wherein during each automated test case run, code is injected in a cut-plane-oriented programming manner, and collecting function dynamic call links comprises:
determining state information of a function corresponding to each automatic test case in the running process of each automatic test case;
and when the state of the function corresponding to the automatic test case is a compiling period or a running period, injecting codes into the function corresponding to each automatic test case in a section-oriented programming mode, and collecting a function dynamic call link.
5. The method of claim 1, wherein determining the set of target automation test cases matching the set of target function dynamic call links based on a predetermined database comprises:
determining each target function dynamic call link in the target function dynamic call link set;
searching a target automatic test case corresponding to each target function dynamic call link from the preset database;
and determining a set formed by the target automatic test cases corresponding to each target function dynamic call link as the target automatic test case set.
6. The method of claim 1, further comprising:
and performing regression verification or continuous verification on each target automatic test case in the target automatic test case set.
7. The method of claim 1, wherein after the step of obtaining the object code, the method further comprises:
and responding to the code change request, and performing iterative change on the target code.
8. An automated test case determination apparatus, the apparatus comprising:
the target code acquisition module is used for acquiring a target code;
the change code determining module is used for determining a change code when the target code is changed in an iterative way;
a target function dynamic call link set determining module, configured to determine a target function dynamic call link set corresponding to the change code;
the target automatic test case set determining module is used for determining a target automatic test case set matched with the target function dynamic call link set based on a preset database;
still include and predetermine database construction module, predetermine database construction module includes:
the function dynamic call link collection submodule is used for injecting codes in a section-oriented programming mode in the running process of each automatic test case and collecting a function dynamic call link;
the automatic test case determining submodule is used for determining an automatic test case corresponding to each function dynamic call link;
and the preset database construction submodule is used for constructing the preset database based on the mapping relation between each function dynamic call link and the automatic test case.
9. An automated test case determination device, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the automated test case determination method according to any one of claims 1 to 7.
10. A computer storage medium having at least one instruction or at least one program stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the automated test case determination method of any one of claims 1-7.
CN202010156568.8A 2020-03-09 2020-03-09 Automatic test case determination method, device, equipment and storage medium Pending CN111382073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010156568.8A CN111382073A (en) 2020-03-09 2020-03-09 Automatic test case determination method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010156568.8A CN111382073A (en) 2020-03-09 2020-03-09 Automatic test case determination method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111382073A true CN111382073A (en) 2020-07-07

Family

ID=71217265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010156568.8A Pending CN111382073A (en) 2020-03-09 2020-03-09 Automatic test case determination method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111382073A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667245A (en) * 2021-01-15 2021-04-16 腾讯音乐娱乐科技(深圳)有限公司 Code processing method and device, electronic equipment and storage medium
CN112860557A (en) * 2021-02-18 2021-05-28 深圳无域科技技术有限公司 Automatic testing method and system
CN113094283A (en) * 2021-04-29 2021-07-09 平安国际智慧城市科技股份有限公司 Data acquisition method, device, equipment and storage medium
CN113138927A (en) * 2021-04-30 2021-07-20 北京沃东天骏信息技术有限公司 Software function testing method and device
CN113157590A (en) * 2021-05-20 2021-07-23 中国工商银行股份有限公司 Test case generation method and device
CN113297076A (en) * 2021-05-21 2021-08-24 建信金融科技有限责任公司 Service change identification method and device based on call chain
CN113568833A (en) * 2021-07-28 2021-10-29 深圳Tcl新技术有限公司 Test case determination method and device, computer equipment and readable storage medium
CN115905031A (en) * 2023-03-14 2023-04-04 云筑信息科技(成都)有限公司 Test case recommendation method based on accurate quality assurance system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667245A (en) * 2021-01-15 2021-04-16 腾讯音乐娱乐科技(深圳)有限公司 Code processing method and device, electronic equipment and storage medium
CN112860557A (en) * 2021-02-18 2021-05-28 深圳无域科技技术有限公司 Automatic testing method and system
CN113094283A (en) * 2021-04-29 2021-07-09 平安国际智慧城市科技股份有限公司 Data acquisition method, device, equipment and storage medium
CN113138927A (en) * 2021-04-30 2021-07-20 北京沃东天骏信息技术有限公司 Software function testing method and device
CN113138927B (en) * 2021-04-30 2024-04-16 北京沃东天骏信息技术有限公司 Software function test method and device
CN113157590A (en) * 2021-05-20 2021-07-23 中国工商银行股份有限公司 Test case generation method and device
CN113297076A (en) * 2021-05-21 2021-08-24 建信金融科技有限责任公司 Service change identification method and device based on call chain
CN113568833A (en) * 2021-07-28 2021-10-29 深圳Tcl新技术有限公司 Test case determination method and device, computer equipment and readable storage medium
CN115905031A (en) * 2023-03-14 2023-04-04 云筑信息科技(成都)有限公司 Test case recommendation method based on accurate quality assurance system
CN115905031B (en) * 2023-03-14 2023-06-23 云筑信息科技(成都)有限公司 Test case recommendation method based on accurate quality assurance system

Similar Documents

Publication Publication Date Title
CN111382073A (en) Automatic test case determination method, device, equipment and storage medium
CN110717647A (en) Decision flow construction method and device, computer equipment and storage medium
CN111752843A (en) Method, device, electronic equipment and readable storage medium for determining influence surface
CN111460241A (en) Data query method and device, electronic equipment and storage medium
CN112559525B (en) Data checking system, method, device and server
CN107357721B (en) Method and device for testing system
CN112579604A (en) Test system number making method, device, equipment and storage medium
CN116578282A (en) Code generation method, device, electronic equipment and medium
CN111159464A (en) Audio clip detection method and related equipment
CN112579472B (en) Automatic generation method and device for test cases
CN111400317A (en) Method and device for determining full-function dynamic call link and storage medium
Zhang et al. Web service reputation evaluation based on QoS measurement
CN112003736B (en) Multi-node configuration information determining method, device and storage medium
CN114817389A (en) Data processing method, data processing device, storage medium and electronic equipment
CN114581241A (en) Intelligent contract processing method and device, processor and electronic equipment
CN111488286B (en) Method and device for independently developing Android modules
CN113961228A (en) Change reminding method, device, equipment and storage medium
CN113704120A (en) Data transmission method, device, equipment and storage medium
CN112836033A (en) Business model management method, device, equipment and storage medium
CN112948264A (en) Test task execution method, device, system, storage medium and electronic device
CN107451050B (en) Function acquisition method and device and server
CN113741868A (en) Business calculation task processing method and device, computer equipment and storage medium
CN111097175B (en) Simulator determination method and device and storage medium
CN113485693B (en) Interface configuration method, device, equipment and storage medium
CN110175116B (en) Test date switching method, device and system

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