WO2017092391A1 - Middle-tier database virtual control and testing method and system utilizing same - Google Patents

Middle-tier database virtual control and testing method and system utilizing same Download PDF

Info

Publication number
WO2017092391A1
WO2017092391A1 PCT/CN2016/092814 CN2016092814W WO2017092391A1 WO 2017092391 A1 WO2017092391 A1 WO 2017092391A1 CN 2016092814 W CN2016092814 W CN 2016092814W WO 2017092391 A1 WO2017092391 A1 WO 2017092391A1
Authority
WO
WIPO (PCT)
Prior art keywords
intermediate library
interface
trigger condition
virtual terminal
tested
Prior art date
Application number
PCT/CN2016/092814
Other languages
French (fr)
Chinese (zh)
Inventor
王招弟
Original Assignee
福建联迪商用设备有限公司
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 福建联迪商用设备有限公司 filed Critical 福建联迪商用设备有限公司
Publication of WO2017092391A1 publication Critical patent/WO2017092391A1/en

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
    • 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

Definitions

  • the invention relates to the field of intermediate library port testing, in particular to an intermediate library virtual control testing method and a system thereof.
  • an upper layer application (generally an application APP) implements interaction with a communication layer (terminal) by directly writing code or by calling an API interface (application programming port) of the intermediate library, and the upper layer application is stored in the intermediate library.
  • the middle library encapsulates the lower intermediate library into a nested package, and only provides a visible API interface for the upper application to call.
  • the function of the intermediate library API interface is normal, can only be judged by the result of the data processing and the response on the upper layer application through the interface. If the function of the API interface is abnormal, no matter what data is returned by the terminal, the displayed data on the upper layer application is Will be abnormal.
  • most of the plugging methods are used to implement functions such as interface isolation, completion, and control of the API interface, that is, directly controlling the output of the upper application.
  • the instrumentation method directly writes the instrumentation code in the intermediate library, and controls the result returned to the API interface by the instrumentation code.
  • the technical problem to be solved by the present invention is to provide an intermediate library virtual control test method and a system thereof, which are implemented according to a preset business logic trigger condition, thereby realizing a simple and efficient functional test of the test interface, and the test mode reusability. High and in line with the actual usage scenarios.
  • the technical solution adopted by the present invention is:
  • Provide an intermediate library virtual control test method including:
  • the virtual terminal stores the business logic trigger condition and returns the stored result to the intermediate library
  • the intermediate library calls the interface to be tested
  • the virtual terminal identifies the interface to be tested, and returns the service logic trigger condition to the intermediate library;
  • the intermediate library performs business logic processing according to the business logic trigger condition, and outputs the processing result.
  • An intermediate library virtual control test system comprising:
  • a preset module for presetting a service logic trigger condition
  • a first sending module configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library
  • a storage module configured to store, by the virtual terminal, the service logic trigger condition
  • a first returning module configured to: return, by the virtual terminal, the storage result to the intermediate library
  • An identification module configured to identify, by the virtual terminal, the interface to be tested
  • a second returning module configured to: return, by the virtual terminal, the service logic trigger condition to an intermediate library
  • the processing module is configured to perform business logic processing according to the business logic trigger condition and output the processing result.
  • the invention has the beneficial effects that the present invention simulates the actual interaction process between the terminal and the intermediate library by establishing a virtual terminal, and gets rid of the requirement of the real test environment; the service logic trigger condition corresponding to the interface to be tested is preset, and is stored in the virtual terminal.
  • the device can be configured to identify the type of the interface, and when the intermediate library calls the interface to be tested, the virtual terminal is returned to the interface to be tested, and the interface to be tested is processed according to the preset business logic trigger condition, and then the corresponding service logic is processed. Test whether the function of the interface is normal, and then verify whether the various processing of the intermediate library API is normal.
  • the testing process of the invention is simple, efficient, highly reusable, and conforms to the actual use scenario.
  • FIG. 1 is a schematic flow chart of a method for testing an intermediate library virtual control according to the present invention
  • FIG. 2 is a schematic flowchart of a method for testing an intermediate library virtual control according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an intermediate library virtual control test system according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an intermediate library virtual control test system according to Embodiment 2 of the present invention.
  • Preset module 2. First sending module; 3. Storage module; 4. First return module;
  • the most critical idea of the present invention is to parse the type of the identification interface when the interface is invoked, and to preset the service logic trigger condition of the interface to be tested through the transparent communication interface, and control the return service logic trigger condition when the analysis is recognized as the interface to be tested, and simulate the middle.
  • the actual interaction process between the library and the terminal implements the comprehensive coverage test of the intermediate library interface.
  • the present invention provides an intermediate library virtual control test method, including:
  • the virtual terminal stores the business logic trigger condition and returns the stored result to the intermediate library
  • the intermediate library calls the interface to be tested
  • the virtual terminal identifies the interface to be tested, and returns the service logic trigger condition to the intermediate library;
  • the intermediate library performs business logic processing according to the business logic trigger condition, and outputs the processing result.
  • the present invention has the following advantages: (1) using the control intermediate library interactive peer return mode test, which is the same as the real use scenario of the intermediate library. (2) Only special interface auxiliary test is implanted in the intermediate library, no other modifications are made to the test object to ensure the integrity of the test object; (3) the virtual terminal can return the content in turn, and the implementation method is simple and efficient; (4) using the terminal
  • the virtual control method is not limited by the intermediate library coding language. As long as the interface calls the lower intermediate library in the same order, the test script can be directly reused and has high reusability.
  • the method further includes:
  • the intermediate library verifies the processing result according to the business logic function of the interface to be tested.
  • the interface to be tested performs corresponding processing according to the service logic trigger condition returned by the virtual terminal, and after the processing result is obtained, the intermediate library verifies the correctness of the processing result according to the function of the interface to be tested, and then verifies the test to be tested. Whether the interface is normal.
  • the method further includes:
  • the intermediate library receives a call instruction corresponding to an interface
  • Parsing the call instruction if it is a transparent communication interface, performing the step of transmitting the service logic trigger condition to the virtual terminal through the transparent communication interface of the intermediate library.
  • the intermediate library can parse and judge that the upper layer application invokes the interface type, and sends the service logic trigger condition to the virtual terminal by using the transparent communication interface, as a return when the corresponding function interface is called.
  • the “virtual terminal identifies the interface to be tested” is specifically:
  • the interface to be detected sends a request to process the service data to the virtual terminal
  • the virtual terminal receives the request processing service data and identifies it as an interface to be tested.
  • the virtual terminal can determine the interface type invoked by the intermediate library according to the sent data parsing, so as to perform corresponding processing.
  • the “intermediate library performs business logic processing according to the business logic trigger condition, and the output processing result” is specifically:
  • the intermediate library calls the interface to be tested to perform business logic processing according to the received business logic trigger condition, and outputs the processing result to the upper layer application.
  • the intermediate library receives the business logic trigger condition and stores it in the nested intermediate library; the inbound intermediate library calls the test interface to perform business logic processing according to the business logic trigger condition.
  • the intermediate library virtual control test method of the present invention only needs to modify the configuration of the intermediate library and configure a virtual terminal with simple functions, and can realize the middle of the middle by controlling the return content of the virtual terminal when the intermediate library calls the function interface.
  • the functional test of the library function interface, the test process is simple, efficient, and highly reusable, in line with the real use scenario, and the obtained test result has high precision.
  • An intermediate library virtual control test system comprising:
  • a first sending module 2 configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library
  • the storage module 3 is configured to store, by the virtual terminal, the service logic triggering condition
  • a first returning module 4 configured to: return, by the virtual terminal, the storage result to the intermediate library
  • the identification module 6 is configured to identify the interface to be tested by the virtual terminal
  • a second returning module 7 is configured to: return, by the virtual terminal, the service logic triggering condition to an intermediate library;
  • the processing module 8 is configured to perform, by the intermediate library, the business logic processing according to the business logic trigger condition, and output the processing result.
  • the verification module 9 is further configured to verify, by the intermediate library, the processing result according to the service logic function of the interface to be tested.
  • the receiving module 10 is configured to receive, by the intermediate library, a call instruction corresponding to an interface
  • a first parsing module configured to parse the calling instruction to obtain a first parsing result
  • the first sending module 2 is configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library when the first parsing result is a transparent communication interface.
  • the intermediate library includes a nested intermediate library, and the identification module includes a sending unit and a receiving unit;
  • the sending unit is configured to send a request to process the service data to the virtual terminal
  • the receiving unit is configured to receive, by the virtual terminal, the request processing service data, and identify the interface to be tested;
  • the processing module 8 is specifically configured to: the intermediate library calls the interface to be tested to perform business logic processing according to the received service logic trigger condition, and outputs the processing result to the upper layer application;
  • the nested intermediate library is configured to store the service logic trigger condition received by the intermediate library, and invoke the interface to be tested to perform business logic processing according to the service logic trigger condition.
  • a first embodiment of the present invention is:
  • An intermediate library virtual control test method is provided.
  • the controller and the parser are embedded in the test object intermediate library, and the type of the interface is recognized by the parser, and the nested API of the intermediate library is controlled by the content returned by the controller virtual terminal. Return to verify that the function of the intermediate library API interface is normal.
  • the first parser and the first controller are configured in the intermediate library, and are received by the first parser after receiving the external interface call;
  • the first controller controls the transmission of the carrying data (corresponding to the service logic trigger condition of the function interface B to be tested) through the transparent communication interface A to the terminal (the intermediate library Interactive peer).
  • the second parser and the second controller are added, and when the data sent by the interface is received, the parsing process is performed by the second parser;
  • the second controller controls the terminal to store the data sent by the transparent communication interface A, that is, the service logic triggering condition corresponding to the function interface B to be tested. As a subsequent virtual return data.
  • the upper application layer sends an instruction to invoke the interface B to be tested to the intermediate library
  • the intermediate library receives the call instruction corresponding to the interface B to be tested; uses the first parser to parse the interface type corresponding to the call instruction, and invokes the corresponding interface B to be tested through the first controller, and the interface B to be tested is based on its function. Sending a corresponding request to process the service data to the terminal;
  • the terminal After receiving the request processing service data, the terminal parses and recognizes that it is not a special transparent communication interface A through the second parser, and is a function interface B to be tested; and calls the second controller to control the terminal to return to the pre-stored
  • the business logic triggers conditions to the intermediate library
  • the first parser After the intermediate library receives the trigger condition of the service logic, the first parser identifies that the return of the interface B to be tested, and the second controller sends the service logic trigger condition to the nested intermediate library layer;
  • the nested intermediate library layer receives the service data returned by the second controller, and returns to the function interface B of the intermediate library (test object) after processing, and then returns the processing result to the upper layer application through the function interface B;
  • the second embodiment of the present invention is:
  • An intermediate library virtual control test system includes an upper layer application, an intermediate library and a terminal; the intermediate library is configured with a nested intermediate library, a preset module 1, a first sending module 2, a calling module 5, and a processing module 8.
  • the terminal is configured with a storage module 3, a first return module 4, an identification module 6, a second return module 7, and a verification module 9, and the identification module 6 includes a sending unit and a receiving unit;
  • the preset module 1 is configured to preset a service logic trigger condition
  • the receiving module 10 is configured to receive, by the intermediate library, a call instruction corresponding to an interface
  • the first parsing module is configured to parse the calling instruction to obtain a first parsing result
  • the first sending module 2 is configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library;
  • the calling module 5 is configured to invoke an interface to be tested by the intermediate library
  • the processing module 8 is configured to perform, by the intermediate library, the business logic processing according to the business logic trigger condition, and output the processing result.
  • the storage module 3 is configured to store, by the virtual terminal, the service logic trigger condition
  • the first returning module 4 is configured to return, by the virtual terminal, the storage result to the intermediate library
  • the identification module 6 is configured to identify the interface to be tested by the virtual terminal. Specifically, the sending unit is configured to send a request to process the service data to the virtual terminal, and the receiving unit is configured to receive the virtual terminal.
  • the request processing service data is identified as an interface to be tested;
  • the second returning module 7 is configured to: return, by the virtual terminal, the service logic triggering condition to the intermediate library;
  • the verification module 9 is configured to verify the processing result according to the service logic function of the interface to be tested.
  • the third embodiment of the present invention is:
  • the business function implemented by the loginTran interface is to initiate a check-in transaction; when the internal logic processing of the interface is that the upper-layer application calls the interface, the intermediate library first determines the state of the terminal. For example, when the terminal returns the parameter is not downloaded, the intermediate library performs a business logic processing response ( Initiate a parameter download request).
  • the upper layer application invokes the preset communication interface A, and sets the service trigger condition of the terminal preset “parameter not downloaded state”;
  • the terminal identifies the preset communication interface A, and stores the preset service triggering condition
  • the upper application calls the loginTran interface (test object B interface), and the intermediate library sends the service data to the terminal;
  • the terminal identification is a function test interface, and returns the stored preset service processing condition data (the parameter is not downloaded);
  • the nested intermediate library receives the data, and sends the data to the intermediate library after performing the business judgment processing;
  • the intermediate library returns according to the nested intermediate library interface, and performs service judgment processing (determining that the terminal status is that the parameter is not downloaded, then the parameter downloading process is performed);
  • the intermediate library After verifying that the loginTran interface is called, the intermediate library has normal parameter downloading, which conforms to the interface business logic processing, and the functional interface test passes.
  • the intermediate library virtual control test method and system thereof provided by the present invention are not only identical to the actual use scenario, but also have authenticity, and only need to configure the intermediate library, the change is small, and the integrity of the test object is guaranteed. Further, the content returned by the virtual terminal is configured only once, and the testing process is simple and efficient. Finally, the implementation of the present invention uses the virtual terminal control method, and the test script can be repeatedly used, and the reusability is high.

