+

CN112637008B - Link simulation test method, device, system, computer equipment and storage medium - Google Patents

Link simulation test method, device, system, computer equipment and storage medium Download PDF

Info

Publication number
CN112637008B
CN112637008B CN202011475159.0A CN202011475159A CN112637008B CN 112637008 B CN112637008 B CN 112637008B CN 202011475159 A CN202011475159 A CN 202011475159A CN 112637008 B CN112637008 B CN 112637008B
Authority
CN
China
Prior art keywords
link
tested
application
test
request
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.)
Active
Application number
CN202011475159.0A
Other languages
Chinese (zh)
Other versions
CN112637008A (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.)
Guangzhou Pinwei Software Co Ltd
Original Assignee
Guangzhou Pinwei Software 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 Guangzhou Pinwei Software Co Ltd filed Critical Guangzhou Pinwei Software Co Ltd
Priority to CN202011475159.0A priority Critical patent/CN112637008B/en
Publication of CN112637008A publication Critical patent/CN112637008A/en
Application granted granted Critical
Publication of CN112637008B publication Critical patent/CN112637008B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a link simulation test method, a device, a system, computer equipment and a storage medium. The method comprises the following steps: receiving a link to-be-tested request, wherein the link to-be-tested request comprises a link identifier, called service information and a tested application identifier; determining a corresponding application to be tested according to the application to be tested identifier; sending the link to-be-tested request to the tested application so that the tested application calls the matched target simulation service according to the called service information in the link to-be-tested request; sending the link identification to a target simulation service, and acquiring target simulation data corresponding to the link identification returned by the target simulation service; sending the target simulation data to the application to be tested so that the application to be tested performs simulation test according to the target simulation data to obtain a tested result; and receiving the measured result and returning the measured result to the target terminal. By adopting the method, only specific links can be simulated without influencing other links, so that the link simulation efficiency is improved.

Description

链路模拟测试方法、装置、系统、计算机设备和存储介质Link simulation test method, apparatus, system, computer equipment and storage medium

技术领域technical field

本申请涉及计算机技术领域,特别是涉及一种链路模拟测试方法、装置、系统、计算机设备和存储介质。The present application relates to the field of computer technology, and in particular, to a link simulation test method, apparatus, system, computer equipment and storage medium.

背景技术Background technique

目前微服务已经成为互联网技术中非常热门的名词,微服务架构的思想是将整体业务,根据业务领域拆分成一个个独立的模板。每个微服务模块独立部署,微服务之间的关系是松耦合的。然后,目前osp(开放平台)微服务进行模拟的方案主要是针对具体的服务器和方法进行的,需要在页面或者代码方式预先写好需要模拟的逻辑和返回数据,当不需要进行模拟的时候就需要将相应的模拟配置失效掉,从而影响其他链路的模拟,然而,这种方式各个链路之间容易相互影响,导致链路模拟效率低下。At present, microservices have become a very popular term in Internet technology. The idea of microservice architecture is to split the overall business into independent templates according to the business field. Each microservice module is deployed independently, and the relationship between microservices is loosely coupled. Then, the current osp (open platform) microservice simulation scheme is mainly for specific servers and methods. It is necessary to pre-write the logic and return data that need to be simulated on the page or code. When simulation is not required, The corresponding simulation configuration needs to be disabled, thereby affecting the simulation of other links. However, in this way, each link is easy to influence each other, resulting in low link simulation efficiency.

发明内容SUMMARY OF THE INVENTION

基于此,有必要针对上述技术问题,提供一种能够只针对特定的链路进行模拟,不影响其他链路,从而提高链路模拟效率的链路模拟测试方法、装置、系统、计算机设备和存储介质。Based on this, it is necessary to provide a link simulation test method, device, system, computer equipment and storage device that can only simulate a specific link without affecting other links, thereby improving the efficiency of link simulation. medium.

一种链路模拟测试方法,该方法包括:A link simulation test method, the method includes:

接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识;Receive the link to be tested request, the link to be tested request includes the link identifier, the called service information and the tested application identifier;

根据被测应用标识确定对应的被测应用;Determine the corresponding tested application according to the tested application identifier;

将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;Send the request for the link to be tested to the application under test, so that the application under test invokes the matching target simulation service according to the called service information in the request for the link to be tested;

将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据;Send the link identification to the target simulation service, and obtain the target simulation data corresponding to the link identification returned by the target simulation service;

将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果;Send the target simulation data to the application under test, so that the application under test can perform a simulation test according to the target simulation data to obtain the test result;

接收被测结果,并将被测结果返回至目标终端。Receive the measured result and return the measured result to the target terminal.

在其中一个实施例中,链路模拟测试方法还包括:获取链路待测试请求对应的测试请求参数;将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,发送至缓存区域进行缓存。In one embodiment, the link simulation test method further includes: acquiring test request parameters corresponding to the link to be tested request; determining the target simulation data, the test request parameters and the test result as a link record corresponding to the link identifier , sent to the buffer area for buffering.

在其中一个实施例中,根据被测应用标识确定对应的被测应用,包括:获取候选测试应用,候选测试应用包括候选测试应用标识;将与被测应用标识对应的候选测试应用标识对应的候选测试应用确定为被测应用。In one embodiment, determining the corresponding tested application according to the tested application identifier includes: acquiring candidate test applications, where the candidate test application includes the candidate test application identifier; The test application is determined to be the application under test.

在其中一个实施例中,获取目标模拟服务返回的与链路标识对应的目标模拟数据,包括:目标模拟服务获取候选模拟数据,候选模拟数据包括对应的候选链路标识;目标模拟服务将与链路标识相同的候选链路标识对应的候选模拟数据确定为目标模拟数据,并返回。In one embodiment, acquiring the target simulation data corresponding to the link identifier returned by the target simulation service includes: the target simulation service obtains candidate simulation data, where the candidate simulation data includes the corresponding candidate link identifier; the target simulation service associates the link with the link identifier. The candidate analog data corresponding to the candidate link identifier with the same road identifier is determined as the target analog data, and returned.

一种链路模拟测试系统,该系统包括:A link simulation test system, the system includes:

链路模拟测试设备,用于接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识,根据被测应用标识确定对应的被测应用,将链路待测试请求发送至被测应用;The link simulation test equipment is used to receive the request for the link to be tested. The request for the link to be tested includes the link identifier, the called service information and the tested application identifier. According to the tested application identifier, the corresponding tested application is determined, and the link The request to be tested is sent to the application under test;

被测应用,用于根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;The application under test is used to invoke the matched target simulation service according to the called service information in the link to be tested request;

链路模拟测试设备,用于将链路标识发送至目标模拟服务;Link simulation test equipment for sending the link identification to the target simulation service;

目标模拟服务,用于获取与链路标识对应的目标模拟数据。并返回至链路模拟测试设备;The target simulation service is used to obtain target simulation data corresponding to the link identifier. and return to the link simulation test equipment;

链路模拟测试设备,用于将目标模拟数据发送至被测应用;Link simulation test equipment for sending target simulation data to the application under test;

被测应用,用于根据目标模拟数据进行模拟测试,得到被测结果,并返回至链路模拟测试设备;The application under test is used to perform a simulation test according to the target simulation data, obtain the test result, and return it to the link simulation test equipment;

链路模拟测试设备,用于接收被测结果,并将被测结果返回至目标终端。The link simulation test equipment is used to receive the test results and return the test results to the target terminal.

一种链路模拟测试装置,该装置包括:A link simulation test device, the device includes:

测试请求接收模块,用于接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识;The test request receiving module is used to receive the link to be tested request, and the link to be tested request includes the link identifier, the called service information and the tested application identifier;

被测应用确定模块,用于根据被测应用标识确定对应的被测应用;The tested application determination module is used to determine the corresponding tested application according to the tested application identifier;

测试请求发送模块,用于将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;The test request sending module is used to send the link to be tested request to the application under test, so that the tested application invokes the matched target simulation service according to the called service information in the link to be tested request;

链路标识发送模块,用于将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据;a link identification sending module, used for sending the link identification to the target simulation service, and obtaining the target simulation data corresponding to the link identification returned by the target simulation service;

模拟数据发送模块,用于将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果;The simulation data sending module is used to send the target simulation data to the application under test, so that the application under test can perform a simulation test according to the target simulation data to obtain the test result;

被测结果接收模块,用于接收被测结果,并将被测结果返回至目标终端。The tested result receiving module is used to receive the tested result and return the tested result to the target terminal.

一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device, comprising a memory, a processor and a computer program stored in the memory and running on the processor, the processor implements the following steps when executing the computer program:

接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识;Receive the link to be tested request, the link to be tested request includes the link identifier, the called service information and the tested application identifier;

根据被测应用标识确定对应的被测应用;Determine the corresponding tested application according to the tested application identifier;

将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;Send the request for the link to be tested to the application under test, so that the application under test invokes the matching target simulation service according to the called service information in the request for the link to be tested;

将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据;Send the link identification to the target simulation service, and obtain the target simulation data corresponding to the link identification returned by the target simulation service;

将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果;Send the target simulation data to the application under test, so that the application under test can perform a simulation test according to the target simulation data to obtain the test result;

接收被测结果,并将被测结果返回至目标终端。Receive the measured result and return the measured result to the target terminal.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识;Receive the link to be tested request, the link to be tested request includes the link identifier, the called service information and the tested application identifier;

根据被测应用标识确定对应的被测应用;Determine the corresponding tested application according to the tested application identifier;

将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;Send the request for the link to be tested to the application under test, so that the application under test invokes the matching target simulation service according to the called service information in the request for the link to be tested;

将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据;Send the link identification to the target simulation service, and obtain the target simulation data corresponding to the link identification returned by the target simulation service;

将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果;Send the target simulation data to the application under test, so that the application under test can perform a simulation test according to the target simulation data to obtain the test result;

接收被测结果,并将被测结果返回至目标终端。Receive the measured result and return the measured result to the target terminal.

上述链路模拟测试方法、装置、系统、计算机设备和存储介质,接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识;根据被测应用标识确定对应的被测应用;将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据;将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果;接收被测结果,并将被测结果返回至目标终端。因此,通过链路待测试请求中的链路标识能够识别出对应的链路,从而进行链路模拟,这种方式能够只针对特定的链路进行模拟,不影响其他链路,从而提高链路模拟效率。The above-mentioned link simulation test method, device, system, computer equipment and storage medium receive a request for a link to be tested, and the request for a link to be tested includes a link identifier, called service information and a tested application identifier; determine according to the tested application identifier The corresponding application under test; send the request for the link to be tested to the application under test, so that the application under test invokes the matching target simulation service according to the called service information in the request for the link to be tested; send the link identifier to the target simulation service , obtain the target simulation data corresponding to the link identifier returned by the target simulation service; send the target simulation data to the application under test, so that the application under test can perform a simulation test according to the target simulation data to obtain the test result; receive the test result, And return the measured results to the target terminal. Therefore, the corresponding link can be identified through the link identifier in the link to be tested request, so that link simulation can be performed. This method can only simulate a specific link without affecting other links, thereby improving the link performance. Simulate Efficiency.

附图说明Description of drawings

图1为一个实施例中链路模拟测试方法的应用环境图;Fig. 1 is the application environment diagram of the link simulation test method in one embodiment;

图2为一个实施例中链路模拟测试方法的流程示意图;2 is a schematic flowchart of a link simulation test method in one embodiment;

图3为一个实施例中链路模拟测试系统的结构框图;Fig. 3 is the structural block diagram of the link simulation test system in one embodiment;

图4为另一个实施例中链路模拟测试系统的结构框图;Fig. 4 is the structural block diagram of the link simulation test system in another embodiment;

图5为一个实施例中链路模拟测试装置的结构框图;5 is a structural block diagram of a link simulation test device in one embodiment;

图6为一个实施例中计算机设备的内部结构图;Fig. 6 is the internal structure diagram of the computer device in one embodiment;

图7为一个实施例中计算机设备的内部结构图。FIG. 7 is a diagram of the internal structure of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

本申请提供的链路模拟测试方法,可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104进行通信。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。其中,被测应用、目标模拟服务可以是服务器104中一个组件或者任意个组件。The link simulation test method provided in this application can be applied to the application environment shown in FIG. 1 . The terminal 102 communicates with the server 104 through the network. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers. The application under test and the target simulation service may be one component or any component in the server 104 .

