CN106445824A - Interface comprehensiveness management system based on character - Google Patents

Interface comprehensiveness management system based on character Download PDF

Info

Publication number
CN106445824A
CN106445824A CN201610875057.5A CN201610875057A CN106445824A CN 106445824 A CN106445824 A CN 106445824A CN 201610875057 A CN201610875057 A CN 201610875057A CN 106445824 A CN106445824 A CN 106445824A
Authority
CN
China
Prior art keywords
interface
node
information
type
module
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.)
Granted
Application number
CN201610875057.5A
Other languages
Chinese (zh)
Other versions
CN106445824B (en
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.)
Nanjing Tuniu Technology Co Ltd
Original Assignee
Nanjing Tuniu 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 Nanjing Tuniu Technology Co Ltd filed Critical Nanjing Tuniu Technology Co Ltd
Priority to CN201610875057.5A priority Critical patent/CN106445824B/en
Publication of CN106445824A publication Critical patent/CN106445824A/en
Application granted granted Critical
Publication of CN106445824B publication Critical patent/CN106445824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/3688—Test management for test execution, e.g. scheduling of test suites
    • 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
    • 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/3692—Test management for test results analysis
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00—Arrangements for software engineering
    • G06F8/70—Software maintenance or management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种基于角色的接口综合性管理系统,包括:用户角色管理模块、接口信息的录入与维护模块、表单UI生成器、验证测试模块、分析引擎、消息通知模块,所述用户角色管理模块用于管理用户信息并对用户登录进行认证;所述接口信息录入与维护模块用于对每个接口的基本属性、入参和出参等信息进行入库和管理;所述使用者角色的验证测试模块用于根据当前入参请求指定环境接口,经过分析引擎分析后导出详细的分析测试结果,如有异常则利用消息通知模块自动通知关联人;消息通知模块用于实现接口异常通知功能和变更通知功能。

The invention discloses a role-based interface comprehensive management system, comprising: a user role management module, an interface information input and maintenance module, a form UI generator, a verification test module, an analysis engine, and a message notification module. The management module is used to manage user information and authenticate user login; the interface information input and maintenance module is used to store and manage the basic attributes, input parameters and output parameters of each interface; the user role The verification test module is used to specify the environment interface according to the current input parameter request, and export the detailed analysis and test results after analysis by the analysis engine. If there is an exception, the message notification module is used to automatically notify the associated person; the message notification module is used to realize the interface exception notification function and change notification functionality.

Description

一种基于角色的接口综合性管理系统A Role-Based Interface Comprehensive Management System

技术领域technical field

本发明属于互联网技术领域,具体涉及一种基于角色的接口综合性管理系统。The invention belongs to the technical field of the Internet, and in particular relates to a role-based interface comprehensive management system.

背景技术Background technique

伴随着互联网和移动互联网技术的快速发展,各种应用程序层出不穷。而不管是应用程序本身还是应用程序背后的支撑系统内部,各个子系统、模块之间的通信都是通过大量的接口调用实现,因此应用程序的开发及使用过程中,不可避免地会调用大量接口。现有研发流程中对接口的管理主要采用以下如下方式。With the rapid development of Internet and mobile Internet technology, various applications emerge in endlessly. Regardless of the application itself or the supporting system behind the application, the communication between various subsystems and modules is realized through a large number of interface calls. Therefore, in the process of application development and use, it is inevitable to call a large number of interfaces. . The management of interfaces in the existing R&D process mainly adopts the following methods.

1.功能测试:通过手工附带参数请求接口,人工一层层查看接口出参是否符合约定来验证接口功能;1. Functional test: verify the function of the interface by manually requesting the interface with parameters, and checking whether the output parameters of the interface meet the agreement layer by layer;

2.文档定义:接口文档定义通过开发人员手工编辑文档,一个字段一个字段地维护约定信息;2. Document definition: The interface document definition is manually edited by the developer to maintain the agreed information field by field;

3.消息告知:当接口定义发生变更或接口测试发现问题时通过人工口头告知或邮件方式向各使用方解释变动细节;3. Message notification: When the interface definition changes or the interface test finds a problem, explain the details of the change to the users through manual oral notification or email;

由于目前的研发流程中缺乏一套对接口进行综合性管理的系统或方法。在大量接口应用过程中,普遍存在如下问题:Because the current R&D process lacks a system or method for comprehensive management of interfaces. In the application process of a large number of interfaces, the following problems generally exist:

1.接口文档的定义,每次都需要由生产方手动维护编辑,缺乏一套标准的接口定义术语并常常伴随定义粒度不足和准确性有误等问题;1. The definition of interface documents needs to be manually maintained and edited by the producer every time, lacking a set of standard interface definition terms and often accompanied by problems such as insufficient definition granularity and incorrect accuracy;

2.开发联调前,缺少对全量接口的自动化测试,一个庞大系统上线,待测试接口成百上千,都由测试人员手工一个个接口测试,测试覆盖率和准确性都存在巨大隐患,严重影响开发效率和项目整体进度的推进;2. Before development and joint debugging, there was a lack of automated testing of all interfaces. When a huge system was launched, there were hundreds of interfaces to be tested, and the testers manually tested each interface. There were huge hidden dangers in test coverage and accuracy. Affect development efficiency and overall progress of the project;

3.接口定义变更时不能及时更新文档并通知接口使用方,造成联调时进度受阻;3. When the interface definition is changed, the document cannot be updated in time and the interface user is notified, which hinders the progress of joint debugging;

4.接口测试中发现问题时不能第一时间由系统自动通知接口生产方;4. When a problem is found in the interface test, the system cannot automatically notify the interface producer at the first time;

5.接口维护方发生人员变动时无法及时平滑地完成交接。5. The interface maintenance party cannot complete the handover in a timely and smooth manner when there is a personnel change.

发明内容Contents of the invention

为解决上述问题,本发明公开了一种基于角色的接口综合性管理系统,实现接口的角色归属,统一维护接口定义,对接口进行全粒度地自动化测试,自动化生成标准化的接口定义文档和测试报告,当接口定义变更或测试发现问题时能够由系统自动通知关联人。In order to solve the above problems, the present invention discloses a role-based interface comprehensive management system, which realizes role attribution of interfaces, uniformly maintains interface definitions, conducts full-grained automated testing of interfaces, and automatically generates standardized interface definition documents and test reports , when the interface definition changes or the test finds a problem, the system can automatically notify the associated person.

为了达到上述目的,本发明提供如下技术方案:In order to achieve the above object, the present invention provides the following technical solutions:

基于角色的接口综合性管理系统,包括:用户角色管理模块、接口信息的录入与维护模块、表单UI生成器、验证测试模块、分析引擎、消息通知模块,所述用户角色管理模块用于管理用户信息并对用户登录进行认证;所述接口信息录入与维护模块用于对每个接口的基本属性、入参和出参等信息进行入库和管理;所述使用者角色的验证测试模块用于根据当前入参请求指定环境接口,经过分析引擎分析后导出详细的分析测试结果,如有异常则利用消息通知模块自动通知关联人;消息通知模块用于实现接口异常通知功能和变更通知功能;A role-based interface comprehensive management system, including: a user role management module, an interface information entry and maintenance module, a form UI generator, a verification test module, an analysis engine, and a message notification module. The user role management module is used to manage users information and authenticate user login; the interface information entry and maintenance module is used to store and manage information such as the basic attributes, input parameters and output parameters of each interface; the verification test module of the user role is used to Specify the environmental interface according to the current input request, and export the detailed analysis and test results after analysis by the analysis engine. If there is any abnormality, the message notification module will be used to automatically notify the associated person; the message notification module is used to realize the interface exception notification function and change notification function;

