USB key test method, device, equipment and medium

By determining the physical connection relationship between the USB interface and the U Shield, obtain the clicter and control its click operation on the U Shield, solve the difficulty of clicking and U -Shield switching in the U Shield Automation test, and achieved efficient automation testing And resource optimization.

CN119377024APending Publication Date: 2025-01-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411471689.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-05-27
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

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 low efficiency of automation testing, large manual verification workload, waste of resources and equipment loss.

Method used

By determining the physical connection relationship between the USB interface and the U Shield, obtain the clicter corresponding to the U Shield, and control the clicks to perform a click operation on the U Shield to achieve the automation test of the U Shield.

Benefits of technology

The automation test based on the actual business testing scenarios is achieved, avoiding invalid -click operation and equipment loss, and improved test efficiency and resource utilization rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377024A_ABST
    Figure CN119377024A_ABST
Patent Text Reader

Abstract

The invention provides a USB key test method, which can be applied to the technical field of information security and big data, and comprises the following steps: determining a physical connection relationship between a USB interface and a USB key; acquiring a click corresponding to the USB key according to the physical connection relationship; and controlling the click device to perform click operation on the USB key so as to complete the test of the USB key. Therefore, the corresponding relation between the clicker and the to-be-tested USB key is established based on an actual service test scene, repeated, uninterrupted and undifferentiated physical click operation which is uncontrolled by clicking the peripheral module is avoided, the problems of invalid click operation and equipment loss and damage are prevented, accurate execution of the click operation is ensured, and the user experience is improved. The purposes of reducing equipment loss and reducing resource waste are achieved, and the automation degree and the intelligence degree are higher. In addition, the invention further provides a USB key testing device, electronic equipment and a computer readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the parent application is 202110588000.8. The application date is May 27, 2021. The name of the invention is: U-Shield testing method, device, equipment and medium. Technical Field

[0002] 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

[0003] 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

[0004] 1. Technical issues to be resolved

[0005] 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.

[0006] (II) Technical solution

[0007] One aspect of the present disclosure provides a U-shield testing method, which includes: determining the physical connection relationship between a USB interface and the U-shield; obtaining a clicker corresponding to the U-shield according to the physical connection relationship; and controlling the clicker to perform a click operation on the U-shield to complete the test of the U-shield.

[0008] According to an embodiment of the present disclosure, before determining the physical connection relationship between the USB interface and 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.

[0009] According to an embodiment of the present disclosure, before determining the physical connection relationship between the USB interface and 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.

[0010] According to an embodiment of the present disclosure, in determining the physical connection relationship between the USB interface and the U shield, it includes: determining the USB interface corresponding to the U shield in response to a click control communication message; and judging the physical connection relationship according to the current connection status of the USB interface.

[0011] According to an embodiment of the present disclosure, in obtaining a clicker corresponding to the U-Shield based on a physical connection relationship, it includes: determining a physical interface number of the USB interface based on the physical connection relationship; and obtaining a clicker corresponding to the U-Shield through the physical interface number and preset clicker setting rules.

[0012] According to an embodiment of the present disclosure, in obtaining a clicker corresponding to the U-Shield through the physical interface number and the preset clicker setting rules, it also includes: determining the current operating state of the clicker according to the physical interface number and the preset clicker setting rules; and determining the clicker corresponding to the U-Shield based on the current operating state.

[0013] According to an embodiment of the present disclosure, controlling a clicker to perform a click operation on a U-shield includes: performing a fixed number of click operations on 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 connection determination module, a clicker acquisition module and a click control module. The connection determination module is used to determine the physical connection relationship between the USB interface and the USB shield; the clicker acquisition module is used to obtain a clicker corresponding to the USB shield according to the physical connection relationship; and the click control module is used to control the clicker to perform a click operation on the USB shield 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 physical connection relationship between the USB interface and the U-shield; obtaining a clicker corresponding to the U-shield according to the physical connection relationship; and controlling the clicker to perform a click operation on the U-shield to complete the test of the U-shield. Therefore, it is achieved that based on the actual business test scenario, the corresponding relationship between the clicker and the U-shield to be tested is established, avoiding the uncontrolled repeated, uninterrupted, and indiscriminate physical click operations of the clicking peripheral module, preventing invalid click operations and equipment loss and damage, ensuring the accurate execution of the click operation, achieving the purpose of reducing equipment loss and reducing resource waste, and having a higher degree of automation and intelligence. 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 Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0025] Figure 5 Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0026] Figure 6 Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0027] Fig. 7A Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0028] Figure 7B Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0029] Figure 7C Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0030] Fig.7DAnother flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0031] Figure 8 Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0032] Fig. 9 Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0033] Fig.10 Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0034] Fig.11 Another flowchart of the USB shield testing method according to an embodiment of the present disclosure is schematically shown;

[0035] Fig.12 An application scenario diagram of the above-mentioned U-shield testing method according to an embodiment of the present disclosure is schematically shown;

[0036] Fig.13 A block diagram of a U-shield testing device according to an embodiment of the present disclosure is schematically shown;

[0037] Fig.14 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;

[0038] Fig.15 A flowchart of a USB shield testing method according to another embodiment of the present disclosure is schematically shown;

[0039] Fig.16 An application scenario diagram applied to the above-mentioned U-shield testing method according to another embodiment of the present disclosure is schematically shown;

[0040] Fig.17 A block diagram schematically shows a U-shield testing device according to another embodiment of the present disclosure; and

[0041] Fig.18 A block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0042] 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.

[0043] 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.

[0044] 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.

[0045] 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.).

[0046] 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 used in conjunction with an instruction execution system.

[0047] 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.

[0048] 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 efficiently implement automated testing. 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.

[0049] <Example 1>

[0050] Among them, the existing automated testing scenarios involving USB shields mainly face two problems:

[0051] (1) Clicking operation of 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 realize the operation of the physical buttons on the USB shield.

[0052] (2) Switch the currently used USB shield. However, in current practical work, this operation can only be achieved by manually plugging and unplugging the USB shield.

[0053] In response to the above technical issues, for example, for corporate customers, they need to complete a multi-level combined authorization process for the purchase and withdrawal of "weekly dividend ultra-short-term corporate RMB wealth management products". The process includes the following four steps, namely operation 1-wealth management product purchase, operation 2-purchase authorization, operation 3-purchased share redemption and operation 4-redemption authorization. Among them, operations 1 and 3 are performed by the wealth management purchaser (customer) using the submission U-shield, and operations 2 and 4 are performed by the approver using the approval U-shield. Therefore, to complete the test of this business transaction process, manual operations of switching and clicking the U-shield are required in each step, and the U-shield medium must be plugged in and out and the U-shield confirmation key must be clicked 4 times in the entire process.

[0054] It can be seen that for the above business scenarios, there are mainly two automation implementation methods in the existing automated testing technology:

[0055] The first method is to prepare 4 computers, plug in the corresponding U shield on each computer, compile 4 scripts, connect them into a test scenario, and then schedule and implement them through the automated execution scheduling platform.

[0056] The second method is to complete the testing of all transactions on one execution machine.

[0057] However, it should be noted that since U-Shield is a way to securely authenticate user identities, each U-Shield can only store the digital certificate identity information of one customer. Therefore, in each round of testing, the functions of different customer types and transaction paths need to be verified. Therefore, in the actual operation process, the first test method mentioned above requires more test equipment to be prepared, and the resource utilization rate of computer equipment is low. Compared with the effect produced by automated test verification, the resource demand for the test execution environment has a relatively low input-output ratio. Therefore, it is feasible in theory but difficult to implement in the actual operation process. The second test method mentioned above requires manual intervention by the tester to manually plug and unplug the U-Shield. The manual operation process requires intervention four times, and the plug-in and replacement of the U-Shield is completed, which causes the test to be interrupted during the operation. That is, this method cannot achieve unattended automated execution of the entire process.

[0058] Therefore, this results in low test execution efficiency for such business transactions under the existing testing technology model. In an environment where the pace of version releases is accelerating, manual execution of testers is put under great pressure, which can easily lead to missed tests or failure to verify coverage in a timely manner due to version cycles, tasks, and other reasons.

[0059] 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.

[0060] It should be noted that the U-Shield testing method and U-Shield testing 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 disclosed in the present disclosure is not specifically limited.

[0061] 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.

[0062] 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.

[0063] 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 main 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 main server M of the server system 120 can be located in an external network. In this case, the cloud network server C is used here as a medium for providing a communication link between other terminal devices 111, 112, 113, 114 and 115. The data transmission channel between the server system 120 and 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.

[0064] 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.

[0065] 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).

[0066] 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.

[0067] 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 the request can pass, thereby filtering or blocking unsafe factors.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] like Figure 2 As shown, the system architecture 200 is used to implement the U shield test method of the embodiment of the present disclosure, and specifically includes: an execution machine pool 210, a test control module 220, a physical U shield module 230, and a U shield physical button click module 240. Among them, the test control module 220 includes: an execution machine external device management module 221, a U shield data switching routing module 222, a U shield device connection module 223, a U shield information management module 224, etc.

[0072] In addition, the physical U shield module 230 includes multiple physical U shields 1-n to be tested, which can be connected one-to-one with multiple USB interfaces of the U shield device connection module 223. The execution machine pool 210 includes multiple execution machines 1-n, each of which has a control function to implement the test of each connected U shield to be tested.

[0073] The U shield data switching routing module 222 can be used to receive the U shield usage instruction issued by the execution machine external device management module 221, query the connectivity status of the USB interface in the U shield routing configuration table, and complete the connection and interruption of the USB interface, U shield routing initialization, U shield physical connection reset, and synchronization of U shield and USB interface information according to different situations. Finally, the U shield physical button click module 224 completes the periodic artificial simulation click operation of the physical U shield device. Among them, the specific content of the U shield routing configuration table can be referred to the content described below.

[0074] The U shield device connection module 223 can be used to establish a mapping relationship between a USB interface and a physical U shield. The U shield device connection module 223 includes multiple USB interfaces 1-n, each USB interface is connected to a physical U shield device, and each USB interface is numbered according to the different USB interfaces. A mapping table between the USB interface and the physical U shield device is formed according to the number of the USB interface and the U shield number of the physical U shield device inserted into the interface, as shown in Table 1 below.

[0075] USB interface logical number USB Shield Number USB-QY-01 5300016804 USB-QY-02 5300016861 …… ……

[0076] Table 1

[0077] Therefore, as shown in Table 1 above, for example, the USB interface 1 and the USB interface 2 are numbered USB-QY-01 and USB-QY-02 respectively, and the USB shield numbers of the physical USB shields inserted into the USB interface 1 and the USB interface 2 are 5300016804 and 5300016861 respectively, then a mapping table of USB-QY-01 and 5300016804, USB-QY-02 and 5300016861 is formed.

[0078] The U shield information management module 224 is used to store and 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 information maintenance functions. Among them, the business purpose information mainly includes the following information items: U shield number, U shield brand, U shield ID certificate number, U shield category, U shield purpose and USB interface logical number, etc. For details, please refer to the following Table 2.

[0079]

[0080] Table 2

[0081] The USB interface logic number corresponding to the U-shield number is synchronized with the U-shield device connection module 223 through the "update physical U-shield connection" message sent by the external device management module 221 of the execution machine.

[0082] The execution machine external device management module 221 is used to interact with the U shield data switching routing module 222, and send U shield usage communication message information to the U shield data switching routing module 222 according to different business processes. Among them, the U shield usage communication message information includes U shield number, operation instruction, sending time, execution machine name, sending IP and other contents. The specific message format can refer to the following message instruction information:

[0083]

[0084]

[0085] It can be seen that the above exemplary U-Shield usage communication message information includes U-Shield number 5300016804, operation instructions, sending time 2021 / 3 / 12 15:12:12, executor name Ukeytest01, sending IP address 83.25.10.12 and other information.

[0086] Among them, the operation instructions may include creating a new USB interface connection, releasing a USB interface connection, initializing the U-shield routing configuration, resetting the physical U-shield connection, and updating the physical U-shield connection. When the corresponding mark bits are 01, 02, 03, 04, and 05 respectively, the operation instruction 01 in the above-mentioned U-shield communication message information is to create a new USB interface connection.

[0087] Specifically, a new USB interface connection indicates that a connection is established between the execution machine and the corresponding USB interface; releasing the USB interface connection indicates that the execution machine and the corresponding USB interface are disconnected; initializing the U-shield routing configuration indicates restoring the initialization settings of the U-shield routing configuration table in the U-shield data switching routing module 222; resetting the physical U-shield connection means powering off all USB interfaces for 10 seconds and then powering them back on, resetting all U-shield physical connections; updating the physical U-shield connection means that when the U-shield connected to the physical USB interface is plugged in or switched, the mapping relationship between the USB interface and the physical U-shield is updated to the U-shield device connection module 223, and synchronized to the U-shield information management module 224.

[0088] The U-shield data switching routing module 222 can be used to receive the U-shield usage communication message information sent from the execution machine external device management module 221, perform corresponding operations according to the U-shield usage communication message information, and manage and maintain the U-shield routing configuration table.