Abstract

A middle-tier database virtual control and testing method and system utilizing the same. The method comprises: preconfiguring a service logic trigger condition; transmitting, via a transmitting communication interface of a middle-tier database, the service logic trigger condition to a virtual terminal; storing, by the virtual terminal, the service logic trigger condition, and returning, by the virtual terminal, a storage result to the middle-tier database; calling, by the middle-tier database, an interface to be tested; identifying, by the virtual terminal, the interface to be tested, and returning, by the virtual terminal, the service logic trigger condition to the middle-tier database; performing, by the middle-tier database, according to the service logic trigger condition, service logic processing, and outputting, by the middle-tier database, a processing result. The method and system provide a scenario identical to a real application scenario, thus having realism, and only require making a small change to the middle-tier database configuration, ensuring integrity of the object to be tested. Further, content returned by the virtual terminal is only configured once, and the testing procedure is simple and efficient. The implementations of the method and system adopt a virtual terminal control method, thus a testing script can be reused, having high reusability.

Description

一种中间库虚拟控制测试方法及其系统Intermediate library virtual control test method and system thereof 技术领域Technical field
本发明涉及中间库端口测试领域,具体说的是一种中间库虚拟控制测试方法及其系统。The invention relates to the field of intermediate library port testing, in particular to an intermediate library virtual control testing method and a system thereof.
背景技术Background technique
现有技术中,上层应用(一般为应用APP)通过直接写入代码或者通过调用中间库的API接口(应用程序编程端口)来实现与通讯层(终端)的交互,中间库中存储着上层应用的相关业务处理数据。中间库封装下层中间库属于嵌套封装,对外只提供可见API接口供上层应用调用。In the prior art, an upper layer application (generally an application APP) implements interaction with a communication layer (terminal) by directly writing code or by calling an API interface (application programming port) of the intermediate library, and the upper layer application is stored in the intermediate library. Related business processing data. The middle library encapsulates the lower intermediate library into a nested package, and only provides a visible API interface for the upper application to call.
中间库API接口的功能是否正常,只能通过接口完成数据处理后反应在上层应用上的结果来判断,若API接口的功能发生异常,则不管终端返回什么数据,上层应用上的显示的数据都将异常。在现有技术中,大多采用插桩方式来实现对API接口包括接口隔离、补齐、控制等功能,即直接控制上层应用输出的结果。插桩方式即直接在中间库中写入插桩代码,通过插桩代码来控制返回给API接口的结果。这种写入代码数据的方式,第一、破坏了中间库源代码的完整性,使得测试过程工作量较大;第二、测试过程撇开了通讯层,与实际环境不同,无法确保测试精确度;第三、当用例个数较多或一个函数多次调用桩代码且每次要求返回不同结果时,桩代码比较难控制,且随着编码语言和版本的不同需要不断的更新修改,代码复用性不大。Whether the function of the intermediate library API interface is normal, can only be judged by the result of the data processing and the response on the upper layer application through the interface. If the function of the API interface is abnormal, no matter what data is returned by the terminal, the displayed data on the upper layer application is Will be abnormal. In the prior art, most of the plugging methods are used to implement functions such as interface isolation, completion, and control of the API interface, that is, directly controlling the output of the upper application. The instrumentation method directly writes the instrumentation code in the intermediate library, and controls the result returned to the API interface by the instrumentation code. This way of writing code data, first, destroys the integrity of the intermediate library source code, making the test process a lot of work; second, the test process opens the communication layer, different from the actual environment, can not ensure the test accuracy Third, when the number of use cases is large or a function calls the pile code multiple times and each time requires different results, the pile code is more difficult to control, and it needs to be updated and modified continuously with the coding language and version. Not very useful.
因此,有必要提供一种针对中间库接口的测试方法及其系统,以解决上述问题。Therefore, it is necessary to provide a test method and system for the intermediate library interface to solve the above problems.
发明内容Summary of the invention
本发明所要解决的技术问题是:提供一种中间库虚拟控制测试方法及其系统,通过依据预设的业务逻辑触发条件进行处理,实现对待测试接口简单、高效的功能测试,测试方式复用性高,且符合实际使用场景。 The technical problem to be solved by the present invention is to provide an intermediate library virtual control test method and a system thereof, which are implemented according to a preset business logic trigger condition, thereby realizing a simple and efficient functional test of the test interface, and the test mode reusability. High and in line with the actual usage scenarios.
为了解决上述技术问题,本发明采用的技术方案为:In order to solve the above technical problems, the technical solution adopted by the present invention is:
提供一种中间库虚拟控制测试方法,包括:Provide an intermediate library virtual control test method, including:
预设业务逻辑触发条件;Preset business logic trigger conditions;
通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端;Transmitting the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library;
虚拟终端存储所述业务逻辑触发条件,并返回存储结果至中间库;The virtual terminal stores the business logic trigger condition and returns the stored result to the intermediate library;
中间库调用待测试接口;The intermediate library calls the interface to be tested;
虚拟终端识别所述待测试接口,并返回所述业务逻辑触发条件至中间库;The virtual terminal identifies the interface to be tested, and returns the service logic trigger condition to the intermediate library;
中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果。The intermediate library performs business logic processing according to the business logic trigger condition, and outputs the processing result.
本发明提供的另一个技术方案为:Another technical solution provided by the present invention is:
一种中间库虚拟控制测试系统,包括:An intermediate library virtual control test system, comprising:
预设模块,用于预设业务逻辑触发条件;a preset module for presetting a service logic trigger condition;
第一发送模块;用于通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端;a first sending module, configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library;
存储模块,用于虚拟终端存储所述业务逻辑触发条件;a storage module, configured to store, by the virtual terminal, the service logic trigger condition;
第一返回模块,用于虚拟终端返回存储结果至中间库;a first returning module, configured to: return, by the virtual terminal, the storage result to the intermediate library;
调用模块,用于中间库调用待测试接口;Calling a module for the intermediate library to call the interface to be tested;
识别模块,用于虚拟终端识别所述待测试接口;An identification module, configured to identify, by the virtual terminal, the interface to be tested;
第二返回模块,用于虚拟终端返回所述业务逻辑触发条件至中间库;a second returning module, configured to: return, by the virtual terminal, the service logic trigger condition to an intermediate library;
处理模块,用于中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果。The processing module is configured to perform business logic processing according to the business logic trigger condition and output the processing result.
本发明的有益效果在于:本发明通过建立虚拟终端来模拟终端与中间库的实际交互过程,摆脱对真实测试环境的要求;通过预设对应待测试接口的业务逻辑触发条件,并存储在虚拟终端中;能够解析识别接口的类型,并在中间库调用待测试接口时,控制虚拟终端返回给待测试接口,使待测试接口依据预设的业务逻辑触发条件进行相应的业务逻辑处理,进而判断待测试接口的功能是否正常,进而验证中间库API的各种处理是否正常。本发明的测试过程简单、高效、复用性高,且符合实际使用场景。 The invention has the beneficial effects that the present invention simulates the actual interaction process between the terminal and the intermediate library by establishing a virtual terminal, and gets rid of the requirement of the real test environment; the service logic trigger condition corresponding to the interface to be tested is preset, and is stored in the virtual terminal. The device can be configured to identify the type of the interface, and when the intermediate library calls the interface to be tested, the virtual terminal is returned to the interface to be tested, and the interface to be tested is processed according to the preset business logic trigger condition, and then the corresponding service logic is processed. Test whether the function of the interface is normal, and then verify whether the various processing of the intermediate library API is normal. The testing process of the invention is simple, efficient, highly reusable, and conforms to the actual use scenario.
附图说明DRAWINGS
图1为本发明一种中间库虚拟控制测试方法的流程示意图;1 is a schematic flow chart of a method for testing an intermediate library virtual control according to the present invention;
图2为本发明实施例一一种中间库虚拟控制测试方法的流程示意图;2 is a schematic flowchart of a method for testing an intermediate library virtual control according to an embodiment of the present invention;
图3为本发明实施例一种中间库虚拟控制测试系统的结构示意图;3 is a schematic structural diagram of an intermediate library virtual control test system according to an embodiment of the present invention;
图4为本发明实施例二一种中间库虚拟控制测试系统的结构示意图。FIG. 4 is a schematic structural diagram of an intermediate library virtual control test system according to Embodiment 2 of the present invention.
标号说明:Label description:
1、预设模块;2、第一发送模块;3、存储模块;4、第一返回模块;1. Preset module; 2. First sending module; 3. Storage module; 4. First return module;
5、调用模块;6、识别模块;7、第二返回模块;8、处理模块;5, call the module; 6, the identification module; 7, the second return module; 8, the processing module;
9、验证模块;10、接收模块。9, the verification module; 10, the receiving module.
具体实施方式detailed description
本发明最关键的构思在于:在调用接口时解析识别接口的类型,通过透传通讯接口预设待测试接口的业务逻辑触发条件,解析识别为待测试接口时控制返回业务逻辑触发条件,模拟中间库与终端的实际交互过程,实现中间库接口全面覆盖测试。本发明涉及的技术术语解释:The most critical idea of the present invention is to parse the type of the identification interface when the interface is invoked, and to preset the service logic trigger condition of the interface to be tested through the transparent communication interface, and control the return service logic trigger condition when the analysis is recognized as the interface to be tested, and simulate the middle. The actual interaction process between the library and the terminal implements the comprehensive coverage test of the intermediate library interface. The technical terms involved in the present invention are explained:
Figure PCTCN2016092814-appb-000001
Figure PCTCN2016092814-appb-000001
Figure PCTCN2016092814-appb-000002
Figure PCTCN2016092814-appb-000002
请参照图1以及图2,本发明提供一种中间库虚拟控制测试方法,包括:Referring to FIG. 1 and FIG. 2, the present invention provides an intermediate library virtual control test method, including:
预设业务逻辑触发条件;Preset business logic trigger conditions;
通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端;Transmitting the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library;
虚拟终端存储所述业务逻辑触发条件,并返回存储结果至中间库;The virtual terminal stores the business logic trigger condition and returns the stored result to the intermediate library;
中间库调用待测试接口;The intermediate library calls the interface to be tested;
虚拟终端识别所述待测试接口,并返回所述业务逻辑触发条件至中间库;The virtual terminal identifies the interface to be tested, and returns the service logic trigger condition to the intermediate library;
中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果。The intermediate library performs business logic processing according to the business logic trigger condition, and outputs the processing result.
从上述描述可知,本发明的有益效果在于:本发明与现有技术的测试方法相比,具有至少以下优点:(1)采用控制中间库交互对端返回方式测试,与中间库真实使用场景相同;(2)只在中间库中植入特殊接口辅助测试,未对测试对象进行其他修改,保障测试对象完整性;(3)可依次虚拟终端返回内容,实现方法简单高效;(4)使用终端虚拟控制方法,不受中间库编码语言限制,只要接口调用下层中间库顺序相同,则测试脚本可直接复用,复用性高。It can be seen from the above description that the present invention has the following advantages: Compared with the prior art testing method, the present invention has at least the following advantages: (1) using the control intermediate library interactive peer return mode test, which is the same as the real use scenario of the intermediate library. (2) Only special interface auxiliary test is implanted in the intermediate library, no other modifications are made to the test object to ensure the integrity of the test object; (3) the virtual terminal can return the content in turn, and the implementation method is simple and efficient; (4) using the terminal The virtual control method is not limited by the intermediate library coding language. As long as the interface calls the lower intermediate library in the same order, the test script can be directly reused and has high reusability.
进一步的,所述“中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果”之后,进一步包括:Further, after the “intermediate library performs business logic processing according to the business logic trigger condition and outputs the processing result”, the method further includes:
中间库依据所述待测试接口的业务逻辑功能验证所述处理结果。The intermediate library verifies the processing result according to the business logic function of the interface to be tested.
由上述描述可知,在待测试接口依据虚拟终端返回的业务逻辑触发条件进行相应的处理,得出处理结果后,中间库将依据待测试接口的功能验证处理结果的正确与否,进而验证待测试接口是否正常。It can be seen from the above description that the interface to be tested performs corresponding processing according to the service logic trigger condition returned by the virtual terminal, and after the processing result is obtained, the intermediate library verifies the correctness of the processing result according to the function of the interface to be tested, and then verifies the test to be tested. Whether the interface is normal.
进一步的,所述“通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端”之前,进一步包括:Further, before the sending the service logic trigger condition to the virtual terminal through the transparent communication interface of the intermediate library, the method further includes:
中间库接收对应一接口的调用指令;The intermediate library receives a call instruction corresponding to an interface;
解析所述调用指令,若为透传通讯接口,则执行所述通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端的步骤。 Parsing the call instruction, if it is a transparent communication interface, performing the step of transmitting the service logic trigger condition to the virtual terminal through the transparent communication interface of the intermediate library.
由上述描述可知,中间库能够解析判断上层应用调用的是接口类型,并利用透传通讯接口发送业务逻辑触发条件发送至虚拟终端,作为调用对应功能接口时的返回。It can be seen from the above description that the intermediate library can parse and judge that the upper layer application invokes the interface type, and sends the service logic trigger condition to the virtual terminal by using the transparent communication interface, as a return when the corresponding function interface is called.
进一步的,所述“虚拟终端识别所述待测试接口”具体为:Further, the “virtual terminal identifies the interface to be tested” is specifically:
待检测接口发送请求处理业务数据至虚拟终端;The interface to be detected sends a request to process the service data to the virtual terminal;
虚拟终端接收所述请求处理业务数据,识别为待测试接口。The virtual terminal receives the request processing service data and identifies it as an interface to be tested.
由上述描述可知,虚拟终端能够依据发送过来的数据解析判断中间库调用的接口类型,以便做出对应的处理。It can be seen from the above description that the virtual terminal can determine the interface type invoked by the intermediate library according to the sent data parsing, so as to perform corresponding processing.
进一步的,所述“中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果”具体为:Further, the “intermediate library performs business logic processing according to the business logic trigger condition, and the output processing result” is specifically:
中间库调用待测试接口依据接收到的所述业务逻辑触发条件进行业务逻辑处理,输出处理结果给上层应用。The intermediate library calls the interface to be tested to perform business logic processing according to the received business logic trigger condition, and outputs the processing result to the upper layer application.
进一步的,中间库接收到所述业务逻辑触发条件后存储至嵌套中间库;通过所述嵌套中间库调用待测试接口依据所述业务逻辑触发条件进行业务逻辑处理。Further, the intermediate library receives the business logic trigger condition and stores it in the nested intermediate library; the inbound intermediate library calls the test interface to perform business logic processing according to the business logic trigger condition.
由上述描述可知,上述过程为待测试接口依据虚拟终端的返回进行相应的业务逻辑处理,并通过上层应用判断处理结果,最终实现待测试接口功能是否正常的直观判断。It can be seen from the above description that the foregoing process performs corresponding service logic processing on the interface to be tested according to the return of the virtual terminal, and judges the processing result through the upper layer application, and finally realizes an intuitive judgment of whether the function of the interface to be tested is normal.
本发明的一种中间库虚拟控制测试方法,只需修改中间库的配置,同时配置一功能简单的虚拟终端,便可在中间库调用功能接口时,通过控制虚拟终端的返回内容,实现对中间库功能接口的功能测试,测试过程简单、高效,且复用性高,符合真实使用场景,所获取的测试结果精度高。The intermediate library virtual control test method of the present invention only needs to modify the configuration of the intermediate library and configure a virtual terminal with simple functions, and can realize the middle of the middle by controlling the return content of the virtual terminal when the intermediate library calls the function interface. The functional test of the library function interface, the test process is simple, efficient, and highly reusable, in line with the real use scenario, and the obtained test result has high precision.
本发明提供的另一个技术方案为:Another technical solution provided by the present invention is:
一种中间库虚拟控制测试系统,包括:An intermediate library virtual control test system, comprising:
预设模块1,用于预设业务逻辑触发条件;Preset module 1 for preset business logic trigger conditions;
第一发送模块2;用于通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端;a first sending module 2, configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library;
存储模块3,用于虚拟终端存储所述业务逻辑触发条件; The storage module 3 is configured to store, by the virtual terminal, the service logic triggering condition;
第一返回模块4,用于虚拟终端返回存储结果至中间库;a first returning module 4, configured to: return, by the virtual terminal, the storage result to the intermediate library;
调用模块5,用于中间库调用待测试接口;Calling module 5, for the intermediate library to call the interface to be tested;
识别模块6,用于虚拟终端识别所述待测试接口;The identification module 6 is configured to identify the interface to be tested by the virtual terminal;
第二返回模块7,用于虚拟终端返回所述业务逻辑触发条件至中间库;a second returning module 7 is configured to: return, by the virtual terminal, the service logic triggering condition to an intermediate library;
处理模块8,用于中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果。The processing module 8 is configured to perform, by the intermediate library, the business logic processing according to the business logic trigger condition, and output the processing result.
进一步的,还包括验证模块9,用于中间库依据所述待测试接口的业务逻辑功能验证所述处理结果。Further, the verification module 9 is further configured to verify, by the intermediate library, the processing result according to the service logic function of the interface to be tested.
进一步的,还包括:Further, it also includes:
接收模块10,用于中间库接收对应一接口的调用指令;The receiving module 10 is configured to receive, by the intermediate library, a call instruction corresponding to an interface;
第一解析模块,用于解析所述调用指令,得到第一解析结果;a first parsing module, configured to parse the calling instruction to obtain a first parsing result;
所述第一发送模块2,用于当所述第一解析结果为透传通讯接口时,通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端。The first sending module 2 is configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library when the first parsing result is a transparent communication interface.
进一步的,所述中间库包括嵌套中间库,所述识别模块包括发送单元和接收单元;Further, the intermediate library includes a nested intermediate library, and the identification module includes a sending unit and a receiving unit;
所述发送单元,用于待检测接口发送请求处理业务数据至虚拟终端;The sending unit is configured to send a request to process the service data to the virtual terminal;
所述接收单元,用于虚拟终端接收所述请求处理业务数据,识别为待测试接口;The receiving unit is configured to receive, by the virtual terminal, the request processing service data, and identify the interface to be tested;
所述处理模块8,具体用于中间库调用待测试接口依据接收到的所述业务逻辑触发条件进行业务逻辑处理,输出处理结果给上层应用;The processing module 8 is specifically configured to: the intermediate library calls the interface to be tested to perform business logic processing according to the received service logic trigger condition, and outputs the processing result to the upper layer application;
所述嵌套中间库,用于存储中间库接收到的所述业务逻辑触发条件,以及调用待测试接口依据所述业务逻辑触发条件进行业务逻辑处理。The nested intermediate library is configured to store the service logic trigger condition received by the intermediate library, and invoke the interface to be tested to perform business logic processing according to the service logic trigger condition.
请参照图2,本发明的实施例一为:Referring to FIG. 2, a first embodiment of the present invention is:
提供一种中间库虚拟控制测试方法,在测试对象中间库中植入控制器和解析器,通过解析器识别接口的类型,通过控制器虚拟终端返回的内容,实现控制中间库内部嵌套API的返回,从而验证中间库API接口的功能是否正常。An intermediate library virtual control test method is provided. The controller and the parser are embedded in the test object intermediate library, and the type of the interface is recognized by the parser, and the nested API of the intermediate library is controlled by the content returned by the controller virtual terminal. Return to verify that the function of the intermediate library API interface is normal.
(一)配置测试环境(1) Configuring the test environment
1、测试对象(中间库)植入代码 1, test object (intermediate library) implant code
中间库中配置第一解析器和第一控制器,接收到外部接口调用时,先由第一解析器解析处理;The first parser and the first controller are configured in the intermediate library, and are received by the first parser after receiving the external interface call;
第一解析器识别接口为特殊的透传通讯接口A时,由第一控制器控制通过透传通讯接口A发送携带数据(对应待测功能接口B的业务逻辑触发条件)至终端(中间库的交互对端)。When the first parser recognizes that the interface is a special transparent communication interface A, the first controller controls the transmission of the carrying data (corresponding to the service logic trigger condition of the function interface B to be tested) through the transparent communication interface A to the terminal (the intermediate library Interactive peer).
2、配置虚拟终端2, configure the virtual terminal
在具备对待测试接口的数据处理功能以外,增加第二解析器和第二控制器,接收到接口发送过来数据时,通过第二解析器解析处理;In addition to the data processing function of the interface to be tested, the second parser and the second controller are added, and when the data sent by the interface is received, the parsing process is performed by the second parser;
第二解析器识别到接口为特殊的透传通讯接口A时,由第二控制器控制终端存储透传通讯接口A发送过来的数据,即上述的对应待测功能接口B的业务逻辑触发条件,作为后续虚拟返回数据。When the second parser recognizes that the interface is a special transparent communication interface A, the second controller controls the terminal to store the data sent by the transparent communication interface A, that is, the service logic triggering condition corresponding to the function interface B to be tested. As a subsequent virtual return data.
(二)测试过程(two) test process
1、上层应用层发送调用待测试接口B的指令至中间库;1. The upper application layer sends an instruction to invoke the interface B to be tested to the intermediate library;
2、中间库接收对应待测试接口B的调用指令;使用第一解析器解析所述调用指令对应的接口类型,并通过第一控制器调用对应的待测试接口B,待测试接口B依据其功能发送对应的请求处理业务数据至终端;2. The intermediate library receives the call instruction corresponding to the interface B to be tested; uses the first parser to parse the interface type corresponding to the call instruction, and invokes the corresponding interface B to be tested through the first controller, and the interface B to be tested is based on its function. Sending a corresponding request to process the service data to the terminal;
3、终端接收到所述请求处理业务数据后,通过第二解析器解析识别出其并非特殊的透传通讯接口A,则为待测试的功能接口B;调用第二控制器控制终端返回预先存储的所述业务逻辑触发条件给中间库;3. After receiving the request processing service data, the terminal parses and recognizes that it is not a special transparent communication interface A through the second parser, and is a function interface B to be tested; and calls the second controller to control the terminal to return to the pre-stored The business logic triggers conditions to the intermediate library;
4、中间库接收到所述业务逻辑触发条件后,通过第一解析器识别是待测试接口B的返回,便由第二控制器将所述业务逻辑触发条件发送给嵌套中间库层;After the intermediate library receives the trigger condition of the service logic, the first parser identifies that the return of the interface B to be tested, and the second controller sends the service logic trigger condition to the nested intermediate library layer;
5、嵌套中间库层接收到第二控制器返回的业务数据,并进行处理后返回给中间库(测试对象)的功能接口B,然后通过功能接口B将处理结果返回给上层应用;5. The nested intermediate library layer receives the service data returned by the second controller, and returns to the function interface B of the intermediate library (test object) after processing, and then returns the processing result to the upper layer application through the function interface B;
6、依据上层应用展示的处理结果判断待测试接口B的功能是否出现异常。6. Determine whether the function of the interface B to be tested is abnormal according to the processing result displayed by the upper layer application.
请参照图3和4,本发明的实施例二为:Referring to Figures 3 and 4, the second embodiment of the present invention is:
一种中间库虚拟控制测试系统,包括上层应用、中间库以及终端;所述中间库配置有嵌套中间库、预设模块1、第一发送模块2、调用模块5、处理模块 8、接收模块10、第一解析模块;An intermediate library virtual control test system includes an upper layer application, an intermediate library and a terminal; the intermediate library is configured with a nested intermediate library, a preset module 1, a first sending module 2, a calling module 5, and a processing module 8. The receiving module 10 and the first parsing module;
所述终端配置有存储模块3、第一返回模块4、识别模块6、第二返回模块7、验证模块9,所述识别模块6包括发送单元和接收单元;The terminal is configured with a storage module 3, a first return module 4, an identification module 6, a second return module 7, and a verification module 9, and the identification module 6 includes a sending unit and a receiving unit;
所述预设模块1,用于预设业务逻辑触发条件;The preset module 1 is configured to preset a service logic trigger condition;
所述接收模块10,用于中间库接收对应一接口的调用指令;The receiving module 10 is configured to receive, by the intermediate library, a call instruction corresponding to an interface;
所述第一解析模块,用于解析所述调用指令,得到第一解析结果;The first parsing module is configured to parse the calling instruction to obtain a first parsing result;
所述第一发送模块2;用于通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端;The first sending module 2 is configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library;
所述调用模块5,用于中间库调用待测试接口;The calling module 5 is configured to invoke an interface to be tested by the intermediate library;
所述处理模块8,用于中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果。The processing module 8 is configured to perform, by the intermediate library, the business logic processing according to the business logic trigger condition, and output the processing result.
所述存储模块3,用于虚拟终端存储所述业务逻辑触发条件;The storage module 3 is configured to store, by the virtual terminal, the service logic trigger condition;
所述第一返回模块4,用于虚拟终端返回存储结果至中间库;The first returning module 4 is configured to return, by the virtual terminal, the storage result to the intermediate library;
所述识别模块6,用于虚拟终端识别所述待测试接口;具体的,所述发送单元,用于待检测接口发送请求处理业务数据至虚拟终端;所述接收单元,用于虚拟终端接收所述请求处理业务数据,识别为待测试接口;The identification module 6 is configured to identify the interface to be tested by the virtual terminal. Specifically, the sending unit is configured to send a request to process the service data to the virtual terminal, and the receiving unit is configured to receive the virtual terminal. The request processing service data is identified as an interface to be tested;
所述第二返回模块7,用于虚拟终端返回所述业务逻辑触发条件至中间库;The second returning module 7 is configured to: return, by the virtual terminal, the service logic triggering condition to the intermediate library;
所述验证模块9,用于依据所述待测试接口的业务逻辑功能验证所述处理结果。The verification module 9 is configured to verify the processing result according to the service logic function of the interface to be tested.
请参阅1-3,本发明的实施例三为:Referring to 1-3, the third embodiment of the present invention is:
1、中间库测试接口1, the intermediate library test interface
loginTran接口实现的业务功能是发起签到交易;接口内部逻辑处理是上层应用调用该接口时,中间库会先判断终端的状态,例如当终端返回参数未下载时,中间库会作出业务逻辑处理响应(发起参数下载请求)。The business function implemented by the loginTran interface is to initiate a check-in transaction; when the internal logic processing of the interface is that the upper-layer application calls the interface, the intermediate library first determines the state of the terminal. For example, when the terminal returns the parameter is not downloaded, the intermediate library performs a business logic processing response ( Initiate a parameter download request).
2、测试内容:2. Test content:
验证上层应用调用loginTran接口,终端返回参数未下载状态时,中间库内部业务处理有正确触发参数下载;Verify that the upper-layer application calls the loginTran interface. When the terminal returns the parameter un-downloaded state, the internal processing of the intermediate library has the correct trigger parameter download.
3、测试准备: 3. Test preparation:
1)上层应用调用预设通讯接口A,设置终端预设“参数未下载状态”的业务触发条件;1) The upper layer application invokes the preset communication interface A, and sets the service trigger condition of the terminal preset “parameter not downloaded state”;
2)终端识别预设通讯接口A,进行存储所述预设业务触发条件;2) The terminal identifies the preset communication interface A, and stores the preset service triggering condition;
3)终端返回预设业务触发条件存储结果至中间库;3) The terminal returns the preset service trigger condition to store the result to the intermediate library;
4、测试执行:4, test execution:
1)上层应用调用loginTran接口(测试对象B接口),中间库发送业务数据到终端;1) The upper application calls the loginTran interface (test object B interface), and the intermediate library sends the service data to the terminal;
2)终端识别是功能测试接口,返回存储的预设业务处理条件数据(参数未下载状态);2) The terminal identification is a function test interface, and returns the stored preset service processing condition data (the parameter is not downloaded);
3)嵌套中间库接收数据,进行业务判断处理后发送数据到中间库;3) The nested intermediate library receives the data, and sends the data to the intermediate library after performing the business judgment processing;
4)中间库根据嵌套中间库接口返回,进行业务判断处理(判断终端状态是参数未下载,则进行参数下载流程);4) The intermediate library returns according to the nested intermediate library interface, and performs service judgment processing (determining that the terminal status is that the parameter is not downloaded, then the parameter downloading process is performed);
5)验证loginTran接口调用后,中间库有正常进行参数下载,符合接口业务逻辑处理,功能接口测试通过。5) After verifying that the loginTran interface is called, the intermediate library has normal parameter downloading, which conforms to the interface business logic processing, and the functional interface test passes.
综上所述,本发明提供的一种中间库虚拟控制测试方法及其系统,不仅与实际使用场景相同,具备真实性,而且只需对中间库进行配置,改动小,保证测试对象的完整性;进一步的,只需一次配置虚拟终端返回的内容,测试过程简单、高效;最后,本发明的实现使用虚拟终端控制方法,测试脚本可反复利用,复用性高。 In summary, the intermediate library virtual control test method and system thereof provided by the present invention are not only identical to the actual use scenario, but also have authenticity, and only need to configure the intermediate library, the change is small, and the integrity of the test object is guaranteed. Further, the content returned by the virtual terminal is configured only once, and the testing process is simple and efficient. Finally, the implementation of the present invention uses the virtual terminal control method, and the test script can be repeatedly used, and the reusability is high.

