WO2019223070A1 - 应用测试方法、装置、设备及可读存储介质 - Google Patents

应用测试方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2019223070A1
WO2019223070A1 PCT/CN2018/094726 CN2018094726W WO2019223070A1 WO 2019223070 A1 WO2019223070 A1 WO 2019223070A1 CN 2018094726 W CN2018094726 W CN 2018094726W WO 2019223070 A1 WO2019223070 A1 WO 2019223070A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
data
terminal
instruction
application
Prior art date
Application number
PCT/CN2018/094726
Other languages
English (en)
French (fr)
Inventor
臧慧芝
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019223070A1 publication Critical patent/WO2019223070A1/zh

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/3688Test management for test execution, e.g. scheduling of test suites
    • 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

Definitions

  • the present application relates to the field of application testing, and in particular, to an application testing method, device, device, and computer-readable storage medium.
  • Testing generally includes functional testing, performance testing, and software testing. Random testing is a sampling test of the function or performance of software, and is a supplementary test of functional testing and performance testing.
  • Traditional random testing tools generally test applications randomly by using the test code provided by the system. However, when the traditional random test tool executes the default test code, testers need to manually input the corresponding test code by themselves, and they need to configure the corresponding parameters themselves.
  • testers need to memorize a large number of test codes, but the process of entering test codes is also prone to errors.
  • the configured parameters are difficult to save, some more tedious parameters need to be configured repeatedly.
  • traditional random testing tools require testers to find related problems in the logs generated after the test after the test is completed, which not only increases the workload of testers, increases labor costs, but also reduces testing. effectiveness.
  • the main purpose of this application is to provide an application test method, device, device, and computer-readable storage medium, which are aimed at solving the technical problem that the existing application random test process requires manual real-time operation.
  • this application provides an application test method, which includes the following steps:
  • a corresponding test code is called according to an assembly instruction included in the test request, and a test code corresponding to the assembly instruction is compiled into a terminal test instruction through a preset framework;
  • the present application further provides an application testing device, where the application testing device includes:
  • An instruction compiling module when receiving a test request, calling a corresponding test code according to an assembly instruction included in the test request, and compiling the test code corresponding to the assembly instruction into a terminal test instruction through a preset framework;
  • An instruction sending module sending the terminal test instruction to a test terminal for the test terminal to perform a test operation on a target application according to the terminal test instruction;
  • the data monitoring module starts a test monitoring thread to monitor a system log of the test terminal, and acquires test index data recorded in real time when the test terminal performs a test operation.
  • the present application further provides an application testing device, where the application testing device includes a processor, a memory, and an application test readable instruction stored on the memory and executable by the processor, When the application test readable instructions are executed by the processor, the steps of the application test method as described above are implemented.
  • the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores application test-readable instructions, and when the application test-readable instructions are executed by a processor, Apply the test method steps as described above.
  • a test request when a test request is received, a corresponding test code is called according to an assembly instruction included in the test request, and a test code corresponding to the assembly instruction is compiled into a terminal test instruction through a preset framework; the terminal is A test instruction is sent to a test terminal for the test terminal to perform a test operation on a target application according to the terminal test instruction; a test monitoring thread is started to monitor a system log of the test terminal, and the test terminal is executed to perform a test operation in real time The test index data recorded at the time.
  • the manual operation process of the test process of the target application can be compiled into a terminal test instruction and sent to the terminal for automatic execution, and various test data of the terminal in the entire process can be obtained automatically. Manual operation reduces the labor cost of testing and improves the efficiency of testing.
  • FIG. 1 is a schematic diagram of a hardware structure of an application test device involved in a solution according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a first embodiment of an application testing method of this application
  • FIG. 3 is a schematic flowchart of a second embodiment of an application testing method of this application.
  • FIG. 4 is a schematic flowchart of a third embodiment of an application testing method of this application.
  • FIG. 5 is a schematic diagram of the functional modules of the first embodiment of the application test device of the present application.
  • the application test method according to the embodiment of the present application is mainly applied to an application test device, and the application test device may be a device with display and processing functions such as a PC, a portable computer, and a mobile terminal.
  • FIG. 1 is a schematic diagram of a hardware structure of an application testing device involved in a solution according to an embodiment of the present application.
  • the application test device may include a processor 1001 (such as a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display and an input unit such as a keyboard.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface.
  • the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory, the memory 1005 may optionally be a storage device independent of the foregoing processor 1001.
  • FIG. 1 does not constitute a limitation on the application test equipment, and may include more or fewer components than shown in the figure, or combine certain components, or different component arrangements.
  • the memory 1005 as a computer-readable storage medium in FIG. 1 may include an operating system, a network communication module, and application test-readable instructions.
  • the network communication module is mainly used to connect to a server and perform data communication with the server; and the processor 1001 can call the application test readable instructions stored in the memory 1005 and execute the application test method provided in the embodiment of the present application.
  • the embodiment of the present application provides an application test method.
  • FIG. 2 is a schematic flowchart of a first embodiment of an application testing method of the present application.
  • the application test method includes the following steps:
  • Step S10 When a test request is received, obtain a test code according to the code storage address included in the test request, and compile the test code into a terminal test instruction through a preset automation framework;
  • test code includes a test code operation command code and a command code that configures parameters related to the code.
  • a PC is used as an example for description.
  • a target application APP to be tested is installed in a smart phone, and the smart phone and the PC are connected in a wired (or wireless) manner.
  • step S10 the method further includes:
  • a corresponding option box is generated according to the calling interface, and the option box is displayed through a test interface.
  • Link options can be button options, duplicates Check box option, radio box option, etc., display the link option in the corresponding position area of the test interface, so that the tester can trigger the corresponding command coding through the link option.
  • the command encoding for configuring encoding related parameters can correspond to a check box.
  • the test encoding operation command includes a single execution operation command, such as the number of executions, and the single execution operation.
  • the command can correspond to a radio box.
  • the test coding operation command includes process control commands that need to be controlled by the tester, such as a start command, a termination command, and a log acquisition command.
  • the above operation commands can correspond to button options.
  • the application test device selects the most commonly used parameter configuration items by default, that is, saves the most commonly used parameter configuration items so that the application test device can execute the most basic test command initially.
  • the application test program is installed on the PC or tablet, and the tester tests the application installed on the mobile phone terminal or other terminal by installing the test program on the PC or tablet. Testers can select multiple link options on the test interface at the same time, such as selecting multiple configuration coding related parameter items through a check box and selecting a single operation command required through a radio box.
  • the one or more test code storage addresses are stored.
  • a pre-stored one or more test code storage addresses are obtained, and an assembly instruction is generated according to the test code storage addresses.
  • the assembly instruction is then sent to a server.
  • the server receives the assembly instruction, the server generates a corresponding terminal test instruction, and then sends the terminal test instruction to an Android terminal to be tested.
  • the terminal receives the terminal test instruction, it analyzes each test code storage address in the instruction to call the interface, and then calls the corresponding test code according to each test code storage address.
  • the Android terminal to be tested When the Android terminal to be tested receives each test code storage address, it calls the test code stored in the corresponding package through the calling interface corresponding to the test code to execute the assembly instruction.
  • the test encoding operation commands include pct-touch (designated touch event), pct-motion (slide event), pct-nav (navigation event), etc.
  • the command codes corresponding to the pct-nav (navigation event) are individually encapsulated and stored, and the encapsulated and stored events are correspondingly generated to generate a calling interface, and the calling interface is displayed by a check box in the test interface. Further, a percentage example of the event may be randomly selected, that is, an edit box is used to generate the number of times or the proportion code of the event is called.
  • step S10 specifically includes:
  • the automation framework Appium Server is also pre-installed in the PC to pass the Appium
  • the server sends a test instruction to the mobile phone.
  • the tester can operate on the PC to trigger the corresponding test request, where the test request includes an assembly instruction, which is the code storage address of the test code to be called (the code storage address can be the test Manually entered by a person, the tester can also drag the test code in the storage folder on the PC to the test window, and the PC recognizes the address of the storage folder according to the drag operation to obtain the coded storage address).
  • the PC receives the test request, it will obtain the corresponding test code according to the code storage address included in the splicing instruction in the test request.
  • the test code includes an application name, a test version, a test operation step, and a target page element corresponding to the test operation of the target application.
  • the test code may be edited in advance by a tester and stored in the PC.
  • the test code is edited by testers in advance.
  • the language of the automatic script is not necessarily the system language of the phone under test, so it cannot be directly identified and executed by the phone under test.
  • Server compiles and translates into terminal test instructions that can be recognized by the phone under test. Specifically, first, the PC needs to determine a corresponding grammar rule according to the language type of the test code, and obtain an operation meaning of the test code according to the grammar rule.
  • the operation meaning may be based on an operation keyword (or a function name).
  • OK such as click operation click, press, swipe operation, etc .
  • the corresponding terminal control information (or service item) will be found according to the operation meaning, and control operation logic will be generated according to the operation meaning and terminal control information, for example, the click operation may be based on the mobile phone's keyboard service item keyboard Server implementation, so it can generate the relevant keyboard service item call logic, and map the corresponding input parameters according to the meaning of the operation, so as to get the mobile phone control operation logic of the click operation; then the PC will sort and package these control operation logic according to the test steps Package to get the corresponding terminal test instructions.
  • Appium automation framework itself supports multiple languages, so testers can choose to write in languages such as Java, Python, Ruby, PHP, C #, and JavaScript according to the actual situation; at the same time, for test coding, because it is recognized by the PC
  • the compiled instructions are not directly related to the function execution of the target APP and test terminal, so the structure of the test code can be defined according to the actual situation.
  • Step S20 Send the terminal test instruction to a test terminal for the test terminal to perform a test operation on a target application according to the terminal test instruction;
  • the PC can send the test instruction to the mobile phone of the test terminal.
  • the mobile phone When the mobile phone receives the test instruction, it will identify the test instruction and determine the target APP corresponding to the test instruction. And start the target APP; when the target APP is started, the related service items will be called according to the test instruction to perform the relevant operation steps.
  • this test is about the change of performance indicators during an operation process in the target APP. After the mobile phone starts the target APP, it will identify a target element on a page of the target APP according to the test instructions, and then call the keyboard service item.
  • keyboard server and pass related methods and input touch parameters to it to make the keyboard
  • the server responds according to the input parameters and performs a click operation, thereby simulating a human's click operation, so that the target APP executes its own jump logic to jump to the next page according to the operation, and the mobile phone will also change the target element of the page at the same time
  • the situation determines whether the jump is successful; if the jump is successful, it continues to identify the target element on the page, and continues to perform a click operation or other operations, and so on, until all operations in the test instruction are completed.
  • step S30 a test monitoring thread is started to monitor a system log of the test terminal, and real-time acquisition of test index data recorded when the test terminal performs a test operation.
  • the PC while the PC is testing the mobile phone according to the test code, it will start a new test thread to monitor the system resources occupied by the target APP running in the mobile phone.
  • the monitoring content includes operation response time and memory usage. Measurement, cpu occupancy, network transmission traffic, etc .; then the PC will record and store these test data in the form of data streams for subsequent analysis.
  • the application test method in this embodiment is to connect the mobile phone with the target application installed to the PC and test the terminal application according to the test coding method, and does not require manual real-time operation;
  • multiple test machines with target applications installed can also be connected to the PC at the same time, and the PC sends test instructions to multiple test machines according to the test code, thereby achieving batch testing and obtaining the target applications in multiple test machines. Test data and comparison to ensure the credibility of the test conclusions.
  • This embodiment provides an application testing method.
  • the application testing method obtains a test code according to a script storage address included in the test request, and compiles the test code into a preset automation framework into Terminal test instruction; sending the terminal test instruction to a test terminal for the test terminal to perform a test operation on a target application according to the terminal test instruction; starting a test monitoring thread to monitor the system log of the test terminal in real time Acquire test index data recorded when the test terminal performs a test operation.
  • the manual operation process of the test process of the target application can be automatically executed by a test script, and various performance indicators of the smart terminal in the entire process can be automatically obtained, eliminating manual operation during the test process, reducing the Labor cost of testing, while improving testing efficiency.
  • FIG. 3 is a schematic flowchart of a second embodiment of an application testing method of the present application.
  • the application test method further includes:
  • Step S41 Obtain a data identifier of the test data, and determine a data type of the test data according to the data identifier;
  • a corresponding data model may be generated in advance according to data identifiers corresponding to data types such as performance test data types, functional test data types, and non-functional test data types.
  • the test data after the application program (APP) test runs corresponds to types of performance test data, function test data, adaptation compatibility test data, and weak network test data.
  • the data type of the test data is determined according to the data model, such as Performance test data.
  • Step S42 Obtain preset standard data corresponding to the test data according to the data type, and compare the test data with the preset standard data to determine whether the test data is abnormal;
  • a test thread is started to monitor the system resources occupied by the target APP running in the mobile phone, and to obtain the test terminal in real time when performing the test operation.
  • the PC will also compare the test data obtained in real time with the preset standard data (or the preset normal standard range), judge these test data, and judge the target APP during the test process. , Is the target app using the system resources of the phone normally?
  • the update of an APP is often an optimization or bug elimination of the previous version. Therefore, during the testing process, the data of the current version of the APP is often compared with the target performance data of a historical version to obtain the current version. Performance conclusions.
  • the target performance data of a target version of the APP may be used as the standard data for comparison.
  • the PC stores performance data obtained by the APP under different test scenarios. These data will be stored in different database tables according to the version number, test scenario number, etc., where the test scenario can be understood as the test being performed.
  • the test scenario environment can be described and determined by the environmental configuration included in the test code.
  • the PC When the PC is performing the test, it will determine the current test scenario and simulate it according to the environmental configuration in the test code, and then perform the test operation in the test scenario; at the same time, query the database according to the comparison requirements in the test request to obtain the target comparison of the APP
  • the target performance data of the version in the same test scenario is used as the standard data to compare and analyze with the test data obtained during the test.
  • the PC will also store it in the corresponding database table according to its version number, test scenario, etc., for subsequent version testing or comprehensive comparison analysis.
  • step S43 if the test data is abnormal, a corresponding warning prompt is output.
  • the PC end will immediately output a corresponding corresponding warning prompt.
  • an Android-based mobile phone opens the homepage of the test target APP under a 4G network, and after performing a click operation on an option on the homepage, the mobile phone jumps to the next sub-page according to the jump logic; at this time, the PC detects the jump During the process, the maximum CPU usage of the target APP reached 20%, which exceeded the preset standard CPU usage of 15%. At this time, the PC will output a text warning on the screen to remind the tester that the current target APP test performance exceeds the standard. .
  • different types of prompts can be set.
  • a single text prompt can be set for memory and CPU usage, and a dual prompt for text and reminder sound can be set for mobile phone temperature.
  • the PC can also display on the screen the information of the operation currently being performed by the target APP, including the meaning of the operation and the content of the corresponding automation code, etc., in order to facilitate testers' subsequent optimization operations.
  • FIG. 4 is a schematic flowchart of a third embodiment of an application testing method of the present application.
  • the application test method further includes:
  • Step S50 Obtain a data identifier of the test data, determine a corresponding report template according to the data identifier, fill the test data into the report template, and generate a corresponding test report.
  • the PC terminal when the PC terminal executes the test code (that is, the mobile phone performs the operation corresponding to the test code), the PC terminal may also automatically analyze and process the test data obtained during the test process. Specifically, the PC will determine the type of data targeted for this test based on the data identifier and obtain the corresponding report template according to the data type; then the PC will fill the test data into the report template to generate the test for this test report.
  • the test report can include data tables, statistical charts (line charts, bar charts, pie charts, etc.); for different analysis needs, it can be displayed in different forms.
  • the change trend of the target APP ’s memory usage and CPU usage in the mobile phone can be displayed in the form of a line chart (or curve); at the same time, the line of different indicators can also be integrated in The same graph is used for display; and for some discrete moments, each comparison index can be displayed in the form of a histogram.
  • the application test method further includes:
  • Step S61 When receiving a historical comparison instruction triggered based on the test report, according to the data identifier, and querying a database to obtain historical data corresponding to the historical version application;
  • the test report may also be made in an interactive form.
  • the performance data of the target APP obtained under different test scenarios will be stored in the database table according to the version number and test scenario number; while the PC end generates the test report, it will also according to the content of the test code ( Operational meaning) Determine the test scenario, and associate historical performance data of the same version with the test report under the test scenario; when the tester is browsing a test report of a certain version, if a certain scenario in the report is needed Data is compared horizontally with similar data of other historical versions, you can click on the data and select a historical version number; the PC can obtain historical performance data in the scenario corresponding to the historical version according to this operation and perform Contrast display.
  • Step S62 Obtain a preset chart template, and set chart properties according to the test data and historical data to obtain a data comparison chart.
  • the display mode can also be performed in the form of charts.
  • the PC obtains the historical performance data, it will also obtain a preset chart template, which is set according to the test data and historical performance data. Chart properties to obtain performance comparison charts (such as bar charts, line charts, etc.) for testers to compare and analyze.
  • the application test method further includes:
  • step S71 the data comparison chart is displayed on a visual display interface, and when an editing request triggered based on the data comparison chart is detected, an editing mode of the data comparison chart is turned on;
  • Step S72 Adjust the data comparison chart based on the display dimensions input by the user in the editing mode to obtain a data comparison chart that meets test requirements.
  • the test chart is displayed on the visual display interface. It should be added that the test chart can be dynamic.
  • the test chart edit mode is turned on.
  • the display chart input in the edit mode adjusts the test chart to obtain a test chart that meets the test requirements, that is, the editing conditions.
  • the tester can edit the test chart, and the user can adjust the display dimensions to display the test parameters, making the test chart display more flexible and diverse, and the tester can quickly influence the test factors. For example, the tester can jump to other related performance data tables, bar charts or line charts of the APP by clicking on the abnormal data of the CPU, or jump to the APP.
  • an embodiment of the present application further provides an application test device.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of an application testing device of the present application.
  • the application testing device includes:
  • the instruction compiling module 10 when receiving a test request, calls a corresponding test code according to an assembly instruction included in the test request, and compiles the test code corresponding to the assembly instruction into a terminal test instruction through a preset framework;
  • An instruction sending module 20 sending the terminal test instruction to a test terminal for the test terminal to perform a test operation on a target application according to the terminal test instruction;
  • the data monitoring module 30 starts a test monitoring thread to monitor the system log of the test terminal, and acquires in real time the test index data recorded when the test terminal performs a test operation.
  • the application test device further includes:
  • a packaging module for packaging a pre-stored test code, storing the encapsulated test code separately, and generating a corresponding calling interface
  • An option box module is configured to generate a corresponding option box according to the calling interface, and display the option box through a test interface.
  • instruction compiling module 10 specifically includes:
  • a calling unit configured to obtain an assembly instruction in the test request when a test request is received, and call a corresponding test code according to a calling interface in the assembly instruction;
  • a meaning acquisition unit configured to determine a corresponding grammar rule according to a language type of the test code, and acquire an operation meaning of the test code according to the grammar rule;
  • the instruction packaging unit is configured to find corresponding terminal control information according to the operation meaning, generate control operation logic according to the operation meaning and the terminal control information, and encapsulate the control operation logic into corresponding terminal test instructions.
  • the application test device further includes:
  • a type confirmation module acquiring a data identifier of the test data, and determining a data type of the test data according to the data identifier;
  • the abnormality determining module obtains preset standard data corresponding to the test data according to the data type, and compares the test data with the preset standard data to determine whether the test data is abnormal;
  • the abnormality prompt module outputs a corresponding warning prompt if the test data is abnormal.
  • the application test device further includes:
  • the report generating module obtains a data identifier of the test data, determines a corresponding report template according to the data identifier, fills the test data into the report template, and generates a corresponding test report.
  • the application test device further includes:
  • a history comparison module upon receiving a history comparison instruction triggered based on the test report, according to the data identifier, and querying a database to obtain historical data corresponding to a historical version application;
  • the chart generating module obtains a preset chart template, sets chart properties according to the test data and historical data, and obtains a data comparison chart.
  • the application test device further includes:
  • a chart editing module for displaying the data comparison chart on a visual display interface, and when an editing request triggered based on the data comparison chart is detected, turning on the editing mode of the data comparison chart;
  • the chart adjustment module adjusts the data comparison chart based on the display dimensions input by the user in the editing mode to obtain a data comparison chart that meets the testing requirements.
  • Each module in the above-mentioned application testing device corresponds to each step in the above-mentioned embodiment of the application testing method, and its functions and implementation processes are not repeated here one by one.
  • an embodiment of the present application further provides a computer-readable storage medium, and the computer-readable storage medium may be a non-volatile readable storage medium.
  • the computer-readable storage medium of the present application stores application test readable instructions, wherein when the application test readable instructions are executed by a processor, the steps of the application test method as described above are implemented.

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

一种应用测试方法、装置、设备及计算机可读存储介质,该方法通过当接收到测试请求时,根据所述测试请求中包括的脚本存储地址获取测试编码,并通过预设自动化框架将所述测试编码编译为终端测试指令;将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。将程序的测试过程由人工操作流程转为测试脚本自动执行,并可自动获取整个过程中的智能终端各种性能指标,省掉测试过程中人工操作,降低了测试的人力成本,同时提高了测试的效率。

Description

应用测试方法、装置、设备及可读存储介质
本申请要求于2018年5月25日提交中国专利局、申请号为2018105127087.3、发明名称为“应用测试方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及应用测试领域,尤其涉及一种应用测试方法、装置、设备及计算机可读存储介质。
背景技术
随着智能终端技术的不断发展,目前市场上的应用程序APP数量和种类迅速增长,用户对APP的稳定性要求也不断提高。而APP性能指标是影响其稳定性的重要因素,也是影响智能终端正常使用的关键因素。测试一般包括功能测试、性能测试和软件测试,随机测试是对软件的功能或性能进行抽样测试,是功能测试和性能测试的补充测试。传统的随机测试工具一般通过使用系统提供的测试编码来对应用程序进行随机测试。但传统的随机测试工具在执行该默认测试编码时,需要测试人员自己手动输入相应的测试编码,而且需要自己进行对应参数的配置。测试人员不仅需要记熟大量的测试编码,而且在输入测试编码的过程也容易出错。在测试过程中,由于配置的参数难以被保存,一些较为繁琐的参数需要被重复配置。除此之外,传统的随机测试工具在测试完成后,需要测试人员自己在测试后生成的日志中进行相关问题查找,不仅加大了测试人员的工作量,提高了人力成本,也降低了测试效率。
发明内容
本申请的主要目的在于提供一种应用测试方法、装置、设备及计算机可读存储介质,旨在解决现有应用随机测试过程需要人工实时操作的技术问题。
为实现上述目的,本申请提供一种应用测试方法,所述应用测试方法包括以下步骤:
当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令;
将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;
开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。
此外,为实现上述目的,本申请还提供一种应用测试装置,所述应用测试装置包括:
指令编译模块,当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令;
指令发送模块,将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;
数据监测模块,开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。
此外,为实现上述目的,本申请还提供一种应用测试设备,所述应用测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的应用测试可读指令,其中所述应用测试可读指令被所述处理器执行时,实现如上述的应用测试方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有应用测试可读指令,其中所述应用测试可读指令被处理器执行时,实现如上述的应用测试方法的步骤。
本申请通过当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令;将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。通过以上方式,本申请中可将目标应用程序的测试过程的人工操作流程编译成终端测试指令并发送至至终端自动执行,并可自动获取整个过程中的终端各种测试数据,测试过程中无需人工操作,降低了测试的人力成本,同时提高了测试的效率。
附图说明
图1为本申请实施例方案中涉及的应用测试设备的硬件结构示意图;
图2为本申请应用测试方法第一实施例的流程示意图;
图3为本申请应用测试方法第二实施例的流程示意图;
图4为本申请应用测试方法第三实施例的流程示意图;
图5为本申请应用测试装置第一实施例的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例涉及的应用测试方法主要应用于应用测试设备,该应用测试设备可以是PC、便携计算机、移动终端等具有显示和处理功能的设备。
参照图1,图1为本申请实施例方案中涉及的应用测试设备的硬件结构示意图。本申请实施例中,应用测试设备可以包括处理器1001(例如CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的硬件结构并不构成对应用测试设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
继续参照图1,图1中作为一种计算机可读存储介质的存储器1005可以包括操作系统、网络通信模块以及应用测试可读指令。
在图1中,网络通信模块主要用于连接服务器,与服务器进行数据通信;而处理器1001可以调用存储器1005中存储的应用测试可读指令,并执行本申请实施例提供的应用测试方法。
本申请实施例提供了一种应用测试方法。
参照图2,图2为本申请应用测试方法第一实施例的流程示意图。
本实施例中,所述应用测试方法包括以下步骤:
步骤S10,当接收到测试请求时,根据所述测试请求中包括的编码存储地址获取测试编码,并通过预设自动化框架将所述测试编码编译为终端测试指令;
传统的随机测试工具一般通过使用系统提供的测试编码来对应用程序进行随机测试。但传统的随机测试工具在执行该默认测试编码时,需要测试人员自己手动输入相应的测试编码,而且需要自己进行对应参数的配置。测试人员不仅需要记熟大量的测试编码,而且在输入测试编码的过程也容易出错。在测试过程中,由于配置的参数难以被保存,一些较为繁琐的参数需要被重复配置。除此之外,传统的随机测试工具在测试完成后,需要测试人员自己在测试后生成的日志中进行相关问题查找。为了解决上述技术问题,本申请将常用的测试编码分别进行封装与单独存储。其中,测试编码包括测试编码操作命令编码以及配置编码相关参数的命令编码。本实施例中以PC端为例进行说明;本实施例中将要测试的目标应用APP安装在智能手机中,该智能手机与PC端通过有线(或无线)的方式连接。
进一步地,步骤S10之前,还包括:
将预存的测试编码进行封装,将封装后的测试编码进行单独存储,并生成对应的调用接口;
根据所述调用接口生成对应的选项框,并通过测试界面显示所述选项框。
为了避免重复输入测试编码或者重复配置编码相关参数,本申请中根据不同的命令编码生成不同的调用接口,并根据调用各个命令编码的调用接口生成对应的链接选项,链接选项可以是按钮选项、复选框选项、单选框选项等,将该链接选项在测试界面的对应位置区域进行显示,以供测试人员通过该链接选项触发对应的命令编码。其中,由于可以同时进行多个测试编码相关参数的设置,因此配置编码相关参数的命令编码可以对应复选框,测试编码操作命令中包括单个执行的操作命令,如执行次数,该单个执行的操作命令可以对应单选框,测试编码操作命令中包括需要测试人员控制的进程控制命令,如开始命令、终止命令以及获取日志命令等,上述操作命令可以对应按钮选项。进一步地,应用测试装置默认选中最常用的参数配置项,即保存最常用的参数配置项,以便应用测试装置初始便可以执行最基础的测试命令。其中,应用测试程序安装于PC端或者平板,测试人员通过安装PC端或者平板上的测试程序对安装于手机终端或者其他终端上的应用程序进行测试。测试人员在测试界面上可以同时选中多个链接选项,如通过复选框选中多个配置编码相关参数项并通过单选框选中需要的单个操作命令。在接收到测试人员通过界面上的选项触发的一个或多个测试编码时,将一个或多个测试编码存储地址进行存储。并在接收到测试人员通过界面上的开始测试选项触发的测试请求时,获取预存的一个或多个测试编码存储地址,并根据所述测试编码存储地址生成拼装指令。然后将所述拼装指令发送至服务器,所述服务器在接收到该拼装指令时,生成对应的终端测试指令,然后将所述终端测试指令发送至待测试的安卓终端。终端接收到所述终端测试指令时,解析出指令中的各个测试编码存储地址即调用接口,然后根据各个测试编码存储地址调用对应的个测试编码。待测试的安卓终端接收到各个测试编码存储地址时,即通过该测试编码对应的调用接口调用相应封装存储的测试编码,以执行所述拼装指令。其中,测试编码操作命令包括pct-touch(指定触摸事件)、pct-motion(滑动事件)、pct-nav(导航事件)等,将pct-touch(指定触摸事件)、pct-motion(滑动事件)和pct-nav(导航事件)对应的命令编码进行单独封装与存储,并将封装与存储后的各个事件对应生成调用接口,并在测试界面中通过复选框显示该调用接口。进一步地,还可以通过随机抽取该事件的百分比例,即通过编辑框,生成调用该事件的次数或比例编码。
进一步地,步骤S10具体包括:
当接收到测试请求时,获取所述测试请求中的拼装指令,根据所述拼装指令中的调用接口调用对应的测试编码;
根据所述测试编码的语言类型确定对应的语法规则,并根据所述语法规则获取所述测试编码的操作含义;
根据所述操作含义查找对应的终端控件信息,并根据所述操作含义和所述终端控件信息生成控件操作逻辑,并将所述控件操作逻辑封装为对应的终端测试指令。
本实施例中,PC中还预先安装有自动化框架Appium Server,以通过该Appium Server向手机发送测试指令。
当测试开始时,测试人员可在PC端上进行操作,触发相应的测试请求,其中该测试请求中包括拼装指令,拼装指令为待调用的测试编码的编码存储地址(该编码存储地址可以是测试人员手动输入的,也可以测试人员将PC端存储文件夹中的测试编码拖拽到测试窗口,PC端根据该拖拽操作识别存储文件夹的地址,从而获得编码存储地址)。PC端在接收到该测试请求时,将会根据该测试请求中拼接指令包括的编码存储地址获取对应的测试编码。其中,该测试编码中包括有目标应用的应用名、测试版本、测试操作步骤、测试操作对应的目标页面元素等内容;该测试编码可以是由测试人员预先编辑并存储在PC端中的。对于该测试编码,由于是由测试人员预先进行编辑的,该自动脚本的编写语言并不是一定被测手机的系统语言,因此无法直接被测手机进行识别和执行,因此将通过自动化框架Appium Server进行编译,转化为被测手机能识别的终端测试指令。具体的,首先PC需要根据测试编码的语言类型确定对应的语法规则,并根据所述语法规则获取所述测试编码的操作含义;其中对于该操作含义可以是根据操作关键字(或是函数名)确定,例如点击操作click、press,滑动操作swipe等;而在操作关键字之后,还可以包括有操作对象,即操作所针对的页面元素,如点击页面的哪一个元素等;在确定操作含义后,将根据所述操作含义查找对应的终端控件信息(或服务项),并根据所述操作含义和终端控件信息生成控件操作逻辑,例如点击操作可以是根据手机的键盘服务项keyboard server实现的,因此可生成相关的键盘服务项调用逻辑,并根据操作含义映射对应的入参,从而得到点击操作的手机控件操作逻辑;然后PC会将这些控件操作逻辑根据测试步骤进行排序并打包封装,得到对应的终端测试指令。
值得说明的是,Appium自动化框架本身支持多种语言,所以测试人员可以根据实际情况选择Java、Python、Ruby、PHP、C#、JavaScript等语言编写的;同时,对于测试编码,由于其是被PC识别并编译的一系列指令,与目标APP和测试终端的功能执行并无直接联系,因此对于测试编码的结构可以根据实际情况定义。
步骤S20,将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;
本实施例中,在得到终端测试指令时,PC即可将该测试指令发送至测试终端手机,手机在接收到测试指令时,将对该测试指令进行识别,确定该测试指令对应的目标APP,并启动目标APP;在启动该目标APP时,将根据测试指令调用相关的服务项执行相关的操作步骤。例如本次测试的是目标APP中某条操作流程过程中的性能指标变化情况;手机在启动目标APP后,将根据测试指令识别目标APP某个页面上的某个目标元素,然后调用键盘服务项keyboard server,并向其传递相关方法和输入触摸参数,以使keyboard server根据该输入参数做出响应,执行click操作,从而模拟人的点击操作,使得目标APP根据该操作执行其本身的跳转逻辑跳转到下一个页面,同时手机还将根据页面目标元素的变化情况判断是否跳转成功;若跳转成功,则继续识别该页面上的目标元素,并继续执行click操作或其他操作等,以此类推,直到该测试指令中的所有操作均执行完毕。
步骤S30,开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。
本实施例中,PC端在根据测试编码对手机进行测试的同时,将开启新的测试线程,对目标APP在手机中运行所占用的系统资源进行监测,监测的内容包括操作响应时间、内存占用量、cpu占用率、网络传输流量等;然后PC端会将这些测试数据将会以数据流的形式进行记录和存储,以供后续进行分析。
值得说明的是,本实施例中的应用测试方法,是通过将安装有目标应用的手机与PC端进行连接,并按照测试编码的方式对终端应用进行测试,不需要人工实时进行操作;而在实际中,还可以将多台安装了目标应用的测试机同时与PC端进行连接,PC端根据测试编码向多台测试机发送测试指令,从而实现批量测试,获取目标应用在多台测试机中的测试数据并进行对比,从而保证测试结论的可信度。
本实施例提供一种应用测试方法,该应用测试方法通过当接收到测试请求时,根据所述测试请求中包括的脚本存储地址获取测试编码,并通过预设自动化框架将所述测试编码编译为终端测试指令;将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。通过以上方式,本申请中可将目标应用程序的测试过程的人工操作流程通过测试脚本自动执行,并可自动获取整个过程中的智能终端各种性能指标,省掉测试过程中人工操作,降低了测试的人力成本,同时提高了测试的效率。
参照图3,图3为本申请应用测试方法第二实施例的流程示意图。
基于上述图2所示实施例,本实施例中,所述应用测试方法还包括:
步骤S41,获取所述测试数据的数据标识符,根据所述数据标识符确定所述测试数据的数据类型;
本实施例中,可预先根据性能测试数据类型、功能测试数据类型以及非功能测试数据类型等数据类型对应的数据标识符,训练生成对应的数据模型。
获取所述测试数据的数据标识符,然后根据上述数据模型,确定所述测试数据的数据类型。应用程序(APP)测试运行后的测试数据对应有性能测试数据、功能测试数据、适配兼容性测试数据、弱网络测试数据等类型,根据所述数据模型确定所述测试数据的数据类型,如性能测试数据。
步骤S42,根据所述数据类型,获取所述测试数据对应的预设标准数据,并将所述测试数据与预设标准数据对比,判断所述测试数据是否异常;
本实施例中,本实施例中,PC端将对手机进行应用测试时,将会开启测试线程对目标APP在手机中运行所占用的系统资源进行监测,实时获取所述测试终端执行测试操作时的测试数据;同时,PC端还会将实时获取到的测试数据与预先设置的标准数据(或者是预先设置的正常标准范围)进行比对,判断这些测试数据,从而判断目标APP在测试过程中,目标APP在对手机的系统资源占用是否正常。
进一步的,APP的更新换代往往是对前一个版本的优化或BUG消除,因此在测试过程也经常是将APP当前版本测试的数据与某一历史版本的目标性能数据进行比较,从而得出当前版本的性能结论。基于上述考虑,本实施例中,可以是将APP某一目标版本的目标性能数据作为用于比较的标准数据。具体的,PC端中存储有APP在不同测试场景下获取的性能数据,这些数据将按版本号、测试场景编号等,分别存储在不同的数据库表中;其中,测试场景可理解为在进行测试时的环境,包括内部环境(如测试操作涉及的APP页面)和外部环境(如网络类型、网络信号强度等),该测试场景环境可以是通过测试编码中包括的环境配置进行描述和确定的。PC端在进行测试时,将根据测试编码中的环境配置确定当前的测试场景并进行模拟,然后在该测试场景下进行测试操作;同时根据测试请求中的对比要求查询数据库,获取APP的目标对比版本在相同测试场景下的目标性能数据作为标准数据,以与测试过程得到的测试数据进行对比分析。当然,对于本次目标APP的测试数据,PC端在获取后也将根据其版本号、测试场景等存储至对应的数据库表中,以供后续版本测试或对综合比对分析时使用。
步骤S43,若所述测试数据异常,则输出对应的警告提示。
本实施例中,如果在将测试数据和预设标准数据对比后,判断测试数据异常,则PC端会立即输出相关对应的警告提示。例如安卓系统的手机在4G网络下打开测试目标APP的主页,执行对主页的某个选项点击操作后,手机根据跳转逻辑跳转到下一个子页面;此时,PC端检测到该跳转过程中,目标APP的最高CPU占用率达到了20%,超过了预设的标准CPU占用率15%,此时PC端将会在屏幕上输出文字警告,以提示测试人员当前目标APP测试性能超标。当然,对于不同类型的性能数据,可以设置不同的提示类型,例如对于内存、CPU占用率可以设置为单一的文字提示,对于手机温度则可以设置为文字和提醒音的双重提示。进一步的,在输出警告提示时,PC端还可以在屏幕中显示当前目标APP正在执行的操作信息,包括操作含义和对应的自动化代码内容等,以方便测试人员进行后续的优化操作。
参照图4,图4为本申请应用测试方法第三实施例的流程示意图。
基于上述图3所示实施例,本实施例中,所述应用测试方法还包括:
步骤S50,获取所述测试数据的数据标识符,根据所述数据标识符确定对应的报告模板,并将所述测试数据填充至所述报告模板,生成对应的测试报告。
本实施例中,PC端在测试编码执行完毕(即手机执行完测试编码对应的操作)时,PC端还可自动对测试过程获取到的测试数据进行分析和处理。具体的,PC端将根据数据标识符确定本次测试所针对的数据类型,并根据数据类型获取到对应的报告模板;然后PC端将测试数据填充到报告模板中,以生成本次测试的测试报告。其中,测试报告中可以包括数据表格、统计图(折线图、柱形图、饼状图等);对于不同的分析需求,可以用不同的形式进行展示。例如,对于整个测试编码的执行过程中,目标APP在手机的内存占用、cpu占用的变化趋势,可以是以折线图(或曲线)的形式进行展示;同时,不同指标的折线还可以是集成在同一个图中进行展示;而对于某些离散时刻的各项对比指标则可以是用柱状图的方式进行展示。
进一步地,所述应用测试方法还包括:
步骤S61,在接收到基于所述测试报告触发的历史对比指令时,根据所述数据标识符,并查询数据库,获取历史版本应用对应的历史数据;
本实施例中,测试人员在查看测试报告对目标APP的性能进行分析时,往往需要和不同版本的性能数据进行对比,因此对于该测试报告,也可以是做成可交互的形式。具体的,在不同的测试场景下获取到的目标APP的性能数据,将按版本号、测试场景编号,存储到数据库表中;PC端在生成测试报告的同时,还将根据测试编码的内容(操作含义)确定测试场景,并将在该测试场景下、历史版本的同类性能数据与测试报告中进行关联;当测试人员在浏览某一版本的测试报告时,若需要将该报告中的某场景的数据与其它历史版本的同类数据进行横向对比,则可点击该数据,并选择某一历史版本号;PC端即可根据该操作获取可获取该历史版本对应场景下的历史性能数据,并进行对比展示。
步骤S62,获取预设图表模板,并根据所述测试数据和历史数据设置图表属性,获得数据对比图表。
本实施例中,对于展示的方式,同样可以是图表的方式进行的;PC端在获取到历史性能数据的同时,还将获取到预设的图表模板,根据所述测试数据和历史性能数据设置图表属性,获得性能对比图表(例如柱状图、折线图等),以供测试人员对比分析。
进一步地,所述应用测试方法还包括:
步骤S71,将所述数据对比图表在可视化显示界面进行展示,并在检测到基于所述数据对比图表触发的编辑请求时,开启所述数据对比图表的编辑模式;
步骤S72,基于用户在所述编辑模式下输入的显示维度,调整所述数据对比图表,以得到符合测试需求的数据对比图表。
本实施例中,将测试图表在可视化显示界面进行展示,需要补充说明的是测试图表可以是动态的,在检测到基于测试图表触发的编辑请求时,开启测试图表的编辑模式,基于测试人员在编辑模式下输入的显示维度调整所述测试图表,以得到符合测试需求即编辑条件的测试图表。测试人员可以对测试图表进行编辑,用户可以调整显示维度进行测试参数的显示,使得测试图表显示更加灵活和多样,测试人员可以快速地到影响测试因素。如测试人员可通过点击待CPU异常数据跳转至该APP的其他相关性能数据表格、条形图或者折线图,或者是跳转至该APP 在其他终端上的CPU占用数据表格、条形图或者折线图,从而便于测试人员进行相关比较分析。
此外,本申请实施例还提供一种应用测试装置。
参照图5,图5为本申请应用测试装置第一实施例的功能模块示意图。
本实施例中,所述应用测试装置包括:
指令编译模块10,当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令;
指令发送模块20,将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;
数据监测模块30,开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。
进一步的,所述应用测试装置还包括:
封装模块,用于将预存的测试编码进行封装,将封装后的测试编码进行单独存储,并生成对应的调用接口;
选项框模块,用于根据所述调用接口生成对应的选项框,并通过测试界面显示所述选项框。
进一步地,指令编译模块10具体包括:
调用单元,用于当接收到测试请求时,获取所述测试请求中的拼装指令,根据所述拼装指令中的调用接口调用对应的测试编码;
含义获取单元,用于根据所述测试编码的语言类型确定对应的语法规则,并根据所述语法规则获取所述测试编码的操作含义;
指令封装单元,用于根据所述操作含义查找对应的终端控件信息,并根据所述操作含义和所述终端控件信息生成控件操作逻辑,并将所述控件操作逻辑封装为对应的终端测试指令。
进一步地,所述应用测试装置还包括:
类型确认模块,获取所述测试数据的数据标识符,根据所述数据标识符确定所述测试数据的数据类型;
异常判断模块,根据所述数据类型,获取所述测试数据对应的预设标准数据,并将所述测试数据与预设标准数据对比,判断所述测试数据是否异常;
异常提示模块,若所述测试数据异常,则输出对应的警告提示。
进一步地,所述应用测试装置还包括:
报告生成模块,获取所述测试数据的数据标识符,根据所述数据标识符确定对应的报告模板,并将所述测试数据填充至所述报告模板,生成对应的测试报告。
进一步地,所述应用测试装置还包括:
历史对比模块,在接收到基于所述测试报告触发的历史对比指令时,根据所述数据标识符,并查询数据库,获取历史版本应用对应的历史数据;
图表生成模块,获取预设图表模板,并根据所述测试数据和历史数据设置图表属性,获得数据对比图表。
进一步地,所述应用测试装置还包括:
图表编辑模块,将所述数据对比图表在可视化显示界面进行展示,并在检测到基于所述数据对比图表触发的编辑请求时,开启所述数据对比图表的编辑模式;
图表调整模块,基于用户在所述编辑模式下输入的显示维度,调整所述数据对比图表,以得到符合测试需求的数据对比图表。
其中,上述应用测试装置中各个模块与上述应用测试方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
此外,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质可以为非易失性可读存储介质。
本申请计算机可读存储介质上存储有应用测试可读指令,其中所述应用测试可读指令被处理器执行时,实现如上述的应用测试方法的步骤。
其中,应用测试可读指令被执行时所实现的方法可参照本申请应用测试方法的各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种应用测试方法,其特征在于,所述应用测试方法包括以下步骤:
    当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令;
    将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;
    开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。
  2. 如权利要求1所述的应用测试方法,其特征在于,所述当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令的步骤之前,还包括:
    将预存的测试编码进行封装,将封装后的测试编码进行单独存储,并生成对应的调用接口;
    根据所述调用接口生成对应的选项框,并通过测试界面显示所述选项框。
  3. 如权利要求2所述的应用测试方法,其特征在于,所述当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令的步骤具体包括:
    当接收到测试请求时,获取所述测试请求中的拼装指令,根据所述拼装指令中的调用接口调用对应的测试编码;
    根据所述测试编码的语言类型确定对应的语法规则,并根据所述语法规则获取所述测试编码的操作含义;
    根据所述操作含义查找对应的终端控件信息,并根据所述操作含义和所述终端控件信息生成控件操作逻辑,并将所述控件操作逻辑封装为对应的终端测试指令。
  4. 如权利要求1所述的应用测试方法,其特征在于,所述开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据的步骤之后,还包括:
    获取所述测试数据的数据标识符,根据所述数据标识符确定所述测试数据的数据类型;
    根据所述数据类型,获取所述测试数据对应的预设标准数据,并将所述测试数据与预设标准数据对比,判断所述测试数据是否异常;
    若所述测试数据异常,则输出对应的警告提示。
  5. 如权利要求1所述的应用测试方法,其特征在于,所述开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据的步骤之后,还包括:
    获取所述测试数据的数据标识符,根据所述数据标识符确定对应的报告模板,并将所述测试数据填充至所述报告模板,生成对应的测试报告。
  6. 如权利要求5所述的应用测试方法,其特征在于,所述获取所述测试数据的数据标识符,根据所述数据标识符确定对应的报告模板,并将所述测试数据填充至所述报告模板,生成对应的测试报告的步骤之后,还包括:
    在接收到基于所述测试报告触发的历史对比指令时,根据所述数据标识符,并查询数据库,获取历史版本应用对应的历史数据;
    获取预设图表模板,并根据所述测试数据和历史数据设置图表属性,获得数据对比图表。
  7. 如权利要求6所述的应用测试方法,其特征在于,所述获取预设图表模板,并根据所述测试数据和历史数据设置图表属性,获得性能对比图表的步骤之后,还包括:
    将所述数据对比图表在可视化显示界面进行展示,并在检测到基于所述数据对比图表触发的编辑请求时,开启所述数据对比图表的编辑模式;
    基于用户在所述编辑模式下输入的显示维度,调整所述数据对比图表,以得到符合测试需求的数据对比图表。
  8. 一种应用测试装置,其特征在于,所述应用测试装置包括:
    指令编译模块,当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令;
    指令发送模块,将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;
    数据监测模块,开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。
  9. 如权利要求8所述的应用测试装置,其特征在于,所述应用测试装置还包括:
    封装模块,用于将预存的测试编码进行封装,将封装后的测试编码进行单独存储,并生成对应的调用接口;
    选项框模块,用于根据所述调用接口生成对应的选项框,并通过测试界面显示所述选项框。
  10. 如权利要求8所述的应用测试装置,其特征在于,所述指令编译模块包括:
    调用单元,用于当接收到测试请求时,获取所述测试请求中的拼装指令,根据所述拼装指令中的调用接口调用对应的测试编码;
    含义获取单元,用于根据所述测试编码的语言类型确定对应的语法规则,并根据所述语法规则获取所述测试编码的操作含义;
    指令封装单元,用于根据所述操作含义查找对应的终端控件信息,并根据所述操作含义和所述终端控件信息生成控件操作逻辑,并将所述控件操作逻辑封装为对应的终端测试指令。
  11. 如权利要求8所述的应用测试装置,其特征在于,所述应用测试装置还包括:
    类型确认模块,获取所述测试数据的数据标识符,根据所述数据标识符确定所述测试数据的数据类型;
    异常判断模块,根据所述数据类型,获取所述测试数据对应的预设标准数据,并将所述测试数据与预设标准数据对比,判断所述测试数据是否异常;
    异常提示模块,若所述测试数据异常,则输出对应的警告提示。
  12. 如权利要求8所述的应用测试装置,其特征在于,所述应用测试装置还包括:
    报告生成模块,获取所述测试数据的数据标识符,根据所述数据标识符确定对应的报告模板,并将所述测试数据填充至所述报告模板,生成对应的测试报告。
  13. 一种应用测试设备,其特征在于,所述应用测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的应用测试可读指令,其中所述应用测试可读指令被所述处理器执行时,实现如下步骤:
    当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令;
    将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;
    开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。
  14. 一种应用测试设备,其特征在于,所述应用测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的应用测试可读指令,其中所述应用测试可读指令被所述处理器执行时,实现如下步骤:
    将预存的测试编码进行封装,将封装后的测试编码进行单独存储,并生成对应的调用接口;
    根据所述调用接口生成对应的选项框,并通过测试界面显示所述选项框。
  15. 一种应用测试设备,其特征在于,所述应用测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的应用测试可读指令,其中所述应用测试可读指令被所述处理器执行时,实现如下步骤:
    当接收到测试请求时,获取所述测试请求中的拼装指令,根据所述拼装指令中的调用接口调用对应的测试编码;
    根据所述测试编码的语言类型确定对应的语法规则,并根据所述语法规则获取所述测试编码的操作含义;
    根据所述操作含义查找对应的终端控件信息,并根据所述操作含义和所述终端控件信息生成控件操作逻辑,并将所述控件操作逻辑封装为对应的终端测试指令。
  16. 一种应用测试设备,其特征在于,所述应用测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的应用测试可读指令,其中所述应用测试可读指令被所述处理器执行时,实现如下步骤:
    获取所述测试数据的数据标识符,根据所述数据标识符确定所述测试数据的数据类型;
    根据所述数据类型,获取所述测试数据对应的预设标准数据,并将所述测试数据与预设标准数据对比,判断所述测试数据是否异常;
    若所述测试数据异常,则输出对应的警告提示。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有应用测试可读指令,其中所述应用测试可读指令被处理器执行时,实现如下步骤:
    当接收到测试请求时,根据所述测试请求中包括的拼装指令调用对应的测试编码,并通过预设框架将所述拼装指令对应的测试编码编译为终端测试指令;
    将所述终端测试指令发送至测试终端,以供所述测试终端根据所述终端测试指令对目标应用执行测试操作;
    开启测试监控线程对所述测试终端的系统日志进行监测,实时获取所述测试终端执行测试操作时记录的测试指标数据。
  18. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有应用测试可读指令,其中所述应用测试可读指令被处理器执行时,实现如下步骤:
    将预存的测试编码进行封装,将封装后的测试编码进行单独存储,并生成对应的调用接口;
    根据所述调用接口生成对应的选项框,并通过测试界面显示所述选项框。
  19. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有应用测试可读指令,其中所述应用测试可读指令被处理器执行时,实现如下步骤:
    当接收到测试请求时,获取所述测试请求中的拼装指令,根据所述拼装指令中的调用接口调用对应的测试编码;
    根据所述测试编码的语言类型确定对应的语法规则,并根据所述语法规则获取所述测试编码的操作含义;
    根据所述操作含义查找对应的终端控件信息,并根据所述操作含义和所述终端控件信息生成控件操作逻辑,并将所述控件操作逻辑封装为对应的终端测试指令。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有应用测试可读指令,其中所述应用测试可读指令被处理器执行时,实现如下步骤:
    获取所述测试数据的数据标识符,根据所述数据标识符确定所述测试数据的数据类型;
    根据所述数据类型,获取所述测试数据对应的预设标准数据,并将所述测试数据与预设标准数据对比,判断所述测试数据是否异常;
    若所述测试数据异常,则输出对应的警告提示。
PCT/CN2018/094726 2018-05-25 2018-07-06 应用测试方法、装置、设备及可读存储介质 WO2019223070A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810512708.3A CN108733568A (zh) 2018-05-25 2018-05-25 应用测试方法、装置、设备及可读存储介质
CN201810512708.3 2018-05-25

Publications (1)

Publication Number Publication Date
WO2019223070A1 true WO2019223070A1 (zh) 2019-11-28

Family

ID=63936309

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/094726 WO2019223070A1 (zh) 2018-05-25 2018-07-06 应用测试方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN108733568A (zh)
WO (1) WO2019223070A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11726897B2 (en) 2020-04-13 2023-08-15 The Toronto-Dominion Bank System and method for testing applications

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542795A (zh) * 2018-12-13 2019-03-29 平安科技(深圳)有限公司 为用户推荐测试动作的方法、装置、介质、电子设备
CN109766276B (zh) * 2018-12-29 2024-01-12 通力科技股份有限公司 开放式平台测试方法、装置、计算机可读存储介质及系统
CN109947638A (zh) * 2019-01-14 2019-06-28 珠海金山网络游戏科技有限公司 一种应用程序性能测试控制方法及工具
CN109982144B (zh) * 2019-03-12 2020-06-30 四川长虹电器股份有限公司 监控并判断应用进程cpu占用超高并报警的自动化测试方法
CN109977027A (zh) * 2019-04-04 2019-07-05 广州市百果园信息技术有限公司 一种性能测试的方法、装置、系统、设备和存储介质
CN110245076A (zh) * 2019-05-21 2019-09-17 深圳壹账通智能科技有限公司 基于功能测试的因素影响程度确定方法、装置及终端设备
CN110362483B (zh) * 2019-06-19 2022-11-15 平安普惠企业管理有限公司 性能数据采集方法、装置、设备及存储介质
CN110515829A (zh) * 2019-07-10 2019-11-29 平安普惠企业管理有限公司 应用测试方法、装置、设备及计算机可读存储介质
CN112543068B (zh) * 2019-09-23 2022-06-10 华为机器有限公司 测试方法、装置及系统
CN111031089A (zh) * 2019-10-21 2020-04-17 福建星网智慧科技股份有限公司 一种用于web会议控制客户端的测试方法及计算机设备
CN111049684B (zh) * 2019-12-12 2023-04-07 闻泰通讯股份有限公司 数据分析方法、装置、设备和存储介质
CN111367812A (zh) * 2020-03-12 2020-07-03 北京奇艺世纪科技有限公司 测试方法、电子设备及可读存储介质
CN111581110B (zh) * 2020-04-16 2023-08-15 贝壳技术有限公司 一种业务数据准确性检测方法、装置、系统及存储介质
CN111611144B (zh) * 2020-05-27 2023-09-19 中国工商银行股份有限公司 用于处理性能测试数据的方法、装置、计算设备和介质
CN113742226B (zh) * 2021-09-01 2024-04-30 上海浦东发展银行股份有限公司 一种软件性能测试方法、装置、介质及电子设备
CN113518146B (zh) * 2021-09-14 2021-12-03 云账户技术(天津)有限公司 一种移动终端信息的获取方法及装置
CN114168476A (zh) * 2021-12-10 2022-03-11 惠州Tcl移动通信有限公司 一种自动化测试方法、装置、计算机设备以及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968371A (zh) * 2012-11-26 2013-03-13 武汉天喻信息产业股份有限公司 测试java api单元组件的方法及装置
CN106201864A (zh) * 2016-06-27 2016-12-07 乐视控股(北京)有限公司 一种应用程序编程接口api测试方法、装置及移动设备
CN106294102A (zh) * 2015-05-20 2017-01-04 腾讯科技(深圳)有限公司 应用程序的测试方法、客户端、服务器及系统
CN107957952A (zh) * 2017-12-18 2018-04-24 马上消费金融股份有限公司 一种接口测试方法、装置及介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7480899B2 (en) * 2004-03-22 2009-01-20 International Business Machines Corporation Method and apparatus for autonomic test case feedback using hardware assistance for code coverage
CN101551928A (zh) * 2009-05-14 2009-10-07 浪潮齐鲁软件产业有限公司 一种金融税控收款机嵌入程序的断点调试方法
CN103049371A (zh) * 2012-11-07 2013-04-17 青岛海信传媒网络技术有限公司 Android应用程序测试方法和测试装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968371A (zh) * 2012-11-26 2013-03-13 武汉天喻信息产业股份有限公司 测试java api单元组件的方法及装置
CN106294102A (zh) * 2015-05-20 2017-01-04 腾讯科技(深圳)有限公司 应用程序的测试方法、客户端、服务器及系统
CN106201864A (zh) * 2016-06-27 2016-12-07 乐视控股(北京)有限公司 一种应用程序编程接口api测试方法、装置及移动设备
CN107957952A (zh) * 2017-12-18 2018-04-24 马上消费金融股份有限公司 一种接口测试方法、装置及介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11726897B2 (en) 2020-04-13 2023-08-15 The Toronto-Dominion Bank System and method for testing applications
US11994972B2 (en) 2020-04-13 2024-05-28 The Toronto-Dominion Bank System and method for testing applications

Also Published As

Publication number Publication date
CN108733568A (zh) 2018-11-02

Similar Documents

Publication Publication Date Title
WO2019223070A1 (zh) 应用测试方法、装置、设备及可读存储介质
WO2019165691A1 (zh) 自动生成测试案例的方法、装置、设备及可读存储介质
WO2019218444A1 (zh) 测试报告的生成方法、装置、设备及存储介质
WO2019127837A1 (zh) 建表脚本生成方法、装置、设备及计算机可读存储介质
WO2019174375A1 (zh) 接口测试方法、装置、设备及计算机可读存储介质
WO2018205545A1 (zh) 数据生成方法、装置、终端及计算机可读存储介质
WO2017028601A1 (zh) 智能终端的语音控制方法、装置及电视机系统
WO2018227880A1 (zh) 数据比对方法、装置、设备及可读存储介质
WO2019075973A1 (zh) 应用程序的测试方法及装置
CN105302722B (zh) Cts自动测试方法及装置
WO2019019714A1 (zh) 一种微信客户行为反馈方法、设备及存储介质
WO2017041538A1 (zh) 终端用户界面的受控显示方法及装置
WO2018098880A1 (zh) 网站信息下载方法及装置
WO2015127870A1 (en) Method and apparatus for recommending application
CN106126414B (zh) 应用软件测试方法和系统
WO2014180149A1 (en) Method, system and computer storage medium for handling of account theft in online games
WO2015144052A1 (en) Method and apparatus for collecting statistics on network information
WO2019080401A1 (zh) 脚本语句转换方法、装置及计算机可读存储介质
WO2018149190A1 (zh) 组件调试方法、装置、设备和计算机可读存储介质
CN107678948B (zh) 测试用例生成方法、终端及存储介质
WO2019024472A1 (zh) 数据操作方法、装置及计算机可读存储介质
WO2019051897A1 (zh) 终端运行参数调整方法、装置及计算机可读存储介质
WO2017088429A1 (zh) 移动终端控制显示终端上触屏应用程序的方法及系统
WO2019062093A1 (zh) Raid管理方法、装置及计算机可读存储介质
WO2019127869A1 (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: 18919615

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: 18919615

Country of ref document: EP

Kind code of ref document: A1