CN107391361B - Automatic POS terminal testing method and device - Google Patents

Automatic POS terminal testing method and device Download PDF

Info

Publication number
CN107391361B
CN107391361B CN201710440337.8A CN201710440337A CN107391361B CN 107391361 B CN107391361 B CN 107391361B CN 201710440337 A CN201710440337 A CN 201710440337A CN 107391361 B CN107391361 B CN 107391361B
Authority
CN
China
Prior art keywords
test
pos terminal
execution
executed
execution sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710440337.8A
Other languages
Chinese (zh)
Other versions
CN107391361A (en
Inventor
吕更
李健
杨维
蓝海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PAX Computer Technology Shenzhen Co Ltd
Original Assignee
PAX Computer Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PAX Computer Technology Shenzhen Co Ltd filed Critical PAX Computer Technology Shenzhen Co Ltd
Priority to CN201710440337.8A priority Critical patent/CN107391361B/en
Priority to PCT/CN2017/095891 priority patent/WO2018227735A1/en
Publication of CN107391361A publication Critical patent/CN107391361A/en
Application granted granted Critical
Publication of CN107391361B publication Critical patent/CN107391361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

The invention is applicable to the technical field of POS terminals, and provides a method and a device for automatically testing a POS terminal, which comprises the steps of calling an XM L-RPC protocol by using a remote process, downloading and downloading a case from a web-based case management system TEST L INK, obtaining a selected TEST attribute, screening the case to be executed from the downloaded case according to the selected TEST attribute, selecting keywords from the case to be executed for sorting to obtain an execution sequence, controlling the POS terminal to batch process or singly execute the case according to the execution sequence, and uploading a TEST result after the execution is finished.

Description

Automatic POS terminal testing method and device
Technical Field
The invention belongs to the technical field of POS terminals, and particularly relates to an automatic testing method and device of a POS terminal.
Background
Along with economic development, the configuration of POS terminal is more and more powerful, and the function is more and more complete, when the user need accomplish commodity payment, can carry out the consumption of punching the card through the POS terminal to enjoy the quick payment experience that the POS terminal brought, in addition, before the POS machine is thrown into the use, need test the POS machine.
However, the reason why the conventional POS terminal needs to manually fill the TEST result in the TEST L INK and record log information when testing the case is not favorable for improving the TEST efficiency is that although the TEST result can be updated to the TEST L INK by manually filling the TEST result in the TEST L INK, the process can only be manually completed by the user, the operation steps are complicated, and when there are many cases, the time consumed is too long, which affects the TEST efficiency,
disclosure of Invention
In view of this, embodiments of the present invention provide an automatic testing method and apparatus for a POS terminal, so as to solve the problem that the existing POS terminal needs to manually fill a TEST result on TEST L INK and record log information when testing a case, which is not beneficial to improving the testing efficiency.
A first aspect of an embodiment of the present invention provides an automatic POS terminal testing method, including:
downloading use cases from a web-based use case management system TEST L INK by using a remote procedure call XM L-RPC protocol;
acquiring the selected test attribute, and screening out the use cases to be executed from the downloaded use cases according to the selected test attribute;
selecting keywords from the cases to be executed for sequencing to obtain an execution sequence;
and controlling the POS terminal to carry out batch processing or single execution of the use cases according to the execution sequence, and uploading the test result after the execution is finished.
A second aspect of the embodiments of the present invention provides an automatic POS terminal testing apparatus, including:
the download module is used for downloading the use case from a web-based use case management system TEST L INK by using a remote procedure call XM L-RPC protocol;
the screening module is used for acquiring the selected test attributes and screening the cases to be executed from the downloaded cases according to the selected test attributes;
the sorting module is used for selecting keywords from the cases to be executed for sorting to obtain an execution sequence;
and the test module is used for controlling the POS terminal to carry out batch processing or single execution of the cases according to the execution sequence, and uploading the test result after the execution is finished.
A third aspect of the embodiments of the present invention provides an automatic POS terminal testing apparatus/terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above-described method.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
1) the TEST L INK is remotely operated by using an XM L-RPC protocol, so that the downloading of use cases and the uploading of TEST results are realized;
2) reliable protocols are used for communicating with the POS terminal, so that the execution of a case on the POS terminal is controlled, and the purpose of automatic testing is realized;
3) and the modes of filtering, sequencing, batch processing or single execution case are provided, so that the test personnel can execute the cases according to the requirements greatly.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating an implementation of a method for automatically testing a POS terminal according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an implementation of downloading and displaying use cases from a web-based use case management system TEST L INK using a remote procedure call XM L-RPC protocol in the automatic POS terminal testing method according to the embodiment of the present invention;
fig. 3 is a flowchart illustrating implementation of filtering cases and sorting in an automatic POS terminal testing method according to an embodiment of the present invention;
fig. 4 is a flowchart of an application for executing a test in the automatic POS terminal testing method according to the embodiment of the present invention;
fig. 5 is a sequence diagram of a thread in the automatic POS terminal testing method according to the embodiment of the present invention;
FIG. 6 is a flowchart illustrating an application of uploading test results according to an embodiment of the present invention;
FIG. 7 is a block diagram of an automatic testing apparatus for POS terminals according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an automatic POS terminal testing apparatus/terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the terminal devices described in embodiments of the invention include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a terminal device that includes a display and a touch-sensitive surface is described. However, it should be understood that the terminal device may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The terminal device supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the terminal device may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Example one
Referring to fig. 1, fig. 1 is a flowchart of an implementation of an automatic POS terminal testing method provided in an embodiment of the present invention, where the method is applied to a terminal device, and the automatic POS terminal testing method shown in fig. 1 may include the following steps:
s101, downloading a use case from a web-based use case management system TEST L INK by using a remote procedure call XM L-RPC protocol;
wherein, S101 specifically comprises:
acquiring a server address, a user name and a key, and connecting a web-based use case management system TEST L INK according to the server address, the user name and the key;
the Remote Procedure Call XM L-RPC protocol is used to download the specified use case from the TEST L INK according to the selected acquisition project, plan and version, XM L-RPC protocol is XM L Remote Procedure Call, Remote Procedure Call.
S102, obtaining the selected test attributes, and screening out the cases to be executed from the downloaded cases according to the selected test attributes;
the method comprises the following steps of obtaining selected test attributes, screening out a to-be-executed use case from downloaded use cases according to the selected test attributes, and specifically comprising the following steps:
displaying a test attribute list, wherein the test attribute list comprises at least one test attribute of a test mode, a priority, a test type, test time and an execution state;
acquiring the selected test attribute according to the selection operation;
and screening out the use cases from the downloaded use cases according to the selected test attributes.
And filtering the downloaded use cases according to the selected test attributes, and screening out the use cases to be executed.
In S103, selecting keywords from the cases to be executed for sorting, and obtaining an execution sequence, specifically:
selecting a keyword;
and sorting the use cases to be executed by adopting the selected keywords and a multi-level sorting mode to obtain an execution sequence, and displaying the sorted use cases.
And S104, controlling the POS terminal to carry out batch processing or single execution of the use cases according to the execution sequence, and uploading the test result after the execution is finished.
And controlling the POS terminal to carry out batch processing or single execution of the use cases by adopting a multi-thread coordinated communication mode according to the execution sequence, and uploading a test result after the execution is finished, wherein the multi-thread comprises a main thread, a control thread, a test running thread and a serial port thread.
TEST results were uploaded to TEST L INK using XM L-RPC protocol.
There are two embodiments of S104, which are detailed as follows:
according to the first implementation mode, according to the execution sequence, a command for executing a use case is sent to the POS terminal through a serial communication protocol or a parallel communication protocol, after the POS terminal finishes executing the use case to be executed, a TEST result is obtained, and the TEST result is uploaded to TEST L INK.
In the second implementation mode, heartbeat detection is adopted to judge whether a communication link between the communication link and the POS terminal is normally connected;
after normal connection, according to an execution sequence, sending an instruction of executing a case to the POS terminal through a serial port communication protocol, and monitoring POS terminal data by using a serial port thread;
when the POS terminal data is monitored to arrive, informing the test operation thread to receive and process the POS terminal data, and after a test result is obtained, informing the control operation thread to record the test result;
after the recording is finished, adding the next use case to be executed according to the execution sequence, and reciprocating in sequence;
and after the POS terminal finishes executing the to-be-executed use case, acquiring a TEST result, and uploading the TEST result to TEST L INK.
For convenience of explanation, the following is a preferred application flow of the automatic testing method for the POS terminal, which is detailed as follows:
1. downloading a specified use case from a TEST L INK, setting a remote procedure call XM L-RPC protocol, downloading the protocol content of the use case from a web-based use case management system TEST L INK, acquiring use case information to be executed, displaying ATC software by using a form control of JAVA, and providing right key support;
2. filtering, providing modules and various test attributes, wherein a pull-down list and buttons of JAVA are used for control, filtered data display still uses a table control, but a list of controls is customized, check box functions are supported, and screening actions can be detailed;
3. sorting is carried out after screening, a high-level function is used to support multi-level sorting, and execution is carried out after sorting is finished;
4. when executing the use case, sending an instruction of executing the use case through a serial port communication protocol, obtaining a TEST result after the POS execution is finished, and uploading the TEST result to TEST L INK.
The embodiment of the invention has the following beneficial effects:
in the first aspect, the TEST L INK is remotely operated by using an XM L-RPC protocol to realize the downloading of use cases and the uploading of results;
in the second aspect, reliable protocols are used for communicating with the POS terminal to control the execution of the use cases on the POS terminal, so that the purpose of automatic testing is realized, and the testing efficiency is improved;
in the third aspect, various filtering, sorting, batch processing or single execution cases are provided, so that the use cases can be executed by a tester according to needs, and the human resource investment is reduced;
in the fourth aspect, the automatic test software of the POS terminal realized by JAVA can be compatible with all windows series systems, supports 32bit and 64bit platforms and is easy to transplant.
Example two
Referring to fig. 2, fig. 2 is a flowchart illustrating an implementation of downloading and displaying a use case from a web-based use case management system TEST L INK by using a remote procedure call XM L-RPC protocol in a POS terminal automatic testing method according to an embodiment of the present invention, where the POS terminal automatic testing method is applied to a terminal device, and as shown in fig. 2, the method includes the following steps:
s201, selecting a project, a plan and a version;
s202, clicking a Downloadcase button;
s203, checking whether the connection is successful;
s204, starting to use a remote procedure call XM L-RPC protocol to download a use case from a web-based use case management system TEST L INK;
s205, using a remote procedure call XM L-RPC protocol, after the downloading of the use case from a web-based use case management system TEST L INK is completed, entering a use case display interface, and waiting for the completion of the downloading;
s206, the main thread enters a use case display interface;
and S207, the background thread continues to write the downloaded use case into the file.
In the embodiment of the invention, the system is connected to TEST L INK according to the address, the user name and the secret key of the server, if the system is successful, the project, the plan and the version are continuously obtained, the use case downloading is carried out after the specified TEST version is selected, and after the use case downloading is finished, in order to improve the efficiency, the file buffering technology is used, so that the situation that the unnecessary network load is brought by repeated downloading from the server for many times is avoided.
Referring to fig. 3, fig. 3 is a flowchart illustrating implementation of filtering use cases and sorting in an automatic POS terminal testing method according to an embodiment of the present invention, where the automatic POS terminal testing method is applied to a terminal device, and as shown in fig. 3, the method includes the following steps:
s301, selecting a module;
s302, selecting an API of a module;
s303, selecting a test mode, a priority, a test type, a test cost and an execution state;
s304, clicking a Filter button;
s305, judging whether the use case meets the screening condition, if so, executing S306, and if not, ending;
s306, all the filtered use cases are selected by default;
s307, cases which do not need to be tested can be selected continuously;
s308, finally clicking Next to complete screening;
s309, selecting the sorting keywords, wherein the sorting keywords have 5 priority attributes;
s310, clicking a sorting button to sort;
s311, deleting the originally displayed data and displaying the newly sequenced data.
In the embodiment of the invention, a module comprises an API interface, the API interface also comprises test cases, the test cases comprise test modes, priorities, test types, test time, execution state attributes and the like, the filter function filters the test cases by using the characteristics to screen out the required cases, the cases need to be displayed through a JAVA table control, each row displays one case, and each row comprises a row of check boxes, so that further screening action can be performed, the case to be executed is finally selected, 5 keywords can be selected for sorting aiming at the selected case, and a multi-level sorting algorithm is executed to realize the sorting function of the case.
EXAMPLE III
Referring to fig. 4, fig. 4 is a flowchart of an application of executing a test in an automatic POS terminal testing method provided by an embodiment of the present invention, where the method is applied to a terminal device, and as shown in fig. 4, the method may include the following steps:
1. sending a test case execution instruction;
2. sending a PC execution instruction;
3. the PC instruction is executed;
4. and executing the sample instruction for test completion.
In the embodiment of the invention, the execution case needs to be in serial communication with the POS terminal, the PC sends an instruction according to an agreed protocol to the POS terminal, the POS terminal receives the instruction and then executes the instruction, if the PC is needed to modify the environment tested by the POS terminal in the case execution process, the POS terminal sends the instruction to enable the PC to execute, the PC returns to the POS terminal after executing, the POS terminal continues to execute the case, and the result is returned to the PC after the execution is finished.
In the embodiment of the invention, aiming at the implementation of ATC software, after the flow is embedded, in order to ensure the aspects of reliable communication, responsiveness and the like, heartbeat detection is added, for example, before a serial port sends data, the heartbeat detection is firstly carried out to judge whether a link is smooth or not; most importantly, the method includes that four threads are included, interface response is processed for a main thread, a control thread, a test operation thread and a serial port thread cooperate to execute use cases, the serial port thread mainly monitors data, when POS end data are monitored to arrive, the test operation thread is informed to receive and process the data, after the processing is finished, the control operation thread is informed to record result information, then the next use case is added, the test operation thread executes after being detected, the execution is sequentially repeated, and the visual explanation refers to fig. 5, fig. 5 is a sequence diagram of threads in the automatic POS terminal testing method provided by the embodiment of the invention, and the method is applied to terminal equipment, as shown in fig. 5:
starting a starting thread TestQueue.start in a test queue by a main thread;
executing the judging function TestQueue.isEmpty in the test queue by the test running thread, and waiting for Wait;
the serial port thread starts to monitor data;
the main thread receives a message clicked by a starting button;
the control thread executes the judging function TestQueue. isEmpty in the test result queue and waits for Wait;
the control thread executes an add queue function add L ast in the test queue, informs the test running thread to start testing (notify), waits for Wait, and circulates normal flow;
executing an empty judging function TestQueue.isEmpty in a test queue by a test running thread, sending a test executing command sendDoTestCmd, and connecting and waiting for connection Wait;
the serial thread sends a message for informing the arrival of serial port data to the test operation thread;
the test running thread receives and processes the result, and waits for Wait;
the test running thread sends a message informing a receiving result to the control thread;
and the control thread receives the result message, returns to the control thread to execute the added queue function add L ast in the test queue, and directly tests the test item in the queue function add L ast.
In the embodiment of the present invention, after the use case is executed, the result uploading operation is started, and the corresponding result data is uploaded to the TEST L INK by using the XM L-RPC protocol, so as to realize that a plurality of cases are considered, for example, whether the use case to be uploaded is connected to the TEST L INK, whether the use case to be uploaded is a use case in a specified project, plan, and version, the upload use case is also divided into two steps, the TEST result and the remark are uploaded first, and if there is an accessory upload, the result ID uploaded just before is acquired, and then the accessory is uploaded, referring to fig. 6, fig. 6 is an application flow chart of the upload TEST result provided by the embodiment of the present invention, and the method is applied to the terminal device, as shown in fig. 6, the method may include the following steps:
s601, clicking a result uploading button;
s602, judging whether the TEST L INK is successfully connected;
s603, judging whether to upload the project, plan, construction and upload user;
s604, if the interface is imported, result uploading is displayed, the situation that the file is not selected exists, and if the interface is directly imported, the result file to be uploaded needs to be selected;
s605, selecting whether all result data are uploaded or the result data are latest data;
s606, displaying a result uploading interface and displaying the imported result data;
s607, clicking to confirm whether to upload, if yes, executing S608, and if not, ending;
s608, acquiring a use case from TEST L INK, and comparing data of the uploaded result;
s609, if the uploaded data is correct, executing S610, otherwise, jumping to S614;
s610, uploading a test result and remarks;
s611, judging whether the uploading is successful, if so, executing S612, otherwise, jumping to S614;
s612, uploading the result successfully, detecting whether the accessory exists, and if so, continuously uploading the accessory;
s613, judging whether the uploading of the attachment is successful, if so, ending, otherwise, executing S614;
and S614, prompting error return.
The embodiment of the invention adds the processes of executing the case and uploading the test result on the basis of the first embodiment and the second embodiment, and can ensure that the communication between the terminal equipment and the POS terminal is reliable and the POS terminal can respond in time by a multi-thread communication mode, thereby improving the test efficiency.
It should be understood that, the sequence numbers of the steps in the first, second, and third embodiments do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the internal logic of the process, and should not limit the implementation process of the embodiments of the present invention.
Example four
Corresponding to the methods described in the first, second, and third embodiments, referring to fig. 7, fig. 7 is a block diagram of an automatic POS terminal testing apparatus provided in the embodiments of the present invention, which is applied to a terminal device, including but not limited to a Computer, a mobile phone, a Pocket Computer (PPC), a palm top Computer, a notebook Computer, a Personal Digital Assistant (PDA), MP4, and MP 3. For convenience of explanation, only the portions related to the present embodiment are shown. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 7, the automatic POS terminal testing apparatus includes:
the downloading module 71 is used for downloading the use cases from a web-based use case management system TEST L INK by using a remote procedure call XM L-RPC protocol;
the screening module 72 is configured to obtain the selected test attribute, and screen a case to be executed from the downloaded cases according to the selected test attribute;
a sorting module 73, configured to select keywords from the cases to be executed for sorting, so as to obtain an execution sequence;
and the test module 74 is used for controlling the POS terminal to carry out batch processing or single execution of the use cases according to the execution sequence, and uploading the test result after the execution is finished.
As an implementation manner of this embodiment, in the automatic POS terminal testing apparatus, the screening module is specifically configured to display a test attribute list, where the test attribute list includes at least one test attribute of a test mode, a priority, a test type, a test time, and an execution state, obtain a selected test attribute according to a selection operation, and screen out a use case from downloaded use cases according to the selected test attribute; the sorting module is specifically used for selecting keywords, sorting the cases to be executed by adopting the selected keywords and a multi-level sorting mode to obtain an execution sequence, and displaying the sorted cases.
As an implementation manner of this embodiment, in the automatic testing apparatus for a POS terminal, the testing module is configured to send an instruction for executing a use case to the POS terminal through a serial communication protocol or a parallel communication protocol according to an execution sequence, obtain a testing result after the POS terminal finishes executing the use case to be executed, and upload the testing result to TEST L INK, or,
the test module includes:
the detection unit is used for judging whether the communication link between the detection unit and the POS terminal is normally connected or not by adopting heartbeat detection;
the monitoring unit is used for sending an instruction of an execution case to the POS terminal through a serial port communication protocol according to an execution sequence after normal connection, and monitoring POS terminal data by using a serial port thread;
the recording unit is used for informing the test operation thread to receive and process the POS terminal data when the POS terminal data is monitored to arrive, and informing the control operation thread to record the test result after the test result is obtained;
and the TEST unit is used for increasing the next case to be executed according to the execution sequence after the recording is finished, sequentially reciprocating, acquiring the TEST result after the POS terminal finishes the case to be executed, and uploading the TEST result to TEST L INK.
The embodiment of the invention has the advantages that on one hand, the use case to be executed is screened out through the test attribute, the use case is executed according to the requirement, the human resource input is reduced, the test efficiency is improved, on the other hand, the use case execution on the POS terminal is controlled through the reliable protocol and the POS terminal communication, and the purpose of automatic test is realized.
EXAMPLE five
Fig. 8 is a schematic diagram of an automatic POS terminal testing apparatus/terminal device according to an embodiment of the present invention. As shown in fig. 8, the POS terminal automatic test apparatus/terminal device 8 of the embodiment includes: a processor 80, a memory 81, and a computer program 82, such as a POS terminal automatic test program, stored in the memory 81 and operable on the processor 80. The processor 80, when executing the computer program 82, implements the steps in the above-described embodiments of the POS terminal automatic test method, such as the steps 101 to 104 shown in fig. 1. Alternatively, the processor 80, when executing the computer program 82, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 71 to 74 shown in fig. 7.
Illustratively, the computer program 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 82 in the POS terminal automatic test equipment/terminal device 8. For example, the computer program 82 may be divided into a download module, a screening module, a sorting module, and a testing module (module in a virtual device), and the specific functions of each module are as follows:
the download module is used for downloading the use case from a web-based use case management system TEST L INK by using a remote procedure call XM L-RPC protocol;
the screening module is used for acquiring the selected test attributes and screening the cases to be executed from the downloaded cases according to the selected test attributes;
the sorting module is used for selecting keywords from the cases to be executed for sorting to obtain an execution sequence;
and the test module is used for controlling the POS terminal to carry out batch processing or single execution of the cases according to the execution sequence, and uploading the test result after the execution is finished.
The POS terminal automatic testing apparatus/terminal device 8 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The POS terminal automatic test equipment/terminal device may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of a POS terminal automatic test equipment/terminal device 8 and does not constitute a limitation of POS terminal automatic test equipment/terminal device 8 and may include more or fewer components than shown, or some components in combination, or different components, e.g., the POS terminal automatic test equipment/terminal device may also include input output devices, network access devices, buses, etc.
The Processor 80 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may be an internal storage unit of the POS terminal automatic test apparatus/terminal device 8, such as a hard disk or a memory of the POS terminal automatic test apparatus/terminal device 8. The memory 81 may also be an external storage device of the automatic POS terminal testing device/terminal apparatus 8, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the automatic POS terminal testing device/terminal apparatus 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the POS terminal automatic test apparatus/terminal device 8. The memory 81 is used to store the computer program and other programs and data required by the POS terminal automatic test equipment/terminal device. The memory 81 may also be used to temporarily store data that has been output or is to be output. It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The device/terminal equipment can be computing equipment such as a desktop computer, a notebook computer, a palm computer and a cloud server. The apparatus/terminal device may include, but is not limited to, a processor, a memory. It will be understood by those skilled in the art that the schematic diagrams are merely examples of an apparatus/terminal device and do not constitute a limitation of the apparatus/terminal device, and may include more or less components than those shown, or combine some components, or different components, for example, the apparatus/terminal device may further include input and output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is the control center of the apparatus/terminal device, and various interfaces and lines are used to connect the various parts of the entire apparatus/terminal device.
The memory may be used for storing the computer programs and/or modules, and the processor may implement various functions of the apparatus/terminal device by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (8)