Claims (10)

  1. 一种中间库虚拟控制测试方法,其特征在于,包括:An intermediate library virtual control test method, comprising:
    预设业务逻辑触发条件;Preset business logic trigger conditions;
    通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端;Transmitting the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library;
    虚拟终端存储所述业务逻辑触发条件,并返回存储结果至中间库;The virtual terminal stores the business logic trigger condition and returns the stored result to the intermediate library;
    中间库调用待测试接口;The intermediate library calls the interface to be tested;
    虚拟终端识别所述待测试接口,并返回所述业务逻辑触发条件至中间库;The virtual terminal identifies the interface to be tested, and returns the service logic trigger condition to the intermediate library;
    中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果。The intermediate library performs business logic processing according to the business logic trigger condition, and outputs the processing result.
  2. 如权利要求1所述的中间库虚拟控制测试方法,其特征在于,所述“中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果”之后,进一步包括:The intermediate library virtual control test method according to claim 1, wherein the "intermediate library performs business logic processing according to the business logic trigger condition and outputs the processing result", further comprising:
    依据所述待测试接口的业务逻辑功能验证所述处理结果。And verifying the processing result according to the service logic function of the interface to be tested.
  3. 如权利要求1所述的中间库虚拟控制测试方法,其特征在于,所述“通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端”之前,进一步包括:The intermediate library virtual control test method according to claim 1, wherein before the sending the service logic trigger condition to the virtual terminal through the transparent communication interface of the intermediate library, the method further includes:
    中间库接收对应一接口的调用指令;The intermediate library receives a call instruction corresponding to an interface;
    解析所述调用指令,若为透传通讯接口,则执行所述通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端的步骤。Parsing the call instruction, if it is a transparent communication interface, performing the step of transmitting the service logic trigger condition to the virtual terminal through the transparent communication interface of the intermediate library.
  4. 如权利要求1所述的中间库虚拟控制测试方法,其特征在于,所述“虚拟终端识别所述待测试接口”具体为:The intermediate library virtual control test method according to claim 1, wherein the "virtual terminal identifies the interface to be tested" is specifically:
    待检测接口发送请求处理业务数据至虚拟终端;The interface to be detected sends a request to process the service data to the virtual terminal;
    虚拟终端接收所述请求处理业务数据,识别为待测试接口。The virtual terminal receives the request processing service data and identifies it as an interface to be tested.
  5. 如权利要求4所述的中间库虚拟控制测试方法,其特征在于,所述“中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果”具体为:The intermediate library virtual control test method according to claim 4, wherein the "intermediate library performs business logic processing according to the business logic trigger condition, and outputs the processing result" as follows:
    中间库调用待测试接口依据接收到的所述业务逻辑触发条件进行业务逻辑处理,输出处理结果给上层应用。The intermediate library calls the interface to be tested to perform business logic processing according to the received business logic trigger condition, and outputs the processing result to the upper layer application.
  6. 如权利要求5所述的中间库虚拟控制测试方法,其特征在于,中间库接收到所述业务逻辑触发条件后存储至嵌套中间库;通过所述嵌套中间库调用待测试接口依据所述业务逻辑触发条件进行业务逻辑处理。 The intermediate library virtual control test method according to claim 5, wherein the intermediate library receives the business logic trigger condition and stores it in the nested intermediate library; and calls the interface to be tested through the nested intermediate library according to the Business logic triggers conditions for business logic processing.
  7. 一种中间库虚拟控制测试系统,其特征在于,包括:An intermediate library virtual control test system, comprising:
    预设模块,用于预设业务逻辑触发条件;a preset module for presetting a service logic trigger condition;
    第一发送模块;用于通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端;a first sending module, configured to send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library;
    存储模块,用于虚拟终端存储所述业务逻辑触发条件;a storage module, configured to store, by the virtual terminal, the service logic trigger condition;
    第一返回模块,用于虚拟终端返回存储结果至中间库;a first returning module, configured to: return, by the virtual terminal, the storage result to the intermediate library;
    调用模块,用于中间库调用待测试接口;Calling a module for the intermediate library to call the interface to be tested;
    识别模块,用于虚拟终端识别所述待测试接口;An identification module, configured to identify, by the virtual terminal, the interface to be tested;
    第二返回模块,用于虚拟终端返回所述业务逻辑触发条件至中间库;a second returning module, configured to: return, by the virtual terminal, the service logic trigger condition to an intermediate library;
    处理模块,用于中间库依据所述业务逻辑触发条件进行业务逻辑处理,输出处理结果。The processing module is configured to perform business logic processing according to the business logic trigger condition and output the processing result.
  8. 如权利要求7所述的中间库虚拟控制测试系统,其特征在于,还包括验证模块,用于依据所述待测试接口的业务逻辑功能验证所述处理结果。The intermediate library virtual control test system according to claim 7, further comprising a verification module, configured to verify the processing result according to the service logic function of the interface to be tested.
  9. 如权利要求7所述的中间库虚拟控制测试系统,其特征在于,还包括:The intermediate library virtual control test system of claim 7, further comprising:
    接收模块,用于中间库接收对应一接口的调用指令;a receiving module, configured to receive, by the intermediate library, a calling instruction corresponding to an interface;
    第一解析模块,用于解析所述调用指令,得到第一解析结果;a first parsing module, configured to parse the calling instruction to obtain a first parsing result;
    所述第一发送模块,用于当所述第一解析结果为透传通讯接口时,通过中间库的透传通讯接口将所述业务逻辑触发条件发送至虚拟终端。The first sending module is configured to: when the first parsing result is a transparent communication interface, send the service logic trigger condition to the virtual terminal by using a transparent communication interface of the intermediate library.
  10. 如权利要求7所述的中间库虚拟控制测试系统,其特征在于,所述中间库包括嵌套中间库,所述识别模块包括发送单元和接收单元;The intermediate library virtual control test system according to claim 7, wherein the intermediate library comprises a nested intermediate library, and the identification module comprises a transmitting unit and a receiving unit;
    所述发送单元,用于待检测接口发送请求处理业务数据至虚拟终端;The sending unit is configured to send a request to process the service data to the virtual terminal;
    所述接收单元,用于虚拟终端接收所述请求处理业务数据,识别为待测试接口;The receiving unit is configured to receive, by the virtual terminal, the request processing service data, and identify the interface to be tested;
    所述处理模块,具体用于中间库调用待测试接口依据接收到的所述业务逻辑触发条件进行业务逻辑处理,输出处理结果给上层应用;The processing module is specifically configured to: the intermediate library invokes the interface to be tested to perform business logic processing according to the received business logic trigger condition, and outputs the processing result to the upper layer application;
    所述嵌套中间库,用于存储中间库接收到的所述业务逻辑触发条件,以及调用待测试接口依据所述业务逻辑触发条件进行业务逻辑处理。 The nested intermediate library is configured to store the service logic trigger condition received by the intermediate library, and invoke the interface to be tested to perform business logic processing according to the service logic trigger condition.
