CN107391361A - A kind of POS terminal automatic test approach and device - Google Patents

A kind of POS terminal automatic test approach and device Download PDF

Info

Publication number
CN107391361A
CN107391361A CN201710440337.8A CN201710440337A CN107391361A CN 107391361 A CN107391361 A CN 107391361A CN 201710440337 A CN201710440337 A CN 201710440337A CN 107391361 A CN107391361 A CN 107391361A
Authority
CN
China
Prior art keywords
case
pos terminal
test
execution
test result
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
Application number
CN201710440337.8A
Other languages
Chinese (zh)
Other versions
CN107391361B (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

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 present invention is applied to POS terminal technical field, there is provided a kind of POS terminal automatic test approach and device, including:Using remote procedure call XML RPC agreements, use-case is downloaded from the case management system TESTLINK based on web;The testing attribute of selection is obtained, according to the testing attribute of selection, the use-case to be performed is filtered out in the use-case of download;Select keyword to be ranked up in the use-case to be performed, obtain execution sequence;According to execution sequence, POS terminal batch processing or the single execution use-case are controlled, after execution terminates, uploads test result.The embodiment of the present invention has the beneficial effect that:1) TESTLINK is operated by remotely using XML RPC agreements, realizes the download of use-case and the upload of test result;2) service-strong agreement and POS terminal communication, control the use-case in POS terminal to perform, realize the purpose tested automatically;3) filtering, sequence, batch processing or the single mode for performing use-case are provided, tester is greatly facilitated and performs use-case on demand.

Description

