CN114661620A - Interface automatic test system and method based on functional module - Google Patents

Interface automatic test system and method based on functional module Download PDF

Info

Publication number
CN114661620A
CN114661620A CN202210466407.8A CN202210466407A CN114661620A CN 114661620 A CN114661620 A CN 114661620A CN 202210466407 A CN202210466407 A CN 202210466407A CN 114661620 A CN114661620 A CN 114661620A
Authority
CN
China
Prior art keywords
interface
module
task
functional module
debugging
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
CN202210466407.8A
Other languages
Chinese (zh)
Inventor
甘佩屿
胡建骥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202210466407.8A priority Critical patent/CN114661620A/en
Publication of CN114661620A publication Critical patent/CN114661620A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

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 invention relates to an interface automatic test system and method based on functional module, the system includes interface debug module, operation overall module and task module; the interface debugging module is used for debugging whether the interface normally executes and storing interface data; the operation overall planning module is used for issuing tasks to the task module and recording interaction information between the tasks and the task module to the web end; the task module is used for executing tasks according to the convection and feeding back an execution result to the operation overall planning module. The invention carries out automatic test on the interface based on the dimension of the functional module, and a tester can be used as a module which needs to be operated and can be directly selected at a web end by a user, and can check the interface case execution condition under the corresponding function by the dimension of the functional module after the system executes a task, thereby facilitating the tester to carry out interface maintenance, execution and check of a test result by the dimension of the functional module.

Description