PCT/CN2016/092814 2015-12-01 2016-08-02 Middle-tier database virtual control and testing method and system utilizing same WO2017092391A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510862976.4A CN105512032B (en) 2015-12-01 2015-12-01 A kind of middle database virtual controlling test method and its system
CN201510862976.4 2015-12-01

Publications (1)

Publication Number Publication Date
WO2017092391A1 true WO2017092391A1 (en) 2017-06-08

Family

ID=55720033

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/092814 WO2017092391A1 (en) 2015-12-01 2016-08-02 Middle-tier database virtual control and testing method and system utilizing same

Country Status (2)

Country Link
CN (1) CN105512032B (en)
WO (1) WO2017092391A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309048A (en) * 2019-05-21 2019-10-08 深圳壹账通智能科技有限公司 The method and relevant device of integrated software system are improved based on analog port

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512032B (en) * 2015-12-01 2019-01-04 福建联迪商用设备有限公司 A kind of middle database virtual controlling test method and its system
CN109032953B (en) * 2018-08-13 2022-03-15 福建联迪商用设备有限公司 Intermediate library testing method and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785845B2 (en) * 2001-04-10 2004-08-31 Hewlett-Packard Development Company, L.P. POS terminal test system and method
CN102110049A (en) * 2010-12-14 2011-06-29 中山大学 Method and system for automatically testing digital television middleware interface
CN103455413A (en) * 2012-05-31 2013-12-18 联想(北京)有限公司 Method, device and system for interaction scenario test data processing of communication terminals
CN104038605A (en) * 2014-06-04 2014-09-10 福建升腾资讯有限公司 Phone point of sale (POS) payment terminal transaction testing method
CN104268079A (en) * 2014-09-24 2015-01-07 福建联迪商用设备有限公司 POS (Point Of Sale) application program testing method and system
CN105512032A (en) * 2015-12-01 2016-04-20 福建联迪商用设备有限公司 Middle database virtual control test method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090247125A1 (en) * 2008-03-27 2009-10-01 Grant Calum Anders Mckay Method and system for controlling access of computer resources of mobile client facilities
CN102455901A (en) * 2010-10-29 2012-05-16 北京创艺和弦科贸有限公司 Interlayer device used for J2ME(Java 2 Micro Edition) application program development, and application method thereof
CN103778053A (en) * 2012-10-18 2014-05-07 周玲玲 Remote real machine test system and method of mobile terminals

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6785845B2 (en) * 2001-04-10 2004-08-31 Hewlett-Packard Development Company, L.P. POS terminal test system and method
CN102110049A (en) * 2010-12-14 2011-06-29 中山大学 Method and system for automatically testing digital television middleware interface
CN103455413A (en) * 2012-05-31 2013-12-18 联想(北京)有限公司 Method, device and system for interaction scenario test data processing of communication terminals
CN104038605A (en) * 2014-06-04 2014-09-10 福建升腾资讯有限公司 Phone point of sale (POS) payment terminal transaction testing method
CN104268079A (en) * 2014-09-24 2015-01-07 福建联迪商用设备有限公司 POS (Point Of Sale) application program testing method and system
CN105512032A (en) * 2015-12-01 2016-04-20 福建联迪商用设备有限公司 Middle database virtual control test method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309048A (en) * 2019-05-21 2019-10-08 深圳壹账通智能科技有限公司 The method and relevant device of integrated software system are improved based on analog port