[0089] Among them, the U shield routing configuration table includes fields such as the physical number of the USB interface, the logical number of the USB interface, the connection status, the start time, the end time, the name of the currently occupied execution machine, the IP of the currently occupied execution machine, etc. Further, according to the U shield number and operation instructions in the above-mentioned U shield communication message, the mapping table information between the USB logical interface number and the physical U shield number in the U shield information management module 224, and the USB interface physical number and USB interface logical number information in the U shield routing configuration table, the connection between the execution machine and the corresponding USB physical interface is established or interrupted, and the connection status, start time, end time, the name of the currently occupied execution machine, the IP of the currently occupied execution machine, etc. fields are synchronously updated to the U shield routing configuration table, as shown in Table 3 below.

[0090]

[0091] Table 3

[0092] Finally, the U-shield physical button click module 240 is used to implement the click operation on the physical "OK" button of the U-shield device. Taking 16 U-shield device click boxes as an example, the U-shield physical button click module 240 can support the click operation on the physical OK buttons of 16 U-shields. The U-shield physical button click module 240 completely simulates human manual clicks to operate the U-shield device, ensuring high restoration of business scenarios.

[0093] Among them, it needs to be further explained that in order to avoid the problem of insufficient power supply when multiple U-shiels are connected, a +5V power supply input is added to the U-shield device connection module.

[0094] The following combination Figure 3-Figure 13 and Fig.18 , 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.

[0095] Figure 3 The flowchart of the USB-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0096] like Figure 3 As shown, one aspect of the present disclosure provides a U-shield testing method, which includes steps S301-S303.

[0097] In step S301, the current state of the USB interface is determined;

[0098] In step S302, when the current state is an idle state, a connection relationship between the execution machine and the USB interface is established; and

[0099] In step S303, the USB shield is tested according to the connection relationship.

[0100] like Figure 2 As shown, for the U shield device connection module 223, each USB interface it has has different logical connection states and physical connection states. Among them, the physical connection state is the connection state under the physical state of the slot where the USB interface is located and the plug of the U shield, and the logical connection state is the logical connection state that can be used for data transmission formed between the execution machine, the USB interface and / or the U shield. Therefore, in certain cases, when the USB interface and the U shield have a physical connection state, there may not be a corresponding logical connection state between the two, and the corresponding data transmission function cannot be realized. Therefore, in the case of only having a physical connection state, the execution machine corresponding to the U shield cannot realize the test control of the U shield. On the other hand, when the U shield plug is physically disconnected from the slot corresponding to the USB interface, at least there may still be a logical connection state between the USB interface and the execution machine. At this time, when the new U shield to be tested is inserted into the USB interface, the current connection state of the USB interface is likely to still be the data transmission state between the execution machine corresponding to the previously inserted U shield.

[0101] Therefore, when the USB interface into which the tested USB shield is inserted is still in data connection with the execution machine corresponding to the previously inserted USB shield, the current state of the USB interface is occupied. Otherwise, it is vacant.

[0102] Only when the USB interface into which the U-shield to be tested is inserted and the executing machine corresponding to the U-shield previously inserted into the USB interface are out of data connectivity, a new connection establishment instruction corresponding to the USB interface can be generated, and at the same time, in response to the test application-related instructions corresponding to the U-shield to be tested, a connection relationship between the executing machine and the inserted USB interface corresponding to the U-shield to be tested is established. The connection relationship can be understood as a logical connectivity relationship for the above-mentioned data transmission. At this time, the USB interface and the executing machine corresponding to the U-shield to be tested are in the above-mentioned logical connectivity state and are in the occupied state again.

[0103] When the USB interface into which the above-mentioned U-shield to be tested is inserted is in a logical connection state of the execution machine corresponding to the U-shield, the execution machine can be used to control the execution of corresponding test application related instructions, so that the execution machine can perform U-shield test operations on the USB interface.

[0104] It can be seen that the testing method of the U-Shield in the above-mentioned embodiment of the present invention solves the problem that in the process of testing transactions involving the use of U-Shield, the existing testers need to switch multiple U-Shield media in one transaction, but the existing test mode limitations make it impossible to automate the entire process, resulting in a large manual execution workload. The device disclosed in the present invention realizes the automation of switching multiple U-Shield media, improves the test execution efficiency, and reduces the problem of test transactions not being verified and covered in time due to problems such as large manual verification workload and tight version cycle.

[0105] Therefore, based on the actual business test scenario, the connection relationship between the execution machine and the U-Shield to be tested is automatically and flexibly established, avoiding the manual plug-in and switch of the U-Shield to be tested and manual clicking of the U-Shield, greatly improving the efficiency of U-Shield test execution, reducing manual verification operations, and achieving a higher level of automation and intelligence.

[0106] Fig.12 The following schematically shows an application scenario diagram of the above USB shield testing method according to an embodiment of the present disclosure. It should be noted that: Fig.12 What is shown is only an application example of a scenario in which the embodiment 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 embodiment of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0107] Figure 4 Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0108] like Figure 4 As shown, according to an embodiment of the present disclosure, before step S301 determines the current state of the USB interface, steps S401-S402 are also included.

[0109] In step S401, the automation script is parameterized to form a parameterized script;

[0110] In step S402, the corresponding USB interface logical number is determined according to the USB shield number of the USB shield in the parameterized script.

[0111] 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.

[0112] Before obtaining the current state of the USB interface into which the U shield is inserted, it is necessary to determine the corresponding execution machine of 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 physical U shield are physically connected respectively through the U shield data switching routing module 222, that is, the USB interface and the U shield are in a physically connected state.

[0113] After the physical connection between the USB interface, the execution machine and the physical U-shield is achieved, 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 U-shield information management module 224.

[0114] In this way, the USB interface corresponding to the execution machine can be uniquely determined before obtaining the current state of the USB interface.

[0115] Figure 5 Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0116] like Figure 5 As shown, according to an embodiment of the present disclosure, in step S301, determining the current state of the USB interface includes steps S501-S502.

[0117] In step S501, in response to the determination of the USB interface logic number, a USB shield use application instruction is generated;

[0118] In step S502, based on the application instruction, the current state of the corresponding USB interface is queried.

[0119] like Fig.12 In step S1201, after obtaining the logical number of the USB interface, the external device management module 221 of the executor will generate a command message for applying for the use of the U-shield, and send the command message to the U-shield data switching routing module 222 in the form of an application instruction. After receiving and executing the application instruction, the U-shield data switching routing module 222 will perform a USB interface query operation on the U-shield routing configuration table in the U-shield data switching routing module 222 according to the USB interface logical number contained in the application instruction, and then determine whether the current state of the USB interface corresponding to the USB interface logical number is vacant or occupied, as shown in FIG. Fig.12 The process of determining whether the USB interface is occupied in step S1202 is shown.

[0120] Therefore, with the help of the U-Shield routing configuration table, the current status of the USB interface can be determined more quickly and effectively.

[0121] Figure 6 Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0122] like Figure 6 As shown, according to an embodiment of the present disclosure, in step S302, when the current state is an idle state, establishing a connection relationship between the execution machine and the USB interface includes steps S601-S602.

