





技术领域technical field
本公开涉及人工智能技术领域,尤其涉及测试技术领域,更具体地,本公开提供了一种接口测试方法、装置、电子设备、存储介质以及计算机程序产品。The present disclosure relates to the technical field of artificial intelligence, and in particular to the technical field of testing. More specifically, the present disclosure provides an interface testing method, device, electronic equipment, storage medium and computer program product.
背景技术Background technique
随着软件系统复杂度的提升,常规功能测试的片面性及滞后性导致测试成本增加,且测试效率大幅度下降,仅靠功能测试已难以保证项目质量及进度。而接口测试的应用,能够使测试团队更早、更深入地介入项目,进而使测试人员在项目初期发现系统深层次的问题,降低问题修复的时间成本。As the complexity of software systems increases, the one-sidedness and lag of conventional functional testing lead to increased testing costs and a significant drop in testing efficiency. Functional testing alone is no longer able to guarantee project quality and progress. The application of interface testing can enable the test team to intervene in the project earlier and more deeply, and then enable testers to discover deep-seated problems in the system at the early stage of the project, reducing the time cost of problem repair.
发明内容Contents of the invention
本公开提供了一种接口测试方法、装置、电子设备、存储介质以及计算机程序产品。The disclosure provides an interface testing method, device, electronic equipment, storage medium and computer program product.
根据本公开的一方面,提供了一种接口测试方法,包括:响应于接收到测试指令,根据测试指令,确定针对待测试接口的至少一个目标测试用例;根据至少一个目标测试用例,确定测试任务;根据本地剩余资源信息和执行测试任务所需的需求资源信息,确定测试任务是否满足远程处理条件;以及在确定测试任务满足远程处理条件的情况下,调用远程资源处理测试任务,以得到针对待测试接口的测试信息。According to an aspect of the present disclosure, an interface testing method is provided, including: in response to receiving a test instruction, according to the test instruction, determining at least one target test case for the interface to be tested; according to the at least one target test case, determining the test task ; Determine whether the test task satisfies the remote processing condition according to the local remaining resource information and the required resource information for executing the test task; Test information of the test interface.
根据本公开的另一方面,提供了一种接口测试装置,包括:第一确定模块、第二确定模块、第三确定模块以及调用模块。第一确定模块用于响应于接收到测试指令,根据测试指令,确定针对待测试接口的至少一个目标测试用例。第二确定模块用于根据至少一个目标测试用例,确定测试任务。第三确定模块用于根据本地剩余资源信息和执行测试任务所需的需求资源信息,确定测试任务是否满足远程处理条件。调用模块用于在确定测试任务满足远程处理条件的情况下,调用远程资源处理测试任务,以得到针对待测试接口的测试信息。According to another aspect of the present disclosure, an interface testing device is provided, including: a first determining module, a second determining module, a third determining module, and a calling module. The first determining module is configured to determine at least one target test case for the interface to be tested according to the test instruction in response to receiving the test instruction. The second determination module is used for determining the test task according to at least one target test case. The third determination module is used to determine whether the test task satisfies the remote processing condition according to the local remaining resource information and the required resource information required to execute the test task. The invoking module is used for invoking the remote resource to process the test task when it is determined that the test task satisfies the remote processing condition, so as to obtain the test information for the interface to be tested.
根据本公开的另一个方面,提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行本公开提供的方法。According to another aspect of the present disclosure, an electronic device is provided, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are At least one processor executes, so that at least one processor can execute the method provided by the present disclosure.
根据本公开的另一个方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行本公开提供的方法。According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method provided in the present disclosure.
根据本公开的另一个方面,提供了一种计算机程序产品,包括计算机程序,计算机程序在被处理器执行时实现本公开提供的方法。According to another aspect of the present disclosure, there is provided a computer program product including a computer program, and the computer program implements the method provided in the present disclosure when executed by a processor.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood through the following description.
附图说明Description of drawings
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution, and do not constitute a limitation to the present disclosure. in:
图1是根据本公开实施例的接口测试方法和装置的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of an interface testing method and device according to an embodiment of the present disclosure;
图2是根据本公开实施例的接口测试方法的示意流程图;2 is a schematic flow chart of an interface testing method according to an embodiment of the present disclosure;
图3是根据本公开实施例的单接口测试方法的示意原理图;3 is a schematic schematic diagram of a single interface testing method according to an embodiment of the present disclosure;
图4是根据本公开实施例的多接口测试方法的示意原理图;4 is a schematic schematic diagram of a multi-interface testing method according to an embodiment of the present disclosure;
图5是根据本公开实施例的接口测试装置的示意结构框图;以及5 is a schematic structural block diagram of an interface testing device according to an embodiment of the present disclosure; and
图6是用来实施本公开实施例的接口测试方法的电子设备的结构框图。Fig. 6 is a structural block diagram of an electronic device for implementing the interface testing method of the embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
图1是根据本公开实施例的接口测试方法和装置的应用场景示意图。Fig. 1 is a schematic diagram of an application scenario of an interface testing method and device according to an embodiment of the present disclosure.
需要注意的是,图1所示仅为可以应用本公开实施例的系统架构的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。It should be noted that, what is shown in FIG. 1 is only an example of the system architecture to which the embodiments of the present disclosure can be applied, so as to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other device, system, environment or scenario.
如图1所示,根据该实施例的系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线和/或无线通信链路等等。As shown in FIG. 1 , a
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。Users can use
服务器105可以是提供各种服务的服务器,例如对用户利用终端设备101、102、103所浏览的网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的用户请求等数据进行分析等处理,并将处理结果(例如根据前端页面的配置信息生成的测试信息等)反馈给终端设备。The
需要说明的是,本公开实施例所提供的接口测试方法一般可以由服务器105执行。相应地,本公开实施例所提供的接口测试装置一般可以设置于服务器105中。本公开实施例所提供的接口测试方法也可以由不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群执行。相应地,本公开实施例所提供的接口测试装置也可以设置于不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群中。It should be noted that, generally, the interface testing method provided by the embodiment of the present disclosure may be executed by the
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
图2是根据本公开实施例的接口测试方法的示意流程图。Fig. 2 is a schematic flowchart of an interface testing method according to an embodiment of the present disclosure.
如图2所示,本实施例中,接口测试方法200用于对接口进行测试,待测试接口的数量为至少一个,该接口测试方法可以对进行单个接口进行测试,也可以进行多个接口进行测试。该接口测试方法200可以包括操作S210~操作S240。As shown in Figure 2, in this embodiment, the
在操作S210,响应于接收到测试指令,根据测试指令,确定针对待测试接口的至少一个目标测试用例。In operation S210, in response to receiving the test instruction, at least one target test case for the interface to be tested is determined according to the test instruction.
例如,对象可以在前端页面进行输入、选择、点击、拖拽等操作来配置需要的目标信息,对象可以是用户,目标信息例如包括配置信息和/或测试用例标识。对象还可以在完成配置之后在前端页面点击确认或者保存按钮,该操作可以触发测试指令,且测试指令中包括对象在前端页面配置的目标信息。接下来,电子设备接收到测试指令,并根据测试指令中的目标信息来确定目标测试用例。For example, the object can perform operations such as input, selection, click, and drag on the front-end page to configure the required target information. The object can be a user, and the target information includes, for example, configuration information and/or test case identifiers. The object can also click the confirm or save button on the front-end page after completing the configuration, and this operation can trigger a test instruction, and the test instruction includes the target information configured by the object on the front-end page. Next, the electronic device receives the test instruction, and determines the target test case according to the target information in the test instruction.
例如,测试指令的数量可以是至少一个。例如多个用户分别在前端页面进行操作,前端页面基于这些操作可以触发多个测试指令。For example, the number of test instructions may be at least one. For example, multiple users perform operations on the front-end page, and the front-end page can trigger multiple test instructions based on these operations.
例如,测试指令中可以包括配置信息,可以利用配置信息来确定目标测试用例。又例如,测试指令中可以包括测试用例标识,可以将检索到的与测试用例标识对应的测试用例,确定为目标测试用例。For example, the test instruction may include configuration information, and the configuration information may be used to determine the target test case. For another example, the test instruction may include a test case identifier, and the retrieved test case corresponding to the test case identifier may be determined as the target test case.
对于单接口测试,测试时使用的测试用例的数量可以是1个。对于多接口测试,测试时使用的测试用例的数量是至少两个,且每个接口对应的测试用例的数量是至少一个。For single interface testing, the number of test cases used during testing may be one. For multi-interface testing, the number of test cases used in the test is at least two, and the number of test cases corresponding to each interface is at least one.
在操作S220,根据至少一个目标测试用例,确定测试任务。In operation S220, a test task is determined according to at least one target test case.
测试任务可以为调用目标测试用例进行接口测试的任务。对于单接口测试,可以根据与单个接口对应的一个测试用例确定一个测试任务。对于多接口测试,可以根据与多个接口所属场景对应的多个测试用例,确定一个测试任务。The test task may be a task for invoking a target test case to perform interface testing. For single interface testing, a test task can be determined according to a test case corresponding to a single interface. For multi-interface testing, a test task may be determined according to multiple test cases corresponding to scenarios to which multiple interfaces belong.
在操作S230,根据本地剩余资源信息和执行测试任务所需的需求资源信息,确定测试任务是否满足远程处理条件。In operation S230, it is determined whether the test task satisfies the remote processing condition according to the local remaining resource information and the required resource information required to execute the test task.
示例性的,本地剩余资源信息可以包括本地剩余资源量,例如剩余计算资源余量、存储资源余量等,计算资源可以包括CPU,存储资源可以包括内存。本地剩余资源还可以包括剩余资源的比例,例如CPU利用率、内存利用率等。本地剩余资源还可以包括本地任务队列的余量,例如本地任务队列是长度是100,当前任务队列中有90个任务,则余量是10个任务。Exemplarily, the local remaining resource information may include the amount of local remaining resources, such as remaining computing resource remaining, storage resource remaining, etc. The computing resource may include a CPU, and the storage resource may include a memory. The local remaining resources may also include a proportion of remaining resources, such as CPU utilization, memory utilization, and the like. The local remaining resources may also include the balance of the local task queue. For example, if the length of the local task queue is 100 and there are 90 tasks in the current task queue, then the balance is 10 tasks.
例如,测试任务的需求资源量可以包括处理测试任务需要使用的资源量。For example, the required resource amount of the test task may include the amount of resources required to process the test task.
又例如,测试任务的需求资源量可以包括处理测试任务需要的估计时长,对于定时任务,可以将之前执行该测试任务所使用的时长平均值作为估计时长。对于之前未执行过的测试任务,可以将过去一段时间内执行任务所需的平均时长值作为该测试任务的估计时长。此外,还可以预先构建估计时长和资源量之间的对应关系,进而基于该对应关系折算资源量。For another example, the required resource amount of the test task may include an estimated duration required to process the test task, and for a scheduled task, the average duration of the previously used execution of the test task may be used as the estimated duration. For a test task that has not been executed before, the average time duration required to execute the task in the past period of time may be used as the estimated duration of the test task. In addition, the corresponding relationship between the estimated duration and the amount of resources can also be constructed in advance, and then the amount of resources can be converted based on the corresponding relationship.
又例如,需求资源量可以是测试任务的数量。For another example, the amount of required resources may be the number of test tasks.
又例如,需要处理多个测试任务,可以根据多个测试任务的创建时间、名称、需求资源量、估计时长等因素中的至少一个,对测试任务进行排序。测试任务的需求资源量可以包括测试任务在多个测试任务中的执行次序,测试任务例如是本地需要处理的第10个任务。For another example, if multiple test tasks need to be processed, the test tasks may be sorted according to at least one of factors such as creation time, name, required resource amount, and estimated duration of the multiple test tasks. The required resource amount of a test task may include an execution sequence of the test task among multiple test tasks, for example, the test task is the tenth task that needs to be processed locally.
示例性的,远程处理条件可以是确定本地剩余资源信息所表征的本地剩余资源与需求资源信息所表征的需求资源之间的差值是否小于或等于资源阈值,若是,确定测试任务满足远程处理条件。否则确定测试任务不满足远程处理条件。Exemplarily, the remote processing condition may be to determine whether the difference between the local remaining resources represented by the local remaining resource information and the required resource represented by the required resource information is less than or equal to the resource threshold, and if so, determine that the test task satisfies the remote processing condition . Otherwise, it is determined that the test task does not satisfy the remote processing condition.
在操作S240,在确定测试任务满足远程处理条件的情况下,调用远程资源处理测试任务,以得到针对待测试接口的测试信息。In operation S240, when it is determined that the test task satisfies the remote processing condition, the remote resource is invoked to process the test task, so as to obtain test information for the interface to be tested.
例如,在调用远程资源来处理测试任务的过程中,可以调用远程资源处理全部测试任务,也可以调用远程资源来处理多个测试任务中的一部分测试任务。For example, in the process of calling a remote resource to process a test task, the remote resource may be called to process all test tasks, or a remote resource may be called to process a part of multiple test tasks.
根据本公开实施例提供的技术方案,由于可以调用远程资源来处理测试任务,因此可以避免本地剩余资源不足造成测试任务积压无法处理的问题,从而提高测试效率。According to the technical solutions provided by the embodiments of the present disclosure, since remote resources can be invoked to process test tasks, it is possible to avoid the problem of a backlog of test tasks that cannot be processed due to insufficient local remaining resources, thereby improving test efficiency.
在一些实施例中,在确定不满足远程调用条件的情况下,可以在本地处理测试任务。例如,利用本地资源调用Jmeter测试引擎,执行单个接口或者多个接口的测试用例。In some embodiments, when it is determined that the remote invocation condition is not satisfied, the test task may be processed locally. For example, use local resources to invoke the Jmeter test engine to execute test cases for a single interface or multiple interfaces.
以下对根据测试指令中的信息,确定至少一个目标测试用例的实现手段进行说明。The implementation means of determining at least one target test case according to the information in the test instruction will be described below.
在一种示例中,测试指令用于测试单个接口,测试指令中可以包括针对单个接口的配置信息,配置信息可以包括全局变量、签名信息、针对参数的提取表达式、断言信息。针对参数的提取表达式可以表示从接口输出信息中提取目标参数所使用的表达式,例如提取的目标参数为状态码,则提取表达式可以是“$.code”。断言信息可以包括结果为真或假的逻辑判断式,断言信息用于确定接口输出的实际结果是否与预期结果一致,例如目标参数的预期结果为“200”,利用提取表达式提取到的目标参数code之后,确定该目标参数code是否与预期结果“200”一致,来验证接口是否正确。In an example, the test instruction is used to test a single interface, and the test instruction may include configuration information for a single interface, and the configuration information may include global variables, signature information, extraction expressions for parameters, and assertion information. The extraction expression for the parameter may represent the expression used to extract the target parameter from the interface output information. For example, if the extracted target parameter is a status code, the extraction expression may be "$.code". The assertion information can include the logical judgment formula of whether the result is true or false. The assertion information is used to determine whether the actual result output by the interface is consistent with the expected result. For example, the expected result of the target parameter is "200", and the target parameter extracted by the extraction expression After the code, determine whether the target parameter code is consistent with the expected result "200" to verify whether the interface is correct.
对于单接口测试场景,在接收到测试指令之后,可以根据配置信息生成测试用例。例如,可以预先配置并存储测试用例的用例模板,在接收到测试指令之后,可以从测试指令中获取配置信息,然后将配置信息与用例模板组装,从而得到测试用例。接下来,可以将得到的测试用例添加至至少一个目标测试用例中。For a single-interface test scenario, after receiving a test instruction, a test case can be generated according to the configuration information. For example, the use case template of the test case can be preconfigured and stored, and after receiving the test instruction, the configuration information can be obtained from the test instruction, and then the configuration information can be assembled with the use case template to obtain the test case. Next, the resulting test case can be added to at least one target test case.
在另一种示例中,测试指令可以用于测试多接口场景,测试指令可以包括针对至少一个接口的至少一个配置信息,和/或包括针对至少一个接口的至少一个测试用例标识。对于多接口测试场景,可以根据测试指令中包含的配置信息和/或测试用例标识来确定目标测试用例。In another example, the test instruction may be used to test a multi-interface scenario, and the test instruction may include at least one piece of configuration information for at least one interface, and/or include at least one test case identifier for at least one interface. For a multi-interface test scenario, the target test case can be determined according to the configuration information and/or test case identifier included in the test instruction.
例如,某个多接口测试需要对接口A、B、C进行测试,用户可以在前端页面配置针对接口A的配置信息a、针对接口B的配置信息b和针对接口C的某个测试用例的标识c。接下来,可以根据配置信息a生成针对接口A的测试用例TC_A,根据配置信息b生成针对接口B的测试用例TC_B,根据配置信息生成测试用例的方式可以参考上文,在此不再赘述。此外,还可以根据测试用例标识和表征测试用例与测试用例标识之间关系的映射信息,在用例库中检索与标识c对应的测试用例TC_C。接下来,可以将测试用例TC_A、TC_B和TC_C确定为针对多接口测试的一组测试用例,该一组测试用例对应一个测试场景。通过测试用例标识引用已有的测试用例,用户无需对测试用例进行配置,从而提高操作效率。For example, if a multi-interface test needs to test interfaces A, B, and C, the user can configure configuration information a for interface A, configuration information b for interface B, and a test case identifier for interface C on the front-end page c. Next, test case TC_A for interface A can be generated according to configuration information a, and test case TC_B for interface B can be generated according to configuration information b. The method of generating test cases according to configuration information can refer to the above, and will not be repeated here. In addition, the test case TC_C corresponding to the identifier c can also be retrieved in the use case library according to the test case identifier and the mapping information representing the relationship between the test case and the test case identifier. Next, the test cases TC_A, TC_B, and TC_C can be determined as a group of test cases for multi-interface testing, and the group of test cases corresponds to a test scenario. Reference existing test cases through test case identification, users do not need to configure test cases, thereby improving operational efficiency.
根据本公开另一实施例,在进行单接口测试和多接口测试的过程中,用户均可以在前端页面配置所需的配置信息,电子设备基于测试指令中的配置信息可以生成测试用例。此外,在单接口测试和多接口测试过程中生成的新的测试用例之后,还可以将新的测试用例添加至用例库中,从而更新用例库。本实施例可以对新的测试用例进行存储,因此在用户进行其他测试并需要使用已被配置的测试用例时,可以直接通过测试用例标识来引用之前已经配置过的测试用例,无需再次对同一个测试用例进行重复配置,从而提高测试效率。According to another embodiment of the present disclosure, during the single-interface test and multi-interface test, the user can configure required configuration information on the front page, and the electronic device can generate test cases based on the configuration information in the test instructions. In addition, after a new test case is generated during the single-interface test and the multi-interface test, the new test case can also be added to the use case library, thereby updating the use case library. This embodiment can store new test cases, so when the user conducts other tests and needs to use the configured test cases, he can directly refer to the previously configured test cases through the test case ID, without having to reconfigure the same Test cases are configured repeatedly to improve test efficiency.
接下来,结合以下示例对确定测试任务是否满足远程处理条件进行详细说明。Next, the determination of whether the test task satisfies the remote processing condition will be described in detail in conjunction with the following example.
在一种示例中,本地剩余资源信息所表征的资源可以包括本地剩余资源量,例如计算资源余量、内存余量。需求资源信息所表征的需求资源可以包括执行测试任务所需的需求资源量。相应地,确定是否满足远程处理条件的操作可以包括:根据本地剩余资源量、需求资源量和阈值,确定是否满足第一远程处理条件。In an example, the resource represented by the local remaining resource information may include a local remaining resource amount, for example, a computing resource remaining amount and a memory remaining amount. The demand resources represented by the demand resource information may include the quantity of demand resources required to execute the test task. Correspondingly, the operation of determining whether the remote processing condition is satisfied may include: determining whether the first remote processing condition is satisfied according to the local remaining resource amount, the required resource amount, and a threshold.
例如,对于定时任务,可以将之前执行该测试任务所使用的资源量的平均值作为需求资源量。对于之前未执行过的测试任务,可以将过去一段时间内执行其他任务所需的资源量平均值作为该测试任务的需求资源量。For example, for a scheduled task, the average amount of resources used to execute the test task before can be used as the required resource amount. For a test task that has not been executed before, the average amount of resources required to execute other tasks in the past period of time may be used as the required resource amount of the test task.
例如,第一远程处理条件可以是本地剩余资源量与需求资源量之间的差值小于或等于资源量阈值。又例如,可以将本地剩余资源量与需求资源量之和作为第一数据,第一远程处理条件还可以是第一数据与本地资源总量之间的比值大于或等于比例阈值。For example, the first remote processing condition may be that the difference between the local remaining resource amount and the required resource amount is less than or equal to the resource amount threshold. For another example, the sum of the local remaining resource amount and the required resource amount may be used as the first data, and the first remote processing condition may also be that the ratio between the first data and the total amount of local resources is greater than or equal to a ratio threshold.
本示例通过本地剩余资源量和需求资源量计算第一数据,并且确定第一数据是否符合阈值,因此能够准确确定测试任务是否满足远程处理条件。In this example, the first data is calculated according to the amount of local remaining resources and the amount of required resources, and it is determined whether the first data meets the threshold, so it can accurately determine whether the test task satisfies the remote processing condition.
在另一种示例中,本地剩余资源信息所表征的资源可以包括本地CPU利用率,需求资源信息所表征的需求资源可以包括测试任务的任务总数量。相应地,确定是否满足远程处理条件的操作可以包括:根据本地CPU利用率和本地任务队列的目标长度,确定最大执行数量,然后确定测试任务的任务总数量是否大于最大执行数量。若是,则确定测试任务满足第二远程处理条件,否则确定不满足第二远程处理条件。In another example, the resources represented by the local remaining resource information may include local CPU utilization, and the required resources represented by the required resource information may include the total number of tasks of the test tasks. Correspondingly, the operation of determining whether the remote processing condition is satisfied may include: determining the maximum execution quantity according to the local CPU utilization rate and the target length of the local task queue, and then determining whether the total number of tasks of the test task is greater than the maximum execution quantity. If yes, it is determined that the test task satisfies the second remote processing condition; otherwise, it is determined that the second remote processing condition is not satisfied.
例如,本地任务队列的目标长度表示本地任务队列中任务的最大数量。例如,本地任务队列的目标长度可以是预定值,例如目标长度是100。For example, the target length of the local task queue represents the maximum number of tasks in the local task queue. For example, the target length of the local task queue may be a predetermined value, for example, the target length is 100.
又例如,可以根据预定等待时长、任务处理时长和本地的线程数量,确定本地任务队列的目标长度。例如,预定等待时长可以表示用户可接受的最大等待时长,预定等待时长的值可以是预先配置的。任务处理时长可以表示过去一段时间内执行任务所需的平均时长值。例如,可以将预定等待时长与任务处理时长的比值作为第二数据,然后将第二数据与本地的线程数量之差作为本地任务队列的目标长度。For another example, the target length of the local task queue can be determined according to the predetermined waiting time, task processing time and the number of local threads. For example, the predetermined waiting time may indicate the maximum waiting time acceptable to the user, and the value of the predetermined waiting time may be pre-configured. The task processing time may represent the average time required to execute the task in the past period of time. For example, the ratio of the predetermined waiting time to the task processing time may be used as the second data, and then the difference between the second data and the number of local threads may be used as the target length of the local task queue.
本实施例根据预定等待时长、任务处理时长和本地的线程数量,动态确定本地任务队列的目标长度。相比于目标长度采用预定值的方案,可以随着任务处理时长或者预定等待时长的变化,动态调整本地任务队列的目标长度,从而避免由于预定值设置过长导致测试任务在本地积压,也避免由于预定值设置过短导致本地资源闲置。从而在确保高效利用本地资源的基础上,提高测试效率。In this embodiment, the target length of the local task queue is dynamically determined according to the predetermined waiting time, the task processing time and the number of local threads. Compared with the scheme of using a predetermined value for the target length, the target length of the local task queue can be dynamically adjusted according to the change of the task processing time or the scheduled waiting time, so as to avoid the backlog of test tasks in the local area due to the setting of the predetermined value being too long. Local resources are idle because the predetermined value is set too short. In this way, the test efficiency can be improved on the basis of ensuring the efficient use of local resources.
以上对本地任务队列的目标长度进行了说明,接下来对基于本地任务队列的目标长度确定最大执行数量的方案进行说明。The target length of the local task queue has been described above, and the scheme of determining the maximum number of executions based on the target length of the local task queue will be described next.
例如,可以将1与CPU利用率的比值作为第三数据。又例如,可以计算I/O耗时与CPU耗时的比值,并将该比值加1后的值作为第三数据。又例如,可以使用本地线程池中的线程数作为第三数据。然后将第三数据与本地任务队列的目标长度之和确定为最大执行数量。For example, the ratio of 1 to the CPU utilization may be used as the third data. For another example, a ratio of I/O time consumption to CPU time consumption may be calculated, and a value obtained by adding 1 to the ratio may be used as the third data. For another example, the number of threads in the local thread pool may be used as the third data. Then the sum of the third data and the target length of the local task queue is determined as the maximum execution quantity.
例如,未处理的测试任务的数量是多个。可以通过本地的线程池来处理任务,线程池中的线程正在处理的测试任务处于处理中状态。此外,还可以设置本地任务队列,本地任务队列中的测试任务处于排队状态。线程池中的线程将处理状态的测试任务处理完成之后,会对本地任务队列中的测试任务进行处理,此时测试任务的状态从排队状态切换为处理中状态。For example, the number of outstanding test tasks is multiple. The task can be processed through the local thread pool, and the test task being processed by the thread in the thread pool is in the processing state. In addition, a local task queue can also be set, and the test tasks in the local task queue are in a queuing state. After the threads in the thread pool process the test tasks in the processing state, they will process the test tasks in the local task queue. At this time, the state of the test tasks is switched from the queuing state to the processing state.
本实施例根据利用率和本地任务队列的目标长度,确定最大执行数量,然后根据测试任务的总数量和最大执行数量之间的关系确定是否满足远程处理条件。因此可以将多个测试任务合理分配至远程,从而确保测试效率。In this embodiment, the maximum execution number is determined according to the utilization rate and the target length of the local task queue, and then whether the remote processing condition is satisfied is determined according to the relationship between the total number of test tasks and the maximum execution number. Therefore, multiple test tasks can be reasonably allocated to the remote to ensure test efficiency.
以下结合具体示例,对调用远程资源处理多个测试任务中一部分测试任务的过程进行说明。The following describes the process of invoking a remote resource to process a part of multiple test tasks with reference to specific examples.
例如,可以根据本地剩余资源信息和需求资源信息,将多个测试任务拆分为第一任务集和第二任务集。然后利用本地剩余资源执行第一任务集,以得到与第一任务集对应的第一测试信息。对于本地资源无法承载的第二任务集,可以调用远程资源执行第二任务集,以得到与第二任务集对应的第二测试信息。For example, multiple test tasks may be split into a first task set and a second task set according to local remaining resource information and required resource information. Then, the first set of tasks is executed by using the remaining local resources to obtain first test information corresponding to the first set of tasks. For the second task set that cannot be carried by the local resource, the remote resource may be invoked to execute the second task set, so as to obtain the second test information corresponding to the second task set.
例如,拆分多个测试任务的过程中,可以使第一任务集的需求资源量接近而不超过本地剩余资源量,本地剩余资源量与第一任务集的需求资源量之差可以小于阈值。然后将多个测试任务中除第一任务集之外的其他任务划分至第二任务集中。For example, in the process of splitting multiple test tasks, the required resource amount of the first task set may be close to but not exceed the local remaining resource amount, and the difference between the local remaining resource amount and the required resource amount of the first task set may be smaller than a threshold. Then, other tasks in the plurality of test tasks except the first task set are divided into the second task set.
又例如,可以利用最大测试任务进行任务集的划分。可以将测试任务中最大任务数量个测试任务划分至第一任务集,剩余测试任务划分至第二任务集。For another example, the maximum test task may be used to divide the task set. Among the test tasks, the test tasks with the maximum number of tasks can be divided into the first task set, and the remaining test tasks can be divided into the second task set.
例如,未处理完成的测试任务数量是200个,本地的线程数可以是10,表示有10个测试任务处于处理中状态。本地任务队列的目标长度是100,表示允许100个测试任务排队。本实施例中,最大执行数量可以是110,可以在本地处理110个测试任务,例如处理执行次序是110及之前的测试任务。可以调用远程资源来处理90个测试任务,例如处理执行次序在110之后的测试任务。在其他实施例中,也可以利用远程资源来处理该200个测试任务。For example, the number of unprocessed and completed test tasks is 200, and the number of local threads may be 10, indicating that 10 test tasks are in the processing state. The target length of the local task queue is 100, which means that 100 test tasks are allowed to be queued. In this embodiment, the maximum number of executions may be 110, and 110 test tasks may be processed locally, for example, the test tasks whose execution sequence is 110 and before are processed. Remote resources may be called to process 90 test tasks, for example, process the test tasks whose execution sequence is after 110 . In other embodiments, remote resources may also be used to process the 200 test tasks.
图3是根据本公开实施例的单接口测试方法的示意原理图。Fig. 3 is a schematic schematic diagram of a single interface testing method according to an embodiment of the present disclosure.
以下结合图3,以单接口测试为例,对单接口测试方法的工作原理进行说明。The working principle of the single-interface test method will be described below by taking the single-interface test as an example with reference to FIG. 3 .
例如,用户可以在前端页面305进行配置,配置信息301可以包括全局变量、签名信息、针对参数的提取表达式、断言信息等,然后基于这些配置信息301可以生成单个测试用例302。在得到测试用例302之后,可以确定测试任务303并执行,来得到测试信息304。例如,可以在本地或者远程调用Jmeter测试引擎执行单个接口的测试用例302,然后获取Jmeter测试引擎的测试信息304,测试信息304可以包括执行日志和执行结果,然后将测试信息304通过SSE(Server Send Event)推送给前端页面305。For example, the user can configure on the front-
图4是根据本公开实施例的多接口测试方法的示意原理图。Fig. 4 is a schematic schematic diagram of a multi-interface testing method according to an embodiment of the present disclosure.
以下结合图4,以多接口测试为例,对多接口测试方法的工作原理进行说明。The working principle of the multi-interface test method will be described below by taking the multi-interface test as an example with reference to FIG. 4 .
例如,用户可以在前端页面410进行配置,配置信息401可以包括全局变量、签名信息、针对参数的提取表达式、断言信息等。还可以在前端页面410配置测试用例标识402。还可以在前端页面410配置定时信息,以便执行定时任务404。For example, the user may configure on the front-
接下来,根据配置信息401和测试用例标识402可以生成多个测试用例,多个测试用例可以与同一个场景403相关,可以根据实际需要将多个测试用例进行编排得到场景403。编排的内容可以包括各个接口的依赖关系,基于该依赖关系,上一个接口的返回指会作为下一个接口的输入。Next, multiple test cases can be generated according to the
接下来,可以启用线程池405,根据本地剩余资源信息和需要处理的测试任务的需求资源信息,来确定测试任务是否满足远程处理条件。可以理解的是,场景403创建之后,若无需运行该场景403的测试任务,则不需要调用资源。Next, the
若不满足远程处理条件,则可以在本地执行测试任务。例如利用本地资源启动Jmeter引擎,利用Jmeter引擎执行测试任务,从而获得测试信息408。If the remote processing conditions are not met, the test tasks can be executed locally. For example, the local resources are used to start the Jmeter engine, and the Jmeter engine is used to execute the test task, so as to obtain the
若满足远程处理条件,则可以调用Node资源池406,根据需要创建的场景403数量计算启动容器407(Docker)的数量,利用容器407分别启动Jmeter测试引擎执行场景403。例如,可以按照预定资源量来创建容器407,即,可以根据预定的CPU核数和内存来创建容器407。If the remote processing condition is satisfied, the
在创建容器407的过程中,针对定时任务404,任务数量是已知的,因此可以根据任务数量来确定所需容器407的数量。例如,某个用户配置了100个定时任务404,可以将这些测试任务进行切分,然后一次性创建多个容器407,从而在规定时间处理这些定时的测试任务。此外,针对用户临时增加测试任务的情况,由于此时任务数量无法预估,因此可以根据新增的测试任务不断增加容器407的数量,直到远程的资源小于或等于阈值。当远程的资源小于或等于阈值时,可以拒绝前端的测试指令,并告知资源不足需要等待。During the process of creating the
可以理解的,一个容器407可以处理多个测试任务,容器407的数量需要根据测试任务数量来确定。例如每启动一个容器407可以额外处理10个测试任务,需要远程资源处理的测试任务的数量是3个时,仅需要启动一个容器407。需要远程资源处理的测试任务的数量是30个时,需要启动3个容器407。It can be understood that one
在得到测试信息408之后,可以将测试信息408输出到消息队列409中,消息队列409可以是kafka。然后由消息队列409将测试信息408通过SSE(Server Send Event)推送给前端页面410。After the
根据本公开另一实施例,通过执行测试任务可以得到测试信息,例如执行本地任务可以得到与本地任务对应的接口的测试信息,例如执行远程任务可以得到与远程任务对应的接口的测试信息。在得到测试信息之后,可以输出测试信息,进而利用前端页面展示测试信息,使用户知晓测试信息。测试信息可以包括执行日志和测试结果,执行日志可以记录用户标识、执行时间、任务耗时、执行是否出现异常等相关信息。需要说明的是,系统可以记录多个用户的测试任务的执行日志,在展示时,可以向目标用户展示与该用户相关的测试信息。According to another embodiment of the present disclosure, the test information can be obtained by executing the test task, for example, the test information of the interface corresponding to the local task can be obtained by executing the local task, and the test information of the interface corresponding to the remote task can be obtained by executing the remote task. After the test information is obtained, the test information can be output, and then the test information can be displayed on the front-end page, so that the user can know the test information. The test information may include execution logs and test results, and the execution logs may record relevant information such as user identification, execution time, task time consumption, and whether execution is abnormal. It should be noted that the system can record the execution logs of the test tasks of multiple users, and when displaying, it can display the test information related to the user to the target user.
在一种示例中,用户可以在前端页面进行操作,例如点击输出按钮来生成输出指令。或者测试完成后自动触发来生成输出指令。输出指令可以包括查询条件,查询条件可以包括用户标识和时间信息中的至少一个,可以根据输出指令中的用户标识,从多个测试信息中确定针对目标用户的目标测试信息。例如,多个用户进行接口测试时,执行日志会记录多个测试的相关信息,可以从执行日志中筛选与用户标识对应的目标测试信息。例如可以根据时间信息从执行日志中筛选出在特定时段执行的测试任务的测试信息。In one example, the user can perform operations on the front-end page, such as clicking an output button to generate an output instruction. Or it can be automatically triggered after the test is completed to generate output instructions. The output instruction may include query conditions, and the query conditions may include at least one of user identification and time information, and the target test information for the target user may be determined from a plurality of test information according to the user identification in the output instruction. For example, when multiple users conduct an interface test, the execution log will record relevant information of multiple tests, and the target test information corresponding to the user ID can be filtered from the execution log. For example, the test information of the test tasks executed in a specific period of time can be filtered out from the execution log according to the time information.
在另一种示例中,测试指令对应有测试时间信息,例如基于某个测试指令创建了某个测试任务,该测试任务的执行时间第一时段,因此该测试指令与第一时段相对应。可以从执行日志中筛选出在第一时段内产生的目标测试信息。In another example, the test instruction corresponds to test time information, for example, a test task is created based on a certain test instruction, and the execution time of the test task is the first period, so the test instruction corresponds to the first period. Target test information generated within the first period of time may be filtered out from the execution log.
在得到目标测试信息之后,可以向前端页面输出目标测试信息,从而利用前端页面向目标用户展示目标测试信息。After the target test information is obtained, the target test information can be output to the front-end page, so that the target test information can be displayed to the target user by using the front-end page.
本实施例可以从数据量较大的执行日志中,基于用户标识和时间信息筛选出与针对目标用户的目标测试信息,从而方便目标用户知晓自身的接口测试的相关信息,而无法知晓其他用户的接口测试的相关信息,能够减少展示给目标用户的信息量,同时避免向其他用户泄露测试的相关信息。In this embodiment, the target test information for the target user can be screened out based on the user ID and time information from the execution log with a large amount of data, so that the target user can easily know the relevant information of the interface test of itself, but cannot know the information of other users. The relevant information of the interface test can reduce the amount of information displayed to the target user, and at the same time avoid leaking the relevant information of the test to other users.
图5是根据本公开实施例的接口测试装置的示意结构框图;以及5 is a schematic structural block diagram of an interface testing device according to an embodiment of the present disclosure; and
如图5所示,该接口测试装置500可以包括第一确定模块510、第二确定模块520、第三确定模块530以及调用模块540。As shown in FIG. 5 , the
第一确定模块510用于响应于接收到测试指令,根据测试指令,确定针对待测试接口的至少一个目标测试用例。The first determining
第二确定模块520用于根据至少一个目标测试用例,确定测试任务。The
第三确定模块530用于根据本地剩余资源信息和执行测试任务所需的需求资源信息,确定测试任务是否满足远程处理条件。The
调用模块540用于在确定测试任务满足远程处理条件的情况下,调用远程资源处理测试任务,以得到针对待测试接口的测试信息。The invoking
根据本公开另一实施例,测试任务的数量是多个,本地剩余资源信息包括本地CPU利用率,需求资源信息包括测试任务的任务总数量;第三确定模块包括:第一确定子模块和第二确定子模块。第一确定子模块用于根据本地CPU利用率和本地任务队列的目标长度,确定最大执行数量;第二确定子模块用于响应于检测到任务总数量大于最大执行数量,确定测试任务满足远程处理条件。According to another embodiment of the present disclosure, the number of test tasks is multiple, the local remaining resource information includes local CPU utilization, and the required resource information includes the total number of test tasks; the third determination module includes: a first determination sub-module and a second determination sub-module Second, determine the sub-module. The first determination submodule is used to determine the maximum execution quantity according to the local CPU utilization rate and the target length of the local task queue; the second determination submodule is used to determine that the test task satisfies remote processing in response to detecting that the total number of tasks is greater than the maximum execution quantity condition.
根据本公开另一实施例,第三确定模块还包括:第三确定子模块,用于根据预定等待时长、任务处理时长和本地的线程数量,确定本地任务队列的目标长度。According to another embodiment of the present disclosure, the third determining module further includes: a third determining submodule, configured to determine the target length of the local task queue according to the predetermined waiting time, task processing time and the number of local threads.
根据本公开另一实施例,本地剩余资源信息包括本地剩余资源量,需求资源信息包括执行测试任务所需的估计资源量;第三确定模块包括:第四确定子模块,用于响应于检测到本地剩余资源量与估计资源量之间的差值小于或等于资源量阈值,确定测试任务满足远程处理条件。According to another embodiment of the present disclosure, the local remaining resource information includes the amount of local remaining resources, and the required resource information includes the estimated amount of resources required to perform the test task; the third determining module includes: a fourth determining submodule, configured to respond to the detected If the difference between the local remaining resource amount and the estimated resource amount is less than or equal to the resource amount threshold, it is determined that the test task satisfies the remote processing condition.
根据本公开另一实施例,测试任务的数量是多个;调用模块包括:拆分子模块、执行子模块和调用子模块。拆分子模块用于根据本地剩余资源信息和需求资源信息,将多个测试任务拆分为第一任务集和第二任务集;执行子模块用于利用本地剩余资源执行第一任务集,以得到与第一任务集对应的第一测试信息;调用子模块用于调用远程资源执行第二任务集,以得到与第二任务集对应的第二测试信息。According to another embodiment of the present disclosure, there are multiple test tasks; the calling module includes: splitting sub-modules, executing sub-modules and calling sub-modules. The splitting sub-module is used to split multiple test tasks into the first task set and the second task set according to the local remaining resource information and required resource information; the execution sub-module is used to execute the first task set using the local remaining resources to obtain The first test information corresponding to the first task set; the calling submodule is used to call the remote resource to execute the second task set, so as to obtain the second test information corresponding to the second task set.
根据本公开另一实施例,根据测试指令中的信息,确定至少一个目标测试用例包括以下中的至少一个:响应于检测到测试指令包括配置信息,根据配置信息生成测试用例,并将生成的测试用例添加至至少一个目标测试用例中;以及响应于检测到测试指令包括测试用例标识,根据测试用例标识,从用例库中查找与测试用例标识对应的测试用例,并将查找到的测试用例添加至至少一个目标测试用例中。According to another embodiment of the present disclosure, determining at least one target test case according to the information in the test instruction includes at least one of the following: in response to detecting that the test instruction includes configuration information, generating a test case according to the configuration information, and converting the generated test The use case is added to at least one target test case; and in response to detecting that the test instruction includes the test case identification, according to the test case identification, the test case corresponding to the test case identification is searched from the use case library, and the found test case is added to In at least one target test case.
根据本公开另一实施例,上述装置还包括:添加模块,用于在生成测试用例之后,将生成的测试用例添加至用例库中。According to another embodiment of the present disclosure, the above device further includes: an adding module, configured to add the generated test case to the use case library after the test case is generated.
根据本公开另一实施例,配置信息包括以下中的至少一个:全局变量、签名信息、针对参数的提取表达式、断言信息。According to another embodiment of the present disclosure, the configuration information includes at least one of the following: global variables, signature information, extraction expressions for parameters, and assertion information.
根据本公开另一实施例,上述装置还包括:筛选模块和输出模块。筛选模块用于在得到测试信息之后,响应于接收到输出指令,根据输出指令中的对象标识和测试时间信息中的至少一个,从多个测试信息中筛选针对目标对象的目标测试信息;输出模块用于输出目标测试信息。According to another embodiment of the present disclosure, the above device further includes: a screening module and an output module. The screening module is used to screen the target test information for the target object from a plurality of test information according to at least one of the object identification and the test time information in the output command in response to receiving the output instruction after obtaining the test information; the output module Used to output target test information.
本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solution of this disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved are all in compliance with relevant laws and regulations, and do not violate public order and good customs.
在本公开的技术方案中,在获取或采集用户个人信息之前,均获取了用户的授权或同意。In the technical solution of the present disclosure, before acquiring or collecting the user's personal information, the user's authorization or consent is obtained.
根据本公开的实施例,本公开还提供了一种电子设备,包括至少一个处理器;以及与至少一个处理器通信连接的存储器;存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述接口测试方法。According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by at least one processor. Executed by a processor, so that at least one processor can execute the above interface testing method.
根据本公开的实施例,本公开还提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行上述接口测试方法。According to an embodiment of the present disclosure, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the above interface testing method.
根据本公开的实施例,本公开还提供了一种计算机程序产品,包括计算机程序,计算机程序在被处理器执行时实现上述接口测试方法。According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, including a computer program, and the computer program implements the above interface testing method when executed by a processor.
图6是用来实施本公开实施例的接口测试方法的电子设备的结构框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。Fig. 6 is a structural block diagram of an electronic device for implementing the interface testing method of the embodiment of the present disclosure. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图6所示,设备600包括计算单元601,其可以根据存储在只读存储器(ROM)602中的计算机程序或者从存储单元608加载到随机访问存储器(RAM)603中的计算机程序,来执行各种适当的动作和处理。在RAM 603中,还可存储设备600操作所需的各种程序和数据。计算单元601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6, the
设备600中的多个部件连接至I/O接口605,包括:输入单元606,例如键盘、鼠标等;输出单元607,例如各种类型的显示器、扬声器等;存储单元608,例如磁盘、光盘等;以及通信单元609,例如网卡、调制解调器、无线通信收发机等。通信单元609允许设备600通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the
计算单元601可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元60l的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元601执行上文所描述的各个方法和处理,例如接口测试方法。例如,在一些实施例中,接口测试方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元608。在一些实施例中,计算机程序的部分或者全部可以经由ROM 602和/或通信单元609而被载入和/或安装到设备600上。当计算机程序加载到RAM 603并由计算单元601执行时,可以执行上文描述的接口测试方法的一个或多个步骤。备选地,在其他实施例中,计算单元601可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行接口测试方法。The
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、复杂可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), complex programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide for interaction with the user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein. The specific implementation manners described above do not limit the protection scope of the present disclosure. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310140233.0ACN116126719A (en) | 2023-02-08 | 2023-02-08 | Interface testing method and device, electronic equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310140233.0ACN116126719A (en) | 2023-02-08 | 2023-02-08 | Interface testing method and device, electronic equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN116126719Atrue CN116126719A (en) | 2023-05-16 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310140233.0APendingCN116126719A (en) | 2023-02-08 | 2023-02-08 | Interface testing method and device, electronic equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN116126719A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116955030A (en)* | 2023-06-28 | 2023-10-27 | 珠海妙存科技有限公司 | Test plan distribution method and system, electronic device and storage medium |
| CN119645837A (en)* | 2024-11-11 | 2025-03-18 | 百度在线网络技术(北京)有限公司 | Graphical user interface testing method, device, and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116955030A (en)* | 2023-06-28 | 2023-10-27 | 珠海妙存科技有限公司 | Test plan distribution method and system, electronic device and storage medium |
| CN116955030B (en)* | 2023-06-28 | 2024-02-23 | 珠海妙存科技有限公司 | Test plan distribution method and system, electronic device and storage medium |
| CN119645837A (en)* | 2024-11-11 | 2025-03-18 | 百度在线网络技术(北京)有限公司 | Graphical user interface testing method, device, and electronic device |
| CN119645837B (en)* | 2024-11-11 | 2025-10-03 | 百度在线网络技术(北京)有限公司 | Graphical user interface testing method, device, and electronic device |
| Publication | Publication Date | Title |
|---|---|---|
| CN113704063B (en) | A cloud phone performance monitoring method, device, equipment and storage medium | |
| CN116126719A (en) | Interface testing method and device, electronic equipment and storage medium | |
| CN114861910B (en) | Compression method, device, equipment and medium of neural network model | |
| CN114911598A (en) | Task scheduling method, device, equipment and storage medium | |
| CN112559525A (en) | Data checking system, method, device and server | |
| CN114968567A (en) | Method, apparatus and medium for allocating computing resources of a compute node | |
| CN114327918B (en) | Method and device for adjusting resource amount, electronic equipment and storage medium | |
| CN113722141B (en) | Method, device, electronic equipment and media for determining delay causes of data tasks | |
| CN118193389A (en) | Test case generation method, device, equipment, storage medium and product | |
| CN117435503A (en) | Test tool generation method, test device, test equipment and test medium | |
| CN118193311A (en) | Data monitoring method, device, electronic equipment and storage medium | |
| CN115858921A (en) | Model processing method, device, equipment and storage medium | |
| CN116541224A (en) | Performance testing method, device, electronic device and readable storage medium | |
| CN115017047A (en) | Test method, system, equipment and medium based on B/S architecture | |
| CN116341663A (en) | Extension method, device, equipment and medium of deep learning reasoning framework | |
| EP3832985B1 (en) | Method and apparatus for processing local hot spot, electronic device and storage medium | |
| CN115757275A (en) | Asset information management method, device, electronic equipment and storage medium | |
| CN114860455A (en) | Request processing method, device, equipment and storage medium | |
| CN114328070A (en) | Data tilt detection method, device and related equipment | |
| CN114168459A (en) | Service testing method, apparatus, electronic device, and readable storage medium | |
| CN118568006B (en) | Application interface awakening method, device, equipment, storage medium and program product | |
| CN117076332B (en) | Test case testing method and device, electronic equipment and storage medium | |
| CN120216102B (en) | Microservice optimization method, device, medium and electronic device | |
| CN114090073B (en) | Interface information extraction method, device, electronic device and storage medium | |
| CN118535299A (en) | Task processing method, device, electronic equipment, storage medium and program product |
| 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 |