Also Published As

Publication number Publication date
CN105512032B (en) 2019-01-04
CN105512032A (en) 2016-04-20

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
US20170300402A1 (en) Mock server and extensions for application testing
CN111045756B (en) Method, apparatus, computing device and medium for generating interface service
WO2018036273A1 (en) Simulation test method, server, device, and computer-readable storage medium
KR101134735B1 (en) Software testing method and system using software component design information
US7996818B1 (en) Method for testing using client specified references
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN108347356B (en) Multi-protocol unit testing method and device, electronic equipment and storage medium
CN104636254A (en) Method and device for generating test case, testing method and testing equipment
CN106209503B (en) RPC interface test method and system
US10235270B2 (en) Method for assisting with debugging, and computer system
CN108183838B (en) Method and device for testing source NAT function
WO2017092391A1 (en) Middle-tier database virtual control and testing method and system utilizing same
CN104268079A (en) POS (Point Of Sale) application program testing method and system
CN105389263A (en) Method, system and equipment for monitoring application software permissions
CN109240908A (en) Abnormality test use-case template establishment method and device
CN113687858A (en) Configuration file checking method and device, electronic equipment and storage medium
CN109558313B (en) Method and device for constructing abnormal test scene
CN114363225A (en) MTQQ protocol-based device debugging mode, system and storage medium
KR102316084B1 (en) Apparatus and method for testing machine to machine application
CN114385258B (en) Automatic test method, device, electronic equipment and storage medium
CN105339974B (en) Analog sensor
CN113852610B (en) Message processing method, device, computer equipment and storage medium
US9298428B2 (en) Graphical user interface editor that displays live data during editing
US20160224456A1 (en) Method for verifying generated software, and verifying device for carrying out such a method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16869702

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16869702

Country of ref document: EP

Kind code of ref document: A1