所述接口信息录入与维护模块The interface information entry and maintenance module

用于输入和修改接口基本信息、入参、出参和测试桩,并进行保存,It is used to input and modify the basic information of the interface, input parameters, output parameters and test stubs, and save them.

用于调用表单UI生成器根据入参和出参生成所有节点定义表单,入参或出参中每个字段当做一个节点:利用表单UI生成器,支持用户手工添加节点,定义节点属性信息的方式维护接口定义信息;或通过入参或出参的json数据结构,调用分析引擎得到节点分析指标项,以及节点位置信息,并自动生成所有节点定义表单;It is used to call the form UI generator to generate all node definition forms according to the input parameters and output parameters. Each field in the input parameters or output parameters is regarded as a node: the form UI generator supports users to manually add nodes and define node attribute information Maintain interface definition information; or call the analysis engine to obtain node analysis index items and node location information through the json data structure of input or output parameters, and automatically generate all node definition forms;

所述分析引擎包括分配器、各个子类型分析器和校验对比单元,所述分配器用于对参数进行解析,使json数据中的“对象”类型能原样输出为object类型而非array类型,在数据解析过程中保证类型信息不丢失,获得经过解析的对象的各个属性类型,根据类型的不同分发到各自的分析器中;所述各子类型分析器用于获取节点信息,获得每个节点在json数据结构中的唯一位置和该节点的所有分析指标项;所述校验对比单元用于将分析结果与之前保存的关于该接口的定义信息进行对比。The analysis engine includes an allocator, each subtype analyzer and a check comparison unit, and the allocator is used for parsing parameters so that the "object" type in the json data can be output as the object type instead of the array type as it is. During the data parsing process, the type information is guaranteed not to be lost, and each attribute type of the parsed object is obtained, and distributed to respective analyzers according to the type; the subtype analyzers are used to obtain node information, and obtain each node in json The unique position in the data structure and all analysis index items of the node; the verification and comparison unit is used to compare the analysis result with the previously saved definition information about the interface.

所述验证测试模块包括测试单元和订阅单元,测试单元用于将当前入参数请求指定环境接口,经过分析引擎分析,导出详细的分析测试结果,如有异常则通过消息通知模块自动周知关联人,所述订阅单元将使用方感兴趣的接口记录与用户进行关联,订阅成功后,当接口定义发生变更或测试发现异常可及时通知关联用户。The verification test module includes a test unit and a subscription unit, and the test unit is used to specify the environment interface for the current input parameter request, and through the analysis engine analysis, the detailed analysis and test results are exported. If there is any abnormality, the associated person will be automatically notified through the message notification module, The subscription unit associates the interface records that the user is interested in with the user, and after the subscription is successful, the associated user can be notified in time when the interface definition changes or an abnormality is found in the test.

进一步的,所述用户角色管理模块包括系统自管单元和第三方用户管理单元,所述系统自管单元由本系统自己实现用户的注册、登录、组织结构等信息的录入与维护,所述第三方用户管理单元用于调用第三方用户管理模块进行用户权限认证、用户和组织结构基本信息的获取。Further, the user role management module includes a system self-management unit and a third-party user management unit, and the system self-management unit realizes the entry and maintenance of user registration, login, organizational structure and other information by the system itself, and the third-party The user management unit is used to call the third-party user management module to perform user authority authentication and obtain basic information of users and organizational structures.

进一步的,所述节点类型分为三类:根节点、标量节点和非标量节点,非标量节点支持添加子节点、删除本节点、节点属性维护、子节点展开和收起。Further, the node types are divided into three categories: root nodes, scalar nodes and non-scalar nodes, and non-scalar nodes support adding child nodes, deleting this node, maintaining node attributes, and expanding and collapsing child nodes.

进一步的,所述每个节点的html结构均为动态浮动型,支持无限扩展。Further, the html structure of each node is a dynamic floating type, which supports unlimited expansion.

进一步的,所述分配器解析时利用php语言中的json_decode ( string $json [,bool $assoc = false])方法对参数进行解析,保留该方法的第二位参数$assoc为false,使json数据中的对象类型能原样输出为object类型而非array类型。Further, the json_decode (string $json [, bool $assoc=false]) method in the php language is used to analyze the parameters when the allocator parses, and the second parameter $assoc of the method is reserved as false, so that the json data The object type in can be output as object type instead of array type.

进一步的,所述分配器将经过解析的object对象通过get_object_vars方法将对象属性转换成关联数组,再继续通过遍历,使用gettype方法获取各个属性类型,根据类型的不同分发到各自的分析器中。Further, the allocator converts the parsed object object into an associative array through the get_object_vars method, and then continues through the traversal, uses the gettype method to obtain each attribute type, and distributes it to the respective analyzers according to the type.

进一步的,所述子类型分析器包括:boolean类型分析器、double类型分析、integer类型分析器、string类型分析器、object类型分析器、array类型分析器、null类型分析器。Further, the subtype analyzer includes: a boolean type analyzer, a double type analyzer, an integer type analyzer, a string type analyzer, an object type analyzer, an array type analyzer, and a null type analyzer.

进一步的,所述验证测试模块还包括所述列表检索单元,列表检索单元根据接口关键字或所属部门信息检索出目标接口。Further, the verification test module further includes the list retrieval unit, which retrieves the target interface according to the interface keyword or the department information.

与现有技术相比,本发明具有如下优点和有益效果:Compared with the prior art, the present invention has the following advantages and beneficial effects:

通过对接口出、入参数中层层字段类型和值限定范围做最精细粒度的自动化解析,实现了基于用户角色对接口实行分层管理和问题跟踪;通过根据出、入参自动化生成图形化的接口定义录入表单,方便用户对复杂接口结构做出定义维护。同时,本发明利用MongoDb数据库对接口分析结果进行快速存取,并通过消息模块实现当检测到接口定义发生变更或验证测试接口发现问题时实时通知接口关联人。本发明提供的管理系统能够显著降低接口开发维护成本,提高整体研发效率。Through automatic analysis of layer-by-layer field types and value limits in interface output and input parameters, layered management and problem tracking of interfaces based on user roles are realized; graphical interfaces are automatically generated based on output and input parameters The definition entry form is convenient for users to define and maintain complex interface structures. At the same time, the present invention utilizes the MongoDb database to quickly access the interface analysis results, and through the message module, realizes real-time notification of the interface associated person when the interface definition is changed or a problem is found in the verification test interface. The management system provided by the invention can significantly reduce the cost of interface development and maintenance, and improve the overall research and development efficiency.

附图说明Description of drawings

图1为系统数据流程图。Figure 1 is a flow chart of the system data.

图2为字段节点html结构设计图。Figure 2 is a design diagram of the field node html structure.

图3为分析引擎逻辑流程图。Figure 3 is a logic flow chart of the analysis engine.

图4为Boolean类型分析器结构图。Fig. 4 is a structure diagram of a Boolean type analyzer.

图5为double类型分析器结构图。Figure 5 is a structural diagram of a double type analyzer.

