WO2018184361A1 - Procédé de test d'application, serveur, terminal et supports de stockage - Google Patents
Procédé de test d'application, serveur, terminal et supports de stockage Download PDFInfo
- Publication number
- WO2018184361A1 WO2018184361A1 PCT/CN2017/102987 CN2017102987W WO2018184361A1 WO 2018184361 A1 WO2018184361 A1 WO 2018184361A1 CN 2017102987 W CN2017102987 W CN 2017102987W WO 2018184361 A1 WO2018184361 A1 WO 2018184361A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- test
- script
- pos application
- simulated
- interface
- Prior art date
Links
- 238000010998 test method Methods 0.000 title description 3
- 238000012360 testing method Methods 0.000 claims abstract description 697
- 238000013515 script Methods 0.000 claims abstract description 433
- 238000004088 simulation Methods 0.000 claims description 46
- 238000000034 method Methods 0.000 claims description 24
- 239000012634 fragment Substances 0.000 claims description 23
- 238000012545 processing Methods 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 10
- 230000009471 action Effects 0.000 description 6
- 230000000977 initiatory effect Effects 0.000 description 4
- 238000009434 installation Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000013100 final test Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3696—Methods or tools to render software testable
Definitions
- the present application relates to the field of computer technologies, and in particular, to an application testing method, a server, a terminal, and a storage medium.
- an application testing method a server, a terminal, and a storage medium are provided.
- An application testing method that includes:
- a server comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor such that the processor performs the following steps:
- One or more non-transitory readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
- An application testing method that includes:
- Sending the test script to a server causing the server to send the test script to a test executor when the test script needs to be executed, so that the test executor executes the test script.
- a terminal comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor such that the processor performs the following steps:
- Sending the test script to a server causing the server to send the test script to a test executor when the test script needs to be executed, so that the test executor executes the test script.
- One or more non-transitory readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
- the test script is sent to the test executor to cause the test executor to execute the test script.
- FIG 1 is an application environment diagram of an application testing method in an embodiment
- FIG. 2 is a schematic diagram showing the internal structure of a server in an embodiment
- FIG. 3 is a schematic diagram showing the internal structure of a terminal in an embodiment
- FIG. 5 is a structural diagram of a simulation environment system when an application testing method is implemented in an embodiment
- FIG. 6 is a schematic flowchart of a test script generation step in an embodiment
- FIG. 7 is a schematic flowchart of a second script segment generating step in an embodiment
- FIG. 8 is a schematic flow chart of an application testing method in another embodiment
- FIG. 9 is a structural block diagram of a server in an embodiment
- Figure 10 is a block diagram showing the structure of a server in another embodiment
- Figure 11 is a block diagram showing the structure of a terminal in an embodiment.
- FIG. 1 is an application environment diagram of an application testing method in an embodiment.
- the environment includes a server 110, a terminal 120, and a test executor 130, and the server 110, the terminal 120, and the test executor 130 are network-connected.
- the test executor 130 is a device having a function of running a test script, and the test executor 130 may be implemented by hardware or by software.
- the terminal 120 is a terminal capable of parsing webpage data. For example, a browser may be installed in the terminal, or a client having a browser function may be installed.
- the terminal 120 can be different from the POS terminal.
- a POS terminal is a terminal that can run a POS application to implement a payment function. It should be noted that terminals that are not specifically limited in the following embodiments refer to the terminal 120.
- the server 110 may send the webpage data of the simulated POS application obtained by simulating the native POS application to the terminal 120, so that the terminal 120 parses the webpage data of the simulated POS application, and generates a corresponding emulated POS terminal interface and an emulated POS application interface. .
- the server 110 can acquire a corresponding test script generated by recording an operation acting on the emulated POS terminal interface and emulating the POS application interface, and send the test script to the test executor 130 to cause the test executor 130 to execute the test script.
- the server includes a processor, a non-volatile storage medium, an internal memory, and a network interface connected by a system bus.
- the non-volatile storage medium of the server stores an operating system and computer readable instructions that, when executed, cause the processor to perform an application testing method.
- This processor is used to provide computing and control capabilities to support the operation of the entire server.
- the internal memory can store computer readable instructions that, when executed by the processor, cause the processor to perform an application testing method.
- the network interface is used to connect to the network for communication, such as sending test scripts over the network.
- the server can be a stand-alone physical server or a server cluster composed of multiple physical servers.
- FIG. 3 is a schematic diagram showing the internal structure of a terminal in an embodiment.
- the terminal includes a processor connected through a system bus, a non-volatile storage medium, an internal memory, a network interface, a display screen, and an input device.
- the non-volatile storage medium of the terminal stores an operating system and computer readable instructions that, when executed, cause the processor to execute an application testing method.
- the processor is used to provide computing and control capabilities to support the operation of the entire terminal.
- Computer readable instructions may be stored in the internal memory, the computer readable instructions being executable by the processor to cause the processor to perform an application testing method.
- the network interface is used to connect to the network for communication.
- the display screen of the terminal may be a liquid crystal display or an electronic ink display.
- the input device of the terminal may be a touch layer covered on the display screen, or may be a button, a trackball or a touchpad provided on the terminal housing, or may be An external keyboard, trackpad, or mouse.
- the terminal may be a personal computer, a mobile terminal, or an in-vehicle device, and the mobile terminal includes at least one of a mobile phone, a tablet, a personal digital assistant, or a wearable device.
- FIG. 2 or 3 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation of a server or a terminal to which the solution of the present application is applied, and specific
- the server or terminal may include more or fewer components than shown in the figures, or some components may be combined, or have different component arrangements.
- an application testing method is provided. This embodiment is mainly illustrated by applying the method to the server in FIG. 2 described above. Referring to FIG. 4, the application testing method specifically includes the following steps:
- S402 Send webpage data of the simulated POS application obtained by simulating the native POS application to the terminal, so that the terminal parses the webpage data of the simulated POS application to load and display the corresponding simulated POS terminal interface and the simulated POS application interface.
- the native POS application is a real application for running a payment function in a physical POS terminal.
- Native POS applications can be POS applications in web format.
- the native POS application can be a POS application in the Html5 (Hyper Text Markup Language Version 5) format.
- the emulated POS application is a POS application that is obtained by emulating a native POS application and capable of running in a browser for implementing the functionality of a native POS application. It can be understood that multiple native POS applications can be separately simulated to obtain a corresponding simulated POS application.
- the method before step S402, the method further includes: acquiring webpage data of the native POS application; adding corresponding POS application emulation interface data and emulating POS terminal interface data in the webpage data of the native POS application, Get the number of web pages for the simulated POS application according to.
- the POS application emulation interface is an emulation interface obtained by simulating the interface of the native POS application for implementing the functions.
- the POS application emulation interface includes at least one of a simulation interface for communicating with the POS terminal, an emulation interface for communicating with the transaction background, and an emulation interface for implementing logical computing.
- the simulation POS terminal interface data is simulation data of the POS terminal interface obtained by performing simulation processing on the physical POS terminal.
- the simulation POS terminal interface may include a screen simulation area, a keyboard simulation area, a card simulation area, and a printer receipt simulation area, and the screen simulation area may be used to display an interface of the simulated POS application.
- the emulation POS terminal interface may also be a structure that can display a keyboard emulation area or a swipe emulation area in the screen emulation area, and can be replaced by a screen touch function or a display recognition function.
- a keyboard area for touch input can be displayed in the screen emulation area in the emulation POS terminal interface. It can be understood that different native POS applications can correspond to different emulated POS terminal interfaces.
- the server may also simulate the transaction background of the transaction data interaction with the simulated POS application, and obtain the simulated transaction background.
- the server can form a simulation environment based on the simulation transaction background, the interface of the simulated POS terminal, the simulated POS application, and the POS application simulation interface.
- Figure 5 is a system architecture diagram of a simulation environment in one embodiment.
- the interface layer is used to provide an interface entry for the simulation application, and the POS application interface simulation layer communicates with the simulation transaction background for transaction data communication.
- the server can also perform simulation processing on the transaction background. After the webpage data of the simulation POS application is loaded into the terminal, the transaction data can be directly interacted with the real transaction background through the simulation interface.
- the recording operation refers to real-time monitoring and recording operations.
- Recording operations on the simulated POS terminal interface and emulating the POS application interface refer to real-time monitoring and recording of operations on the simulated POS terminal interface and the simulated POS application interface.
- the user can request a test case corresponding to the native POS application or the simulated POS application from the terminal through the terminal, and return the corresponding preset test case according to the server, simulate the POS terminal interface and simulate The corresponding operation is performed on the POS application interface, and the server or terminal records the operation acting on the emulated POS terminal interface and emulating the POS application and matching the returned preset test case.
- the server can record actions that act on the emulated POS terminal interface and emulate the POS application interface to generate test scripts.
- the server may also receive operation data recorded by the terminal and act on the simulated POS terminal interface and the simulated POS application interface, parse the received recording operation data, and generate a test script.
- the server can also directly receive the corresponding test script generated by the terminal by recording the operation on the simulated POS terminal interface and emulating the POS application interface.
- the test executor is a device with a test script running function.
- the test executor can be a terminal on which a test agent is installed. Test the agent to execute the test script and generate test results.
- the server can deliver the test script to one or more test executors and cause one or more test executors to execute the issued test script.
- the server can also automatically add one or more test scripts to the task queue according to the test task issuing request or according to the preset task delivery rule, and send it to the test executor.
- Test executors can run in real-world environments or in simulation environments. When the test executor is running in the simulation environment, the test executor can execute the test script, send instructions to the emulated POS application in the server, and test the emulated POS application.
- the above application test method generates a corresponding test script by recording an operation on the simulated POS terminal interface and simulating the POS application interface, and sends the test script to the test executor for execution.
- Test scripts can be executed automatically based on the test executor, without manual manual steps, step by step, improving test efficiency.
- a test script is generated, which realizes the free installation of the physical POS terminal and the POS application, thereby saving the test cost.
- step S404 (refer to the test script generation step for short) specifically includes the following steps:
- the recording operation on the simulated POS terminal interface and the simulated POS application interface may be all operations performed by the recording user on the simulated POS terminal interface and the simulated POS application interface, including screen operations, keyboard operations, or card swipe operations.
- the server can monitor and record the operations on the simulated POS terminal interface and the simulated POS application interface in real time. For example, the user operates on the simulated POS terminal interface and the simulated POS application interface displayed on the terminal, and the terminal can notify the server of the operation on the simulated POS terminal interface and the simulated POS application interface in real time, and the server records the operation. .
- the server may also not record a preset reservation operation while recording operations on the emulated POS terminal interface and the emulated POS application interface.
- the preset hold operation is a preset action that is not recorded on the emulated POS terminal interface or the emulated POS application interface.
- the server may parse the recorded operation according to the syntax of the test script and convert it into a first script fragment.
- the server may combine the script fragments used to generate the test script with the corresponding script header information and the tail information to form a corresponding complete test script.
- the server may separately generate a corresponding test script according to the first script segment, or may generate a corresponding second script segment generated according to the selected preset comparison test item and the corresponding comparison test object according to the first script segment.
- Test script The comparison test item is used for comparing the comparison test object with the reference standard object to generate a comparison test result, for example, checking whether the element exists, whether the comparison element text is correct or the comparison application Check whether the program interface information is correct and compare the test items.
- the test object is a test object that is compared with a reference standard object, such as an application interface, The text or element corresponding to the element in the interface.
- the server may further receive an editing operation sent by the terminal to the test script generated in step S606, perform corresponding editing adjustment on the test script according to the editing operation, and obtain a final test according to the edited adjusted test script. script.
- the corresponding test script is automatically generated according to the user operation, so that the test executor can automatically perform the test processing according to the automatically generated test script. There is no need to manually perform manual test operations step by step, which improves the test efficiency.
- a test script is generated, which realizes the free installation of the physical POS terminal and the POS application, thereby saving the test cost.
- the method before generating a corresponding test script according to the first script segment, the method further includes a second script segment generating step, specifically including the following steps:
- the comparison test item is used for comparing the comparison test object with the reference standard object to generate a comparison test result, for example, checking whether the element exists, whether the comparison element text is correct or the comparison application Check whether the program interface information is correct and compare the test items.
- the reference standard object is the test record passed by the preset test.
- the reference standard object is used for comparison with the comparison test object to determine whether the test passes. It can be understood that the comparison test item is an additional test operation item added on the basis of the test related operation performed by the user. You can add or delete settings for test items based on actual needs.
- the user can trigger the selection of the preset comparison test item by a preset operation.
- the user may perform a trigger operation on the simulated POS terminal interface or the simulated POS application interface to generate a selection menu bar of the preset comparison test item, and the user selects a preset comparison test item from the menu bar.
- the terminal in turn notifies the server of the selected preset comparison test item.
- the triggering operation includes a right button operation or a pressing or clicking operation on the simulation screen area or the keyboard area.
- the comparison test object is a test object that is compared with the reference standard object, including Use the program interface, the elements in the interface or the text corresponding to the element.
- the server may obtain the selected corresponding comparison test object, or may be corresponding to the preset test item corresponding to the comparison test item. Compare the test object acquisition rules and automatically obtain the corresponding comparison test objects. For example, if the comparison test item is "whether the text of the comparison element is correct", the server can obtain the text of the element selected by the user to be checked. For another example, when the comparison test item is “comparison application interface information”, the corresponding comparison test object is the current interface information of the application, and the terminal can perform screen capture processing on the current display interface of the application to obtain the corresponding application current. The interface information can also be image scanned on the current display interface of the application to obtain the current interface information of the corresponding application.
- the above-mentioned trigger operation or selection operation on the preset comparison test item, and the comparison operation on the test object can be preset as a reserve operation, and the server can not record the preset reservation operations.
- the correspondence between the comparison test item and the script fragment template may be preset in the server, and the preset script fragment template corresponding to the selected preset comparison test item is obtained according to the correspondence.
- the preset script fragment template includes a script fragment for initiating a comparison test object acquisition action and initiating a comparison action.
- the server may substitute the acquired comparison test object into the obtained preset preset script segment template to generate a second script segment.
- the second script segment is used to compare the comparison test object with the corresponding standard reference object during execution to obtain a corresponding comparison test result.
- generating the corresponding test script according to the first script segment includes: generating a corresponding test script according to the first script segment and the second script segment.
- the server may execute the first script segment and the second script segment in accordance with the execution The logical order is combined to generate the corresponding test script. Specifically, the server may combine the first script segment and the second script segment in combination with the corresponding script header information and the tail information to form a corresponding complete test script.
- the corresponding second script segment is generated according to the comparison test object and the preset script segment template corresponding to the selected comparison test item, which is equivalent to the user being monitored. Based on the test related operations, some additional test operations are added, and the corresponding test script is generated by the first script segment corresponding to the user operation and the second script segment corresponding to the added preset comparison test item, so that the test operation is performed. More comprehensive and complete, thus improving the effectiveness of test results.
- step S406 includes: when the target object corresponding to the test script includes a physical POS terminal, sending a test script to the test executor connected to the physical POS terminal, so that the test executor executes the test script to the physical POS terminal. carry out testing.
- the physical POS terminal can connect to the test executor via a USB (Universal Serial Bus) or can be connected to the test executor through other connection methods.
- the connection can be sent to the physical POS terminal as long as it can satisfy the test executor when executing the test script.
- the target object corresponding to the test script is the object that is controlled according to the instructions initiated by the test script.
- the server sends the test script to the test executor, the target object corresponding to the test script can be detected.
- the test script is sent to the test executor connected to the physical POS terminal.
- the test executor executes the test script and generates corresponding instructions to test the physical POS terminal. There may be multiple physical POS terminals connected to the test executor.
- the test script is automatically executed by the test executor by sending the test script to the test executor connected to the physical POS terminal, so as to automatically test the physical POS terminal, compared to manually manually downloading the POS application.
- Test efficiency is improved in terms of physical POS terminals and manual testing.
- step S406 further includes: when the target object corresponding to the test script is a POS application, sending a test script to the test executor running in the simulation environment, so that the test executor running in the simulation environment performs the test Script to test the simulated POS application.
- the server may send the test script to the test executor running in the simulation environment.
- the test executor running in the simulation environment can execute the test script and generate corresponding instructions to test the simulated POS application in the simulation environment.
- the server when the test script is used for the application level test, the server sends the test script to the test executor running in the simulation environment to test the simulated POS application in the simulation environment.
- the physical POS terminal is implemented when testing the POS application, thereby avoiding the dependence of the POS application test on the physical POS terminal and saving the test cost.
- the test executor directly tests the simulated POS application without manual manual installation of the POS application and manual testing, thus improving test efficiency.
- the method further includes: receiving a regression test request, acquiring a test case corresponding to the regression test request; adding a test script corresponding to the corresponding test case to the test task queue, and sending the test task queue to the test task queue
- the test executor causes the test executor to execute the test script in the test task queue in turn for the regression test step.
- the test case corresponding to the regression test request refers to the test case requested for the regression test.
- the regression test request may include a test case identifier for the regression test, and the server obtains the corresponding test case according to the test case identifier.
- one test case may correspond to one or more test scripts
- the server may obtain a test script corresponding to the corresponding test case, and add the test script to the test task queue, and the test script in the test task queue is one or Multiple.
- the server sends the test task queue to the test executor.
- the test executor executes the test scripts in the test task queue in order according to the order of the test scripts in the test task queue for regression testing.
- the test script corresponding to the regression test request is added to the test task queue, and is sent to the test executor, so that the test executor executes the test script in turn to implement automation.
- the regression test does not require manual regression testing of all or part of the test scripts, improving the efficiency of regression testing.
- the server may set the corresponding test script to a shared state according to a preset sharing rule or a user-initiated test script sharing request.
- the shared state test script can be selected by any user with the test operation authority and added to the corresponding test task.
- the preset sharing rule may be a preset rule that sets a test script corresponding to any one or more native POS applications to a shared state.
- the user shares the request through a test script initiated by the terminal, or may be a request for sharing the test script corresponding to any one or more native POS applications.
- the server may set the test script corresponding to any one or more native POS applications to a shared state according to a preset sharing rule or a test script sharing request initiated by the user through the terminal.
- test scripts a, b, and c of the application 1 are shared, and the test scripts d and e of the application 2 are shared.
- Testers A, B, and C all have test operation rights, and testers A, B, and C can select test scripts a and b of application 1 through the terminal and add them to the corresponding test tasks, and the server executes the test tasks.
- the test scripts a and b are sent to the test executor, so that the test executor tests the application 1 according to the test scripts a and b.
- testers A, B, and C can also add test scripts d and e of application 2 to the corresponding test task through the terminal, and the server sends the test scripts d and e to the test executor accordingly.
- the test executor is tested against application 2 based on test scripts d and e.
- test script by setting the test script to the shared state, multiple users can execute the test script to improve the utilization of the test script. At the same time, recording a test script can achieve sharing, and avoids the waste of time and cost caused by repeated recording of test scripts by different users, thereby improving test efficiency.
- the method further includes: obtaining a test result reported by the test executor and generated according to the execution of the test script; and generating a corresponding test report according to the test result.
- the corresponding test can be generated. Test the results and report the test results to the server.
- the server can analyze the test results and generate corresponding test reports.
- the corresponding test report is automatically generated through the test result, so that when the test has a problem, the test problem can be known more timely, and the time cost waste caused by the manual analysis of the test result to obtain the test problem is avoided.
- an application testing method is provided. This embodiment is mainly applied to the terminal in FIG. 3 by using the method. Referring to FIG. 8, the application testing method specifically includes the following steps:
- the terminal receives webpage data of the simulated POS application obtained by performing simulation processing on the native POS application sent by the server.
- the user may request a preset test case corresponding to the native POS application or the simulated POS application from the terminal through the terminal, and return the corresponding test case according to the server, simulate the POS terminal interface and simulate The corresponding operation is performed on the POS application interface, and the terminal records the operation acting on the emulated POS terminal interface and emulating the POS application and matching the returned preset test case.
- the terminal can parse the recorded operation according to the syntax of the test script to generate a corresponding test script.
- the terminal may further receive an edit operation instruction for parsing the generated test script, and perform corresponding edit adjustment on the parsed test script in response to the edit operation instruction, according to the edited test script. Get the final test script.
- test script sending a test script to the server, so that when the server needs to execute the test script,
- the test script is sent to the test executor to cause the test executor to execute the test script.
- the above application test method generates a corresponding test script by recording an operation on the simulated POS terminal interface and emulating the POS application interface, and sends the test script to the server, so that the server can execute the test script when the test script needs to be executed. Send to the test executor and execute.
- the test script can be automatically executed according to the test executor, instead of manually repeating the operation step by step, which improves the test efficiency.
- the terminal loads and displays the corresponding simulated POS terminal interface and the simulated POS application interface according to the webpage data of the simulated POS application, records the operation on the interface, generates a test script, and implements the physical POS terminal and the POS application. Free installation, saving test costs.
- step S808 includes parsing the recorded operation into a first script segment, and generating a corresponding test script according to the first script segment.
- the terminal can parse the recorded operation according to the syntax of the test script and convert it into a first script segment.
- the terminal can combine the script fragment used to generate the test script with the corresponding script header information and the tail information to form a corresponding complete test script.
- the terminal may separately generate a corresponding test script according to the first script segment, or may generate a corresponding second script segment generated according to the selected preset comparison test item and the corresponding comparison test object according to the first script segment.
- Test script The comparison test item is used for comparing the comparison test object with the reference standard object to generate a comparison test result, for example, checking whether the element exists, whether the comparison element text is correct or the comparison application Check whether the program interface information is correct and compare the test items.
- the comparison test object is a test object that is compared with a reference standard object, such as an application interface, an element in an interface, or a text corresponding to an element.
- the corresponding test script is generated according to the script segment by parsing the operation of recording the simulated POS terminal interface and the simulated POS application interface into a script segment.
- Automated generation of test scripts is enabled, allowing test executors to automate test processing based on automatically generated test scripts. There is no need to manually perform manual test operations step by step, which improves the test efficiency.
- the method before generating the corresponding test script according to the first script segment, the method further includes the steps of: detecting a selection operation on the preset comparison test item; acquiring and selecting the pre-selection Aligning the test object corresponding to the test item; obtaining a preset script fragment template corresponding to the selected preset comparison test item; generating a second script fragment according to the comparison test object and the preset script fragment template, and second When the script fragment is used for execution, the comparison test object is compared with the corresponding standard reference object to obtain a corresponding comparison test result.
- generating a corresponding test script according to the first script segment includes: generating a corresponding test script according to the first script segment and the second script segment.
- the user can trigger the selection of the preset comparison test item by a preset operation.
- the user may perform a trigger operation on the simulated POS terminal interface or the simulated POS application interface to generate a selection menu bar of the preset comparison test item, and the user selects a preset comparison test item from the menu bar.
- the terminal then obtains the selected preset comparison test item.
- the triggering operation includes a right button operation or a pressing or clicking operation on the simulation screen area or the keyboard area.
- the terminal may obtain the selected corresponding comparison test object, or may be corresponding to the preset test item corresponding to the comparison test item. Compare the test object acquisition rules and automatically obtain the corresponding comparison test objects. For example, if the comparison test item is “whether the text of the comparison element is correct”, the terminal can acquire the text of the element selected by the user to be checked. For another example, when the comparison test item is “comparison application interface information”, the corresponding comparison test object is the current interface information of the application, and the terminal can perform screen capture processing on the current display interface of the application to obtain the corresponding application current. The interface information can also be image scanned on the current display interface of the application to obtain the current interface information of the corresponding application.
- the above-mentioned trigger operation or selection operation on the preset comparison test item, and the comparison operation on the test object can be preset as a reserve operation, and the terminal can not record the preset reservation operations.
- the corresponding relationship between the comparison test item and the script fragment template may be preset in the terminal, and the preset script fragment template corresponding to the selected preset comparison test item is obtained according to the corresponding relationship.
- the preset script fragment template includes a script fragment for initiating a comparison test object acquisition action and initiating a comparison action.
- the terminal may substitute the acquired comparison test object into the obtained preset preset script segment template to generate a second script segment.
- the second script fragment which is used to compare the test object when executed Compare with the corresponding standard reference objects to obtain the corresponding comparison test results.
- the terminal may combine the first script segment and the second script segment in an execution logic sequence to generate a corresponding test script. Specifically, the terminal may combine the first script segment and the second script segment in combination with the corresponding script header information and the tail information to form a corresponding complete test script.
- the corresponding second script segment is generated according to the comparison test object and the preset script segment template corresponding to the selected comparison test item, which is equivalent to the user being monitored. Based on the test related operations, some additional test operations are added, and the corresponding test script is generated by the first script segment corresponding to the user operation and the second script segment corresponding to the added preset comparison test item, so that the test operation is performed. More comprehensive and complete, thus improving the effectiveness of test results.
- a server 900 is provided, the internal structure of which may correspond to the structure shown in FIG. 2.
- Each of the modules described below may be implemented in whole or in part by software, hardware, or a combination thereof.
- the server 900 includes a simulation module 902, a test script acquisition module 904, and a test script execution module 906, wherein:
- the simulation module 902 is configured to send webpage data of the simulated POS application obtained by simulating the native POS application to the terminal, so that the terminal parses the webpage data of the simulated POS application to load and display the corresponding simulated POS terminal interface and the simulated POS. Application interface.
- the test script acquisition module 904 is configured to acquire a corresponding test script generated by recording an operation on the simulated POS terminal interface and emulating the POS application interface.
- the test script execution module 906 is configured to send the test script to the test executor and execute.
- the simulation module 902 is further configured to acquire webpage data of the native POS application; add corresponding POS application emulation interface data and emulate the POS terminal interface data in the webpage data of the native POS application to obtain the simulation. Web page data for POS applications.
- test script acquisition module 904 is further configured to record operations on the simulated POS terminal interface and the simulated POS application interface; parsing the recorded operations into the first script piece Segment; according to the first script fragment, generate the corresponding test script.
- the test script obtaining module 904 is further configured to detect a selection operation on the preset comparison test item; acquire a comparison test object corresponding to the selected preset comparison test item; and obtain a preset ratio compared with the selected a preset script segment template corresponding to the test item; generating a second script segment according to the comparison test object and the preset script segment template; and the second script segment is used to compare the comparison test object with the corresponding standard reference object Corresponding comparison test results are obtained; corresponding test scripts are generated according to the first script segment and the second script segment.
- the test script execution module 906 is further configured to: when the target object corresponding to the test script includes a physical POS terminal, send the test script to the test executor connected to the physical POS terminal, so that the test executor executes the test script, Test the physical POS terminal.
- the test script execution module 906 is further configured to: when the target object corresponding to the test script is a POS application, send the test script to the test executor running in the simulation environment, so that the test execution running in the simulation environment is performed.
- the test script is executed to test the simulated POS application.
- the server further includes:
- the regression test module 908 is configured to receive the regression test request, obtain the test case corresponding to the regression test request, add the test script corresponding to the corresponding test case to the test task queue, and notify the test script execution module 906.
- the test script execution module 906 is further configured to send the test task queue to the test executor, so that the test executor sequentially executes the test script in the test task queue for regression testing.
- a terminal 1100 is provided, and the internal structure of the terminal 1100 may correspond to the structure as shown in FIG.
- Each of the modules described below may be implemented in whole or in part by software, hardware, or a combination thereof.
- the terminal 1100 includes: an obtaining module 1102, a parsing module 1104, an operation recording module 1106, a test script generating module 1108, and a sending module 1110, where:
- the obtaining module 1102 is configured to obtain webpage data of the simulated POS application obtained by performing simulation processing on the native POS application.
- the parsing module 1104 is configured to parse the webpage data of the emulating POS application to load and display the corresponding emulated POS terminal interface and the emulated POS application interface.
- the operation recording module 1106 is configured to record operations on the simulated POS terminal interface and the simulated POS application interface.
- the test script generating module 1108 is configured to generate a corresponding test script according to the recorded operation.
- the sending module 1110 is configured to send the test script to the server, so that the server sends the test script to the test executor when the test script needs to be executed, so that the test executor executes the test script.
- test script generation module 1108 is further configured to parse the recorded operation into a first script segment, and generate a corresponding test script according to the first script segment.
- the test script generation module 1108 is further configured to detect a selection operation on the preset comparison test item; acquire a comparison test object corresponding to the selected preset comparison test item; and obtain a preset ratio compared with the selected a preset script segment template corresponding to the test item; generating a second script segment according to the comparison test object and the preset script segment template; and the second script segment is used to compare the comparison test object with the corresponding standard reference object Corresponding comparison test results are obtained; corresponding test scripts are generated according to the first script segment and the second script segment.
- One or more non-transitory readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of: transmitting Simulating the webpage data of the simulated POS application obtained by the native POS application to the terminal, causing the terminal to parse the webpage data of the emulated POS application to load and display the corresponding emulated POS terminal interface and the emulated POS application interface. Obtaining a corresponding test script generated by recording an operation on the simulated POS terminal interface and the simulated POS application interface; transmitting the test script to the test executor and executing.
- the computer readable instructions further cause the processor to perform the following steps: acquiring a native POS application before transmitting the webpage data of the simulated POS application obtained by emulating the native POS application to the terminal The webpage data; in the webpage data of the native POS application, adding corresponding POS application emulation interface data and emulating POS terminal interface data to obtain webpage data of the emulated POS application.
- the obtaining a corresponding test script generated by recording an operation on the simulated POS terminal interface and the simulated POS application interface includes: recording acting on the simulated POS terminal interface and An operation on the simulated POS application interface; parsing the recorded operation into a first script segment; and generating a corresponding test script according to the first script segment.
- the computer readable instructions before the generating the corresponding test script according to the first script segment, the computer readable instructions further cause the processor to perform the step of: detecting a selection operation on the preset comparison test item; Acquiring a comparison test object corresponding to the selected preset comparison test item; acquiring a preset script fragment template corresponding to the selected preset comparison test item; and according to the comparison test object and the The script fragment template is preset to generate a second script segment.
- the second script segment is used to compare the comparison test object with the corresponding standard reference object to obtain a corresponding comparison test result.
- the generating the corresponding test script according to the first script segment includes:
- Corresponding test scripts are generated according to the first script segment and the second script segment.
- the sending the test script to the test executor and executing comprises:
- the target object corresponding to the test script includes a physical POS terminal
- the sending the test script to the test executor and executing further comprises:
- the target object corresponding to the test script is a POS application
- the simulated POS application is tested.
- the computer readable instructions further cause the processor to perform the steps of: receiving a regression test request; acquiring a test case corresponding to the regression test request; adding a test script corresponding to the corresponding test case And to the test task queue; and the test task queue is sent to the test executor, so that the test executor sequentially executes the test script in the test task queue for regression testing.
- a terminal in one embodiment, includes a memory and a processor having stored therein computer readable instructions that, when executed by a processor, cause the processor to perform the steps of: acquiring a native POS
- the application simulates the webpage data of the simulated POS application; parses the webpage data of the simulated POS application to load and display the corresponding simulated POS terminal interface and the simulated POS application interface; the recording acts on the simulated POS terminal interface and the simulated POS The operation on the application interface; according to the recorded operation, generate the corresponding test script; send the test script to the server, so that the server sends the test script to the test executor when the test script needs to be executed, so that the test executor performs the test script.
- the corresponding test script generated by the processor according to the recorded operation includes: parsing the recorded operation into a first script segment, and generating a corresponding test script according to the first script segment.
- the computer readable instructions prior to generating the corresponding test script according to the first script segment, the computer readable instructions further cause the processor to perform the steps of: detecting a selection operation for the preset comparison test item; acquiring and selecting the preset Comparing the test object corresponding to the test item; obtaining a preset script segment template corresponding to the selected preset comparison test item; generating a second script segment according to the comparison test object and the preset script segment template; the second script
- the comparison test object is compared with the corresponding standard reference object to obtain a corresponding comparison test result.
- the corresponding test script generated by the processor according to the first script segment includes: generating a corresponding test script according to the first script segment and the second script segment.
- one or more non-volatile readable storage media having computer readable instructions stored by one or more processors are provided, such that one or more processors are Perform the following steps: obtaining webpage data of the simulated POS application obtained by simulating the native POS application; parsing the webpage data of the simulated POS application to load and display the corresponding simulated POS terminal interface and emulating POS application interface; recording function The operation of simulating the POS terminal interface and emulating the POS application interface; generating a corresponding test script according to the recorded operation; sending the test script to the server, so that the server sends the test script to the test executor when the test script needs to be executed So that the test executor executes the test script.
- the corresponding test script generated by the processor according to the recorded operation includes: parsing the recorded operation into a first script segment, and generating a corresponding test script according to the first script segment.
- the computer readable instructions prior to generating the corresponding test script according to the first script segment, the computer readable instructions further cause the processor to perform the steps of: detecting a selection operation for the preset comparison test item; acquiring and selecting the preset Comparing the test object corresponding to the test item; obtaining a preset script segment template corresponding to the selected preset comparison test item; generating a second script segment according to the comparison test object and the preset script segment template; the second script
- the comparison test object is compared with the corresponding standard reference object to obtain a corresponding comparison test result.
- the corresponding test script generated by the processor according to the first script segment includes: generating a corresponding test script according to the first script segment and the second script segment.
- first and second used in the embodiments of the present application are only used for distinguishing, and are not used as a limitation on the subordinate, size or sequence.
- the storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
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)
- Debugging And Monitoring (AREA)
Abstract
L'invention concerne un procédé de test d'application consistant à : envoyer, à un terminal, les données de page Web d'une application POS simulée obtenue en simulant une application POS native afin de permettre au terminal d'analyser les données de page Web de l'application POS simulée pour charger et afficher une interface de terminal POS simulée correspondante ainsi qu'une interface d'application POS simulée; obtenir des scripts de test correspondants générés par des opérations d'enregistrement sur l'interface de terminal POS simulée et l'interface d'application POS simulée; et envoyer les scripts de test à un exécuteur de test pour l'exécution.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710221969.5 | 2017-04-06 | ||
CN201710221969.5A CN107145440B (zh) | 2017-04-06 | 2017-04-06 | 应用程序测试方法、装置和计算机设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018184361A1 true WO2018184361A1 (fr) | 2018-10-11 |
Family
ID=59775108
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/102987 WO2018184361A1 (fr) | 2017-04-06 | 2017-09-22 | Procédé de test d'application, serveur, terminal et supports de stockage |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107145440B (fr) |
WO (1) | WO2018184361A1 (fr) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107145440B (zh) * | 2017-04-06 | 2020-07-24 | 百富计算机技术(深圳)有限公司 | 应用程序测试方法、装置和计算机设备 |
CN107632869B (zh) * | 2017-09-15 | 2021-01-26 | 百富计算机技术(深圳)有限公司 | 一种加载pos应用的用户界面的方法与设备 |
CN107748718B (zh) * | 2017-10-11 | 2020-12-18 | 百富计算机技术(深圳)有限公司 | 应用程序测试方法、装置及服务器 |
CN107770165B (zh) * | 2017-10-12 | 2021-02-02 | 携程金融科技(上海)有限公司 | 一种模拟设备发送请求的方法和装置 |
CN108363663B (zh) * | 2018-02-02 | 2021-05-11 | 浙江德景电子科技有限公司 | 一种智能pos终端送检银行卡检测中心认证的应用 |
CN108446215B (zh) * | 2018-02-05 | 2021-04-23 | 百富计算机技术(深圳)有限公司 | Pos机测试的方法、装置、系统及终端 |
CN108717393B (zh) * | 2018-05-16 | 2022-05-27 | 平安科技(深圳)有限公司 | 一种应用程序测试方法及移动终端 |
CN110502414B (zh) * | 2019-08-20 | 2023-08-29 | Oppo广东移动通信有限公司 | 终端设备性能测试方法、装置、终端设备及存储介质 |
CN111556038A (zh) * | 2020-04-21 | 2020-08-18 | 深圳市网安计算机安全检测技术有限公司 | 面向应用的运行内容监测方法、装置、计算机设备及介质 |
CN113515453B (zh) * | 2021-06-24 | 2021-12-07 | 航天中认软件测评科技(北京)有限责任公司 | 网页测试系统 |
CN113918458A (zh) * | 2021-10-13 | 2022-01-11 | 网易(杭州)网络有限公司 | 脚本处理方法、服务器和存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150100829A1 (en) * | 2013-10-04 | 2015-04-09 | Unisys Corporation | Method and system for selecting and executing test scripts |
CN105224456A (zh) * | 2015-09-29 | 2016-01-06 | 北京奇虎科技有限公司 | 一种测试脚本生成方法、装置和系统 |
CN105893235A (zh) * | 2015-01-26 | 2016-08-24 | 中国移动通信集团浙江有限公司 | 一种仿真测试方法、装置及服务器 |
CN107145440A (zh) * | 2017-04-06 | 2017-09-08 | 百富计算机技术(深圳)有限公司 | 应用程序测试方法、装置和计算机设备 |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101135989B (zh) * | 2006-08-31 | 2010-11-24 | 中国银联股份有限公司 | 一种Web应用系统的自动化测试的方法和装置 |
WO2011162832A1 (fr) * | 2010-06-25 | 2011-12-29 | Pass Touch, Llc | Système et procédé d'authentification et d'identification de trajectoire de signature |
CN104679644B (zh) * | 2013-11-28 | 2017-10-31 | 比亚迪股份有限公司 | 移动终端中应用程序的测试方法和系统 |
CN104268079B (zh) * | 2014-09-24 | 2017-10-31 | 福建联迪商用设备有限公司 | 一种pos应用程序测试的方法及系统 |
CN104216832A (zh) * | 2014-09-24 | 2014-12-17 | 福建联迪商用设备有限公司 | 一种pos应用程序测试的方法及系统 |
CN104199780A (zh) * | 2014-09-24 | 2014-12-10 | 福建联迪商用设备有限公司 | 一种pos应用程序测试的方法及系统 |
CN105930259B (zh) * | 2015-12-23 | 2018-10-16 | 中国银联股份有限公司 | 一种web回归测试的方法和装置 |
CN108446215B (zh) * | 2018-02-05 | 2021-04-23 | 百富计算机技术(深圳)有限公司 | Pos机测试的方法、装置、系统及终端 |
-
2017
- 2017-04-06 CN CN201710221969.5A patent/CN107145440B/zh active Active
- 2017-09-22 WO PCT/CN2017/102987 patent/WO2018184361A1/fr active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150100829A1 (en) * | 2013-10-04 | 2015-04-09 | Unisys Corporation | Method and system for selecting and executing test scripts |
CN105893235A (zh) * | 2015-01-26 | 2016-08-24 | 中国移动通信集团浙江有限公司 | 一种仿真测试方法、装置及服务器 |
CN105224456A (zh) * | 2015-09-29 | 2016-01-06 | 北京奇虎科技有限公司 | 一种测试脚本生成方法、装置和系统 |
CN107145440A (zh) * | 2017-04-06 | 2017-09-08 | 百富计算机技术(深圳)有限公司 | 应用程序测试方法、装置和计算机设备 |
Also Published As
Publication number | Publication date |
---|---|
CN107145440B (zh) | 2020-07-24 |
CN107145440A (zh) | 2017-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018184361A1 (fr) | Procédé de test d'application, serveur, terminal et supports de stockage | |
CN108959068B (zh) | 软件界面测试方法、设备及存储介质 | |
CN107402880B (zh) | 一种测试方法及电子设备 | |
US8490059B2 (en) | Cross-browser testing of a web application | |
US20140237451A1 (en) | Exposing method related data calls during testing in an event driven, multichannel architecture | |
US11237948B2 (en) | Rendering engine component abstraction system | |
CN106815141A (zh) | 一种软件测试方法和装置 | |
CN107977308A (zh) | 接口测试方法及装置 | |
CN108111364B (zh) | 一种业务系统的测试方法及装置 | |
US9898390B2 (en) | Virtual service localization | |
CN106815142A (zh) | 一种软件测试方法和系统 | |
CN111290941A (zh) | 多个接口的测试方法、装置、计算设备和介质 | |
US20200293592A1 (en) | Methods and systems for browser extension used to generate relative xpath, absolute xpath and/or css selectors | |
CN111666201A (zh) | 回归测试方法、装置、介质及电子设备 | |
WO2021129335A1 (fr) | Procédé et appareil de surveillance d'opération, procédé et appareil d'analyse d'opération | |
CN107844486B (zh) | 一种用于客户端的分析网页问题的方法和系统 | |
CN105486998A (zh) | 处理器板卡参数无损式自动测试方法和监控主机装置 | |
CN110232018A (zh) | 接口测试方法、装置、计算机设备 | |
CN110543429A (zh) | 测试用例调试方法、装置及存储介质 | |
CN117493188A (zh) | 接口测试方法及装置、电子设备及存储介质 | |
WO2016188101A1 (fr) | Procédé et dispositif de test d'un système de service | |
CN114564387A (zh) | 一种针对OpenStack云平台的场景式自动化测试方法及系统 | |
US9304891B1 (en) | Load-test generator | |
CN116955193A (zh) | 接口测试方法、装置、设备及存储介质 | |
CN115048295A (zh) | 一种测试方法、装置、终端及计算机可读存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17904536 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17904536 Country of ref document: EP Kind code of ref document: A1 |