Method and system for quickly and automatically testing based on swagger

An automated testing and fast technology, applied in software testing/debugging, error detection/correction, instruments, etc., can solve the problems that developers spend a lot of time on code testing and low efficiency, so as to ensure software quality, improve speed and work Efficiency and the effect of reducing professionalism requirements

Active Publication Date: 2020-11-13
深圳微品致远信息科技有限公司
View PDF10 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Because every HTTP interface needs to write interface documents, some projects use showdoc, and some projects use markdown, this method of code writing files is inefficient. Update the interface document; at the same tim...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for quickly and automatically testing based on swagger

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The preferred embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0029] Such as figure 1 As shown, this example provides a method for rapid automated testing based on swagger, including the following steps:

[0030] Step S1, writing and designing the REST service interface of the HTTP protocol according to the business logic;

[0031] Step S2, writing or automatically generating an interface document for connecting the front-end development to the back-end interface;

[0032] Step S3, writing or automatically generating interface test codes for testing whether the interface function logic conforms to the business process;

[0033] Step S4, implement continuous testing through the continuous integration tool jenkins, and then automate the interface testing code process;

[0034] Wherein, in the step S1, the REST service interface of the HTTP protocol is implemented by adding annotation descri...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a rapid and automatic test method and system based on a swagger. The method and system for quickly and automatically testing based on swagger comprises the following steps: S1,compiling and designing an REST service interface of an HTTP protocol according to service logic; s2, compiling or automatically generating an interface document of a front-end development docking rear-end interface; s3, compiling or automatically generating an interface test code for testing whether the interface function logic conforms to the business process or not; s4, achieving continuous testing through a continuous integration tool jenkins, and then achieving automation of the interface testing code process. According to the method, the swagger-editior is adopted to automatically generate the interface test code, so that the interface document can be quickly updated, the software quality is guaranteed, the professional requirements on developers are reduced, the interface test speedis increased, the work efficiency is improved, and convenience and quickness are achieved.

Description

technical field [0001] The invention relates to a test code generation, in particular to a swagger-based rapid automated test method, and to a system adopting the swagger-based rapid automated test method. Background technique [0002] Because every HTTP interface needs to write interface documents, some projects use showdoc, and some projects use markdown, this method of code writing files is inefficient. Update interface documents; at the same time, in order to ensure software quality, interface test codes need to be written separately, which will cause problems such as low efficiency, causing developers to spend a lot of time on code testing and other work. Contents of the invention [0003] The technical problem to be solved by the present invention is to provide a convenient swagger-based rapid automated testing method that can improve testing speed and efficiency, and further provide a system using the swagger-based rapid automated testing method. [0004] In this r...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/36G06F8/30
CPCG06F8/30G06F11/3672
Inventor 周洪峰刘峻源
Owner 深圳微品致远信息科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products