[0123] In step 601, the physical number of the USB interface is determined according to the logical number of the USB interface;

[0124] In step 602, a data path is formed between the execution machine and the USB interface through the physical number of the USB interface to establish a connection relationship.

[0125] like Fig.12 In step S1203, when it is confirmed that the current state of the USB interface is vacant, that is, the USB interface is not occupied, the U-shield routing configuration table is queried through the USB interface logical number to obtain the USB interface physical number. The execution machine applied for by the U-shield can be controlled based on the USB interface physical number to establish a data path with the USB interface, thereby forming a logical connectivity relationship between the USB interface and the execution machine, constituting a substantial interconnection, that is, the connection relationship satisfies both the physical connection state and the logical connectivity state.

[0126] Therefore, when the execution machine of the embodiment of the present disclosure is controlled to execute the test instruction of the USB shield, it can directly perform the test operation on the USB shield through the connection relationship between the execution machine and the USB interface.

[0127] According to an embodiment of the present disclosure, when the current state is an idle state, in step S302, establishing a connection relationship between the execution machine and the USB interface further includes: updating test information corresponding to the USB interface.

[0128] like Fig.12 As shown in step S1208, when establishing a connection relationship of a logical connectivity state between the execution machine and the USB interface, the U-shield data switching routing module 222 can be further controlled to update the test information related to the occupied USB interface in the U-shield routing configuration table, such as the execution machine name, execution machine IP, start time and other information in the current occupied state.

[0129] At this point, the U-Shield has established a physical and logical connection with the corresponding execution machine, and subsequent test interaction operations can be carried out based on this.

[0130] Fig. 7A Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0131] like Fig. 7A As shown, according to an embodiment of the present disclosure, after determining the current state of the USB interface in step S301, steps S701-S702 are further included.

[0132] In step S701, when the current state is an occupied state, the occupied time of the occupied state is determined;

[0133] In step S702, the occupancy status is updated according to the occupancy time.

[0134] like Fig.12 In steps S1204 and S1208, when it is confirmed that the current state of the USB interface is occupied, that is, the logical connection state of the USB interface is a connection relationship with the original execution machine, the current occupied time of the occupied state is determined, that is, the time the logical connection relationship between the USB interface and the original execution machine is maintained. The U-shield data switching routing module 222 is controlled to use the occupied time as the update data and perform status update in the U-shield routing configuration table, so that the occupancy information recorded in the occupied state is real-time information, which is conducive to determining the end of the current occupied state of the USB interface and the beginning of the vacant state.

[0135] Figure 7B Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0136] like Figure 7B As shown, according to an embodiment of the present disclosure, in step S702 , the occupancy status is updated according to the occupancy time, including steps S710 - S720 .

[0137] In step S710, when the occupancy time exceeds the set threshold time, the current connection relationship of the USB interface is disconnected;

[0138] In step S720, in response to the disconnection of the current connection relationship, the current state of the USB interface is updated to an idle state.

[0139] like Fig.12In steps S1204 and S1205 shown, when the occupancy time corresponding to the current occupancy state of the USB interface in the U-shield routing configuration table exceeds the preset threshold time, the execution machine in the current occupancy state with the USB interface is controlled to disconnect the logical connection relationship, so that the current connection relationship of the USB interface is disconnected. At the same time, the U-shield data switching routing module 222 can also respond to the end of the current connection relationship of the USB interface and update the current state of the USB interface to an empty state in the U-shield routing configuration table. Therefore, the current state of the USB interface can be updated in real time to facilitate the judgment of the timing of establishing the connection relationship between the USB interface and the new execution machine, so as to speed up the test progress and save test time.

[0140] Figure 7C Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0141] like Figure 7C As shown, according to an embodiment of the present disclosure, in step S710, when the occupancy time exceeds the set threshold time, the current connection relationship of the USB interface is disconnected, including steps S711-S712.

[0142] In step S711, when the occupancy time exceeds the set threshold time, a USB interface release instruction is generated;

[0143] In step S712, a USB interface release instruction is executed to disconnect the closed path between the USB interface and the corresponding execution machine, so that the current connection relationship is disconnected.

[0144] When the occupancy time exceeds the set threshold time, the disconnection operation of the current connection relationship of the USB interface is specifically performed as follows: when the original execution machine ends its use of the USB interface, it can actively generate a USB interface release instruction for executing the disconnection of the USB interface connection relationship based on the above-mentioned occupancy timeout judgment result, and the execution machine external device management module 221 issues a USB interface connection release instruction, and the U-shield data switching routing module 222 disconnects the closed logical path established between the data of the physical interface and the access port corresponding to the original execution machine, and updates the current status information of the USB interface in the U-shield routing configuration table, so that the connection status of the USB interface is vacant.

[0145] Fig.7D Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0146] like Fig.7D As shown, according to an embodiment of the present disclosure, in step S702 , updating the occupancy status according to the occupancy time includes steps S721 - S722 .

[0147] In step S721, when the occupancy time does not exceed the set threshold time, the current connection relationship of the USB interface is maintained;

[0148] In step S722, in response to maintaining the current connection relationship, the current state of the USB interface is updated to a disabled state.

[0149] like Fig.12 In step S1206, when the current occupied state of the USB interface in the U-shield routing configuration table has not exceeded the preset threshold time, the original execution machine is controlled to maintain the current connection relationship with the USB interface. At the same time, a corresponding feedback message is generated, so that the current state of the USB interface in the U-shield routing configuration table is updated to a disabled state, that is, the USB interface is still occupied and cannot be used.

[0150] Figure 8 Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0151] like Figure 8 As shown, according to an embodiment of the present disclosure, after determining the current state of the USB interface in step S301, steps S801-S802 are further included.

[0152] In step S801, when the current state is the reset state, a reset physical USB shield connection instruction is generated;

[0153] In step S802, in response to the physical USB shield connection instruction, the USB interface is powered on again after the power-off time is set, thereby completing the resetting of the physical connection of the USB shield.

[0154] In some cases, the U-shield device connection module 223 may cause the abnormal problem that some U-shield prompt software cannot be reset due to long-term connection to the U-shield. At this time, the current state corresponding to the USB interface will automatically enter the reset state. In this reset state, a connection instruction for resetting the physical U-shield connection can be generated. The reset physical U-shield connection instruction is forwarded to the U-shield data switching routing module 222 for execution through the executor external device management module 221, so that the U-shield device connection module 223 can re-power on all USB interfaces after a set power-off time (such as a power-off of 10 seconds) to reset the U-shield physical connection relationship between all U-shields and USB interfaces, so that the U-shield device connection module 223 can solve the above-mentioned abnormal problem that some U-shield prompt software cannot be reset, so as to ensure the smoothness of the entire U-shield testing process.