1. A POS terminal automatic test method is characterized by comprising the following steps:
downloading a specified use case from a web-based use case management system TEST L INK by using a remote procedure call XM L-RPC protocol;
acquiring the selected test attribute, and screening out the use cases to be executed from the downloaded use cases according to the selected test attribute;
selecting keywords, selecting more than one keyword for sorting the use cases to be executed by adopting the selected keywords and a multi-level sorting mode to obtain an execution sequence, and displaying the sorted use cases, wherein the keywords have more than one priority attribute, and the obtained execution sequence is an execution sequence with newly sorted data obtained by deleting the originally displayed data according to the more than one priority attribute;
according to the execution sequence, a multi-thread coordinated communication mode is adopted to control the POS terminal to carry out batch processing or single execution of the use cases, and after the execution is finished, a test result is uploaded, wherein the multi-thread comprises a test running thread; if the testing environment of the POS terminal needs to be modified in the execution process, receiving an instruction sent by the POS terminal, and modifying according to the instruction;
the POS terminal is controlled to process the cases in batch or execute the cases singly according to the execution sequence, and after the execution is finished, the test result is uploaded, and the method specifically comprises the following steps:
judging whether a communication link between the communication link and the POS terminal is normally connected or not by adopting heartbeat detection;
after normal connection, according to an execution sequence, sending an instruction of executing a case to the POS terminal through a serial port communication protocol, and monitoring POS terminal data by using a serial port thread;
when the POS terminal data is monitored to arrive, informing the test operation thread to receive and process the POS terminal data, and after a test result is obtained, informing the control operation thread to record the test result;
after the recording is finished, adding the next use case to be executed according to the execution sequence, and reciprocating in sequence;
and after the POS terminal finishes executing the to-be-executed use case, acquiring a TEST result, and uploading the TEST result to TEST L INK.
2. The method of claim 1, wherein the obtaining of the selected test attributes, and the screening of the cases to be executed from the downloaded cases according to the selected test attributes, specifically:
displaying a test attribute list, wherein the test attribute list comprises at least one test attribute of a test mode, a priority, a test type, test time and an execution state;
acquiring the selected test attribute according to the selection operation;
and screening out the use cases from the downloaded use cases according to the selected test attributes.
3. The method according to claim 1 or 2, wherein the POS terminal is controlled to perform the batch processing or the single execution of the use cases according to the execution sequence, and after the execution is finished, the test result is uploaded, specifically:
according to the execution sequence, sending a command for executing the use case to the POS terminal through a serial communication protocol or a parallel communication protocol, obtaining a TEST result after the POS terminal finishes executing the use case to be executed, and uploading the TEST result to TEST L INK.
4. An automatic testing device for a POS terminal, comprising:
the download module is used for downloading the specified use case from a web-based use case management system TEST L INK by using a remote procedure call XM L-RPC protocol;
the screening module is used for acquiring the selected test attributes and screening the cases to be executed from the downloaded cases according to the selected test attributes;
the system comprises a sorting module, a display module and a display module, wherein the sorting module is used for selecting keywords, selecting more than one keyword for sorting the use cases to be executed by adopting the selected keywords and a multi-stage sorting mode to obtain an execution sequence and displaying the sorted use cases, the keywords have more than one priority attribute, and the obtained execution sequence is an execution sequence with newly sorted data obtained by deleting originally displayed data according to the more than one priority attribute;
the test module is used for controlling the POS terminal to carry out batch processing or single execution of the use cases in a multi-thread coordinated communication mode according to the execution sequence, and uploading a test result after the execution is finished, wherein the multi-thread comprises a test running thread; if the testing environment of the POS terminal needs to be modified in the execution process, receiving an instruction sent by the POS terminal, and modifying according to the instruction;
the TEST module comprises a detection unit, a monitoring unit, a recording unit, a TEST unit and a TEST unit, wherein the detection unit is used for judging whether a communication link between the detection unit and a POS terminal is normally connected or not by adopting heartbeat detection, the monitoring unit is used for sending an instruction of executing a case to the POS terminal through a serial port communication protocol according to an execution sequence after the normal connection and monitoring POS terminal data by using a serial port thread, the recording unit is used for informing a TEST operation thread to receive and process the POS terminal data when the POS terminal data arrives and informing a control operation thread to record a TEST result after the TEST result is obtained, the TEST unit is used for increasing the next case to be executed according to the execution sequence after the recording is finished and sequentially reciprocating, and the TEST result is obtained after the POS terminal finishes executing the case to be executed and is uploaded to TEST L INK.
5. The apparatus of claim 4, wherein the screening module is specifically configured to display a test attribute list, where the test attribute list includes at least one test attribute of a test mode, a priority, a test type, a test time, and an execution state, obtain the selected test attribute according to the selection operation, and screen the use case from the downloaded use cases according to the selected test attribute.
6. The apparatus of claim 4,
and the TEST module is used for sending a command for executing the use case to the POS terminal through a serial communication protocol or a parallel communication protocol according to the execution sequence, acquiring a TEST result after the POS terminal finishes executing the use case to be executed, and uploading the TEST result to TEST L INK.
7. A POS terminal automatic test equipment/terminal device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor, when executing said computer program, implements the steps of the method according to any one of claims 1 to 3.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
CN201710440337.8A 2017-06-12 2017-06-12 Automatic POS terminal testing method and device Active CN107391361B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710440337.8A CN107391361B (en) 2017-06-12 2017-06-12 Automatic POS terminal testing method and device
PCT/CN2017/095891 WO2018227735A1 (en) 2017-06-12 2017-08-03 Pos terminal automatic testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710440337.8A CN107391361B (en) 2017-06-12 2017-06-12 Automatic POS terminal testing method and device

