CN112863084A - Intelligent sales terminal, and testing method, device and system of intelligent sales terminal - Google Patents
Intelligent sales terminal, and testing method, device and system of intelligent sales terminal Download PDFInfo
- Publication number
- CN112863084A CN112863084A CN202110042323.7A CN202110042323A CN112863084A CN 112863084 A CN112863084 A CN 112863084A CN 202110042323 A CN202110042323 A CN 202110042323A CN 112863084 A CN112863084 A CN 112863084A
- Authority
- CN
- China
- Prior art keywords
- information
- pos
- test operation
- test
- control
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07G—REGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
- G07G1/00—Cash registers
- G07G1/12—Cash registers electronically operated
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention discloses an intelligent sales terminal, and a method, a device and a system for testing the intelligent sales terminal, and relates to the technical field of artificial intelligence, wherein the method comprises the following steps: the method comprises the steps of obtaining POS screen information, zooming the screen information according to a preset zooming rule, and displaying the screen information to a user terminal, wherein the screen information comprises at least one control, and the control comprises: attribute information; the method comprises the steps of carrying out test operation on a control in screen information displayed on a user terminal and generating test operation information, wherein the test operation information comprises: testing action information, attribute information of the testing control and subsequent action information corresponding to the testing action information; sending the test operation information to the POS so that the POS executes corresponding test operation according to the test operation information; and generating a test report according to the test operation executed by the POS. By the invention, the accuracy and reliability of the intelligent POS test can be improved.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to an intelligent sales terminal, and a method, a device and a system for testing the intelligent sales terminal.
Background
With the development of intelligent terminal technology, intelligent POS (Point of Sale) is being accepted and used by more and more merchants, various intelligent POS terminal applications are also developed and applied to various payment scenes, and testing of the intelligent POS applications becomes more frequent and important. As a novel mobile payment terminal, the intelligent POS terminal does not have an automatic testing method specially aiming at the intelligent POS application in the industry at present, and can only complete the testing work of the intelligent POS application by adopting a manual testing mode. The intelligent POS application test adopts a method of expanding test coverage scenes and application ranges by manpower, and the problems of high manpower input, large workload, low coverage efficiency and the like are faced.
In particular, during the testing of smart POS applications, the following problems are typically encountered:
(1) when a tester performs intelligent POS application testing, a large number of regression tests are often required to complete version verification, and the regression tests are required to be completed manually at present, so that the repeated workload is large. The labor and time cost is high, the reliability is poor, and the fault tolerance rate is low.
(2) At present, no automatic test method for intelligent POS exists, application test only depends on manual summary teaching, and accumulation of test assets and simple reuse of test results cannot be realized.
(3) The smart POS application involves interaction with a hardware medium, such as a bank card, and requires the hardware medium to be prepared for use as test data, which is too costly when the test scale is large.
(4) At present, there are corresponding automatic testing methods at both PC (Personal Computer) end and mobile end, but the automatic testing method for intelligent POS is in a vacant state. In some test scenes needing linkage, due to the loss of the intelligent POS automatic test method, the automatic test of the PC end and the mobile end cannot be linked with the automatic process of the POS end, the full-process series connection of the business test automation is blocked, and the application range of the automatic test is limited.
Disclosure of Invention
In view of the above, the present invention provides an intelligent sales terminal, and a method, an apparatus, and a system for testing the intelligent sales terminal, so as to solve at least one of the above-mentioned problems.
According to a first aspect of the present invention, there is provided a method for testing an intelligent POS, the method comprising:
the method comprises the steps of obtaining POS screen information, carrying out zooming processing on the screen information according to a preset zooming rule, and displaying the screen information to a user terminal, wherein the screen information comprises at least one control, and the control comprises: attribute information;
performing test operation on a control in the screen information displayed on the user terminal, and generating the test operation information, wherein the test operation information includes: testing action information, attribute information of the testing control and subsequent action information corresponding to the testing action information;
sending the test operation information to the POS so that the POS executes corresponding test operation according to the test operation information;
and generating a test report according to the test operation executed by the POS.
According to a second aspect of the present invention, there is provided a testing apparatus for an intelligent POS, the apparatus comprising:
the POS screen information acquisition unit is used for acquiring POS screen information, the screen information comprises at least one control, and the control comprises: attribute information;
the display unit is used for zooming the screen information according to a preset zooming rule and then displaying the screen information to the user terminal;
a test operation information generating unit, configured to perform a test operation on a control in screen information displayed on the user terminal, and generate the test operation information, where the test operation information includes: testing action information, attribute information of the testing control and subsequent action information corresponding to the testing action information;
the test operation information sending unit is used for sending the test operation information to the POS so that the POS executes corresponding test operation according to the test operation information;
and the test report generating unit is used for generating a test report according to the test operation executed by the POS.
According to a third aspect of the present invention, there is provided a testing system of an intelligent POS, the system including the testing apparatus of the intelligent POS and the intelligent POS, wherein the POS includes: an operation instruction receiving unit, configured to receive a test operation instruction, where the test operation instruction includes: the test action information, the test control information and the subsequent action information corresponding to the test action information; and the operation instruction execution unit is used for executing operation on the corresponding control on the screen according to the received test operation instruction.
According to a fourth aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the program.
According to a fifth aspect of the invention, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the technical scheme, the acquired POS screen information is displayed on the user terminal after being subjected to scaling processing, the control in the screen information on the user terminal is subjected to test operation, test operation information is generated, the test operation information is sent to the POS, the POS can execute corresponding test operation according to the test operation information, and then a test report is generated according to the test operation executed by the POS.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a block diagram of an intelligent POS test system according to an embodiment of the present invention;
FIG. 2 is a block diagram of the structure of the intelligent POS testing device 10 according to the embodiment of the present invention;
FIG. 3 is a block diagram of the structure of an intelligent POS 20 according to an embodiment of the present invention;
FIG. 4 is a block diagram of an exemplary configuration of an intelligent POS automated test system according to an embodiment of the present invention;
fig. 5 is a block diagram of an exemplary structure of the screen projection module 1 according to the embodiment of the present invention;
FIG. 6 is a block diagram of an example structure of a control handling module 2 according to an embodiment of the present invention;
FIG. 7 is a block diagram of an exemplary structure of the script processing module 4 according to an embodiment of the present invention;
FIG. 8 is a block diagram of an example structure of the report generation module 5 according to an embodiment of the present invention;
FIG. 9 is a flowchart of the operation of an intelligent POS automated test system according to an embodiment of the present invention;
FIG. 10 is a flow chart of a testing method of the intelligent POS according to an embodiment of the present invention;
fig. 11 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Because the intelligent POS application test in the prior art adopts manual test, the problems of high labor and time cost, poor reliability and low fault tolerance rate are caused. Based on this, the embodiment of the invention provides a test scheme of an intelligent POS, which realizes the automatic process of the application test of the intelligent POS, reduces the labor and time cost, brings the automation of the intelligent POS into the whole automatic test range, and improves the accuracy and reliability of the intelligent POS test. Embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a block diagram of an intelligent POS test system according to an embodiment of the present invention, and as shown in fig. 1, the system includes: the intelligent POS testing device comprises an intelligent POS testing device 10 and an intelligent POS 20, wherein the intelligent POS testing device 10 is used for realizing automatic testing of the intelligent POS 20.
Fig. 2 is a block diagram showing the structure of the smart POS test apparatus 10, and as shown in fig. 2, the smart POS test apparatus 10 includes: a POS screen information acquisition unit 101, a display unit 102, a test operation information generation unit 103, a test operation information transmission unit 104, and a test report generation unit 105, wherein:
a POS screen information acquiring unit 101 configured to acquire POS screen information, the screen information including: a control on the POS screen, the number of controls being at least one, and the control attribute information (which may also be referred to as control information). The control is a component for implementing a function by an application in the POS screen, and the control information refers to attribute information of the components, such as id (i.e., identification number of the control), coordinate information (i.e., position in the screen), and text (i.e., name of the control).
And the display unit 102 is configured to perform scaling processing on the screen information according to a predetermined scaling rule and display the screen information to the user terminal.
In actual operation, the display unit includes: screen information processing module and display module, wherein:
the screen information processing module is used for carrying out zooming processing on the screen information according to a preset zooming rule;
and the display module is used for displaying the control in the screen information after the zooming processing on the user terminal and hiding the control information in the projection area of the user terminal.
The zoom rule here may be specifically set according to the POS screen and the user terminal screen.
For example, in one embodiment, the user terminal may be a computer, and the screen information processing module scales the POS screen information to be suitable for the resolution of the computer screen, for example, the resolution of the POS screen is 1080x1920, and the resolution of the computer screen is 4000x2880 (1.5 times of 1920), and the POS screen size displayed on the computer screen is 1620x2280, where 1620 is 1080 × 1.5.
A test operation information generating unit 103, configured to perform a test operation on a control in screen information displayed on the user terminal, and generate the test operation information, where the test operation information includes: the test action information, the attribute information of the test control and the follow-up action information corresponding to the test action information.
In one embodiment, the test operation information may further include: the sequence information of the test action and the subsequent action information may be, for example, execution time information.
The test action information here may be, for example, a click operation is performed on a control "payment" button, the test control information is coordinates and text of the "payment" button, and the subsequent action information is a "user card swiping" action.
In one embodiment, the test operation information generating unit 103 may perform a test operation on a control in the screen information displayed on the user terminal; and then monitoring the test operation according to a preset monitoring program, and generating the test operation information according to a monitoring result.
The monitoring program may be a monitoring program actually applied to the terminal device for monitoring the operation of the device by the operator, which is not limited in the present invention.
A test operation information sending unit 104, configured to send the test operation information to the POS, so that the POS executes a corresponding test operation according to the test operation information.
In a specific implementation process, the test operation information generated by the test operation information generation unit 103 may be in a first format, for example, the first format may be in a JSON (JSON Object Notation) format, for example, the test action information is recorded as JSON format data in a form of { key: value }, where the key value is control information in which an action occurs, and the value is action information occurring on a corresponding control.
In one embodiment, the apparatus further comprises: a format conversion unit for converting the test operation information in the first format into test operation information in a second format (for example, EXCEL format) to which data is applicable but the first format is not applicable.
Specifically, the format conversion unit may convert the JSON-format test operation information into the EXCEL-format test operation information. The test operation information in the EXCEL format is convenient for subsequent more visual check.
In practical applications, the first format may also be an XML (eXtensible Markup Language) format, and the second format may also be another format applicable to the POS, for example, a TML (Text Mining Language) format.
The specific applications of the first format and the second format may depend on the actual situation.
The test operation information sending unit 104 specifically includes: test control information processing module, POS operating instruction generation module and POS operating instruction send module, wherein:
and the test control information processing module is configured to perform corresponding scaling processing on the test control information in the test operation information in the EXCEL format, where the scaling processing may be an inverse operation of the scaling processing in the display unit 102.
And the POS operation instruction generating module is used for converting the test operation information after the zooming processing into POS executable operation instructions according to the sequence information in the test operation information.
And the POS operation instruction sending module is used for sending the operation instruction executable by the POS to the POS.
A test report generating unit 105, configured to generate a test report according to the test operation performed by the POS. The test report herein may include: and the POS executes log information of the test operation and screenshot information of each operation step in the execution.
The POS screen information acquired by the POS screen information acquisition unit 101 is zoomed through the display unit 102 and then displayed to the user terminal, the test operation information generation unit 103 performs test operation on a control in the screen information on the user terminal to generate test operation information, then the test operation information sending unit 104 sends the test operation information to the POS, the POS can execute corresponding test operation according to the test operation information, and then the test report generation unit 105 generates a test report according to the test operation executed by the POS.
Fig. 3 is a block diagram of the structure of the above-mentioned intelligent POS 20, and as shown in fig. 3, the intelligent POS 20 includes: an operation instruction receiving unit 201 and an operation instruction executing unit 202, wherein:
an operation instruction receiving unit 201, configured to receive a test operation instruction (i.e., an instruction sent by the POS operation instruction sending module), where the test operation instruction includes: testing action information, attribute information of the testing control and subsequent action information corresponding to the testing action information;
and the operation instruction execution unit 202 is configured to execute an operation on a corresponding control on the screen according to the received test operation instruction.
For a better understanding of the present invention, a specific example is given below.
In this example, an automated testing system for smart POS is provided, in which a local computer is used to connect to the smart POS, and the POS end page is scaled to map to the computer page. And capturing a POS end page control tree in an equal-ratio scaling mode by adopting a control identification mode, marking the POS end page control tree to a computer page, starting a monitor to monitor the action of the computer page control, and recording control information and control corresponding action information as JSON data. And then, converting the recorded JSON data into an EXCEL-format script, analyzing the generated script content and converting the script content into an adb command (a command of an Android system and executable on the POS) to drive the intelligent POS to complete script playback, wherein the script playback is to execute corresponding operation according to the script content. And then, analyzing the generated script file and matching with the operation screenshot to form a test report, and completing the POS automatic test flow comprising the recording and playback of the script and the generation of the report. The embodiment of the invention realizes the recording of the script at the computer end by adopting the control identification and the action monitoring, and drives the POS end to complete the playback of the script through the adb command, so that the labor cost and the time cost of the intelligent POS application test can be saved, the automation bottleneck of the intelligent POS is broken, and the full-flow series connection of the service test automation is completed.
The adb is a command frame of the Android system bottom layer, if the adb shell input tap 100100 is executed, the coordinate (100 ) position of the POS screen is clicked, and the adb shell input text qaz is executed to input 'qaz' at the current position.
FIG. 4 is a block diagram of an exemplary configuration of an automated testing system for smart POS, as shown in FIG. 4, comprising: the system comprises a screen projection module 1, a control processing module 2, a hardware input monitoring module 3, a script processing module 4 and a report generating module 5, wherein:
the screen projection module 1 acquires the POS terminal screen information to realize the display of the POS terminal page at the computer terminal, namely, the POS terminal screen information is continuously acquired and transmitted to the computer terminal for display after being scaled in an equal ratio. Specifically, the screen projection module 1 synchronously displays the screen content of the POS at the computer (for preparing for recording a script at a subsequent computer) and projects the screen content to a computer page after scaling in equal proportion.
Fig. 5 is a block diagram illustrating an exemplary structure of the screen projection module 1, and as shown in fig. 5, the screen projection module 1 includes: a screen mapping unit 11, an equal ratio scaling unit 12, wherein:
the screen mapping unit 11: the system is used for acquiring POS terminal screen image information in real time and transmitting the POS terminal screen image information back to a computer terminal for display in a socket mode;
the equal ratio scaling unit 12: and the method is used for scaling the captured POS terminal screen information and the size and position information of the control in an equal ratio.
The control processing module 2 captures POS end page control information (a control is a component for realizing a function in POS application, the control information refers to attribute information of the components, such as id, coordinate, and text, and after scaling in an equal ratio, the control information is marked to a computer end projection area for computer end control positioning and monitoring action information on the control through a monitor, where the action information is information such as basic actions of up (up), down (down), and move, and coordinates of an action position.
For example, the tester clicks the 'collect' button on the computer page, and the monitor records that the operator has performed down and up operations (i.e., clicking operations) on the 'collect' button control on the page while operating on the computer side. And then, the monitoring program records the attribute information of the operated control in the test process and the operation executed on the control, so that the control can be found on the POS according to the attribute information of the control, and the recorded action such as clicking is executed to play back the script.
In the specific implementation process, the control processing module 2 captures control information and motion information, captures all control information on a page into an xml (extensible markup language) file, and implicitly marks the control information on the page of the computer end after scaling the size and the position of the control in an equal ratio manner. Meanwhile, a page action monitoring program is started to monitor the action and the corresponding control information on the page, key value pair data recorded with the control attribute information and the action information is generated, and the key value pair data is transmitted to the script processing module 4 in a JSON format in real time.
Fig. 6 is a block diagram of an example structure of the control processing module 2, and as shown in fig. 6, the control processing module 2 includes: a control information capturing unit 21 and an action information monitoring unit 22, wherein:
the control information capturing unit 21: the method is used for capturing the page control information tree of the POS terminal to form an xml file, calling the geometric scaling unit 12 to perform geometric scaling on the control position information captured by the POS terminal, and implicitly marking the control information after geometric scaling in a projection area of the computer terminal, and displaying and using the control information when operating the control of the computer terminal.
The implicit annotation here means that when a mouse is placed on a control, a frame displays a control icon frame under the current mouse, and some basic information of the control, such as a file name of the control, is displayed below the control icon frame.
The action information monitoring unit 22: after the control information capturing unit 21 finishes labeling the projection page of the computer, a page monitoring program is started, action information occurring on the projection page and control information where the action occurs are monitored, each step of action occurring in the projection page is recorded as JSON format data in a { key: value } form, wherein a key value is control information where the action occurs, a value is information where the action occurs on a corresponding control, and the JSON data is sent to the script processing module 4 in real time.
If the user clicks the collection button, a piece of JSON data is generated, such as text (collection), pos (x, y). . Down, up, where "text" is "cash collection" and pos "is (x, y). . "is key value, which represents control information, and down, up is value, which represents action information, i.e. clicking.
The hardware input monitoring module 3 starts the triggering of the hardware information in the monitoring page of the monitoring program and uploads the triggering to the script processing module 4. The hardware input here may refer to an operation such as swiping a bank card.
For example, after the hardware monitor is started, a pre-confirmed control triggering a card swiping action, such as a 'user card swiping' button, is monitored, and if it is monitored that an action appears on the control, such as a click, the action is recorded and uploaded to the script processing module 4.
In one embodiment, the hardware input monitoring module 3 starts a hardware input monitoring program, monitors a hardware input action triggered on a page specific control and records the hardware input action as JSON format data by maintaining a list of control information to be monitored (for example, if a 'user swipes a card' button in a test application is a step of triggering hardware swiping, information of the 'user swipes the card' button control is added into the list for monitoring), and generates an additional hardware input, that is, an input operation record of card information when it is monitored that a click operation is performed by the 'user swipes the card' button, for example, { hardware input: jsfkljfk), where 'jsfkljfk' refers to the input card information, and then uploads the data to the script processing module 4 in real time.
The hardware input monitoring module 3 breaks through the interaction bottleneck with hardware media such as bank cards in the intelligent POS application automatic test, realizes the automatic input of hardware information, enables the intelligent POS application test to get rid of the limitation of the hardware media, and widens the application scenes of the intelligent POS automatic test method in the embodiment of the invention.
The script processing module 4 generates a script according to the control information and the action information, analyzes the script at the computer end, drives the POS end to play back, and simultaneously generates a log file required by the report generating module 5.
Specifically, the script processing module 4 generates a corresponding script according to the received JSON-formatted control action and the received hardware action time sequence. For example, if the user performs two operations of clicking and sliding upwards, the JSON data is parsed into the EXCEL format script as shown in table 1 below:
TABLE 1
And then, analyzing the script content, and converting the script content into an adb command to drive the POS terminal to complete the playback of the script. Specifically, each line of data is analyzed according to the generated EXCEL format script, if the clicking operation is converted into an Adb shell input tap x y command, the (x, y) position of the POS screen can be clicked by executing the command, and the hardware action information is analyzed as the input of the preset bank card information. And then, performing screenshot on the operation of the POS terminal and generating a log file required by the report generating module 5.
Fig. 7 is a block diagram showing an example structure of the script processing module 4, and as shown in fig. 7, the script processing module 4 includes: script generating unit 41, script analyzing unit 42, wherein:
script generation unit 41: and converting the received JSON data uploaded by the action information monitoring unit 22 and the hardware input monitoring module 3 into an EXCEL format according to the operation execution time sequence, and calling the geometric scaling unit 12 to perform geometric reduction on the size position attribute information in the control information column in the EXCEL to generate an EXCEL format script. The generated script is uploaded to the script parsing unit 42 for script playback.
Script parsing unit 42: and the script generation unit 41 is responsible for parsing the EXCEL format script sent by the script generation unit, that is, converting each line of data in the script into an adb shell command according to a time sequence.
For example, the script generating unit 41 sets JSON data { text ═ cash collection', pos ═ x, y). . Down, up is converted into EXCEL script, wherein the coordinate information in the EXCEL can be converted into corresponding coordinates under the actual POS screen resolution through geometric reduction according to (x, y) in the table 1. And then, converting the hardware input operation into an adb shell command for inputting preset bank card information. And the script analysis unit 42 executes the adb shell command to drive the intelligent POS terminal to complete corresponding actions, so that script playback is realized. And simultaneously generating a log file and step screenshots required by the report generating module 5.
In the specific implementation process, each line of data of the EXCEL is converted into an adb shell command, wherein hardware input is processed independently and converted into an instruction for inputting hardware information to an application-specific file, after the conversion is completed, each instruction is executed in sequence according to a time sequence to drive a POS machine to complete business actions such as clicking, sliding and inputting, meanwhile, in the command execution process, each executed command time, executed content, whether command execution is successful and the like are written into a log.txt log file, and a screenshot after the command execution is stored in a peer directory of a script file.
The report generation module 5: and analyzing the log content and matching the operation screenshots to generate a test report.
Fig. 8 is a block diagram showing an example of the structure of the report generating module 5, and as shown in fig. 8, the report generating module 5 includes: a log analysis unit 51 and a report generation unit 52, wherein:
log analysis section 51: the log file generated when the script parsing unit 42 plays back the script is read, and whether the playback action is successful or not and the corresponding operation screenshot name are determined according to the identification information (id information in table 1) and uploaded to the report generating unit 52.
In the specific implementation process, the generated log file includes the time, the execution content, whether the command execution is successful, and the like of each command, and records the file name of the operation screenshot after each command, for example, the following click operation log information (actually, many other additional information are included, which is not all shown here):
{"tag":"success","data":″adb shell input tap100100″,"time":1.6037921347820709E9,"ret":"1603792134695.jpg"}。
wherein, the "tag": success "indicates that the click is successful, the" data ": the" adb shell input tap 100100 "can judge that the click operation is completed, and the" ret ": 1603792134695.jpg" indicates that the screenshot after the click command is executed is 1603792134695. jpg.
The report generation unit 52: and the test report is responsible for generating a test report capable of displaying the action type, the execution result and the execution result screenshot of each step according to the playback information sent by the log analysis unit 51 and the operation screenshot generated in the playback process.
In practical operation, the units and the modules may be combined or may be singly arranged, and the present invention is not limited thereto.
The embodiment of the invention transmits the continuously captured intelligent POS screen information through the sokent, thereby realizing the screen projection of the intelligent POS at the computer end; the control information in the POS application page is captured and marked in a control identification mode, and the script recording is completed; the script playback on the intelligent POS is completed through command splicing, namely, a corresponding adb command is combined according to the acquired control information and action information; generating a POS application test report by adopting a log detection mode, namely analyzing a log file generated when the intelligent POS playback script is analyzed; the complete intelligent POS automatic test process comprising four parts of screen projection, script recording, script playback and report generation is realized.
Fig. 9 is a flow chart of the work of the automated testing system of the intelligent POS, as shown in fig. 9, the flow chart includes:
step 901: the local computer is connected with the intelligent POS terminal through a USB line, the screen mapping unit 11 in the screen projection module 1 acquires POS terminal screen information, and the screen mapping unit 12 is called to zoom and project the POS terminal screen information to the computer terminal.
Step 902: the control information capturing unit 21 in the control processing module 2 automatically captures the control information of the page of the POS terminal, calls the geometric scaling unit 12 to perform geometric scaling and then implicitly marks the control information in the projection page of the computer terminal for matching the control information of the computer terminal with the action information.
Step 903: and simultaneously starting the action information monitoring unit 22 in the control processing module 2 and the monitoring program of the hardware input monitoring module 3, monitoring the action generated on the projection page, the corresponding control information marked by the control information grabbing unit 21 in the control processing module 2 and the hardware input action in the page, and transmitting the monitored information to the script generating unit 41 of the script processing module 4 in real time in a JSON format.
Step 904: the script generating unit 41 generates a corresponding EXCEL format script according to the JSON data sent by the action information monitoring unit 22 of the control processing module 2 and the hardware input monitoring module 3.
Step 905: the script generating unit 41 performs format check on the generated script, determines whether the script content generated in step 904 is in a correct format, if so, performs step 907, and if not, proceeds to step 906.
Step 906: the script generating unit 41 generates that the script format is incorrect, prompts that the script format is incorrect, and re-executes step 901.
Step 907: the script analysis unit 42 of the script processing module 4 interprets and executes the script generated by the script generation unit 41, and generates a log file and each step screen shot.
Step 908: the log analysis unit 51 in the report generation module 5 reads the log file generated by the script analysis unit 42, determines whether the playback action is successful or not and the corresponding operation screenshot name according to the identification information in the log file, and uploads the result to the report generation unit 51.
Step 909: the report generation unit 51 generates a test report capable of showing the action type, execution result, and execution result screenshot of each step for the playback information sent in step 908 and the operation screenshot generated in the playback process.
The embodiment of the invention provides an intelligent POS automatic test scheme, which establishes a complete automatic test flow including script recording, script playback and test report generation, realizes automatic flow construction of intelligent POS application test, brings the intelligent POS automation into the whole automatic test range, and improves the accuracy and reliability of intelligent POS test.
Based on similar inventive concepts, the embodiment of the invention further provides a testing method of the intelligent POS, and preferably, the method can be applied to the intelligent POS testing device.
Fig. 10 is a flowchart of a testing method of the smart POS, as shown in fig. 10, the method including:
1001, obtaining POS screen information, zooming the screen information according to a predetermined zoom rule, and displaying the screen information to a user terminal, where the screen information includes at least one control, and the control includes: and attribute information.
Specifically, the screen information may be subjected to zoom processing according to a predetermined zoom rule; and then, displaying the control in the screen information after the zooming processing on the user terminal, and hiding the control information in a projection area of the user terminal.
In one embodiment, firstly, a control in the screen information displayed on the user terminal is tested; and then monitoring the test operation according to a preset monitoring program, and generating the test operation information according to a monitoring result.
Preferably, the generated test operation information is in a first format, and the test operation information in the first format may be converted into test operation information in a second format, and the data in the second format may be applied to the POS.
For example, the generated test operation information is in JSON format, and the test operation information in JSON format may be converted into test operation information in EXCEL format, and then step 1003 is executed.
The test operation information further includes: and the sequence information of the test action and the follow-up action information. Step 1003 specifically includes: carrying out corresponding scaling processing on the test control information in the test operation information in the EXCEL format; and then, converting the test operation information after the zooming processing into POS executable operation instructions according to the sequence information of the test action and the follow-up action information, and sending the POS executable operation instructions to the POS, so that the POS can execute corresponding test operation according to the received operation instructions.
And 1004, generating a test report according to the test operation executed by the POS. The test report includes: and the POS executes log information of the test operation and screenshot information of each operation step in the execution.
The acquired POS screen information is displayed to the user terminal after being subjected to zooming processing, the control in the screen information on the user terminal is subjected to testing operation, testing operation information is generated, then the testing operation information is sent to the POS, the POS can execute corresponding testing operation according to the testing operation information, and then a testing report is generated according to the testing operation executed by the POS.
The present embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, and the like, but is not limited thereto. In this embodiment, the electronic device may be implemented with reference to the above method embodiment and the embodiment of the testing apparatus/system of the intelligent POS, and the contents thereof are incorporated herein, and repeated descriptions are omitted.
Fig. 11 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention. As shown in fig. 11, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. Notably, this diagram is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the testing function of the smart POS may be integrated into the central processor 100. The central processor 100 may be configured to control as follows:
the method comprises the steps of obtaining POS screen information, zooming the screen information according to a preset zooming rule, and displaying the screen information to a user terminal, wherein the screen information comprises at least one control, and the control comprises: attribute information;
performing test operation on a control in the screen information displayed on the user terminal, and generating the test operation information, wherein the test operation information includes: testing action information, attribute information of the testing control and subsequent action information corresponding to the testing action information;
sending the test operation information to the POS so that the POS executes corresponding test operation according to the test operation information;
generating a test report according to the test operation executed by the POS, wherein the test report comprises: and the POS executes log information of the test operation and screenshot information of each operation step in the execution.
As can be seen from the above description, according to the electronic device provided in the embodiment of the present invention, the obtained POS screen information is zoomed and then displayed on the user terminal, the control in the screen information on the user terminal is subjected to the test operation to generate the test operation information, and then the test operation information is sent to the POS.
In another embodiment, the testing device/system of the smart POS may be configured separately from the central processor 100, for example, the testing device/system of the smart POS may be configured as a chip connected to the central processor 100, and the testing function of the smart POS is realized by the control of the central processor.
As shown in fig. 11, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 11; furthermore, the electronic device 600 may also comprise components not shown in fig. 11, which may be referred to in the prior art.
As shown in fig. 11, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the testing method for the intelligent POS.
In summary, the embodiment of the present invention provides an intelligent POS automatic test scheme, which implements an intelligent POS automatic test process including script recording, script playback, and report generation, and allows a tester to implement a service logic by writing a script, and playback the script to complete a test, thereby freeing the tester, saving labor consumption, and improving test efficiency. The automatic testing method in the embodiment of the invention completes the testing work through the script playback, saves the testing process in a script form, and simultaneously allows the testing personnel to realize the continuous updating of the script through manual modification, thereby realizing the asset precipitation, facilitating the storage of the testing result and simultaneously improving the testing stability. In addition, the embodiment of the invention breaks through the interaction bottleneck with hardware media such as bank cards in the automatic test of the intelligent POS application, realizes the automatic input of hardware information, enables the intelligent POS application test to get rid of the limitation of the hardware media, and widens the application scenes of the automatic test method of the intelligent POS in the embodiment of the invention. Meanwhile, the embodiment of the invention realizes the complete intelligent POS automatic test flow, provides a feasible way for the intelligent POS automatic test, and can realize a set of unified and standardized intelligent POS automatic flow system based on the automatic test flow.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings. The many features and advantages of the embodiments are apparent from the detailed specification, and thus, it is intended by the appended claims to cover all such features and advantages of the embodiments which fall within the true spirit and scope thereof. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the embodiments of the invention to the exact construction and operation illustrated and described, and accordingly, all suitable modifications and equivalents may be resorted to, falling within the scope thereof.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (11)
1. A testing method of an intelligent point of sale (POS), which is characterized by comprising the following steps:
the method comprises the steps of obtaining POS screen information, zooming the screen information according to a preset zooming rule, and displaying the screen information to a user terminal, wherein the screen information comprises at least one control, and the control comprises: attribute information; performing test operation on a control in the screen information displayed on the user terminal, and generating the test operation information, wherein the test operation information includes: testing action information, attribute information of the testing control and subsequent action information corresponding to the testing action information;
sending the test operation information to the POS so that the POS executes corresponding test operation according to the test operation information;
and generating a test report according to the test operation executed by the POS.
2. The method of claim 1, wherein zooming the screen information according to a predetermined zoom rule and displaying the screen information on the user terminal comprises:
zooming the screen information according to a preset zooming rule;
and displaying the control in the screen information after the zooming processing on the user terminal, and hiding the control information in a projection area of the user terminal.
3. The method of claim 1, wherein the generated test operation information is in a first format, and wherein before sending the test operation information to the POS, the method further comprises:
converting the test operation information in the first format to test operation information in a second format, the data in the second format being applicable to the POS.
4. The method of claim 3, wherein the first format is a JSON format and the second format is an EXCEL format.
5. The method of claim 4, wherein the testing operation information further comprises: the order information of the test action and the follow-up action information, and the sending of the test operation information to the POS comprises the following steps:
carrying out corresponding scaling processing on the test control information in the test operation information in the EXCEL format;
and converting the test operation information after the zooming processing into POS executable operation instructions according to the sequence information, and sending the POS executable operation instructions to the POS.
6. The method of claim 1, wherein performing a test operation on a control in screen information displayed on the user terminal and generating the test operation information comprises:
testing a control in the screen information displayed on the user terminal;
and monitoring the test operation according to a preset monitoring program, and generating the test operation information according to a monitoring result.
7. The method of any of claims 1 to 6, wherein the test report comprises: and the POS executes log information of the test operation and screenshot information of each operation step in the execution.
8. A testing device for an intelligent POS, the device comprising:
the POS screen information acquisition unit is used for acquiring POS screen information, the screen information comprises at least one control, and the control comprises: attribute information;
the display unit is used for zooming the screen information according to a preset zooming rule and then displaying the screen information to the user terminal;
a test operation information generating unit, configured to perform a test operation on a control in screen information displayed on the user terminal, and generate the test operation information, where the test operation information includes: testing action information, attribute information of the testing control and subsequent action information corresponding to the testing action information;
the test operation information sending unit is used for sending the test operation information to the POS so that the POS executes corresponding test operation according to the test operation information;
and the test report generating unit is used for generating a test report according to the test operation executed by the POS.
9. A testing system for an intelligent POS, the system comprising: the intelligent POS testing apparatus of claim 8 and an intelligent POS, wherein said POS comprises:
an operation instruction receiving unit, configured to receive a test operation instruction, where the test operation instruction includes: the test action information, the test control information and the subsequent action information corresponding to the test action information;
and the operation instruction execution unit is used for executing operation on the corresponding control on the screen according to the received test operation instruction.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the processor executes the program.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110042323.7A CN112863084B (en) | 2021-01-13 | 2021-01-13 | Intelligent sales terminal, and testing method, device and system of intelligent sales terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110042323.7A CN112863084B (en) | 2021-01-13 | 2021-01-13 | Intelligent sales terminal, and testing method, device and system of intelligent sales terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112863084A true CN112863084A (en) | 2021-05-28 |
CN112863084B CN112863084B (en) | 2023-04-25 |
Family
ID=76003353
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110042323.7A Active CN112863084B (en) | 2021-01-13 | 2021-01-13 | Intelligent sales terminal, and testing method, device and system of intelligent sales terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112863084B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63195768A (en) * | 1987-02-09 | 1988-08-12 | Hitachi Ltd | Pos system test system |
US20020178400A1 (en) * | 2001-04-10 | 2002-11-28 | Kartik Venkataraman | POS terminal test system and method |
WO2007061241A1 (en) * | 2005-11-25 | 2007-05-31 | Fusionsoft Co., Ltd. | Error test method for mobile communication terminals |
CN103164310A (en) * | 2011-12-12 | 2013-06-19 | 百度在线网络技术(北京)有限公司 | Method, equipment and system used for testing mobile equipment |
CN104424089A (en) * | 2013-08-21 | 2015-03-18 | 中兴通讯股份有限公司 | Terminal testing method and device |
CN106557421A (en) * | 2016-10-10 | 2017-04-05 | 深圳市证通电子股份有限公司 | POS applied program testing methods and device |
US20170278362A1 (en) * | 2014-09-19 | 2017-09-28 | Nec Corporation | Information processing device, information processing method, and program |
US20170308843A1 (en) * | 2014-10-28 | 2017-10-26 | Panasonic Intellectual Property Management Co., Lt d. | Facility management assistance device, facility management assistance system, and facility management assistance method |
CN108446215A (en) * | 2018-02-05 | 2018-08-24 | 百富计算机技术(深圳)有限公司 | Method, apparatus, system and the terminal of POS machine test |
US20200201749A1 (en) * | 2018-12-21 | 2020-06-25 | Ncr Corporation | Point of sale platform process crawler |
-
2021
- 2021-01-13 CN CN202110042323.7A patent/CN112863084B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63195768A (en) * | 1987-02-09 | 1988-08-12 | Hitachi Ltd | Pos system test system |
US20020178400A1 (en) * | 2001-04-10 | 2002-11-28 | Kartik Venkataraman | POS terminal test system and method |
WO2007061241A1 (en) * | 2005-11-25 | 2007-05-31 | Fusionsoft Co., Ltd. | Error test method for mobile communication terminals |
CN103164310A (en) * | 2011-12-12 | 2013-06-19 | 百度在线网络技术(北京)有限公司 | Method, equipment and system used for testing mobile equipment |
CN104424089A (en) * | 2013-08-21 | 2015-03-18 | 中兴通讯股份有限公司 | Terminal testing method and device |
US20170278362A1 (en) * | 2014-09-19 | 2017-09-28 | Nec Corporation | Information processing device, information processing method, and program |
US20170308843A1 (en) * | 2014-10-28 | 2017-10-26 | Panasonic Intellectual Property Management Co., Lt d. | Facility management assistance device, facility management assistance system, and facility management assistance method |
CN106557421A (en) * | 2016-10-10 | 2017-04-05 | 深圳市证通电子股份有限公司 | POS applied program testing methods and device |
CN108446215A (en) * | 2018-02-05 | 2018-08-24 | 百富计算机技术(深圳)有限公司 | Method, apparatus, system and the terminal of POS machine test |
US20200201749A1 (en) * | 2018-12-21 | 2020-06-25 | Ncr Corporation | Point of sale platform process crawler |
Also Published As
Publication number | Publication date |
---|---|
CN112863084B (en) | 2023-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107516510B (en) | Automatic voice testing method and device for intelligent equipment | |
CN108717393B (en) | Application program testing method and mobile terminal | |
CN108959068B (en) | Software interface testing method, device and storage medium | |
CN108920380A (en) | Test method, device, server, equipment and the storage medium of the software compatibility | |
CN112882953B (en) | Automatic demonstration method and system of application program based on android debug bridge | |
CN111752793A (en) | System abnormity monitoring method and device, computer equipment and storage medium | |
CN107704282B (en) | Loading method and device applied to embedded system | |
CN112423135B (en) | Information processing method, apparatus, computer device and storage medium for video playback | |
CN109753530B (en) | Data processing method and device, medium and terminal thereof | |
CN112866312A (en) | Script generation method, remote operation method and related equipment | |
CN111949509A (en) | Application software response time testing method, device, equipment and storage medium | |
CN111475237A (en) | Menu processing method and device, electronic equipment and storage medium | |
CN108717350B (en) | Terminal device and flash memory chip operation result display method based on terminal device | |
CN112863084B (en) | Intelligent sales terminal, and testing method, device and system of intelligent sales terminal | |
CN112463210A (en) | Interface document generation method, terminal device and computer-readable storage medium | |
CN101334990A (en) | Information display apparatus, display system, and information display method | |
CN111817916A (en) | Test method, device, equipment and storage medium based on mobile terminal cluster | |
CN110958243A (en) | Network vulnerability submitting method and device, storage medium and electronic equipment | |
CN115952079A (en) | Method and system for recording mobile application automation behaviors and analyzing and positioning defects | |
CN116012753A (en) | Video processing method, device, computer equipment and computer readable storage medium | |
CN111931465A (en) | Method and system for automatically generating user manual based on user operation | |
CN114610212A (en) | Front-end visual video content editing method, device, equipment and storage medium | |
CN110851313B (en) | Sensor debugging method, intelligent terminal, storage medium and electronic equipment | |
CN103491234A (en) | Data processing method and electronic equipment | |
CN112685306A (en) | Test method, test device, user terminal 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 |