[0155] Fig. 9 Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0156] like Fig. 9As shown, according to an embodiment of the present disclosure, after determining the current state of the USB interface in step S301, steps S901-S902 are further included.

[0157] In step S901, when the current state is the reset state, an initialization U-shield routing configuration instruction is generated;

[0158] In step S902, in response to the initialization U-shield routing configuration instruction, the test information of the U-shield is reset.

[0159] When the current state of the USB interface is the reset state, it is necessary to reset the connection process of all execution machines and U shield devices. Specifically, the execution machine external device management module 221 can issue an initialization U shield routing configuration instruction. When the instruction is executed by the U shield data switching routing module 222, the test information in the U shield routing configuration table, such as the execution machine IP, execution machine name, start time, connection status and other fields, can be reset to empty. In the reset state, the connection relationship between all execution machines and U shield devices can be reset to facilitate the subsequent test execution of different services of the U shield.

[0160] Fig.10 Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0161] like Fig.10 As shown, according to an embodiment of the present disclosure, in step S303, the U shield is tested according to the connection relationship, including steps S1001-S1002.

[0162] In step S1001, according to the connection relationship, it is determined that the execution machine sends simulated click data to the clicker of the corresponding U shield;

[0163] In step S1002, the clicker is controlled to simulate clicking on the USB shield according to the simulated click data, thereby completing the test of the USB shield.

[0164] According to the physical connection relationship and logical connectivity relationship determined between the execution machine and the USB interface, the test operation data generated by the execution machine can be further sent to the clicker connected to the U shield through the logical data transmission channel established by the connection relationship, and the click position of the clicker is directly opposite to the button setting of the U shield. Among them, the USB interface with the current connection relationship with the execution machine is inserted and connected to the U shield to be tested.

[0165] Furthermore, the simulated click data includes information about the preset regularity of the click operation that the clicker can perform, such as the click time, the number of clicks, the click cycle, and the time when the click ends, so as to determine that when the data is executed by the clicker, the click operation of the preset regularity can be performed on the USB shield to be tested. In this way, the test of the USB shield can be completed efficiently and accurately.

[0166] Fig.11 Another flow chart of the U-shield testing method according to an embodiment of the present disclosure is schematically shown.

[0167] like Fig.11 As shown, according to an embodiment of the present disclosure, after determining the current state of the USB interface in step S301, steps S1101-S1102 are further included.

[0168] In step S1101, in response to the physical access change information of the USB shield, a physical USB shield connection update instruction is generated;

[0169] In step S1102, the test information of the corresponding USB interface is updated according to the physical USB shield connection update instruction.

[0170] like Fig.12 As shown in step S1209, when the physical U shield access information in the U shield device connection module 223 changes, the physical U shield connection update instruction for updating the physical U shield connection can be issued through the executor external device management module 221, and the test information in the mapping table of the USB interface and the physical U shield device in the U shield device connection module 223 is updated, and synchronized to the U shield information management module 224 at the same time. Among them, the test information may include various data related to the U shield test, such as the executor name, USB interface, clicker name, and regular information of preset click operations. Therefore, it is possible to update and improve the test information of each U shield, so that the data in the U shield information management module 224, which is a data storage module, is more immediate and effective, so as to ensure that the subsequent U shield test process is fast, accurate, and efficient.

[0171] It can be seen that through the U-Shield testing method of the embodiment of the present disclosure, unified management and fully automated access services can be provided for the physical U-Shield and other media used during the automated testing process, which solves the problem of manual U-Shield plugging and unplugging when switching the U-Shield, resulting in interruption of automated execution, and improves the efficiency of automated testing.

[0172] Furthermore, the U-Shield testing method of the disclosed embodiment solves the problem that the physical buttons of the U-Shield need to be manually clicked one by one during the original automated testing process. By clicking in batches one by one, the automatic clicking of the buttons of the U-Shield is achieved.

[0173] Fig.13 A block diagram of a U-shield testing device according to an embodiment of the present disclosure is schematically shown.

[0174] like Fig.13As shown, another aspect of the present disclosure provides a USB shield testing device 1300, which includes a state determination module 1310, a connection establishment module 1320 and a USB shield testing module 1330. The state determination module is used to determine the current state of the USB interface; the connection establishment module is used to establish a connection relationship between the execution machine and the USB interface when the current state is an empty state; and the USB shield testing module is used to test the USB shield according to the connection relationship.

[0175] It should be noted that Fig.13 The embodiment of the U-shield testing device 1300 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.

[0176] <Example 2>

[0177] As mentioned in the above embodiments, the existing automated testing scenarios involving U-shields mainly face two problems: (1) Clicking operations on physical buttons on the U-shield device. In this regard, the usual solution is to use a physical peripheral solution to repeatedly and uninterruptedly click the physical buttons on the U-shield through an external device during the entire transaction to implement the operation of the U-shield physical buttons. (2) Switching operations on the U-shield currently in use. However, in current actual work, this operation can only be achieved by manually plugging and unplugging the U-shield, or by developing a U-shield routing connection module.

[0178] However, in the current mode, the method of using physical peripherals to continuously click the physical buttons on the U-Shield is not targeted. Even if there are only a few U-Shields that need to be clicked in a certain period of time, all U-Shield devices are in a clicked state, resulting in a huge amount of invalid click operations, resulting in a waste of resources such as electricity and unnecessary equipment loss. In particular, more U-Shield buttons will be damaged due to multiple clicks, wasting test resources.

[0179] 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, device, electronic device and computer-readable storage medium.

[0180] 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.

[0181] Fig.14 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.

[0182] like Fig.14 As shown, the system architecture 1400 includes main modules such as an execution machine pool 1410, an execution machine external device management module 1420, a U-shield device routing connection module 1430, a U-shield click management module 1440, a physical U-shield module 1450 and a clicker pool 1460. The execution machine pool 1410 includes multiple execution machines 1-n, wherein when each execution machine executes the step in the automation script that requires a U-shield click, the execution machine external device management module 1420 sends a U-shield click control communication message to the click instruction processing submodule 1441 of the U-shield click management module 1440 and the U-shield information management submodule 1431 of the U-shield device routing connection module 1430, and the U-shield information management submodule 1431 receives the message and parses it, and searches the routing configuration table of the U-shield data switching routing submodule according to the U-shield number in the message for the USB interface number corresponding to the U-shield, and at the same time, the click instruction processing submodule 1441 receives the message and the above-mentioned USB interface number and parses it, and finds the clicker number corresponding to the physical U-shield in the clicker configuration information management submodule 1442 of the U-shield click management module 1440 according to the USB interface number in the message, and then the click operation control submodule 1443 of the U-shield click management module 1440 controls the corresponding clicker to complete the U-shield click operation. Furthermore, the click operation log recording submodule 1444 of the U-shield click management module 1440 completes the log recording operation in the entire process.