Interface automatic test system and method based on functional module
Technical Field
The invention belongs to the technical field of internet, and particularly relates to an interface automatic test system and method based on a functional module.
Background
The general flow of the interface automation test is to provide an interface and a test case, and then to run in a specified running environment. When there is an association dependency relationship among a plurality of interfaces related to a certain function, the interfaces need to be selected and executed according to a certain rule.
Common interface test tools in the prior art include postman, jmeter and the like, a test script needs to be manually written, an application method, a path, request parameters and the like are configured, the requirement on a test worker is high, and the requirement on maintaining an interface on line by multiple persons cannot be met. When each product line is divided under a large project and a plurality of functional modules are divided under each product line, the current interface automation method cannot meet the requirement that a tester maintains and executes the interface and checks the test result according to the dimension of the functional module.
Disclosure of Invention
In view of the above disadvantages in the prior art, the technical problem to be solved by the present invention is to provide an interface automation test system and method based on a functional module, so as to avoid the problem that a tester cannot perform interface maintenance, execution and test result viewing with the functional module dimension during interface automation test.
In order to solve the technical problem, the invention adopts the following technical scheme:
an interface automatic test system based on a functional module comprises an interface debugging module, an operation overall planning module and a task module;
the interface debugging module is used for debugging whether the interface is normally executed and storing interface data;
the operation overall planning module is used for issuing tasks to the task module and recording interaction information between the tasks and the task module to the web end;
the task module is used for executing tasks based on the functional module and feeding back execution results to the operation overall planning module.
Further perfecting the technical scheme, the interface debugging module supports online debugging of the interface and also supports checking of single test condition of a single interface.
Furthermore, the operation overall planning module can also edit the executable data and send the executable data to the interface debugging module for debugging again.
Further, the interaction information between the operation overall planning module and the task module includes task information issued by the operation overall planning module and an execution result fed back by the task module.
Further, the task module receives and executes the tasks issued by the operation overall module, and supports the execution of the multi-task queue.
Further, the task module manages tasks based on Jenkins.
The invention also relates to an interface automatic test method based on the functional module, which is carried out based on the interface automatic test system based on the functional module and comprises the following steps:
s1: establishing an execution task in a task module based on different functional modules, wherein the task is configured with codes corresponding to the functional modules;
s2: inputting interface information, functional module codes and expected interface return values into an interface debugging module, storing the interface information, the functional module codes and the expected interface return values into a database, and regarding each piece of interface information, each piece of functional module codes and each expected interface return value as an interface test case;
s3: and comparing the codes of the functional modules corresponding to the tasks with the codes in the test cases in the task module, executing the test cases with consistent codes, and skipping the inconsistent test cases until all the test cases are traversed.
Further perfecting the above technical solution, the interface information in step S2 includes url, environment information and transmission protocol;
the method comprises the following steps that an incoming parameter, dependency information and a function module corresponding to an interface of the interface are prepared in an interface debugging module;
after the debugging interface achieves the expected effect, the interface debugging module stores the interface information into the database and adds the interface into the executable list.
Further, the step S3 further includes:
and after the traversal of the test cases in the task module is finished, displaying the execution result based on the dimensionality of the functional module at the web end.
Further, the task module establishes and executes tasks based on Jenkins.
Compared with the prior art, the invention has the following beneficial effects:
1. according to the interface automatic test system based on the functional module, the interface is automatically tested based on the dimension of the functional module, a tester can be used as a module which needs to be operated and can be directly selected at a web end by a user, the interface case execution condition under the corresponding function can be checked according to the dimension of the functional module after the system execution task is finished, and the tester can conveniently perform interface maintenance, execution and checking of the test result according to the dimension of the functional module.
2. According to the automatic interface testing method based on the functional module, provided by the invention, a tester can directly select the functional module to be executed to execute all interface test cases under the functional module, and can see the interface test result of only the function, so that the manpower resource and the time cost are saved.
Drawings
FIG. 1 is a schematic structural diagram of an interface automated testing system based on functional modules according to an embodiment;
fig. 2 is a schematic flowchart of an interface automated testing method based on a functional module according to an embodiment.
Detailed Description
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
Referring to fig. 1, an interface automation test system based on a functional module according to an embodiment includes an interface debugging module, an operation orchestration module, and a task module;
the interface debugging module is used for debugging whether the interface is normally executed and storing interface data;
the operation overall planning module is used for issuing tasks to the task module and recording interaction information between the tasks and the task module to the web end;
the task module is used for executing tasks based on the functional module and feeding back execution results to the operation overall planning module.
According to the interface automatic test system based on the functional module, the interface is automatically tested based on the dimension of the functional module, a tester can directly select a module to be operated at a web end as a user, the interface case execution condition under the corresponding function can be checked according to the dimension of the functional module after the system execution task is completed, and the tester can conveniently maintain, execute and check the test result according to the dimension of the functional module.
In implementation, the invention has two use scenes for testers. The first is that the function is changed when the function is iteratively released every month, and only the interface of the function module needs to be maintained and regressed; the second is to execute the interface use case of the full-function module before and after the iteration release of the function every month. The meaning of 'function module based' in the invention is explained by taking a Bluetooth key as an example, a part of Bluetooth key function interfaces are added in the month, and after the testing of the interfaces by testers, the newly added interfaces are maintained under the 'Bluetooth key' function module through a web end. When the system is released to a pre-production environment, a tester only needs to find a 'Bluetooth key' functional module on the system to click the test environment to execute, and the system finds a corresponding task running program at Jenkins to execute an interface belonging to the 'Bluetooth key' function at the background. After the operation of each interface is finished, the system judges whether the execution of the interface is successful or not by matching with an expected value, and then generates the test result by using the dimension of the functional module of the Bluetooth key. The tester can judge whether the newly added interface and the current interface are normal or not according to the result, and further judge whether the pre-production environment can be released or not.
The interface debugging module supports online debugging of the interface and also supports checking of a single test condition of a single interface.
Therefore, the interface test and check of testers are facilitated.
The operation overall planning module can also edit the executable data and send the executable data to the interface debugging module for debugging again.
When the method is implemented, the executable interface passes through interface debugging, namely the interface return value is defined as the interface which is successfully executed by the interface; the url, incoming parameters, and parameter type data of the executable interface are the executable data. For example: the tester defines when the interface returns a "code" in the value: and when the debugging is successful, the interface is regarded as an executable interface, and the url, the incoming parameters, the parameter types and the like of the interface can be edited by operating the overall planning module.
The interactive information between the operation overall planning module and the task module comprises task information issued by the operation overall planning module and an execution result fed back by the task module.
And the task module receives and executes the tasks issued by the operation overall planning module and supports the execution of the multi-task queue.
The task module manages tasks based on Jenkins.
Jenkins is a continuous integration tool that can be used to monitor continuous repetitive work. And tasks are established according to different functions in Jenkins, one function establishes a corresponding task, and the task comprises the codes of the functional modules. When a tester selects a function test, Jenkins starts a task corresponding to the function, module codes in the task are brought into a script program, and then the script program is compared with the function module codes corresponding to each subsequent interface, and whether the interface belongs to the function or not and needs to be executed or not is judged. At the same time Jenkins can monitor the execution condition of each task, and when a problem occurs in the system, a system manager can clearly and quickly locate the problem.
Referring to fig. 2, the present invention further provides an interface automatic testing method based on a function module, which is performed based on the above interface automatic testing system based on a function module, and includes the following steps:
s1: establishing an execution task in a task module based on different functional modules, wherein the task is configured with codes corresponding to the functional modules;
s2: inputting interface information, functional module codes and expected interface return values into an interface debugging module, storing the interface information, the functional module codes and the expected interface return values into a database, and regarding each piece of interface information, each piece of functional module codes and each expected interface return value as an interface test case;
s3: and comparing the functional module codes corresponding to the tasks with the codes in the test cases in the task module, executing the test cases with consistent codes, and skipping the inconsistent test cases until all the test cases are traversed.
According to the automatic interface testing method based on the functional module, a tester can directly select the functional module to be executed to execute all interface test cases under the functional module, and can see the interface test result of only the function, so that the manpower resource and the time cost are saved.
Wherein, the interface information in the step S2 includes url, environment information and transmission protocol;
the method comprises the following steps that an incoming parameter, dependency information and a function module corresponding to an interface of the interface are prepared in an interface debugging module;
after the debugging interface achieves the expected effect, the interface debugging module stores the interface information into the database and adds the interface into the executable list.
In implementation, the dependency information refers to parameters generated by relying on other interfaces, and specifically includes the number of the relied interface, required parameter information (url, environment information and transmission protocol) generated by the relied interface, and the function module code to which the interface belongs.
Wherein the step S3 further includes:
and after the traversal of the test cases in the task module is finished, displaying the execution result based on the dimensionality of the functional module at the web end.
The task module establishes and executes a task based on Jenkins.
Finally, the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all of them should be covered in the claims of the present invention.