具体地,终端102向服务器104发送链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识,根据被测应用标识确定对应的被测应用,将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务,将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据,目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果,接收被测结果,并将被测结果返回至终端102。Specifically, the terminal 102 sends a link to be tested request to the server 104, the link to be tested request includes the link identifier, the called service information and the tested application identifier, and the corresponding tested application is determined according to the tested application identifier, and the link The request to be tested is sent to the application under test, so that the application under test invokes the matching target simulation service according to the called service information in the link to be tested request, sends the link identifier to the target simulation service, and obtains the link returned by the target simulation service. The target simulation data corresponding to the road sign is sent to the application under test, so that the application under test performs a simulation test according to the target simulation data, obtains the test result, receives the test result, and returns the test result to the terminal 102 .

在一个实施例中,如图2所示,提供了一种链路模拟测试方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2, a link simulation test method is provided, and the method is applied to the server in FIG. 1 as an example for description, including the following steps:

步骤202,接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识。Step 202: Receive a request for a link to be tested, where the request for a link to be tested includes a link identifier, called service information, and a tested application identifier.

步骤204,根据被测应用标识确定对应的被测应用。Step 204: Determine the corresponding tested application according to the tested application identifier.

其中,链路待测试请求是请求用来进行调用链路模拟的,可通过前端触发生成相应的链路待测试请求,链路待测试请求可以是调用链路mock请求。其中,链路待测试请求包括链路标识、被调用服务信息和被测应用标识,其中,链路标识是用来唯一标识待调用的链路,可以通过链路标识查找到匹配的链路,不同的链路对应不同的链路标识,而被调用服务信息是与被调用服务相关的所有信息,可以通过被调用服务信息确定对应的被调用服务,被调用服务信息中包括被调用服务的所有相关信息,包括被调用服务的名称、被调用服务的内容等等。The link to be tested request is a request for invoking link simulation, and a corresponding link to be tested request can be generated through a front-end trigger, and the link to be tested request can be a request to call a link mock. Wherein, the link to be tested request includes the link identifier, the called service information and the tested application identifier, wherein the link identifier is used to uniquely identify the link to be called, and the matching link can be found through the link identifier, Different links correspond to different link identifiers, and the called service information is all information related to the called service. The called service information can be used to determine the corresponding called service. The called service information includes all the information of the called service. Relevant information, including the name of the called service, the content of the called service, and so on.

其中,链路待测试请求中还包括被测应用标识,这里的被测应用标识是用来唯一标识被测应用的,所谓被测应用可以与被调用服务进行通信,被测应用内部存在相应的逻辑,链路待测试请求可以通过被测应用转发至相应的被调用服务中。进一步地,可以根据链路待测试请求中的被测应用标识确定对应的被测应用,由于不同的被测应用对应不同的被测应用标识,因此,可以通过链路待测试请求中的被测应用标识确定匹配的被测应用。Among them, the request for the link to be tested also includes the identifier of the application under test. The identifier of the application under test here is used to uniquely identify the application under test. The so-called application under test can communicate with the called service, and there is a corresponding Logic, the request for the link to be tested can be forwarded to the corresponding called service through the application under test. Further, the corresponding application under test can be determined according to the identification of the application under test in the request to be tested. Since different applications under test correspond to different identification of the application under test, the The app ID identifies the matched app under test.

在一个实施例中,根据被测应用标识确定对应的被测应用,包括:获取候选测试应用,候选测试应用包括候选测试应用标识;将与被测应用标识对应的候选测试应用标识对应的候选测试应用确定为被测应用。In one embodiment, determining the corresponding tested application according to the tested application identifier includes: acquiring candidate test applications, where the candidate test application includes the candidate test application identifier; The application is identified as the application under test.

其中,根据被测应用标识确定对应的被测应用具体可以是,获取预先存储的所有候选测试应用,其中,候选测试应用可以预先根据业务需求、实际应用场景或产品需求进行确定得到,并进行存储,各个候选测试应用都包括对应的候选测试应用标识,不同的候选测试应用对应不同的候选测试应用标识,可以通过候选测试应用标识查找确定对应的候选测试应用。进一步地,可以根据被测应用标识与候选测试应用标识确定匹配的被测应用,具体可以是,比较候选测试应用标识与被测应用标识是否相同,将与被测应用标识相同的候选测试应用标识对应的候选测试应用,确定为与被测应用标识对应的被测应用。Wherein, determining the corresponding tested application according to the tested application identifier may specifically be: acquiring all pre-stored candidate test applications, wherein the candidate test applications may be determined in advance according to business requirements, actual application scenarios or product requirements, and stored , each candidate test application includes a corresponding candidate test application identifier, different candidate test applications correspond to different candidate test application identifiers, and the corresponding candidate test application can be determined by searching through the candidate test application identifiers. Further, the matched application under test can be determined according to the identification of the application under test and the identification of the candidate test application. Specifically, it can be compared whether the identification of the candidate test application and the identification of the application under test are the same, and the identification of the candidate test application that is the same as the identification of the application under test is determined. The corresponding candidate test application is determined to be the tested application corresponding to the tested application identifier.

步骤206,将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务。Step 206 , sending the request for the link to be tested to the application under test, so that the application under test invokes the matched target simulation service according to the called service information in the request for the link to be tested.

步骤208,将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据。Step 208: Send the link identifier to the target simulation service, and obtain the target simulation data corresponding to the link identifier returned by the target simulation service.

其中,在根据被测应用标识确定对应的被测应用后,因为链路待测试请求可以通过被测应用转发至相应的被调用服务中,可以将链路待测试请求发送至被测应用,被测应用接收到链路待测试请求后,可以根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务。其中,被调用服务信息是与被调用服务相关的所有信息,可以通过被调用服务信息确定对应的被调用服务,被调用服务信息中包括被调用服务的所有相关信息,包括被调用服务的名称、被调用服务的内容等等。After the corresponding application under test is determined according to the identifier of the application under test, because the request for the link to be tested can be forwarded to the corresponding called service through the application under test, the request for the link to be tested can be sent to the application under test, and the After receiving the link to be tested request, the test application can invoke the matched target simulation service according to the called service information in the link to be tested request. The called service information is all information related to the called service, and the corresponding called service can be determined through the called service information. The called service information includes all relevant information of the called service, including the name of the called service, The content of the called service, etc.