[0183] In addition, the physical U shield module 1450 includes multiple physical U shields 1-n to be tested, which can be connected one-to-one with multiple USB interfaces of the U shield device routing connection module 1430. The multiple execution machines 1-n of the execution machine pool 210, each of which has the function of controlling and implementing the test of each connected U shield to be tested. In addition, the clicker pool 1460 includes multiple clickers for being controlled to perform simulated click operations on the above-mentioned multiple U shields 1-n. The multiple clickers are set in one-to-one correspondence with the multiple U shields to be tested. When the corresponding clicker executes the click operation instruction, the corresponding U shield to be tested is clicked, so that the U shield completes the test click.

[0184] The clicker configuration information management submodule 1442 has a mapping table of clicker numbers and USB interface numbers, as shown in Table 4 below.

[0185] USB port number Clicker No. USB-QY-01 Ukey-Click-01 USB-QY-02 Ukey-Click-02 …… ……

[0186] Table 4

[0187] The execution machine external device management module 1420 can be used to send U-shield usage communication message information to the U-shield device routing connection module 1430 according to different business processes, and is also responsible for sending U-shield click control communication message information to the U-shield click management module 1440. Among them, the U-shield usage communication message information includes U-shield number, operation instruction, sending time, execution machine name, sending IP and other contents. For details, please refer to the following message instruction information:

[0188] <? xml version="1.0" encoding="UTF-8"? >

[0189] <config>

[0190] <ukeyid> 5300016804< / ukeyid>

[0191] <frequency> 3< / frequency>

[0192] <interval> 2< / interval>

[0193] <machine-name> Ukeytest01< / machine-name>

[0194] <ip> 83.25.10.12< / ip>

[0195] <sendtime> 2021 / 3 / 12 15:12:12< / sendtime>

[0196] <config>

[0197] It can be seen that the above exemplary U shield communication message information includes the execution machine name Ukeytest01, U shield number 5300016804, sending time 2021 / 3 / 12 15:12:12, sending IP address 83.25.10.12, number of clicks 3, click interval 2, etc. Among them, the operation instructions can include creating a new USB interface connection, releasing a USB interface connection, initializing U shield routing configuration, resetting a physical U shield connection, updating a physical U shield connection, etc.

[0198] The U shield device routing connection module 1430 can be used to establish a physical connection path between the automated execution machine 1-n and the U shield device 1-n, and to transmit instructions. The U shield device routing connection module 1430 is mainly composed of a U shield information management submodule 1431, a U shield device connection submodule 1433, and a U shield data switching routing submodule 1432. Among them, the U shield information management submodule 1431 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 maintenance functions; the U shield device connection submodule 1433 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 1432 is mainly used to receive the U shield usage communication message information sent from the execution machine external device management module 1420, establish or interrupt the connection between the execution machine 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 of the U shield device routing connection module 1430.

[0199] The U shield click management module 1440 is mainly used to receive the U shield click operation instruction submitted by the execution machine, and control the corresponding clicker to click the specified U shield according to the click operation instruction. The U shield click management module 1440 is mainly composed of a click instruction processing submodule 1441, a clicker configuration information management submodule 1442, a click operation control submodule 1443 and a click operation log recording submodule 1444. Among them, the click instruction processing submodule 1441 is mainly used to receive the U-shield click control communication message sent by the execution machine external device management module 1420, and parse and process the message instruction; the clicker configuration information management submodule 1442 is mainly used to store the corresponding mapping relationship between the clicker and the physical U-shield; the click operation control submodule 1443 is mainly used to operate the specified clicker to click the corresponding U-shield according to the click instruction; the click operation log recording submodule 1444 is mainly used to record the click operation log of the clicker, which mainly includes the execution machine name, U-shield number, execution machine IP, click operation start time, click operation number and click interval time and other information, which can be specifically referred to the content shown in Table 5 below.

[0200]

[0201] Table 5

[0202] According to the system architecture 1400 of the above-mentioned embodiment of the present disclosure, the U-shield testing method of the embodiment of the present disclosure can automatically and flexibly establish a connection between the execution machine and the U-shield and realize controllable button clicks on the physical U-shield device according to actual business testing requirements, thereby avoiding generating a large number of invalid click operations, resulting in waste of resources such as electricity and unnecessary equipment loss.

[0203] The following combination Figure 15-18 , 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.

[0204] Fig.15 The following schematically shows a flow chart of a USB-shield testing method according to another embodiment of the present disclosure.

[0205] One aspect of the present disclosure provides a USB shield testing method, which includes steps S1501-S1503.

[0206] In step S1501, the physical connection relationship between the USB interface and the USB shield is determined;

[0207] In step S1502, a clicker corresponding to the USB shield is obtained according to the physical connection relationship; and

[0208] In step S1503, the clicker is controlled to perform a click operation on the USB shield to complete the test of the USB shield.

[0209] like Fig.14 As shown, for the U shield device routing connection module 1430, each USB interface has different logical connectivity states and physical connection states. Among them, the physical connection relationship is the physical correspondence between the physical connection state of the slot where the USB interface is located and the physical state realized by the plug of the U shield, that is, the USB interface is inserted into the U shield to be tested, realizing the physical correspondence between the USB interface and the U shield to be tested. In addition, according to the physical correspondence, the physical connection relationship can also further include the logical connectivity relationship between the U shield and the USB interface to realize the logical correspondence between the U shield and the USB interface.

[0210] In the embodiments of the present disclosure, based on the physical connection relationship between the USB interface and the U shield, combined with the logical correspondence between the USB interface and the clicker, a connection relationship between the clicker and the U shield can be established, and then based on the identity information of the USB interface, the preset mapping rules between the USB interface and the clicker are queried and the clicker corresponding to the U shield is obtained.

[0211] Specifically, if Fig.14 As shown, the click instruction processing submodule 1441 receives the U-shield communication message information and the USB interface number and then parses them, and finds the clicker number corresponding to the physical U-shield in the clicker configuration information management submodule 1442 according to the USB interface number in the message, and then the click operation control submodule 1443 controls the corresponding clicker to complete the U-shield click operation.

[0212] Therefore, based on the actual business test scenario, a corresponding relationship between the clicker and the U-shield to be tested is established, which avoids the uncontrolled repeated, uninterrupted and indiscriminate physical clicking operations of the clicking peripheral module, prevents invalid clicking operations and equipment loss and damage, ensures the precise execution of clicking operations, achieves the purpose of reducing equipment loss and resource waste, and has a higher degree of automation and intelligence.

[0213] Fig.16 An application scenario diagram applied to the above-mentioned U-shield testing method according to another embodiment of the present disclosure is schematically shown.