A kind of POS terminal automatic test approach and device
Technical field
The invention belongs to POS terminal technical field, more particularly to a kind of POS terminal automatic test approach and device.
Background technology
With economic development, the configuration of POS terminal is stronger and stronger, and function is more and more complete, when user needs to complete business When product are paid, bankcard consumption can be carried out by POS terminal, the rapid payment brought with enjoying POS terminal is experienced, in addition, , it is necessary to test POS before POS comes into operation.
However, existing POS terminal hand filling test result in test case, it is necessary on TESTLINK, and record Log information, be unfavorable for improve testing efficiency, the reason is that on TESTLINK hand filling test result mode, though Test result can be so updated onto TESTLINK, but its process can only be manually completed by user, it is complex for operation step, work as use-case When a lot, the overlong time of consuming, testing efficiency is have impact on,
The content of the invention
In view of this, it is existing to solve the embodiments of the invention provide a kind of POS terminal automatic test approach and device POS terminal hand filling test result in test case, it is necessary on TESTLINK, and log information, are unfavorable for carrying The problem of high testing efficiency.
The first aspect of the embodiment of the present invention provides a kind of POS terminal automatic test approach, including:
Using remote procedure call XML-RPC agreements, download and use from the case management system TESTLINK based on web Example;
The testing attribute of selection is obtained, according to the testing attribute of selection, the use to be performed is filtered out in the use-case of download Example;
Select keyword to be ranked up in the use-case to be performed, obtain execution sequence;
According to execution sequence, POS terminal batch processing or the single execution use-case are controlled, after execution terminates, uploads test As a result.
The second aspect of the embodiment of the present invention provides a kind of POS terminal automatic testing equipment, including:
Download module, for using remote procedure call XML-RPC agreements, from the case management system based on web Use-case is downloaded on TESTLINK;
Screening module, for obtaining the testing attribute of selection, according to the testing attribute of selection, screened in the use-case of download Go out the use-case to be performed;
Order module, for selecting keyword to be ranked up in the use-case to be performed, obtain execution sequence;
Test module, for according to execution sequence, controlling POS terminal batch processing or the single execution use-case, performing knot Shu Hou, upload test result.
The third aspect of the embodiment of the present invention provides a kind of POS terminal automatic testing equipment/terminal device, including storage Device, processor and it is stored in the computer program that can be run in the memory and on the processor, the processor The step of above method being realized when performing the computer program.
The fourth aspect of the embodiment of the present invention provides a kind of computer-readable recording medium, the computer-readable storage Media storage has the step of computer program, the computer program realizes the above method when being executed by processor.
Existing beneficial effect is the embodiment of the present invention compared with prior art:
1) TESTLINK is operated by remotely using XML-RPC agreements, realizes download and the test result of use-case Upload;
2) service-strong agreement and POS terminal communication, control the use-case in POS terminal to perform, realize what is tested automatically Purpose;
3) filtering, sequence, batch processing or the single mode for performing use-case are provided, tester is greatly facilitated and performs on demand Use-case.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art In the required accompanying drawing used be briefly described, it should be apparent that, drawings in the following description be only the present invention some Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these Accompanying drawing obtains other accompanying drawings.
Fig. 1 is the implementation process figure of POS terminal automatic test approach provided in an embodiment of the present invention;
Fig. 2 is to be assisted in POS terminal automatic test approach provided in an embodiment of the present invention using remote procedure call XML-RPC View, use-case and the implementation process figure shown are downloaded from the case management system TESTLINK based on web;
Fig. 3 is the implementation process that use-case and sequence are filtered in POS terminal automatic test approach provided in an embodiment of the present invention Figure;
Fig. 4 is the applicating flow chart that test is performed in POS terminal automatic test approach provided in an embodiment of the present invention;
Fig. 5 is the sequence chart of POS terminal automatic test approach thread provided in an embodiment of the present invention;
Fig. 6 is the applicating flow chart of upload test result provided in an embodiment of the present invention;
Fig. 7 is the structured flowchart of POS terminal automatic testing equipment provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram of POS terminal automatic testing equipment/terminal device provided in an embodiment of the present invention.
Embodiment
In describing below, in order to illustrate rather than in order to limit, it is proposed that such as tool of particular system structure, technology etc Body details, thoroughly to understand the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known system, device, electricity Road and the detailed description of method, in case unnecessary details hinders description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
It should be appreciated that ought be in this specification and in the appended claims in use, special described by the instruction of term " comprising " Sign, entirety, step, operation, the presence of element and/or component, but be not precluded from one or more of the other feature, entirety, step, Operation, element, component and/or its presence or addition for gathering.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the present invention.As used in description of the invention and appended claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and appended claims is Refer to any combinations of one or more of the associated item listed and be possible to combine, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, the terminal device described in the embodiment of the present invention is including but not limited to such as with the sensitive table of touch Mobile phone, laptop computer or the tablet PC in face (for example, touch-screen display and/or touch pad) etc it is other Portable set.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but is had The desktop computer of touch sensitive surface (for example, touch-screen display and/or touch pad).
In discussion below, the terminal device including display and touch sensitive surface is described.However, it should manage Solution, one or more of the other physical User that terminal device can include such as physical keyboard, mouse and/or control-rod connect Jaws equipment.
Terminal device supports various application programs, such as one or more of following:Drawing application program, demonstration application Program, word-processing application, website establishment application program, disk imprinting application program, spreadsheet applications, game are answered With program, telephony application, videoconference application, email application, instant messaging applications, forging Refining supports application program, photo management application program, digital camera application program, digital camera application program, web-browsing should With program, digital music player application and/or video frequency player application program.
The various application programs that can be performed on the terminal device can use at least one of such as touch sensitive surface Public physical user-interface device.It can be adjusted among applications and/or in corresponding application programs and/or change touch is quick Feel the corresponding information shown in the one or more functions and terminal on surface.So, terminal public physical structure (for example, Touch sensitive surface) the various application programs with user interface directly perceived and transparent for a user can be supported.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
Embodiment one
With reference to figure 1, Fig. 1 is the implementation process figure of POS terminal automatic test approach provided in an embodiment of the present invention, this method Applied to terminal device, POS terminal automatic test approach as shown in Figure 1 may comprise steps of:
S101, using remote procedure call XML-RPC agreements, from above and below the case management system TESTLINK based on web Carry use-case;
Wherein, S101, it is specially:
Server address, user name and key are obtained, according to server address, user name and key, is connected based on web's Case management system TESTLINK;
According to acquisition project, plan and the version of selection, using remote procedure call XML-RPC agreements, from TESTLINK It is upper to download the use-case specified.XML-RPC agreements are XML Remote Procedure Call, i.e. remote procedure call.
S102, the testing attribute of selection is obtained, according to the testing attribute of selection, being filtered out in the use-case of download to perform Use-case;
Wherein, the testing attribute of selection is obtained, according to the testing attribute of selection, being filtered out in the use-case of download to perform Use-case, be specially:
Testing attribute list is shown, when the testing attribute list includes test pattern, priority, test-types, test Between, at least one of execution state testing attribute;
According to selection operation, the testing attribute of selection is obtained;
According to the testing attribute of selection, use-case is filtered out in the use-case of download.
According to the testing attribute of selection, the use-case of download is filtered, filters out the use-case to be performed.
Wherein, select keyword to be ranked up in the use-case to be performed, obtain execution sequence, be specially:
Select keyword;
Using the keyword and multi-stage sequencing mode of selection, the use-case to be performed is ranked up, obtains execution sequence, And show the use-case after sequence.
S104, according to execution sequence, POS terminal batch processing or the single execution use-case are controlled, after execution terminates, is uploaded Test result.
Wherein, according to execution sequence, by the way of multithreading Coordinated Communication, control POS terminal batch processing or single hold The row use-case, after execution terminates, test result is uploaded, the multithreading includes main thread, control thread, test run thread With serial ports thread.
Using XML-RPC agreements, test result is uploaded to TESTLINK.
Wherein, S104 has two kinds of embodiments, and details are as follows:
The first embodiment, according to execution sequence, by serial port communicating protocol or parallel port communication agreement, to POS terminal The instruction for performing use-case is sent, after waiting the POS terminal use-case to be performed, test result is obtained, uploads test result Onto TESTLINK.
Second of embodiment, using heartbeat detection, judge whether the communication link of itself and POS terminal normally connects;
After normal connection, according to execution sequence, by serial port communicating protocol, the instruction for performing use-case is sent to POS terminal, POS terminal data are monitored using serial ports thread;
When listening to the arrival of POS terminal data, notify the test run thread to receive and handle POS terminal data, After obtaining test result, notice control active thread record test result;
After record, the next use-case to be performed is increased according to execution sequence, successively back and forth;
After waiting the POS terminal use-case to be performed, test result is obtained, uploads test result to TESTLINK On.
For purposes of illustration only, following is the preferable application flow of POS terminal automatic test approach, details are as follows:
1. downloading the use-case specified from TESTLINK, be set using remote procedure call XML-RPC agreements, from based on The protocol contents of use-case are downloaded on web case management system TESTLINK, obtain the use-case information to be performed, ATC softwares make Shown with JAVA grid control, and right button support is provided;
2. then filtered, there is provided module and various testing attributes, used here as JAVA drop-down list and button Control realizes that the data display of filtering still use grid control, but has customized a row control, support check box function, can be with Refine screening action;
3. screening enters sequence later, using a Premium Features, multi-stage sequencing is supported, enters after the completion of sequence and performs, Due to considering GUI timely responding to property, when performing use-case, start a worker thread and perform, ensure the friendly of gui interface, Perform use-case and support batch processing, whole use-cases can be run, after can also suspending, use-case is continued executing with, also support single use Example, this is the result of multithreading Coordinated Communication;
4. perform use-case, the instruction for performing use-case is sent by serial port communicating protocol, after waiting POS execution to terminate, is obtained Test result is taken, uploads test result to TESTLINK.
The beneficial effect of the embodiment of the present invention is the following aspects:
In a first aspect, operate TESTLINK by remotely using XML-RPC agreements, download and the result of use-case are realized Upload;
Second aspect, service-strong agreement and POS terminal communication, control the use-case in POS terminal to perform, and realize automatic The purpose of test, improves testing efficiency;
The third aspect, there is provided various filterings, sequence, batch processing or single execution use-case, greatly facilitate tester by Use-case need to be performed, reduces human resources input;
Fourth aspect, the compatible all windows serial systems of software energy are surveyed using the JAVA POS terminals realized automatically, and 32bit and 64bit platforms are supported, are easy to transplant.
Embodiment two
With reference to figure 2, Fig. 2 is that remote procedure call is used in POS terminal automatic test approach provided in an embodiment of the present invention XML-RPC agreements, use-case and the implementation process figure shown, the POS are downloaded from the case management system TESTLINK based on web Terminal automatic test approach is applied to terminal device, as shown in Fig. 2 comprising the following steps:
S201, select project, plan, version;
S202, click on DownloadCase buttons;
S203, checks whether connection succeeds;
S204, begin to use remote procedure call XML-RPC agreements, from the case management system TESTLINK based on web Upper download use-case;
S205, using remote procedure call XML-RPC agreements, from above and below the case management system TESTLINK based on web After the completion of carrying use-case, into use-case display interface, wait for downloads completion;
S206, main thread enter use-case display interface;
S207, background thread continue the use-case of download to write file.
In embodiments of the present invention, according to server address, user name and key, TESTLINK is connected to, if it is successful, Then continue acquisition project, plan and version, after the version for selecting nominative testing, carry out use-case download, wait use-case to download and complete Afterwards, in order to improve efficiency, using the technology of file buffering, appearance is avoided repeatedly from server repeated downloads, it is unnecessary to bring Network load situation.
With reference to figure 3, Fig. 3 is that use-case and sequence are filtered in POS terminal automatic test approach provided in an embodiment of the present invention Implementation process figure, the POS terminal automatic test approach is applied to terminal device, as shown in figure 3, comprising the following steps:
S301, selecting module;
S302, the API of selecting module;
S303, test pattern is selected, priority, test-types, testing cost, performs state;
S304, click on Filter buttons;
S305, judges whether use-case meets screening conditions, is, performs S306, otherwise terminates;
S306, the use-case acquiescence filtered out are all chosen;
S307, it can continue to choose the use-case for being not desired to test;
S308, finally click on Next and complete screening;
S309, selected and sorted keyword, there are 5 priority attributes;
S310, rank button is clicked on, is ranked up;
S311, the data shown originally are deleted, show the data of new sort.
In embodiments of the present invention, module includes api interface, and api interface includes test case again, and test case is wrapped in itself Test pattern, priority, test-types, testing time, execution status attribute etc. are included, filtering function is just entered using these characteristics Row filtering, filters out the use-cases of needs, because these use-cases need to show by JAVA grid control, often row displaying one with Example, a row check box is included in often going, therefore further screening action can be done, final choice goes out the use-case to be performed, pin 5 keywords can be selected to be ranked up the use-case of selection, multi-stage sequencing algorithm be performed, to realize the ranking function of use-case.
Embodiment three
With reference to figure 4, Fig. 4 is the application stream that test is performed in POS terminal automatic test approach provided in an embodiment of the present invention Cheng Tu, this method is applied to terminal device, as shown in figure 4, this method may comprise steps of:
1. send implementation of test cases instruction;
2. send PC execute instructions;
3. PC instructions are performed;
4. test case instruction is performed.
In embodiments of the present invention, performing use-case is needed to carry out serial communication with POS terminal machine, and PC is sent according to agreement For protocol instructions to POS terminal, POS terminal receives execute instruction after instruction, performs the POS of PC modifications if desired during use-case The environment of terminal test, POS terminal, which then sends instruction, allows PC to perform, and PC returns to POS terminal after performing, and POS terminal continues to hold Row use-case, PC is returned result to after the completion of execution.
In embodiments of the present invention, realized for ATC softwares, after the above-mentioned flow of insertion, in order to ensure that communication is reliable, with And response etc., before adding such as heartbeat detection, such as serial ports transmission data, heartbeat detection is first carried out, judges link It is whether clear and coherent;Above all multithreading is realized, comprising four threads, respectively main thread processing interface responds, control thread, Test run thread and the cooperation of serial ports thread carry out use-case execution, and serial ports thread is substantially carried out data decryptor, when listening to POS terminal When data arrive, notice test run thread receives and processing data, after processing terminates, notice control active thread record result Information, then start to increase next use-case, test run thread is performed after detecting, successively back and forth, is intuitively illustrated It refer to Fig. 5, Fig. 5 is the sequence chart of POS terminal automatic test approach thread provided in an embodiment of the present invention, this method application In terminal device, as shown in Figure 5:
Main thread starts the beginning thread TestQueue.start in test queue;
Test run thread, which is performed in test queue, sentences do-nothing function TestQueue.isEmpty, waits Wait;
Serial ports thread begins listening for data;
Main thread receives the message of start button click;
Control thread, which is performed in test result queue, sentences do-nothing function TestQueue.isEmpty, waits Wait;
Thread is controlled to perform the increase queue function addLast in test queue, notice test run thread starts to test (notify), and Wait is waited, normal flow circulates;
Test run thread, which is performed in test queue, sentences do-nothing function TestQueue.isEmpty, sends and performs test life SendDoTestCmd is made, connects and waits connection Wait;
String product thread sends the message of notice serial data arrival to test run thread;
Test run thread receives result and handled, and waits Wait;
Test run thread sends the message of notice reception result to control thread;
Control thread to receive results messages, return to the increase queue function addLast in control thread execution test queue, The test item directly tested in queue function addLast.
In embodiments of the present invention, after having performed use-case, the work of result upload is proceeded by, is assisted by means of XML-RPC View, result data is uploaded on TESTLINK corresponding to, and a variety of situations are considered in realization, for example whether the upper TESTLINK of connection On, whether the use-case to be uploaded is use-case in technical routine, plan, version, uploads use-case also in two steps, first uploads test knot Fruit and remarks, if also annex uploads, the result ID uploaded just now is first obtained, then uploads annex again, with reference to figure 6, Fig. 6 is The applicating flow chart provided in an embodiment of the present invention for uploading test result, this method are applied to terminal device, as shown in fig. 6, should Method may comprise steps of:
S601, click on result upload button;
S602, judge TESTLINK whether successful connection;
S603, judge whether to upload to this project, plan, structure and upload user;
S604, if importing interface, display result uploads, then selects this situation without file, if be introduced directly into, needs Select the destination file to be uploaded;
S605, selection upload whole result datas, or latest data;
S606, result upload interface is shown, and show the result data of importing;
S607, click are confirmed whether to upload, are to perform S608, otherwise terminate;
S608, use-case is obtained from TESTLINK, compares the data for uploading result;
S609, the data of upload are correct, are, perform S610, otherwise jump to S614;
S610, start to upload test result and remarks;
S611, judges whether upload succeeds, and is to perform S612, otherwise jumps to S614;
S612, result success is uploaded, has detected whether annex, if continuing to upload annex;
S613, judge that annex uploads and whether succeed, be to terminate, otherwise perform S614;
S614, mistake is prompted to return.
The embodiment of the present invention adds the flow for performing use-case and uploading test result on the basis of embodiment one, two, By Multi-thread Communication mode, it can guarantee that the communication of terminal device and POS terminal is reliable, POS terminal can timely respond to, using carrying High testing efficiency.
It should be understood that the size of the sequence number of each step is not meant to the elder generation of execution sequence in above-described embodiment one, two, three Afterwards, the execution sequence of each process should be determined with its function and internal logic, the implementation process structure without tackling the embodiment of the present invention Into any restriction.
Example IV
Corresponding to the method described in foregoing embodiments one, two, three, with reference to figure 7, Fig. 7 is POS provided in an embodiment of the present invention The structured flowchart of terminal automatic testing equipment, applied to terminal device, terminal device includes but is not limited to computer, mobile electricity Words, pocket computer (Pocket Personal Computer, PPC), palm PC, notebook computer, personal digital assistant (Personal Digital Assistant, PDA), MP4, MP3.For purposes of illustration only, it illustrate only related to the present embodiment Part.For convenience of description, it illustrate only part related to the present embodiment.
Reference picture 7, the POS terminal automatic testing equipment include:
Download module 71, for using remote procedure call XML-RPC agreements, from the case management system based on web Use-case is downloaded on TESTLINK;
Screening module 72, for obtaining the testing attribute of selection, according to the testing attribute of selection, sieved in the use-case of download Select the use-case to be performed;
Order module 73, for selecting keyword to be ranked up in the use-case to be performed, obtain execution sequence;
Test module 74, for according to execution sequence, controlling POS terminal batch processing or the single execution use-case, performing After end, test result is uploaded.
As a kind of implementation of the present embodiment, in the POS terminal automatic testing equipment, the screening module, have Body is used to show testing attribute list, the testing attribute list include test pattern, priority, test-types, the testing time, At least one of execution state testing attribute, according to selection operation, the testing attribute of selection is obtained, according to the test category of selection Property, filter out use-case in the use-case of download;The order module, specifically for selecting keyword, using the keyword of selection And multi-stage sequencing mode, the use-case to be performed is ranked up, obtains execution sequence, and shows the use-case after sequence.
As a kind of implementation of the present embodiment, in the POS terminal automatic testing equipment, the test module, use According to execution sequence, by serial port communicating protocol or parallel port communication agreement, the instruction for performing use-case is sent to POS terminal, etc. After the use-case that POS terminal to be performed, test result is obtained, uploads test result to TESTLINK;Or
The test module includes:
Detection unit, for using heartbeat detection, judging whether the communication link of itself and POS terminal normally connects;
Monitoring unit, after normally connecting, according to execution sequence, by serial port communicating protocol, send and hold to POS terminal The instruction of row use-case, POS terminal data are monitored using serial ports thread;
Recording unit, for when listening to the arrival of POS terminal data, notifying the test run thread to receive and handle POS terminal data, after obtaining test result, notice control active thread record test result;
Test cell, for record after, the next use-case to be performed is increased according to execution sequence, successively back and forth; After waiting the POS terminal use-case to be performed, test result is obtained, uploads test result to TESTLINK.
The beneficial effect of the embodiment of the present invention is two aspects, on the one hand, by testing attribute, filters out the use to be performed Example, realizes and performs use-case on demand, reduces human resources input, improves testing efficiency, on the other hand, by using can Agreement and the POS terminal communication leaned on, control the use-case in POS terminal to perform, realize the purpose tested automatically.
Embodiment five
Fig. 8 is the schematic diagram of POS terminal automatic testing equipment/terminal device provided in an embodiment of the present invention.Such as Fig. 8 institutes Show, POS terminal automatic testing equipment/terminal device 8 of the embodiment includes:Processor 80, memory 81 and it is stored in institute State the computer program 82 that can be run in memory 81 and on the processor 80, such as POS terminal autotest program.Institute State the step realized when processor 80 performs the computer program 82 in above-mentioned each POS terminal automatic test approach embodiment Suddenly, such as the step 101 shown in Fig. 1 is to 104.Or the processor 80 realize when performing the computer program 82 it is above-mentioned The function of each module/unit in each device embodiment, such as the function of module 71 to 74 shown in Fig. 7.
Exemplary, the computer program 82 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 81, and are performed by the processor 80, to complete the present invention.Described one Individual or multiple module/units can be the series of computation machine programmed instruction section that can complete specific function, and the instruction segment is used for Implementation procedure of the computer program 82 in the POS terminal automatic testing equipment/terminal device 8 is described.It is for example, described Computer program 82, which can be divided into, downloads mould, screening module, order module, test module (module in virtual bench), Each module concrete function is as follows:
Download module, for using remote procedure call XML-RPC agreements, from the case management system based on web Use-case is downloaded on TESTLINK;
Screening module, for obtaining the testing attribute of selection, according to the testing attribute of selection, screened in the use-case of download Go out the use-case to be performed;
Order module, for selecting keyword to be ranked up in the use-case to be performed, obtain execution sequence;
Test module, for according to execution sequence, controlling POS terminal batch processing or the single execution use-case, performing knot Shu Hou, upload test result.
POS terminal automatic testing equipment/the terminal device 8 can be desktop PC, notebook, palm PC and The computing devices such as cloud server.POS terminal automatic testing equipment/the terminal device may include, but be not limited only to, processor 80th, memory 81.It will be understood by those skilled in the art that Fig. 8 is only showing for POS terminal automatic testing equipment/terminal device 8 Example, does not form the restriction to POS terminal automatic testing equipment/terminal device 8, can include than illustrating more or less portions Part, either combines some parts or different parts, such as POS terminal automatic testing equipment/terminal device can be with Including input-output equipment, network access equipment, bus etc..
Alleged processor 80 can be CPU (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other PLDs, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
The memory 81 can be the internal storage unit of the POS terminal automatic testing equipment/terminal device 8, example Such as the hard disk or internal memory of POS terminal automatic testing equipment/terminal device 8.The memory 81 can also be the POS terminal from The External memory equipment of dynamic test device/terminal device 8, such as match somebody with somebody on POS terminal automatic testing equipment/terminal device 8 Standby plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) Card, flash card (Flash Card) etc..Further, the memory 81 can also be tested both automatically including the POS terminal The internal storage unit of device/terminal device 8 also includes External memory equipment.The memory 81 is used to store the computer Other programs and data needed for program and POS terminal automatic testing equipment/terminal device.The memory 81 may be used also For temporarily storing the data that has exported or will export.Those skilled in the art can be understood that Arrive, for convenience of description and succinctly, only with the division progress of above-mentioned each functional unit, module for example, in practical application, It can be completed as needed and by above-mentioned function distribution by different functional units, module, i.e., by the internal structure of described device Different functional units or module are divided into, to complete all or part of function described above.Each function in embodiment Unit, module can be integrated in a processing unit or unit is individually physically present, can also be two or two Individual above unit is integrated in a unit, and above-mentioned integrated unit can both be realized in the form of hardware, can also use The form of SFU software functional unit is realized.In addition, the specific name of each functional unit, module also only to facilitate mutually distinguish, It is not limited to the protection domain of the application.Unit, the specific work process of module, may be referred to foregoing side in said system Corresponding process in method embodiment, will not be repeated here.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and is not described in detail or remembers in some embodiment The part of load, it may refer to the associated description of other embodiments.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Member and algorithm steps, it can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually Performed with hardware or software mode, application-specific and design constraint depending on technical scheme.Professional and technical personnel Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, can be with Realize by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of division of logic function, there can be other dividing mode when actually realizing, such as Multiple units or component can combine or be desirably integrated into another system, or some features can be ignored, or not perform.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be by some interfaces, device Or INDIRECT COUPLING or the communication connection of unit, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated module/unit realized in the form of SFU software functional unit and as independent production marketing or In use, it can be stored in a computer read/write memory medium.Based on such understanding, the present invention realizes above-mentioned implementation All or part of flow in example method, by computer program the hardware of correlation can also be instructed to complete, described meter Calculation machine program can be stored in a computer-readable recording medium, and the computer program can be achieved when being executed by processor The step of stating each embodiment of the method..Wherein, the computer program includes computer program code, the computer program Code can be source code form, object identification code form, executable file or some intermediate forms etc..Computer-readable Jie Matter can include:Can carry any entity or device of the computer program code, recording medium, USB flash disk, mobile hard disk, Magnetic disc, CD, computer storage, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It is it should be noted that described The content that computer-readable medium includes can carry out appropriate increasing according to legislation in jurisdiction and the requirement of patent practice Subtract, such as in some jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and Telecommunication signal.
Described device/terminal device can be that desktop PC, notebook, palm PC and cloud server etc. calculate Equipment.Described device/terminal device may include, but be not limited only to, processor, memory.It will be understood by those skilled in the art that The schematic diagram is only the example of device/terminal device, not the restriction of structure twin installation/terminal device, can include than More or less parts are illustrated, either combine some parts or different parts, such as described device/terminal device is also Input-output equipment, network access equipment, bus etc. can be included.
Alleged processor can be CPU (Central Processing Unit, CPU), can also be it His general processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other PLDs, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng the processor is the control centre of described device/terminal device, utilizes various interfaces and connection whole device/end The various pieces of end equipment.
The memory can be used for storing the computer program and/or module, and the processor is by running or performing The computer program and/or module being stored in the memory, and the data being stored in memory are called, described in realization The various functions of device/terminal device.The memory can mainly include storing program area and storage data field, wherein, storage Program area can storage program area, application program (such as sound-playing function, image player function needed at least one function Deng) etc.;Storage data field can store uses created data (such as voice data, phone directory etc.) etc. according to mobile phone.This Outside, memory can include high-speed random access memory, can also include nonvolatile memory, such as hard disk, internal memory, insert Connect formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash memory Block (Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing reality Example is applied the present invention is described in detail, it will be understood by those within the art that:It still can be to foregoing each Technical scheme described in embodiment is modified, or carries out equivalent substitution to which part technical characteristic;And these are changed Or replace, the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme, all should Within protection scope of the present invention.

Claims (10)

  1. A kind of 1. POS terminal automatic test approach, it is characterised in that including:
    Using remote procedure call XML-RPC agreements, use-case is downloaded from the case management system TESTLINK based on web;
    The testing attribute of selection is obtained, according to the testing attribute of selection, the use-case to be performed is filtered out in the use-case of download;
    Select keyword to be ranked up in the use-case to be performed, obtain execution sequence;
    According to execution sequence, POS terminal batch processing or the single execution use-case are controlled, after execution terminates, uploads test result.
  2. 2. the method as described in claim 1, it is characterised in that the testing attribute for obtaining selection, according to the test of selection Attribute, the use-case to be performed is filtered out in the use-case of download, be specially:
    Show testing attribute list, the testing attribute list includes test pattern, priority, test-types, the testing time, held At least one of row state testing attribute;
    According to selection operation, the testing attribute of selection is obtained;
    According to the testing attribute of selection, use-case is filtered out in the use-case of download.
  3. 3. the method as described in claim 1, it is characterised in that described to select keyword to be arranged in the use-case to be performed Sequence, execution sequence is obtained, be specially:
    Select keyword;
    Using the keyword and multi-stage sequencing mode of selection, the use-case to be performed is ranked up, obtains execution sequence, and show Show the use-case after sequence.
  4. 4. the method as described in claims 1 to 3 is any, it is characterised in that described according to execution sequence, control POS terminal batch Processing or the single execution use-case, after execution terminates, upload test result, are specially:
    According to execution sequence, by serial port communicating protocol or parallel port communication agreement, the instruction for performing use-case is sent to POS terminal, After waiting the POS terminal use-case to be performed, test result is obtained, uploads test result to TESTLINK.
  5. 5. the method as described in claims 1 to 3 is any, it is characterised in that described according to execution sequence, control POS terminal batch Processing or the single execution use-case, after execution terminates, upload test result, are specially:
    Using heartbeat detection, judge whether the communication link of itself and POS terminal normally connects;
    After normal connection, according to execution sequence, by serial port communicating protocol, the instruction for performing use-case is sent to POS terminal, is utilized Serial ports thread monitors POS terminal data;
    When listening to the arrival of POS terminal data, notify the test run thread to receive and handle POS terminal data, obtain After test result, notice control active thread record test result;
    After record, the next use-case to be performed is increased according to execution sequence, successively back and forth;
    After waiting the POS terminal use-case to be performed, test result is obtained, uploads test result to TESTLINK.
  6. A kind of 6. POS terminal automatic testing equipment, it is characterised in that including:
    Download module, for using remote procedure call XML-RPC agreements, from the case management system TESTLINK based on web Upper download use-case;
    Screening module, for obtaining the testing attribute of selection, according to the testing attribute of selection, being filtered out in the use-case of download will The use-case of execution;
    Order module, for selecting keyword to be ranked up in the use-case to be performed, obtain execution sequence;
    Test module, for according to execution sequence, control POS terminal batch processing or it is single perform the use-case, after execution terminates, Upload test result.
  7. 7. device as claimed in claim 6, it is characterised in that the screening module, specifically for showing testing attribute list, The testing attribute list includes at least one of test pattern, priority, test-types, testing time, execution state and surveyed Attribute is tried, according to selection operation, the testing attribute of selection is obtained, according to the testing attribute of selection, is screened in the use-case of download Go out use-case;The order module, specifically for selecting keyword, using the keyword and multi-stage sequencing mode of selection, to wanting The use-case of execution is ranked up, and obtains execution sequence, and shows the use-case after sequence.
  8. 8. device as claimed in claim 6, it is characterised in that
    The test module, for according to execution sequence, by serial port communicating protocol or parallel port communication agreement, being sent out to POS terminal The instruction for performing use-case is sent, after waiting the POS terminal use-case to be performed, obtains test result, test result is uploaded and arrives On TESTLINK;Or
    The test module includes:
    Detection unit, for using heartbeat detection, judging whether the communication link of itself and POS terminal normally connects;
    Monitoring unit, after normally connecting, according to execution sequence, by serial port communicating protocol, sent to POS terminal and perform use The instruction of example, POS terminal data are monitored using serial ports thread;
    Recording unit, for when listening to the arrival of POS terminal data, notifying the test run thread to receive and handling POS Terminal data, after obtaining test result, notice control active thread record test result;
    Test cell, for record after, the next use-case to be performed is increased according to execution sequence, successively back and forth;Wait After the POS terminal use-case to be performed, test result is obtained, uploads test result to TESTLINK.
  9. 9. a kind of POS terminal automatic testing equipment/terminal device, including memory, processor and it is stored in the memory In and the computer program that can run on the processor, it is characterised in that computer program described in the computing device The step of any one of Shi Shixian such as claims 1 to 5 methods described.
  10. 10. a kind of computer-readable recording medium, the computer-readable recording medium storage has computer program, and its feature exists In when the computer program is executed by processor the step of realization such as any one of claim 1 to 5 methods described.
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 true CN107391361A (en) 2017-11-24
CN107391361B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209590A (en) * 2019-06-05 2019-09-06 山东科技大学 A kind of automated testing method and system towards intelligent robot
CN113778771A (en) * 2021-09-14 2021-12-10 百富计算机技术(深圳)有限公司 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331360A (en) * 2013-07-23 2015-02-04 上海斐讯数据通信技术有限公司 Automatic testing platform
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 (2)

* 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
US9811480B2 (en) * 2014-03-14 2017-11-07 Google Inc. Universal serial bus emulation of peripheral devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331360A (en) * 2013-07-23 2015-02-04 上海斐讯数据通信技术有限公司 Automatic testing platform
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》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209590A (en) * 2019-06-05 2019-09-06 山东科技大学 A kind of automated testing method and system towards intelligent robot
CN110209590B (en) * 2019-06-05 2023-04-21 山东科技大学 Automatic testing method and system for intelligent robot
CN113778771A (en) * 2021-09-14 2021-12-10 百富计算机技术(深圳)有限公司 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

Also Published As

Publication number Publication date
CN107391361B (en) 2020-07-28
WO2018227735A1 (en) 2018-12-20

Similar Documents

Publication Publication Date Title
CN107357718A (en) One kind structure method of testing and device
CN109582301A (en) Method for processing business, device, equipment and the medium of task based access control scheduling system
CN110225104A (en) Data capture method, device and terminal device
CN106537426A (en) Automatically generating execution sequences for workflows
CN102810057A (en) Log recording method
CN105930208A (en) Thread scheduling method and thread scheduling apparatus
CN108733459A (en) A kind of method of distributed timing, server and system
CN108804175A (en) Multilingual adaptation method, mobile terminal and computer readable storage medium
CN107391361A (en) A kind of POS terminal automatic test approach and device
CN109471626A (en) Page logic structure, page generation method, page data processing method and device
CN113741860A (en) Data processing method and device based on RPA robot
CN107920162A (en) Control method, mobile terminal and the computer-readable recording medium of alarm clock
CN108830715A (en) Batch file part disk returning processing method and system
CN113568833A (en) Test case determination method and device, computer equipment and readable storage medium
CN107506494A (en) Document handling method, mobile terminal and computer-readable recording medium
CN115392501A (en) Data acquisition method and device, electronic equipment and storage medium
CN110533396A (en) Material binding method, material binding device and terminal device
CN108520063A (en) Processing method, device and the terminal device of event log
CN107679222A (en) Image processing method, mobile terminal and computer-readable recording medium
CN107332988A (en) Information processing method, mobile terminal and computer-readable recording medium
CN109377184B (en) Work order opening method, device, storage medium and terminal
CN109213662A (en) A kind of user's touch-control behavioral data collection method and terminal
CN107609119A (en) Document handling method, mobile terminal and computer-readable recording medium
CN109104481A (en) file integrity detection method, file integrity detection device and terminal device
CN107463379A (en) Interface switching method and device, computer installation and computer-readable recording 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