CN117480497A - A cross-system testing method and device - Google Patents
A cross-system testing method and device Download PDFInfo
- Publication number
- CN117480497A CN117480497A CN202280004256.2A CN202280004256A CN117480497A CN 117480497 A CN117480497 A CN 117480497A CN 202280004256 A CN202280004256 A CN 202280004256A CN 117480497 A CN117480497 A CN 117480497A
- Authority
- CN
- China
- Prior art keywords
- dom tree
- tested
- control
- attribute information
- test
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本公开涉及计算机技术领域,尤其涉及一种跨系统测试方法、装置、电子设备及存储介质。The present disclosure relates to the field of computer technology, and in particular, to a cross-system testing method, device, electronic equipment and storage medium.
随着计算机技术的发展,各种应用或系统迭代更新的也越来越快,通常需要对其进行测试,以确定其是否可用。With the development of computer technology, various applications or systems are iterated and updated faster and faster, and it is usually necessary to test them to determine whether they are usable.
相关技术中,通常需要通过数据线,将测试系统与待测试系统进行连接,才能对待测试系统进行测试。由于受硬件接口数量的限制,一次仅能对有限个待测试系统进行测试,若有多个待测试系统需要进行测试,那么可能需要花费大量时间,效率较低。由此,如何提高跨系统测试的效率,显得至关重要。In related technologies, it is usually necessary to connect the test system and the system to be tested through a data cable before the system to be tested can be tested. Due to the limitation of the number of hardware interfaces, only a limited number of systems to be tested can be tested at one time. If there are multiple systems to be tested that need to be tested, it may take a lot of time and the efficiency is low. Therefore, how to improve the efficiency of cross-system testing is crucial.
发明内容Contents of the invention
本公开实施例提供一种跨系统测试方法及装置。Embodiments of the present disclosure provide a cross-system testing method and device.
第一方面,本公开实施例提供一种跨系统测试方法,由测试系统执行,包括:In the first aspect, embodiments of the present disclosure provide a cross-system testing method, which is executed by the test system, including:
获取当前的待运行的测试用例;Get the current test case to be run;
响应于所述测试用例用于对待测试系统中的任一控件的属性信息进行更新,遍历所述任一控件所属的第一文档对象模型DOM树,以确定所述任一控件在所述第一DOM树中的第一位置信息;In response to the test case being used to update the attribute information of any control in the system to be tested, the first Document Object Model DOM tree to which the any control belongs is traversed to determine whether the any control is in the first The first position information in the DOM tree;
通过远程过程调用RPC模块向所述待测试系统发送属性信息更新指令,其中,所述更新指令中包含所述第一位置信息及所述测试用例中指示的第一属性信息;Send an attribute information update instruction to the system under test through a remote procedure call RPC module, where the update instruction includes the first location information and the first attribute information indicated in the test case;
获取所述待测试系统通过所述RPC模块返回的更新结果。Obtain the update result returned by the system under test through the RPC module.
可选的,在所述向所述待测试系统发送属性信息更新指令之后,还包括:Optionally, after sending the attribute information update instruction to the system under test, the method further includes:
通过所述RPC模块,接收所述待测试系统返回的更新后的第二DOM树;Through the RPC module, receive the updated second DOM tree returned by the system to be tested;
利用所述第二DOM树,替换所述第一DOM树。The first DOM tree is replaced with the second DOM tree.
可选的,在所述接收所述待测试系统返回的更新后的DOM树之后,还包括:Optionally, after receiving the updated DOM tree returned by the system under test, the method further includes:
对所述第二DOM树进行解析,以获取所述任一控件的第二位置信息及第二属性信息;Parse the second DOM tree to obtain the second position information and second attribute information of any control;
根据所述第二属性信息与所述第一属性信息间的第一匹配度、及所述第一位置信息与所述第二位置信息间的第二匹配度,确定所述待测试系统中用户界面的功能是否正常。According to the first matching degree between the second attribute information and the first attribute information, and the second matching degree between the first location information and the second location information, determine the user in the system to be tested. Whether the interface functions normally.
可选的,在所述遍历所述任一控件所属的第一DOM树之前,还包括:Optionally, before traversing the first DOM tree to which any control belongs, it also includes:
确定与所述测试用例中所述任一控件所属的应用标识关联的DOM树,为所述第一DOM树。The DOM tree associated with the application identifier to which any control in the test case belongs is determined to be the first DOM tree.
可选的,在所述确定所述任一控件在所述第一DOM树中的位置信息之后,还包括:Optionally, after determining the position information of any control in the first DOM tree, the method further includes:
响应于所述任一控件的位置信息为空,向所述待测试系统发送DOM树同步指令,其中,所述同步指令中包含所述任一控件所属的应用标识。In response to the position information of any control being empty, a DOM tree synchronization instruction is sent to the system to be tested, wherein the synchronization instruction includes an application identifier to which any control belongs.
可选的,还包括:Optional, also includes:
通过所述RPC模块,接收所述待测试系统返回的运行参数;Through the RPC module, receive the operating parameters returned by the system to be tested;
根据所述运行参数及所述更新指令,确定所述待测试系统的性能。According to the operating parameters and the update instruction, the performance of the system under test is determined.
第二方面,本公开实施例提供一种跨系统测试装置,被配置在测试系统侧,包括:In a second aspect, embodiments of the present disclosure provide a cross-system testing device, which is configured on the test system side and includes:
第一获取模块,用于获取当前的待运行的测试用例;The first acquisition module is used to obtain the current test cases to be run;
遍历模块,用于响应于所述测试用例用于对待测试系统中的任一控件的属性信息进行更新,遍历所述任一控件所属的第一文档对象模型DOM树,以确定所述任一控件在所述第一DOM树中的第一位置信息;A traversal module configured to, in response to the test case being used to update the attribute information of any control in the system to be tested, traverse the first Document Object Model DOM tree to which the any control belongs to determine the any control. First location information in the first DOM tree;
发送模块,用于通过远程过程调用RPC模块向所述待测试系统发送属性信息更新指令,其中,所述更新指令中包含所述第一位置信息及所述测试用例中指示的第一属性信息;A sending module configured to send an attribute information update instruction to the system under test through a remote procedure call RPC module, where the update instruction includes the first location information and the first attribute information indicated in the test case;
第二获取模块,用于获取所述待测试系统通过所述RPC模块返回的更新结果。The second acquisition module is used to acquire the update result returned by the system under test through the RPC module.
可选的,还包括接收模块,用于:Optionally, it also includes a receiving module for:
通过所述RPC模块,接收所述待测试系统返回的更新后的第二DOM树;Through the RPC module, receive the updated second DOM tree returned by the system to be tested;
利用所述第二DOM树,替换所述第一DOM树。The first DOM tree is replaced with the second DOM tree.
可选的,还包括解析模块,用于:Optionally, a parsing module is also included for:
对所述第二DOM树进行解析,以获取所述任一控件的第二位置信息及第二属性信息;Parse the second DOM tree to obtain the second position information and second attribute information of any control;
根据所述第二属性信息与所述第一属性信息间的第一匹配度、及所述第一位置信息与所述第二位置信息间的第二匹配度,确定所述待测试系统中用户界面的功能是否正常。According to the first matching degree between the second attribute information and the first attribute information, and the second matching degree between the first location information and the second location information, determine the user in the system to be tested. Whether the interface functions normally.
可选的,所述遍历模块,还用于:Optionally, the traversal module is also used for:
确定与所述测试用例中所述任一控件所属的应用标识关联的DOM树,为所述第一DOM树。The DOM tree associated with the application identifier to which any control in the test case belongs is determined to be the first DOM tree.
可选的,所述发送模块,还用于:Optionally, the sending module is also used for:
响应于所述任一控件的位置信息为空,向所述待测试系统发送DOM树同步指令,其中,所述同步指令中包含所述任一控件所属的应用标识。In response to the position information of any control being empty, a DOM tree synchronization instruction is sent to the system to be tested, wherein the synchronization instruction includes an application identifier to which any control belongs.
可选的,还包括确定模块,用于:Optionally, a determination module is also included for:
通过所述RPC模块,接收所述待测试系统返回的运行参数;Through the RPC module, receive the operating parameters returned by the system to be tested;
根据所述运行参数及所述更新指令,确定所述待测试系统的性能。According to the operating parameters and the update instruction, the performance of the system under test is determined.
第三方面,本公开实施例提供一种电子设备,包括:处理器;用于存储所述处理器的可执行指令的存储器;其中,所述处理器被配置为调用并执行所述存储器存储的可执行指令,以实现本公开第一方面实施例提出的跨系统测试方法。In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to call and execute instructions stored in the memory. The instructions can be executed to implement the cross-system testing method proposed by the embodiment of the first aspect of the present disclosure.
第四方面,本公开实施例提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行本公开第一方面实施例提出的跨系统测试方法。In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium that, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute what is proposed in the embodiment of the first aspect of the present disclosure. cross-system testing method.
第五方面,本公开实施例提供一种计算机程序产品,该计算机程序由电子设备的处理器执行时,使得电子设备能够执行本公开第一方面实施例提出的跨系统测试方法。In a fifth aspect, an embodiment of the present disclosure provides a computer program product. When the computer program is executed by a processor of an electronic device, the electronic device can execute the cross-system testing method proposed in the first embodiment of the present disclosure.
本公开提供的跨系统测试方法、装置、电子设备及存储介质,测试系统可以先获取当前的待运行的测试用例,在测试用例用于对待测试系统中的任一控件的属性信息进行更新的情况下,可以遍历任一控件所属的第一文档对象模型DOM树,以确定任一控件在第一DOM树中的第一位置信息,之后可以通过远程过程调用RPC模块向待测试系统发送属性信息更新指令,其中,更新指令中包含所述第一位置信息及测试用例中指示的第一属性信息,之后可以获取待测试系统通过RPC模块返回的更新结果。由此,测试系统可以通过RPC模块,将属性信息更新指令发送给待测试系统,以使各待测试系统可以根据测试指令并行进行DOM树的更新操作,之后可以获取待测试系统返回的更新结果,从而实现了待测试系统中的DOM树的并行更新测试,节省了时间,提高了更新效率。With the cross-system testing method, device, electronic equipment and storage medium provided by this disclosure, the test system can first obtain the current test case to be run, and when the test case is used to update the attribute information of any control in the system to be tested, Next, the first Document Object Model DOM tree to which any control belongs can be traversed to determine the first position information of any control in the first DOM tree, and then the attribute information update can be sent to the system under test through the remote procedure call RPC module. instruction, wherein the update instruction includes the first location information and the first attribute information indicated in the test case, and then the update result returned by the system under test through the RPC module can be obtained. Therefore, the test system can send attribute information update instructions to the system under test through the RPC module, so that each system under test can update the DOM tree in parallel according to the test instructions, and then obtain the update results returned by the system under test. This enables parallel update testing of the DOM tree in the system to be tested, saving time and improving update efficiency.
为了更清楚地说明本公开实施例或背景技术中的技术方案,下面将对本公开实施例或背景技术中所需要使用的附图进行说明。In order to more clearly illustrate the technical solutions in the embodiments of the disclosure or the background technology, the drawings required to be used in the embodiments or the background technology of the disclosure will be described below.
图1是根据本公开实施例的跨系统测试方法的流程图;Figure 1 is a flow chart of a cross-system testing method according to an embodiment of the present disclosure;
图2是根据本公开实施例的跨系统测试方法的流程图;Figure 2 is a flow chart of a cross-system testing method according to an embodiment of the present disclosure;
图3是根据本公开实施例的跨系统测试装置的结构示意图;Figure 3 is a schematic structural diagram of a cross-system testing device according to an embodiment of the present disclosure;
图4是根据本公开实施例的电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本公开,而不能理解为对本公开的限制。Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present disclosure and are not to be construed as limitations of the present disclosure.
下面参考附图描述本公开实施例的跨系统测试方法、装置、电子设备及存储介质。The following describes the cross-system testing method, device, electronic device, and storage medium of embodiments of the present disclosure with reference to the accompanying drawings.
本公开实施例的跨系统测试方法,可由本公开实施例提供的跨系统测试装置执行,该装置可配置于电子设备中。The cross-system testing method of the embodiment of the disclosure can be executed by the cross-system testing device provided by the embodiment of the disclosure, and the device can be configured in an electronic device.
图1为本公开实施例提供的一种跨系统测试方法的流程示意图,该方法可以由测试系统执行。FIG. 1 is a schematic flowchart of a cross-system testing method provided by an embodiment of the present disclosure. The method can be executed by a testing system.
如图1所示,该跨系统测试方法可以包括以下步骤:As shown in Figure 1, this cross-system testing method can include the following steps:
步骤101,获取当前的待运行的测试用例。Step 101: Obtain the current test case to be run.
其中,测试用例,可以为一组由前提条件、输入、执行条件、预期结果等组成,以完成对某个特定需求或者目标测试的数据,体现测试方案、方法、技术和策略的文档。Among them, a test case can be a set of data consisting of preconditions, inputs, execution conditions, expected results, etc., to complete the test of a specific requirement or goal, and a document that embodies the test plan, method, technology and strategy.
可选的,可以通过特定接口,获取由用户上传的测试用例。比如,可以通过蟒蛇(python)接口获取测试人员上传的测试用例等等,本公开对此不做限定。Optionally, test cases uploaded by users can be obtained through a specific interface. For example, test cases uploaded by testers can be obtained through the python interface, and this disclosure does not limit this.
另外,获取的待运行的测试用例,可以为一个,或者也可以为多个等,本公开对此不做限定。In addition, the obtained test case to be run may be one, or may be multiple, etc., and this disclosure does not limit this.
步骤102,响应于测试用例用于对待测试系统中的任一控件的属性信息进行更新,遍历任一控件所属的第一目标文档对象模型DOM树,以确定任一控件在第一DOM树中的第一位置信息。Step 102: In response to the test case being used to update the attribute information of any control in the system to be tested, traverse the first target document object model DOM tree to which any control belongs to determine the location of any control in the first DOM tree. First location information.
其中,属性信息,可以为控件的位置、名称、图标、内容等等,本公开对此不做限定。Among them, the attribute information can be the position, name, icon, content, etc. of the control, and this disclosure does not limit this.
可选的,可以通过对当前的待运行的测试用例进行解析,以确定待测试系统中的任一控件对应的更新后的属性信息。比如,通过对测试用例进行解析,确定“登录”控件对应的更新后的属性信息为:图标为圆形等,本公开对此不做限定。Optionally, the current test case to be run can be parsed to determine the updated attribute information corresponding to any control in the system to be tested. For example, by parsing the test case, it is determined that the updated attribute information corresponding to the "Login" control is: the icon is circular, etc. This disclosure does not limit this.
另外,文档对象模型(document object model,DOM),可以理解为提供了对整个文档的访问模型,将文档作为一个树形结构,树的每个结点表示了一个超文本标记语言(hyper text markup language,HTML)标签或标签内的文本项,DOM树可以精确描述HTML文档中标签间的相互关联性。通常,可以利用对象的方法和属性,对DOM树的结点和内容进行访问、修改、添加和删除等等,本公开对此不做限定。In addition, the document object model (DOM) can be understood as providing an access model to the entire document, treating the document as a tree structure, and each node of the tree represents a hypertext markup language (hyper text markup). language, HTML) tags or text items within tags, the DOM tree can accurately describe the interrelationships between tags in HTML documents. Generally, the methods and attributes of objects can be used to access, modify, add, delete, etc. the nodes and contents of the DOM tree, and this disclosure does not limit this.
举例来说,若任一控件“取消”所属的第一DOM树为:DOM树1,那么可以在该“DOM树1”中对各个节点进行遍历,在获取到“取消”控件时,可以确定该“取消”控件在“DOM树1”中的第一位置信息,比如可以为:第二列中第三个节点;或者可以为第三个子节点等等,本公开对此不做限定。For example, if the first DOM tree to which any control "cancel" belongs is: DOM tree 1, then each node can be traversed in this "DOM tree 1", and when the "cancel" control is obtained, it can be determined The first position information of the "Cancel" control in "DOM Tree 1" may be, for example: the third node in the second column; or it may be the third child node, etc. This disclosure does not limit this.
可以理解的是,在遍历任一控件所属的目标文档对象模型DOM树之前,可以先确定出第一DOM树。It can be understood that before traversing the target Document Object Model DOM tree to which any control belongs, the first DOM tree can be determined first.
可选的,可以确定与测试用例中任一控件所属的应用标识关联的DOM树,为第一DOM树。Optionally, the DOM tree associated with the application identifier to which any control in the test case belongs can be determined as the first DOM tree.
可以理解的是,通过对测试用例进行解析,可以确定出其中包含的应用标识及该应用标识对应的任一控件等等,本公开对此不做限定。It can be understood that by parsing the test case, the application identifier contained therein and any control corresponding to the application identifier, etc. can be determined, and this disclosure does not limit this.
其中,应用标识的样式或者呈现形式,可以为提前设定的,比如可以为“应用1”、“通讯应用2”、“XX游戏”等等,本公开对此不做限定。Among them, the style or presentation form of the application logo can be set in advance, for example, it can be "Application 1", "Communication Application 2", "XX Game", etc. This disclosure does not limit this.
举例来说,通过对测试用例进行解析,确定任一控件“开始”所属的应用标识为“XX游戏”,那么可以通过对当前存储的DOM树进行遍历,以确定第一DOM树。比如,“XX”游戏关联的DOM树为:DOM树2,那么可以将“DOM树2”确定为第一DOM树等等,本公开对此不做限定。For example, by parsing the test case, it is determined that the application identifier to which any control "Start" belongs is "XX Game", then the currently stored DOM tree can be traversed to determine the first DOM tree. For example, the DOM tree associated with the "XX" game is: DOM tree 2, then "DOM tree 2" can be determined as the first DOM tree, etc. This disclosure does not limit this.
步骤103,通过远程过程调用RPC模块向待测试系统发送属性信息更新指令,其中,更新指令中包含第一位置信息及测试用例中指示的第一属性信息。Step 103: Send an attribute information update instruction to the system under test through a remote procedure call RPC module, where the update instruction includes the first location information and the first attribute information indicated in the test case.
其中,待测试系统,可以为任意电子设备中的系统,比如可以为手机系统、电脑系统、电视系统等等,本公开对此不做限定。The system to be tested can be a system in any electronic device, such as a mobile phone system, a computer system, a television system, etc. This disclosure does not limit this.
另外,远程过程调用(remote procedure call,RPC),可以通过网络从远程计算机上请求服务,而不需要了解底层网络技术,通常采用客户端设备与服务端设备模式,请求服务的一方为客户端设备,提供服务的一方为服务端设备。本公开中的测试系统即为RPC请求服务的客户端设备,待测试系统即为提供服务的服务端设备。即测试系统可以通过RPC模块,向待测试系统发送测试指令,以使待测试系统基于测试指令,进行对应的测试操作等等。In addition, remote procedure call (RPC) can request services from a remote computer through the network without knowing the underlying network technology. It usually adopts the client device and server device mode, and the party requesting the service is the client device. , the party providing services is the server device. The test system in this disclosure is the client device that requests RPC services, and the system under test is the server device that provides services. That is, the test system can send test instructions to the system under test through the RPC module, so that the system under test can perform corresponding test operations based on the test instructions.
另外,测试用例中指示的第一属性信息,可以为测试用例指示的用于对第一控件进行更新的属性信息,比如可以为第一控件的名称、形状、颜色等进行更新的属性信息等等,本公开对此不做限定。In addition, the first attribute information indicated in the test case may be the attribute information indicated by the test case for updating the first control, such as the attribute information for updating the name, shape, color, etc. of the first control, etc. , this disclosure does not limit this.
可选的,待测试系统,可以为一个,或者也可以为多个。在待测试系统为多个的情况下,测试系统可以通过RPC模块,将属性信息更新指令发送给多个待测试系统,以使多个待测试系统可以根据接收的属性信息更新指令进行更新,从而实现了多个待测试系统的并行更新与测试,进而为提高测试速度提供了条件。Optionally, there can be one system to be tested, or there can be multiple systems. When there are multiple systems under test, the test system can send attribute information update instructions to multiple systems under test through the RPC module, so that multiple systems under test can be updated according to the received attribute information update instructions, thereby It realizes the parallel updating and testing of multiple systems to be tested, thus providing conditions for improving the testing speed.
可以理解的是,测试系统在对待运行的测试用例解析后,可以确定其中包含的任一控件在第一DOM树中的第一位置信息,之后可以将该任一控件的第一位置信息及该测试用例中指示的第一属性信息,通过RPC模块发送给待测试系统,以使待测试系统可以先根据任一控件的第一位置信息确定出对应的任一控件,并根据测试用例中指示的第一属性信息对该任一控件进行更新。It can be understood that after parsing the test case to be run, the test system can determine the first position information of any control included in the first DOM tree, and then can combine the first position information of any control and the The first attribute information indicated in the test case is sent to the system under test through the RPC module, so that the system under test can first determine the corresponding control based on the first position information of any control, and then determine the corresponding control based on the first location information indicated in the test case. The first attribute information updates any control.
举例来说,若确定出任一控件“菜单”的第一位置信息为:DOM树1中的父节点,测试用例中指示的第一属性信息为:将“菜单”图表的颜色修改为蓝色,那么可以将“DOM树1中的父节点”、及“将图表的颜色修改为蓝色”,作为属性信息更新指令,通过RPC模块发送给待测试系统,以使待测试系统执行该属性信息更新指令等等,本公开对此不做限定。For example, if it is determined that the first position information of any control "menu" is: the parent node in DOM tree 1, the first attribute information indicated in the test case is: change the color of the "menu" chart to blue, Then "parent node in DOM tree 1" and "change the color of the chart to blue" can be used as attribute information update instructions and sent to the system under test through the RPC module, so that the system under test can perform the attribute information update instructions, etc., this disclosure does not limit this.
从而,本公开实施例中,测试系统在对待运行的测试用例解析后,若确定出测试用例用于对待测试系统中的任一控件的属性信息进行更新,可以进一步确定该任一控件在第一DOM树中的第一位置信息。若通过遍历第一DOM树,获取到该任一控件在第一DOM树中的第一位置信息,此时可以再通过RPC模块向待测试系统发送属性信息更新指令;若通过遍历第一DOM树,未获取到该任一控件在第一DOM树中的第一位置信息,那么此时无需再向待测试系统发送属性信息更新指令,减少了不必要的数据处理过程,节省了时间,从而避免了测试系统与待测试系统侧第一DOM树不同步情况的发生,也提高了效率。Therefore, in the embodiment of the present disclosure, after the test system parses the test case to be run, if it is determined that the test case is used to update the attribute information of any control in the system to be tested, it can further determine that any control is in the first The first position information in the DOM tree. If by traversing the first DOM tree, the first position information of any control in the first DOM tree is obtained, at this time, the attribute information update instruction can be sent to the system under test through the RPC module; if by traversing the first DOM tree, , the first position information of any control in the first DOM tree has not been obtained, then there is no need to send attribute information update instructions to the system to be tested at this time, which reduces unnecessary data processing, saves time, and avoids It eliminates the occurrence of out-of-synchronization between the test system and the first DOM tree of the system to be tested, and also improves efficiency.
步骤104,获取待测试系统通过RPC模块返回的更新结果。Step 104: Obtain the update result returned by the system under test through the RPC module.
其中,待测试系统在接收到测试系统发送的属性信息更新指令后,可以按照该属性信息更新指令进行相应的更新操作,之后可以将更新结果返回给测试系统,从而测试系统可以获取待测试系统通过RPC模块返回的更新结果。Among them, after receiving the attribute information update instruction sent by the test system, the system to be tested can perform corresponding update operations according to the attribute information update instruction, and then the update result can be returned to the test system, so that the test system can obtain the pass of the system under test. Update results returned by the RPC module.
另外,更新结果可能有多种,比如已完成更新、更新成功、更新失败等等,本公开对此不做限定。In addition, there may be multiple update results, such as updated completed, updated successfully, updated failed, etc., and this disclosure does not limit this.
从而,本公开实施例中,测试系统通过获取待测试系统通过RPC模块返回的更新结果,可以直接确定出待测试系统是否已经进行更新,从而可以进一步确定出待测试系统的性能。比如,若待测试系统返回的更新结果为:已完成更新,那么可以认为待测试系统性能较好;或者,若待测试系统返回的更新结果为:更新失败,那么可以认为待测试系统性能较差等等,本公开对此不做限定。Therefore, in the embodiment of the present disclosure, the test system can directly determine whether the system under test has been updated by obtaining the update result returned by the system under test through the RPC module, thereby further determining the performance of the system under test. For example, if the update result returned by the system to be tested is: Update completed, then the performance of the system to be tested can be considered to be good; or, if the update result returned by the system to be tested is: Update failed, then the performance of the system to be tested can be considered to be poor. Etc., this disclosure does not limit this.
本公开实施例,测试系统可以先获取当前的待运行的测试用例,在测试用例用于对待测试系统中的任一控件的属性信息进行更新的情况下,可以遍历任一控件所属的第一文档对象模型DOM树,以确定任一控件在第一DOM树中的第一位置信息,之后可以通过远程过程调用RPC模块向待测试系统发送属性信息更新指令,其中,更新指令中包含所述第一位置信息及测试用例中指示的第一属性信息,之后可以获取待测试系统通过RPC模块返回的更新结果。由此,测试系统可以通过RPC模块,将属性信息更新指令发送给待测试系统,以使各待测试系统可以根据测试指令并行进行DOM树的更新操作,之后可以获取待测试系统返回的更新结果,从而实现了待测试系统中的DOM树的并行更新测试,节省了时间,提高了更新效率。In this disclosed embodiment, the test system can first obtain the current test case to be run. When the test case is used to update the attribute information of any control in the system to be tested, the first document to which any control belongs can be traversed. The object model DOM tree is used to determine the first position information of any control in the first DOM tree, and then the attribute information update instruction can be sent to the system under test through the remote procedure call RPC module, where the update instruction contains the first After the location information and the first attribute information indicated in the test case, the update result returned by the system under test through the RPC module can be obtained. Therefore, the test system can send attribute information update instructions to the system under test through the RPC module, so that each system under test can update the DOM tree in parallel according to the test instructions, and then obtain the update results returned by the system under test. This enables parallel update testing of the DOM tree in the system to be tested, saving time and improving update efficiency.
图2为本公开实施例提供的一种跨系统测试方法的流程示意图,该方法可以由测试系统执行。如图2所示,该跨系统测试方法可以包括以下步骤:FIG. 2 is a schematic flowchart of a cross-system testing method provided by an embodiment of the present disclosure. The method can be executed by a testing system. As shown in Figure 2, this cross-system testing method can include the following steps:
步骤201,获取当前的待运行的测试用例。Step 201: Obtain the current test case to be run.
步骤202,响应于测试用例用于对待测试系统中的任一控件的属性信息进行更新,遍历任一控件所属的第一文档对象模型DOM树,以确定任一控件在第一DOM树中的第一位置信息。Step 202: In response to the test case being used to update the attribute information of any control in the system to be tested, traverse the first Document Object Model DOM tree to which any control belongs to determine the third position of any control in the first DOM tree. a location information.
步骤203,通过远程过程调用RPC模块向待测试系统发送属性信息更新指令,其中,更新指令中包含第一位置信息及测试用例中指示的第一属性信息。Step 203: Send an attribute information update instruction to the system under test through a remote procedure call RPC module, where the update instruction includes the first location information and the first attribute information indicated in the test case.
步骤204,通过RPC模块,接收待测试系统返回的更新后的第二DOM树。Step 204: Receive the updated second DOM tree returned by the system to be tested through the RPC module.
可以理解的是,测试系统可以通过RPC模块向待测试系统发送属性信息更新指令,以使待测试系统根据任一控件的第一位置信息,确定出对应的控件,并根据测试用例中指示的第一属性信息对该任一控件进行更新,之后待测试系统可以将更新后的第二DOM树发送给测试系统。那么测试系统可以通过RPC模块,接收待测试系统返回的更新后的第二DOM树等等,本公开对此不做限定。It can be understood that the test system can send an attribute information update instruction to the system under test through the RPC module, so that the system under test determines the corresponding control based on the first position information of any control, and determines the corresponding control according to the first position information indicated in the test case. One attribute information is updated for any control, and then the system to be tested can send the updated second DOM tree to the testing system. Then the test system can receive the updated second DOM tree returned by the system to be tested through the RPC module, etc. This disclosure does not limit this.
步骤205,对第二DOM树进行解析,以获取任一控件的第二位置信息及第二属性信息。Step 205: Parse the second DOM tree to obtain the second position information and second attribute information of any control.
其中,第二位置信息,可以理解为该任一控件在更新后的第二DOM树中的中的位置信息;第二属性信息,可以理解为该任一控件在更新后的第二DOM树中的中的属性信息等等,本公开对此不做限定。Among them, the second position information can be understood as the position information of any control in the updated second DOM tree; the second attribute information can be understood as the position information of any control in the updated second DOM tree. attribute information, etc., this disclosure does not limit this.
步骤206,根据第二属性信息与第一属性信息间的第一匹配度、及第一位置信息与第二位置信息间的第二匹配度,确定待测试系统中用户界面的功能是否正常。Step 206: Determine whether the function of the user interface in the system to be tested is normal based on the first matching degree between the second attribute information and the first attribute information and the second matching degree between the first location information and the second location information.
可以理解的是,第二属性信息与与第一属性信息间的第一匹配度越高、及第一位置信息与第二位置信息间的第二匹配度越高,待测试系统中用户界面的功能越正常,也即匹配度越高,符合用户预期的占比也就越高;第二属性信息与与第一属性信息间的第一匹配度越低、及第一位置信息与第二位置信息间的第二匹配度越低,待测试系统中用户界面的功能异常的可能性越高,也即匹配度越低,符合用户预期的占比也就越低等等,本公开对此不做限定。It can be understood that the higher the first matching degree between the second attribute information and the first attribute information, and the higher the second matching degree between the first location information and the second location information, the better the user interface in the system to be tested. The more normal the function, that is, the higher the matching degree, the higher the proportion that meets user expectations; the lower the first matching degree between the second attribute information and the first attribute information, and the lower the first matching degree between the first location information and the second location. The lower the second matching degree between the information, the higher the possibility of functional abnormality of the user interface in the system to be tested, that is, the lower the matching degree, the lower the proportion that meets user expectations, etc., this disclosure does not Make limitations.
举例来说,在测试用例中指示的第一属性信息为“圆形”的情况下,若第二属性信息为“圆形”,那么可以表明二者一致匹配成功,该属性信息对应的用户界面的功能正常,符合预期的效果;在第一位置信息与第二位置信息均为“第一个父节点”的情况下,可以表明位置信息也匹配成功,从而根据上述匹配结果,可以确定待测试系统中用户界面的功能正常,符合预期的效果。For example, when the first attribute information indicated in the test case is "circle", if the second attribute information is "circle", it can indicate that the two are matched successfully, and the user interface corresponding to the attribute information The function of The user interface in the system functions normally and meets the expected results.
或者,在测试用例中指示的第一属性信息为“圆形”的情况下,若第二属性信息为“圆形”,那么可以表明二者一致,也即该属性信息对应的用户界面的功能正常;若第一位置信息为“第一个父节点”,第二位置信息为“第三个父节点”,可以表明位置信息未匹配,那么可以确定待测试系统中用户界面的功能存在部分异常的情况下,也即“位置信息”功能存在异常,不符合预期的效果。Or, in the case where the first attribute information indicated in the test case is "circle", if the second attribute information is "circle", it can indicate that the two are consistent, that is, the function of the user interface corresponding to the attribute information Normal; if the first location information is the "first parent node" and the second location information is the "third parent node", it can indicate that the location information does not match, then it can be determined that there are some abnormalities in the functions of the user interface in the system to be tested In this case, that is, the "location information" function is abnormal and does not meet the expected results.
或者,若第一位置信息为“第一个父节点”,第二位置信息为“第一个父节点”,可以表明位置信息匹配成功;在测试用例中指示的第一属性信息为“圆形”的情况下,若第二属性信息为“矩形”,那么可以表明二者未匹配;那么根据上述匹配结果,可以确定待测试系统中用户界面的功能存在部分异常的情况下,也即“属性信息”功能存在异常,不符合预期的效果。Or, if the first location information is "first parent node" and the second location information is "first parent node", it can indicate that the location information is matched successfully; the first attribute information indicated in the test case is "circle" "In the case of ", if the second attribute information is "rectangular", it can indicate that the two do not match; then based on the above matching results, it can be determined that there is some abnormality in the function of the user interface in the system to be tested, that is, the "attribute" There is an anomaly in the "Message" function and does not meet the expected results.
需要说明的是,上述示例只是示意性说明,不能作为对本公开实施例中确定待测试系统中用户界面的功能是否正常的方式等的限定。It should be noted that the above example is only a schematic illustration and cannot be used as a limitation on the method of determining whether the function of the user interface in the system to be tested is normal in the embodiments of the present disclosure.
可以理解的是,待测试系统还可以通过RPC模块,向测试系统发送运行参数,从而测试系统可以基于运行参数,确定待测试系统的性能。It can be understood that the system under test can also send operating parameters to the test system through the RPC module, so that the test system can determine the performance of the system under test based on the operating parameters.
可选的,测试系统可以通过RPC模块,接收待测试系统返回的运行参数,之后可以根据运行参数及属性信息更新指令,确定待测试系统的性能。Optionally, the test system can receive the operating parameters returned by the system under test through the RPC module, and then update the instructions based on the operating parameters and attribute information to determine the performance of the system under test.
其中,运行参数,可以为待测试系统中的参数,比如可以中央处理器(central processing unit,CPU)占用率、内存占用率等等,本公开对此不做限定。The operating parameters may be parameters in the system to be tested, such as central processing unit (CPU) occupancy rate, memory occupancy rate, etc. This disclosure does not limit this.
举例来说,若测试系统通过RPC模块,接收待测试系统返回的运行参数为:CPU占用率为10%,属性信息更新中包含的测试用例中指示的第一属性信息为:将控件1的图标颜色更新为蓝色,那么可以确定待测试系统有足够的资源对控件1的图标进行更新,从而可以确定待测试系统的性能较好。For example, if the test system passes the RPC module and receives the operating parameters returned by the system under test: CPU usage is 10%, the first attribute information indicated in the test case included in the attribute information update is: Change the icon of control 1 If the color is updated to blue, then it can be determined that the system under test has enough resources to update the icon of control 1, and thus the performance of the system under test can be determined to be good.
或者,若测试系统通过RPC模块,接收待测试系统返回的运行参数:内存占用率为99%,属性信息更新中包含的测试用例中指示的第一属性信息为:将控件1的图标颜色更新为蓝色、将页面1中的内容备份到文档中,那么可以确定待测试系统当前没有足够的资源对控件1的图标进行更新、以及将页面1中的内容进行备份,从而可以确定待测试系统的性能较差。Or, if the test system receives the operating parameters returned by the system under test through the RPC module: the memory usage is 99%, and the first attribute information indicated in the test case included in the attribute information update is: update the icon color of control 1 to Blue, back up the content in page 1 to the document, then it can be determined that the system to be tested currently does not have enough resources to update the icon of control 1, and back up the content in page 1, so that it can be determined that the system to be tested Poor performance.
需要说明的是,上述示例只是示意性说明,不能作为对本公开实施例中确定待测试系统的性能的方式等的限定。It should be noted that the above examples are only schematic illustrations and cannot be used as limitations on the manner of determining the performance of the system to be tested in the embodiments of the present disclosure.
可选的,测试系统在通过RPC模块,接收待测试系统返回的更新后的第二DOM树后,还可以利用第二DOM树,替换第一DOM树。Optionally, after receiving the updated second DOM tree returned by the system to be tested through the RPC module, the test system can also use the second DOM tree to replace the first DOM tree.
可以理解的是,测试系统可以通过RPC模块向待测试系统发送属性信息更新指令,以使待测试系统根据任一控件的第一位置信息确定出对应的控件,并根据测试用例中指示的第一属性信息对该任一控件进行更新,之后待测试系统可以将更新后的第二DOM树发送给测试系统。那么测试系统可以通过RPC模块,接收待测试系统返回的更新后的第二DOM树,并对存储的第一DOM树进行更新,比如可以利用第二DOM树,替换第一DOM树等等,本公开对此不做限定。可选的,待测试系统也可以在DOM树中任一节点发生变化的情况下,向测试系统发送更新后的DOM树,从而测试系统可以通过RPC模块,接收待测试系统返回的更新后的DOM树,并进行DOM树的更新等等,本公开对此不做限定。It can be understood that the test system can send an attribute information update instruction to the system under test through the RPC module, so that the system under test determines the corresponding control based on the first position information of any control, and determines the corresponding control according to the first position information indicated in the test case. The attribute information is updated for any control, and then the system to be tested can send the updated second DOM tree to the testing system. Then the test system can receive the updated second DOM tree returned by the system to be tested through the RPC module, and update the stored first DOM tree. For example, the second DOM tree can be used to replace the first DOM tree, etc. This There are no public restrictions on this. Optionally, the system under test can also send an updated DOM tree to the test system when any node in the DOM tree changes, so that the test system can receive the updated DOM returned by the system under test through the RPC module. tree, and update the DOM tree, etc. This disclosure does not limit this.
举例来说,若待测试系统中的某一页面发生变化,那么对应的DOM树也会相应进行更新,之后待测试系统可以将更新后的DOM树发送给测试系统。那么测试系统可以通过RPC模块,接收待测试系统发送的更新后的DOM树等等,本公开对此不做限定。For example, if a page in the system to be tested changes, the corresponding DOM tree will be updated accordingly, and then the system to be tested can send the updated DOM tree to the testing system. Then the test system can receive the updated DOM tree sent by the system to be tested through the RPC module, etc. This disclosure does not limit this.
可选的,响应于任一控件的位置信息为空,向待测试系统发送DOM树同步指令,其中,同步指令中包含任一控件所属的应用标识。Optionally, in response to the position information of any control being empty, send a DOM tree synchronization instruction to the system under test, where the synchronization instruction includes the application identifier to which any control belongs.
可以理解的是,若对该任一控件所属的第一DOM树进行遍历,未获取到该任一控件的第一位置信息,可以表明测试系统侧的第一DOM树中未包含该任一控件的信息,那么可以向待测试系统发送DOM树同步指令,以使待测试系统根据该同步指令,将最新的DOM树发送给测试系统。之后测试系统在接收到待测试系统返回的第二DOM树之后,可以对当前的第一DOM树进行同步。It can be understood that if the first DOM tree to which any control belongs is traversed and the first position information of any control is not obtained, it can indicate that the first DOM tree on the test system side does not contain any control. information, then the DOM tree synchronization instruction can be sent to the system under test, so that the system under test can send the latest DOM tree to the test system according to the synchronization instruction. Afterwards, the test system can synchronize the current first DOM tree after receiving the second DOM tree returned by the system to be tested.
举例来说,若任一控件为“暂停”,所属的应用标识为“XX播放器”,通过对与“XX 播放器”关联的第一DOM树进行遍历,未获取到“暂停”控件对应的位置信息,那么可以向待测试系统发送包含DOM树同步指令,其中,该同步指令中包含“XX播放器”,以使待测试系统可以根据接收的DOM树同步指令,将“XX播放器”关联的第二DOM树发送给测试系统,之后测试系统可以根据接收的第二DOM树,对“XX播放器”进行同步。For example, if any control is "pause" and the application identification is "XX Player", by traversing the first DOM tree associated with "XX Player", the corresponding "pause" control is not obtained. location information, then you can send a DOM tree synchronization instruction to the system under test, where the synchronization instruction contains "XX player", so that the system under test can associate "XX player" according to the received DOM tree synchronization instruction. The second DOM tree is sent to the test system, and then the test system can synchronize the "XX player" based on the received second DOM tree.
需要说明的是,上述示例只是示意性说明,不能作为对本公开实施例中任一控件、应用标识、第一DOM树等的限定。It should be noted that the above examples are only schematic illustrations and cannot be used as a limitation on any control, application identifier, first DOM tree, etc. in the embodiments of the present disclosure.
本公开实施例,测试系统可以先获取当前的待运行的测试用例,之后可以在测试用例用于对待测试系统中的任一控件的属性信息进行更新的情况下,遍历任一控件所属的第一文档对象模型DOM树,以确定任一控件在第一DOM树中的第一位置信息,之后可以通过RPC模块向待测试系统发送属性信息更新指令,之后可以通过RPC模块,接收待测试系统返回的更新后的第二DOM树。由此,测试系统在确定出待更新的任一控件对应的更新后的属性信息、及其在第一DOM树中的第一位置信息后,可以通过RPC模块向待测试系统发送属性信息更新指令,并接收待测试系统返回的更新后的第二DOM树,从而实现了DOM树的更新与同步,节省了DOM树的更新时间,提高了效率。In this disclosed embodiment, the test system can first obtain the current test case to be run, and then traverse the first test case to which any control belongs when the test case is used to update the attribute information of any control in the system to be tested. Document Object Model DOM tree to determine the first position information of any control in the first DOM tree. Then the attribute information update instructions can be sent to the system under test through the RPC module, and then the information returned by the system under test can be received through the RPC module. The updated second DOM tree. Therefore, after the test system determines the updated attribute information corresponding to any control to be updated and its first position information in the first DOM tree, it can send an attribute information update instruction to the system to be tested through the RPC module. , and receives the updated second DOM tree returned by the system to be tested, thereby realizing the update and synchronization of the DOM tree, saving the update time of the DOM tree, and improving the efficiency.
本公开实施例还提出了一种跨系统测试装置,图3是根据本公开实施例的跨系统测试装置的结构示意图。The embodiment of the disclosure also provides a cross-system testing device. FIG. 3 is a schematic structural diagram of the cross-system testing device according to the embodiment of the disclosure.
如图3所示,该跨系统测试装置300,被配置在测试系统侧,所述装置300,包括:第一获取模块310、遍历模块320、发送模块330及第二获取模块340。As shown in FIG. 3 , the cross-system testing device 300 is configured on the test system side. The device 300 includes: a first acquisition module 310 , a traversal module 320 , a sending module 330 and a second acquisition module 340 .
其中,第一获取模块310,用于获取当前的待运行的测试用例。Among them, the first acquisition module 310 is used to acquire the current test case to be run.
遍历模块320,用于响应于所述测试用例用于对待测试系统中的任一控件的属性信息进行更新,遍历所述任一控件所属的第一文档对象模型DOM树,以确定所述任一控件在所述第一DOM树中的第一位置信息。The traversal module 320 is configured to, in response to the test case being used to update the attribute information of any control in the system to be tested, traverse the first document object model DOM tree to which the any control belongs to determine whether the The first position information of the control in the first DOM tree.
发送模块330,用于通过远程过程调用RPC模块向所述待测试系统发送属性信息更新指令,其中,所述更新指令中包含所述第一位置信息及所述测试用例中指示的第一属性信息。The sending module 330 is configured to send an attribute information update instruction to the system under test through a remote procedure call RPC module, wherein the update instruction includes the first location information and the first attribute information indicated in the test case. .
第二获取模块340,用于获取所述待测试系统通过所述RPC模块返回的更新结果。The second acquisition module 340 is used to acquire the update result returned by the system under test through the RPC module.
可选的,还包括接收模块,用于:Optionally, it also includes a receiving module for:
通过所述RPC模块,接收所述待测试系统返回的更新后的第二DOM树;Through the RPC module, receive the updated second DOM tree returned by the system to be tested;
利用所述第二DOM树,替换所述第一DOM树。The first DOM tree is replaced with the second DOM tree.
可选的,还包括解析模块,用于:Optionally, a parsing module is also included for:
对所述第二DOM树进行解析,以获取所述任一控件的第二位置信息及第二属性信息;Parse the second DOM tree to obtain the second position information and second attribute information of any control;
根据所述第二属性信息与所述第一属性信息间的第一匹配度、及所述第一位置信息与所述第二位置信息间的第二匹配度,确定所述待测试系统中用户界面的功能是否正常。According to the first matching degree between the second attribute information and the first attribute information, and the second matching degree between the first location information and the second location information, determine the user in the system to be tested. Whether the interface functions normally.
可选的,所述遍历模块320,还用于:Optionally, the traversal module 320 is also used to:
确定与所述测试用例中所述任一控件所属的应用标识关联的DOM树,为所述第一DOM树。The DOM tree associated with the application identifier to which any control in the test case belongs is determined to be the first DOM tree.
可选的,所述发送模块,还用于:Optionally, the sending module is also used for:
响应于所述任一控件的位置信息为空,向所述待测试系统发送DOM树同步指令,其中,所述同步指令中包含所述任一控件所属的应用标识。In response to the position information of any control being empty, a DOM tree synchronization instruction is sent to the system to be tested, wherein the synchronization instruction includes an application identifier to which any control belongs.
可选的,还包括确定模块,用于:Optionally, a determination module is also included for:
通过所述RPC模块,接收所述待测试系统返回的运行参数;Through the RPC module, receive the operating parameters returned by the system to be tested;
根据所述运行参数及所述更新指令,确定所述待测试系统的性能。According to the operating parameters and the update instruction, the performance of the system under test is determined.
本公开实施例中的上述各模块的功能及具体实现原理,可参照上述各方法实施例,此处不再赘述。For the functions and specific implementation principles of the above-mentioned modules in the embodiments of the present disclosure, reference may be made to the above-mentioned method embodiments and will not be described again here.
本公开实施例的跨系统测试装置,测试系统可以先获取当前的待运行的测试用例,在 测试用例用于对待测试系统中的任一控件的属性信息进行更新的情况下,可以遍历任一控件所属的第一文档对象模型DOM树,以确定任一控件在第一DOM树中的第一位置信息,之后可以通过远程过程调用RPC模块向待测试系统发送属性信息更新指令,其中,更新指令中包含所述第一位置信息及测试用例中指示的第一属性信息,之后可以获取待测试系统通过RPC模块返回的更新结果。由此,测试系统可以通过RPC模块,将属性信息更新指令发送给待测试系统,以使各待测试系统可以根据测试指令并行进行DOM树的更新操作,之后可以获取待测试系统返回的更新结果,从而实现了待测试系统中的DOM树的并行更新测试,节省了时间,提高了更新效率。In the cross-system testing device of the disclosed embodiment, the test system can first obtain the current test case to be run, and when the test case is used to update the attribute information of any control in the system to be tested, any control can be traversed The first document object model DOM tree to which it belongs is used to determine the first position information of any control in the first DOM tree, and then the attribute information update instruction can be sent to the system under test through the remote procedure call RPC module, where, in the update instruction After including the first location information and the first attribute information indicated in the test case, the update result returned by the system under test through the RPC module can be obtained. Therefore, the test system can send attribute information update instructions to the system under test through the RPC module, so that each system under test can update the DOM tree in parallel according to the test instructions, and then obtain the update results returned by the system under test. This enables parallel update testing of the DOM tree in the system to be tested, saving time and improving update efficiency.
图4是根据本公开实施例的电子设备的结构框图。FIG. 4 is a structural block diagram of an electronic device according to an embodiment of the present disclosure.
如图4所示,该电子设备200包括:存储器210和处理器220,连接不同组件(包括存储器210和处理器220)的总线230。As shown in FIG. 4 , the electronic device 200 includes: a memory 210 and a processor 220 , and a bus 230 connecting different components (including the memory 210 and the processor 220 ).
其中,存储器210用于存储处理器220的可执行指令;处理器201被配置为调用并执行存储器202存储的可执行指令,以实现本公开上述实施例提出的跨系统测试方法。The memory 210 is used to store executable instructions of the processor 220; the processor 201 is configured to call and execute the executable instructions stored in the memory 202 to implement the cross-system testing method proposed in the above embodiments of the present disclosure.
总线230表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect ( PCI) bus.
电子设备200典型地包括多种电子设备可读介质。这些介质可以是任何能够被电子设备200访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。Electronic device 200 typically includes a variety of electronic device-readable media. These media can be any available media that can be accessed by electronic device 200, including volatile and nonvolatile media, removable and non-removable media.
存储器210还可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)240和/或高速缓存存储器250。电子设备200可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统260可以用于读写不可移动的、非易失性磁介质(图4未显示,通常称为“硬盘驱动器”)。尽管图4中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线230相连。存储器210可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本公开各实施例的功能。Memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and/or cache memory 250 . Electronic device 200 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, storage system 260 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 4 and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a disk drive may be provided for reading and writing removable non-volatile disks (e.g., "floppy disks"), and for removable non-volatile optical disks (e.g., CD-ROM, DVD-ROM). or other optical media) that can read and write optical disc drives. In these cases, each drive may be connected to bus 230 through one or more data media interfaces. The memory 210 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of embodiments of the present disclosure.
具有一组(至少一个)程序模块270的程序/实用工具280,可以存储在例如存储器210中,这样的程序模块270包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块270通常执行本公开所描述的实施例中的功能和/或方法。A program/utility 280 having a set of (at least one) program modules 270, which may be stored, for example, in the memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other programs Modules, as well as program data, each of these examples or some combination may include an implementation of a network environment. Program modules 270 generally perform functions and/or methods in the embodiments described in this disclosure.
电子设备200也可以与一个或多个外部设备290(例如键盘、指向设备、显示器291等)通信,还可与一个或者多个使得用户能与该电子设备200交互的设备通信,和/或与使得该电子设备200能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口292进行。并且,电子设备200还可以通过网络适配器293与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器293通过总线230与电子设备200的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备200使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。Electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 200, and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 292. Furthermore, the electronic device 200 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 293. As shown, network adapter 293 communicates with other modules of electronic device 200 via bus 230. It should be understood that, although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
处理器220通过运行存储在存储器210中的程序,从而执行各种功能应用以及数据处理。The processor 220 executes various functional applications and data processing by running programs stored in the memory 210 .
需要说明的是,本公开实施例的电子设备的实施过程参见前述对本公开实施例的跨系 统测试方法的解释说明,此处不再赘述。It should be noted that for the implementation process of the electronic device in the embodiment of the present disclosure, please refer to the aforementioned explanation of the cross-system testing method in the embodiment of the present disclosure, and will not be described again here.
本公开实施例的电子设备,测试系统可以先获取当前的待运行的测试用例,在测试用例用于对待测试系统中的任一控件的属性信息进行更新的情况下,可以遍历任一控件所属的第一文档对象模型DOM树,以确定任一控件在第一DOM树中的第一位置信息,之后可以通过远程过程调用RPC模块向待测试系统发送属性信息更新指令,其中,更新指令中包含所述第一位置信息及测试用例中指示的第一属性信息,之后可以获取待测试系统通过RPC模块返回的更新结果。由此,测试系统可以通过RPC模块,将属性信息更新指令发送给待测试系统,以使各待测试系统可以根据测试指令并行进行DOM树的更新操作,之后可以获取待测试系统返回的更新结果,从而实现了待测试系统中的DOM树的并行更新测试,节省了时间,提高了更新效率。For the electronic device according to the embodiment of the present disclosure, the test system can first obtain the current test case to be run. When the test case is used to update the attribute information of any control in the system to be tested, it can traverse the control to which any control belongs. The first document object model DOM tree is used to determine the first position information of any control in the first DOM tree, and then the attribute information update instruction can be sent to the system under test through the remote procedure call RPC module, where the update instruction contains all The first location information and the first attribute information indicated in the test case are provided, and then the update result returned by the system under test through the RPC module can be obtained. Therefore, the test system can send attribute information update instructions to the system under test through the RPC module, so that each system under test can update the DOM tree in parallel according to the test instructions, and then obtain the update results returned by the system under test. This enables parallel update testing of the DOM tree in the system to be tested, saving time and improving update efficiency.
为了实现上述实施例,本公开实施例还提出了一种非临时性计算机可读存储介质,该存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如前所述的跨系统测试方法。In order to implement the above embodiments, embodiments of the present disclosure also propose a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can perform the cross-processing as mentioned above. System testing methods.
为了实现上述实施例,本公开实施例还提供一种计算机程序产品,该计算机程序由电子设备的处理器执行时,使得电子设备能够执行如前所述的跨系统测试方法。In order to implement the above embodiments, embodiments of the present disclosure also provide a computer program product. When the computer program is executed by a processor of an electronic device, the electronic device can perform the cross-system testing method as described above.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the disclosure that follow the general principles of the disclosure and include common common sense or customary technical means in the technical field that are not disclosed in the disclosure. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the disclosure is limited only by the appended claims.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure. should be covered by the protection scope of this disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims (14)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2022/096085 WO2023230797A1 (en) | 2022-05-30 | 2022-05-30 | Cross-system test method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117480497A true CN117480497A (en) | 2024-01-30 |
Family
ID=89026543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202280004256.2A Pending CN117480497A (en) | 2022-05-30 | 2022-05-30 | A cross-system testing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117480497A (en) |
WO (1) | WO2023230797A1 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090199047A1 (en) * | 2008-01-31 | 2009-08-06 | Yahoo! Inc. | Executing software performance test jobs in a clustered system |
CN107678970A (en) * | 2017-10-20 | 2018-02-09 | 网易(杭州)网络有限公司 | Automated testing method and device, storage medium, electronic equipment |
CN109783356A (en) * | 2018-12-14 | 2019-05-21 | 深圳壹账通智能科技有限公司 | A kind of automated testing method and terminal |
CN110399299B (en) * | 2019-07-17 | 2023-09-26 | 深圳证券交易所 | Automated test framework and test case execution method |
CN112269746A (en) * | 2020-11-10 | 2021-01-26 | 京东数科海益信息科技有限公司 | Automated testing method and related equipment |
-
2022
- 2022-05-30 CN CN202280004256.2A patent/CN117480497A/en active Pending
- 2022-05-30 WO PCT/CN2022/096085 patent/WO2023230797A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2023230797A1 (en) | 2023-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110858172B (en) | A method and device for generating automatic test code | |
CN111414407A (en) | Data query method, device, computer equipment and storage medium for database | |
US10963370B2 (en) | Default mock implementations at a server | |
WO2021249356A1 (en) | Form data verification method, system, server, and user terminal | |
WO2022142536A1 (en) | Grayscale publishing method, system and apparatus, and device and storage medium | |
US9128886B2 (en) | Computer implemented method, computer system, electronic interface, mobile computing device and computer readable medium | |
CN111694866A (en) | Data searching and storing method, data searching system, data searching device, data searching equipment and data searching medium | |
CN108073429A (en) | A kind of means of payment collocation method, device, equipment and storage medium | |
CN113485927B (en) | Test data generation method, device, equipment and storage medium | |
CN111783010B (en) | Webpage blank page monitoring method, device, terminal and storage medium | |
CN116360735A (en) | Form generation method, device, equipment and medium | |
US12367241B2 (en) | System and techniques for enriching log records with fields from other log records in structured format | |
CN112445790A (en) | Report data storage method, device, equipment and medium | |
WO2023230797A1 (en) | Cross-system test method and apparatus | |
CN114490104B (en) | Information forwarding method, device, equipment and medium in Android system module | |
CN113760703B (en) | A method, device, equipment and storage medium for generating mock data | |
CN115633022A (en) | Web page access method, device, equipment and storage medium | |
CN114741636A (en) | Page jump method, device, equipment and storage medium | |
CN114547023A (en) | Flow data processing method and device, computer equipment and storage medium | |
US8127026B2 (en) | User operation acting device, user operation acting program, and computer readable recording medium | |
CN113064987A (en) | Data processing method, apparatus, electronic device, medium, and program product | |
CN112487218A (en) | Content processing method, system, device, computing equipment and storage medium | |
CN116566964B (en) | View data merging method, system, electronic device, medium and program product | |
CN113360417B (en) | Test method, session modifier, electronic device and medium | |
CN114911762A (en) | A data file processing method, device, server and storage medium |
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 |