Claims (10)

1. The utility model provides an automatic test system of interface based on functional module which characterized in that: the system comprises an interface debugging module, an operation overall planning module and a task module;
the interface debugging module is used for debugging whether the interface normally executes and storing interface data;
the operation overall planning module is used for issuing tasks to the task module and recording interaction information between the tasks and the task module to the web end;
the task module is used for executing tasks based on the functional module and feeding execution results back to the operation overall planning module.
2. The system of claim 1, wherein the functional module-based interface automated testing system comprises: the interface debugging module supports online debugging of the interface and also supports checking of single test conditions of a single interface.
3. The system of claim 1, wherein the functional module-based interface automated testing system comprises: the operation overall planning module can also edit the executable data and send the executable data to the interface debugging module for debugging again.
4. The system of claim 1, wherein the functional module-based interface automated testing system comprises: the interactive information between the operation overall planning module and the task module comprises task information issued by the operation overall planning module and an execution result fed back by the task module.
5. The functional module-based interface automation test system according to claim 1, characterized in that: and the task module receives and executes the tasks issued by the operation overall planning module and supports the execution of the multi-task queue.
6. The interface automation test system based on functional module as claimed in claim 1 or 5, characterized in that: the task module manages tasks based on Jenkins.
7. An automatic interface testing method based on a functional module is characterized in that: the method is carried out based on the interface automation test system based on the functional module in any one of claims 1-5, and comprises the following steps:
s1: establishing an execution task in a task module based on different functional modules, wherein the task is configured with codes corresponding to the functional modules;
s2: inputting interface information, functional module codes and expected interface return values into an interface debugging module, storing the interface information, the functional module codes and the expected interface return values into a database, and regarding each piece of interface information, each piece of functional module codes and each expected interface return value as an interface test case;
s3: and comparing the functional module codes corresponding to the tasks with the codes in the test cases in the task module, executing the test cases with consistent codes, and skipping the inconsistent test cases until all the test cases are traversed.
8. The method according to claim 7, wherein the method comprises: the interface information in the step S2 includes url, environment information, and a transmission protocol;
the method comprises the following steps that an incoming parameter, dependency information and a function module corresponding to an interface of the interface are prepared in an interface debugging module;
after the debugging interface achieves the expected effect, the interface debugging module stores the interface information into the database and adds the interface into the executable list.
9. The method according to claim 7, wherein the method comprises: the step S3 further includes:
and after the traversal of the test cases in the task module is finished, displaying the execution result based on the dimensionality of the functional module at the web end.
10. The method for automatically testing the interface based on the functional module according to any one of claims 7 to 9, wherein: the task module realizes establishment and execution of tasks based on Jenkins.
CN202210466407.8A 2022-04-29 2022-04-29 Interface automatic test system and method based on functional module Pending CN114661620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210466407.8A CN114661620A (en) 2022-04-29 2022-04-29 Interface automatic test system and method based on functional module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210466407.8A CN114661620A (en) 2022-04-29 2022-04-29 Interface automatic test system and method based on functional module

Publications (1)

Publication Number Publication Date
CN114661620A true CN114661620A (en) 2022-06-24

Family

ID=82037198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210466407.8A Pending CN114661620A (en) 2022-04-29 2022-04-29 Interface automatic test system and method based on functional module

Country Status (1)

Country Link
CN (1) CN114661620A (en)

Similar Documents

Publication Publication Date Title
US7620856B2 (en) Framework for automated testing of enterprise computer systems
US7895565B1 (en) Integrated system and method for validating the functionality and performance of software applications
CN110221962B (en) Centralized software test management system and method
US6304982B1 (en) Network distributed automated testing system
US10430319B1 (en) Systems and methods for automatic software testing
US6275223B1 (en) Interactive on line code inspection process and tool
US8234633B2 (en) Incident simulation support environment and business objects associated with the incident
CN110928774A (en) Automatic test system based on node formula
CN106933709B (en) Test method and device
US20040153837A1 (en) Automated testing
US20080222608A1 (en) Method and system for managing software testing
EP2572294B1 (en) System and method for sql performance assurance services
CN108509344B (en) Daily cutting batch test method, equipment and readable storage medium
CN109086216B (en) Automatic test system
CN114238077A (en) Automatic test task arranging system and method
CN111309609A (en) Software processing system
CN108427645B (en) Method and system for realizing unattended operation in automatic test platform without command line interface
CN113742227A (en) Method, device, equipment and medium for controlling software testing process
CN111444109B (en) Mobile terminal UI automatic test method and system
CN110232013B (en) Test method, test device, controller and medium
CN111767205A (en) Online detection method and system supporting task splitting
CN114661620A (en) Interface automatic test system and method based on functional module
CN115587028A (en) Interface automation test method, system, medium and terminal
CN111581081B (en) Automatic test system and method
WO2021171366A1 (en) Task process discrimination device, task process discrimination method, and program

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