Bank counter transaction automation testing method and device

By determining bank transaction windows using mouse position and JAVA class processing, the method and device provide stable and efficient automated testing for bank counter transactions, overcoming inaccuracies caused by image recognition and resolution issues.

CN113010416BActive Publication Date: 2024-12-17INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110217114.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-26
Publication Date
2024-12-17
Estimated Expiration
2041-02-26

AI Technical Summary

Technical Problem

Current automated testing of bank counter transactions is often inaccurate due to factors like computer resolution and personal display settings, leading to reduced success rates and false transaction errors using image recognition technology.

Method used

A method and device that determine the counter transaction window of a bank transaction terminal using mouse position information, obtain pre-stored test data, and perform automated testing based on JAVA class processing, identifying JAVA class names and attributes to operate the transaction window and input fields, independent of image recognition and resolution.

Benefits of technology

Achieves stable and efficient automated testing by avoiding script interruptions from resolution or display settings, with improved success rates and efficiency compared to image recognition-based methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113010416B_ABST
    Figure CN113010416B_ABST
Patent Text Reader

Abstract

The present invention provides a bank counter transaction automation test method and device, which can be used in the financial field, wherein the method includes: determining the counter transaction window of the current bank transaction terminal according to the mouse position information; obtaining the pre-stored test data; and performing the bank counter transaction automation test according to the determined counter transaction window and the obtained test data. The present invention determines the counter transaction window of the current bank transaction terminal according to the mouse position information, directly obtains each window of the operated transaction, and then calls the keyboard and mouse method of the operating system to operate it, which is not affected by factors such as image recognition and resolution, and can achieve a stable automation test effect and success rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an automated testing technology, in particular to an automated testing method and device for bank counter transactions. Background Art

[0002] Currently, the testing of bank counter transactions is mainly based on manual testing or automated testing through image recognition technology. However, image recognition technology is often affected by factors such as computer resolution and personal display settings, resulting in inaccurate or failed recognition, thereby reducing the success rate of automated testing or causing false transaction errors.

[0003] In summary, there is currently no reasonable solution to the problem of automated testing of bank counter transactions. Therefore, how to provide a new solution to solve the above technical problems is a technical problem that needs to be solved urgently in this field. Summary of the invention

[0004] In order to overcome at least one defect of the prior art bank counter transaction automation test, the present invention provides a bank counter transaction automation test method, comprising:

[0005] Determine the counter transaction window of the current bank transaction terminal according to the mouse position information;

[0006] Obtaining pre-stored test data;

[0007] Execute automated testing of bank counter transactions based on the determined counter transaction window and acquired test data.

[0008] In the embodiment of the present invention, the method of determining the counter transaction window of the current bank terminal according to the mouse position information includes:

[0009] Determine the coordinates of the mouse according to the position information of the mouse;

[0010] Get the JAVA window handle of the current bank transaction terminal's counter transaction according to the mouse coordinates;

[0011] The current counter transaction window is determined according to the JAVA window handle.

[0012] In the embodiment of the present invention, the determining the current counter transaction window according to the JAVA window handle comprises:

[0013] Obtain the rectangle information of the current counter transaction window according to the JAVA window handle;

[0014] A flashing operation is performed on the current counter transaction window according to the rectangular information.

[0015] In the embodiment of the present invention, the obtaining of pre-stored test data includes:

[0016] Get the file storage path provided by the user;

[0017] The pre-stored test data is obtained according to the file storage path.

[0018] In the embodiment of the present invention, the automated test of bank counter transactions performed according to the determined counter transaction window and the acquired test data includes:

[0019] According to the JAVA window handle, the acquired test data is input into the determined counter transaction window for testing operation, so as to execute the automated test of the bank counter transaction.

[0020] At the same time, the present invention also provides a bank counter transaction automation test device, comprising:

[0021] The window determination module is used to determine the counter transaction window of the current bank transaction terminal according to the mouse position information;

[0022] A test data acquisition module, used to acquire pre-stored test data;