进一步地,在确定目标模拟服务后,可以将链路待测试请求发送至目标模拟服务,目标模拟服务接收到链路待测试请求后,根据链路待测试请求中的链路标识查找匹配的目标模拟数据,由于可以预先将候选链路标识与对应的候选模拟数据进行关联存储,因此,目标模拟服务在接收到链路待测试请求后,可以根据链路标识获取对应的目标模拟数据。Further, after determining the target simulation service, the request for the link to be tested can be sent to the target simulation service, and after the target simulation service receives the request for the link to be tested, it searches for a matching target according to the link identifier in the request for the link to be tested. As for the simulation data, since the candidate link identifiers and the corresponding candidate simulation data can be associated and stored in advance, the target simulation service can obtain the corresponding target simulation data according to the link identifiers after receiving the link to be tested request.

在一个实施例中,获取目标模拟服务返回的与链路标识对应的目标模拟数据,包括:目标模拟服务获取候选模拟数据,候选模拟数据包括对应的候选链路标识,目标模拟服务将与链路标识相同的候选链路标识对应的候选模拟数据确定为目标模拟数据,并返回。In one embodiment, acquiring the target simulation data corresponding to the link identifier returned by the target simulation service includes: the target simulation service obtains candidate simulation data, the candidate simulation data includes the corresponding candidate link identifier, and the target simulation service associates the link with the link identifier. The candidate simulation data corresponding to the same candidate link identifier is determined as the target simulation data, and returned.

其中,获取目标模拟服务返回的与链路标识对应的目标模拟数据具体还可以是,目标模拟服务预先获取所有存储的候选模拟数据,各个候选模拟数据都包括对应的候选链路标识,候选模拟数据与相应的候选链路标识之间的关系可以预先根据业务需求、实际应用场景或产品需求进行确定得到,并进行关联存储。Wherein, obtaining the target simulation data corresponding to the link identifier returned by the target simulation service may specifically be that the target simulation service obtains all stored candidate simulation data in advance, and each candidate simulation data includes the corresponding candidate link identifier, and the candidate simulation data The relationship with the corresponding candidate link identifiers can be determined in advance according to business requirements, actual application scenarios or product requirements, and associated storage is performed.

进一步地,可以根据各个候选模拟数据对应的候选链路标识与链路待测试请求中的链路标识确定目标模拟数据,具体可以是,比较候选链路标识与链路待测试请求中的链路标识是否相同,将与链路待测试请求中的链路标识相同的候选链路标识对应的候选模拟数据,确定与目标模拟数据,并通过通信返回至执行主体服务器中。Further, the target simulation data can be determined according to the candidate link identifier corresponding to each candidate simulation data and the link identifier in the link to be tested request, specifically, the candidate link identifier and the link in the link to be tested request are compared. Whether the identifiers are the same, determine the candidate simulation data corresponding to the candidate link identifier that is the same as the link identifier in the link to be tested request, determine the target simulation data, and return it to the execution subject server through communication.

步骤210,将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果。Step 210 , sending the target simulation data to the application under test, so that the application under test performs a simulation test according to the target simulation data to obtain a test result.

步骤212,接收被测结果,并将被测结果返回至目标终端。Step 212: Receive the measured result, and return the measured result to the target terminal.

其中,在获取到目标模拟数据后,将目标模拟数据发送至被测应用,被测应用可以根据目标模拟数据进行模拟测试,得到被测结果。具体可以是,被测应用通过内部预先确定好的内部逻辑以及结合目标模拟数据进行模拟测试,从而得到被测结果。Wherein, after acquiring the target simulation data, the target simulation data is sent to the application under test, and the application under test can perform a simulation test according to the target simulation data to obtain the test result. Specifically, the application to be tested can obtain the tested result by performing a simulated test through internally predetermined internal logic and in combination with the target simulated data.

进一步地,被测应用可以将被测结果发送至执行主体服务器,通过执行主体服务器将被测结果返回至目标终端。其中,这里的目标终端可以是链路待测试请求对应的请求终端,还可以是其他终端,具体可以根据实际业务需求、应用场景进行确定得到。Further, the application under test can send the test result to the execution body server, and return the test result to the target terminal through the execution body server. The target terminal here may be the requesting terminal corresponding to the request for the link to be tested, or may be other terminals, which may be determined according to actual service requirements and application scenarios.

上述链路模拟测试方法中,接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识;根据被测应用标识确定对应的被测应用;将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据;将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果;接收被测结果,并将被测结果返回至目标终端。因此,通过链路待测试请求中的链路标识能够识别出对应的链路,从而进行链路模拟,这种方式能够只针对特定的链路进行模拟,不影响其他链路,从而提高链路模拟效率。In the above-mentioned link simulation testing method, a request for a link to be tested is received, and the request for a link to be tested includes a link identifier, called service information, and a tested application identifier; the corresponding tested application is determined according to the tested application identifier; The request to be tested is sent to the application under test, so that the application under test invokes the matching target simulation service according to the called service information in the link to be tested request; the link identifier is sent to the target simulation service, and the link returned by the target simulation service is obtained. The target simulation data corresponding to the road sign; send the target simulation data to the application under test, so that the application under test can perform a simulation test according to the target simulation data to obtain the test result; receive the test result and return the test result to the target terminal . Therefore, the corresponding link can be identified through the link identifier in the link to be tested request, so that link simulation can be performed. This method can only simulate a specific link without affecting other links, thereby improving the link performance. Simulate Efficiency.

在一个实施例中,链路模拟测试方法还包括:获取链路待测试请求对应的测试请求参数,将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,发送至缓存区域进行缓存。In one embodiment, the link simulation test method further includes: acquiring test request parameters corresponding to the link to be tested request, and determining the target simulation data, the test request parameters and the test result as a link record corresponding to the link identifier, Sent to the cache area for caching.

其中,链路待测试请求包括对应的测试请求参数,这里的测试请求参数是与链路待测试请求相关的所有参数信息,获取链路待测试请求对应的测试请求参数,将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,发送至缓存区域进行缓存。其中,将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,具体可以是将目标模拟参数、被测结果、目标模拟数据一起封装,组成链路标识对应的链路记录,发送至缓存区域进行缓存。其中,缓存区域可以是执行主体服务器中的一个组件或者任意个组件,也可以是单独的缓存设备。Among them, the link to be tested request includes corresponding test request parameters, where the test request parameters are all parameter information related to the link to be tested request, obtain the test request parameters corresponding to the link to be tested request, and simulate the target data, test The request parameters and the measured results are determined as link records corresponding to the link identifiers, and are sent to the cache area for caching. The target simulation data, the test request parameters and the measured results are determined as link records corresponding to the link identifiers. Specifically, the target simulation parameters, the measured results, and the target simulation data can be encapsulated together to form the link records corresponding to the link identifiers. Link records are sent to the cache area for caching. The cache area may be one component or any component in the execution main server, or may be a separate cache device.

应该理解的是,虽然上述流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,上述流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the above flow charts are displayed in sequence according to the arrows, these steps are not necessarily executed in the sequence indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in the above flow chart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The order of execution is also not necessarily sequential, but may be performed alternately or alternately with other steps or sub-steps of other steps or at least a portion of a phase.

在一个实施例中,如图3所示,提供了一种链路模拟测试系统300,包括:In one embodiment, as shown in FIG. 3, a link simulation test system 300 is provided, including:

链路模拟测试设备302,用于接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识,根据被测应用标识确定对应的被测应用,将链路待测试请求发送至被测应用。The link simulation test device 302 is configured to receive a request for a link to be tested, where the request for a link to be tested includes a link identifier, called service information and a tested application identifier, determines a corresponding tested application according to the tested application identifier, and links the link to the tested application. A request to be tested is sent to the application under test.

被测应用304,用于根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务。The application under test 304 is configured to invoke the matched target simulation service according to the invoked service information in the link to be tested request.

链路模拟测试设备302,用于将链路标识发送至目标模拟服务306。The link simulation test equipment 302 is used for sending the link identification to the target simulation service 306 .

目标模拟服务306,用于获取与链路标识对应的目标模拟数据。并返回至链路模拟测试设备。The target simulation service 306 is used to obtain target simulation data corresponding to the link identifier. and back to the link emulation test equipment.

链路模拟测试设备302,用于将目标模拟数据发送至被测应用。The link simulation test equipment 302 is used for sending the target simulation data to the application under test.

被测应用304,用于根据目标模拟数据进行模拟测试,得到被测结果,并返回至链路模拟测试设备。The application under test 304 is used to perform a simulation test according to the target simulation data, obtain the test result, and return it to the link simulation test device.

链路模拟测试设备302,用于接收被测结果,并将被测结果返回至目标终端。The link simulation test equipment 302 is used for receiving the test result and returning the test result to the target terminal.

其中,被测应用、目标模拟服务可以是单独的功能设备,也可以是链路模拟测试设备中的一个组件或者任意个组件,在此不作任何限制,可根据实际业务需求、产品需求或应用场景进行确定。Among them, the application under test and the target simulation service can be a separate functional device, or a component or any component in the link simulation test device. There are no restrictions here, and can be based on actual business requirements, product requirements or application scenarios. Make sure.

在一个实施例中,如图4所示,链路模拟测试系统300还包括:In one embodiment, as shown in FIG. 4 , the link simulation test system 300 further includes:

链路设置设备308,用于发送链路设置请求至链路数据缓存设备,链路设置请求包括待设置链路标识和相应的设置链路模拟数据。The link setting device 308 is configured to send a link setting request to the link data buffering device, where the link setting request includes the identifier of the link to be set and the corresponding setting link simulation data.

链路数据缓存设备310,用于根据链路设置请求将待设置链路标识与设置链路模拟数据进行关联存储。The link data cache device 310 is configured to associate and store the link identifier to be set and the set link simulation data according to the link setting request.

其中,链路模拟测试系统300还包括链路设置设备308,链路设置设备308用于发送链路设置请求至链路数据缓存设备310,其中,链路设置请求是用来请求设置链路的,可通过链路设置请求设置链路标识与相应的链路模拟数据,其中链路设置请求包括待设置链路标识和相应的设置链路模拟数据,待设置链路标识与相应的设置链路模拟数据之间的关系可以根据业务需求、实际应用场景或产品需求进行确定得到。Wherein, the link simulation test system 300 further includes a link setting device 308, and the link setting device 308 is used for sending a link setting request to the link data buffering device 310, wherein the link setting request is used for requesting to set a link , the link identification and the corresponding link simulation data can be set through the link setting request, wherein the link setting request includes the link identification to be set and the corresponding setting link simulation data, the link identification to be set and the corresponding setting link The relationship between simulated data can be determined according to business requirements, actual application scenarios or product requirements.

进一步地,链路数据缓存设备310接收到链路设置请求后,可以根据链路设置请求将待设置链路标识与设置链路模拟数据进行关联存储,以便后续应用。Further, after receiving the link setting request, the link data caching device 310 can associate and store the link identifier to be set and the setting link simulation data according to the link setting request for subsequent application.

在一个实施例中,链路模拟测试设备,还用于获取链路待测试请求对应的测试请求参数,将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,发送至链路数据缓存设备进行缓存,目标终端,还用于发送当前链路记录获取请求至链路数据缓存设备,当前链路记录获取请求包括当前链路标识,链路数据缓存设备,还用于根据当前链路记录获取请求查找与当前链路标识对应的当前链路记录,并返回至目标终端,目标终端,还用于接收当前链路记录。In one embodiment, the link simulation test device is further configured to obtain test request parameters corresponding to the link to be tested request, and to determine the target simulation data, test request parameters, and test results as a link record corresponding to the link identifier , sent to the link data buffer device for buffering, and the target terminal is also used to send a current link record acquisition request to the link data buffer device, where the current link record acquisition request includes the current link identifier, the link data buffer device, and also It is used to search for the current link record corresponding to the current link identifier according to the current link record acquisition request, and return to the target terminal. The target terminal is also used to receive the current link record.

其中,链路待测试请求包括对应的测试请求参数,这里的测试请求参数是与链路待测试请求相关的所有参数信息,链路模拟测试设备获取链路待测试请求对应的测试请求参数,将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,发送至链路数据缓存设备进行缓存。其中,将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,具体可以是将目标模拟参数、被测结果、目标模拟数据一起封装,组成链路标识对应的链路记录,发送至链路数据缓存设备进行缓存。The link to be tested request includes corresponding test request parameters, where the test request parameter is all parameter information related to the link to be tested request, and the link simulation test device obtains the test request parameter corresponding to the link to be tested request, The target simulation data, test request parameters, and test results are determined as link records corresponding to the link identifiers, and are sent to the link data buffering device for buffering. The target simulation data, the test request parameters and the measured results are determined as link records corresponding to the link identifiers. Specifically, the target simulation parameters, the measured results, and the target simulation data can be encapsulated together to form the link records corresponding to the link identifiers. The link record is sent to the link data buffering device for buffering.

进一步地,在应用过程中,目标终端可以发送当前链路记录获取请求至链路数据缓存设备,其中的当前链路记录获取请求是目前用来请求获取当前链路记录的,当前链路记录获取请求包括当前链路标识。链路数据缓存设备接收到当前链路记录获取请求后,根据当前链路记录获取请求查找与当前链路标识对应的当前链路记录,并返回至目标终端,目标终端,还用于接收当前链路记录。其中,链路标识与链路记录之间是关联存储的,可以通过链路标识查找到对应的链路记录,不同的链路记录对应不同的链路标识。Further, in the application process, the target terminal can send a current link record acquisition request to the link data cache device, where the current link record acquisition request is currently used to request the acquisition of the current link record, and the current link record acquisition The request includes the current link identification. After receiving the current link record acquisition request, the link data cache device searches for the current link record corresponding to the current link identifier according to the current link record acquisition request, and returns it to the target terminal. The target terminal is also used to receive the current link record. road record. The link identifier and the link record are stored in association, and the corresponding link record can be found through the link identifier, and different link records correspond to different link identifiers.

在一个实施例中,如图5所示,提供了一种链路模拟测试装置500,包括:测试请求接收模块502、被测应用确定模块504、测试请求发送模块506、链路标识发送模块508、模拟数据发送模块510和被测结果接收模块512,其中:In one embodiment, as shown in FIG. 5 , a link simulation test device 500 is provided, including: a test request receiving module 502 , a tested application determination module 504 , a test request sending module 506 , and a link identification sending module 508 , the analog data sending module 510 and the measured result receiving module 512, wherein:

测试请求接收模块502,用于接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识。The test request receiving module 502 is configured to receive a link to be tested request, where the link to be tested request includes the link identifier, the called service information and the tested application identifier.

被测应用确定模块504,用于根据被测应用标识确定对应的被测应用。The tested application determination module 504 is configured to determine the corresponding tested application according to the tested application identifier.

测试请求发送模块506,用于将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务。The test request sending module 506 is configured to send the request for the link to be tested to the application under test, so that the application under test invokes the matching target simulation service according to the called service information in the request for the link to be tested.

链路标识发送模块508,用于将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据。The link identification sending module 508 is configured to send the link identification to the target simulation service, and obtain the target simulation data corresponding to the link identification returned by the target simulation service.

模拟数据发送模块510,用于将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果。The simulation data sending module 510 is configured to send the target simulation data to the application under test, so that the application under test performs a simulation test according to the target simulation data to obtain the test result.

被测结果接收模块512,用于接收被测结果,并将被测结果返回至目标终端。The tested result receiving module 512 is configured to receive the tested result and return the tested result to the target terminal.

在一个实施例中,链路模拟测试装置500还用于获取链路待测试请求对应的测试请求参数,将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,发送至缓存区域进行缓存。In one embodiment, the link simulation test apparatus 500 is further configured to obtain test request parameters corresponding to the link to be tested request, and to determine the target simulation data, test request parameters, and test results as a link record corresponding to the link identifier , sent to the buffer area for buffering.

在一个实施例中,被测应用确定模块504还用于获取候选测试应用,候选测试应用包括候选测试应用标识,将与被测应用标识对应的候选测试应用标识对应的候选测试应用确定为被测应用。In one embodiment, the application under test determination module 504 is further configured to acquire candidate test applications, where the candidate test applications include a candidate test application identifier, and determine the candidate test application corresponding to the candidate test application identifier corresponding to the identifier of the application under test as the test application under test application.

关于链路模拟测试装置的具体限定可以参见上文中对于链路模拟测试方法的限定,在此不再赘述。上述链路模拟测试装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the link simulation test apparatus, reference may be made to the limitation of the link simulation test method above, which will not be repeated here. All or part of the modules in the above-mentioned link simulation test device can be implemented by software, hardware, and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储被测结果。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种链路模拟测试方法。In one embodiment, a computer device is provided, the computer device may be a server, and its internal structure diagram may be as shown in FIG. 6 . The computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The computer equipment's database is used to store the measured results. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by a processor, implements a link simulation testing method.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图7所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种链路模拟测试方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 7 . The computer equipment includes a processor, memory, a network interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by a processor, implements a link simulation testing method. The display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.

本领域技术人员可以理解,图6或图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 6 or FIG. 7 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. A computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识;根据被测应用标识确定对应的被测应用;将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据;将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果;接收被测结果,并将被测结果返回至目标终端。In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program: receiving a request for a link to be tested , the link to be tested request includes the link identifier, the called service information and the tested application identifier; the corresponding tested application is determined according to the tested application identifier; the link to be tested request is sent to the tested application, so that the tested application Invoke the matching target simulation service according to the called service information in the link to be tested request; send the link identifier to the target simulation service, and obtain the target simulation data corresponding to the link identifier returned by the target simulation service; send the target simulation data to The application under test, so that the application under test performs a simulation test according to the target simulation data to obtain the test result; receives the test result, and returns the test result to the target terminal.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:获取链路待测试请求对应的测试请求参数;将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,发送至缓存区域进行缓存。In one embodiment, the processor further implements the following steps when executing the computer program: acquiring test request parameters corresponding to the link to be tested request; determining target simulation data, test request parameters, and test results as the link corresponding to the link identifier Road records are sent to the cache area for caching.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:获取候选测试应用,候选测试应用包括候选测试应用标识;将与被测应用标识对应的候选测试应用标识对应的候选测试应用确定为被测应用。In one embodiment, the processor further implements the following steps when executing the computer program: acquiring candidate test applications, where the candidate test applications include candidate test application identifiers; and determining the candidate test applications corresponding to the candidate test application identifiers corresponding to the tested application identifiers as application under test.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:目标模拟服务获取候选模拟数据,候选模拟数据包括对应的候选链路标识;目标模拟服务将与链路标识相同的候选链路标识对应的候选模拟数据确定为目标模拟数据,并返回。In one embodiment, the processor further implements the following steps when executing the computer program: the target simulation service obtains candidate simulation data, where the candidate simulation data includes the corresponding candidate link identifiers; the target simulation service uses the candidate link identifiers that are the same as the link identifiers The corresponding candidate simulation data is determined as the target simulation data and returned.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:接收链路待测试请求,链路待测试请求包括链路标识、被调用服务信息和被测应用标识;根据被测应用标识确定对应的被测应用;将链路待测试请求发送至被测应用,以使得被测应用根据链路待测试请求中被调用服务信息调用匹配的目标模拟服务;将链路标识发送至目标模拟服务,获取目标模拟服务返回的与链路标识对应的目标模拟数据;将目标模拟数据发送至被测应用,以使得被测应用根据目标模拟数据进行模拟测试,得到被测结果;接收被测结果,并将被测结果返回至目标终端。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: receiving a request for a link to be tested, and the request for a link to be tested includes a link identifier , the called service information and the tested application identifier; determine the corresponding tested application according to the tested application identifier; send the link to be tested request to the tested application, so that the tested application is called according to the link to be tested request in the service called service The information calls the matching target simulation service; sends the link ID to the target simulation service, and obtains the target simulation data corresponding to the link ID returned by the target simulation service; sends the target simulation data to the application under test, so that the application under test can The target simulation data is simulated and tested to obtain the tested result; the tested result is received, and the tested result is returned to the target terminal.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:获取链路待测试请求对应的测试请求参数;将目标模拟数据、测试请求参数和被测结果确定为与链路标识对应的链路记录,发送至缓存区域进行缓存。In one embodiment, the processor further implements the following steps when executing the computer program: acquiring test request parameters corresponding to the link to be tested request; determining target simulation data, test request parameters, and test results as the link corresponding to the link identifier Road records are sent to the cache area for caching.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:获取候选测试应用,候选测试应用包括候选测试应用标识;将与被测应用标识对应的候选测试应用标识对应的候选测试应用确定为被测应用。In one embodiment, the processor further implements the following steps when executing the computer program: acquiring candidate test applications, where the candidate test applications include candidate test application identifiers; and determining the candidate test applications corresponding to the candidate test application identifiers corresponding to the tested application identifiers as application under test.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:目标模拟服务获取候选模拟数据,候选模拟数据包括对应的候选链路标识;目标模拟服务将与链路标识相同的候选链路标识对应的候选模拟数据确定为目标模拟数据,并返回。In one embodiment, the processor further implements the following steps when executing the computer program: the target simulation service obtains candidate simulation data, where the candidate simulation data includes the corresponding candidate link identifiers; the target simulation service uses the candidate link identifiers that are the same as the link identifiers The corresponding candidate simulation data is determined as the target simulation data and returned.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

1. A link simulation test method, the method comprising:
receiving a link to-be-tested request, wherein the link to-be-tested request comprises a link identifier, called service information and a tested application identifier, the link identifier is used for uniquely identifying a link to be called, the called service information is information matched with a called service, and the tested application identifier is used for uniquely identifying a tested application;
determining a corresponding application to be tested according to the application to be tested identifier;
sending the link to-be-tested request to the to-be-tested application so that the to-be-tested application calls the matched target simulation service according to the called service information in the link to-be-tested request;
sending the link identification to the target simulation service, and acquiring target simulation data corresponding to the link identification returned by the target simulation service;
sending the target simulation data to the application to be tested so that the application to be tested performs simulation test according to the target simulation data to obtain a tested result;
and receiving the measured result and returning the measured result to the target terminal.
2. The method of claim 1, further comprising:
acquiring a test request parameter corresponding to the link to-be-tested request;
and determining the target simulation data, the test request parameters and the tested result as link records corresponding to the link identifiers, and sending the link records to a cache region for caching.
3. The method of claim 1, wherein determining the corresponding application under test according to the application under test identifier comprises:
obtaining a candidate test application, wherein the candidate test application comprises a candidate test application identifier;
and determining the candidate test application corresponding to the candidate test application identifier corresponding to the tested application identifier as the tested application.
4. The method of claim 1, wherein the obtaining target simulation data corresponding to the link identifier returned by the target simulation service comprises:
the target simulation service acquires candidate simulation data, wherein the candidate simulation data comprises corresponding candidate link identifications;
and the target simulation service determines the candidate simulation data corresponding to the candidate link identification which is the same as the link identification as the target simulation data and returns the target simulation data.
5. A link simulation test system, the system comprising:
the link simulation test device is used for receiving a link to-be-tested request, determining a corresponding tested application according to the tested application identifier, and sending the link to-be-tested request to the tested application, wherein the link identifier is used for uniquely identifying the link to be called, the called service information is information matched with the called service, and the tested application identifier is used for uniquely identifying the tested application;
the tested application is used for calling matched target simulation service according to the called service information in the link to-be-tested request;
the link simulation test equipment is used for sending the link identification to the target simulation service;
the target simulation service is used for acquiring target simulation data corresponding to the link identification and returning the target simulation data to the link simulation test equipment;
the link simulation test equipment is used for sending the target simulation data to the application to be tested;
the tested application is used for carrying out simulation test according to the target simulation data to obtain a tested result and returning the tested result to the link simulation test equipment;
and the link simulation test equipment is used for receiving the tested result and returning the tested result to the target terminal.
6. The system of claim 5, further comprising:
the link setting device is used for sending a link setting request to the link data caching device, wherein the link setting request comprises a link identifier to be set and corresponding link simulation data to be set;
and the link data caching device is used for storing the link identifier to be set and the set link simulation data in a correlation manner according to the link setting request.
7. The system of claim 6, wherein the link simulation test device is further configured to obtain a test request parameter corresponding to the link request to be tested; determining the target simulation data, the test request parameters and the tested result as link records corresponding to the link identifications, and sending the link records to link data caching equipment for caching;
the target terminal is further configured to send a current link record acquisition request to the link data caching device, where the current link record acquisition request includes a current link identifier;
the link data caching device is further configured to search a current link record corresponding to the current link identifier according to the current link record acquisition request, and return the current link record to the target terminal;
the target terminal is further configured to receive the current link record.
8. A link simulation test apparatus, the apparatus comprising:
the system comprises a test request receiving module, a test request receiving module and a test application receiving module, wherein the link to-be-tested request comprises a link identifier, called service information and a tested application identifier, the link identifier is used for uniquely identifying a link to be called, the called service information is information matched with a called service, and the tested application identifier is used for uniquely identifying a tested application;
the tested application determining module is used for determining the corresponding tested application according to the tested application identifier;
the test request sending module is used for sending the link to-be-tested request to the tested application so that the tested application calls the matched target simulation service according to the called service information in the link to-be-tested request;
the link identification sending module is used for sending the link identification to the target simulation service and acquiring target simulation data which is returned by the target simulation service and corresponds to the link identification;
the simulation data sending module is used for sending the target simulation data to the application to be tested so that the application to be tested performs simulation test according to the target simulation data to obtain a tested result;
and the measured result receiving module is used for receiving the measured result and returning the measured result to the target terminal.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 4 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN202011475159.0A 2020-12-14 2020-12-14 Link simulation test method, device, system, computer equipment and storage medium Active CN112637008B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011475159.0A CN112637008B (en) 2020-12-14 2020-12-14 Link simulation test method, device, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011475159.0A CN112637008B (en) 2020-12-14 2020-12-14 Link simulation test method, device, system, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112637008A CN112637008A (en) 2021-04-09
CN112637008B true CN112637008B (en) 2022-08-09