Publications (2)

Publication Number Publication Date
CN107391361A CN107391361A (en) 2017-11-24
CN107391361B true CN107391361B (en) 2020-07-28

Family

ID=60333288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710440337.8A Active CN107391361B (en) 2017-06-12 2017-06-12 Automatic POS terminal testing method and device

Country Status (2)

Country Link
CN (1) CN107391361B (en)
WO (1) WO2018227735A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209590B (en) * 2019-06-05 2023-04-21 山东科技大学 Automatic testing method and system for intelligent robot
CN113778771B (en) * 2021-09-14 2023-07-18 百富计算机技术(深圳)有限公司 Terminal testing method, system and storage medium
CN114328218A (en) * 2021-12-28 2022-04-12 宁夏隆基宁光仪表股份有限公司 Method for controlling automatic execution of intelligent instrument test program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866421A (en) * 2015-05-08 2015-08-26 深圳市新国都技术股份有限公司 Testing method and testing system of POS terminal
CN106598874A (en) * 2017-02-08 2017-04-26 郑州云海信息技术有限公司 Method and device for automatically testing software

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106138B (en) * 2011-11-15 2016-03-09 阿里巴巴集团控股有限公司 The method that test case is synchronous with test script and device
CN104331360A (en) * 2013-07-23 2015-02-04 上海斐讯数据通信技术有限公司 Automatic testing platform
US9811480B2 (en) * 2014-03-14 2017-11-07 Google Inc. Universal serial bus emulation of peripheral devices

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104866421A (en) * 2015-05-08 2015-08-26 深圳市新国都技术股份有限公司 Testing method and testing system of POS terminal
CN106598874A (en) * 2017-02-08 2017-04-26 郑州云海信息技术有限公司 Method and device for automatically testing software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
使用TestLink管理软件功能测试过程;祝尚元;《https://www.ibm.com/developerworks/cn/opensource/os-cn-testlink2/index.html》;20130704;第1-9页 *