[0023] The test execution module is used to execute automated testing of bank counter transactions based on the determined counter transaction window and the acquired test data.

[0024] In an embodiment of the present invention, the window determination module includes:

[0025] A coordinate acquisition unit, used to determine the coordinates of the mouse according to the position information of the mouse;

[0026] A window handle acquisition unit, used to acquire the JAVA window handle of the counter transaction of the current bank transaction terminal according to the coordinates of the mouse;

[0027] The window determination unit is used to determine the current counter transaction window according to the JAVA window handle.

[0028] In the embodiment of the present invention, the test execution module performs the automated test of the bank counter transaction according to the determined counter transaction window and the acquired test data, including:

[0029] According to the JAVA window handle, the acquired test data is input into the determined counter transaction window to execute the test operation, so as to automate the bank counter transaction.

[0030] At the same time, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the above method is implemented when the processor executes the computer program.

[0031] At the same time, the present invention also provides a computer-readable storage medium, which stores a computer program for executing the above method.

[0032] The present invention provides a bank counter transaction automation test method and device, which determines the counter transaction window of the current bank transaction terminal according to the mouse position information; obtains the pre-stored test data; and performs the automated test of the bank counter transaction according to the determined counter transaction window and the obtained test data. Provided is a bank counter transaction automation test method and device based on JAVA class processing, which identifies the JAVA class name in the underlying JAVA process of the operating system, wherein the counter transaction window of the current bank transaction terminal is determined according to the mouse position information, and the JAVA class and attribute corresponding to each window and input field of the operated transaction are directly obtained, and then the keyboard and mouse method of the operating system is called to operate it. Because the operation is based on the program process class, it is not affected by factors such as image recognition and resolution, and a stable automated test effect and success rate can be achieved.

[0033] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A flow chart of the bank counter transaction automation testing method provided by the present invention;

[0036] Figure 2 A system structure diagram of a bank counter transaction automation test device provided in an embodiment of the present invention;

[0037] Figure 3 A diagram of a JAVA handle acquisition device provided in an embodiment of the present invention;

[0038] Figure 4 A diagram of a test data reading device provided in an embodiment of the present invention;

[0039] Figure 5 A diagram of a JAVA handle and a test data operation device provided in an embodiment of the present invention;

[0040] Figure 6 A diagram of a processing result output device provided in an embodiment of the present invention;

[0041] Figure 7 A flow chart of the bank counter transaction automation testing device provided in an embodiment of the present invention;

[0042] Figure 8 A block diagram of a bank counter transaction automation test device is provided for the present invention;

[0043] Fig. 9 A schematic diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] At present, bank counter transactions are automatically tested through image recognition technology, but image recognition technology is often affected by various factors such as computer resolution and personal display settings, resulting in inaccurate or failed recognition, thereby reducing the success rate of automated testing or false transaction reports. The present invention provides a bank counter transaction automated testing method and device, which determines the counter transaction window of the current bank transaction terminal according to the mouse position information; obtains pre-stored test data; and performs automated testing of bank counter transactions according to the determined counter transaction window and the obtained test data; wherein, by identifying the JAVA class name in the underlying JAVA process of the operating system, directly obtaining the JAVA class and attributes corresponding to each window and input field of the operated transaction, so as to determine the counter transaction window of the current bank transaction terminal according to the mouse position information. The present invention provides a bank counter transaction automated testing method and device based on JAVA class processing, wherein the method and device directly obtains the JAVA class and attributes corresponding to each window and input field of the operated transaction by identifying the JAVA class name in the underlying JAVA process of the operating system, and then calls the keyboard and mouse method of the operating system to operate it. Because the operation is based on program process classes, it is not affected by factors such as image recognition and resolution, and can achieve stable automated testing results and success rates.

[0046] like Figure 1 As shown, a bank counter transaction automation testing method provided by the present invention includes:

[0047] Step S101, determining the counter transaction window of the current bank transaction terminal according to the mouse position information;

[0048] Step S102, obtaining pre-stored test data;

[0049] Step S103, executing automated testing of bank counter transactions according to the determined counter transaction window and the acquired test data.

[0050] The bank counter transaction automation test method provided by the present invention determines the counter transaction window of the current bank transaction terminal according to the mouse position information, and realizes providing a bank counter transaction automation test method based on JAVA class processing. The method device directly obtains the JAVA class and attributes corresponding to each transaction window and input window operated by identifying the JAVA class name in the underlying JAVA process of the operating system, and then calls the keyboard and mouse method of the operating system to operate it. Because the operation is based on the program process class, it is not affected by factors such as image recognition and resolution, and can achieve a stable automation test effect and success rate.

[0051] Specifically, in the embodiment of the present invention, the method of determining the counter transaction window of the current bank terminal according to the mouse position information includes:

[0052] Determine the coordinates of the mouse according to the position information of the mouse;

[0053] Get the JAVA window handle of the current bank transaction terminal's counter transaction according to the mouse coordinates;

[0054] The current counter transaction window is determined according to the JAVA window handle.

[0055] That is, in the embodiment of the present invention, the JAVA window handle of the currently selected bank transaction terminal is obtained according to the current mouse coordinates, and the current window rectangle information is obtained at the same time.

[0056] The coordinates of the current mouse position are obtained according to the mouse position. In one embodiment of the present invention, the coordinates of the mouse are obtained using the windows operating system API function.

[0057] According to the current mouse coordinates, the JAVA window handle of the currently selected bank transaction terminal is obtained, that is, the JAVA window handle is obtained using the windows operating system API.

[0058] In the embodiment of the present invention, the determining the current counter transaction window according to the JAVA window handle comprises:

[0059] Obtain the rectangle information of the current counter transaction window according to the JAVA window handle;

[0060] A flashing operation is performed on the current counter transaction window according to the rectangular information.

[0061] The coordinates of the current mouse position are obtained according to the mouse position, and the coordinates of the mouse are obtained using the windows operating system API function, and the JAVA window handle of the currently selected bank transaction terminal is obtained according to the current mouse coordinates. That is, the JAVA window handle is obtained using the windows operating system API. Further, according to the current mouse coordinates, the current window rectangle information is obtained, the window rectangle is obtained using the windows operating system API, and then the API method is used to make the selected window flash, so that the user knows which window is selected.

[0062] In the embodiment of the present invention, the obtaining of pre-stored test data includes:

[0063] Get the file storage path provided by the user;

[0064] The pre-stored test data is obtained according to the file storage path.

[0065] According to the file path provided by the user, read the file storing the test data, and then read the test data in the file. Specifically, it includes: according to the file path provided by the user, read the file storing the test data, read the test data in the file, and obtain the data value of the specified field.

[0066] In the embodiment of the present invention, the automated test of bank counter transactions performed according to the determined counter transaction window and the acquired test data includes:

[0067] According to the JAVA window handle, the acquired test data is input into the determined counter transaction window for testing operation, so as to execute the automated test of the bank counter transaction.

[0068] In the embodiment of the present invention, according to the acquired JAVA window handle and the read test data, the WINAPI is called for the corresponding JAVA window to perform mouse and keyboard operations on the bank transaction terminal, and the acquired test data is used as the input test data to perform the automated test of the bank counter transaction. In this embodiment, according to the JAVA window handle, the WINAPI is called for the corresponding JAVA window to perform mouse operations on the bank transaction terminal to simulate the teller's operation.

[0069] The embodiment of the present invention provides a method and device for automated testing of bank counter transactions based on JAVA class processing. By identifying the JAVA class name in the underlying JAVA process of the operating system, the JAVA class and attributes corresponding to each window and input field of the operated transaction are directly obtained, and then the keyboard and mouse methods of the operating system are called to operate them. Because the operation is based on the program process class, it is not affected by factors such as image recognition and resolution, and a stable automated testing effect and success rate can be achieved. In the embodiment of the present invention, by identifying the JAVA class name in the underlying JAVA process of the operating system, a stable automated testing effect and success rate of bank counter transactions can be achieved. Its advantages are as follows:

[0070] System stability: stable operation, no script interruption due to resolution or other reasons;

[0071] Strong scalability: can be copied to different computers for running;

[0072] Improved efficiency: Compared with the image recognition script, this system has significantly improved efficiency.

[0073] The technical solution of the present invention is further described in detail below in conjunction with a specific embodiment. An embodiment of the present invention provides a bank counter transaction automation testing method and system based on JAVA class processing. The system and method of the present invention will be described in detail below with reference to the accompanying drawings.

[0074] like Figure 2 FIG. 1 is a structural diagram of the bank counter transaction automation test system provided by the present invention, which includes:

[0075] JAVA handle acquisition device 1: acquires the current mouse coordinates, and acquires the JAVA window handle of the currently selected bank transaction terminal according to the current mouse coordinates, and acquires the current window rectangle information at the same time.

[0076] Test data reading device 2: first reads the file storing the test data according to the file path provided by the user, then reads the test data in the file, and obtains the data value of the specified field.

[0077] JAVA handle and test data operation device 3: According to the information read by the JAVA handle acquisition device 1 and the test data reading device 2, for the corresponding JAVA window, WINAPI is called to perform mouse and keyboard operations on the bank transaction terminal, and the test data that needs to be input uses the data obtained from the test data reading device 2.

[0078] Processing result output device 4: judges the operation result of JAVA handle and test data operation device 3, and outputs success information if the operation is successful; and outputs failure information if the operation fails.

[0079] Figure 3 : is a schematic diagram of the internal structure of the JAVA handle acquisition device 1 in this embodiment, such as Figure 3 As shown, the JAVA handle acquisition device 1 includes:

[0080] Mouse coordinate acquisition unit 11: used to acquire the coordinates of the current mouse position.

[0081] In this embodiment, the method for obtaining the coordinates of the mouse is: using the Windows operating system API method GetCursorPos(&M) to obtain and save in a variable M.

[0082] The window handle acquisition unit 12 acquires the JAVA window handle of the currently selected bank transaction terminal according to the current mouse coordinates.

[0083] In this embodiment, the acquisition method is: using the windows operating system API method: W=WindowFromPoint(M) to acquire and save in a variable W, wherein the variable M used is a variable acquired from the mouse coordinate acquisition unit 11.

[0084] The window rectangle obtaining unit 13 is used to obtain the current window rectangle information according to the current mouse coordinates.

[0085] The acquisition method of this embodiment is: using the windows operating system API method: GetWindowRect(W,&R) to obtain the window rectangle R, wherein the variable W used is a variable obtained from the window handle acquisition unit 12.

[0086] Then use the API method: Rectangle(R.left, R.top, R.right, R.bottom) to make the selected window flash so that the user knows which window is selected.

[0087] Figure 4 : is a schematic diagram of the internal structure of the test data reading device 2. In this embodiment, the test data reading device 2 includes:

[0088] The file reading unit 21 is used to read the file storing the test data according to the file path provided by the user.

[0089] For example: F = OpenXlsx (E:\testdata.et), save the file path and file name in variable F.

[0090] Field reading unit 22: reads the test data in the file and obtains the data value of the specified field.

[0091] An example is as follows: T=ReadXlsx(F, number of rows, number of columns), wherein the variable F is obtained from the file reading unit 21, and the number of rows and columns are specified by the user, and the values ​​therein are read into the variable T.

[0092] Figure 5 1 is a schematic diagram of the internal structure of the JAVA handle and test data operation device 3, wherein the JAVA handle and test data operation device 3 includes:

[0093] Mouse operation unit 31: Based on the information read by device 1, the corresponding JAVA window is used to call WINAPI to perform mouse operations on the bank transaction terminal, simulating teller operations. For example:

[0094] Mouse click: S=LeftClick(W), where the variable W is obtained from the window handle obtaining unit 12 of the device 1.

[0095] After the processing is completed, the processing result is returned to the variable S, 1 is returned if successful, otherwise 0 is returned.

[0096] Keyboard operation unit 32: Based on the information read by device 1 and device 2, the corresponding JAVA window calls WINAPI to perform keyboard operations on the bank transaction terminal, wherein the test data to be input uses the data obtained from device 2; the window object to be operated is obtained from device 1. An example is as follows:

[0097] Input data: S=SendKeys(W,T), wherein variable W is obtained from the window handle obtaining unit 12 of device 1, and variable T is obtained from the field reading unit 22 of device 2.

[0098] After the processing is completed, the processing result is returned to the variable S, 1 is returned if successful, otherwise 0 is returned.

[0099] Figure 6 The block diagram of the processing result output device 4 is shown, wherein the processing result output device 4 comprises:

[0100] The exception processing output unit 41 judges the operation result of the JAVA handle and the test data operation device 3, and outputs the failure information if the operation fails.

[0101] Here are some examples:

[0102] if(S=0) [

[0104] trace('Operation failed')

[0105] Exit ]

[0107] The variable S is obtained from the JAVA handle and the test data operation device 3 .

[0108] Normal processing output unit 42: judges the operation result of JAVA handle and test data operation device 3, and outputs success information if the operation is successful.

[0109] Here are some examples:

[0110] Here are some examples:

[0111] if(S=1) [

[0113] trace('Operation successful')

[0114] Exit ]

[0116] The embodiment of the present invention provides a bank counter transaction automation test system based on JAVA class processing. By identifying the JAVA class name in the underlying JAVA process of the operating system, the system directly obtains the JAVA class and attributes corresponding to each window and input field of the operated transaction, and then calls the keyboard and mouse methods of the operating system to operate them. Because the operation is based on the program process class, it is not affected by factors such as image recognition and resolution, and can achieve a stable automated test effect and success rate.

[0117] like Figure 7 FIG. 1 is a processing flow of the bank counter transaction automation testing method provided in an embodiment of the present invention, and the steps are as follows:

[0118] Step S701: The application system starts to start.

[0119] Step S702: Acquire the current mouse coordinates, and based on the current mouse coordinates, acquire the JAVA window handle of the currently selected bank transaction terminal, and simultaneously acquire the current window rectangle information. This may be acquired multiple times.

[0120] Step S703: first read the file storing the test data according to the file path provided by the user, then read the test data in the file to obtain the data value of the specified field.

[0121] Step S704: Based on the information read by device 2 and device 3, the corresponding JAVA window is used to call WINAPI to perform mouse and keyboard operations on the bank transaction terminal, wherein the test data to be input uses the data obtained from device 2.

[0122] Step S705: Determine the operation result of the device 3 and output corresponding information.

[0123] Step S706: If the operation is successful, a success message is output.

[0124] Step S707: If the operation fails, output failure information.

[0125] The bank counter transaction automation test method provided in this embodiment can achieve stable bank counter transaction automation test effect and success rate by identifying the JAVA class name in the underlying JAVA process of the operating system. It runs stably and will not cause script interruption due to resolution and other reasons. The bank counter transaction automation test method improves efficiency: compared with the image recognition script, the efficiency of this system is significantly improved.

[0126] The bank counter transaction automation testing method and device provided by the present invention can be used in the financial field or other fields. It should be noted that the bank counter transaction automation testing method and device disclosed in the present invention can be used for bank counter transaction automation testing in the financial field, and can also be used for automation testing in any field other than the financial field. The application field of the bank counter transaction automation testing method and device disclosed in the present invention is not limited.

[0127] At the same time, the embodiment of the present invention also provides a bank counter transaction automation testing device, such as Figure 8 As shown, the device comprises:

[0128] The window determination module 801 is used to determine the counter transaction window of the current bank transaction terminal according to the mouse position information;

[0129] The test data acquisition module 802 is used to acquire pre-stored test data;

[0130] The test execution module 803 is used to execute the automated test of the bank counter transaction according to the determined counter transaction window and the acquired test data.

[0131] In the embodiment of the present invention, the window determination module 801 obtains the coordinates of the current mouse, and obtains the JAVA window handle of the currently selected bank transaction terminal according to the coordinates of the current mouse, and simultaneously obtains the current window rectangle information.

[0132] The test data acquisition module 802 reads the file storing the test data according to the file path provided by the user, and then reads the test data in the file to obtain the data value of the specified field.

[0133] The test execution module 803 calls WINAPI to perform mouse and keyboard operations on the bank transaction terminal for the corresponding JAVA window according to the obtained JAVA window handle and the read test data. The test data that needs to be input uses the data obtained from the test data reading device 2.

[0134] In an embodiment of the present invention, the window determination module includes:

[0135] A coordinate acquisition unit, used to determine the coordinates of the mouse according to the position information of the mouse;

[0136] A window handle acquisition unit, used to acquire the JAVA window handle of the counter transaction of the current bank transaction terminal according to the coordinates of the mouse;

[0137] The window determination unit is used to determine the current counter transaction window according to the JAVA window handle.

[0138] For those skilled in the art, the implementation method of the bank counter transaction automatic testing device provided by the present invention can be clearly known from the description of the above embodiments, which will not be repeated here.

[0139] This embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, etc., but this embodiment is not limited thereto. In this embodiment, the electronic device may refer to the embodiments of the aforementioned method and device, the contents of which are incorporated herein, and the repeated parts are not repeated.

[0140] Fig. 9 FIG. 6 is a schematic block diagram of a system structure of an electronic device 600 according to an embodiment of the present invention. Fig. 9 As shown, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. It should be noted that this figure is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0141] In one embodiment, the bank counter transaction automation test function can be integrated into the central processor 100. The central processor 100 can be configured to perform the following control:

[0142] Determine the counter transaction window of the current bank transaction terminal according to the mouse position information;

[0143] Obtaining pre-stored test data;

[0144] Execute automated testing of bank counter transactions based on the determined counter transaction window and acquired test data.

[0145] In the embodiment of the present invention, the method of determining the counter transaction window of the current bank terminal according to the mouse position information includes:

[0146] Determine the coordinates of the mouse according to the position information of the mouse;

[0147] Get the JAVA window handle of the current bank transaction terminal's counter transaction according to the mouse coordinates;

[0148] The current counter transaction window is determined according to the JAVA window handle.

[0149] In the embodiment of the present invention, the determining the current counter transaction window according to the JAVA window handle comprises:

[0150] Obtain the rectangle information of the current counter transaction window according to the JAVA window handle;

[0151] A flashing operation is performed on the current counter transaction window according to the rectangular information.

[0152] In the embodiment of the present invention, the obtaining of pre-stored test data includes:

[0153] Get the file storage path provided by the user;

[0154] The pre-stored test data is obtained according to the file storage path.

[0155] In the embodiment of the present invention, the automated test of bank counter transactions performed according to the determined counter transaction window and the acquired test data includes:

[0156] According to the JAVA window handle, the acquired test data is input into the determined counter transaction window for testing operation, so as to execute the automated test of the bank counter transaction.

[0157] like Fig. 9 As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processor 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Fig. 9 In addition, the electronic device 600 may also include Fig. 9 For components not shown, reference may be made to the prior art.

[0158] like Fig. 9 As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.

[0159] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.

[0160] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.

[0161] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.

[0162] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0163] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0164] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.

[0165] An embodiment of the present invention further provides a computer-readable program, wherein when the program is executed in an electronic device, the program enables a computer to execute the bank counter transaction automation testing method as described in the above embodiment in the electronic device.

[0166] An embodiment of the present invention further provides a storage medium storing a computer-readable program, wherein the computer-readable program enables a computer to execute the bank counter transaction automation test described in the above embodiment in an electronic device.

[0167] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings. Many features and advantages of these embodiments are clear from this detailed description, and therefore the appended claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. In addition, since many modifications and changes are readily apparent to those skilled in the art, the embodiments of the present invention are not intended to be limited to the precise structure and operation illustrated and described, but all suitable modifications and equivalents that fall within their scope may be included.

[0168] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0169] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0172] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A bank counter transaction automation testing method, characterized in that: The method includes: Determine the counter transaction window of the current bank transaction terminal according to the mouse position information; Obtaining pre-stored test data; Execute automated testing of bank counter transactions based on the determined counter transaction windows and acquired test data; The method of determining the current bank terminal's counter transaction window according to the mouse position information includes: Use the Windows operating system API method GetCursorPos(&M) to determine the coordinates of the mouse and save them in the variable M; Use the Windows operating system API method W=WindowFromPoint(M) to obtain the JAVA window handle of the current bank transaction terminal's counter transaction and save it in the variable W; Use the Windows operating system API method GetWindowRect(W,&R) to determine the rectangular information R of the current counter trading window; Use the windows operating system API method Rectangle(R.left, R.top, R.right, R.bottom) to make the selected window flash; The automated test of bank counter transactions is performed according to the determined counter transaction window and the acquired test data, including: According to the determined counter transaction window, WINAPI is called to perform the mouse operation S1=LeftClick(W) on the bank transaction terminal; Return the mouse operation result to variable S1, if the operation is successful, it returns 1, otherwise it returns 0; According to the determined counter transaction window and the obtained test data, WINAPI is called to perform keyboard operation S2=SendKeys(W,T) on the bank transaction terminal, where T=ReadXlsx(F, number of rows, number of columns), F=OpenXlsx(path of test data), and T and F are variables; Return the result of the keyboard operation to variable S2, if the operation is successful, it returns 1, otherwise it returns 0.

2. The bank counter transaction automation testing method according to claim 1, characterized in that: The obtaining of pre-stored test data includes: Get the file storage path provided by the user; The pre-stored test data is obtained according to the file storage path.

3. A bank counter transaction automation test device, characterized in that: The device comprises: The window determination module is used to determine the counter transaction window of the current bank transaction terminal according to the mouse position information; A test data acquisition module, used to acquire pre-stored test data; A test execution module, used to execute automated testing of bank counter transactions according to the determined counter transaction window and the acquired test data; The window determination module is specifically used for: Use the Windows operating system API method GetCursorPos(&M) to determine the coordinates of the mouse and save them in the variable M; Use the Windows operating system API method W=WindowFromPoint(M) to obtain the JAVA window handle of the current bank transaction terminal's counter transaction and save it in the variable W; Use the Windows operating system API method GetWindowRect(W,&R) to determine the rectangular information R of the current counter trading window; Use the windows operating system API method Rectangle(R.left, R.top, R.right, R.bottom) to make the selected window flash; The test execution module is specifically used for: According to the determined counter transaction window, WINAPI is called to perform the mouse operation S1=LeftClick(W) on the bank transaction terminal; Return the mouse operation result to variable S1, if the operation is successful, it returns 1, otherwise it returns 0; According to the determined counter transaction window and the obtained test data, WINAPI is called to perform keyboard operation S2=SendKeys(W,T) on the bank transaction terminal, where T=ReadXlsx(F, number of rows, number of columns), F=OpenXlsx(path of test data), and T and F are variables; Return the result of the keyboard operation to variable S2, if the operation is successful, it returns 1, otherwise it returns 0.

4. The bank counter transaction automation test device as claimed in claim 3, characterized in that: The window determination module comprises: A coordinate acquisition unit, used to determine the coordinates of the mouse according to the position information of the mouse; A window handle acquisition unit, used to acquire the JAVA window handle of the counter transaction of the current bank transaction terminal according to the coordinates of the mouse; The window determination unit is used to determine the current counter transaction window according to the JAVA window handle.

5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 2 is implemented.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 2.