[0214] According to an embodiment of the present disclosure, before determining the physical connection relationship between the USB interface and the U shield in step S1501, 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.

[0215] 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.

[0216] Before determining the current physical connection status of the USB interface into which the U shield is inserted, 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, so as to generate a parameterized running script.

[0217] Afterwards, the execution machine can be controlled to execute the automation script, implement file parsing of the automation script, and obtain the U-shield number to be used from the parameters of the automation script.

[0218] In this way, the USB shield corresponding to the execution machine can be uniquely determined before obtaining the USB interface number.

[0219] According to an embodiment of the present disclosure, before determining the physical connection relationship between the USB interface and the U shield in step S1501, 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.

[0220] like Fig.16 In step S1601, after the execution machine executes the parameterized script, when the execution machine further executes the step that requires the U-shield to click in the automated script, the execution machine external device management module 1420 generates a U-shield click control communication message according to the U-shield number, and then sends the U-shield click control communication message to the click instruction processing submodule 1441. After the U-shield click control communication message is parsed by the click instruction processing submodule 1441, it can be used to determine the physical connection relationship of the USB interface corresponding to the U-shield.

[0221] In this way, it can be ensured that the clicker determined by the subsequent click control communication message corresponds to the U shield determined by the above U shield number.

[0222] According to an embodiment of the present disclosure, in step S1501, determining the physical connection relationship between the USB interface and the U shield includes: determining the USB interface corresponding to the U shield in response to a click control communication message; and judging the physical connection relationship according to the current connection state of the USB interface.

[0223] like Fig.16 In steps 1602 and S1609, the external device management module 1420 of the execution machine sends a U-shield click control communication message to the click instruction processing submodule 1441 of the U-shield click management module 1440 and the U-shield information management submodule 1431 of the U-shield device routing connection module 1430. The U-shield information management submodule 1431 receives the message and parses it. According to the U-shield number in the message, the USB interface number corresponding to the U-shield is queried in the routing configuration table of the U-shield data switching routing submodule 1432 by obtaining the corresponding relationship between the U-shield and the USB interface. The U-shield information management submodule 1431 receives the message and parses it. According to the U-shield number in the message, the USB interface number corresponding to the U-shield is queried in the routing configuration table of the U-shield data switching routing submodule 432. Furthermore, after the click instruction processing submodule 1441 receives the above message, the current connection status of the USB interface corresponding to the USB interface number is queried in the routing configuration table to confirm whether the corresponding relationship of the USB interface is vacant or occupied, so as to check whether the physical U shield is connected to the specific USB interface.

[0224] Furthermore, the U shield device routing connection module 1430 physically connects the USB interface in an idle state with the corresponding physical U shield, thereby establishing a physical connection relationship between the two.

[0225] In addition, if the current connection status of the USB interface is occupied, the corresponding U shield cannot establish the above physical connection relationship with the USB interface. Fig.16 In the step 1603 shown, if the USB interface is in the occupied state, such as the physical U shield is not connected to the USB interface, a message can be directly fed back: "The physical U shield is not connected to the execution machine and cannot be clicked", and the error message is recorded in the click operation log table. At this time, the click operation on the U shield cannot be realized.

[0226] Therefore, based on the actual business test scenario, the corresponding relationship between the clicker and the USB shield to be tested is established, ensuring the accurate execution of the click operation.

[0227] According to an embodiment of the present disclosure, in step S1502, obtaining a clicker corresponding to the U-shield according to the physical connection relationship includes: determining the physical interface number of the USB interface according to the physical connection relationship; and obtaining the clicker corresponding to the U-shield through the physical interface number and preset clicker setting rules.

[0228] Through the physical connection relationship established between the above-mentioned U shield and the USB interface (that is, the physical U shield is connected to the USB interface), the physical interface number of the USB interface can be determined based on the numbering information of the U shield and the USB interface pre-set in the routing configuration table in the U shield data switching routing submodule 1432.

[0229] Furthermore, the clicker number corresponding to the USB shield can be directly determined based on the physical number of the USB interface and the preset clicker setting rules set in the clicker configuration information management submodule 1442, wherein the preset clicker setting rules include the correspondence between the USB interface number and the clicker number. The clicker can be uniquely identified by the determined clicker number, and can be used to check whether the physical USB shield is connected to the clicker.

[0230] Therefore, the corresponding relationship between the clicker and the USB shield to be tested is established through the physical connection relationship of the USB interface, ensuring the accurate correspondence between the clicker and the USB shield to be tested.

[0231] According to an embodiment of the present disclosure, in obtaining a clicker corresponding to the U-Shield through the physical interface number and the preset clicker setting rules, it also includes: determining the current operating state of the clicker according to the physical interface number and the preset clicker setting rules; and determining the clicker corresponding to the U-Shield based on the current operating state.

[0232] Since the clicker has different operating states in different situations, for example, in the stop state, the clicker suspends the click test on the current U-Shield; in the standby state, the clicker is in a reset state and does not perform a click test on any U-Shield, and can be used at any time to perform a click operation on a newly established U-Shield; in the click state, it means that the clicker is currently executing a click operation on the current U-Shield and cannot execute a click on a new U-Shield.

[0233] like Fig.16 After the steps S1605-S1607 shown can uniquely determine the number of a clicker corresponding to the U-shield through the physical interface number and the preset clicker setting rules, the clicker configuration information management submodule 1442 is still needed to determine the current operating status of the clicker corresponding to the clicker number. Specifically, the operating status log of the corresponding clicker can be queried.

[0234] Therefore, when the operating state of the clicker is in the standby state, it can be uniquely determined that the clicker corresponds to the U-shield corresponding to the U-shield number in the message, wherein the U-shield has established a physical connection relationship with the corresponding USB interface. At this time, it is equivalent to establishing a corresponding relationship between the U-shield and the clicker, and the control interaction between the two can be further realized. That is, if the physical U-shield is connected to the clicker, the corresponding clicker is controlled by the click operation control submodule 1443 to complete the U-shield click operation. In addition, if the physical U-shield is not connected to the clicker, the feedback message "The physical U-shield has no corresponding clicker and cannot perform the click" is fed back.

[0235] Therefore, the phenomenon of incorrect click judgment caused by the poor current operation status of the clicker is effectively avoided, the test progress is accelerated, and the test efficiency of the U shield is improved.

[0236] According to an embodiment of the present disclosure, in step S1503, controlling the clicker to perform a click operation on the U shield includes: performing a fixed number of click operations on the U shield based on a fixed period.

[0237] According to the physical connection relationship determined between the U shield and the USB interface, the test operation data generated by the execution machine can be further sent to the clicker connected to the U shield through the logical data transmission channel established by the connection relationship, and the click position of the clicker is directly opposite to the button setting of the U shield. Among them, the USB interface with the current connection relationship with the execution machine is inserted into the U shield to be tested.