图6为integer类型分析器结构图。Fig. 6 is a structural diagram of an integer type analyzer.

图7为object类型分析器结构图。Fig. 7 is a structural diagram of an object type analyzer.

图8为array类型分析器结构图。Fig. 8 is a structural diagram of an array type analyzer.

图9为分析引擎中分配器、各类型分析器的具体处理流程图。Fig. 9 is a specific processing flow chart of the allocator and various types of analyzers in the analysis engine.

图10为消息通知模块流程图。Fig. 10 is a flowchart of the message notification module.

具体实施方式detailed description

以下将结合具体实施例对本发明提供的技术方案进行详细说明,应理解下述具体实施方式仅用于说明本发明而不用于限制本发明的范围。The technical solutions provided by the present invention will be described in detail below in conjunction with specific examples. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.

本发明提供的基于角色的接口综合性管理系统包括如下几部分:用户角色管理模块、接口信息的录入与维护模块、表单UI生成器、验证测试模块、分析引擎、消息通知模块。其中各模块之间数据流程图如图1所示。用户角色管理模块用于管理用户信息(新增、修改、删除)并对用户登录进行认证;接口信息录入与维护模块用于对每个接口的基本属性、入参和出参等信息进行入库和管理;使用者角色的验证测试模块用于检索目标接口,根据当前入参数请求指定环境接口,经过分析引擎分析后导出详细的分析测试结果,如有异常则利用消息通知模块自动通知关联人;消息通知模块用于配合使用者角色的验证测试模块实现接口异常通知功能和变更通知功能。The role-based interface comprehensive management system provided by the present invention includes the following parts: a user role management module, an interface information input and maintenance module, a form UI generator, a verification test module, an analysis engine, and a message notification module. The data flow chart between each module is shown in Figure 1. The user role management module is used to manage user information (add, modify, delete) and authenticate user login; the interface information input and maintenance module is used to store the basic attributes, input parameters, and output parameters of each interface. and management; the verification test module of the user role is used to retrieve the target interface, specify the environment interface according to the current input parameter request, and export the detailed analysis and test results after analysis by the analysis engine, and use the message notification module to automatically notify the associated person if there is any abnormality; The message notification module is used to cooperate with the verification test module of the user role to realize the interface exception notification function and the change notification function.

用户角色管理模块主要包括两个部分:一是系统内自管的一套用户角色、组织结构维护单元(以下简称“系统自管单元”);二是第三方用户管理单元,该单元用于调用第三方用户管理模块,如各个公司内的OA系统等。The user role management module mainly includes two parts: one is a set of user roles and organizational structure maintenance unit managed by the system (hereinafter referred to as "system self-management unit"); the second is the third-party user management unit, which is used to call Third-party user management modules, such as OA systems in various companies, etc.

系统自管单元由本系统自己实现用户的注册、登录、组织结构等信息的录入与维护。其中组织结构数据由系统超级管理员录入,组织结构层级支持无限分级;由用户在注册界面填写基本信息,如用户名、密码、邮箱、手机号码、所属部门等信息,提交保存入库,完成注册;用户在登录界面填写账号和密码信息提交服务端验证,验证通过即可进入本系统,登录用户可在个人中心维护编辑用户信息,超级管理员可管理所有用户基本信息和组织结构数据。The system self-management unit realizes the entry and maintenance of user registration, login, organizational structure and other information by the system itself. Among them, the organizational structure data is entered by the system super administrator, and the organizational structure level supports unlimited classification; the user fills in the basic information on the registration interface, such as user name, password, email address, mobile phone number, department, etc., submits and saves it in the warehouse, and completes the registration ;Users fill in the account number and password information on the login interface and submit it to the server for verification. After passing the verification, they can enter the system. Logged-in users can maintain and edit user information in the personal center, and super administrators can manage all user basic information and organizational structure data.

第三方用户管理单元无需在本系统内维护用户和组织结构信息,而是利用第三方系统公开的接口完成用户权限认证、用户和组织结构基本信息的获取。具体实现时,用户在登录界面填写账号信息,提交系统后,由系统将此信息发送第三方账号验证系统(如公司域账号系统),如验证成功则在本系统session中标示用户登录成功。除验证用户权限外,第三方用户管理单元还应提供三方面功能,一是支持通过用户名联想相关用户,二是根据用户ID 和部门ID 获取相应的详细信息,三是能提供组织结构全量信息数据;这些功能均通过与本系统调用的第三方用户管理模块进行交互实现。The third-party user management unit does not need to maintain user and organizational structure information in the system, but uses the interface disclosed by the third-party system to complete user authority authentication and obtain basic information of users and organizational structure. In actual implementation, the user fills in the account information on the login interface, and after submitting it to the system, the system will send this information to a third-party account verification system (such as the company domain account system). If the verification is successful, the user's login success will be marked in the session of this system. In addition to verifying user permissions, the third-party user management unit should also provide three functions, one is to support association of related users through usernames, the other is to obtain corresponding detailed information according to user ID and department ID, and the third is to provide full information on organizational structure data; these functions are realized by interacting with the third-party user management module called by this system.

登录系统后可选择接口生产者和使用者这两种角色中的其中一种,每一种角色对应不同的功能区域,生产者对应接口信息与录入模块,使用者则对应验证测试模块。选择不同角色即可使用相应模块。After logging into the system, one of the two roles of interface producer and user can be selected. Each role corresponds to a different functional area. The producer corresponds to the interface information and input module, and the user corresponds to the verification test module. Select different roles to use the corresponding modules.

接口信息录入与维护模块主要包括以下几个子功能单元:新增、删除、检索、修改(编辑),这些功能均在列表页操作。列表页上有新增按钮,列表页支持按照维护者或部门检索,找出由本人或本部门提供支持的接口列表,每条记录右侧有编辑和删除两个操作按钮,点击“编辑”按钮可对该接口的基本信息进行维护更新,“删除”按钮则直接删除该接口信息;其中新增子单元用于新增接口数据,具体包括接口基本信息、入参、出参和测试桩。接口信息录入与维护模块能够根据接口数据,利用表单UI生成器生成所有节点定义表单。在列表点击“新增”按钮,则进入接口信息维护表单页,该表单页中包括基本信息TAB页、入参和出参TAB页和测试桩TAB页。基本信息TAB页主要由接口名、维护者(默认当前登录用户)、请求方式、路由地址、所属系统三字码、各环境对应的地址等字段组成。在入参和出参TAB页上利用表单UI生成器,用户可通过手工一个个添加节点,定义节点属性信息的方式维护接口定义信息,也可通过现成的入参或出参的json数据结构,通过“一键生成”的功能调用表单UI生成器自动生成所有节点定义表单;在测试桩TAB页上可维护该接口多套测试桩数据,方便不同订阅者使用。在列表点击“编辑”按钮,同样进入接口信息维护表单页,页面上TAB页同新增功能,各字段读取当前需要修改的接口数据并加以显示。在新增或编辑之后,系统接受前台表单传递的数据,将接口基础信息和自动生成的入参、出参表单整体结构数据保存msyql数据表api_info表中,将经过表单UI生成器得到的入参、出参定义的信息以接口名为唯一键值保存进MongoDB中。The interface information entry and maintenance module mainly includes the following sub-function units: add, delete, retrieve, modify (edit), and these functions are all operated on the list page. There is a new button on the list page. The list page supports searching by maintainer or department to find out the list of interfaces supported by the person or the department. There are two operation buttons on the right side of each record: edit and delete. Click the "Edit" button The basic information of the interface can be maintained and updated, and the "Delete" button can directly delete the interface information; the new subunit is used to add interface data, including basic interface information, input parameters, output parameters and test stubs. The interface information entry and maintenance module can use the form UI generator to generate all node definition forms according to the interface data. Click the "Add" button in the list to enter the interface information maintenance form page, which includes the basic information TAB page, input parameter and output parameter TAB page, and test stub TAB page. The basic information TAB page is mainly composed of fields such as interface name, maintainer (the default is the current login user), request method, routing address, three-character code of the system to which it belongs, and addresses corresponding to each environment. Using the form UI generator on the input and output TAB pages, users can manually add nodes one by one and define node attribute information to maintain interface definition information, or through the ready-made json data structure of input or output parameters, Call the form UI generator through the "one-click generation" function to automatically generate all node definition forms; multiple sets of test pile data for this interface can be maintained on the test pile TAB page, which is convenient for different subscribers to use. Click the "Edit" button in the list to enter the interface information maintenance form page. The TAB page on the page is the same as the new function. Each field reads the current interface data that needs to be modified and displays it. After adding or editing, the system accepts the data transmitted by the front-end form, and saves the interface basic information and the automatically generated input and output form overall structure data in the msyql data table api_info table, and the input parameters obtained through the form UI generator , The information defined by the output parameter is saved in MongoDB with the unique key value of the interface name.