Family

ID=75313733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011475159.0A Active CN112637008B (en) 2020-12-14 2020-12-14 Link simulation test method, device, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112637008B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946502B (en) * 2021-09-07 2025-03-04 北京达佳互联信息技术有限公司 A testing method, device, electronic device and storage medium
CN113918454A (en) * 2021-09-30 2022-01-11 广州品唯软件有限公司 A baffle testing method, device, equipment and computer storage medium
CN113946508A (en) * 2021-10-14 2022-01-18 广州品唯软件有限公司 Function testing method and device
CN114281684A (en) * 2021-12-14 2022-04-05 广州品唯软件有限公司 Mock data processing method, system, mock platform and readable storage medium
CN115174383B (en) * 2022-05-30 2024-03-22 青岛海尔科技有限公司 Equipment update method, storage medium and electronic device
CN116795723B (en) * 2023-08-21 2023-11-21 建信金融科技有限责任公司 Chain unit test processing method and device and computer equipment
CN117761736A (en) * 2023-12-13 2024-03-26 湖南矩阵电子科技有限公司 Navigation signal simulator test method, system, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765024A (en) * 2019-10-29 2020-02-07 百度在线网络技术(北京)有限公司 Simulation test method, simulation test device, electronic equipment and computer-readable storage medium
CN111611121A (en) * 2020-04-09 2020-09-01 浙江口碑网络技术有限公司 Hardware simulation test method, device and equipment
WO2020236469A1 (en) * 2019-05-17 2020-11-26 Citrix Systems, Inc. Systems and methods for managing client requests to access services provided by a data center

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11018964B2 (en) * 2016-01-19 2021-05-25 Tektronix, Inc. Selective extraction of network link training information
CN108400901B (en) * 2018-01-02 2020-11-24 深圳壹账通智能科技有限公司 Application test method, terminal device and computer-readable storage medium
CN111711544B (en) * 2020-05-15 2021-11-09 北京奇艺世纪科技有限公司 Link dial testing method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020236469A1 (en) * 2019-05-17 2020-11-26 Citrix Systems, Inc. Systems and methods for managing client requests to access services provided by a data center
CN110765024A (en) * 2019-10-29 2020-02-07 百度在线网络技术(北京)有限公司 Simulation test method, simulation test device, electronic equipment and computer-readable storage medium
CN111611121A (en) * 2020-04-09 2020-09-01 浙江口碑网络技术有限公司 Hardware simulation test method, device and equipment

Also Published As

Publication number Publication date
CN112637008A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN112637008B (en) Link simulation test method, device, system, computer equipment and storage medium
CN108446116B (en) Application program page generation method and device, computer equipment and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN109460527B (en) Product data configuration method, device, computer equipment and storage medium
CN108920354B (en) Embedded point management method and device, computer equipment and storage medium
CN110008118A (en) Page data testing method, apparatus, computer equipment and storage medium
CN111581271A (en) Interface parameter determination method and device, computer equipment and storage medium
CN108804159B (en) Javascript module loading method and preprocessing method and device thereof, and computer equipment
CN109586948A (en) Update method, apparatus, computer equipment and the storage medium of system configuration data
CN108874661B (en) Test mapping relation library generation method and device, computer equipment and storage medium
CN109726134B (en) Interface test method and system
CN112860457B (en) Software development kit calling method, device, computer equipment and storage medium
CN112380130A (en) Application testing method and device based on call dependency relationship
CN110365724B (en) Task processing method and device and electronic equipment
CN110659938A (en) Method and device for determining promotion channel, computer equipment and storage medium
CN112783866A (en) Data reading method and device, computer equipment and storage medium
WO2020199594A1 (en) Service component loading method and apparatus, and computer device and storage medium
CN110955608A (en) Test data processing method and device, computer equipment and storage medium
CN111399833A (en) Service data processing method and device, computer equipment and storage medium
CN108304289B (en) Terminal fingerprint testing method, device, computer equipment and storage medium
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN112256252A (en) Interface generation method and device, storage medium and electronic equipment
CN112463630A (en) Version difference testing method and device, computer equipment and storage medium
CN114238119B (en) Automated testing method and system for Android applications and storage medium
CN112783759B (en) White box test task execution method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载