[0238] Furthermore, the simulated click data includes information about the preset regularity of the click operation that the clicker can perform, such as the click time, the number of clicks, the click cycle, and the time when the click ends, so as to determine that when the data is executed by the clicker, the click operation of the preset regularity can be performed on the USB shield to be tested, such as performing a fixed number of click operations on the USB shield based on a fixed cycle. In this way, the test of the USB shield can be completed efficiently and accurately.

[0239] 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.

[0240] like Fig.16 As shown in step S1608, during the click operation of the U shield, various feedback information generated can form a click operation log, such as feedback messages of failed or erroneous click operations, actual click information of click operations (such as click time, clicker number, USB interface number, U shield number, etc.), U shield click test service name, etc., which are directly related to the click operation or directly generate feedback data during the click process, and corresponding process recording operations will be performed to form a click operation log. The click operation log is directly recorded in the click operation log table of the click operation log recording submodule 1444 to complete the storage of the click operation log. Among them, the log recording operation in the whole process is completed by the click operation log recording submodule 1444.

[0241] Therefore, the real-time status of each component of the entire test architecture can be uploaded, managed and updated in real time to prevent invalid data or functional abnormalities in a certain part from affecting the entire click operation process, so as to further improve the operating status of the test architecture and speed up testing efficiency.

[0242] It can be seen that the USB shield testing method of the disclosed embodiment can solve the problem of a large number of invalid click operations caused by the USB shield clicking the peripheral module repeatedly and uninterruptedly. At the same time, it reduces the consumption of equipment wear and tear and reduces the waste of resources.

[0243] Fig.17 A block diagram of a USB shield testing device according to another embodiment of the present disclosure is schematically shown.

[0244] Another aspect of the present disclosure provides a USB shield testing device 1700, which includes a connection determination module 1710, a clicker acquisition module 1720, and a click control module 1730. The connection determination module 1710 is used to determine the physical connection relationship between the USB interface and the USB shield; the clicker acquisition module 1720 is used to acquire a clicker corresponding to the USB shield according to the physical connection relationship; and the click control module 1730 is used to control the clicker to perform a click operation on the USB shield to complete the test of the USB shield.

[0245] It should be noted that Fig.17 The embodiment of the U-shield testing device 1700 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.

[0246] Fig.18 The block diagram of the electronic device according to the embodiment of the present disclosure is schematically shown. Fig.18 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.

[0247] 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.

[0248] like Fig.18 As shown, the computer system 1800 according to the embodiment of the present disclosure includes a processor 1801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1802 or the program loaded from the storage part 1808 to the random access memory (RAM) 1803. The processor 1801 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 1801 may also include an onboard memory for caching purposes. The processor 1801 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.

[0249] In RAM 1803, various programs and data required for the operation of system 1800 are stored. Processor 1801, ROM 1802 and RAM 1803 are connected to each other through bus 1804. Processor 1801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1802 and / or RAM 1803. It should be noted that the program can also be stored in one or more memories other than ROM 1802 and RAM 1803. Processor 1801 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.

[0250] According to an embodiment of the present disclosure, the system 1800 may further include an input / output (I / O) interface 1805, which is also connected to the bus 1804. The system 1800 may further include one or more of the following components connected to the I / O interface 1805: an input section 1806 including a keyboard, a mouse, etc.; an output section 1807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a LAN card, a modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to the I / O interface 1808 as needed. A removable medium 1811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1810 as needed, so that a computer program read therefrom is installed into the storage section 1808 as needed.

[0251] 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 1809, and / or installed from the removable medium 1811. When the computer program is executed by the processor 1801, 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.

[0252] According to an embodiment of the present disclosure, at least one of the state determination module 1310, the connection establishment module 1320, and the U shield test module 1330 may be implemented as a reference. Fig.18 The computer program module described herein, when executed by a processor, can implement the corresponding operations of the U-shield testing method described above.

[0253] 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.

[0254] 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.

[0255] 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.

[0256] 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.

[0257] So far, the embodiments of the present disclosure have been described in detail with reference to the accompanying drawings.

[0258] 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.

[0259] 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.

[0260] 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: Determine a physical connection relationship between the USB interface and the U shield, wherein the physical connection relationship is a physical correspondence between a slot where the USB interface is located and a plug of the U shield to achieve a physical connection state; Acquire a clicker corresponding to the USB shield according to the physical connection relationship, wherein there is a preset mapping rule between the USB interface and the clicker, and query and acquire the clicker corresponding to the USB shield that has the physical connection relationship with the USB interface in the preset mapping rule; and The clicker is controlled to perform a click operation on the U shield to complete the test of the U shield.

2. The method according to claim 1, wherein: Before determining the physical connection relationship between the USB interface and the USB 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 physical connection relationship between the USB interface and the USB shield, the method further includes: 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.

4. The method according to claim 3, wherein: In the step of determining the physical connection relationship between the USB interface and the USB shield, the following steps are included: In response to the click control communication message, determining a USB interface corresponding to the USB shield; The physical connection relationship is determined according to the current connection state of the USB interface.

5. The method according to claim 4, wherein: In the step of obtaining a clicker corresponding to the USB shield according to the physical connection relationship, the step includes: According to the physical connection relationship, determine the physical interface number of the USB interface; The clicker corresponding to the U shield is obtained through the physical interface number and the preset clicker setting rule.

6. The method according to claim 5, wherein: In the step of obtaining the clicker corresponding to the USB shield by using the physical interface number and the preset clicker setting rule, the step further includes: Determining the current operation state of the clicker according to the physical interface number and the preset clicker setting rule; Based on the current operating state, a clicker corresponding to the U shield is determined.

7. The method according to claim 1, wherein: In the step of controlling the clicker to perform a click operation on the USB shield, the step includes: A fixed number of click operations are performed on the U shield based on a fixed period.

8. The method according to claim 1, wherein: Also includes: Record the click operation corresponding to the USB shield to form a click operation log; The click operation log is stored.

9. A U shield testing device, wherein: include: A connection determination module, used to determine the physical connection relationship between the USB interface and the U shield, wherein the physical connection relationship is a physical correspondence between the slot where the USB interface is located and the plug of the U shield to achieve a physical connection state; A clicker acquisition module is used to acquire a clicker corresponding to the USB shield according to the physical connection relationship, wherein there is a preset mapping rule between the USB interface and the clicker, and the clicker corresponding to the USB shield that has the physical connection relationship with the USB interface is queried and acquired in the preset mapping rule; and The click control module is used to control the clicker to perform a click operation on the U shield to complete the test of the U shield.

10. 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 8.

11. A computer-readable storage medium storing computer-executable instructions, wherein: When the instructions are executed, they are used to implement the method according to any one of claims 1 to 8.