CN117480497A - Cross-system testing method and device - Google Patents

Cross-system testing method and device Download PDF

Info

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
tested
dom tree
attribute information
control
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202280004256.2A
Other languages
Chinese (zh)
Inventor
高玉龙
姜竣
李建彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Publication of CN117480497A publication Critical patent/CN117480497A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging 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

The embodiment of the disclosure discloses a cross-system testing method and a device, wherein the cross-system testing method is executed by a testing system and comprises the following steps: acquiring a current test case to be operated; responding to the test case for updating attribute information of any control in the system to be tested, traversing a DOM tree of a first document object model to which any control belongs, and determining first position information of any control in the DOM tree; sending an attribute information updating instruction to a system to be tested by calling an RPC module through a remote procedure; and acquiring an updating result returned by the system to be tested through the RPC module. Therefore, the test system can send the attribute information update instruction to the system to be tested through the RPC module, so that each system to be tested can perform DOM tree update operation in parallel according to the test instruction, and then the update result returned by the system to be tested can be obtained, thereby saving time and improving update efficiency.

Description

Cross-system testing method and device Technical Field
The disclosure relates to the field of computer technology, and in particular, to a cross-system testing method, a device, an electronic device and a storage medium.
Background
As computer technology advances, various applications or systems are updated iteratively faster and faster, and often need to be tested to determine whether they are available.
In the related art, a test system is usually connected with a system to be tested through a data line, so that the system to be tested can be tested. Because the number of the hardware interfaces is limited, only a limited number of systems to be tested can be tested at a time, and if a plurality of systems to be tested need to be tested, a great deal of time is needed, and the efficiency is low. Thus, how to improve the efficiency of cross-system testing is of paramount importance.
Disclosure of Invention
The embodiment of the disclosure provides a cross-system testing method and device.
In a first aspect, embodiments of the present disclosure provide a cross-system testing method, performed by a testing system, comprising:
acquiring a current test case to be operated;
responding to the test case for updating attribute information of any control in a system to be tested, traversing a first Document Object Model (DOM) tree to which the any control belongs, and determining first position information of the any control in the first DOM tree;
sending an attribute information updating instruction to the system to be tested through a Remote Procedure Call (RPC) module, wherein the updating instruction comprises the first position information and the first attribute information indicated in the test case;
and acquiring an updating result returned by the system to be tested through the RPC module.
Optionally, after the sending the attribute information update instruction to the system to be tested, the method further includes:
receiving an updated second DOM tree returned by the system to be tested through the RPC module;
and replacing the first DOM tree by using the second DOM tree.
Optionally, after receiving the updated DOM tree returned by the system to be tested, the method further includes:
analyzing the second DOM tree to obtain second position information and second attribute information of any control;
and determining whether the function of the user interface in the system to be tested is normal according to the first matching degree between the second attribute information and the first attribute information and the second matching degree between the first position information and the second position information.
Optionally, before traversing the first DOM tree to which the any control belongs, the method further includes:
and determining a DOM tree associated with the application identifier to which any control belongs in the test case as the first DOM tree.
Optionally, after determining the position information of the any control in the first DOM tree, the method further includes:
and responding to the position information of any control is empty, and sending a DOM tree synchronization instruction to the system to be tested, wherein the synchronization instruction comprises an application identifier to which the any control belongs.
Optionally, the method further comprises:
receiving the running parameters returned by the system to be tested through the RPC module;
and determining the performance of the system to be tested according to the operation parameters and the updating instructions.
In a second aspect, embodiments of the present disclosure provide a cross-system testing apparatus configured on a testing system side, including:
the first acquisition module is used for acquiring the current test case to be operated;
the traversal module is used for responding to the test case and updating attribute information of any control in the system to be tested, traversing a DOM tree of a first document object model to which the any control belongs, and determining first position information of the any control in the first DOM tree;
the sending module is used for sending an attribute information updating instruction to the system to be tested through a Remote Procedure Call (RPC) module, wherein the updating instruction comprises the first position information and the first attribute information indicated in the test case;
and the second acquisition module is used for acquiring an updating result returned by the system to be tested through the RPC module.
Optionally, the device further comprises a receiving module for:
receiving an updated second DOM tree returned by the system to be tested through the RPC module;
and replacing the first DOM tree by using the second DOM tree.
Optionally, the device further comprises a parsing module for:
analyzing the second DOM tree to obtain second position information and second attribute information of any control;
and determining whether the function of the user interface in the system to be tested is normal according to the first matching degree between the second attribute information and the first attribute information and the second matching degree between the first position information and the second position information.
Optionally, the traversing module is further configured to:
and determining a DOM tree associated with the application identifier to which any control belongs in the test case as the first DOM tree.
Optionally, the sending module is further configured to:
and responding to the position information of any control is empty, and sending a DOM tree synchronization instruction to the system to be tested, wherein the synchronization instruction comprises an application identifier to which the any control belongs.
Optionally, the method further comprises a determining module for:
receiving the running parameters returned by the system to be tested through the RPC module;
and determining the performance of the system to be tested according to the operation parameters and the updating instructions.
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 invoke and execute the executable instructions stored in the memory to implement the cross-system test 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, which when executed by a processor of an electronic device, enables the electronic device to perform a cross-system test method set forth in an embodiment of the first aspect of the present disclosure.
In a fifth aspect, embodiments of the present disclosure provide a computer program product, which, when executed by a processor of an electronic device, enables the electronic device to perform the cross-system test method set forth in the embodiments of the first aspect of the present disclosure.
According to the cross-system testing method, the device, the electronic equipment and the storage medium, a testing system can acquire a current testing case to be operated, under the condition that the testing case is used for updating attribute information of any control in the system to be tested, a first Document Object Model (DOM) tree to which any control belongs can be traversed to determine first position information of any control in the first DOM tree, and then an attribute information updating instruction can be sent to the system to be tested through a Remote Procedure Call (RPC) module, wherein the updating instruction comprises the first position information and the first attribute information indicated by the testing case, and then an updating result returned by the system to be tested through the RPC module can be acquired. Therefore, the test system can send the attribute information update instruction to the system to be tested through the RPC module, so that each system to be tested can perform DOM tree update operation in parallel according to the test instruction, and then the update result returned by the system to be tested can be obtained, thereby realizing the parallel update test of the DOM tree in the system to be tested, saving time and improving update efficiency.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background of the present disclosure, the following description will explain the drawings that are required to be used in the embodiments or the background of the present disclosure.
FIG. 1 is a flow chart of a cross-system test method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a cross-system test method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a cross-system testing device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural view of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of explaining the present disclosure and are not to be construed as limiting the present disclosure.
The following describes a cross-system testing method, a device, an electronic apparatus and a storage medium according to an embodiment 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 electronic equipment.
Fig. 1 is a flow chart of a cross-system testing method provided in an embodiment of the disclosure, which may be performed by a testing system.
As shown in fig. 1, the cross-system test method may include the steps of:
step 101, obtaining a current test case to be operated.
The test cases can be a group of documents which are formed by preconditions, inputs, execution conditions, expected results and the like so as to complete data of a specific requirement or target test, and embody a test scheme, a method, a technology and a strategy.
Alternatively, the test case uploaded by the user may be acquired through a specific interface. For example, test cases uploaded by a tester may be obtained through a python (python) interface, etc., which is not limited by the present disclosure.
The number of test cases to be executed may be one or may be plural, and the present disclosure is not limited to this.
Step 102, responding to the test case and updating attribute information of any control in the system to be tested, traversing a DOM tree of a first target document object model to which any control belongs, and determining first position information of any control in the first DOM tree.
The attribute information may be a position, a name, an icon, content, and the like of the control, which is not limited in this disclosure.
Optionally, the updated attribute information corresponding to any control in the system to be tested can be determined by analyzing the current test case to be run. For example, by analyzing the test case, updated attribute information corresponding to the login control is determined as follows: the icons are circular, etc., and this disclosure is not limited in this regard.
In addition, the document object model (document object model, DOM), which can be understood as providing an access model for the entire document, takes the document as a tree structure, each node of the tree represents a hypertext markup language (hyper text markup language, HTML) tag or text item within the tag, and the DOM tree can accurately describe the inter-tag relevance in the HTML document. In general, nodes and content of the DOM tree may be accessed, modified, added, deleted, etc., using methods and attributes of the object, which is not limited by the present disclosure.
For example, if any control "cancels" the first DOM tree to which it belongs is: DOM tree 1, then each node may be traversed in the "DOM tree 1", and when the "cancel" control is obtained, the first position information of the "cancel" control in the "DOM tree 1" may be determined, for example, as follows: a third node in the second column; or may be a third child node, etc., which is not limited by the present disclosure.
It will be appreciated that the first DOM tree may be determined prior to traversing the DOM tree of the target document object model to which any control belongs.
Optionally, a DOM tree associated with an application identifier to which any control in the test case belongs may be determined to be the first DOM tree.
It can be appreciated that by analyzing the test case, the application identifier contained therein and any control corresponding to the application identifier can be determined, which is not limited in this disclosure.
The application identifier may be in a form or presentation, which may be set in advance, for example, may be "application 1", "communication application 2", "XX game", etc., which is not limited in this disclosure.
For example, by parsing the test case, it is determined that the application to which any control "start" belongs is identified as "XX game", and then the first DOM tree can be determined by traversing the currently stored DOM tree. For example, the DOM tree associated with the "XX" game is: DOM tree 2, then "DOM tree 2" may be determined as the first DOM tree, etc., which is not limited by the present disclosure.
And step 103, sending an attribute information update instruction to the system to be tested through a Remote Procedure Call (RPC) module, wherein the update instruction comprises first position information and first attribute information indicated in the test case.
The system to be tested may be a system in any electronic device, for example, may be a mobile phone system, a computer system, a television system, etc., which is not limited in this disclosure.
In addition, remote procedure calls (remote procedure call, RPC) may request services from a remote computer over a network without knowledge of underlying network technology, typically using a client device and server device model, with the party requesting the services being the client device and the party providing the services being the server device. The test system in the disclosure is the client device for the RPC to request the service, and the system to be tested is the server device for providing the service. That is, the test system may send a test instruction to the system to be tested through the RPC module, so that the system to be tested performs a corresponding test operation based on the test instruction, and so on.
In addition, the first attribute information indicated in the test case may be attribute information indicated in the test case for updating the first control, for example, attribute information that may be updated by a name, a shape, a color, or the like of the first control, which is not limited in this disclosure.
Alternatively, the number of the systems to be tested may be one, or may be plural. Under the condition that a plurality of systems to be tested are provided, the test system can send the attribute information updating instruction to the plurality of systems to be tested through the RPC module, so that the plurality of systems to be tested can be updated according to the received attribute information updating instruction, the parallel updating and testing of the plurality of systems to be tested are realized, and further, the condition is provided for improving the testing speed.
It can be understood that after the test system analyzes the test case to be operated, the first position information of any control contained in the first position information in the first DOM tree can be determined, then the first position information of any control and the first attribute information indicated in the test case can be sent to the test system through the RPC module, so that the test system can determine any corresponding control according to the first position information of any control, and update any control according to the first attribute information indicated in the test case.
For example, if the first position information of any control "menu" is determined as: the parent node in DOM tree 1, the first attribute information indicated in the test case is: if the color of the "menu" chart is modified to be blue, the "father node in the DOM tree 1" and the "color of the chart may be modified to be blue" as the attribute information update instruction, and the attribute information update instruction may be sent to the system to be tested through the RPC module, so that the system to be tested executes the attribute information update instruction, and the disclosure is not limited thereto.
Therefore, in the embodiment of the disclosure, after the test system analyzes the test case to be operated, if it is determined that the test case is used for updating the attribute information of any control in the system to be tested, the first position information of any control in the first DOM tree can be further determined. If the first position information of any control in the first DOM tree is obtained by traversing the first DOM tree, at the moment, an attribute information updating instruction can be sent to the system to be tested through the RPC module; if the first position information of any control in the first DOM tree is not obtained by traversing the first DOM tree, then the attribute information updating instruction is not required to be sent to the system to be tested any more, unnecessary data processing processes are reduced, time is saved, and therefore the occurrence of the condition that the test system is not synchronous with the first DOM tree at the side of the system to be tested is avoided, and efficiency is improved.
And 104, acquiring an updating result returned by the system to be tested through the RPC module.
After receiving the attribute information updating instruction sent by the test system, the to-be-tested system can perform corresponding updating operation according to the attribute information updating instruction, and then the updating result can be returned to the test system, so that the test system can acquire the updating result returned by the to-be-tested system through the RPC module.
In addition, there may be various update results, such as completed update, update success, update failure, etc., which are not limited by the present disclosure.
Therefore, in the embodiment of the disclosure, the test system can directly determine whether the system to be tested is updated or not by acquiring the update result returned by the system to be tested through the RPC module, so that the performance of the system to be tested can be further determined. For example, if the update result returned by the system to be tested is: after the updating is completed, the system to be tested can be considered to have better performance; or if the update result returned by the system to be tested is: if the update fails, then the system under test may be deemed to be poor in performance, etc., which is not limiting to the present disclosure.
According to the embodiment of the disclosure, a test system can acquire a current test case to be operated, under the condition that the test case is used for updating attribute information of any control in the system to be tested, a first Document Object Model (DOM) tree to which any control belongs can be traversed to determine first position information of any control in the first DOM tree, and then an attribute information update instruction can be sent to the system to be tested through a Remote Procedure Call (RPC) module, wherein the update instruction comprises the first position information and the first attribute information indicated by the test case, and then an update result returned by the system to be tested through the RPC module can be acquired. Therefore, the test system can send the attribute information update instruction to the system to be tested through the RPC module, so that each system to be tested can perform DOM tree update operation in parallel according to the test instruction, and then the update result returned by the system to be tested can be obtained, thereby realizing the parallel update test of the DOM tree in the system to be tested, saving time and improving update efficiency.
Fig. 2 is a flow chart of a cross-system testing method provided in an embodiment of the disclosure, which may be performed by a testing system. As shown in fig. 2, the cross-system test method may include the steps of:
step 201, obtaining a current test case to be run.
Step 202, responding to the test case for updating attribute information of any control in the system to be tested, traversing a DOM tree of a first document object model to which any control belongs, and determining first position information of any control in the DOM tree.
And 203, sending an attribute information update instruction to the system to be tested through a Remote Procedure Call (RPC) module, wherein the update instruction comprises first position information and first attribute information indicated in the test case.
And 204, receiving an updated second DOM tree returned by the system to be tested through the RPC module.
It can be understood that the test system can send an attribute information update instruction to the system to be tested through the RPC module, so that the system to be tested determines a corresponding control according to the first position information of any control, updates any control according to the first attribute information indicated in the test case, and then the system to be tested can send the updated second DOM tree to the test system. Then the test system may receive an updated second DOM tree returned by the system under test via the RPC module, and so on, which is not limited by the present disclosure.
Step 205, parse the second DOM tree to obtain the second position information and the second attribute information of any control.
The second position information can be understood as the position information of any control in the updated second DOM tree; the second attribute information may be understood as attribute information of the any control in the updated second DOM tree, and the disclosure is not limited thereto.
Step 206, determining whether the function of the user interface in the system to be tested is normal according to the first matching degree between the second attribute information and the first attribute information and the second matching degree between the first position information and the second position 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 position information and the second position information, the more normal the function of the user interface in the system to be tested, that is, the higher the matching degree, the higher the duty ratio according with the user expectation; the lower the first matching degree between the second attribute information and the first attribute information, and the lower the second matching degree between the first location information and the second location information, the higher the possibility of abnormal functions of the user interface in the system to be tested, that is, the lower the matching degree, the lower the duty ratio according to the user expectation, and the like, and the disclosure is not limited to this.
For example, if the first attribute information indicated in the test case is "circular", if the second attribute information is "circular", it may indicate that the matching between the first attribute information and the second attribute information is successful, and the user interface corresponding to the attribute information functions normally and meets the expected effect; under the condition that the first position information and the second position information are both 'first father node', the position information can be indicated to be successfully matched, so that the user interface in the system to be tested can be determined to have normal functions according to the matching result, and the expected effect is met.
Or if the first attribute information indicated in the test case is "circular", if the second attribute information is "circular", it may indicate that the two attribute information are consistent, that is, the function of the user interface corresponding to the attribute information is normal; if the first position information is the "first father node", and the second position information is the "third father node", it may be indicated that the position information is not matched, and then it may be determined that the function of the user interface in the system to be tested is partially abnormal, that is, the function of the "position information" is abnormal, which does not conform to the expected effect.
Or if the first position information is the "first father node", the second position information is the "first father node", it may indicate that the position information is successfully matched; if the first attribute information indicated in the test case is "circular", if the second attribute information is "rectangular", it may indicate that the two pieces of attribute information are not matched; according to the matching result, it can be determined that the function of the user interface in the system to be tested is abnormal, that is, the function of the attribute information is abnormal, which does not conform to the expected effect.
It should be noted that the foregoing examples are only illustrative, and are not intended to be limiting of the manner in which the user interface functions normally in the system under test in the embodiments of the present disclosure.
It is understood that the system to be tested may also send the operating parameters to the test system via the RPC module, so that the test system may determine the performance of the system to be tested based on the operating parameters.
Optionally, the test system may receive the operation parameters returned by the system to be tested through the RPC module, and then may determine the performance of the system to be tested according to the operation parameters and the attribute information update instruction.
The operation parameter may be a parameter in the system to be tested, for example, an occupancy rate of a central processing unit (central processing unit, CPU), a memory occupancy rate, and the like, which is not limited in the present disclosure.
For example, if the test system passes through the RPC module, the operation parameters returned by the system to be tested are: the CPU occupancy rate is 10%, and the first attribute information indicated in the test case included in the attribute information update is: and updating the icon of the control 1 to be blue, then the system to be tested can be determined to have enough resources to update the icon of the control 1, and the system to be tested can be determined to have better performance.
Or if the test system passes through the RPC module, receiving the running parameters returned by the system to be tested: the memory occupancy rate is 99%, and the first attribute information indicated in the test case included in the attribute information update is: updating the icon of the control 1 to blue, backing up the content in the page 1 to the document, then it can be determined that the system to be tested currently has insufficient resources to update the icon of the control 1, and backing up the content in the page 1, so that it can be determined that the performance of the system to be tested is poor.
It should be noted that the foregoing examples are illustrative only and should not be taken as limiting the manner in which the performance of the system under test is determined in the embodiments of the present disclosure.
Optionally, after receiving the updated second DOM tree returned by the system to be tested through the RPC module, the test system may further replace the first DOM tree with the second DOM tree.
It can be understood that the test system may send an attribute information update instruction to the to-be-tested system through the RPC module, so that the to-be-tested system determines a corresponding control according to the first position information of any control, updates any control according to the first attribute information indicated in the test case, and then the to-be-tested system may send the updated second DOM tree to the test system. The test system may receive the updated second DOM tree returned by the system under test through the RPC module and update the stored first DOM tree, for example, the second DOM tree may be used to replace the first DOM tree, which is not limited in this disclosure. Optionally, the system to be tested may send the updated DOM tree to the test system under the condition that any node in the DOM tree changes, so that the test system may receive the updated DOM tree returned by the system to be tested through the RPC module, update the DOM tree, and so on, which is not limited in the present disclosure.
For example, if a page in the system to be tested changes, the corresponding DOM tree is updated accordingly, and then the system to be tested may send the updated DOM tree to the test system. The test system may receive updated DOM trees sent by the system under test, etc., through the RPC module, which is not limited by the present disclosure.
Optionally, in response to the position information of any control being null, a DOM tree synchronization instruction is sent to the system to be tested, wherein the synchronization instruction contains an application identifier to which any control belongs.
It can be understood that if the first DOM tree to which the any control belongs is traversed, the first position information of the any control is not obtained, which can indicate that the first DOM tree on the test system side does not include the information of the any control, then a DOM tree synchronization instruction may be sent to the system to be tested, so that the system to be tested sends the latest DOM tree to the test system according to the synchronization instruction. After receiving the second DOM tree returned by the system to be tested, the testing system can synchronize the current first DOM tree.
For example, if any control is "pause", and the application to which the control belongs is identified as "XX player", by traversing the first DOM tree associated with the "XX player", and not obtaining the position information corresponding to the "pause" control, a DOM tree synchronization instruction may be sent to the system to be tested, where the synchronization instruction includes the "XX player", so that the system to be tested may send the second DOM tree associated with the "XX player" to the test system according to the received DOM tree synchronization instruction, and then the test system may synchronize the "XX player" according to the received second DOM tree.
It should be noted that the above examples are only schematic illustrations, and should not be taken as limiting any control, application identifier, first DOM tree, etc. in the embodiments of the present disclosure.
According to the embodiment of the disclosure, a test system can acquire a current test case to be operated, then, under the condition that the test case is used for updating attribute information of any control in the system to be tested, a first Document Object Model (DOM) tree to which any control belongs is traversed to determine first position information of any control in the first DOM tree, then, an attribute information updating instruction can be sent to the system to be tested through an RPC module, and then, an updated second DOM tree returned by the system to be tested can be received through the RPC module. Therefore, after the testing system determines the updated attribute information corresponding to any control to be updated and the first position information of the updated attribute information in the first DOM tree, an attribute information updating instruction can be sent to the system to be tested through the RPC module, and an updated second DOM tree returned by the system to be tested is received, so that updating and synchronization of the DOM tree are realized, updating time of the DOM tree is saved, and efficiency is improved.
The embodiment of the disclosure also provides a cross-system testing device, and fig. 3 is a schematic structural diagram of the cross-system testing device according to the embodiment of the disclosure.
As shown in fig. 3, the cross-system testing apparatus 300 is configured on a testing system side, and the apparatus 300 includes: the device comprises a first acquisition module 310, a traversal module 320, a sending module 330 and a second acquisition module 340.
The first obtaining module 310 is configured to obtain a current test case to be run.
And the traversing module 320 is configured to respond to the test case for updating attribute information of any control in the system to be tested, and traverse a DOM tree of the first document object model to which the any control belongs, so as to determine first position information of the any control in the first DOM tree.
And the sending module 330 is configured to send an attribute information update instruction to the system to be tested 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.
And a second obtaining module 340, configured to obtain an update result returned by the system to be tested through the RPC module.
Optionally, the device further comprises a receiving module for:
receiving an updated second DOM tree returned by the system to be tested through the RPC module;
and replacing the first DOM tree by using the second DOM tree.
Optionally, the device further comprises a parsing module for:
analyzing the second DOM tree to obtain second position information and second attribute information of any control;
and determining whether the function of the user interface in the system to be tested is normal according to the first matching degree between the second attribute information and the first attribute information and the second matching degree between the first position information and the second position information.
Optionally, the traversing module 320 is further configured to:
and determining a DOM tree associated with the application identifier to which any control belongs in the test case as the first DOM tree.
Optionally, the sending module is further configured to:
and responding to the position information of any control is empty, and sending a DOM tree synchronization instruction to the system to be tested, wherein the synchronization instruction comprises an application identifier to which the any control belongs.
Optionally, the method further comprises a determining module for:
receiving the running parameters returned by the system to be tested through the RPC module;
and determining the performance of the system to be tested according to the operation parameters and the updating instructions.
The functions and specific implementation principles of the foregoing modules in the embodiments of the present disclosure may refer to the foregoing method embodiments, and are not repeated herein.
According to the cross-system testing device, a testing system can acquire a current testing case to be operated, under the condition that the testing case is used for updating attribute information of any control in the system to be tested, a first Document Object Model (DOM) tree to which any control belongs can be traversed to determine first position information of any control in the first DOM tree, and then an attribute information updating instruction can be sent to the system to be tested through a Remote Procedure Call (RPC) module, wherein the updating instruction comprises the first position information and the first attribute information indicated in the testing case, and then an updating result returned by the system to be tested through the RPC module can be acquired. Therefore, the test system can send the attribute information update instruction to the system to be tested through the RPC module, so that each system to be tested can perform DOM tree update operation in parallel according to the test instruction, and then the update result returned by the system to be tested can be obtained, thereby realizing the parallel update test of the DOM tree in the system to be tested, saving time and improving update efficiency.
Fig. 4 is a block diagram of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 4, the electronic device 200 includes: memory 210 and processor 220, bus 230 connecting the different components, including memory 210 and processor 220.
Wherein the memory 210 is used to store executable instructions of the processor 220; the processor 201 is configured to invoke and execute the executable instructions stored in the memory 202 to implement the cross-system test method proposed by the above-described embodiments of the present disclosure.
Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 200 typically includes a variety of electronic device readable media. Such media can be any available media that is accessible by electronic device 200 and includes both volatile and nonvolatile media, removable and non-removable media.
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. The electronic device 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 260 may be used to read from or write to a non-removable, non-volatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 230 via one or more data medium interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the various embodiments of the disclosure.
Program/utility 280 having a set (at least one) of program modules 270 may be stored in, for example, memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 270 generally perform the functions and/or methods in the embodiments described in this disclosure.
The electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), one or more devices that enable a user to interact with the electronic device 200, and/or any device (e.g., network card, modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 292. Also, electronic device 200 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 293. As shown, network adapter 293 communicates with other modules of electronic device 200 over bus 230. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 200, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor 220 executes various functional applications and data processing by running programs stored in the memory 210.
It should be noted that, the implementation process of the electronic device in the embodiment of the present disclosure refers to the foregoing explanation of the cross-system testing method in the embodiment of the present disclosure, and is not repeated herein.
According to the electronic device disclosed by the embodiment of the disclosure, a test system can acquire a current test case to be operated, under the condition that the test case is used for updating attribute information of any control in the system to be tested, a first Document Object Model (DOM) tree to which any control belongs can be traversed to determine first position information of any control in the first DOM tree, and then an attribute information update instruction can be sent to the system to be tested through a Remote Procedure Call (RPC) module, wherein the update instruction comprises the first position information and the first attribute information indicated in the test case, and then an update result returned by the system to be tested through the RPC module can be acquired. Therefore, the test system can send the attribute information update instruction to the system to be tested through the RPC module, so that each system to be tested can perform DOM tree update operation in parallel according to the test instruction, and then the update result returned by the system to be tested can be obtained, thereby realizing the parallel update test of the DOM tree in the system to be tested, saving time and improving update efficiency.
To implement the above-described embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium, the instructions in which, when executed by a processor of an electronic device, enable the electronic device to perform a cross-system test method as described previously.
To achieve the above embodiments, the disclosed embodiments also provide a computer program product which, when executed by a processor of an electronic device, enables the electronic device to perform a cross-system test method as described previously.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. 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 arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it is intended to cover the scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (14)

  1. A method of cross-system testing performed by a testing system, the method comprising:
    acquiring a current test case to be operated;
    responding to the test case for updating attribute information of any control in a system to be tested, traversing a first Document Object Model (DOM) tree to which the any control belongs, and determining first position information of the any control in the first DOM tree;
    sending an attribute information updating instruction to the system to be tested through a Remote Procedure Call (RPC) module, wherein the updating instruction comprises the first position information and the first attribute information indicated in the test case;
    and acquiring an updating result returned by the system to be tested through the RPC module.
  2. The method of claim 1, further comprising, after said sending an attribute information update instruction to said system under test:
    receiving an updated second DOM tree returned by the system to be tested through the RPC module;
    and replacing the first DOM tree by using the second DOM tree.
  3. The method of claim 2, further comprising, after said receiving the updated DOM tree returned by the system under test:
    analyzing the second DOM tree to obtain second position information and second attribute information of any control;
    and determining whether the function of the user interface in the system to be tested is normal according to the first matching degree between the second attribute information and the first attribute information and the second matching degree between the first position information and the second position information.
  4. The method of claim 1 or 2, further comprising, prior to said traversing the first DOM tree to which the any control belongs:
    and determining a DOM tree associated with the application identifier to which any control belongs in the test case as the first DOM tree.
  5. The method of claim 1, further comprising, after said determining position information of said any control in said first DOM tree:
    and responding to the position information of any control is empty, and sending a DOM tree synchronization instruction to the system to be tested, wherein the synchronization instruction comprises an application identifier to which the any control belongs.
  6. The method of any one of claims 1-5, further comprising:
    receiving the running parameters returned by the system to be tested through the RPC module;
    and determining the performance of the system to be tested according to the operation parameters and the updating instructions.
  7. A cross-system testing apparatus configured on a testing system side, the apparatus comprising:
    the first acquisition module is used for acquiring the current test case to be operated;
    the traversal module is used for responding to the test case and updating attribute information of any control in the system to be tested, traversing a DOM tree of a first document object model to which the any control belongs, and determining first position information of the any control in the first DOM tree;
    the sending module is used for sending an attribute information updating instruction to the system to be tested through a Remote Procedure Call (RPC) module, wherein the updating instruction comprises the first position information and the first attribute information indicated in the test case;
    and the second acquisition module is used for acquiring an updating result returned by the system to be tested through the RPC module.
  8. The apparatus of claim 7, further comprising a receiving module for:
    receiving an updated second DOM tree returned by the system to be tested through the RPC module;
    and replacing the first DOM tree by using the second DOM tree.
  9. The apparatus of claim 8, further comprising a parsing module to:
    analyzing the second DOM tree to obtain second position information and second attribute information of any control;
    and determining whether the function of the user interface in the system to be tested is normal according to the first matching degree between the second attribute information and the first attribute information and the second matching degree between the first position information and the second position information.
  10. The apparatus of claim 7 or 8, wherein the traversal module is further to:
    and determining a DOM tree associated with the application identifier to which any control belongs in the test case as the first DOM tree.
  11. The apparatus of claim 7, wherein the transmitting module is further for:
    and responding to the position information of any control is empty, and sending a DOM tree synchronization instruction to the system to be tested, wherein the synchronization instruction comprises an application identifier to which the any control belongs.
  12. The apparatus of any of claims 7-11, further comprising a determination module to:
    receiving the running parameters returned by the system to be tested through the RPC module;
    and determining the performance of the system to be tested according to the operation parameters and the updating instructions.
  13. An electronic device, comprising:
    a processor;
    a memory for storing executable instructions of the processor;
    wherein the processor is configured to invoke and execute the memory-stored executable instructions to implement the cross-system test method of any of claims 1-6.
  14. A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the cross-system test method of any of claims 1-6.
CN202280004256.2A 2022-05-30 2022-05-30 Cross-system testing method and device Pending CN117480497A (en)

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 Cross-system testing method and device

Country Status (2)

Country Link
CN (1) CN117480497A (en)
WO (1) WO2023230797A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
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 京东数科海益信息科技有限公司 Automatic testing method and related equipment

Also Published As

Publication number Publication date
WO2023230797A1 (en) 2023-12-07

Similar Documents

Publication Publication Date Title
CN108108297B (en) Method and device for automatic testing
CN110262807B (en) Cluster creation progress log acquisition system, method and device
US9473558B2 (en) Utilization of target browsers
CN112836152B (en) Page rendering method, system, computer device and computer readable storage medium
CN113900834B (en) Data processing method, device, equipment and storage medium based on Internet of things technology
US20080307043A1 (en) Method and architecture supporting high performance web applications
CN111767109A (en) H5 page display method and device based on terminal application and readable storage medium
CN112100070A (en) Version defect detection method and device, server and storage medium
CN117480497A (en) Cross-system testing method and device
CN114610446B (en) Method, device and system for automatically injecting probe
CN112596824A (en) Information interaction method and device, electronic equipment and storage medium
CN110309121B (en) Log processing method and device, computer readable medium and electronic equipment
CN111882629A (en) Image rendering method, device and equipment and storage medium
CN113791777A (en) Picture display method and device, computer readable storage medium and electronic equipment
CN110674119A (en) Data processing method, system and computer readable storage medium
CN111782420B (en) Information processing method, device, equipment and medium based on Java Web framework
CN111858273B (en) Method and device for displaying processing log
CN108563677B (en) Data display method and device, electronic equipment and storage medium
CN115982021A (en) Method, device and equipment for acquiring test defect data and storage medium
CN115686911A (en) Server-side self-checking method and device, electronic equipment and storage medium
CN114553866A (en) Full data access method, device and computer readable storage medium
CN118051419A (en) Web page testing method, device, equipment and storage medium
CN117480496A (en) Cross-system key testing method and device
CN117762767A (en) Display method and device of user interface, electronic equipment and storage medium
CN118013143A (en) Page loading method and device, electronic equipment and readable 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