A method for automated testing of POS terminals based on multi-core
The multi-core automated testing method for POS terminals solves the problem of low testing efficiency in existing technologies, achieves efficient and accurate performance testing, and reduces manual operation errors and operating costs.
Patent Information
- Application Number
- CN202411694358.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Existing POS terminal testing methods are inefficient and slow, making it difficult to achieve efficient and comprehensive performance testing.
Adopting the multi-core automated testing method based on POS terminal, the target test tool is connected to the POS terminal, a test file set is generated, and the test plan is automatically executed to achieve comprehensive performance testing of each core.
Improved testing efficiency, reduced error rates and manual operation errors, and ensured testing accuracy and cost-effectiveness.
Smart Images

Figure CN119645843B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electronic communication and financial payment, and in particular relates to a method for multi-core automatic testing based on a POS terminal. Background Art
[0002] With the rise of electronic payments, POS terminals have become an integral part of the commercial landscape. As POS terminals become more widely used in production, their performance stability and security have become paramount. Therefore, comprehensive performance testing of POS terminals is necessary. Existing testing methods rely on manually selecting different test cases, resulting in slow testing progress and low efficiency. Summary of the Invention
[0003] In view of the defects of the prior art, the present invention provides a method based on multi-core automated testing of POS terminals, which can effectively solve the above problems.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] The present invention provides a method for multi-core automated testing of a POS terminal, comprising the following steps:
[0006] Step S1: a POS terminal and a target test tool establish a communication connection;
[0007] Step S2: The POS terminal sends a test request to the target test tool, wherein the test request includes POS terminal information; the POS terminal information includes the type and number of kernels that are configured on the POS terminal and to be tested this time;
[0008] In step S3, the target test tool receives and parses the test request to obtain the type and number of kernels configured in the POS terminal and to be tested, and then generates a test file set; the test file set includes an application identifier for identifying each kernel in the POS terminal, a set of test solutions for testing each kernel, and a public key of the POS terminal.
[0009] Wherein: the specific method for generating the test scheme set is:
[0010] Step S3.1: The target testing tool generates, for each kernel of the POS terminal to be tested, an application identifier for identifying the kernel and a plurality of test cases;
[0011] Wherein: for each kernel to be tested in the POS terminal, the target test tool plans multiple test points for performance testing thereof, and generates a test case for each test point. Thus, for all the planned test points of each kernel, multiple test cases are generated, and each test case corresponds to the application identifier of the kernel to be tested;
[0012] Step S3.2: Therefore, the target testing tool creates a test case set for all kernels to be tested in the POS terminal; the test case set stores application identifiers and corresponding test cases;
[0013] Step S4: the target testing tool sends the application identifier for identifying each kernel of the POS terminal and the POS terminal public key to the POS terminal;
[0014] Step S5, the POS terminal saves the received POS terminal public key and saves each application identifier in a kernel file of the corresponding kernel;
[0015] In step S6, the target testing tool automatically polls each test scheme in the test scheme set in the test file set according to the test file set generated in step S3. Whenever a test scheme is polled, the target testing tool interacts with the POS terminal based on the test scheme and performs performance testing on the corresponding core of the POS terminal until all test schemes are polled, thereby achieving comprehensive performance testing of multiple test points of each core of the POS terminal.
[0016] Preferably, step S6 is specifically as follows:
[0017] Step S6.1, the target test tool automatically polls each test solution in the test solution set, and whenever a test solution is polled, encapsulates the test solution and the corresponding application identifier into a virtual test card;
[0018] Step S6.2: The target testing tool sends a test instruction to the POS terminal to initiate a transaction; wherein the test instruction carries the transaction amount to be traded;
[0019] Step S6.3: When the POS terminal receives the transaction amount, it polls each configured kernel, checks the transaction amount limit on each kernel, obtains one or more kernels that meet the limit requirement, and marks them;
[0020] Step S6.4: The POS terminal sends an initial transaction request to the virtual test card; upon receiving the initial transaction request, the virtual test card returns an internally encapsulated application identifier to the POS terminal;
[0021] Step S6.5: The POS terminal compares the application identifier returned by the virtual test card with the application identifier in the kernel file of each kernel marked in step S6.3. If a match is found, the kernel to be tested is found, which is called the target kernel.
[0022] Step S6.6, the POS terminal causes the target kernel to perform a transaction with the virtual test card, and causes the virtual test card to perform the transaction amount in step S6.2 through the target kernel;
[0023] Step S6.7: The target test tool checks the virtual test card to determine whether the transaction is successful, thereby obtaining and saving the test result.
[0024] Step S6.8: The target test tool recycles the virtual test card;
[0025] This completes the execution of this test plan.
[0026] Preferably, in step S6.4, the POS terminal sends an initial transaction request to the virtual test card. When the virtual test card receives the initial transaction request, it returns an internally encapsulated application identifier to the POS terminal and simultaneously returns a POS terminal public key to the POS terminal.
[0027] The POS terminal verifies whether the POS terminal public key is consistent with the POS terminal public key saved in step S5; if they are consistent, it indicates that the virtual test card is a legal virtual test card, and then step S6.5 is executed.
[0028] The present invention provides a method for automated testing of POS terminals based on multi-cores, which has the following advantages:
[0029] 1. Simplify the process and ensure the accuracy of POS terminal testing.
[0030] Current POS terminal testing methods rely on manually operating different test scenarios, resulting in slow testing progress and low efficiency. The multi-core automated testing method adopted by this invention can integrate different test scenarios and conduct comprehensive testing and verification of all test points in each core, significantly reducing the error rate during testing and improving test accuracy.
[0031] 2. Improve POS terminal testing efficiency and reduce operating costs for testers.
[0032] Automated testing processes can significantly reduce testing time. Among many complex testing scenarios, they can conduct testing processes efficiently and stably, perform testing work uninterruptedly, and effectively reduce manual operation time, operational error rate, and the number of personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 The present invention provides a flowchart of a method for automated testing of POS terminals based on multiple cores. DETAILED DESCRIPTION
[0034] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0035] The present invention provides a method for POS terminal multi-core automatic testing and terminal multi-core configuration automatic testing
[0036] When the terminal supports multiple cores, relevant test cases can be automatically matched for automated testing.
[0037] Once the test software is running, the terminal can communicate with the software via serial or wireless communication, providing the terminal with the ability to download various application identifiers, multiple sets of terminal public keys, and other parameter data. The test system generates single-core or multi-core test cases based on the configuration files sent by the terminal. The terminal then uses the application identifier to match the specific application kernel to execute subsequent transaction processes.
[0038] See Figure 1 The present invention provides a method for multi-core automated testing of a POS terminal, comprising the following steps:
[0039] Step S1: a POS terminal and a target test tool establish a communication connection;
[0040] In specific implementation, the process of establishing a communication connection between the POS terminal and the target test tool can be achieved through the following methods:
[0041] S1.1, POS terminal runs the target test tool:
[0042] The POS terminal can communicate with the target test tool via a USB cable or WIFI; determine whether the communication connection is successful. If the communication connection is successful, execute S1.3; otherwise, execute S1.2;
[0043] S1.2: The POS terminal prompts that the connection failed, and returns to S1.1, restarts the target test tool, and establishes a communication connection between the POS terminal and the target test tool.
[0044] S1.3, the POS terminal and the target test tool successfully establish a communication connection.
[0045] Step S2: The POS terminal sends a test request to the target test tool, wherein the test request includes POS terminal information; the POS terminal information includes the type and number of kernels that are configured on the POS terminal and to be tested this time;
[0046] In other words, the POS terminal can flexibly set the type and number of cores to be tested, which can be one core or multiple cores, and has the advantage of flexible configuration.
[0047] When the POS terminal sends a test request to the target test tool, if the test request is sent successfully, step S3 is executed; otherwise, the POS terminal prompts that the sending request fails and asks to resend the message, and the POS terminal resends the test request until the test request is sent successfully.
[0048] In step S3, the target test tool receives and parses the test request to obtain the type and number of kernels configured in the POS terminal and to be tested, and then generates a test file set; the test file set includes an application identifier for identifying each kernel in the POS terminal, a set of test solutions for testing each kernel, and a public key of the POS terminal.
[0049] Wherein: the specific method for generating the test scheme set is:
[0050] Step S3.1: The target testing tool generates, for each kernel of the POS terminal to be tested, an application identifier for identifying the kernel and a plurality of test cases;
[0051] Wherein: for each kernel to be tested in the POS terminal, the target test tool plans multiple test points for performance testing thereof, and generates one or more test cases for each test point. Thus, for all the planned test points of each kernel, multiple test cases are generated, and each test case corresponds to the application identifier of the kernel to be tested;
[0052] Step S3.2: Therefore, the target testing tool creates a test case set for all kernels to be tested in the POS terminal; the test case set stores application identifiers and corresponding test cases;
[0053] For example, if performance tests need to be performed on three cores this time, three application identifiers are stored in the test case set, and each application identifier corresponds to multiple test cases.
[0054] Step S4: the target testing tool sends the application identifier for identifying each kernel of the POS terminal and the POS terminal public key to the POS terminal;
[0055] Step S5, the POS terminal saves the received POS terminal public key and saves each application identifier in a kernel file of the corresponding kernel;
[0056] In step S6, the target testing tool automatically polls each test scheme in the test scheme set in the test file set according to the test file set generated in step S3. Whenever a test scheme is polled, the target testing tool interacts with the POS terminal based on the test scheme and performs performance testing on the corresponding core of the POS terminal until all test schemes are polled, thereby achieving comprehensive performance testing of multiple test points of each core of the POS terminal.
[0057] Step S6 is specifically as follows:
[0058] Step S6.1, the target test tool automatically polls each test solution in the test solution set, and whenever a test solution is polled, encapsulates the test solution and the corresponding application identifier into a virtual test card;
[0059] Step S6.2: The target testing tool sends a test instruction to the POS terminal to initiate a transaction; wherein the test instruction carries the transaction amount to be traded;
[0060] For example, the test plan is to test a transaction in which a kernel pays a transaction amount of 10 yuan. The target test tool sends a test instruction to the POS terminal to pay the transaction amount of 10 yuan.
[0061] Step S6.3: When the POS terminal receives the transaction amount, it polls each configured kernel, checks the transaction amount limit on each kernel, obtains one or more kernels that meet the limit requirement, and marks them;
[0062] Step S6.4: The POS terminal sends an initial transaction request to the virtual test card; upon receiving the initial transaction request, the virtual test card returns an internally encapsulated application identifier to the POS terminal;
[0063] In this step, the POS terminal sends an initial transaction request to the virtual test card. When the virtual test card receives the initial transaction request, it returns an internally encapsulated application identifier to the POS terminal and also returns a POS terminal public key to the POS terminal.
[0064] The POS terminal verifies whether the POS terminal public key is consistent with the POS terminal public key saved in step S5; if they are consistent, it indicates that the virtual test card is a legal virtual test card, and then step S6.5 is executed.
[0065] Step S6.5: The POS terminal compares the application identifier returned by the virtual test card with the application identifier in the kernel file of each kernel marked in step S6.3. If a match is found, the kernel to be tested is found, which is called the target kernel.
[0066] Step S6.6, the POS terminal causes the target kernel to perform a transaction with the virtual test card, and causes the virtual test card to perform the transaction amount in step S6.2 through the target kernel;
[0067] Step S6.7: The target test tool checks the virtual test card to determine whether the transaction is successful, thereby obtaining and saving the test result.
[0068] Step S6.8: The target test tool recycles the virtual test card;
[0069] This completes the execution of this test plan.
[0070] When the POS terminal communicates with the target test tool, the communication data format can be: data transmission format start bit + length + transmission data + check bit + end bit.
[0071] Compared with the prior art, the method of the present invention based on POS terminal multi-core automated testing has the following advantages:
[0072] 1. Simplify the process and ensure the accuracy of POS terminal testing.
[0073] Current POS terminal testing methods rely on manually operating different test scenarios, resulting in slow testing progress and low efficiency. The multi-core automated testing method adopted by this invention can integrate different test scenarios and conduct comprehensive testing and verification of all test points in each core, significantly reducing the error rate during testing and improving test accuracy.
[0074] 2. Improve POS terminal testing efficiency and reduce operating costs for testers.
[0075] Automated testing processes can significantly reduce testing time. Among many complex testing scenarios, they can conduct testing processes efficiently and stably, perform testing work uninterruptedly, and effectively reduce manual operation time, operational error rate, and the number of personnel.
[0076] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for automated testing of multi-core POS terminals, characterized in that: The following steps are involved: Step S1: a POS terminal and a target test tool establish a communication connection; Step S2: The POS terminal sends a test request to the target test tool, wherein the test request includes POS terminal information; The POS terminal information includes the type and number of kernels that are configured on the POS terminal and need to be tested this time; In step S3, the target test tool receives and parses the test request to obtain the type and number of kernels configured in the POS terminal and to be tested, and then generates a test file set; the test file set includes an application identifier for identifying each kernel in the POS terminal, a set of test solutions for testing each kernel, and a public key of the POS terminal. Wherein: the specific method for generating the test scheme set is: Step S3.1: The target testing tool generates, for each kernel of the POS terminal to be tested, an application identifier for identifying the kernel and a plurality of test cases; Wherein: for each kernel to be tested in the POS terminal, the target test tool plans multiple test points for performance testing thereof, and generates a test case for each test point. Thus, for all the planned test points of each kernel, multiple test cases are generated, and each test case corresponds to the application identifier of the kernel to be tested; Step S3.2: Therefore, the target testing tool creates a test case set for all kernels to be tested in the POS terminal; the test case set stores application identifiers and corresponding test cases; Step S4: the target testing tool sends the application identifier for identifying each kernel of the POS terminal and the POS terminal public key to the POS terminal; Step S5, the POS terminal saves the received POS terminal public key and saves each application identifier in a kernel file of the corresponding kernel; In step S6, the target testing tool automatically polls each test scheme in the test scheme set in the test file set according to the test file set generated in step S3. Whenever a test scheme is polled, the target testing tool interacts with the POS terminal based on the test scheme and performs performance testing on the corresponding core of the POS terminal until all test schemes are polled, thereby achieving comprehensive performance testing of multiple test points of each core of the POS terminal.
2. A method for multi-core automated testing of POS terminals according to claim 1, characterized in that: Step S6 is specifically as follows: Step S6.1, the target test tool automatically polls each test solution in the test solution set, and whenever a test solution is polled, encapsulates the test solution and the corresponding application identifier into a virtual test card; Step S6.2: The target testing tool sends a test instruction to the POS terminal to initiate a transaction; wherein the test instruction carries the transaction amount to be traded; Step S6.3: When the POS terminal receives the transaction amount, it polls each configured kernel, checks the transaction amount limit on each kernel, obtains one or more kernels that meet the limit requirement, and marks them; Step S6.4: The POS terminal sends an initial transaction request to the virtual test card; upon receiving the initial transaction request, the virtual test card returns an internally encapsulated application identifier to the POS terminal; Step S6.5: The POS terminal compares the application identifier returned by the virtual test card with the application identifier in the kernel file of each kernel marked in step S6.
3. If a match is found, the kernel to be tested is found, which is called the target kernel. Step S6.6, the POS terminal causes the target kernel to perform a transaction with the virtual test card, and causes the virtual test card to perform the transaction amount in step S6.2 through the target kernel; Step S6.7: The target test tool checks the virtual test card to determine whether the transaction is successful, thereby obtaining and saving the test result. Step S6.8: The target test tool recycles the virtual test card; This completes the execution of this test plan.
3. A method based on multi-core automated testing of POS terminals according to claim 2, characterized in that: In step S6.4, the POS terminal sends an initial transaction request to the virtual test card. Upon receiving the initial transaction request, the virtual test card returns an internally encapsulated application identifier to the POS terminal, and also returns a POS terminal public key to the POS terminal. The POS terminal verifies whether the POS terminal public key is consistent with the POS terminal public key saved in step S5; If they are consistent, it indicates that the virtual test card is a legal virtual test card, and then step S6.5 is executed.
Citation Information
Patent Citations
Terminal authentication report auditing method and device
CN114048123A
Offline dynamic personalization IC card testing method for POS (Point-Of-Sale) machine
CN116149989A