U-Shield testing methods, devices, equipment and media
By automatically determining the click coordinates of the U-shield and controlling the clicker to perform click operations, the problem of physical key clicks and U-shield switching operations in the U-shield automation test is solved, and efficient and economical U-shield testing is achieved.
Patent Information
- Application Number
- CN202110765202.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-06
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-07-06
AI Technical Summary
In the prior art, there are difficulties in physical button click operation and U-shield switching operation during the U-shield automation testing process, resulting in high cost and low efficiency of automation testing.
By determining the click coordinate information based on the USB interface reference coordinate information of the U shield, the corresponding clicker is retrieved, and the clicker is controlled to perform click operations on the U shield based on the click coordinate information, and the automatic testing of the U shield is realized.
It reduces the number of U-Shield clickers, saves resource costs, reduces equipment maintenance workload, and realizes centralized and unified management of U-Shield equipment and automated test click services in cloud mode.
Smart Images

Figure CN113448790B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a U-shield testing method, device, electronic device, and computer-readable storage medium. Background Art
[0002] In the business application systems provided by banks and other financial enterprises, for business transactions involving account changes, in order to ensure the security of transactions and prevent impersonation, U-shields are usually provided as identification proof for transaction customers. Specifically, when customers conduct business transactions, they need to insert U-shields into electronic devices to conduct relevant business transactions in the business application system. As an important customer identity proof, U-shields play a very important role in the business transaction operation process of business application systems, especially for business transactions with public enterprises where U-shields are used more frequently. However, with the acceleration of the pace of version development, based on the automated verification operation of the business application system, it is necessary to focus on the automated testing of U-shields. Summary of the invention
[0003] 1. Technical issues to be resolved
[0004] In order to solve at least one of the technical problems existing in the U-shield automated testing process in the prior art, the present disclosure provides a U-shield testing method, a U-shield testing device, an electronic device and a computer-readable storage medium.
[0005] (II) Technical solution
[0006] One aspect of the present disclosure provides a USB shield testing method, which includes: determining the click coordinate information of the USB shield according to the reference coordinate information of the USB interface corresponding to the USB shield; calling the clicker corresponding to the click coordinate information; and controlling the clicker to perform a click operation on the USB shield according to the click coordinate information to complete the test of the USB shield.
[0007] According to an embodiment of the present disclosure, before determining the click coordinate information of the U-shield according to the reference coordinate information of the USB interface corresponding to the U-shield, it also includes: parameterizing the automation script in response to the test instruction to form a parameterized script; executing the parameterized script to determine the U-shield number of the U-shield.
[0008] According to an embodiment of the present disclosure, before determining the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield, it also includes: in response to the execution of the parameterized script, generating a click control communication message corresponding to the U shield according to the U shield number; in response to the click control communication message, determining the USB interface corresponding to the U shield; determining the physical connection relationship between the USB interface and the U shield according to the current connection status of the USB interface; and obtaining the reference coordinate information corresponding to the USB interface according to the physical connection relationship.
[0009] According to an embodiment of the present disclosure, determining the click coordinate information of the U shield based on the reference coordinate information of the USB interface corresponding to the U shield includes: determining the position offset information of the click position of the U shield relative to the USB interface; determining the click coordinate information of the U shield based on the position offset information of the USB interface.
[0010] According to an embodiment of the present disclosure, in calling a clicker corresponding to click coordinate information, the steps include: determining a clicker calling range according to the click coordinate information; and calling a clicker that satisfies the clicker calling range.
[0011] According to an embodiment of the present disclosure, invoking a clicker that satisfies a clicker calling range further includes: determining a current operating state of the clicker; and invoking the clicker according to the current operating state.
[0012] According to an embodiment of the present disclosure, controlling the clicker to perform a click operation on the U shield based on the click coordinate information includes: controlling the clicker to move according to a trajectory formed by the click coordinate information so that the clicker corresponds to the click position of the U shield; controlling the clicker to perform a click operation on the click position.
[0013] According to an embodiment of the present disclosure, controlling the clicker to perform a click operation on a click position includes: performing a fixed number of click operations on the click position of the U shield based on a fixed period.
[0014] According to an embodiment of the present disclosure, the method further includes: recording the click operation of the corresponding U shield to form a click operation log; and storing the click operation log.
[0015] Another aspect of the present disclosure provides a USB shield testing device, which includes a coordinate determination module, a clicker retrieval module and an operation control module. The coordinate determination module is used to determine the click coordinate information of the USB shield according to the reference coordinate information of the USB interface corresponding to the USB shield; the clicker retrieval module is used to retrieve the clicker corresponding to the click coordinate information; and the operation control module is used to control the clicker to perform a click operation on the USB shield according to the click coordinate information to complete the test of the USB shield.
[0016] Another aspect of the present disclosure provides an electronic device, which includes one or more processors and a memory; the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the above-mentioned method.
[0017] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the instructions are used to implement the above method when executed.
[0018] (III) Beneficial effects
[0019] The present disclosure provides a U-shield testing method, which includes: determining the click coordinate information of the U-shield according to the reference coordinate information of the USB interface corresponding to the U-shield; calling the clicker corresponding to the click coordinate information; and controlling the clicker to perform a click operation on the U-shield according to the click coordinate information to complete the test of the U-shield. Therefore, compared with the uncontrolled blind and controlled targeted click test schemes in the prior art, by centrally and uniformly managing the U-shield devices and providing a cloud-based automated test click service, the number of required U-shield clickers is reduced, resource costs are saved, and the workload of equipment maintenance is reduced. At the same time, the flexible deployment requirements of one U-shield device corresponding to one clicker are also met. In addition, the present disclosure also provides a U-shield testing device, an electronic device, and a computer-readable storage medium. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] For a more complete understanding of the present disclosure and its advantages, reference will now be made to the following description taken in conjunction with the accompanying drawings, in which:
[0021] Figure 1 An exemplary system architecture to which the U-Shield testing method can be applied according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 2 Another exemplary system architecture to which the USB-shield testing method can be applied according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 3 The flowchart of the USB shield testing method according to the embodiment of the present disclosure is schematically shown;
[0024] Figure 4 An application scenario diagram of the above-mentioned U-shield testing method according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 5 A block diagram of a U-shield testing device according to an embodiment of the present disclosure is schematically shown;
[0026] Figure 6 Another exemplary system architecture to which the USB-shield testing method can be applied according to another embodiment of the present disclosure is schematically shown;
[0027] Figure 7 A flowchart of a USB shield testing method according to another embodiment of the present disclosure is schematically shown;
[0028] Figure 8 An application scenario diagram applied to the above-mentioned U-shield testing method according to another embodiment of the present disclosure is schematically shown;
[0029] Fig. 9 A block diagram schematically shows a U-shield testing device according to another embodiment of the present disclosure; and
[0030] Fig.10 A block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0031] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0032] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "include", "comprising", etc. used herein indicate the existence of the above-mentioned features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0033] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0034] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0035] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some boxes or combinations thereof in the block diagrams and / or flow charts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that these instructions can create a device for implementing the functions / operations described in these block diagrams and / or flow charts when executed by the processor. The technology of the present disclosure can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). In addition, the technology of the present disclosure can take the form of a computer program product on a computer-readable storage medium storing instructions, which can be used by an instruction execution system or in combination with an instruction execution system.
[0036] <Example 1>
[0037] As the pace of system application version development accelerates, automated verification of business application systems has become the preferred solution in the testing process. Since the business transactions involving the above-mentioned need to insert a USB shield into the local device as a security medium are generally high-risk key transactions, they are also the key verification content that needs to be carried out in each version test.
[0038] In the process of traditional automated testing, due to the limitation of hardware security media operation (plugging and unplugging, physical button clicking), more manual operation links are required to complete the operation process of a transaction normally. Therefore, the automation of such transactions has always required manual intervention for connection, and the automation cost is high, making it impossible to achieve automated testing efficiently. However, the U-shield is increasingly used in various business transactions. As an important proof of customer identity, the U-shield is very important in the process of system transaction operations, especially for corporate transactions.
[0039] The existing automated testing scenarios involving USB shields mainly face two problems: (1) Clicking operations on the physical buttons on the USB shield device. In this regard, the usual solution is to use a physical peripheral solution to repeatedly and continuously click the physical buttons on the USB shield through an external device during the entire transaction process to implement the operation of the physical buttons on the USB shield. (2) Switching operations on the currently used USB shield. However, in current actual work, this operation can only be achieved by manually plugging and unplugging the USB shield, or by developing a USB shield routing connection module.
[0040] Among them, there are usually two modes of U-shield button clicking: one is an uncontrolled blind clicking mode, and the other is a controlled targeted clicking scheme.
[0041] On the one hand, in the uncontrolled blind clicking mode, physical peripherals (such as clickers) need to be used to continuously click the physical buttons on the USB shield. Among them, since the clicks on the physical buttons are not targeted, even if there are no or only a few USB shields that need to be clicked in a certain period of time, all USB shield devices need to be in a state of being clicked, resulting in a huge amount of invalid click operations, resulting in waste of resources such as power and unnecessary equipment loss, especially causing more USB shield buttons to be damaged due to multiple clicks, which greatly wastes test resources.
[0042] On the other hand, in a controlled targeted click mode, an operation scheme is usually adopted in which each U-shield device corresponds to a clicker. As the scale of the test expands, more and more test U-shield devices need to be prepared. When the number of U-shield devices reaches a certain scale, the mode of equipping each U-shield with a clicker will cause certain difficulties in the deployment and management of the clicker. At the same time, because not all U-shiels need to be clicked at the same time, it causes a lot of waste of resources of U-shield clicker devices.
[0043] In order to solve at least one of the above-mentioned technical problems existing in the U-shield automated testing process in the prior art, the present disclosure provides a U-shield testing method, device, electronic device and computer-readable storage medium.
[0044] It should be noted that the U-Shield testing method and device provided by the present disclosure can be applied to the fields of information security technology, big data technology and financial technology, or to any technical field other than the above-mentioned technical fields. The application field of the U-Shield testing method and device provided by the present disclosure is not specifically limited.
[0045] Figure 1 An exemplary system architecture to which the U-Shield testing method can be applied according to an embodiment of the present disclosure is schematically shown.
[0046] It should be noted that Figure 1 What is shown is only an application example to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the U-shield testing method of the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0047] like Figure 1As shown, the system architecture 100 according to this embodiment may include a data request system 110, and a server system 120 that establishes data communication with the data request system 110, wherein the server system includes servers M, 121, 122, 123, 124, and 125 that establish data transmission channels with the data request system 110, wherein server M is a primary access server (i.e., a main server) that can obtain instruction information from users (such as testers). Servers 121, 122, 123, 124, and 125 are secondary access servers (i.e., branch servers), and the data request system 110 and servers M, 121, 122, 123, 124, and 125 can be implemented based on an internal cloud network server C. Alternatively, when the primary server M among the servers M, 121, 122, 123, 124, and 125 is a network server, that is, relative to the intranet of other terminal devices 111, 112, 113, 114, and 115, the primary server M of the server system 120 can be located in an external network. At this time, the cloud network server C is used as a medium for providing communication links between other terminal devices 111, 112, 113, 114 and 115. The data transmission channel between the server system 120 and the multiple terminal devices can be implemented through various communication connection types, such as wired, wireless communication links or optical fiber cables, etc. Among them, the cloud network server C can be a web server to provide a graphical display and input interface to the user.
[0048] It should be noted that, according to the embodiments of the present disclosure, servers 121, 122, 123, 124 and 125 can be interconnected without encryption and applied to large-scale U-shield testing services that can ensure information security.
[0049] The user can use the terminal devices 111, 112, 113, 114 and 115 to interact with the server system 120 to receive or send messages, etc., to implement U-shield testing or processing, specifically involving access to the database in the main server M in the server system. For example, the terminal device 111 sends access request content such as U-shield test data to the terminal device 112. After receiving the U-shield test data from the terminal device 111, the server system 120 will forward the corresponding U-shield test data and encrypt the U-shield test data under specific needs, so that the U-shield test data that finally reaches the terminal device 111 is secure. Various communication client applications can be installed on the terminal devices 111, 112, 113, 114 and 115, such as management applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0050] The terminal devices 111 , 112 , 113 , 114 and 115 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and various application servers.
[0051] The server system 120 may include various types of firewalls that provide various services, such as a filtering firewall (only an example) that provides support for websites browsed by users using terminal devices 111, 112, 113, 114, and 115. The filtering firewall may analyze and process received data such as user requests, and analyze based on the address of the data source and the flag features such as the protocol type to determine whether it can pass, thereby filtering or blocking unsafe factors.
[0052] It should be noted that the U shield testing method provided in the embodiment of the present disclosure can generally be performed by the server system 120. Accordingly, the U shield testing device provided in the embodiment of the present disclosure can generally be set in the server system 120. The U shield testing method provided in the embodiment of the present disclosure can also be performed by other server systems that are different from the server system 120 and can communicate with the terminal devices 111, 112, 113, 114, 115 and / or the server system 120. Accordingly, the U shield testing device provided in the embodiment of the present disclosure can also be set in other server systems that are different from the server system 120 and can communicate with the terminal devices 111, 112, 113, 114, 115 and / or the server system 120.
[0053] It should be understood that Figure 1 The number of terminal devices and servers in the embodiment is only for illustration. Any number of terminal devices and servers may be provided according to implementation requirements.
[0054] Figure 2 Another exemplary system architecture that can implement the U-shield testing method according to an embodiment of the present disclosure is schematically shown.
[0055] like Figure 2 As shown, the exemplary system architecture mainly includes four modules: an execution machine external device management module 220, a U-shield device routing connection module 230, a one-to-one U-shield click management module 240, and a cloud service U-shield click management module 250.
[0056] The execution machine external device management module 220 is connected to the execution machine pool 210, and sends U shield usage communication message information to the U shield device routing connection module 230 according to different business processes. The execution machine pool 210 includes multiple execution machines 1-n. The U shield usage communication message information includes U shield number, operation instructions, sending time, execution machine name, sending IP and other contents. Among them, the operation instructions include specific instruction information such as creating a new USB interface connection, releasing a USB interface connection, initializing U shield routing configuration, resetting physical U shield connection, and updating physical U shield connection.
[0057] At the same time, the external device management module 220 of the execution machine is also responsible for sending the U-shield click control communication message information to the U-shield click management module. The specific form of the click control communication message information is as follows:
[0058] <?xml version=”1.0” encoding=”UTF-8”?>
[0059] <config>
[0060] <ukeyid> 5300016804< / ukeyid>
[0061] <frequency> 3< / frequency>
[0062] <interval> 2< / interval>
[0063] <machine-name> Ukeytest01< / machine-name>
[0064] <iscloud> 01< / iscloud>
[0065] <ip> 83.25.10.12< / ip>
[0066] <sendtime> 2021 / 3 / 12 15:12:12< / sendtime>
[0067] <config>
[0068] It can be seen that the U-Shield click control communication message information contains the execution machine name MACHINE-NAME, U-Shield number UKEYID, U-Shield deployment category (cloud service U-Shield / non-cloud service U-Shield) ISCLOUD, sending time SENDTIME, sending IP, number of clicks FREQUENCY, click interval INTERVAL and other information.
[0069] The U-shield device routing connection module 230 is used to establish a physical connection path between the automated execution machine and the U-shield device, and to transmit instructions. The U-shield device routing connection module 230 is mainly composed of a U-shield information management submodule 232, a U-shield device connection submodule 233, and a U-shield data switching routing submodule 231. Among them, the U-shield information management submodule 232 mainly manages the U-shield number, the comparison information of the U-shield device connected to the USB interface, the business purpose of the U-shield and other information, and provides maintenance functions; the U-shield device connection submodule 233 is mainly used to manage and maintain the mapping relationship between the USB interface and the physical U-shield; the U-shield data switching routing submodule 231 is used to receive the U-shield usage communication message information sent from the execution machine external device management module 220, establish or interrupt the connection between the execution machine and the USB physical interface, and synchronize the connection status, start time, end time, the name of the currently occupied execution machine, the IP of the currently occupied execution machine and other fields to update the U-shield routing configuration table.
[0070] The one-to-one U-shield click management module 240 is mainly used to receive the operation instructions of the U-shield device whose deployment mode is "one U-shield device corresponds to one clicker" submitted by the execution machine, and perform click operations on the specified U-shield according to the click operation instructions. The one-to-one U-shield click management module 240 is mainly composed of a 1-to-1 U-shield click instruction processing submodule 241, a clicker configuration information management submodule 242, a click operation control submodule 243 and a click operation log recording submodule 244. Among them, the 1-to-1 U-shield click instruction processing submodule 241 is mainly used to receive the non-cloud service U-shield click control communication message sent by the execution machine external device management module 220, and parse and process the message instructions; the clicker configuration information management submodule 242 is mainly used to store the corresponding mapping relationship between the clicker and the physical U-shield; the click operation control submodule 243 is mainly used to operate the specified clicker to perform a click operation according to the click instruction. The click operation log recording submodule 244 is mainly used to record the click operation log of the clicker, including the execution machine name, U shield number, execution machine IP, click operation start time, click operation number, click interval duration and other information.
[0071] Specifically, when the execution machine executes the step in the automation script that requires the U shield to click, the execution machine external device management module 220 sends a non-cloud service U shield click control communication message to the 1 to 1 U shield click instruction processing submodule 241. The 1 to 1 U shield click instruction processing submodule 241 receives the message and parses it. According to the U shield number in the message, the clicker number corresponding to the physical U shield is found in the clicker configuration information management submodule 242. Then, the click operation control submodule 243 controls the corresponding clicker to complete the U shield click operation. The click operation log recording submodule 244 completes the log recording operation in the whole process.
[0072] The cloud service U shield click management module 250 is mainly used to receive the U shield operation instructions submitted by the execution machine 1-n with the deployment mode of "cloud centralized deployment", and perform click operations on the specified U shield according to the click operation instructions. The cloud service U shield click management module 250 is mainly composed of a U shield device deployment configuration management submodule 251, a U shield device click addressing submodule 253, a U shield device click operation control submodule 254 and a cloud service U shield click instruction processing submodule 252.
[0073] It should be noted that in the embodiments of the present disclosure, the U shield is used as a test object and is set in a U shield device placement cabinet 1-n in a large-scale parallel manner. Among them, the U shield device placement cabinet 1-n is a hardware device, which is mainly used to place and fix the U shield device. Any of the U shield device placement cabinets 1-n of different sizes can place physical U shield devices of different numbers, shapes, specifications and brands. For example, a 10*10-bit cabinet can place 100 USB devices at the same time, and an 8*10-bit cabinet can place 80 USB devices, etc. The USB device is the target U shield to be tested. Among them, each U shield device placement cabinet is defined by the horizontal and vertical coordinates according to the setting position of the USB device. For example, a 10*10-bit cabinet has 100 setting coordinates, each coordinate corresponds to a USB interface, and each interface can be set with a USB device. For example, the setting coordinate is (3,5), which corresponds to the USB interface in the 3rd row and the 5th column. When the USB device is inserted into the USB interface, the insertion coordinate of the USB device is determined to be (3,5). Furthermore, at least one set of physical clickers 1-n of U-shield devices may be installed on a U-shield device placement cabinet, and the clickers 1-n support physical click operations on designated coordinate positions of the horizontal and vertical coordinates.
[0074] The cloud service U shield click instruction processing submodule 252 is mainly used to receive the cloud service U shield click control communication message sent by the execution machine external device management module 220, and parse and process the message instruction.
[0075] The U-shield device placement configuration management submodule 251 is mainly used to record the relevant configuration information of each U-shield, including the physical U-shield number, the physical slot number, and the horizontal and vertical coordinate positions clicked in each physical slot.
[0076] Therefore, when all the U shields to be tested are set into the U shield equipment placement cabinet, and the number of setting positions of the U shield equipment placement cabinet can reach more than 10*10, or even 100*100, that is, the U shield equipment placement cabinet can be set with more than 100 or even 10,000 U shields to be tested, forming a U shield test super intelligent management cabinet. At this time, the U shield equipment placement configuration management submodule 251 can form a mapping relationship between the physical U shield number, the placement cabinet number, the grid number, and the coordinates within the grid, as shown in Table 1 below.
[0077] USB Shield Number Belong to the cabinet Belonging to the position Grid internal coordinates state 5300016804 01 36 43,65 Available 5300016861 02 43 34,12 Unavailable …… …… …… …… ……
[0078] Table 1
[0079] The U-shield device clicker addressing submodule 253 calculates the sliding distance of the clicker according to the click position of the physical target U-shield in the click instruction, and is used to control the clicker to slide to the specified position. The U-shield device clicker addressing submodule 253 stores the absolute position reference coordinate value of each physical grid on the U-shield device placement cabinet, and divides the length and width of each physical grid by 100, and divides it into 100*100 horizontal and vertical coordinates, forming the sliding distance of one unit coordinate in the physical grid of each horizontal and vertical coordinates. For example, when the current clicker position is at the (58,60) coordinate of the 35th grid, when receiving the (68,79) coordinate instruction to click the position at the 36th grid, based on the reference coordinate value of the target 36th grid, first calculate the sliding distance from the 35th grid reference coordinate to the 36th grid reference coordinate, and then calculate the sliding distance of the (68.79) coordinate inside the 36th grid according to the reference coordinate of the 36th grid, and reach the specified U-shield key position to complete the purpose of controlling the clicker to slide to the specified position.
[0080] The U-shield device click operation control submodule 254 is mainly used to operate the clicker 1-n to perform click operations at the corresponding designated positions, and record the click logs in the click operation log submodule. Specifically, you can refer to the click operation log record content in the U-shield device click operation control submodule 254 as shown in Table 2 below.
[0081] Cabinet No. Slot number Grid internal coordinates USB Shield Number Executor name Execution machine IP Click Actions Click interval duration Click start time Operation log 01 36 43,65 5300016804 UkeyTest01 83.10.2.23 3 2 2021 / 3 / 12 15:12:12 There is currently an unfinished click command and cannot be clicked 02 43 34,12 5300016861 UkeyTest02 83.10.2.24 2 1 2021 / 3 / 12 16:12:12 Click Finish …… …… ……
[0082] Table 2
[0083] When the execution machine 1-n executes the step in the automation script that requires the cloud service U shield to click, the execution machine external device management module 220 sends a cloud service U shield click control communication message to the cloud service U shield click instruction processing submodule 252. The cloud service U shield click instruction processing submodule 252 receives the message and parses it. According to the U shield number in the message, the location of the physical U shield to be clicked in the U shield device placement cabinet 1-n is found in the U shield device placement configuration management submodule 251, and the U shield device clicker addressing submodule 253 calculates the sliding distance of the U shield clicker. Then, the U shield device click operation control submodule 254 operates the clicker to complete the U shield click operation. The click operation log recording submodule 244 completes the log recording operation in the whole process.
[0084] Therefore, the above-mentioned test system architecture 200 of the embodiment of the present disclosure can automatically and flexibly establish the connection between the execution machine 1-n and the U-shield to be tested and realize controllable button clicks on the physical U-shield device according to actual business testing requirements, thereby avoiding a large number of invalid click operations, and preventing waste of resources such as electricity and unnecessary equipment loss.
[0085] The following combination Figure 3-Figure 5 and Fig.10 , the U-shield testing method, U-shield testing device, electronic device and computer-readable storage medium provided by the present disclosure are further described in detail.
[0086] Figure 3 The flowchart of the USB-shield testing method according to an embodiment of the present disclosure is schematically shown.
[0087] like Figure 3 As shown, one aspect of the present disclosure provides a USB shield testing method, which includes:
[0088] In step S301, the click coordinate information of the USB shield is determined according to the reference coordinate information of the USB interface corresponding to the USB shield;
[0089] In step S302, a clicker corresponding to the click coordinate information is retrieved; and
[0090] In step S303, the clicker is controlled to perform a click operation on the USB shield according to the click coordinate information to complete the test of the USB shield.
[0091] As shown in 2, any of the U-shield device placement cabinets 1-n may have 10*10 or the like number of USB interfaces, and each USB interface is arranged in the placement cabinet at a certain distance from the adjacent USB interfaces according to the extension direction of the horizontal and vertical coordinate axes, so as to form an array of USB interfaces according to the grids divided by the horizontal and vertical coordinate axes. Therefore, each USB interface has a coordinate corresponding to the array according to the grid where it is located. For example, for a 10*10 array placement cabinet, the position of the coordinate (1,5) of the 1st row and the 5th column corresponds to the coordinate of the USB interface in the 5th grid. The position coordinate of the USB interface corresponding to the array of the U-shield device placement cabinet where it is located is the reference position coordinate mentioned above, and the reference coordinate information includes the reference position coordinate, the number of the USB interface, and the number of the actuator corresponding to the USB interface and other mapping information.
[0092] In addition, each USB interface corresponds to inserting a USB device to be tested, that is, a USB shield to be tested. When the plug of the USB shield to be tested matches and plugs into the socket of a USB interface set in the USB shield device placement cabinet, the coordinates of the USB interface corresponding to the plug of the USB shield to be tested can generally be the reference position coordinates of the above-mentioned USB interface. However, due to different brands, models, specifications and other styles, the position used for the clicker to click on the USB shield to be tested, such as the OK key, has a deviation from the reference position coordinates of the USB interface. Therefore, when the offset distance between the click position of the clicker and the plug of the USB shield can be clearly determined, the click position coordinates of the USB shield can be determined according to the relationship between the offset distance and the reference position coordinates of the USB interface corresponding to the plug of the USB shield. Among them, the click position coordinates are the coordinates of the click position (such as the OK key) of the above-mentioned USB shield to be tested relative to the USB shield device placement cabinet where the USB shield is located. The click coordinate information includes the above-mentioned click position coordinates, USB shield number, USB shield model, USB shield brand and other information.
[0093] Since each U-shield device placement cabinet can be set up with at least one clicker to be tested, the number of clickers in each U-shield device placement cabinet can be set according to the scale of the number of U-shield tests it carries. For example, a 10*10 U-shield device placement cabinet can be set up with a clicker, and each U-shield in the U-shield device placement cabinet can be tested and clicked by controlling a clicker; in addition, if a 100*100 U-shield device placement cabinet is used, multiple clickers can be set up accordingly, and the array of USB interfaces in the U-shield device placement cabinet can be partitioned to form multiple partitions, and each partition corresponds to a clicker control. When the reference position coordinates or click position coordinates of the USB interface into which the U-shield to be tested is inserted are in the partition, the clicker corresponding to the partition is controlled.
[0094] The clicker can be controlled to perform a click operation on the corresponding U shield according to the click position coordinates, thereby realizing a click test of the U shield.
[0095] Therefore, compared with the uncontrolled blind and controlled targeted click test solutions in the prior art, by centrally and uniformly managing U-Shield devices and providing cloud-based automated test click services, the number of required U-Shield clickers is reduced, resource costs are saved, and the workload of equipment maintenance is reduced. It also meets the flexible deployment requirements of one U-Shield device corresponding to one clicker.
[0096] It can be seen that the above method of the embodiment of the present disclosure does not need to set a clicker for each U-shield. Even if there are a large number of U-shiels corresponding to the automated test, accurate and efficient U-shield click test operations can be achieved, saving clicker resources and facilitating test maintenance. In this way, centralized and unified management of U-shield devices to be tested is achieved. When the U-shield device placement cabinet is in cloud mode, the cloud mode automated test U-shield click service can be implemented, which greatly simplifies the test difficulty and reduces the problem of poor test accuracy caused by subjective factors of human management. At the same time, it also meets the flexible deployment requirements of one U-shield device corresponding to one clicker.
[0097] Figure 4 An application scenario diagram of the U-Shield testing method according to an embodiment of the present disclosure is schematically shown.
[0098] like Figure 2-Figure 4 As shown, according to an embodiment of the present disclosure, before determining the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield in step S301, it also includes:
[0099] Parameterizing the automation script in response to the test instructions to form a parameterized script;
[0100] Execute the parameterized script to determine the USB shield number of the USB shield.
[0101] Automation scripts are test scripts that use natural language as the language for writing test scripts in order to meet the maintainability, reliability and portability that U-Shield automatic testing should have. As an executable file, the test script is written in a way that conforms to the natural language description habits, which is equivalent to a test case. There is no need to convert test cases and test scripts, and it is relatively easy to maintain test cases, thereby unifying the test process described in the case with the actual test operation and the judgment of the test results.
[0102] When the U shield is inserted into the USB interface, it is necessary to determine the execution machine corresponding to the USB interface according to the U shield to be tested. Therefore, in the process of compiling the automation script, it is necessary to parameterize the U shield number to be tested. Afterwards, the USB interface, the execution machine and the corresponding U shield are physically connected respectively through the U shield device routing connection module 230, that is, the USB interface and the U shield are in a physically connected state.
[0103] After the physical connection between the USB interface, the execution machine and the physical U-shield is realized, the execution machine can be controlled to execute the automation script, and the file parsing of the automation script can be realized, the U-shield number to be used can be obtained from the parameters of the automation script, and the USB interface logical number corresponding to the U-shield number can be obtained from the corresponding U-shield routing configuration table in the U-shield device routing connection module 230.
[0104] like Figure 2-Figure 4 As shown, according to an embodiment of the present disclosure, before determining the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield in step S301, it also includes:
[0105] In response to the execution of the parameterized script, a click control communication message corresponding to the U-shield is generated according to the U-shield number;
[0106] In response to the click control communication message, determining the USB interface corresponding to the USB shield;
[0107] Determine the physical connection relationship between the USB interface and the USB shield according to the current connection status of the USB interface; and
[0108] Obtain the reference coordinate information corresponding to the USB interface based on the physical connection relationship.
[0109] When the above-mentioned parameterized script is executed, the execution machine external device management module 220 connected to the execution machine pool 210 generates a click control communication message corresponding to the U-shield number according to different test business requirements, and sends the click control communication message information to the U-shield device routing connection module 230.
[0110] By parsing the click control communication message and executing the operation instructions therein, the USB interface to which the U shield is connected is determined, and information such as the USB interface number and the current connection state of the USB interface is determined. Among them, the execution of the corresponding operation instructions in the click control communication message can also be used to make the U shield device routing connection module 230 physically connect the USB interface and the physical U shield when the current connection state of the USB interface is empty, that is, determine the physical connection relationship between the USB interface and the U shield.
[0111] After the physical connection relationship between the USB interface and the U shield is determined, the reference position coordinates of the USB interface can be determined through the coordinate relationship of the position of the USB interface in the U shield device placement cabinet, thereby forming reference coordinate information. Therefore, it can be used to obtain the corresponding relationship between the U shield and the USB interface as shown in step S402.
[0112] It should be noted that when the execution machine 1-n executes the automation script, the U shield number to be used is obtained from the parameters of the automation script. When the step in the automation script that requires the U shield to be clicked is executed, such as step S401, the execution machine external device management module 250 sends a click instruction to the cloud service U shield click instruction processing submodule 252, and the click instruction corresponds to the click control communication message of the above-mentioned cloud service U shield. After receiving the message, the cloud service U shield click instruction processing submodule first obtains the correspondence between the physical U shield and the USB interface from the U shield routing configuration table 221 as in step S402, and checks whether the physical U shield has been connected to the specific USB interface.
[0113] According to the reference position coordinates of the USB interface to which the U shield is connected, the position of the U shield in the array coordinates of the U shield device placement cabinet can be further determined, as shown in step S403.
[0114] According to an embodiment of the present disclosure, in step S301, according to the reference coordinate information of the USB interface corresponding to the USB shield, the click coordinate information of the USB shield is determined, including:
[0115] Determine the position offset information of the click position of the USB shield relative to the USB interface;
[0116] The click coordinate information of the USB shield is determined according to the position offset information of the USB interface.
[0117] According to the offset relationship between the preset click position of the USB shield (such as the OK button) and the plug position of the USB shield, such as the reference position coordinates of the USB interface corresponding to the plug of the USB shield and the offset distance between the plug of the USB shield and the click position, the position offset information corresponding to the click position can be obtained. The position offset information actually includes the offset distance of the horizontal and vertical coordinates of the click position relative to the reference position coordinates of the USB interface.
[0118] Using the position offset information determined above, the click position coordinates of the U shield in the array coordinate system of the U shield device placement cabinet can be determined based on the reference position coordinates of the USB interface relative to the array of the U shield device placement cabinet. The click coordinate information may include the click position coordinates of the U shield to be tested relative to the U shield device placement cabinet, the click position name corresponding to the click position coordinates (such as the name "OK key"), etc.
[0119] like Figure 2-Figure 4 As shown, according to an embodiment of the present disclosure, in step S302, the clicker corresponding to the click coordinate information is retrieved, including:
[0120] Determine the clicker calling range according to the click coordinate information;
[0121] Retrieves the clicker that satisfies the clicker retrieving range.
[0122] When a clicker is set for a U-shield device placement cabinet, the placement cabinet number of the U-shield device placement cabinet where the corresponding click position coordinates are located can be determined according to the click coordinate information of the U-shield, and the placement cabinet number determines the clicker. The calling range of the clicker includes the placement cabinet number.
[0123] In addition, when multiple clickers are set for a U-shield device placement cabinet at the same time, the array of USB interfaces in the U-shield device placement cabinet can be partitioned to form multiple partitions, each partition corresponding to a clicker control, when the click position coordinates of the U-shield to be tested inserted into the U-shield device placement cabinet are within a corresponding partition of the U-shield device placement cabinet, the partition can be used as the above-mentioned clicker retrieval range, and the clicker of the corresponding partition that meets the clicker retrieval range is called as the corresponding clicker for performing a click operation on the click position coordinates.
[0124] like Figure 2-Figure 4 As shown, according to an embodiment of the present disclosure, in calling a clicker that satisfies a clicker calling range, the process further includes:
[0125] Determine the current running status of the clicker;
[0126] Call the clicker according to the current running status.
[0127] After the clicker is determined, the execution machine needs to determine the current running state of the clicker to ensure whether there is any unfinished click operation in the current state of the clicker, as shown in step S404.
[0128] If the current running state of the clicker is idle, it is determined that the clicker can be used to perform the click operation of the above-mentioned U shield, and the clicker is called for control. If the current running state of the clicker is busy, it means that the clicker is performing a click operation of other U shields, and the clicker cannot be called for control, and it is necessary to further wait for the current busy state of the clicker to end, or call other idle state clickers to perform click operations.
[0129] According to an embodiment of the present disclosure, in step S303, the clicker is controlled to perform a click operation on the USB shield according to the click coordinate information, including:
[0130] Control the clicker to move according to the track formed by the click coordinate information, so that the clicker corresponds to the click position of the U shield;
[0131] Controls the clicker to perform click operations on the click position.
[0132] According to an embodiment of the present disclosure, controlling a clicker to perform a click operation on a click position includes:
[0133] Perform a fixed number of click operations on the click position of the USB shield based on a fixed period.
[0134] When it is determined that the current running state of the clicker is idle, the clicker can be called for control. Specifically, an execution operation trajectory can be generated based on the initial position coordinates of the click execution end of the clicker relative to the array coordinate system of the U-shield device placement cabinet and the click position coordinates corresponding to the click position of the U-shield to be tested determined above, and the click execution end of the control clicker moves along the operation trajectory to the click position, so that the click execution end corresponds to the click position.
[0135] Further, a click operation is performed on the click position of the U shield according to preset simulated click data, and the simulated click data includes preset regular information on the click operation that the clicker can perform, such as click time, click number, click cycle, and click end time, so as to determine that when the data is executed by the clicker, a click operation of preset regularity can be performed on the U shield to be tested, such as a fixed number of click operations on the click position of the U shield based on a fixed cycle. In this way, the test of the U shield can be completed efficiently and accurately, thereby completing the entire click test operation, such as step S406.
[0136] In the process of the clicker performing the click operation on the click position of the U shield, it is also necessary to judge the click operation of the clicker, that is, to judge the click position, click strength, click times, click period, etc. of the click operation, as shown in step S405. When these data show abnormal values, it is necessary to stop the click operation.
[0137] like Figure 2-Figure 4 As shown, according to an embodiment of the present disclosure, the method further includes:
[0138] Record the click operation of the corresponding USB shield to form a click operation log;
[0139] Stores click operation logs.
[0140] For the above method of the embodiment of the present disclosure, during the implementation of each click operation, it is necessary to record the data related to each control progress, and each record can be used to form a click operation log. When the click operation log is centrally stored, it can form the click operation log record content in the U-shield device click operation control submodule 254 shown in Table 2 above.
[0141] Specifically, in step S407, when it is confirmed that the clicker currently has an unfinished click instruction and cannot click, the error information can be recorded in the click operation log table. Similarly, when the clicker currently has no unfinished click operation, the clicker is controlled to complete the click operation on the U shield, and the click operation log is recorded in the click operation log table. In step S408, when it is determined that the click operation data during the click operation of the clicker on the U shield has an abnormal value, the click operation is determined to be abnormal, and the abnormal information of the click operation is recorded in the click operation log table, such as step S408.
[0142] In step S409 , the click operation log recording submodule 244 may store the record log data generated during the click operation control implementation process.
[0143] Therefore, the above USB shield testing method according to the embodiment of the present disclosure can have the following technical effects compared with the uncontrolled blind click scheme in the prior art, which will cause a huge amount of invalid click operations, waste of resources, equipment loss and even damage to USB shield buttons, and the controlled targeted click scheme, which will lead to difficult management and high manpower consumption:
[0144] (1) It can realize large-scale batch automation, intelligent and precise testing of U-Shields, and realize precise and efficient automatic testing of a large number of U-Shields. Compared with the traditional one-to-one U-Shield corresponding clicker model, it greatly saves the number of U-Shield clicker resources.
[0145] (2) In the same U-Shield equipment placement cabinet, a large number of U-Shields to be tested can be compatible and supported at the same time, with stronger compatibility, intelligent identification, and improved testing efficiency of different types of U-Shields.
[0146] (3) Through the U-Shield equipment placement cabinet, centralized and unified management of large-scale U-Shields to be tested can be achieved, and through the U-Shield devices in the same U-Shield equipment cabinet reuse the same set of clickers to provide cloud-based automated testing U-Shield clicking services, which greatly saves costs and reduces the workload of U-Shield equipment maintenance.
[0147] Figure 5 A block diagram of a U-shield testing device according to an embodiment of the present disclosure is schematically shown.
[0148] like Figure 5 As shown, another aspect of the present disclosure provides a USB shield testing device 500, which includes a coordinate determination module 510, a clicker retrieval module 520 and an operation control module 530. The coordinate determination module 510 is used to determine the click coordinate information of the USB shield according to the reference coordinate information of the USB interface corresponding to the USB shield; the clicker retrieval module 520 is used to retrieve the clicker corresponding to the click coordinate information; and the operation control module 530 is used to control the clicker to perform a click operation on the USB shield according to the click coordinate information to complete the test of the USB shield.
[0149] It should be noted that Figure 5 The embodiment of the U-shield testing device 500 shown is similar to the embodiment of the aforementioned U-shield testing method, and the technical effects achieved are also similar, which will not be repeated here.
[0150] <Example 2>
[0151] As the pace of system application version development accelerates, automated verification of business application systems has become the preferred solution in the testing process. Since the business transactions involving the above-mentioned need to insert a USB shield into the local device as a security medium are generally high-risk key transactions, they are also the key verification content that needs to be carried out in each version test.
[0152] In the process of traditional automated testing, due to the limitation of hardware security media operation (plugging and unplugging, physical button clicking), more manual operation links are required to complete the operation process of a transaction normally. Therefore, the automation of such transactions has always required manual intervention for connection, and the automation cost is high, making it impossible to achieve automated testing efficiently. However, the U-shield is increasingly used in various business transactions. As an important proof of customer identity, the U-shield is very important in the process of system transaction operations, especially for corporate transactions.
[0153] The existing automated testing scenarios involving USB shields mainly face two problems: (1) Clicking operations on the physical buttons on the USB shield device. In this regard, the usual solution is to use a physical peripheral solution to repeatedly and continuously click the physical buttons on the USB shield through an external device during the entire transaction process to implement the operation of the physical buttons on the USB shield. (2) Switching operations on the currently used USB shield. However, in current actual work, this operation can only be achieved by manually plugging and unplugging the USB shield, or by developing a USB shield routing connection module.
[0154] Among them, there are usually two modes of U-shield button clicking: one is an uncontrolled blind clicking mode, and the other is a controlled targeted clicking scheme.
[0155] On the one hand, in the uncontrolled blind clicking mode, physical peripherals (such as clickers) need to be used to continuously click the physical buttons on the USB shield. Among them, since the clicks on the physical buttons are not targeted, even if there are no or only a few USB shields that need to be clicked in a certain period of time, all USB shield devices need to be in a state of being clicked, resulting in a huge amount of invalid click operations, resulting in waste of resources such as power and unnecessary equipment loss, especially causing more USB shield buttons to be damaged due to multiple clicks, which greatly wastes test resources.
[0156] On the other hand, in a controlled targeted click mode, an operation scheme is usually adopted in which each U-shield device corresponds to a clicker. As the scale of the test expands, more and more test U-shield devices need to be prepared. When the number of U-shield devices reaches a certain scale, the mode of equipping each U-shield with a clicker will cause certain difficulties in the deployment and management of the clicker. At the same time, because not all U-shiels need to be clicked at the same time, it causes a lot of waste of resources of U-shield clicker devices.
[0157] Among them, in order to solve the technical problems existing in the above two modes, it is possible to consider adopting a U-shield click management mode based on cloud services to implement it.
[0158] However, no matter which of the above-mentioned U-shield device automatic click test schemes is used, when the test U-shield device used fails or is damaged, manual intervention is required to manually unplug the faulty U-shield device, and then use the data filling platform to fill the new U-shield device with data consistent with the faulty U-shield, and then connect the new U-shield device to the U-shield device connection module, manually update the U-shield device access information, U-shield device routing information, U-shield device click information and other configurations, and at the same time, it is also necessary to synchronously update the U-shield physical number information used by the corresponding automated test script to complete a replacement process for a faulty U-shield.
[0159] However, during the automated testing process, the time point at which the U-shield fails is random. After the failure occurs, manual intervention and a series of preparations are required to resume the test, which requires a long recovery cycle. At the same time, in the 7*24-hour automated testing service mode, when a failure occurs during non-manual working hours, the corresponding automated testing script will not be able to be executed or will fail to execute. It is also necessary to wait until the tester's working hours (such as after work) to perform manual preparation before continuing to test and use it. Moreover, after replacing the new U-shield, the physical number of the U-shield used in the original automated testing script must be modified synchronously to resume the test program, resulting in reduced efficiency of the entire automated testing.
[0160] In order to solve at least one of the above-mentioned technical problems existing in the U-shield automated testing process in the prior art, the present disclosure provides a U-shield testing method, device, electronic device and computer-readable storage medium.
[0161] It should be noted that the U-Shield testing method and device provided by the present disclosure can be applied to the fields of information security technology, big data technology and financial technology, or to any technical field other than the above-mentioned technical fields. The application field of the U-Shield testing method and device provided by the present disclosure is not specifically limited.
[0162] Figure 6 Another exemplary system architecture to which the U-Shield testing method can be applied according to another embodiment of the present disclosure is schematically illustrated.
[0163] like Figure 6 As shown, the exemplary system architecture 600 mainly includes an execution machine external device management module 620, a U-shield device routing connection module 630, a one-to-one U-shield click management module 640, a cloud service U-shield click management module 650, a standby U-shield monitoring management module 660, etc., wherein the standby U-shield monitoring management module 660 includes a standby U-shield switching information management module 661, a standby U-shield device information management module 663, a standby U-shield data injection management module 662, a standby U-shield switching management module 665, a standby U-shield data switching log recording module 664, etc.
[0164] The execution machine external device management module 620 is connected to the execution machine pool 610. It can query the standby U-shield switching information management module 661 whether the U-shield has ever switched according to the U-shield number in the U-shield communication message of the U-shield to be tested. If the U-shield has ever switched automatically, the physical number of the U-shield of the switching U-shield equivalent to the data value of the switching data is queried to obtain the physical number of the standby U-shield; if the U-shield has not switched automatically, the U-shield is directly used as a test USB device, and the physical number of the U-shield of the U-shield is recorded. Afterwards, the execution machine external device management module 620 sends the U-shield usage communication message information to the U-shield device routing connection module 630 according to different business processes. Among them, the execution machine pool 610 includes multiple execution machines 1-n. 1. Among them, the U-shield usage communication message information contains the U-shield number, operation instructions, sending time, execution machine name, sending IP and other contents. The operation instructions include creating a new USB interface connection, releasing a USB interface connection, initializing the U-shield routing configuration, resetting the physical U-shield connection, updating the physical U-shield connection, etc.
[0165] At the same time, the execution machine external device management module 620 is also responsible for sending U-shield click control communication message information to the U-shield click management module. Among them, the U-shield click control communication message information includes the execution machine name, U-shield number, U-shield deployment type (cloud service U-shield / non-cloud service U-shield), sending time, sending IP, number of clicks, click interval duration and other information.
[0166] The U shield device routing connection module 630 is used to establish a physical connection path between the automated execution machine 1-n and the U shield device to be tested, and to transmit instructions. The U shield device routing connection module 630 is mainly composed of a U shield information management submodule 632, a U shield device connection submodule 633, and a U shield data switching routing submodule 631. Among them, the U shield information management submodule 632 is mainly used to manage the U shield number, the comparison information of the U shield device connected to the USB interface, and the business purpose of the U shield and provide corresponding maintenance functions; the U shield device connection submodule 633 is used to manage and maintain the mapping relationship between the USB interface and the physical U shield; the U shield data switching routing submodule 631 is used to receive the U shield usage communication message information sent from the execution machine external device management module 620, establish or interrupt the connection between the execution machine 1-n and the USB physical interface, and synchronize the connection status, start time, end time, current occupied execution machine name, current occupied execution machine IP and other fields to the U shield routing configuration table.
[0167] The one-to-one U shield click management module 640 is mainly used to receive the operation instructions of the U shield device whose deployment mode is "one U shield device corresponds to one clicker" submitted by the execution machine 1-n, and perform click operations on the specified U shield according to the click operation instructions.
[0168] When the execution machine 1-n executes the step that requires the U shield to click in the automation script, the execution machine external device management module 620 sends a non-cloud service U shield click control communication message to the 1-to-1 U shield click instruction processing submodule 641. The 1-to-1 U shield click instruction processing submodule 641 receives the message and parses it. According to the U shield number in the message, the clicker number corresponding to the physical U shield is found in the clicker configuration information management submodule 642. Then, the click operation control submodule 643 controls the corresponding clicker to complete the U shield click operation. Finally, the click operation log recording submodule 644 completes the log recording operation of the whole process.
[0169] The cloud service U shield click management module 650 is mainly used to receive the operation instructions for the U shield submitted by the execution machine 1-n, and perform click operations on the specified U shield according to the click operation instructions, and record the U shield click operation log. Among them, the U shield click management module 650 can be mainly composed of a U shield device deployment configuration management submodule 651, a U shield device click addressing submodule 653, a U shield device click operation control submodule 654 and a cloud service U shield click instruction processing submodule 652.
[0170] It should be noted that in the embodiments of the present disclosure, the U-shield is used as a test object and is set in a U-shield device placement cabinet 1-n in a large-scale parallel manner. Among them, the U-shield device placement cabinet 1-n is a hardware device, which is mainly used to place and fix the U-shield device. Any of the U-shield device placement cabinets 1-n of different sizes can place physical U-shield devices of different quantities, shapes, specifications and brands. Each U-shield device placement cabinet can define the array coordinate system of the physical U-shield devices in the placement cabinet according to the horizontal and vertical directions.
[0171] Among them, when the execution machine 1-n executes the step in the automation script that requires clicking the cloud service U-shield, the execution machine external device management module 620 sends a cloud service U-shield click control communication message to the cloud service U-shield click instruction processing sub-module 652. The cloud service U-shield click instruction processing sub-module 652 parses the message after receiving it, and finds the location of the physical U-shield to be clicked in the U-shield device deployment cabinet in the U-shield device deployment configuration management sub-module 651 according to the U-shield number in the message, and the U-shield device clicker addressing sub-module 653 calculates the sliding distance of the U-shield clicker, and then the U-shield device click operation control sub-module 654 operates the clicker to complete the U-shield click operation, and finally the click operation log recording sub-module 654 completes the log recording operation in the entire process.
[0172] The backup U-shield switching information management module 660 is mainly used to register the U-shield number mapping relationship of the current backup U-shield switching. The mapping relationship is mainly composed of the original U-shield physical number, the current faulty U-shield physical number, the new U-shield physical number, whether it is valid, etc. The details can be referred to the following Table 3.
[0173] Original USB Shield Number Current fault USB shield number New USB Shield Number Is it effective? Change time 5300016804 5300016805 5300016806 invalid 2021 / 3 / 12 15:12:12 5300016804 5300016806 5300016807 efficient 2021 / 3 / 12 16:12:12 …… …… …… …… ……
[0174] Table 3
[0175] Among them, as shown in Table 1, the original U shield physical number is used to store the original U shield physical number of the first switch, which corresponds to the physical U shield number used in the automation script; the current fault U shield physical number is mainly used to store the faulty U shield number; the new U shield physical number is mainly used to store the new U shield number after the switch; whether it is valid is mainly used to identify whether the switching information is valid. Among them, only when there is only one record of "whether it is valid field value" in the record of the same original U shield physical number, the switching information is judged to be valid.
[0176] The spare U shield device information management module 663 is mainly used to store spare blank U shield related information, including the physical number of the U shield, U shield brand, usage status (used, unused), available status (available, unavailable), change time and other field information, as shown in Table 4 below.
[0177] USB Shield Number U shield brand Use Status Available status 5300016804 Minghua Used Unavailable 5300016861 Heaven and Earth Fusion Not used Available …… …… …… ……
[0178] Table 4
[0179] The standby U shield switching management module 665 is mainly used to monitor the use and click status of the U shield. When a U shield device is detected to have a fault, the switching process is triggered, the standby U shield device information management module 663 is called, and the list of currently available idle U shield devices is obtained. A standby U shield is selected according to the same brand priority strategy, and the identification information of the selected standby U shield (such as available status or unavailable status) is set to be used; then the standby U shield data injection management module 662 is called to inject the new U shield data into the test data equivalent to the old U shield. After the data is injected successfully, a U shield switching mapping relationship is added to the standby U shield switching information management module 661, and the U shield data switching routing submodule 631 in the U shield device routing connection module 630 is updated, and the U shield information management submodule 632 in the U shield device routing connection module 630 is updated to supplement the U shield ID certificate number, U shield category and U shield purpose of the new U shield device, and delete the routing information and connection information of the old U shield.
[0180] The standby U shield data injection management module 662 is mainly used to update the data in the new U shield device, which mainly includes customer number, customer account, authorization method, business type and other information. When the data of the U shield device is updated, the customer number and customer account in the original faulty U shield are first obtained, and the corresponding certificate ID is found according to the customer number and customer account. Then, the binding relationship between the certificate ID and the original faulty U shield is frozen and the binding is cancelled. After the binding relationship is successfully cancelled, the certificate ID is bound to the new U shield device and the binding relationship between the certificate ID and the new U shield device is activated.
[0181] The backup U shield data switching log recording module 664 is mainly used to record the backup U shield switching operation log, including the execution machine name, execution machine IP, original U shield number, backup U shield number, switching time, switching log and other information. For details, please refer to the following Table 5.
[0182] Original USB Shield number Backup USB Shield Number Executor name Execution machine IP Switching time Switch log 5300016803 5300016804 UkeyTest01 83.10.2.23 2021 / 3 / 12 15:12:12 There is currently no available idle USB shield, and USB shield switching is not possible. 5300016860 5300016861 UkeyTest02 83.10.2.24 2021 / 3 / 12 16:12:12 Switching successful …… …… …… …… …… ……
[0183] Table 5
[0184] Therefore, based on the above Figure 6 In the system architecture 600 shown, the standby U shield switching management module 665 monitors the use and clicks of the U shield. If a U shield device fails, the switching process is triggered, and the available idle U shield device is found in the standby U shield device information management module 663. The standby U shield data injection management module 662 cancels the binding relationship between the original faulty U shield and the certificate ID, binds the new U shield device and the certificate, and activates the binding relationship. At the same time, the standby U shield switching information management module 661 adds a mapping relationship between the faulty U shield and the standby U shield switching U shield number, and synchronously updates the business data of the U shield in the U shield information management submodule 632 in the U shield device routing connection module 630. The standby U shield data switching log recording module 664 completes the logging operation in the whole process.
[0185] Therefore, the above-mentioned system architecture of the embodiment of the present disclosure can realize intelligent automatic data replacement and test recovery, and realize intelligent automatic equivalent replacement of faulty U-shield devices. The entire process does not require human intervention, avoiding the fault recovery cycle caused by the need for manual intervention and replacement recovery when a single U-shield fails in the existing mode, reducing the maintenance workload of modifying automated test scripts and improving automated testing efficiency.
[0186] The following combination Figure 6-Figure 9 and Fig.10 , the U-shield testing method, U-shield testing device, electronic device and computer-readable storage medium provided by the present disclosure are further described in detail.
[0187] Figure 7 The following schematically shows a flow chart of a USB-shield testing method according to another embodiment of the present disclosure.
[0188] like Figure 7 As shown, one aspect of the present disclosure provides a U-shield testing method, which includes steps S701-S703.
[0189] In step S701, a backup USB shield corresponding to the faulty USB shield is matched;
[0190] In step S702, the original data of the failed USB shield is imported into the standby USB shield; and
[0191] In step S703, the clicker is controlled to perform a click operation on the standby USB shield to complete the test of the standby USB shield.
[0192] A faulty U-shield is an abnormal U-shield that has abnormal test behavior (such as physical failures such as damaged buttons and logical failures such as unstable or incorrect connection with the interface), which makes it impossible to continue to effectively perform the U-shield test. The spare U-shield is an idle U-shield that can achieve equivalent replacement of the internal data of the faulty U-shield to replace the faulty U-shield to continue the U-shield test process. Therefore, after confirming the faulty U-shield, the faulty U-shield can be matched with a spare U-shield. The matching process involves determining the basic test contents such as the location, model, and compatibility of the spare U-shield. When it is confirmed that the basic characteristics of the spare U-shield are the same or similar to those of the faulty U-shield, it can be confirmed that the spare U-shield is used to replace the faulty U-shield for testing. At this time, the faulty U-shield can be the original U-shield, as shown in Table 5 above.
[0193] The original data of the faulty U-Shield is data related to business needs, testing needs, and operation and maintenance support based on the internal logical architecture of the original U-Shield. When it is confirmed that the spare U-Shield can be used to replace the faulty U-Shield, the data in the faulty U-Shield needs to be migrated as a whole to copy or move it to the spare U-Shield, so that the spare U-Shield can be used to replace the faulty U-Shield to perform corresponding test operations. Data injection can be a migration behavior of the original data based on a method similar to data copying, moving or downloading. Specifically, during the test process, the data in the original U-Shield can be backed up to a data platform in real time or regularly, and then the original data can be queried and confirmed from the data platform according to the U-Shield number of the original U-Shield. When the original U-Shield is confirmed to be a faulty U-Shield, the original data is injected (such as downloaded) into the spare U-Shield, thereby completing the data injection process.
[0194] Furthermore, the standby U shield is clicked by the clicker to complete the test operation of the standby U shield. The clicker is an actuator for the U shield test operation, which can perform a fixed number of clicks and a fixed frequency on the standby U shield when controlled by an instruction, thereby completing the click test of the standby U shield.
[0195] The above-mentioned method of the embodiment of the present disclosure can solve the problem in the prior art that the automated test script execution task is suspended or fails before manual intervention, due to the failure or damage of the U-shield device used during the automated testing of the U-shield device, realize intelligent and automatic replacement and recovery of the failed U-shield, and realize the equivalent replacement of the failed U-shield device by the spare U-shield. The whole process does not require manual intervention, avoiding the fault recovery cycle caused by the need for manual intervention and replacement and recovery when a single U-shield fails in the existing mode, and reducing the maintenance workload of modifying the automated test script, thereby improving the efficiency of automated testing.
[0196] Therefore, compared with the low testing efficiency caused by the fact that faulty or abnormal U-shield devices can only be replaced manually in the prior art, it is possible to automatically detect U-shield abnormalities or failures, and automatically perform equivalent replacement between the faulty U-shield and the backup U-shield, thus realizing a highly automated, intelligent and precise backup replacement process for faulty U-shields, greatly reducing the workload of U-shield testing and maintenance, and further improving the efficiency of automated testing.
[0197] Figure 8 An application scenario diagram applied to the above-mentioned U-shield testing method according to another embodiment of the present disclosure is schematically shown.
[0198] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, before step S701 matches the standby USB shield corresponding to the faulty USB shield, the following steps are included:
[0199] In response to the first test instruction, parameterize the automation script to form a parameterized script;
[0200] Execute parameterized scripts to detect faulty USB shields.
[0201] Automation scripts are test scripts that use natural language as the language for writing test scripts in order to meet the maintainability, reliability and portability that U-Shield automatic testing should have. As an executable file, the test script is written in a way that conforms to the natural language description habits, which is equivalent to a test case. There is no need to convert test cases and test scripts, and it is relatively easy to maintain test cases, thereby unifying the test process described in the case with the actual test operation and the judgment of the test results.
[0202] Before performing an equivalent replacement process on the faulty U-shield, the faulty U-shield must first be detected and confirmed. The first test instruction is the instruction data sent by the operation and maintenance personnel or the tester through the terminal device to the system architecture 600 for performing a test on the original U-shield. After receiving the instruction data, it is first necessary to compile an automated script to parameterize the U-shield number of the original U-shield to be tested to form a parameterized script.
[0203] Afterwards, after confirming the physical connection status between the USB interface, the execution machine and the original U-Shield, the automation script can be executed by the execution machine to implement file parsing of the automation script, and the basic information of the original U-Shield, such as the U-Shield number to be used, can be obtained from the parameters of the automation script. The original U-Shield can then be tested to determine whether it is a faulty U-Shield.
[0204] Among them, during the execution of the above-mentioned automated script, by obtaining the basic information content of the original U-shield, it can be determined whether the original U-shield is a U-shield that has been switched. If the original U-shield has undergone automatic switching, the U-shield number of the U-shield with equivalent data value can be queried, that is, the physical U-shield number of the backup U-shield can be obtained. If the U-shield has not been automatically switched, the original U-shield number is used directly.
[0205] Furthermore, a U-shield usage application may be sent through the execution machine external device management module 620 to establish a connection between the execution machine and the corresponding U-shield.
[0206] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, executing a parameterized script to detect a faulty USB shield also includes:
[0207] In response to the execution of the parameterized script, a usage request is sent to the current USB shield;
[0208] A control connection between the current U shield and the execution machine is established according to the usage request.
[0209] During the execution of the above parameterized script, a usage request can be sent for the current U-shield according to the script execution. The usage request is a request instruction, which is applied during the test operation so that the execution machine can realize logical control of the current U-shield.
[0210] According to the usage request, a logical connection relationship can be established between the current U-Shield and the corresponding execution machine, so that the execution machine can transmit and convey control instructions to the current U-Shield according to the logical connection relationship to realize the test operation of the current U-Shield.
[0211] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, executing a parameterized script and detecting a faulty USB shield includes:
[0212] Check the test log record of the current USB shield;
[0213] According to the test log records and preset fault analysis rules, the current USB shield is determined to be a faulty USB shield.
[0214] During the execution of the automated script, the standby U-shield switching management module 665 monitors the current U-shield usage and clicks to check whether there are any abnormalities in the U-shield usage and clicks.
[0215] Specifically, since the use and test click process of each U shield will generate log data, these log data are aggregated to the data platform (such as a cloud database, storage server or other storage or server) to form a test log record, which is used to reflect the real-time status and historical status of the current U shield. Therefore, when the standby U shield switching management module 665 can query the data platform, it can obtain the test log record of the current U shield. The specific query method can be a periodic query process.
[0216] The preset fault analysis rule is a judgment rule for whether the test behavior of the U shield is abnormal, determined based on experience and analysis of the log data of the U shield, and specifically involves the corresponding relationship between behavior and fault, such as the relationship between physical faults such as damaged buttons and logical faults such as unstable or incorrect interface connection and whether the U shield test behavior can continue to be effectively performed. For example, when it is determined that a piece of log data of the U shield is abnormal data, which belongs to a physical fault, and it is judged by the preset fault analysis rule that the current U shield cannot continue to effectively perform the U shield test behavior, then the current U shield is a faulty U shield, as shown in step S801.
[0217] If no abnormality is detected in the current U-Shield device, the above query and monitoring process will continue.
[0218] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, in step S701, matching a standby USB shield corresponding to the faulty USB shield includes:
[0219] In response to the detection of a faulty USB shield, querying the idle USB shields in the USB shield array;
[0220] According to the preset position matching rules, the idle U shield corresponding to the faulty U shield is matched as the backup U shield.
[0221] As mentioned in the above embodiments, in the embodiments of the present disclosure, the U shield is used as a test object and is set in the U shield device placement cabinet 1-n in a large-scale parallel manner. Among them, the U shield device placement cabinet 1-n is a hardware device, which is mainly used to place and fix the U shield device. Any of the U shield device placement cabinets 1-n of different sizes can place physical U shield devices of different numbers, shapes, specifications and brands. For example, a 10*10-bit cabinet can place 100 USB devices at the same time, and an 8*10-bit cabinet can place 80 USB devices, etc. The USB device is the target U shield to be tested. Among them, each U shield device placement cabinet is defined by the horizontal and vertical coordinates according to the setting position of the USB device. For example, a 10*10-bit cabinet has 100 setting coordinates, each coordinate corresponds to a USB interface, and each interface can be set with a USB device. For example, the setting coordinate is (3,5), which corresponds to the USB interface in the 3rd row and the 5th column. When the USB device is inserted into the USB interface, the insertion coordinate of the USB device is determined to be (3,5). Furthermore, at least one set of physical clickers 1-n of U-shield devices may be installed on a U-shield device placement cabinet, and the clickers 1-n support physical click operations on designated coordinate positions of the horizontal and vertical coordinates.
[0222] Therefore, when all the U-shields to be tested are set into the U-shield equipment placement cabinet, and the number of setting positions of the U-shield equipment placement cabinet can reach more than 10*10, or even 100*100, that is, the U-shield equipment placement cabinet can be set with more than 100 or even 10,000 U-shields to be tested, forming a U-shield test super intelligent management cabinet.
[0223] Among them, for each U-shield device placement cabinet, the U-shield to be tested and the spare U-shield can be prevented at the same time. Specifically, the setting partitions of the test U-shield and the spare U-shield can be delineated in the U-shield device placement cabinet according to the coordinate distribution. The spare area is used to place the spare U-shield to form a spare array, and the test area is used to place the test U-shield to form a test array. Among them, in the same U-shield device placement cabinet, the ratio of the number of spare U-shields to the sum of the spare U-shield and the test U-shield is smaller than the proportion of the number of test U-shields. For example, for the same 10*10 array U-shield device placement cabinet, 90 test U-shields can be set in the test partition, and 10 spare U-shields can be set in the spare partition. Therefore, the proportion of the spare partition in the array area of the placement cabinet should also be smaller than the area proportion of the test partition.
[0224] Therefore, after determining a faulty U-shield, it is only necessary to determine one of the idle U-shields in the spare partition of the U-shield array of the above-mentioned U-shield equipment placement cabinet as a spare U-shield. However, any of the original multiple spare U-shields in the spare partition may already be in a replacement state or have completed replacement as a test U-shield at the current moment. Therefore, it is necessary to query and analyze each original spare U-shield in the spare partition to determine whether it is an idle U-shield. Specifically, according to the U-shield number of the corresponding U-shield, the log data corresponding to the U-shield in the data platform can be queried, and according to the log data, it can be queried and obtained whether the U-shield is an idle U-shield.
[0225] For multiple idle U shields in the spare partition, when only one idle U shield is needed as a spare U shield, the idle U shield needs to be matched according to the preset position matching rule. The preset position matching rule can be used to reflect the distance between each idle U shield and each test U shield or faulty U shield in the test partition, and the correspondence between the distance and whether the idle U shield is matched as a spare U shield. For example, when the distance between the array coordinates of the placement cabinet where a faulty U shield is located and the array coordinates of each idle U shield in the spare partition is determined, the idle U shield corresponding to the smallest distance value is determined as the condition for matching the idle U shield as a spare U shield, and the matching rule reflected by it is the above-mentioned preset position matching rule.
[0226] Therefore, if a failure is detected in a current U-shield device, the switching process corresponding to the failed U-shield is triggered to check whether an idle U-shield device available in the backup partition can be provided in the backup U-shield device information management module 663, and the available idle U-shield is selected as the backup U-shield according to the above-mentioned preset position matching rules, such as step S802.
[0227] In this way, the spare U-shield can be selected fully automatically and intelligently, completely replacing manual subjective judgment and selection, which is more efficient.
[0228] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, in matching the idle U shield corresponding to the faulty U shield as a standby U shield according to the preset position matching rule, it includes:
[0229] Determine the first array position of the faulty USB shield;
[0230] According to the first array position and the preset position matching rule, the idle U shield is matched as the backup U shield.
[0231] As mentioned above, the first array position of the faulty U-shield can be determined through the USB interface that has a physical connection relationship with the faulty U-shield and the coordinate position of the USB interface in the U-shield array of the U-shield device placement cabinet, that is, the first array position and the array coordinate position of the USB interface can be the same.
[0232] According to the coordinate position of each idle U shield in the backup partition, determine the distance between the first array position of the faulty U shield and the array position of each idle U shield, and according to the distance and the above-mentioned preset position matching rules, determine the idle U shield with the smallest distance value as the matching object of the backup U shield of the above-mentioned faulty U shield, as shown in step S802.
[0233] Among them, if the U shield device information management module 663 cannot provide an available idle U shield device, it returns a message "There is currently no available idle U shield, and U shield switching cannot be performed", and records the error information to the standby U shield data switching log recording module 664, such as step S803.
[0234] Based on this, the matching of the spare U shield can be achieved more intelligently and accurately, while ensuring that the distance between the spare U shield and the faulty U shield is the shortest, making the distribution of the spare U shield and the faulty U shield in the cabinet array more reasonable and convenient for management and operation and maintenance.
[0235] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, in step S702, the original data of the faulty USB shield is poured into the standby USB shield, including:
[0236] Determine the standby binding relationship between the standby U-Shield and the identity information of the faulty U-Shield;
[0237] The original data is injected into the standby U shield according to the standby binding relationship.
[0238] After the backup U shield is determined, an identity connection can be established between the backup U shield and the identity information of the faulty U shield, i.e., a backup binding relationship. After the backup binding relationship is bound and activated, the current data and historical data of the original faulty U shield can be downloaded from the data platform to the backup U shield through the backup binding relationship to complete the original data injection process, such as step S804. Among them, the original data includes the current data and historical data of the above-mentioned faulty U shield, specifically involving data related to business needs, testing needs, and operation and maintenance support based on the internal logical architecture of the original U shield.
[0239] Therefore, the data of the standby U shield can be injected accordingly, so that the data of the standby U shield is consistent with the original data of the replaced faulty U shield, ensuring that the switching process of the entire U shield is more automated and intelligent, and data will not be missed. Therefore, the data injection process of the entire U shield test process is more efficient.
[0240] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, in determining the standby binding relationship between the identity information of the standby U shield and the faulty U shield, it includes:
[0241] Query the identity information of the faulty USB shield;
[0242] Cancel the original binding relationship between the faulty USB-Shield and the identity information; and
[0243] Activate the backup binding relationship between the backup USB shield and identity information.
[0244] When the data injection operation is performed through the standby U shield data injection management module 662, the customer number and customer account corresponding to the basic information of the faulty U shield in the data platform are first determined according to the basic information such as the U shield number of the faulty U shield, wherein each U shield number may correspond to a customer number, and each customer number may have multiple customer accounts. Then, the identity information corresponding to the faulty U shield, such as the certificate ID, is searched according to the customer number and the customer account, and each certificate ID uniquely identifies a U shield.
[0245] According to the identity information obtained by the query, the original binding relationship between the faulty U-shield and the identity information is frozen and unbound, and the log data generated by the process is stored for later tracing. In addition, for the identity information whose original binding relationship has been canceled, a mapping relationship is established with the backup U-shield, and the mapping relationship is activated to realize the backup binding relationship between the identity information and the backup U-shield, so that the two have an activated backup binding relationship. Through the backup binding relationship, the data transmission operation between the data platform and the backup U-shield can be realized, so that the original data related to the faulty U-shield stored in the data platform is directly poured into the backup U-shield.
[0246] Therefore, the original data in the original faulty U-Shield can be accurately and efficiently transmitted to the backup U-Shield to prevent data leakage or omission. The entire process is fully automated and extremely efficient.
[0247] It should be noted that, as shown in steps S803-S804, if there is an available idle U shield device in the U shield device information management module 663, the backup U shield data injection management module 662 cancels the original binding relationship between the original faulty U shield and the identity information, and binds the new backup U shield device to the identity information, activates the backup binding relationship, and implements the switching process of the backup U shield, as shown in step S805. If an exception occurs during the process of injecting data into the backup U shield, a message "U shield data injection failed, U shield switching cannot be performed" is returned, and the error information is recorded in the backup U shield data switching log recording module 664, as shown in step S806.
[0248] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, before controlling the clicker to perform a click operation on the standby U shield in step S703, the following steps are also included:
[0249] Add the switching mapping relationship between the identity information of the corresponding standby U-shield and the faulty U-shield;
[0250] The business information of the standby U shield is updated according to the switching mapping relationship.
[0251] After completing the activation operation of the standby binding relationship between the above-mentioned standby U shield and the identity information of the original faulty U shield, it means that the switching between the standby U shield and the faulty U shield is completed. At this time, the mapping relationship of the identity information of the faulty U shield can be updated in the data platform, that is, the mapping relationship between the identity information and the original faulty U shield is switched to the mapping relationship between the standby U shield, that is, the switching mapping relationship. Through the switching mapping relationship, a data relationship between the standby U shield and the customer corresponding to the identity information is established.
[0252] The data relationship determined by the switching mapping relationship enables the data platform to update information related to the business requirements of the backup U-shield when the customer performs business-related operations, or when the operation and maintenance personnel and testers perform business-related operations.
[0253] In this way, the connection between the backup U-Shield and the business demand information of the customer corresponding to the original faulty U-Shield can be achieved, and the seamless connection of the backup U-Shield with the faulty U-Shield in data update can be achieved.
[0254] like Figure 6-Figure 8 As shown, according to an embodiment of the present disclosure, in step S703, controlling the clicker to perform a click operation on the standby U shield also includes:
[0255] In response to the second test instruction, determining a standby USB shield corresponding to the faulty USB shield according to the switching mapping relationship;
[0256] The control clicker performs a fixed number of click operations on the standby U shield based on a fixed period to perform business tests on business information.
[0257] The second test instruction is instruction data sent by the operation and maintenance personnel or the test personnel to the above system architecture 600 through the terminal device for executing the test on the standby U shield. After receiving the instruction data, the parameters of the automated script need to be updated first, and the U shield number of the standby U shield to be tested is parameterized, so that the system architecture 600 can confirm the standby U shield based on the identity information related to the U shield number according to the above switching mapping relationship.
[0258] Control the clicker corresponding to the U shield equipment placement cabinet where the spare U shield is located to perform a test operation on the spare U shield. Specifically, the clicker performs a fixed number of click operations on the spare U shield based on a fixed period to complete the business test for specific business information.
[0259] Therefore, the above-mentioned U shield testing method according to the embodiment of the present disclosure can have the following technical effects compared with the prior art where the U shield device used fails or is damaged, causing the automated test script execution task to be suspended or failed, and the test efficiency to be low before manual intervention, replacement and recovery:
[0260] (1) Through the above-mentioned highly intelligent and automated method for replacing and restoring a faulty U-shield, intelligent and automatic equivalent replacement of a faulty U-shield device is achieved. The entire process does not require human intervention, thus avoiding the fault recovery cycle caused by the need for human intervention in replacement and recovery when a single U-shield fails in the existing mode.
[0261] (2) It reduces the maintenance workload when the physical USB-shield device is changed and the automated test script is modified, thereby improving the efficiency of automated testing.
[0262] That is, the above method of the embodiment of the present disclosure can realize intelligent automatic data replacement and test recovery, and realize intelligent automatic equivalent replacement of faulty U-shield devices. The entire process does not require human intervention, avoiding the fault recovery cycle caused by the need for manual intervention and replacement recovery when a single U-shield fails in the existing mode, reducing the maintenance workload of modifying automated test scripts and improving automated testing efficiency.
[0263] Fig. 9 A block diagram of a USB shield testing device according to another embodiment of the present disclosure is schematically shown.
[0264] like Fig. 9 As shown, another aspect of the present disclosure provides a USB shield testing device 900, which includes a spare matching module 910, a data injection module 920 and a click control module 930. The spare matching module 910 is used to match a spare USB shield corresponding to the faulty USB shield; the data injection module 920 is used to inject the original data of the faulty USB shield into the spare USB shield; and the click control module 930 is used to control the clicker to perform a click operation on the spare USB shield to complete the test of the spare USB shield.
[0265] It should be noted that Fig. 9 The embodiment of the U-shield testing device 900 shown is similar to the embodiment of the aforementioned U-shield testing method, and the technical effects achieved are also similar, which will not be repeated here.
[0266] Fig.10 The block diagram of the electronic device according to the embodiment of the present disclosure is schematically shown. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0267] Another aspect of the present disclosure provides an electronic device, including one or more processors and a memory; the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method of the embodiment of the present disclosure.
[0268] like Fig.10 As shown, the computer system 1000 according to the embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include an onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0269] In RAM 1003, various programs and data required for the operation of system 1000 are stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other through bus 1004. Processor 1001 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1002 and / or RAM 1003. It should be noted that the program can also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0270] According to an embodiment of the present disclosure, the system 1000 may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The system 1000 may further include one or more of the following components connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0271] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0272] According to an embodiment of the present disclosure, at least one of the coordinate determination module 510, the clicker calling module 520, the operation control module 530, and the backup matching module 910, the data injection module 920, and the click control module 930 can be implemented as a reference. Fig.10 The computer program module described herein, when executed by a processor, can implement the corresponding operations of the U-shield testing method described above.
[0273] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method of the embodiment of the present disclosure when executed.
[0274] Specifically, the computer-readable storage medium may be included in the device / apparatus / system described in the above embodiment; or it may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the USB shield testing method according to the embodiment of the present disclosure is implemented.
[0275] Alternatively, the computer-readable storage medium may be included in the device / apparatus / system described in the above embodiment; or it may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the USB shield testing method according to the embodiment of the present disclosure is implemented.
[0276] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions. When the instructions are executed, they are used to implement the U-shield testing method of the embodiment of the present disclosure.
[0277] So far, the embodiments of the present disclosure have been described in detail with reference to the accompanying drawings.
[0278] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0279] It will be appreciated by those skilled in the art that, although the present disclosure has been shown and described with reference to specific exemplary embodiments of the present disclosure, it will be appreciated by those skilled in the art that, without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents, various changes in form and detail may be made to the present disclosure. Therefore, the scope of the present disclosure should not be limited to the above-described embodiments, but should be determined not only by the appended claims, but also by the equivalents of the appended claims.
[0280] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present disclosure. It should be understood that the above description is only a specific embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.< / config> < / config>
Claims
1. A USB shield testing method, wherein: include: According to the reference coordinate information of the USB interface corresponding to the U shield, the click coordinate information of the U shield is determined, including determining the position offset information of the click position of the U shield relative to the USB interface, and determining the click coordinate information according to the position offset information; the U shield is set in a U shield device placement cabinet, and each U shield device placement cabinet is defined by the horizontal and vertical coordinates according to the setting position of the USB interface; Determine a clicker calling range according to the click coordinate information, and call a clicker that satisfies the clicker calling range; and The clicker is controlled to perform a click operation on the U shield according to the click coordinate information to complete the test of the U shield.
2. The method according to claim 1, wherein: Before determining the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield, the method further includes: Parameterizing the automation script in response to the test instructions to form a parameterized script; Execute the parameterized script to determine the USB shield number of the USB shield.
3. The method according to claim 2, wherein: Before determining the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield, the method further includes: In response to the execution of the parameterized script, generating a click control communication message corresponding to the U-shield according to the U-shield number; In response to the click control communication message, determining a USB interface corresponding to the USB shield; Determine the physical connection relationship between the USB interface and the USB shield according to the current connection state of the USB interface; and The reference coordinate information corresponding to the USB interface is obtained according to the physical connection relationship.
4. The method according to claim 1, wherein: In calling the clicker that satisfies the clicker calling range, it also includes: Determining the current operating state of the clicker; According to the current running state, the clicker is called.
5. The method according to claim 1, wherein: The controlling the clicker to perform a click operation on the U shield according to the click coordinate information includes: Control the clicker to move according to the track formed by the click coordinate information, so that the clicker corresponds to the click position of the U shield; The clicker is controlled to perform a click operation on the click position.
6. The method according to claim 5, wherein: In controlling the clicker to perform the click operation on the click position, the method includes: A fixed number of click operations are performed on the click position of the U shield based on a fixed period.
7. The method according to any one of claims 1 to 6, wherein: Also includes: Record the click operation corresponding to the USB shield to form a click operation log; The click operation log is stored.
8. A U shield testing device, wherein: include: A coordinate determination module, used to determine the click coordinate information of the U shield according to the reference coordinate information of the USB interface corresponding to the U shield, including determining the position offset information of the click position of the U shield relative to the USB interface, and determining the click coordinate information according to the position offset information; the U shield is set in a U shield device placement cabinet, and each U shield device placement cabinet is defined by the horizontal and vertical coordinates according to the setting position of the USB interface; A clicker calling module, configured to determine a clicker calling range according to the click coordinate information, and call a clicker that satisfies the clicker calling range; and The operation control module is used to control the clicker to perform a click operation on the U shield according to the click coordinate information to complete the test of the U shield.
9. An electronic device, wherein: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions, wherein: When the instructions are executed, the instructions are used to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
USB key safety control management system
CN112511484A
USB key button clicking device for automatic business
CN212541280U