Also Published As

Publication number Publication date
CN107391361A (en) 2017-11-24
WO2018227735A1 (en) 2018-12-20

Similar Documents

Publication Publication Date Title
US9280451B2 (en) Testing device
CN103294335A (en) Apparatus and method for creating a shortcut menu
CN111190718A (en) Method, device and system for realizing task scheduling
CN109359118B (en) Data writing method and device
CN107391361B (en) Automatic POS terminal testing method and device
CN112099684A (en) Search display method and device and electronic equipment
CN112540709A (en) Split screen display method and device, electronic equipment and readable storage medium
CN102929622A (en) Method and system for categorizing applications in mobile terminal, and mobile terminal
CN109358927B (en) Application program display method and device and terminal equipment
CN113157439B (en) Resource statistics method, device and terminal
CN108664301B (en) Menu generation method, system and terminal equipment
CN114138363A (en) Program data calling method, device, equipment and storage medium
CN105975306A (en) Application program starting management method and application program starting management apparatus for electronic device
CN108710477B (en) Display method, mobile terminal and storage medium
CN108536512B (en) Interface switching method and device and terminal equipment
CN115098468A (en) Flexible data migration method and device, storage medium and electronic equipment
CN111222739B (en) Nuclear power station task allocation method and nuclear power station task allocation system
CN111352357B (en) Robot control method and device and terminal equipment
CN107580030B (en) Data management method and device and server
CN113010416A (en) Bank counter transaction automatic testing method and device
CN106934555B (en) Workflow organization method and device, computer equipment and storage medium
CN111049981A (en) Message identification method, device, user equipment and computer readable storage medium
CN110874143A (en) Sensor data acquisition method, intelligent terminal, storage medium and electronic device
CN111327515B (en) Electronic red packet detection method, electronic red packet detection device and mobile terminal
CN110648131B (en) Near field communication-based card swiping method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant