Mobile payment device testing method and testing system
Patent Information
- Application Number
- CN202010180931.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-16
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2040-03-16
AI Technical Summary
由此可见,在测试时一般需要专人长时间若干次点击界面,测试效率低下,成本高
由于移动支付端被投屏到测试终端,移动支付端支付页面的刷新由测试终端自动控制,无需人工,并且测试终端能自动大量截屏得到截屏图像供移动支付机具采集,克服了现有技术中移动支付端不允许自动截屏的缺点,因此本发明移动支付机具测试方法能部分甚至完全取代人工工序,提供的大量支付码有利于满足移动支付机具程序运行稳定性测试要求,能提高移动支付机具产品质量,减少相关生产成本。
Smart Images

Figure CN111552603B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile payment technology, and in particular to a method for testing mobile payment devices and a system for testing mobile payment devices. Background Technology
[0002] Mobile payment is widely used in public transportation. Hardware manufacturers of payment devices often need to collect, parse, verify, and generate business transactions from a large number of payment codes to test the stability of the payment device program. Current technology typically involves manually refreshing the payment code on the mobile payment terminal for the payment device to recognize. Due to security concerns, the payment code needs to be refreshed periodically to generate a new code, commonly every minute. Therefore, testing usually requires a dedicated person to click the interface repeatedly over a long period, resulting in low efficiency and high cost. Some research has considered automatically taking screenshots of the payment page generated by the mobile payment terminal to reduce manual operation; however, for security reasons, current mobile payment terminals disable screenshot permissions for payment codes, making this solution impractical. Summary of the Invention
[0003] In view of the above problems, the present invention is proposed to provide a mobile payment device testing method that overcomes or at least partially solves the above problems.
[0004] In a first aspect, embodiments of the present invention provide a mobile payment device testing method, comprising the following steps: The test terminal controls the mobile payment terminal to refresh the payment code at a first time interval, and obtains the screen projection interface of the payment code by screen projection. Screenshots are taken of the projection interface at second time intervals to obtain screenshot images; The screenshot image is provided to the mobile payment device for processing.
[0005] Furthermore, the test terminal receives the processing results of the screenshot image from the mobile payment device.
[0006] Furthermore, the test terminal controlled the mobile payment terminal to refresh the payment code at the first time interval via ADB commands.
[0007] Furthermore, taking a screenshot to obtain a screenshot image also includes: Take a screenshot at a preset coordinate location; or capture a screenshot of the target window according to preset rules.
[0008] Furthermore, the test terminal includes a main test terminal and at least one slave test terminal, which are respectively connected to different mobile payment terminals; The test terminal also sends the screenshots obtained to the main test terminal; The main test terminal will also receive screenshots from the test terminal for processing by the payment equipment.
[0009] Secondly, embodiments of the present invention provide a mobile payment device testing method to simulate a multi-user payment scenario, comprising the following steps: The test terminal controls each mobile payment terminal to refresh the payment code at a third time interval according to a preset first rule, and obtains the screen projection interface of the payment code by screen projection. According to the second preset rule, the target projection interface is captured at the fourth time interval to obtain the screenshot image; The screenshot image is provided to the mobile payment device for processing.
[0010] Thirdly, embodiments of the present invention provide a mobile payment device testing system, including a test terminal and a corresponding mobile payment terminal, wherein: The mobile payment terminal is used to establish a screen mirroring relationship with the test terminal, project the payment code onto the test terminal, and receive control from the test terminal to refresh the payment code at a preset first time interval. The test terminal is used to control the mobile payment terminal to refresh the payment code at a preset first time interval, and to obtain the projection interface of the payment code; it is also used to take screenshots of the projection interface at a second time interval to obtain screenshot images and provide them to the mobile payment device for processing.
[0011] Fourthly, embodiments of the present invention provide a mobile payment device testing system, including a test terminal and a mobile payment terminal, wherein the test terminal and the mobile payment terminal have a one-to-many relationship, wherein: The mobile payment terminal is used to establish a screen mirroring relationship with the test terminal, project the payment code onto the test terminal, and receive control from the test terminal to refresh the payment code at a preset third time interval. The test terminal is used to control the mobile payment terminal to refresh the payment code according to a preset first rule at a third time interval, and to obtain the projection interface of the payment code; it is also used to take screenshots of the target projection interface at a second time interval according to a second preset rule to obtain screenshot images and provide them to the mobile payment device for processing. The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following: Since the mobile payment terminal is projected onto the test terminal, the refresh of the payment page is automatically controlled by the test terminal without manual intervention. Furthermore, the test terminal can automatically take a large number of screenshots for the mobile payment device to collect, overcoming the shortcoming of existing technologies where mobile payment terminals do not allow automatic screenshots. Therefore, the mobile payment device testing method of this invention can partially or even completely replace manual procedures. The large number of payment codes provided helps to meet the stability testing requirements of the mobile payment device program, improves the product quality of mobile payment devices, and reduces related production costs.
[0012] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0013] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0014] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a mobile payment device testing method according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of a mobile payment device testing method according to Embodiment 2 of the present invention; Figure 3 This is a flowchart of a mobile payment device testing method according to Embodiment 3 of the present invention; Figure 4 This is a flowchart of a mobile payment device testing method according to Embodiment 4 of the present invention; Figure 5 This is a schematic diagram of a mobile payment device testing system according to Embodiment 5 of the present invention; Figure 6 This is a schematic diagram of another mobile payment device testing system according to Embodiment 5 of the present invention; Figure 7 This is a schematic diagram of a mobile payment device testing system according to Embodiment Six of the present invention; Figure 8 This is a schematic diagram of another mobile payment device testing system in Embodiment Six of the present invention. Detailed Implementation
[0015] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0016] To address the issues of low testing efficiency and reliance on manual labor in existing technologies, this invention provides a method for testing mobile payment devices. Example 1
[0017] This invention provides a method for testing mobile payment devices, combined with... Figure 1 As shown, it includes the following steps: S101, the test terminal controls the mobile payment terminal to refresh the payment code at a first time interval, and obtains the screen projection interface of the payment code by screen projection.
[0018] The test terminal can be a PC, tablet, laptop, or other device capable of establishing a screen mirroring relationship with the mobile payment terminal and equipped with a display. The screen mirroring relationship between the mobile payment terminal and the test terminal can be established using the mobile payment terminal's built-in software or third-party screen mirroring software. For example, Android phones have multi-screen interaction functions, Apple phones have screen mirroring functions, and third-party screen mirroring software includes programs like XunJie Screen Recorder. Alternatively, the open-source tool Scrcpy can be used and modified as needed to support screen mirroring based on the mobile payment terminal's serial number. Of course, a video transmission process between the mobile payment terminal and the test terminal can also be established according to preset rules. Methods for establishing a video transmission process between the mobile payment terminal and the test terminal can refer to existing related technologies and will not be elaborated upon here.
[0019] Currently, commonly used mobile payment software includes Alipay and WeChat, which mainly use QR codes as payment codes. From a security perspective, users need to use different QR codes each time they make a payment. For example, Alipay requires that the same user cannot scan the code within 3 seconds. Therefore, current technology requires manual QR code refreshing during testing.
[0020] To achieve automatic refresh of the payment page on a mobile payment terminal, a convenient method in this embodiment of the invention is to control the mobile payment terminal to refresh the payment page via ADB commands from the test terminal. For example, using... The command `adb shell input (x,y)` locates the top-left corner of the mobile payment app's payment page. This coordinate position is displayed in developer mode.
[0021] When the test terminal displays the projection interface corresponding to the payment code of the mobile payment terminal, the size or brightness may also be adjusted.
[0022] S102, take screenshots of the projection interface obtained in step S101 at the second time interval to obtain screenshot images.
[0023] If the screen mirroring interface is set at a fixed position on the test terminal's monitor, a screenshot can be taken at that coordinate position each time. In some cases, if the screen mirroring interface cannot be accurately located, or if the screen mirroring interface is obscured and an accurate screenshot cannot be obtained at the preset coordinate position, a screenshot can also be taken by capturing the target window according to preset rules. For example, the test terminal can locate the interface to be screenshotted based on the process ID (PID) of the current screen mirroring program.
[0024] In some embodiments, you can use Scrcpy to take screenshots. It's a professional computer-controlled phone software that supports USB and Wi-Fi connections, and is compatible with Windows, macOS, and Linux operating systems. It requires no app installation or root access on the phone, making it extremely convenient. Since Scrcpy's QuickGrab tool is currently only available for Mac, you can modify the open-source QuickGrab code to port it to other platforms. Alternatively, you can use other screenshot software.
[0025] In this embodiment, the frequency at which the test terminal takes screenshots should not exceed the frequency at which the mobile payment terminal refreshes the payment code; otherwise, the same screen will be repeatedly screenshotted, and providing the same screenshot image to the payment device for testing will undoubtedly reduce testing efficiency. Therefore, the second time interval is preferably greater than or equal to the first time interval.
[0026] S103, the screenshot image is provided to the mobile payment device for processing.
[0027] Depending on the application scenario, mobile payment terminals may be different devices. For example, in the field of travel payments, mobile payment terminals may be POS machines installed on buses or turnstiles in subways. An appropriate distance is set between the test terminal's display and the payment terminal to allow for better recognition and parsing of the screenshot image. The payment terminal parses the collected screenshot image into a string containing payment information in the form of a string, including the user's identity identifier, payment method, timestamp (time the payment code was generated), and security verification information. It then verifies the validity and legality of this payment information through a verification program. If the verification passes, it also generates business transaction information along with the payment information, including route information and terminal ID contained within the mobile payment terminal. If the verification fails, it will indicate that the payment code is incorrect. In practical applications, business transaction information is used by the backend system for billing and deduction. In this embodiment, it is only for testing the operation of the mobile payment terminal program; therefore, this embodiment does not involve backend system-related content.
[0028] The processing results of screenshot images by mobile payment devices can be stored within the device itself or sent to a test terminal for quick viewing by testers. Testers use a large number of processing results generated by mobile payment devices to determine whether the devices can function continuously and normally. For example, if the mobile payment terminal uses WeChat Pay, but the processing result generated by the device is that the payment code is invalid, it can be determined that the verification function of the mobile payment device is faulty.
[0029] If the mobile payment device's response speed matches the screenshot generation speed, the mobile payment device will capture the screenshot once for each screenshot generated by the test terminal. If the payment device's response speed is slower than the screenshot generation speed, the screenshot can be temporarily stored and then displayed at a speed matching the mobile payment device's speed for capture.
[0030] In other embodiments, the process of steps S101-S103 can be directly made into an automated script or program to completely replace manual operation.
[0031] In this embodiment of the invention, since the mobile payment terminal is projected onto the test terminal, the refresh of the payment page on the mobile payment terminal is automatically controlled by the test terminal without manual intervention. Furthermore, the test terminal can automatically take a large number of screenshots for the mobile payment device to collect, overcoming the shortcomings of existing technologies where mobile payment terminals do not allow automatic screenshots. Therefore, the mobile payment device testing method of this invention can partially or even completely replace manual procedures. The large number of payment codes provided helps to meet the stability testing requirements of the mobile payment device program, improves the product quality of mobile payment devices, and reduces related production costs.
[0032] Example 2 In other embodiments, a mobile payment device testing method, combined with Figure 2 As shown, it includes the following steps: S201, the test terminal controls the mobile payment terminal to refresh the payment code at a first time interval, and obtains the screen projection interface of the payment code by screen projection.
[0033] The test terminal includes a main test terminal and at least one slave test terminal, which respectively receive screen projections from different mobile payment terminals.
[0034] Screen mirroring relationships between the mobile payment app and the main test terminal, as well as between the main and secondary test terminals, can be established using the mobile payment app's built-in software or third-party screen mirroring software. For example, Android phones have multi-screen interaction capabilities, Apple phones have screen mirroring functions, and third-party screen mirroring software includes programs like XunJie Screen Recorder. Alternatively, the open-source tool Scrcpy can be used and modified as needed to support screen mirroring based on the mobile payment app's serial number. Of course, a video transmission process between the mobile payment app and the test terminal can also be established according to preset rules. Methods for establishing a video transmission process between the mobile payment app and the test terminal can refer to existing related technologies and will not be elaborated upon here.
[0035] In this embodiment of the invention, to achieve automatic refresh of the payment page on a mobile payment terminal, a relatively convenient method is for the main test terminal and the slave test terminal to control the mobile payment terminal to refresh the payment page via ADB commands. For example, using... The command `adb shell input (x,y)` locates the top-left corner of the mobile payment app's payment page. This coordinate position is displayed in developer mode.
[0036] S202, take screenshots of the projection interface obtained in step S201 at the second time interval to obtain screenshot images.
[0037] If the screen mirroring interface is set at a fixed position on the test terminal's monitor, a screenshot can be taken at that coordinate position each time. In some cases, if the screen mirroring interface cannot be accurately located, or if the screen mirroring interface is obscured and an accurate screenshot cannot be obtained at the preset coordinate position, a screenshot can also be taken by capturing the target window according to preset rules. For example, the test terminal can locate the interface to be screenshotted based on the process ID (PID) of the current screen mirroring program.
[0038] In this embodiment, the frequency at which the main test terminal and the slave test terminal take screenshots should not exceed the frequency at which the mobile payment terminal refreshes its payment code; otherwise, the same screen will be repeatedly screenshotted, and providing the same screenshot image to the payment device for testing will undoubtedly reduce testing efficiency. Therefore, the second time interval is preferably greater than or equal to the first time interval. Of course, the second time intervals for the main test terminal and the slave test terminal can be different.
[0039] S203, the screenshot image obtained from the test terminal is sent to the main test terminal.
[0040] Screenshots can be sent from the test terminal to the main test terminal in real time via a local area network or other means. Alternatively, multiple screenshots can be packaged together and sent to the main test terminal using public network files or other means.
[0041] S204, the main test terminal provides the payment device with both the screenshot image obtained from the local screenshot and the screenshot image received from the test terminal for recognition and analysis.
[0042] The payment device parses the screenshot image into code data and verifies the code data. The result of the mobile payment device's processing of the screenshot image can be stored within the mobile payment device or sent to the test terminal.
[0043] The main test terminal can sequentially display a screenshot obtained from a local terminal and a screenshot from a secondary test terminal; alternatively, it can store all screenshots from both terminals and then display them at a speed matched to the mobile payment device. The display method adopted by the main test terminal depends primarily on the recognition and parsing response speed of the mobile payment device.
[0044] In other embodiments, the process of steps S101-S103 can be directly made into an automated script or program to completely replace manual operation.
[0045] Compared with Embodiment 1, the embodiments of the present invention can facilitate collaborative work, that is, multiple screenshots generated from the test terminal can also be verified on the main test terminal, which is conducive to further improving the efficiency of mobile payment device testing.
[0046] Example 3 In other embodiments, to simulate multi-user scenarios, a mobile payment device testing method is combined with... Figure 3 As shown, it also includes the following steps: S301, the test terminal controls each mobile payment terminal to refresh the payment code at a third time interval according to a preset first rule, and obtains the screen projection interface of the payment code by screen projection.
[0047] The test terminal can be a PC, tablet, laptop, or other device capable of establishing a screen mirroring relationship with the mobile payment terminal and equipped with a display. The screen mirroring relationship between the mobile payment terminal and the test terminal can be established using the mobile payment terminal's built-in software or third-party screen mirroring software. Alternatively, the open-source tool Scrcpy can be used and modified as needed to support screen mirroring based on the mobile payment terminal's serial number. Of course, a video transmission process between the mobile payment terminal and the test terminal can also be established according to preset rules.
[0048] In this embodiment of the invention, the serial numbers of all mobile payment terminals can be obtained using the adb devices command, and then screen mirroring can be achieved using the following command: scrcpy -s serial number For example, if a mobile payment terminal has the serial number 59cb696f, the specific command is `scrcpy -s 59cb696f`. This method can project the screens of all mobile payment terminals onto the monitor of the test terminal.
[0049] The first preset rule may include: the test terminal refreshes the payment code of the mobile payment terminal simultaneously or in a preset sequence. The command `adb -s 59cb696f shell input (x,y)` can be used to locate the top left corner of the payment page of the mobile payment terminal with serial number 59cb696f to refresh the payment page.
[0050] If the test terminal refreshes the payment code of the mobile payment terminal at the same time, the third time interval can be the same as the first time interval in Embodiment 1. If the test terminal refreshes the payment code of the mobile payment terminal according to a preset time sequence, the third time interval can be multiple first time intervals.
[0051] S302, according to the second preset rule, take a screenshot of the projection interface obtained in step S301 at the fourth time interval to obtain a screenshot image.
[0052] The test terminal screen displays multiple mobile payment client projection interfaces, but the mobile testing device can only recognize and parse one at a time. Therefore, different projection interfaces can be selected for screenshots in a certain order. A second preset rule allows screenshots to be taken based on the coordinates of the target mobile payment client's projection interface. For example, if four mobile payment clients (A, B, C, and D) have established projection relationships with the test terminal, and the projection interfaces are set at fixed positions on the test terminal's display, then screenshots can be taken each time based on the coordinates of each projection interface, such as (DCBA).
[0053] In some cases, if the location of the screen-sharing interface cannot be accurately located, or if the screen-sharing interface is obscured and an accurate screenshot cannot be obtained at the preset coordinates, a screenshot can also be taken by capturing the target window according to preset rules. For example, the test terminal can locate the interface to be screenshotted based on the process ID (PID) of the current screen-sharing program, and then use the QuickGrab tool of the scrcpy software to take the screenshot.
[0054] In this embodiment, the fourth time interval is set according to the specific circumstances of the third time interval to ensure that a different screenshot interface can be obtained each time.
[0055] S303, The screenshot image is provided to the mobile payment device for processing.
[0056] The screen projection interfaces corresponding to different mobile payment terminals are generally located in different positions on the monitor. In order to facilitate the recognition and analysis by mobile payment devices, it is preferable to set the generated screenshot image at the same coordinate position.
[0057] The payment device parses the screenshot image into a code and verifies the code. The result of the mobile payment device's processing of the screenshot image can be stored within the mobile payment device or sent to a test terminal for testers to quickly view the processing result.
[0058] If the mobile payment device's response speed matches the screenshot generation speed, the mobile payment device will capture the screenshot once for each screenshot generated by the test terminal. If the payment device's response speed is slower than the screenshot generation speed, the screenshot can be temporarily stored and then displayed at a speed matching the mobile payment device's speed for capture.
[0059] In other embodiments, the process of steps S301-S303 can be directly made into an automated script or program, completely replacing manual operation.
[0060] In this invention, one test terminal is connected to multiple mobile payment terminals to simulate multi-user payment scenarios. Since the mobile payment terminals are projected onto the test terminal, the refresh of the payment page is automatically controlled by the test terminal, requiring no manual intervention. Furthermore, the test terminal can automatically capture a large number of controllable test payment codes, overcoming the limitation of existing technologies where mobile payment terminals do not allow automatic screenshotting. This mobile payment device testing method can partially or even completely replace manual processes. The large number of payment codes provided helps meet the stability testing requirements of mobile payment device programs, improving product quality and reducing related production costs.
[0061] Example 4 In some instances, compared to Embodiment 3, the test terminal includes a main test terminal and at least one slave test terminal. This mobile payment device testing method, combined with... Figure 4 As shown, it includes the following steps: S401, the test terminal controls each mobile payment terminal to refresh the payment code at a third time interval according to a preset first rule, and obtains the screen projection interface of the payment code by screen projection.
[0062] The test terminal includes a main test terminal and at least one slave test terminal, which respectively receive screen projections from different mobile payment terminals.
[0063] A screen mirroring relationship can be established between the mobile payment app and the test terminal using the app's built-in software or third-party screen mirroring software. Alternatively, the open-source tool Scrcpy can be used and modified as needed to support screen mirroring based on the mobile payment app's serial number. Of course, a video transmission process between the mobile payment app and the test terminal can also be established according to preset rules.
[0064] In this embodiment of the invention, the serial numbers of all mobile payment terminals can be obtained using the adb devices command, and then screen mirroring can be achieved using the following command: scrcpy -s serial number For example, if a mobile payment terminal has the serial number 59cb696f, the specific command is `scrcpy -s 59cb696f`. This method can project the screens of all mobile payment terminals onto the monitor of the test terminal.
[0065] The first preset rule may include: the test terminal refreshes the payment code of the mobile payment terminal simultaneously or in a preset sequence. The command `adb -s 59cb696f shell input (x,y)` can be used to locate the top left corner of the payment page of the mobile payment terminal with serial number 59cb696f to refresh the payment page.
[0066] If the test terminal refreshes the payment code of the mobile payment terminal at the same time, the third time interval can be the same as the first time interval in Embodiment 1. If the test terminal refreshes the payment code of the mobile payment terminal according to a preset time sequence, the third time interval can be multiple first time intervals.
[0067] S402, according to the second preset rule, take a screenshot of the projection interface obtained in step S301 at the fourth time interval to obtain a screenshot image.
[0068] The test terminal screen displays multiple mobile payment client projection interfaces, but the mobile testing device can only recognize and parse one at a time. Therefore, different projection interfaces can be selected for screenshots in a certain order. A second preset rule allows screenshots to be taken based on the coordinates of the target mobile payment client's projection interface. For example, if four mobile payment clients (A, B, C, and D) have established projection relationships with the test terminal, and the projection interfaces are set at fixed positions on the test terminal's display, then screenshots can be taken each time based on the coordinates of each projection interface, such as (DCBA).
[0069] In some cases, if the location of the screen-sharing interface cannot be accurately located, or if the screen-sharing interface is obscured and an accurate screenshot cannot be obtained at the preset coordinates, a screenshot can also be taken by capturing the target window according to preset rules. For example, the test terminal can locate the interface to be screenshotted based on the process ID (PID) of the current screen-sharing program, and then use the QuickGrab tool of the scrcpy software to take the screenshot.
[0070] In this embodiment, the fourth time interval is set according to the specific circumstances of the third time interval to ensure that a different screenshot interface can be obtained each time.
[0071] S403, the screenshot image obtained from the test terminal is sent to the main test terminal.
[0072] Screenshots can be sent from the test terminal to the main test terminal in real time via a local area network or other means. Alternatively, multiple screenshots can be packaged together and sent to the main test terminal using public network files or other means.
[0073] S404, the main test terminal provides the payment device with both the screenshot image obtained from the local screenshot and the screenshot image received from the test terminal for recognition and analysis.
[0074] The screen projection interfaces corresponding to different mobile payment terminals are generally located in different positions on the monitor. In order to facilitate the recognition and analysis by mobile payment devices, it is preferable to set the generated screenshot image at the same coordinate position.
[0075] The payment device parses the screenshot image into a code and verifies the code. The result of the mobile payment device's processing of the screenshot image can be stored within the mobile payment device or sent to a test terminal for testers to quickly view the processing result.
[0076] The main test terminal can sequentially display a screenshot obtained from a local terminal and a screenshot from a secondary test terminal; alternatively, it can store all screenshots from both terminals and then display them at a speed matched to the mobile payment device. The display method adopted by the main test terminal depends primarily on the recognition and parsing response speed of the mobile payment device.
[0077] Compared with Embodiment 3, the embodiments of the present invention can facilitate collaborative work, that is, multiple payment codes generated from the test terminal can also be verified on the main test terminal, which is conducive to further improving the testing efficiency of mobile payment devices.
[0078] Example 5 This invention provides a mobile payment device testing system, combined with Figure 5 As shown, the system includes a test terminal 10 and a corresponding mobile payment terminal 20. In this example, there are three test terminals 10 and three mobile payment terminals 20.
[0079] The mobile payment terminal 20 can be a mobile phone, smartwatch, tablet, etc., used to establish a screen projection relationship with the test terminal 10, project the payment code onto the test terminal 10, and receive control from the test terminal 10 to refresh the payment code at a preset first time interval.
[0080] The mobile payment terminal 20 can have a built-in screen mirroring function or install third-party screen mirroring software, and can also establish a video transmission process between the mobile payment terminal 20 and the test terminal 10 according to preset rules.
[0081] The test terminal 10 includes a display 11 and a processor 12. The display 11 is used to display a projection interface corresponding to the payment code of the mobile payment terminal 20. The processor 12 is used to control the mobile payment terminal 20 to refresh the payment code at a preset first time interval to obtain the projection interface of the payment code; it is also used to take screenshots of the projection interface at a second time interval to obtain screenshot images and provide them to the mobile payment device for processing.
[0082] Since the mobile payment terminal 20 is projected onto the test terminal 10, the refresh of the payment page on the mobile payment terminal 20 is automatically controlled by the test terminal 10, requiring no manual intervention. Furthermore, the test terminal 10 can automatically take numerous screenshots to overcome the limitation of existing technologies where the mobile payment terminal 20 does not allow automatic screenshots. Therefore, the mobile payment device testing system of this invention can partially or even completely replace manual processes. The large number of payment codes provided helps meet the stability testing requirements of the mobile payment device program, improves the product quality of mobile payment devices, and reduces related production costs.
[0083] Since each test terminal 10's display can only be processed by one payment device, three payment devices are required to complete the test of the payment codes of three mobile payment terminals 20.
[0084] Preferred, combined Figure 6 As shown, the test terminal 10 includes a main test terminal 10 and two slave test terminals 10. The slave test terminals 10 are also used to send the obtained screenshot images to the main test terminal 10. The main test terminal 10 provides the local screenshot images and the received screenshot images from the slave test terminals 10 together for the payment equipment to process and verify.
[0085] The test system sends multiple screenshots generated from test terminal 10 to the main test terminal 10. Therefore, only one payment device needs to be pointed at the display of the main test terminal 10 to test the payment codes of three mobile payment terminals 20. This test system facilitates collaborative work, improves testing efficiency, and reduces testing costs.
[0086] The specific workflow of the mobile payment device testing system in this example can be found in Examples 1 and 2, and will not be repeated here.
[0087] Example 6 This invention provides a mobile payment device testing system, combined with Figure 7 As shown, the system includes a test terminal 10 and a mobile payment terminal 20. The test terminal 10 and the mobile payment terminal 20 have a one-to-many relationship. There are three test terminals 10 in the figure. Each test terminal 10 is connected to two mobile payment terminals 20, which can simulate a multi-user payment scenario and help improve the accuracy of the test.
[0088] Mobile payment terminal 20 can be a mobile phone, smartwatch, tablet, etc., used to establish a screen mirroring relationship with test terminal 10, project the payment code onto test terminal 10, and receive control from test terminal 10 to refresh the payment code at a preset third time interval. It is also used to establish a screen mirroring relationship with test terminal 10 according to a preset first rule, project the payment code onto test terminal 10, and receive control from test terminal 10 to refresh the payment code at a preset time interval. The preset first rule includes: each mobile payment terminal 20 establishes a screen mirroring relationship with test terminal 10 separately according to a preset time sequence, or each mobile payment terminal 20 establishes a screen mirroring relationship with test terminal 10 simultaneously.
[0089] The test terminal 10 includes a display 11 and a processor 12. The display 11 is used to display the projection interface corresponding to the payment code of the mobile payment terminal 20. The processor 12 is used to control the mobile payment terminal 20 to refresh the payment code at a third time interval according to a preset first rule, and to obtain the projection interface of the payment code; it is also used to take screenshots of the target projection interface at a second time interval according to a second preset rule to obtain screenshot images and provide them to the mobile payment device for processing.
[0090] Since each test terminal 10's display can only be recognized and parsed by one payment device, three payment devices are required to complete the test of the payment codes of the three mobile payment terminals 20.
[0091] Preferred, combined Figure 8 As shown, the test terminal 10 includes a main test terminal 10 and two slave test terminals 10. The slave test terminals 10 are also used to send the obtained screenshot images to the main test terminal 10. The main test terminal 10 provides the payment machine with the locally generated screenshot images and the received screenshot images from the slave test terminals 10.
[0092] The test system sends multiple screenshots generated from test terminal 10 to the main test terminal 10. Therefore, only one payment device needs to be pointed at the display of the main test terminal 10 to test the payment codes of three mobile payment terminals 20. This test system facilitates collaborative work, improves testing efficiency, and reduces testing costs.
[0093] The specific workflow of the mobile payment device testing system in this example can be found in Examples 3 and 4, and will not be repeated here.
[0094] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process may be rearranged without departing from the scope of this disclosure. The appended method claims provide elements of various steps in an exemplary order and are not intended to limit the scope to the specific order or hierarchy described.
[0095] In the detailed description above, various features are combined together in a single embodiment to simplify this disclosure. This approach to disclosure should not be construed as reflecting an intention that embodiments of the claimed subject matter require more features than are explicitly stated in each claim. Rather, as reflected in the appended claims, the invention is presented with fewer features than all of the features in a single disclosed embodiment. Therefore, the appended claims are hereby explicitly incorporated into the detailed description, with each claim representing a separate preferred embodiment of the invention.
[0096] Those skilled in the art will also understand that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments herein can be implemented as electronic hardware, computer software, or a combination thereof. To clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art can implement the described functionality in alternative ways for each specific application; however, such implementation decisions should not be construed as departing from the scope of this disclosure.
[0097] The steps of the methods or algorithms described in conjunction with the embodiments herein can be directly embodied in hardware, software modules executed by a processor, or a combination thereof. The software modules can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in a user terminal. Alternatively, the processor and storage medium can exist as discrete components in the user terminal.
[0098] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. This software code can be stored in memory units and executed by a processor. The memory units can be implemented within the processor or outside the processor; in the latter case, they are communicatively coupled to the processor via various means, as is well known in the art.
[0099] The foregoing description includes examples of one or more embodiments. It is certainly impossible to describe all possible combinations of components or methods in order to describe the above embodiments, but those skilled in the art will recognize that further combinations and arrangements of the various embodiments are possible. Therefore, the embodiments described herein are intended to cover all such changes, modifications, and variations that fall within the scope of the appended claims. Furthermore, the term "comprising" as used in the specification or claims is interpreted in a manner similar to the term "including," as interpreted when used as a conjunction in the claims. Additionally, the use of any term "or" in the specification of the claims is intended to mean "non-exclusive or."
Claims
1. A method for testing mobile payment devices, characterized in that, Includes the following steps: The test terminal controls each mobile payment terminal to refresh the payment code at a third time interval according to a first preset rule, and obtains the screen projection interface of the payment code by screen projection. The test terminal includes a main test terminal and at least one slave test terminal. The main test terminal and the slave test terminal are respectively connected to different mobile payment terminals. The main test terminal includes at least a display and a processor. According to the second preset rule, the target projection interface is captured at the fourth time interval to obtain the screenshot image; The test terminal also sends the screenshots obtained to the main test terminal; The main test terminal sets the screenshot image obtained from the local screenshot and the screenshot image received from the test terminal at the same coordinate position on the display, and provides them to the payment device for recognition, analysis and processing results. The main test terminal is also used to receive the processing results returned by the payment device to determine whether the mobile payment device can work normally; The first preset rule includes at least: the test terminal refreshes the payment code of the mobile payment terminal simultaneously or in a preset sequence.
2. The mobile payment device testing method as described in claim 1, characterized in that, The second preset rule includes: Take a screenshot of the target mobile payment terminal's projection interface at its coordinates; or capture the target window and take a screenshot according to preset rules.
3. The mobile payment device testing method as described in claim 1, characterized in that, Also includes: The obtained screenshot image is set in a preset position for mobile payment devices to collect.
4. The mobile payment device testing method as described in claim 1, characterized in that, Also includes: The test terminal obtains the serial numbers of each mobile payment terminal using the adb devices command, and then uses the following command to project the screen of each mobile payment terminal onto the test terminal's display: scrcpy -s serial number.
5. The mobile payment device testing method as described in claim 2, characterized in that, Also includes: The test terminal uses the adb shell input(x,y) command to refresh the payment page of the mobile payment terminal, where x is the horizontal coordinate of the top left corner of the payment page and y is the vertical coordinate of the top left corner of the payment page.
6. The mobile payment device testing method as described in claim 1, characterized in that, Also includes: The test terminal also locates the interface that needs to be captured based on the process ID of the current screen mirroring program, and uses a screenshot tool to complete the screenshot.
7. A mobile payment device testing system, characterized in that, This includes test terminals and mobile payment terminals, wherein the relationship between the test terminals and mobile payment terminals is one-to-many, and: The mobile payment terminal is used to establish a screen projection relationship with the test terminal, project the payment code onto the test terminal, and receive control from the test terminal to refresh the payment code at a preset third time interval. The test terminal includes a main test terminal and at least one slave test terminal, which are respectively connected to different mobile payment terminals. A test terminal is used to control a mobile payment terminal to refresh the payment code at a third time interval according to a first preset rule, and to obtain the projection interface of the payment code. The first preset rule includes at least: the test terminal refreshes the payment code of the mobile payment terminal simultaneously or in a preset sequence; it is also used to take screenshots of the target projection interface at a fourth time interval according to a second preset rule to obtain screenshot images, wherein the test terminal also sends the obtained screenshot images to a main test terminal; the main test terminal also sets the locally obtained screenshot image and the received screenshot image from the test terminal at the same coordinate position on the display, and provides them to the payment device for recognition, parsing and generating processing results; the main test terminal is also used to receive the processing results returned by the payment device to determine whether the mobile payment device can work normally, and the main test terminal includes at least a display and a processor.
Citation Information
Patent Citations
Payment method and mobile terminal
CN106204027A
Scan code payment test method and system for controlling barcode
CN108701389A
Screen projection device for payment outside vehicle
CN208848250U