CN111124876A - Method and device for realizing interface test case, storage medium and processor - Google Patents
Method and device for realizing interface test case, storage medium and processor Download PDFInfo
- Publication number
- CN111124876A CN111124876A CN201811294113.1A CN201811294113A CN111124876A CN 111124876 A CN111124876 A CN 111124876A CN 201811294113 A CN201811294113 A CN 201811294113A CN 111124876 A CN111124876 A CN 111124876A
- Authority
- CN
- China
- Prior art keywords
- test case
- interface
- interface test
- implementation file
- implementation
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses an implementation method and device of an interface test case, a storage medium and a processor. The method comprises the following steps: establishing a mapping relation between the ID of the interface test case and the ID of an implementation file of the interface test case, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case; establishing a jump link between the interface test case and an implementation file of the interface test case according to the mapping relation; and jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link. By the method and the device, the problem that time and labor are wasted when the test cases are maintained and the corresponding implementation files of the interface test cases are searched according to the interface test cases in the related technology is solved.
Description
Technical Field
The present application relates to the field of test cases, and in particular, to a method and an apparatus for implementing an interface test case, a storage medium, and a processor.
Background
At present, when interface testing is performed in the internet industry, testers uniformly compile and compile API test cases on xmnd, excel or a certain special tool for managing test cases, and accordingly, implementation of the API test cases is implemented by codes, for example, implementation files of the API test cases are compiled by python/java, or interface testing is implemented on a certain API test tool, and sending of test requests and verification of test results are performed.
Because the API test case is not directly connected with the API realization file, two windows are opened simultaneously in the related technology, and the relation between the API test case and the API realization file is related through text contrast. Because a tester needs to compile an API test case at a local position, after the API test case is compiled, testing is realized on another API test tool, so that an API test case interface is separated from an API test case realization interface, and when test maintenance is carried out subsequently, if the test case is modified, a corresponding API test case realization file needs to be searched in a folder and modified; if the API test fails to execute, great effort is also needed to find the API test case specifically pointed by the implementation file of the API test case in another file. Great inconvenience is brought to the running of the API test and the maintenance of the subsequent test cases.
Aiming at the problem that the implementation file of the corresponding interface test case is time-consuming and labor-consuming to search according to the interface test case when the test case is maintained in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide an implementation method and apparatus for an interface test case, a storage medium, and a processor, so as to solve the problem that it is time-consuming and labor-consuming to search for an implementation file of a corresponding interface test case according to the interface test case when the test case is maintained in the related art.
In order to achieve the above object, according to an aspect of the present application, a method for implementing an interface test case is provided. The method comprises the following steps: establishing a mapping relation between the ID of the interface test case and the ID of an implementation file of the interface test case, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case; establishing a jump link between the interface test case and an implementation file of the interface test case according to the mapping relation; and jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
Further, after jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further includes executing the interface test case to perform the interface test.
Further, before establishing a mapping relationship between the ID of the interface test case and the ID of the implementation file of the interface test case, the method further includes: creating an interface test case, and storing the request content of the interface test case and the ID of the interface test case in a database; and creating an implementation file of the interface test case based on the interface test case, and storing the configuration parameters of the implementation file of the interface test case and the ID of the implementation file of the interface test case in a database.
Further, jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link to execute the interface test case for performing the interface test includes: detecting whether a jump link on an interface of the interface test case is clicked or not; and under the condition that the jump link on the interface of the interface test case is clicked, jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
Further, after jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further includes: sending a test request to a target server based on the implementation file of the interface test case, wherein the test request is used for requesting the target server to execute the request content of the interface test case; and returning the execution result of the target server.
Further, after returning the execution result of the target server, the method further comprises: detecting whether a jump link on an interface of an implementation file of an interface test case is clicked or not; and jumping to the interface of the interface test case from the interface of the implementation file of the interface test case under the condition that a jump link on the interface of the implementation file of the interface test case is clicked.
In order to achieve the above object, according to another aspect of the present application, an apparatus for implementing an interface test case is provided. The device includes: the interface test case implementation system comprises a first establishing unit, a second establishing unit and a processing unit, wherein the first establishing unit is used for establishing a mapping relation between an ID of an interface test case and an ID of an implementation file of the interface test case, and the implementation file of the interface test case is used for implementing the request content of the interface test case; the second establishing unit is used for establishing the interface test case and a jump link between the realization files of the interface test case according to the mapping relation; and the test unit is used for jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link so as to execute the interface test case to perform interface test.
Further, the apparatus further comprises: and the execution unit is used for executing the interface test case to perform the interface test.
In order to achieve the above object, according to another aspect of the present application, a storage medium is provided, where the storage medium includes a stored program, and the program executes any one of the above methods for implementing an interface test case.
In order to achieve the above object, according to another aspect of the present application, a processor is provided, where the processor is configured to execute a program, where the program executes an implementation method of any one of the above interface test cases when running.
Through the application, the following steps are adopted: establishing a mapping relation between the ID of the interface test case and the ID of an implementation file of the interface test case, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case; establishing a jump link between the interface test case and an implementation file of the interface test case according to the mapping relation; the interface of the interface test case is jumped to the interface of the implementation file of the interface test case through the jump link, so that the problem that time and labor are wasted when the test case is maintained in the related technology and the implementation file of the corresponding interface test case is searched according to the interface test case is solved. The skip link between the interface test case and the implementation file of the interface test case is established through the mapping relation between the ID of the interface test case and the ID of the implementation file of the interface test case, and therefore the effect that the corresponding implementation file of the interface test case is accurately and quickly obtained according to the interface test case when the test case is maintained is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flowchart of a method for implementing an interface test case provided according to an embodiment of the present application; and
fig. 2 is a schematic diagram of an apparatus for implementing an interface test case according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, 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 partial embodiments of the present application, but not all 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 should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
test case: is a set of test inputs, execution conditions, and expected results tailored to a certain goal to test whether a certain program path meets a particular requirement.
API: application Programming Interface, abbreviated as API function or API Interface.
Interface test case: the purpose of testing the code logic of the program interface is achieved by sending a test request.
HTTP: hypertext transfer protocol.
According to the embodiment of the application, an implementation method of an interface test case is provided.
Fig. 1 is a flowchart of an implementation method of an interface test case according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, establishing a mapping relation between the ID of the interface test case and the ID of an implementation file of the interface test case, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case.
It should be noted that each interface test case corresponds to an implementation file of the interface test case for implementing the request content thereof, and in order to conveniently find the implementation file of the interface test case according to the interface test case when the interface test case is maintained, or find the interface test case according to the implementation file of the test case, and establish a mapping relationship between IDs of the two.
In order to establish a mapping relationship between an ID of an interface test case and an ID of an implementation file of the interface test case, optionally, in the implementation method of an interface test case provided in the embodiment of the present application, before establishing a mapping relationship between an ID of an interface test case and an ID of an implementation file of an interface test case, the method further includes: creating an interface test case, and storing the request content of the interface test case and the ID of the interface test case in a database; and creating an implementation file of the interface test case based on the interface test case, and storing the configuration parameters of the implementation file of the interface test case and the ID of the implementation file of the interface test case in a database.
For example, an interface test case is created to test the function of the interface a, the request content of the interface test case is "the request target server returns 200 through the interface a", the interface test case has a uniquely determined ID, and the ID of the interface test case and the request content are stored in the database. The implementation file of the interface test case created based on the interface test case has the contents of 'sending the request content of the interface test case, verifying that the state of the request result is 200', sending the request content of the interface test case by adopting an http protocol, modifying the configuration content of the http protocol, and simultaneously storing the configuration content and the ID of the implementation file of the interface test case in the same database.
According to the embodiment, when the interface test case and the implementation file of the interface test case are created, the corresponding ID is stored in the database, a data basis is provided for establishing a mapping relation between the IDs, and meanwhile, the request content and the configuration information of the interface test case are stored, so that the subsequent calling of the related information is facilitated.
And S102, establishing a jump link between the interface test case and the implementation file of the interface test case according to the mapping relation.
Specifically, according to the mapping relation between the ID of the interface test case and the ID of the implementation file of the interface test case, a jump link between an interface of the interface test case and the interface of the implementation file of the interface test case is established by adopting a hypertext markup language, and page jump is realized.
And step S103, jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link. For example, when the created interface test case is opened each time, the interface displays the link of the interface of the implementation file of the corresponding interface test case, clicks the link, and jumps to the interface of the implementation file of the interface test case through the ID mapping relationship between the interface test case and the implementation file of the interface test case.
Optionally, in the implementation method of the interface test case provided in the embodiment of the present application, after jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further includes executing the interface test case to perform an interface test.
Specifically, after jumping to the interface of the implementation file of the interface test case, the protocol configuration information is transmitted, the request content is sent to the interface to be tested, the interface test is performed, and meanwhile, the request content of the interface test case and the specific configuration information of the interface test case are stored in the database.
According to the implementation method of the interface test case provided by the embodiment of the application, a mapping relation between the ID of the interface test case and the ID of an implementation file of the interface test case is established, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case; establishing a jump link between the interface test case and an implementation file of the interface test case according to the mapping relation; the interface of the interface test case is jumped to the interface of the implementation file of the interface test case through the jump link, so that the problem that time and labor are wasted when the test case is maintained in the related technology and the implementation file of the corresponding interface test case is searched according to the interface test case is solved. The skip link between the interface test case and the implementation file of the interface test case is established through the mapping relation between the ID of the interface test case and the ID of the implementation file of the interface test case, and therefore the effect that the corresponding implementation file of the interface test case is accurately and quickly obtained according to the interface test case when the test case is maintained is achieved.
Optionally, in order to facilitate a user to execute an interface test based on the modified request content, in the implementation method of the interface test case provided in the embodiment of the present application, jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through a jump link to execute the interface test case to perform the interface test includes: detecting whether a jump link on an interface of the interface test case is clicked or not; and under the condition that the jump link on the interface of the interface test case is clicked, jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
It should be noted that, when the implementation file of the test case corresponding to the interface test case is viewed, the jump link may be clicked, and the page jumps to the interface of the implementation file of the interface test case.
After the request content of the interface test case is modified on the interface of the interface test case, the implementation file of the interface test case can be conveniently modified according to the jump link, for example, the request content of the interface test case is modified from 'the request target server returns 200 through the interface A' to 'the request target server returns 100 through the interface A', the jump link is clicked, the page jumps to the interface of the implementation file of the interface test case, and the tester can modify the configuration information.
By the embodiment, when a tester maintains the interface test case, the tester does not need to open an additional folder to search the implementation file of the interface test case, and the interface test case and the implementation file of the interface test case can be managed in one tool.
Optionally, in the implementation method of the interface test case provided in the embodiment of the present application, after jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through a jump link, the method further includes: sending a test request to a target server based on the implementation file of the interface test case, wherein the test request is used for requesting the target server to execute the request content of the interface test case; and receiving an execution result returned by the target server.
It should be noted that some interfaces need to be tested regularly, and the original request content is executed after jumping to the interface of the implementation file of the interface test case without modifying the request content, so as to retest the target interface. The request content may also be modified and the target interface may be tested based on the modified request content, for example, the request content is modified from "request target server returns 200 through interface a" to "request target server returns 100 through interface a" to modify protocol configuration information, the request content "request target server returns 100 through interface a" is sent to the target server, and whether the value returned by interface a is 100 is detected.
In order to facilitate a user to modify request content of an interface test based on an interface test result, optionally, in the method for implementing an interface test case provided in the embodiment of the present application, after returning an execution result of a target server, the method further includes: detecting whether a jump link on an interface of an implementation file of an interface test case is clicked or not; and jumping to the interface of the interface test case from the interface of the implementation file of the interface test case under the condition that a jump link on the interface of the implementation file of the interface test case is clicked.
For example, after the interface of the implementation file of the interface test case displays "interface a test failure", and after checking that the protocol configuration information is correct, the jump link on the interface of the implementation file of the interface test case can be clicked, the interface test case interface is jumped to, and whether the writing of the request content is incorrect or not is checked and modified.
For another example, when the value returned by the interface of the implementation file of the interface test case is consistent with the value in the request content, the interface test is successful, and in order to ensure the stability of the interface interpretation, the jump link on the interface of the implementation file of the interface test case can be clicked, the interface of the interface test case is jumped to, the request content is modified, and multiple tests are performed.
According to the embodiment, after the interface test result is obtained, the interface test case interface modification request content can be conveniently skipped to according to the test result, and the interface is tested for multiple times based on the modified request content, so that the interface test working efficiency is greatly improved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides an implementation device of an interface test case, and it should be noted that the implementation device of an interface test case of the embodiment of the present application may be used to execute the implementation method for an interface test case provided in the embodiment of the present application. The following describes an implementation apparatus of an interface test case provided in an embodiment of the present application.
Fig. 2 is a schematic diagram of an apparatus for implementing an interface test case according to an embodiment of the present application. As shown in fig. 2, the apparatus includes: a first setup unit 10, a second setup unit 20 and a test unit 30.
Specifically, the first establishing unit 10 is configured to establish a mapping relationship between an ID of an interface test case and an ID of an implementation file of the interface test case, where the implementation file of the interface test case is used to implement a request content of the interface test case;
a second establishing unit 20, configured to establish a jump link between the interface test case and the implementation file of the interface test case according to the mapping relationship;
and the test unit 30 is configured to jump from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
Optionally, in the apparatus for implementing an interface test case provided in the embodiment of the present application, the apparatus further includes: and the execution unit is used for executing the interface test case to perform the interface test.
Optionally, in the apparatus for implementing an interface test case provided in the embodiment of the present application, the apparatus further includes: the first creating unit is used for creating the interface test case before the mapping relation between the ID of the interface test case and the ID of the implementation file of the interface test case is established, and storing the request content of the interface test case and the ID of the interface test case in a database; and the second creating unit is used for creating the implementation file of the interface test case based on the interface test case and storing the configuration parameters of the implementation file of the interface test case and the ID of the implementation file of the interface test case in a database.
Optionally, in the apparatus for implementing an interface test case provided in the embodiment of the present application, the test unit 30 includes: the detection module is used for detecting whether a jump link on an interface of the interface test case is clicked or not; and the skipping module is used for skipping from the interface of the interface test case to the interface of the implementation file of the interface test case through the skipping link under the condition that the skipping link on the interface of the interface test case is clicked.
Optionally, in the apparatus for implementing an interface test case provided in the embodiment of the present application, the apparatus further includes: the sending unit is used for sending a test request to the target server based on the implementation file of the interface test case after jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, wherein the test request is used for requesting the target server to execute the request content of the interface test case; and the return unit is used for returning the execution result of the target server.
Optionally, in the apparatus for implementing an interface test case provided in the embodiment of the present application, the apparatus further includes: the detection unit is used for detecting whether a jump link on an interface of a realization file of the interface test case is clicked or not after an execution result of the target server is returned; and the skipping unit is used for skipping from the interface of the implementation file of the interface test case to the interface of the interface test case under the condition that a skipping link on the interface of the implementation file of the interface test case is clicked.
According to the device for implementing the interface test case provided by the embodiment of the application, a mapping relation between an ID of the interface test case and an ID of an implementation file of the interface test case is established through a first establishing unit 10, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case; the second establishing unit 20 establishes a jump link between the interface test case and the implementation file of the interface test case according to the mapping relation; the test unit 30 jumps from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, so that the problem that time and labor are wasted when the test case is maintained in the related art by searching the implementation file of the corresponding interface test case according to the interface test case is solved, the jump link between the interface test case and the implementation file of the interface test case is established through the mapping relation between the ID of the interface test case and the ID of the implementation file of the interface test case, and the effect of accurately and quickly acquiring the implementation file of the corresponding interface test case according to the interface test case when the test case is maintained is further achieved.
The device for implementing the interface test case comprises a processor and a memory, wherein the first establishing unit 10, the second establishing unit 20, the testing unit 30 and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem that in the related technology, when the test case is maintained, the implementation file of the corresponding interface test case is searched according to the interface test case, which wastes time and labor is solved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the invention provides a storage medium, wherein a program is stored on the storage medium, and the program realizes the realization method of the interface test case when being executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the implementation method of the interface test case is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: establishing a mapping relation between the ID of the interface test case and the ID of an implementation file of the interface test case, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case; establishing a jump link between the interface test case and an implementation file of the interface test case according to the mapping relation; and jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
After jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further comprises executing the interface test case to perform interface test.
Before establishing a mapping relationship between the ID of the interface test case and the ID of the implementation file of the interface test case, the method further comprises the following steps: creating an interface test case, and storing the request content of the interface test case and the ID of the interface test case in a database; and creating an implementation file of the interface test case based on the interface test case, and storing the configuration parameters of the implementation file of the interface test case and the ID of the implementation file of the interface test case in a database.
Skipping from the interface of the interface test case to the interface of the implementation file of the interface test case through the skip link to execute the interface test case for interface test, wherein the interface test includes: detecting whether a jump link on an interface of the interface test case is clicked or not; and under the condition that the jump link on the interface of the interface test case is clicked, jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
After jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further includes: sending a test request to a target server based on the implementation file of the interface test case, wherein the test request is used for requesting the target server to execute the request content of the interface test case; and returning the execution result of the target server.
After returning the execution result of the target server, the method further comprises: detecting whether a jump link on an interface of an implementation file of an interface test case is clicked or not; and jumping to the interface of the interface test case from the interface of the implementation file of the interface test case under the condition that a jump link on the interface of the implementation file of the interface test case is clicked. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
establishing a mapping relation between the ID of the interface test case and the ID of an implementation file of the interface test case, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case; establishing a jump link between the interface test case and an implementation file of the interface test case according to the mapping relation; and jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
After jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further comprises executing the interface test case to perform interface test.
Before establishing a mapping relationship between the ID of the interface test case and the ID of the implementation file of the interface test case, the method further comprises the following steps: creating an interface test case, and storing the request content of the interface test case and the ID of the interface test case in a database; and creating an implementation file of the interface test case based on the interface test case, and storing the configuration parameters of the implementation file of the interface test case and the ID of the implementation file of the interface test case in a database.
Skipping from the interface of the interface test case to the interface of the implementation file of the interface test case through the skip link to execute the interface test case for interface test, wherein the interface test includes: detecting whether a jump link on an interface of the interface test case is clicked or not; and under the condition that the jump link on the interface of the interface test case is clicked, jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
After jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further includes: sending a test request to a target server based on the implementation file of the interface test case, wherein the test request is used for requesting the target server to execute the request content of the interface test case; and returning the execution result of the target server.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, 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. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (10)
1. An implementation method of an interface test case is characterized by comprising the following steps:
establishing a mapping relation between an ID of an interface test case and an ID of an implementation file of the interface test case, wherein the implementation file of the interface test case is used for implementing the request content of the interface test case;
establishing a jump link between the interface test case and an implementation file of the interface test case according to the mapping relation;
and jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
2. The method of claim 1, wherein after jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further comprises:
and executing the interface test case to perform interface test.
3. The method of claim 1, wherein before establishing the mapping relationship between the IDs of the interface test cases and the IDs of the implementation files of the interface test cases, the method further comprises:
creating the interface test case, and storing the request content of the interface test case and the ID of the interface test case in a database;
and creating an implementation file of the interface test case based on the interface test case, and storing the configuration parameters of the implementation file of the interface test case and the ID of the implementation file of the interface test case in the database.
4. The method of claim 1, wherein jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link to execute the interface test case for interface testing comprises:
detecting whether a jump link on an interface of the interface test case is clicked or not;
and jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link under the condition that the jump link on the interface of the interface test case is clicked.
5. The method of claim 4, wherein after jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link, the method further comprises:
sending a test request to a target server based on the implementation file of the interface test case, wherein the test request is used for requesting the target server to execute the request content of the interface test case;
and returning the execution result of the target server.
6. The method of claim 5, wherein after returning the execution result of the target server, the method further comprises:
detecting whether a jump link on an interface of an implementation file of the interface test case is clicked or not;
and jumping to the interface of the interface test case from the interface of the implementation file of the interface test case under the condition that a jump link on the interface of the implementation file of the interface test case is clicked.
7. An apparatus for implementing an interface test case, comprising:
the device comprises a first establishing unit, a second establishing unit and a third establishing unit, wherein the first establishing unit is used for establishing a mapping relation between an ID of an interface test case and an ID of an implementation file of the interface test case, and the implementation file of the interface test case is used for implementing the request content of the interface test case;
the second establishing unit is used for establishing a jump link between the interface test case and the implementation file of the interface test case according to the mapping relation;
and the test unit is used for jumping from the interface of the interface test case to the interface of the implementation file of the interface test case through the jump link.
8. The apparatus of claim 7, further comprising:
and the execution unit is used for executing the interface test case to perform interface test.
9. A storage medium comprising a stored program, wherein the program executes an implementation method of an interface test case according to any one of claims 1 to 5.
10. A processor, configured to execute a program, wherein the program executes the implementation method of the interface test case according to any one of claims 1 to 5.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811294113.1A CN111124876A (en) | 2018-10-31 | 2018-10-31 | Method and device for realizing interface test case, storage medium and processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811294113.1A CN111124876A (en) | 2018-10-31 | 2018-10-31 | Method and device for realizing interface test case, storage medium and processor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111124876A true CN111124876A (en) | 2020-05-08 |
Family
ID=70494695
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811294113.1A Pending CN111124876A (en) | 2018-10-31 | 2018-10-31 | Method and device for realizing interface test case, storage medium and processor |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111124876A (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104252413A (en) * | 2013-06-27 | 2014-12-31 | 阿里巴巴集团控股有限公司 | Automatic script generation method, device and system |
| US20150082279A1 (en) * | 2013-09-13 | 2015-03-19 | Sap Ag | Software testing system and method |
| CN107656865A (en) * | 2017-08-15 | 2018-02-02 | 黄璐瑶 | Testing requirement determines method and device |
| CN108415832A (en) * | 2018-02-07 | 2018-08-17 | 平安科技(深圳)有限公司 | Automatic interface testing method, device, equipment and storage medium |
-
2018
- 2018-10-31 CN CN201811294113.1A patent/CN111124876A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104252413A (en) * | 2013-06-27 | 2014-12-31 | 阿里巴巴集团控股有限公司 | Automatic script generation method, device and system |
| US20150082279A1 (en) * | 2013-09-13 | 2015-03-19 | Sap Ag | Software testing system and method |
| CN107656865A (en) * | 2017-08-15 | 2018-02-02 | 黄璐瑶 | Testing requirement determines method and device |
| CN108415832A (en) * | 2018-02-07 | 2018-08-17 | 平安科技(深圳)有限公司 | Automatic interface testing method, device, equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104035863B (en) | A kind of browser testing method and device | |
| CN106559438A (en) | A kind of program method for uploading and device based on objective network platform | |
| CN109614158B (en) | Plug-in calling method, system, storage medium and processor | |
| CN106294113B (en) | creation method and device based on programmable test service | |
| CN104899016A (en) | Call stack relationship obtaining method and call stack relationship obtaining device | |
| CN109783341A (en) | Regression testing method and device | |
| US20140208297A1 (en) | Validation of revised computer programs | |
| CN107451058B (en) | Software development method and device | |
| CN111124871A (en) | Interface test method and device | |
| CN113656290A (en) | Mock point automatic identification method, device and equipment | |
| CN111615688A (en) | Assertion verification code binding method and device | |
| CN116932399A (en) | Message generation method and device and nonvolatile storage medium | |
| CN114416545B (en) | Method, device and electronic device for determining test code coverage | |
| CN111695060A (en) | Page switching method, device, equipment and storage medium | |
| CN111240987B (en) | Method and device for detecting migration program, electronic equipment and computer readable storage medium | |
| CN106201859A (en) | A kind of regression testing method and system | |
| CN104298589A (en) | Performance test method and performance test equipment | |
| CN109376285B (en) | Data sorting verification method based on json format, electronic device and medium | |
| CN110941787A (en) | Page redirection method and device | |
| CN113392003A (en) | Evaluation method and device of programming code | |
| CN111124876A (en) | Method and device for realizing interface test case, storage medium and processor | |
| CN117951000A (en) | Information generation method, device, electronic equipment and storage medium | |
| CN116467010A (en) | Method and device for calling host resource by plug-in, processor and electronic equipment | |
| CN110968500A (en) | Test case execution method and device | |
| CN112579860B (en) | Method and device for processing digital page turning task, storage medium and electronic equipment |
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: 20200508 |