使用者角色的验证测试模块包括列表检索单元、测试单元和订阅单元。通过列表检索单元,使用者可使用接口关键字或所属部门信息检索出目标接口。测试单元提供测试功能页面,在该页面上可使用该生产者提供的多套测试桩数据,也支持使用者输入自定义测试数据。点击页面中的“测试”按钮,系统会将当前入参请求指定环境接口,经过分析引擎分析(获得入参、出参中各字段(节点)信息,将分析结果与之前接口定义进行比对分析),导出详细的分析测试结果,如有异常则通过消息通知模块自动周知关联人。而订阅单元可将使用方感兴趣的接口记录与用户进行关联,并及时通知使用者订阅记录的变更信息。通过点击接口记录右侧的订阅按钮,即可在“我的订阅”单元中查看已关注的全部接口记录,订阅接口后,有关该接口的任何变更信息都会以邮件或短信的方式告知使用者,确保使用方第一时间获取接口变更信息。The verification test module of user role includes list retrieval unit, test unit and subscription unit. Through the list retrieval unit, the user can retrieve the target interface by using interface keywords or department information. The test unit provides a test function page, on which multiple sets of test stub data provided by the producer can be used, and users can also input custom test data. Click the "Test" button on the page, the system will specify the environment interface for the current input request, and analyze it through the analysis engine (obtain the information of each field (node) in the input and output parameters, and compare and analyze the analysis results with the previous interface definition ), export detailed analysis and test results, and if there is any abnormality, the related party will be automatically notified through the message notification module. The subscription unit can associate the interface record that the user is interested in with the user, and notify the user of the change information of the subscription record in time. By clicking the subscription button on the right side of the interface record, you can view all the interface records you have followed in the "My Subscription" unit. After subscribing to the interface, any change information about the interface will be notified to the user by email or text message. Make sure that the user obtains the interface change information as soon as possible.

表单UI生成器将用户已有的json数据传入后端,由服务端脚本php分析数据结构,一层层遍历解析节点属性信息生成表单的html结构,并将默认节点的解析数据保存进入js对象中输出前端,生成的表单结构和节点属性信息,用户可在前端根据需要继续微调,对表单进行进一步扩展。其主要包括两方面功能,一是根据接口预设计文档,通过人工的方式支持创建结构化的表单,将书面的接口定义维护进系统;二是支持导入现有的接口入参、出参智能生成结构化录入表单。The form UI generator passes the user's existing json data to the backend, and the server-side script php analyzes the data structure, traverses and parses the node attribute information layer by layer to generate the html structure of the form, and saves the parsed data of the default node into the js object Output the front-end, the generated form structure and node attribute information, and the user can continue to fine-tune the front-end as needed to further expand the form. It mainly includes two functions. One is to support the creation of structured forms manually according to the interface pre-design document, and maintain the written interface definition into the system; the other is to support the intelligent generation of input parameters and output parameters imported from existing interfaces. Structured entry forms.

具体的说,本发明将入参或出参中每个字段都当做一个节点,并将节点类型分为三类:根节点、标量节点和非标量节点。非标量节点支持添加子节点、删除本节点、节点属性维护、子节点展开和收起。表单UI生成器获得入参、出参后,调用分析引擎进行分析,获得入参、出参中各字段(节点)分析指标项,以及各字段(节点)位置信息,根据这些节点信息生成表单。Specifically, the present invention regards each field in an input parameter or an output parameter as a node, and divides the node types into three types: root node, scalar node and non-scalar node. Non-scalar nodes support adding child nodes, deleting this node, maintaining node properties, expanding and collapsing child nodes. After the form UI generator obtains the input parameters and output parameters, it calls the analysis engine for analysis, obtains the analysis index items of each field (node) in the input parameters and output parameters, and the location information of each field (node), and generates a form based on these node information.

上述每个节点的html结构均设计为动态浮动型,支持无限扩展,节点结构如图2所示,节点定义的信息以悬浮表单控件的方式维护,根据不同的节点类型,维护有所不同。每个节点的基础信息均有字段名称、值类型,而不同节点类型关于值的限定有所不同,例如boolean类型值限定真、假或无限制,integer类型限定值大小范围:大于零、小于零或等于零,可多选;double类型可限定小数点位数等等,这些具体的值限定可根据实际项目需求继续添加扩展。The html structure of each of the above nodes is designed as a dynamic floating type, which supports unlimited expansion. The node structure is shown in Figure 2. The information defined by the node is maintained in the form of a floating form control. The maintenance is different according to different node types. The basic information of each node has field names and value types, and different node types have different restrictions on values. For example, boolean type values are limited to true, false or unlimited, and integer types limit the value size range: greater than zero and less than zero. Or equal to zero, multiple choices are available; the double type can limit the number of decimal places, etc. These specific value limits can continue to be added and expanded according to actual project needs.

前述的分析引擎通过遍历将父节点位置一层层往下传递,直到目标节点,最终获得位置信息及为该节点在JSON数据结构中的唯一位置,通过该位置可用于唯一确定并获取该节点所有信息,并能够获得节点类型指标。分析引擎包括分配器、各个子类型分析器和校验对比单元。其中分配器用于对参数进行解析,使json数据中的对象类型能原样输出为object类型而非array类型,在数据解析过程中保证类型信息不丢失,获得经过解析的对象的各个属性类型,根据类型的不同分发到各自的分析器中。各子类型分析器用于获取节点信息,获得每个节点在json数据结构中的唯一位置和该节点的所有分析指标项。校验对比单元用于将分析结果与之前保存的关于该接口的定义信息进行对比。具体流程如图3所示。The aforementioned analysis engine passes the position of the parent node down layer by layer through traversal until the target node, and finally obtains the position information and the unique position of the node in the JSON data structure, which can be used to uniquely determine and obtain all information and be able to get node type metrics. The analysis engine includes an allocator, individual subtype analyzers, and a check comparison unit. The allocator is used to parse the parameters, so that the object type in the json data can be output as the object type instead of the array type. During the data parsing process, the type information is guaranteed not to be lost, and each attribute type of the parsed object is obtained. According to the type of different distributions into their respective analyzers. Each subtype analyzer is used to obtain node information, obtain the unique position of each node in the json data structure and all analysis index items of the node. The verification comparison unit is used to compare the analysis result with the previously saved definition information about the interface. The specific process is shown in Figure 3.

分配器首先接收外部json类型入参,利用解析JSON数据结构的方法对参数进行解析。本发明实施例中利用php语言中的json_decode ( string $json [, bool $assoc =false])方法对参数进行解析,保留该方法的第二位参数$assoc为false,使json数据中的对象类型能原样输出为object类型而非array类型,确保在数据解析过程中类型信息不丢失。The allocator first receives external json type input parameters, and uses the method of parsing the JSON data structure to parse the parameters. In the embodiment of the present invention, the json_decode (string $json [, bool $assoc=false]) method in the php language is used to analyze the parameters, and the second parameter $assoc of the method is reserved as false, so that the object type in the json data It can be output as the object type instead of the array type as it is, ensuring that the type information is not lost during the data parsing process.

随后,分配器将经过解析的object对象通过get_object_vars方法将对象属性转换成关联数组,再继续通过遍历,使用gettype方法获取各个属性类型,根据类型的不同分发到各自的分析器中,获得分析结果集合主要应用在表单UI生成器中根据分析结果自动生成接口定义的录入表单;另外在使用者角色验证测试接口时,将分析结果与之前接口定义进行比对分析,逐条列出参数中各个节点项的分析结果,如遇与定义不一致则列出异常并通过消息系统通知接口关联人。Subsequently, the allocator converts the parsed object object into an associative array through the get_object_vars method, and then continues through traversal, using the gettype method to obtain each attribute type, and distributes it to the respective analyzers according to the type to obtain a set of analysis results It is mainly used in the form UI generator to automatically generate the entry form of the interface definition according to the analysis results; in addition, when the user role verifies the test interface, the analysis result is compared with the previous interface definition, and the parameters of each node item in the parameter are listed one by one. Analyze the result, if it is inconsistent with the definition, list the exception and notify the interface related person through the message system.

本发明根据目标json数据类型创建各个子类型分析器:boolean类型分析器、double类型分析、integer类型分析器、string类型分析器、object类型分析器、array类型分析器、null类型分析器。各子类型分析器用于获取节点信息并与节点定义信息进行比较判断,经过分析器的处理,能够获得每个节点在json数据结构中的唯一位置和该节点的所有分析指标项。Boolean类型分析器的分析指标项有限定真、限定假、不限,分析器结构如图4所示;double类型支持限定小数点位数,指标项有是否限定小数点位数、小数点位数值、正则表达式,将实际返回结果与定义中的这些指标进行比较,不匹配则给出明细信息;分析器结构如图5所示;integer类型支持大于零、小于零、等于零、不限、正则表达式几项指标,将实际返回结果与定义中的这些指标进行比较,不匹配则给出明细信息;分析器结构如图6所示;string类型支持分析自定义正则规则、是否为空;object类型分析器根据子项的类型继续分发到其他类型分析器中,分析器结构如图7所示,分析指标为是否为空;array类型分析器分析指标有判断为空、item个数,并将每个子项目分发到object类型分析器中继续分析,分析器结构如图8所示。 各类型的分析指标可自由添加,并不受本例具体指标限制。The present invention creates various subtype analyzers according to the target json data type: boolean type analyzer, double type analyzer, integer type analyzer, string type analyzer, object type analyzer, array type analyzer, null type analyzer. Each subtype analyzer is used to obtain node information and compare and judge with node definition information. After processing by the analyzer, the unique position of each node in the json data structure and all analysis index items of the node can be obtained. The analysis index items of the Boolean type analyzer include limited true, limited false, and unlimited. The analyzer structure is shown in Figure 4; the double type supports limited decimal places, and the index items include whether to limit the number of decimal places, the value of decimal places, and regular expressions formula, compare the actual returned results with these indicators in the definition, and give detailed information if they do not match; the analyzer structure is shown in Figure 5; the integer type supports greater than zero, less than zero, equal to zero, unlimited, and several regular expressions Item indicators, compare the actual returned results with these indicators in the definition, and give detailed information if they do not match; the analyzer structure is shown in Figure 6; the string type supports analysis of custom regular rules and whether it is empty; the object type analyzer Continue to distribute to other types of analyzers according to the type of sub-items. The analyzer structure is shown in Figure 7, and the analysis indicators are whether it is empty; the array type analyzer analyzes indicators to determine whether it is empty, the number of items, and each sub-item Distributed to the object type analyzer to continue analysis, the structure of the analyzer is shown in Figure 8. Various types of analysis indicators can be added freely and are not limited by the specific indicators in this example.

校验对比单元利用以上步骤中保存的接口定义信息对象,先将该对象转换成数组类型,对数组元素进行遍历,因为每个元素的定义结果都是以它本身的唯一位置为键值保存的,所以可根据此位置在实际的接口参数中快速定位寻找:The verification and comparison unit uses the interface definition information object saved in the above steps, first converts the object into an array type, and traverses the array elements, because the definition result of each element is saved with its unique position as the key value , so you can quickly locate and find it in the actual interface parameters according to this position:

1.根据字段在定义中是否“必须含有”,“必须含有”的字段而在实际返回中未找到,则直接抛出异常,存在则继续往下判断;1. According to whether the field is "must contain" in the definition, if the "must contain" field is not found in the actual return, an exception will be thrown directly, and if it exists, continue to judge;

2.判断目标字段与定义中的类型信息是否匹配,如不匹配也直接抛出异常,类型匹配则继续往下判断;2. Determine whether the target field matches the type information in the definition. If it does not match, an exception will be thrown directly. If the type matches, continue to judge;

以下举例说明分析引擎中分配器、各类型分析器的具体处理流程,流程图如图9所示。The following examples illustrate the specific processing flow of the allocator and various types of analyzers in the analysis engine, and the flow chart is shown in FIG. 9 .

假设入参、出参的json格式的数据结构如下:Assume that the data structure of the input and output parameters in json format is as follows:

{{

"productId":210122643,"productId": 210122643,

"canSell":true,"canSell": true,

"price":123.69,"price": 123.69,

"adultQuantity" :2, "adultQuantity" : 2,

"childQuantity" : 1, "childQuantity" : 1,

"segmentList":[ "segmentList":[

{ {

"dCityCode" : "2500", "dCityCode" : "2500",

"aCityCode" : "785095" , "aCityCode" : "785095" ,

"departDate" : "2016-08-30" "departDate" : "2016-08-30"

} }

], ],

"flightSessionId":"3c1018c7094329800162a6ad2f4833a3", "flightSessionId":"3c1018c7094329800162a6ad2f4833a3",

} }

该参数中含有integer、double、array、object和string类型,分配器获取当前节点类型,根据不同类型分流到各自类型分析器中进行处理;This parameter contains integer, double, array, object and string types, and the allocator obtains the current node type, and divides them into respective type analyzers for processing according to different types;

我们以Object类型分析器为例,其内部处理流程具体如下:Let's take the Object type analyzer as an example, and its internal processing flow is as follows:

a)获取当前节点键值和类型(根节点键值为空,可设置一个初始化值)作为object类型的原始分析结果,以节点位置为键值压入“节点分析堆栈”中如图⑤;a) Obtain the key value and type of the current node (the key value of the root node is empty, and an initialization value can be set) as the original analysis result of the object type, and push it into the "node analysis stack" with the node position as the key value, as shown in Figure ⑤;

b)以当前节点为id,并计算当前节点在表单展现偏左的距离位置,根节点初始化偏左距离可为0,子元素偏左距离每一层往下递增,具体递增幅度可自由设定,生成节点表单html代码,也以节点位置为键值压入“表单元素堆栈”中如图④;b) Use the current node as the id, and calculate the distance to the left of the current node in the form. The initial left distance of the root node can be 0, and the left distance of the child elements increases downwards for each layer. The specific increment can be set freely , generate the HTML code of the node form, and push it into the "form element stack" with the node position as the key value, as shown in Figure ④;

c)Object类型作为复合类型,在进行往下遍历之前,先将对象属性转换成数组元素;c) The Object type is a composite type, before traversing down, first convert the object properties into array elements;

d)遍历中获取每个子元素的偏左距离,每往里一层便递增一次,同一层中的节点偏左距离相等;结合父元素和子元素的键值获取每个子节点在整个数据结构中的唯一位置;将这些信息连同子元素本身带入分配器②中重新分流处理;d) Obtain the left distance of each child element during traversal, which is incremented for each layer, and the left distance of nodes in the same layer is equal; combine the key values of the parent element and the child element to obtain the value of each child node in the entire data structure Unique location; bring these information together with the sub-element itself into the allocator ② for re-distribution processing;

e)待子元素全部分析处理完毕,需要对object类型的表单元素进行收尾,压入一个冗余的尾部表单节点元素到“表单元素堆栈”中,该对象属性信息和b)步奏中基本类似,只是展现内容不一样,在object类型节点中的所有子元素在表单呈现上能呈现一个归属整体的效果;e) After all the sub-elements are analyzed and processed, it is necessary to finish the form element of object type, and push a redundant tail form node element into the "form element stack". The object attribute information is basically similar to that in step b) , but the display content is different. All sub-elements in the object type node can present an overall effect in the form presentation;

integer类型分析器、string类型分析器、boolean类型分析器、double类型分析、object类型分析器、null类型分析器对于这些标量节点的分析具体处理步骤与object类型分析中的a、b步骤相同:Integer type analyzer, string type analyzer, boolean type analyzer, double type analyzer, object type analyzer, and null type analyzer analyze these scalar nodes. The specific processing steps are the same as steps a and b in object type analysis:

a)获取当前节点键值和类型(根节点键值为空,可设置一个初始化值)作为object类型的原始分析结果,以节点位置为为键值压入节点分析堆栈;a) Obtain the current node key value and type (the key value of the root node is empty, and an initialization value can be set) as the original analysis result of the object type, and push the node analysis stack with the node position as the key value;

b)以当前节点为id,并计算当前节点在表单展现偏左的距离位置,根节点初始化偏左距离可为0,生成节点表单html代码,也以节点位置为键值压入表单元素堆栈中;b) Take the current node as the id, and calculate the distance to the left of the current node in the form. The initial left distance of the root node can be 0, generate the HTML code of the node form, and push it into the form element stack with the node position as the key value ;

array类型分析器的处理流程同object类型的a、b、d、e步骤,只是中间省略步奏c,因其本身即为array类型无需转换。The processing flow of the array type analyzer is the same as the steps a, b, d, and e of the object type, except that step c is omitted in the middle, because it is an array type and does not need to be converted.

在一次接口分析过程中,利用所有节点压入的表单元素堆栈能够生成UI表单,供用户操作编辑更新节点属性信息,将用户自定义信息维护到节点分析堆栈中,将最终的各个节点的定义信息入库。During an interface analysis process, the UI form can be generated by using the stack of form elements pushed by all nodes, for users to operate, edit and update node attribute information, maintain user-defined information into the node analysis stack, and upload the final definition information of each node storage.

分析引擎主要应用在两个地方,一是在表单UI生成器中,接收录入的入参、出参分析各字段属性信息用于初始化表单结构;二是在验证测试接口时,对实际请求接口的入参、出参各字段结构和值进行分析,并与接口定义信息进行比较,将结果格式化导出,并将异常信息通过消息系统周知接口关联人。The analysis engine is mainly used in two places. One is in the form UI generator, receiving input and output parameters and analyzing the property information of each field to initialize the form structure; the other is when verifying the test interface, the actual request interface The structure and value of each field of the input parameter and output parameter are analyzed, and compared with the interface definition information, the result is formatted and exported, and the abnormal information is notified to the interface related person through the message system.

消息通知模块功能流程如图10,其主要用于实现两种功能——异常通知功能和变更通知功能。异常通知功能是当接口订阅者检验分析接口时发现问题或异常实时通知生产者和订阅者;当用户以使用者角色进入系统,需要分析检测某个接口时,由分析引擎对测试桩入参和接口实际返回的出参进行分析,将分析结果与之前维护的接口定义进行比较,如发现异常,则通知消息模块,消息模块通过查询对应接口的生产者信息,通过邮件或短信的方式及时告知生产者异常明细,当生产者处理完毕时又重新反馈周知到订阅者。这里当检测发现异常时同时将对应接口和异常插入待处理列表中,由系统脚本定期检测异常清单,发现超过一定期限未处理的接口,则由消息模块通过查询组织结构信息,获取生产者所在部门经理或上级信息,将异常信息告知经理及时处理。The functional flow of the message notification module is shown in Figure 10, which is mainly used to realize two functions——abnormal notification function and change notification function. The exception notification function is to notify producers and subscribers in real time when an interface subscriber finds a problem or anomaly when checking and analyzing the interface; when a user enters the system as a user and needs to analyze and detect a certain interface, the analysis engine will input parameters to the test pile Analyze the output parameters actually returned by the interface, and compare the analysis results with the previously maintained interface definition. If an exception is found, the message module will be notified. The message module will query the producer information of the corresponding interface and notify the production in time by email or SMS. The exception is detailed, and when the producer finishes processing, it will feedback to the subscriber again. Here, when an exception is detected, the corresponding interface and exception are inserted into the pending list at the same time. The system script periodically detects the exception list, and if an unprocessed interface is found beyond a certain period of time, the message module obtains the department of the producer by querying the organizational structure information. Manager or superior information, inform the manager of abnormal information and deal with it in time.

本发明还进一步利用系统定时器Crontab工具实现定期检查接口问题处理进度,超过一定时限未跟进处理的接口,则由系统直接通知该接口生产者的直属上级,跟进尽快解决。The present invention further uses the system timer Crontab tool to regularly check the processing progress of the interface problem. If the interface has not been followed up and processed beyond a certain time limit, the system will directly notify the immediate superior of the interface producer to follow up and solve it as soon as possible.

变更通知功能是生产者对接口定义信息进行变更时,系统可自动将变更信息邮件通知各使用方。当接口生产者由于业务需要对接口定义信息进行变更时,系统会自动分析出变更明细信息,将变更信息和对应的唯一接口名传入消息系统,消息模块通过接口名查询该接口订阅者信息(主要是联系方式),将变更明细信息通过邮件的方式周知所有订阅者,并自动生成最新的接口定义文档方面用户查阅。The change notification function is that when the producer changes the interface definition information, the system can automatically notify the users of the change information by email. When the interface producer changes the interface definition information due to business needs, the system will automatically analyze the change details, and pass the change information and the corresponding unique interface name to the message system, and the message module will query the interface subscriber information through the interface name ( Mainly contact information), notify all subscribers of the detailed information of the change by email, and automatically generate the latest interface definition document for user reference.

本发明方案所公开的技术手段不仅限于上述实施方式所公开的技术手段,还包括由以上技术特征任意组合所组成的技术方案。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。The technical means disclosed in the solutions of the present invention are not limited to the technical means disclosed in the above embodiments, but also include technical solutions composed of any combination of the above technical features. It should be pointed out that for those skilled in the art, some improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also regarded as the protection scope of the present invention.

Claims (8)

1.一种基于角色的接口综合性管理系统,其特征在于,包括:用户角色管理模块、接口信息的录入与维护模块、表单UI生成器、验证测试模块、分析引擎、消息通知模块,所述用户角色管理模块用于管理用户信息并对用户登录进行认证;所述接口信息录入与维护模块用于对每个接口的基本属性、入参和出参等信息进行入库和管理;所述使用者角色的验证测试模块用于根据当前入参请求指定环境接口,经过分析引擎分析后导出详细的分析测试结果,如有异常则利用消息通知模块自动通知关联人;消息通知模块用于实现接口异常通知功能和变更通知功能;1. A role-based interface comprehensive management system is characterized in that, comprising: user role management module, interface information entry and maintenance module, form UI generator, verification test module, analysis engine, message notification module, said The user role management module is used to manage user information and authenticate user login; the interface information input and maintenance module is used to store and manage information such as basic attributes, input parameters and output parameters of each interface; the use The verification test module of the role of the author is used to specify the environment interface according to the current input request, and export the detailed analysis and test results after analysis by the analysis engine. If there is an exception, the message notification module will be used to automatically notify the associated person; the message notification module is used to realize interface exceptions notification function and change notification function; 所述接口信息录入与维护模块The interface information entry and maintenance module 用于输入和修改接口基本信息、入参、出参和测试桩,并进行保存,It is used to input and modify the basic information of the interface, input parameters, output parameters and test stubs, and save them. 用于调用表单UI生成器根据入参和出参生成所有节点定义表单,入参或出参中每个字段当做一个节点:利用表单UI生成器,支持用户手工添加节点,定义节点属性信息的方式维护接口定义信息;或通过入参或出参的json数据结构,调用分析引擎得到节点分析指标项,以及节点位置信息,并自动生成所有节点定义表单;It is used to call the form UI generator to generate all node definition forms according to the input parameters and output parameters. Each field in the input parameters or output parameters is regarded as a node: the form UI generator supports users to manually add nodes and define node attribute information Maintain interface definition information; or call the analysis engine to obtain node analysis index items and node location information through the json data structure of input or output parameters, and automatically generate all node definition forms; 所述分析引擎包括分配器、各个子类型分析器和校验对比单元,所述分配器用于对参数进行解析,使json数据中的“对象”类型能原样输出为object类型而非array类型,在数据解析过程中保证类型信息不丢失,获得经过解析的对象的各个属性类型,根据类型的不同分发到各自的分析器中;所述各子类型分析器用于获取节点信息,获得每个节点在json数据结构中的唯一位置和该节点的所有分析指标项;所述校验对比单元用于将分析结果与之前保存的关于该接口的定义信息进行对比;The analysis engine includes an allocator, each subtype analyzer and a check comparison unit, and the allocator is used for parsing parameters so that the "object" type in the json data can be output as the object type instead of the array type as it is. During the data parsing process, the type information is guaranteed not to be lost, and each attribute type of the parsed object is obtained, and distributed to respective analyzers according to the type; the subtype analyzers are used to obtain node information, and obtain each node in json The unique position in the data structure and all analysis index items of the node; the verification and comparison unit is used to compare the analysis result with the previously saved definition information about the interface; 所述验证测试模块包括测试单元和订阅单元,测试单元用于将当前入参请求指定环境接口,经过分析引擎分析,导出详细的分析测试结果,如有异常则通过消息通知模块自动周知关联人,所述订阅单元将使用方感兴趣的接口记录与用户进行关联,订阅成功后,当接口定义发生变更或测试发现异常可及时通知关联用户。The verification test module includes a test unit and a subscription unit. The test unit is used to specify an environment interface for the current input request, and after analysis by the analysis engine, the detailed analysis and test results are exported. If there is any abnormality, the associated person will be automatically notified through the message notification module. The subscription unit associates the interface records that the user is interested in with the user, and after the subscription is successful, the associated user can be notified in time when the interface definition changes or an abnormality is found in the test. 2.根据权利要求1所述的基于角色的接口综合性管理系统,其特征在于:所述用户角色管理模块包括系统自管单元和第三方用户管理单元,所述系统自管单元由本系统自己实现用户的注册、登录、组织结构等信息的录入与维护,所述第三方用户管理单元用于调用第三方用户管理模块进行用户权限认证、用户和组织结构基本信息的获取。2. The role-based interface comprehensive management system according to claim 1, characterized in that: the user role management module includes a system self-management unit and a third-party user management unit, and the system self-management unit is realized by the system itself For the entry and maintenance of information such as user registration, login, and organizational structure, the third-party user management unit is used to call the third-party user management module to perform user authority authentication and obtain basic information on users and organizational structures. 3.根据权利要求1所述的基于角色的接口综合性管理系统,其特征在于:所述节点类型分为三类:根节点、标量节点和非标量节点,非标量节点支持添加子节点、删除本节点、节点属性维护、子节点展开和收起。3. The role-based interface comprehensive management system according to claim 1, characterized in that: the node types are divided into three categories: root nodes, scalar nodes and non-scalar nodes, and non-scalar nodes support adding child nodes, deleting This node, node attribute maintenance, sub-node expansion and collapse. 4.根据权利要求3所述的基于角色的接口综合性管理系统,其特征在于:所述每个节点的html结构均为动态浮动型,支持无限扩展。4. The role-based interface comprehensive management system according to claim 3, characterized in that: the html structure of each node is a dynamic floating type, which supports unlimited expansion. 5.根据权利要求1所述的基于角色的接口综合性管理系统,其特征在于:所述分配器解析时利用php语言中的json_decode ( string $json [, bool $assoc = false])方法对参数进行解析,保留该方法的第二位参数$assoc为false,使json数据中的对象类型能原样输出为object类型而非array类型。5. The role-based interface comprehensive management system according to claim 1, characterized in that: the json_decode (string $json [, bool $assoc=false]) method in the php language is used for parameter analysis when the allocator analyzes For parsing, keep the second parameter $assoc of this method as false, so that the object type in the json data can be output as the object type instead of the array type. 6.根据权利要求5所述的基于角色的接口综合性管理系统,其特征在于:所述分配器将经过解析的object对象通过get_object_vars方法将对象属性转换成关联数组,再继续通过遍历,使用gettype方法获取各个属性类型,根据类型的不同分发到各自的分析器中。6. The role-based interface comprehensive management system according to claim 5, characterized in that: the allocator converts the parsed object object into an associative array through the get_object_vars method, and then continues through traversal, using gettype The method obtains each attribute type and distributes it to the respective analyzers according to the type. 7.根据权利要求1或5所述的基于角色的接口综合性管理系统,其特征在于:所述子类型分析器包括:boolean类型分析器、double类型分析、integer类型分析器、string类型分析器、object类型分析器、array类型分析器、null类型分析器。7. The role-based interface comprehensive management system according to claim 1 or 5, characterized in that: the subtype analyzers include: boolean type analyzers, double type analyzers, integer type analyzers, string type analyzers , object type analyzer, array type analyzer, null type analyzer. 8.根据权利要求1所述的基于角色的接口综合性管理系统,其特征在于:所述验证测试模块还包括所述列表检索单元,列表检索单元根据接口关键字或所属部门信息检索出目标接口。8. The role-based interface comprehensive management system according to claim 1, characterized in that: the verification test module also includes the list retrieval unit, and the list retrieval unit retrieves the target interface according to the interface keyword or the department information .
CN201610875057.5A 2016-09-30 2016-09-30 A kind of interface synthesis management system of based role Active CN106445824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610875057.5A CN106445824B (en) 2016-09-30 2016-09-30 A kind of interface synthesis management system of based role

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610875057.5A CN106445824B (en) 2016-09-30 2016-09-30 A kind of interface synthesis management system of based role

Publications (2)

Publication Number Publication Date
CN106445824A true CN106445824A (en) 2017-02-22
CN106445824B CN106445824B (en) 2019-06-25

Family

ID=58172850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610875057.5A Active CN106445824B (en) 2016-09-30 2016-09-30 A kind of interface synthesis management system of based role

Country Status (1)

Country Link
CN (1) CN106445824B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168871A (en) * 2017-04-28 2017-09-15 安徽四创电子股份有限公司 A kind of method of the fast debugging in RESTful interface exploitations
CN107832592A (en) * 2017-10-30 2018-03-23 北京小米移动软件有限公司 Right management method, device and storage medium
CN110472391A (en) * 2019-08-21 2019-11-19 北京明略软件系统有限公司 Data access method and device, storage medium, electronic device
CN112416419A (en) * 2020-11-16 2021-02-26 北京五八信息技术有限公司 Data processing method and device
CN114722425A (en) * 2022-04-01 2022-07-08 北京明略昭辉科技有限公司 Interface management method, device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101689111A (en) * 2007-04-03 2010-03-31 Ldra技术公司 The automatic management of software requirements verification
CN101794226A (en) * 2010-03-08 2010-08-04 山东大学 Service software construction method and system adapting to multiple business abstraction levels
CN102331970A (en) * 2011-07-28 2012-01-25 北京航空航天大学 Automated test resource management method and platform for security-critical systems
CN102411540A (en) * 2012-01-12 2012-04-11 王轶辰 Workflow-based automatic management system for general software testing process
CN102495799A (en) * 2011-12-02 2012-06-13 刘伟 Automatic test system and method of movable terminal
CN102567204A (en) * 2011-12-28 2012-07-11 云海创想信息技术(无锡)有限公司 Method for managing automatic testing data
CN104601403A (en) * 2015-01-07 2015-05-06 上海瀚之友信息技术服务有限公司 Automatic test system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101689111A (en) * 2007-04-03 2010-03-31 Ldra技术公司 The automatic management of software requirements verification
CN101794226A (en) * 2010-03-08 2010-08-04 山东大学 Service software construction method and system adapting to multiple business abstraction levels
CN102331970A (en) * 2011-07-28 2012-01-25 北京航空航天大学 Automated test resource management method and platform for security-critical systems
CN102495799A (en) * 2011-12-02 2012-06-13 刘伟 Automatic test system and method of movable terminal
CN102567204A (en) * 2011-12-28 2012-07-11 云海创想信息技术(无锡)有限公司 Method for managing automatic testing data
CN102411540A (en) * 2012-01-12 2012-04-11 王轶辰 Workflow-based automatic management system for general software testing process
CN104601403A (en) * 2015-01-07 2015-05-06 上海瀚之友信息技术服务有限公司 Automatic test system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
MICHAEL_JIA: "《https://www.jianshu.com/p/4076b9bc2d36》", 26 August 2015 *
有赞: "《https://tech.youzan.com/layers_test_automation_practice/》", 29 April 2016 *
江屿: ""基于Junit的接口测试框架的设计与实现"", 《中国优秀硕士学位论文全文数据库·信息科技辑》 *
沈建征: ""自动化测试管理工具的开发与实现"", 《中国优秀硕士学位论文全文数据库•信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168871A (en) * 2017-04-28 2017-09-15 安徽四创电子股份有限公司 A kind of method of the fast debugging in RESTful interface exploitations
CN107832592A (en) * 2017-10-30 2018-03-23 北京小米移动软件有限公司 Right management method, device and storage medium
CN110472391A (en) * 2019-08-21 2019-11-19 北京明略软件系统有限公司 Data access method and device, storage medium, electronic device
CN112416419A (en) * 2020-11-16 2021-02-26 北京五八信息技术有限公司 Data processing method and device
CN112416419B (en) * 2020-11-16 2024-09-13 北京五八信息技术有限公司 Data processing method and device
CN114722425A (en) * 2022-04-01 2022-07-08 北京明略昭辉科技有限公司 Interface management method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106445824B (en) 2019-06-25

Similar Documents

Publication Publication Date Title
CN115017182B (en) Visual data analysis method and device
US11238033B1 (en) Interactive location queries for raw machine data
CN104866426B (en) Software test integrated control method and system
WO2024230117A1 (en) Question answering method and apparatus, and electronic device, computer-readable storage medium and computer program product
US20150081701A1 (en) Systems and methods for data flow exploration
US11620541B1 (en) Custom use case framework in computer analytics system
CN103268226B (en) A kind of test script file generates method and device
US8417690B2 (en) Automatically avoiding unconstrained cartesian product joins
CN104123227A (en) Method for automatically generating testing cases
CN106445824B (en) A kind of interface synthesis management system of based role
US10986020B2 (en) Reconstructing message flows based on hash values
US12248455B1 (en) Systems and methods for generic data parsing applications
CN115617776A (en) A data management system and method
CN104036365A (en) Method for constructing enterprise-level data service platform
CN107992519A (en) The multi-source heterogeneous data verification system and method for a kind of smart grid-oriented big data
CN104573053B (en) An XML-based method for dynamic customization of configuration item templates
CN108108466A (en) Distributed system log query analysis method and device
US12321583B1 (en) Systems and methods for artificial intelligence (AI)-driven data mapping user-interface (UI) generation
CN117667065B (en) A low-code application configuration platform
CN117312331B (en) Metadata bloodline analysis method, device, equipment and storage medium
CN104978405A (en) Human error data processing method ans system
CN111259082A (en) Method for realizing full data synchronization in big data environment
CN121441793A (en) Interface verification and testing methods, equipment, media, and products based on large models
CN112199075B (en) Intelligent information processing method and framework system based on micro-service
CN103593188B (en) System and method for managing what-you-see-is-what-you-get menus of instrument

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant