CN116107885A - Interface testing method, device, equipment and storage medium - Google Patents

Interface testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN116107885A
CN116107885A CN202310017984.3A CN202310017984A CN116107885A CN 116107885 A CN116107885 A CN 116107885A CN 202310017984 A CN202310017984 A CN 202310017984A CN 116107885 A CN116107885 A CN 116107885A
Authority
CN
China
Prior art keywords
interface
test
execution result
result
test case
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
CN202310017984.3A
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202310017984.3A priority Critical patent/CN116107885A/en
Publication of CN116107885A publication Critical patent/CN116107885A/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses an interface testing method, device, equipment and storage medium, which relate to the technical field of computers and comprise the following steps: when receiving an interface test request, reading a configuration file to execute a corresponding test case and generating an execution result; comparing the execution result with a preset execution result to obtain a corresponding comparison result; and judging whether the interface test is successful or not based on the comparison result. Therefore, the interface test cases can be rapidly and accurately executed for many times by completing the filling of the interface configuration information of the related modules, and the test results are output. The method is very suitable for interface test scenes with simple use case steps, more use case numbers and repeated verification of interface correctness, greatly reduces the writing difficulty of automatic test cases, and is beneficial to improving the coverage level of automatic tests.

Description

Interface testing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an interface testing method, apparatus, device, and storage medium.
Background
With the increasing level of informatization, network data is explosively growing, which clearly puts higher demands on server data storage capacity. The distributed mass storage system becoming the mainstream gradually has complex structure and multiple functions, so that the test cases are more complex to execute, and the total amount of the cases is continuously increased. Resulting in a need for a tester to repeatedly write the test cases needed for functional testing and to perform a large number of test case executions, requiring the tester to have python programming capability.
In summary, how to realize that a tester can quickly, repeatedly and accurately execute test cases and output test results only by completing the filling of interface configuration information of a related module according to the prompt of a related using method is a technical problem to be solved in the field.
Disclosure of Invention
Accordingly, the present invention is directed to an interface testing method, apparatus, device, and storage medium, which can enable a tester to quickly, repeatedly and accurately execute test cases and output test results only by completing the filling of interface configuration information of a related module according to the prompt of a related usage method. The specific scheme is as follows:
in a first aspect, the present application discloses an interface testing method, including:
when receiving an interface test request, reading a configuration file to execute a corresponding test case and generating an execution result;
comparing the execution result with a preset execution result to obtain a corresponding comparison result;
and judging whether the interface test is successful or not based on the comparison result.
Optionally, before the configuration file is read to execute the corresponding test case when the interface test request is received, the method further includes:
and writing a test case for testing the interface function, and generating a corresponding configuration file based on the test case.
Optionally, before writing the test case for testing the interface function, the method further includes:
and constructing a preset interface development environment by using the pulled frame codes.
Optionally, the generating the corresponding configuration file based on the test case includes:
and filling out a configuration file for storing test parameters of the interface test based on the test case.
Optionally, the reading the configuration file to execute the corresponding test case and generate an execution result includes:
and reading the class of the configuration file from the local file by using the python program, executing the corresponding test case, and generating an execution result.
Optionally, the comparing the execution result with a preset execution result to obtain a corresponding comparison result includes:
and comparing the execution result corresponding to each execution step of the test case with a preset execution result to obtain a corresponding comparison result.
Optionally, the determining whether the interface test is successful based on the comparison result includes:
if the comparison result is that the execution result corresponding to each execution step is consistent with the preset execution result, judging that the test case corresponding to the execution interface test is successful;
if the comparison result is that the execution result corresponding to any execution step is inconsistent with the preset execution result, judging that the test case corresponding to the execution interface test fails.
In a second aspect, the present application discloses an interface testing device comprising:
the result generation module is used for reading the configuration file to execute the corresponding test case when receiving the interface test request and generating an execution result;
the comparison module is used for comparing the execution result with a preset execution result to obtain a corresponding comparison result;
and the interface test module is used for judging whether the interface test is successful or not based on the comparison result.
In a third aspect, the present application discloses an electronic device comprising:
a memory for storing a computer program;
and a processor for executing the computer program to implement the steps of the interface test method disclosed above.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the previously disclosed interface testing method.
From this, the application discloses an interface testing method, which comprises the following steps: when receiving an interface test request, reading a configuration file to execute a corresponding test case and generating an execution result; comparing the execution result with a preset execution result to obtain a corresponding comparison result; and judging whether the interface test is successful or not based on the comparison result. Therefore, the interface test cases can be rapidly and accurately executed for many times by completing the filling of the interface configuration information of the related modules, and the test results are output. The method is very suitable for interface test scenes with simple use case steps, more use case numbers and repeated verification of interface correctness, greatly reduces the writing difficulty of automatic test cases, and is beneficial to improving the coverage level of automatic tests.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an interface testing method disclosed in the present application;
FIG. 2 is a flowchart of a specific interface testing method disclosed in the present application;
FIG. 3 is a schematic diagram of an interface testing device disclosed in the present application;
fig. 4 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
With the increasing level of informatization, network data is explosively growing, which clearly puts higher demands on server data storage capacity. The distributed mass storage system becoming the mainstream gradually has complex structure and multiple functions, so that the test cases are more complex to execute, and the total amount of the cases is continuously increased. Resulting in a need for a tester to repeatedly write the test cases needed for functional testing and to perform a large number of test case executions, requiring the tester to have python programming capability.
Therefore, the interface test scheme can realize that a tester can rapidly, repeatedly and accurately execute test cases and output test results only by completing the filling of interface configuration information of the related module according to the prompt of the related using method.
Referring to fig. 1, an embodiment of the present invention discloses an interface testing method, which includes:
step S11: when receiving the interface test request, reading the configuration file to execute the corresponding test case and generating an execution result.
In this embodiment, the python program is used to read the class of the configuration file from the local file, execute the corresponding test case, and generate the execution result. It can be appreciated that the python program is utilized to read the local configuration file, perform CTDB file sharing service related test, issue various requests to the storage server application and obtain the execution result. Wherein, the configuration files are of a plurality of types, and specific configuration file formats can include but are not limited to: ini, yaml, xml, properties, txt, py, etc. The procedure for reading the configuration file ini, using the python program, is specifically as follows: creating a py file that reads ini, preferably in the same hierarchical directory as the ini profile:
from configparser import ConfigParser
import os
class ReadConfigFile(object):
def read_config(self):
conn=ConfigParser()
file_path=os.path.join(os.path.abspath(’.’),‘config_test.ini’)
if not os.path.exists(file_path):
raise FileNotFoundError (File not present')
In addition, it should be noted that pyyaml and import yaml modules need to be installed if profile ymal is read.
In this embodiment, when receiving the interface test request, before reading the configuration file to execute the corresponding test case, the method further includes: and writing a test case for testing the interface function, and generating a corresponding configuration file based on the test case. Specifically, a configuration file for storing test parameters of the interface test is filled in based on the test case. Namely, a tester writes a test case in a test range, fills out a configuration file according to the interface test case, and stores various parameters of the interface test, for example: the code when filling in the configuration file ini is as follows:
new configuration file ini
Test configuration file
[api]
url=“www.”
method=get
header=
data=
resp_code=200
resp_json={}
Before writing the test case for testing the interface function, the method further comprises: and constructing a preset interface development environment by using the pulled frame codes. It can be understood that a tester builds a python environment on Windows, installs the dependency packages required by each framework, pulls the framework code from git, and builds a correct interface automation development environment.
Step S12: and comparing the execution result with a preset execution result to obtain a corresponding comparison result.
In this embodiment, the execution result is compared with a preset execution result, so as to obtain a comparison result with consistent comparison result or inconsistent comparison result. Compared with the conventional interface test methods such as demand analysis, case design, script development, test execution, result analysis and the like, the embodiment obtains the corresponding comparison result by pre-writing and packaging the corresponding test cases, when a large number of low-threshold interface tests are required, the test personnel only need to fill in according to the interface configuration information in the packaging module, the test execution of the test cases can be automatically completed, and the execution result is compared with the preset execution result and the like.
Step S13: and judging whether the interface test is successful or not based on the comparison result.
In this embodiment, whether the interface test is successful is determined according to the consistency of the comparison results or the inconsistency of the comparison results, if the comparison results are consistent, the interface test is successful, and if the comparison results are inconsistent, the interface test is failed.
From this, the application discloses an interface testing method, which comprises the following steps: when receiving an interface test request, reading a configuration file to execute a corresponding test case and generating an execution result; comparing the execution result with a preset execution result to obtain a corresponding comparison result; and judging whether the interface test is successful or not based on the comparison result. Therefore, the interface test cases can be rapidly and accurately executed for many times by completing the filling of the interface configuration information of the related modules, and the test results are output. The method is very suitable for interface test scenes with simple use case steps, more use case numbers and repeated verification of interface correctness, greatly reduces the writing difficulty of automatic test cases, and is beneficial to improving the coverage level of automatic tests.
Referring to fig. 2, an embodiment of the present invention discloses a specific interface testing method, and compared with the previous embodiment, the present embodiment further describes and optimizes a technical solution. Specific:
step S21: when receiving the interface test request, reading the configuration file to execute the corresponding test case and generating an execution result.
Step S22: and comparing the execution result corresponding to each execution step of the test case with a preset execution result to obtain a corresponding comparison result.
In the more detailed processing in steps S21 and S22, please refer to the above disclosed embodiment, and the detailed description is omitted here.
Step S23: and if the comparison result is that the execution result corresponding to each execution step is consistent with the preset execution result, judging that the test case corresponding to the execution interface test is successful.
In this embodiment, the expected result is determined by the python program, and when all steps of the same case conform to the expectation, that is, the execution result of each step is consistent with the preset execution result, the test case is determined to be successful.
Step S24: if the comparison result is that the execution result corresponding to any execution step is inconsistent with the preset execution result, judging that the test case corresponding to the execution interface test fails.
In this embodiment, the expected result is determined by the python program, and when all steps of the same use case are not consistent with the expected result, that is, the execution result of a certain step or the execution results of several steps are inconsistent with the preset execution result, the test use case is determined to be failed.
In this embodiment, in the process of executing the test cases, the python program is used to record all the step results of all the test cases, the step results are summarized, and the html format test report is automatically generated and stored in the local database, so that the test personnel can call and check the test report at any time and process the test report according to the information of the test report, and in addition, the test report can be set to be sent automatically, for example: after the test is completed, the sorted test report is automatically sent to a mailbox of a tester in a mail mode and the like to prompt the tester that the current test is completed.
Therefore, according to the interface testing method of the embodiment, the tester does not need to have the python programming capability, and the tester can quickly, repeatedly and accurately execute the test cases and output the test results only by completing the filling of the interface configuration information of the related module according to the prompt of the related using method. The method is very suitable for interface test scenes with simple use case steps, more use case numbers and repeated verification of interface correctness, greatly reduces the writing difficulty of automatic test cases, and is beneficial to improving the coverage level of automatic tests.
Referring to fig. 3, the embodiment of the invention also correspondingly discloses an interface testing device, which comprises:
the result generating module 11 is configured to, when receiving an interface test request, read a configuration file to execute a corresponding test case, and generate an execution result;
the comparison module 12 is configured to compare the execution result with a preset execution result to obtain a corresponding comparison result;
and the interface test module 13 is used for judging whether the interface test is successful or not based on the comparison result.
The result generating module 11 is specifically configured to read the class of the configuration file from the local file by using the python program, execute the corresponding test case, and generate an execution result. It can be appreciated that the python program is utilized to read the local configuration file, perform CTDB file sharing service related test, issue various requests to the storage server application and obtain the execution result. Wherein, the configuration files are of a plurality of types, and specific configuration file formats can include but are not limited to: ini, yaml, xml, properties, txt, py, etc. The procedure for reading the configuration file ini, using the python program, is specifically as follows: creating a py file that reads ini, preferably in the same hierarchical directory as the ini profile: in addition, it should be noted that pyyaml and import yaml modules need to be installed if profile ymal is read. When receiving the interface test request, before reading the configuration file to execute the corresponding test case, the method further comprises: and writing a test case for testing the interface function, and generating a corresponding configuration file based on the test case. Specifically, a configuration file for storing test parameters of the interface test is filled in based on the test case. Namely, the tester writes the test case in the test range, fills out the configuration file according to the interface test case, and is used for storing various parameters of the interface test, and before writing the test case for testing the interface function, the method further comprises the following steps: and constructing a preset interface development environment by using the pulled frame codes. It can be understood that a tester builds a python environment on Windows, installs the dependency packages required by each framework, pulls the framework code from git, and builds a correct interface automation development environment.
The comparing module 12 is specifically configured to compare the execution result with a preset execution result, so as to obtain a comparison result with a consistent comparison result or a comparison result with a inconsistent comparison result. Compared with the conventional interface test methods such as demand analysis, case design, script development, test execution, result analysis and the like, the embodiment obtains the corresponding comparison result by pre-writing and packaging the corresponding test cases, when a large number of low-threshold interface tests are required, the test personnel only need to fill in according to the interface configuration information in the packaging module, the test execution of the test cases can be automatically completed, and the execution result is compared with the preset execution result and the like.
The interface test module 13 is specifically configured to determine whether the interface test is successful according to the consistency of the comparison result or the inconsistency of the comparison result, if the comparison result is consistent, the interface test is successful, and if the comparison result is inconsistent, the interface test is failed. Judging an expected result through a python program, and judging that the test case is successful when all steps of the same case accord with the expected result, namely the execution result of each step accords with the preset execution result; and judging the expected result through the python program, and judging the test case as failure when all steps of the same case are inconsistent with the expected result, namely the execution result of a certain step or the execution result of a certain number of steps is inconsistent with the preset execution result. In the process of executing the test cases, the python program is used for recording all step results of all the test cases, summarizing the step results, automatically generating a test report in an html format, storing the test report in a local database, so that a tester can call and check the test report at any time and process the test report according to the information of the test report, and in addition, the test report can be set to be automatically sent, for example: after the test is completed, the sorted test report is automatically sent to a mailbox of a tester in a mail mode and the like to prompt the tester that the current test is completed.
From this, the application discloses an interface testing method, which comprises the following steps: when receiving an interface test request, reading a configuration file to execute a corresponding test case and generating an execution result; comparing the execution result with a preset execution result to obtain a corresponding comparison result; and judging whether the interface test is successful or not based on the comparison result. Therefore, the interface test cases can be rapidly and accurately executed for many times by completing the filling of the interface configuration information of the related modules, and the test results are output. The method is very suitable for interface test scenes with simple use case steps, more use case numbers and repeated verification of interface correctness, greatly reduces the writing difficulty of automatic test cases, and is beneficial to improving the coverage level of automatic tests.
In some embodiments, the interface testing device may specifically include:
the file generation module is used for writing test cases for testing the interface functions and generating corresponding configuration files based on the test cases.
In some embodiments, the interface testing device may specifically include:
and the environment construction unit is used for constructing a preset interface development environment by using the pulled frame codes.
In some embodiments, the file generation module may specifically include:
and the file generation unit is used for filling out a configuration file for storing test parameters of the interface test based on the test case.
In some embodiments, the result generating module 11 may specifically include:
and the result generating unit is used for reading the class of the configuration file from the local file by using the python program, executing the corresponding test case and generating an execution result.
In some embodiments, the comparing module 12 may specifically include:
and the comparison unit is used for comparing the execution result corresponding to each execution step of the test case with a preset execution result respectively to obtain a corresponding comparison result.
In some embodiments, the interface test module 13 may specifically include:
the interface test unit is used for judging that the test case corresponding to the execution interface test is successful if the comparison result is that the execution result corresponding to each execution step is consistent with the preset execution result;
if the comparison result is that the execution result corresponding to any execution step is inconsistent with the preset execution result, judging that the test case corresponding to the execution interface test fails.
Further, the embodiment of the present application further discloses an electronic device, and fig. 4 is a block diagram of an electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 4 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement relevant steps in the interface testing method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the interface testing method performed by the electronic device 20 disclosed in any of the previous embodiments. The data 223 may include, in addition to data received by the electronic device and transmitted by the external device, data collected by the input/output interface 25 itself, and so on.
Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program when executed by the processor implements the interface test method disclosed previously. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description of the method, the device, the equipment and the storage medium for testing the interface provided by the invention applies specific examples to illustrate the principle and the implementation of the invention, and the above examples are only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. An interface testing method, comprising:
when receiving an interface test request, reading a configuration file to execute a corresponding test case and generating an execution result;
comparing the execution result with a preset execution result to obtain a corresponding comparison result;
and judging whether the interface test is successful or not based on the comparison result.
2. The interface test method according to claim 1, wherein when receiving the interface test request, before reading the configuration file to execute the corresponding test case, further comprising:
and writing a test case for testing the interface function, and generating a corresponding configuration file based on the test case.
3. The interface test method according to claim 2, wherein before writing the test case for testing the interface function, further comprising:
and constructing a preset interface development environment by using the pulled frame codes.
4. The interface testing method according to claim 2, wherein the generating the corresponding configuration file based on the test case includes:
and filling out a configuration file for storing test parameters of the interface test based on the test case.
5. The interface test method according to claim 1, wherein the reading the configuration file to execute the corresponding test case and generating the execution result includes:
and reading the class of the configuration file from the local file by using the python program, executing the corresponding test case, and generating an execution result.
6. The method according to any one of claims 1 to 5, wherein comparing the execution result with a preset execution result to obtain a corresponding comparison result comprises:
and comparing the execution result corresponding to each execution step of the test case with a preset execution result to obtain a corresponding comparison result.
7. The interface test method according to claim 1, wherein the determining whether the interface test is successful based on the comparison result comprises:
if the comparison result is that the execution result corresponding to each execution step is consistent with the preset execution result, judging that the test case corresponding to the execution interface test is successful;
if the comparison result is that the execution result corresponding to any execution step is inconsistent with the preset execution result, judging that the test case corresponding to the execution interface test fails.
8. An interface testing apparatus, comprising:
the result generation module is used for reading the configuration file to execute the corresponding test case when receiving the interface test request and generating an execution result;
the comparison module is used for comparing the execution result with a preset execution result to obtain a corresponding comparison result;
and the interface test module is used for judging whether the interface test is successful or not based on the comparison result.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the interface testing method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program; wherein the computer program when executed by a processor implements the steps of the interface testing method of any of claims 1 to 7.
CN202310017984.3A 2023-01-06 2023-01-06 Interface testing method, device, equipment and storage medium Pending CN116107885A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310017984.3A CN116107885A (en) 2023-01-06 2023-01-06 Interface testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310017984.3A CN116107885A (en) 2023-01-06 2023-01-06 Interface testing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116107885A true CN116107885A (en) 2023-05-12

Family

ID=86265033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310017984.3A Pending CN116107885A (en) 2023-01-06 2023-01-06 Interface testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116107885A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117033234A (en) * 2023-08-24 2023-11-10 广东保伦电子股份有限公司 Interface testing method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117033234A (en) * 2023-08-24 2023-11-10 广东保伦电子股份有限公司 Interface testing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN108628748B (en) Automatic test management method and automatic test management system
US8311794B2 (en) Testing executable logic
US11561889B2 (en) Orchestration for automated performance testing
US10452522B1 (en) Synthetic data generation from a service description language model
US20130339931A1 (en) Application trace replay and simulation systems and methods
CN112187558B (en) Data verification method and device and electronic equipment
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN110569194A (en) interface testing method and device, electronic equipment and storage medium
US6763360B2 (en) Automated language and interface independent software testing tool
CN116107885A (en) Interface testing method, device, equipment and storage medium
CN115221033A (en) Interface protocol testing method and device, computer readable medium and electronic equipment
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN115470152A (en) Test code generation method, test code generation device, and storage medium
CN114489667A (en) Script generation method and device, electronic equipment and storage medium
CN114579466A (en) Method, device, equipment and medium for constructing test case and code test
CN113485927A (en) Test data generation method, device, equipment and storage medium
CN112380118A (en) Unit testing method, unit testing device, medium and electronic equipment
CN108170557B (en) Method and apparatus for outputting information
CN112035360A (en) Middleware testing method and device, computer equipment and readable storage medium
CN112799954B (en) Method, apparatus and computer readable medium for quickly constructing test environment
US20230068602A1 (en) Automated Performance Measurement Over Software Lifecycle
CN115883411A (en) Drainage test method and device, storage medium and electronic equipment
CN115878704A (en) Data processing method, device, equipment, storage medium and product
CN114064484A (en) Interface testing method and device, electronic equipment and readable storage medium
CN115629983A (en) Test case set generation method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination