WO2017121400A1 - 测试方法、系统、设备及可读存储介质 - Google Patents

测试方法、系统、设备及可读存储介质 Download PDF

Info

Publication number
WO2017121400A1
WO2017121400A1 PCT/CN2017/071198 CN2017071198W WO2017121400A1 WO 2017121400 A1 WO2017121400 A1 WO 2017121400A1 CN 2017071198 W CN2017071198 W CN 2017071198W WO 2017121400 A1 WO2017121400 A1 WO 2017121400A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
control
data
grid
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/071198
Other languages
English (en)
French (fr)
Inventor
胡帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to US15/735,983 priority Critical patent/US10282284B2/en
Priority to AU2017206394A priority patent/AU2017206394B2/en
Priority to EP17738213.2A priority patent/EP3404552A4/en
Priority to SG11201800340RA priority patent/SG11201800340RA/en
Priority to KR1020187019504A priority patent/KR102167879B1/ko
Priority to JP2018525572A priority patent/JP6512676B2/ja
Publication of WO2017121400A1 publication Critical patent/WO2017121400A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3698Environments for analysis, debugging or testing of software
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements

Definitions

  • the present invention relates to the field of automated testing technologies, and in particular, to a testing method, system, device, and readable storage medium.
  • the operating system of many smart mobile terminals such as mobile phones is relatively closed, and the application programming interface (API) for automatic testing of the user interface (UI) is too small, and the click efficiency is not high, so that the mobile phone is The test installed on the application is not accurate and the test is inefficient.
  • API application programming interface
  • test method that includes the following steps:
  • the test system performs parameter setting on the test grid used for performing the grid test, and obtains corresponding setting parameters
  • test system comprising:
  • a setting module configured to perform parameter setting on a test grid used for performing grid testing, to obtain corresponding setting parameters
  • a mesh generation module configured to generate a virtual test grid corresponding to the setting parameter for an upper layer surface of the tested application operation interface
  • An extraction module configured to extract a rule in the virtual test grid according to a preset coordinate extraction rule a preset number of coordinate data
  • An obtaining module configured to acquire a configuration file of the tested application from the terminal to be tested, and determine, from the obtained configuration file, area pixel data corresponding to each control of the tested application;
  • test module configured to test the respective controls according to the preset test rule according to the obtained coordinate data and the area pixel data, and obtain test data of the respective controls
  • a report generating module configured to generate, according to the obtained test data, a test report corresponding to the tested application.
  • a test device includes a processing unit, and a test system, an input/output unit, a communication unit, and a storage unit connected to the processing unit;
  • the input/output unit is configured to input a user instruction and output response data of the test device to the input user instruction;
  • the communication unit is configured to communicate with a predetermined terminal or a background server;
  • the storage unit is configured to store the test system and operation data of the test system
  • the processing unit is configured to call and execute the test system to perform the following steps:
  • a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of:
  • test method, system, device and readable storage medium of the invention can achieve the following beneficial effects:
  • the test grid used for the grid test is parameterized by the test system to obtain corresponding setting parameters; for the uppermost layer surface of the tested application operation interface, the simulation generates a virtual test corresponding to the set parameter.
  • Grid extracting a preset number of coordinate data in the virtual test grid according to a preset coordinate extraction rule; acquiring a configuration file of the tested application from the terminal to be tested, and obtaining the configuration from the obtained In the file, determining area pixel data corresponding to each control of the tested application; and based on the acquired coordinate data and the area pixel data, testing the respective controls according to a preset test rule, acquiring the The test data of each control is generated; the test report corresponding to the tested application is generated according to the obtained test data; and the automatic execution of the application on the tested terminal is tested, and the test accuracy and the test efficiency are improved.
  • the effect is to avoid too few application programming interfaces for automated testing on the terminal under test. Low efficiency of the organic test questions, so that the number of application programming interfaces from test mode corresponding to the impact.
  • FIG. 1 is a schematic flow chart of an embodiment of a test method of the present invention
  • FIG. 2 is a schematic flow chart of an embodiment manner of step S30 in the embodiment of FIG. 1 in the testing method of the present invention
  • step S50 in the embodiment of FIG. 1 in the testing method of the present invention
  • step S60 is a schematic flow chart of an embodiment of step S60 in the embodiment of FIG. 1 in the testing method of the present invention
  • Figure 5 is a block diagram of an embodiment of a test system of the present invention.
  • FIG. 6 is a block diagram of an embodiment of an extraction module 300 in the embodiment of FIG. 5 in the test system of the present invention
  • FIG. 7 is a block diagram of another embodiment of the extraction module 300 in the embodiment of FIG. 5 in the test system of the present invention.
  • Figure 8 is a block diagram of an embodiment of a test module 500 in the embodiment of Figure 5 in a test system of the present invention
  • FIG. 9 is a block diagram of an embodiment of a report generation module 600 in the embodiment of FIG. 5 in the test system of the present invention.
  • FIG. 10 is a hardware structural diagram of a first embodiment of a test apparatus according to the present invention.
  • Figure 11 is a block diagram showing the hardware configuration of a second embodiment of the test apparatus of the present invention.
  • test system described includes: any terminal used for testing, including but not limited to: a smart terminal such as a personal computer, a smart mobile terminal such as a notebook computer, a smart phone, a tablet computer.
  • a smart terminal such as a personal computer
  • a smart mobile terminal such as a notebook computer
  • a smart phone such as a tablet computer.
  • the embodiment of the present invention does not limit the specific manifestation and specific type of the test system.
  • the invention provides a testing method for automatically performing testing on an application on a terminal under test to improve test accuracy and test efficiency.
  • the test method of the present invention can be implemented as steps S10-S60 as described below:
  • Step S10 The test system performs parameter setting on the test grid used for performing the grid test, and obtains corresponding setting parameters.
  • the test system first performs parameter setting on the test grid, wherein the test grid is used to perform grid test;
  • the parameters set by the test system for the test grid include but are not limited to: size parameters of the test grid For example, test the width and height of the grid, as well as the number of rows and columns of the test grid.
  • the test system can set specific parameters corresponding to the test grid according to the specific test requirements.
  • the specific types and specific parameter values of the set parameters obtained by the test system are not limited in the embodiment of the present invention.
  • Step S20 Simulating a virtual test grid corresponding to the setting parameter for the uppermost layer surface of the tested application operation interface
  • the test system simulates a virtual test grid corresponding to the above set parameters.
  • the virtual test mesh generated by the simulation is composed of a plurality of horizontally evenly distributed virtual straight lines and a plurality of vertically-distributed virtual straight lines, and the number of the horizontal virtual straight lines is The number of rows of the virtual test grid is the same, and the number of the vertical virtual straight lines is consistent with the number of columns of the virtual test grid.
  • Step S30 Extract a preset number of coordinate data in the virtual test grid according to a preset coordinate extraction rule.
  • the test system extracts a preset number of coordinate data from the virtual test grid generated by the simulation. For example, the test system extracts corresponding coordinate data from different positions of the virtual test grid according to the specific type of the tested application; for example, from the top, bottom, left, and right positions of the virtual test grid, respectively. A corresponding number of coordinate data is extracted for subsequent testing work.
  • Step S40 Obtain a configuration file of the tested application from the terminal to be tested, and determine, from the obtained configuration file, area pixel data corresponding to each control of the tested application;
  • the test system obtains the configuration file corresponding to the tested application from the terminal to be tested;
  • the terminal to be tested includes, but is not limited to, a smart mobile terminal such as a mobile phone or the like.
  • the test system determines regional pixel data corresponding to each control of the tested application; wherein each control is: all controls included on the operation interface of the tested application .
  • the display area of one of the controls on the operation interface of the tested application is a rectangular area
  • the horizontal coordinate of the area pixel data of the rectangular area is: from pixel A to pixel B, and the ordinate is from C pixel. Go to the D pixel area.
  • Step S50 Perform testing on the respective controls according to the preset test rules according to the obtained coordinate data and the area pixel data, and obtain test data of the respective controls.
  • the test system tests each control of the tested application according to the preset test rule according to the extracted coordinate data and the area pixel data corresponding to each control of the tested application; for example, according to each control in the tested application The frequency of use within the preset duration, sorting the important levels of each control, and testing each control according to the sorting result; or, according to the position order of each control in the tested application on the operating interface of the tested application, according to The order of the position on the operation interface is from top to bottom, from left to right, and the respective controls are sorted, and each control is tested according to the sorting result.
  • the test system obtains the test data corresponding to each of the above controls.
  • the preset test rule that the test system tests each control on the tested application may be included according to the specific type of the tested application, the specific application scenario, and the operation interface of the tested application.
  • the specific configuration of the preset test rule is not limited in the embodiment of the present invention.
  • Step S60 Generate a test report corresponding to the tested application according to the obtained test data.
  • the test system According to the obtained test data corresponding to each control on the operation interface of the tested application, the test system generates a corresponding test report for the user to view.
  • the test system classifies all the test data corresponding to each of the above controls according to the type of the control, and generates corresponding tests according to the categories; or, the test system respectively tests the test data corresponding to each of the above controls according to whether the test result is abnormal.
  • the test is performed, and the test report corresponding to the test result is normal and the test result is abnormal, and the test report corresponding to the test result and the test report corresponding to the test result abnormality are generated; or, the test system only tests the test result abnormally. Data, generate a corresponding test report.
  • the test method of the present invention performs parameter setting on the test grid for performing grid test through the test system to obtain corresponding setting parameters; and simulates and generates a setting parameter for the uppermost layer surface of the tested application operation interface.
  • Corresponding virtual test grid extracting a preset number of coordinate data in the virtual test grid according to a preset coordinate extraction rule; acquiring a configuration file of the tested application from the tested terminal, and obtaining the configuration file And determining, in the configuration file, area pixel data corresponding to each control of the tested application; and performing, according to the preset test rule, the respective controls according to the acquired coordinate data and the area pixel data.
  • Testing obtaining test data of each of the controls; generating, according to the obtained test data, the corresponding application to be tested Test report; has the beneficial effect of automating the testing of the application on the tested terminal, improving the test accuracy and testing efficiency, and avoiding too few application programming interfaces for automated testing on the tested terminal.
  • the problem of inefficient testing makes the test method unaffected by the number of corresponding application programming interfaces.
  • the testing system can extract a preset number of coordinate data from the simulated virtual test grid according to the embodiment described in FIG. 2 .
  • Step S30 extracting a preset number of coordinate data in the virtual test grid according to a preset coordinate extraction rule
  • steps S301-S302 described below:
  • Step S301 determining that the virtual test grid includes a grid block within a range of pixels of the [X, Y] region; wherein the X and Y are positive integers;
  • Step S302 Perform coordinate extraction from one or more preset positions of the determined grid blocks to obtain a preset number of coordinate data.
  • the test system first determines an area pixel range of the extracted coordinate data in the virtual test grid, and further extracts a preset number of coordinate data based on the confirmed area pixel range.
  • the test system determines the grid blocks contained in the [X, Y] region pixel range in the virtual test grid, and further, from the determined region pixel range in the grid block in the above [X, Y] region. , extracting a preset number of coordinate data.
  • extraction is performed from at least one preset position of the determined respective network blocks.
  • the corresponding coordinate data is extracted from the center position of each grid block, and/or the position of the upper left corner, and/or the position of the upper right corner, and/or the position of the lower left corner, and/or the position of the lower right corner.
  • X and Y are both positive integers.
  • test system can also extract corresponding coordinate data by:
  • the test system directly extracts coordinates from one or more preset positions of the respective grid blocks of the virtual test grid, and extracts a preset number of coordinate data.
  • the preset number is an integer multiple of the number of network blocks in the virtual test grid.
  • the preset quantity is determined according to factors such as the number of controls of the tested application, the type of the tested application, the important level of the tested application, the frequency of use of the tested application, and the like.
  • the specific number of the coordinate data is not limited in the embodiment of the present invention.
  • the test method of the present invention extracts a preset number of coordinate data in the virtual test grid by extracting rules according to different preset coordinates; and has the beneficial effect of further improving the test accuracy.
  • the testing system tests each control on the operating interface of the tested application, which can be implemented by the method described in FIG.
  • Step S50 based on the acquired coordinate data and the area pixel data, according to a preset test rule, the respective controls are entered.
  • the line test obtaining the test data of the respective controls, may be implemented as steps S501-S503 as described below:
  • Step S501 group the extracted coordinate data according to the pixel data of the region
  • the test system first groups the extracted coordinate data according to the area pixel data to which the coordinate data belongs; for example, the coordinate data belonging to the same area pixel data is grouped into the same group, and will belong to different The coordinate data of the area pixel data is divided into different groups.
  • Step S502 Perform a test prioritization for each of the controls according to a preset sorting rule, and obtain respective controls sorted according to the test priority;
  • the grouped coordinate data is further subjected to test prioritization according to a preset sorting rule.
  • the control corresponding to the pixel data of the area with the lower limit of the abscissa is sorted first, and the control corresponding to the pixel data of the area with the lower limit of the vertical coordinate is sorted first.
  • the ordinate lower limit value of the plurality of regional pixel data is continuously compared, and the control corresponding to the pixel data of the region having a lower vertical limit value is ranked first;
  • the plurality of area pixel data having the same vertical axis lower limit value are continuously compared, and the horizontal axis lower limit value of the plurality of area pixel data is continuously compared, and the control corresponding to the area pixel data having the lower horizontal axis lower limit value is sorted first.
  • Step S503 Perform the test on each of the sorted controls one by one according to a preset test rule, and obtain test data corresponding to each of the controls.
  • the test system tests one by one according to the preset test rules. For example, for the click operation of each control, the test reminder information corresponding to “click the A control” is sent to the tested terminal one by one for each of the sorted controls, and the test data corresponding to the control is obtained from the tested terminal; After the corresponding control is tested, according to the sorting, the next control next to the control is continuously tested.
  • the test system sends the test reminder information of the corresponding control to the terminal to be tested one by one according to the test priority order, and identifies whether the test data of the corresponding control is obtained from the tested terminal. If the test data of the corresponding control is obtained from the terminal to be tested, the test reminder information is sent according to the test priority order for the control arranged after the corresponding control sequence; if the test is not identified Obtaining test data of the corresponding control from the terminal to be tested, and continuing to acquire test data of the corresponding control from the terminal to be tested.
  • the test system sends the test reminder information of the corresponding control to the terminal to be tested one by one according to the test priority order, for example, the test reminder information is “Please click the A control”; the operator According to the above test reminding information, a click operation is performed on the A control; if the test system obtains the test data of the A control, the test is sent according to the above test priority order, and the test is sent for the control immediately following the order of the A control. Reminding information; if the test system does not obtain the test data of the A control, the test system continues to obtain the test data corresponding to the A control from the tested terminal.
  • the test reminder information is “Please click the A control”
  • the operator According to the above test reminding information, a click operation is performed on the A control; if the test system obtains the test data of the A control, the test is sent according to the above test priority order, and the test is sent for the control immediately following the order of the A control. Reminding information; if the test system does not obtain the test data of the A
  • the test method of the present invention tests the respective controls according to the preset test rules according to the acquired coordinate data and the area pixel data, and obtains test data of the respective controls; and has the beneficial test according to the priority test level of the control.
  • the effect is to improve the intelligence of the test.
  • the testing system can generate a test report corresponding to the tested application according to the manner described in FIG.
  • Step S60 generating a test report corresponding to the tested application according to the obtained test data
  • steps S601-S603 may be implemented as the following steps.
  • Step S601 Match the test data corresponding to each acquired control with the corresponding area pixel data in the configuration file;
  • Step S602 If the test data corresponding to the control does not match the corresponding area pixel data in the configuration file, determine that the control is a test abnormal control;
  • Step S603 Generate a corresponding test report for the determined test abnormality control; wherein the test report includes the determined list information of the test abnormality control.
  • the test system performs, according to the test data corresponding to each control acquired from the terminal under test, the test data corresponding to the control and the corresponding region pixel data in the configuration file of the tested application corresponding to the control. Matching; for example, the test system determines whether the coordinate data in the test data belongs to the corresponding area pixel data. If the test data corresponding to the control does not match the corresponding area pixel data in the configuration file, the test system determines that the control is a test abnormal control, and generates a corresponding test report for the determined test abnormal control; the test report includes the determination The list information of the test exception control.
  • the test report generated by the test system may be named according to a specific test operation corresponding to each control on the operation interface of the tested application; for example, for each control on the interface of the tested application operation interface Click on the action and the generated test report is the control click on the test report.
  • the test method of the present invention generates a test report corresponding to the tested application according to the obtained test data; and has the beneficial effect that the corresponding test report can be generated according to the specific test data, thereby improving the flexibility of the test report generation.
  • the present invention also provides a test system suitable for the test system described in any of the above embodiments of FIG. 1, FIG. 2, FIG. 3 and FIG.
  • the test system of the present invention includes: a setting module 100, a mesh generation module 200, an extraction module 300, an acquisition module 400, a test module 500, and a report generation module 600; wherein:
  • the setting module 100 is configured to perform parameter setting on the test grid used for performing the grid test, and obtain corresponding setting parameters;
  • a mesh generation module 200 configured to generate a virtual test grid corresponding to the setting parameter for an upper layer surface of the tested application operation interface
  • the extracting module 300 is configured to extract a preset number of coordinate data in the virtual test grid according to a preset coordinate extraction rule
  • An obtaining module 400 configured to acquire a configuration file of the tested application from the terminal to be tested, and Determining, from the obtained configuration file, area pixel data corresponding to each control of the tested application;
  • the test module 500 is configured to test the respective controls according to the preset test rules according to the acquired coordinate data and the area pixel data, and obtain test data of the respective controls;
  • the report generation module 600 is configured to generate a test report corresponding to the tested application according to the obtained test data.
  • the extraction module 300 in the test system of the present invention includes:
  • the extracting unit 310 is configured to perform coordinate extraction from one or more preset positions of the respective grid blocks of the virtual test grid to obtain a preset number of coordinate data; wherein the preset quantity is the virtual quantity Test an integer multiple of the number of network blocks in the grid;
  • the extraction module 300 in the test system of the present invention further includes:
  • a determining unit 320 configured to determine that the virtual test grid includes a grid block within a range of pixels of the [X, Y] region; wherein the X and Y are positive integers;
  • the extracting unit 310 is further configured to: perform coordinate extraction from one or more preset positions of the determined grid blocks to obtain a preset number of coordinate data.
  • test module 500 in the test system of the present invention includes:
  • a grouping unit 510 configured to group the extracted coordinate data according to the pixel data of the region
  • the sorting unit 520 is configured to perform test prioritization for the respective controls according to a preset sorting rule, and obtain respective controls sorted according to the test priority;
  • the testing unit 530 is configured to test each of the sorted controls one by one according to a preset test rule, and obtain test data corresponding to each of the controls.
  • the testing unit 530 is further configured to:
  • test reminder information is sent according to the test priority ordering for the control arranged after the corresponding control sequence
  • test data of the corresponding control is not obtained from the terminal under test, the test data of the corresponding control is continuously obtained from the terminal to be tested.
  • the report generation module 600 in the test system of the present invention includes:
  • the matching unit 610 is configured to match the acquired test data corresponding to each control with the corresponding regional pixel data in the configuration file;
  • the generating unit 620 is configured to:
  • test data corresponding to the control does not match the corresponding area pixel data in the configuration file, Then determine that the control is a test exception control
  • test report includes the determined list information of the test exception control.
  • the test system of the present invention obtains corresponding setting parameters by parameter setting the test grid used for performing grid test; and for the uppermost layer surface of the tested application operation interface, the simulation generates a corresponding parameter corresponding to the setting parameter.
  • a virtual test grid extracting a preset number of coordinate data in the virtual test grid according to a preset coordinate extraction rule; acquiring a configuration file of the tested application from the terminal to be tested, and obtaining the configuration file Determining, in the configuration file, the area pixel data corresponding to each control of the tested application; and based on the obtained coordinate data and the area pixel data, testing the respective controls according to a preset test rule, Obtaining test data of each of the controls; generating a test report corresponding to the tested application according to the obtained test data; having automated execution testing the application on the tested terminal, improving test accuracy and test efficiency
  • the beneficial effect is to avoid the application programming interface for automated testing on the terminal under test. , The low efficiency caused by the test, such that the number of application programming interfaces from test mode corresponding
  • the above setting module 100, the grid generating module 200, the extracting module 300, the obtaining module 400, the testing module 500, the report generating module 600, and the like may be embedded in or independent of the testing device in hardware, or may be
  • the software form is stored in the memory of the test device, so that the processor calls to perform the operations corresponding to the above various modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • FIG. 10 is a hardware structural diagram of a first embodiment of a test device according to the present invention.
  • the test device includes a processing unit 10, and a test system 11 connected to the processing unit 10, and inputs/ The output unit 12, the communication unit 13, the storage unit 14, and the display unit 15.
  • the input/output unit 12 may be one or more physical buttons and/or a mouse and/or an operating lever for inputting a user command and outputting response data of the test device to the input user command;
  • the communication unit 13 is communicatively coupled to one or more predetermined terminals (eg, mobile phones, tablets, etc.) or a background server, and the communication unit 13 may include a wifi module (which can communicate with the background server via the mobile Internet via the wifi module), The Bluetooth module (which can communicate with the mobile phone via the Bluetooth module) and/or the GPRS module (via the GPRS module can communicate with the backend server via the mobile internet).
  • a wifi module which can communicate with the background server via the mobile Internet via the wifi module
  • the Bluetooth module which can communicate with the mobile phone via the Bluetooth module
  • the GPRS module via the GPRS module can communicate with the backend server via the mobile internet.
  • the storage unit 14 may include a storage space or a collection of a plurality of storage spaces for storing the test system 11 and the operational data of the test system 11;
  • the display unit 15 is configured to display a human-computer interaction interface for the user to input an instruction, and output response data indicating the test device to the user instruction;
  • the processing unit 10 is configured to invoke and execute the test system 11 to perform the following steps:
  • the simulation For the top layer surface of the tested application interface, the simulation generates one and the set Setting a virtual test grid corresponding to the parameter;
  • the test system 11 is composed of a series of program codes or code instructions that can be called by the processing unit 10 and execute functions corresponding to the included program code or code instructions.
  • the processing unit 10 calls and executes the test system 11, and extracts a preset number of coordinate data in the virtual test grid according to a preset coordinate extraction rule, including:
  • the virtual test grid comprises a grid block within a range of pixels of the [X, Y] region; wherein the X and Y are both positive integers;
  • Coordinate extraction is performed from one or more preset positions of the determined grid blocks to obtain a preset number of coordinate data.
  • the processing unit 10 calls and executes the test system 11, and based on the acquired coordinate data and the area pixel data, tests the respective controls according to a preset test rule, and obtains tests of the respective controls.
  • Data including:
  • each of the sorted controls is tested one by one, and the test data corresponding to each of the controls is obtained.
  • the processing unit 10 invokes and executes the test system 11, and the test is performed one by one according to the preset test rule, and the test data corresponding to each control is obtained, including:
  • test reminder information is sent according to the test priority ordering for the control arranged after the corresponding control sequence
  • test data of the corresponding control is not obtained from the terminal under test, the test data of the corresponding control is continuously obtained from the terminal to be tested.
  • the processing unit 10 calls and executes the test system 11, and the test report corresponding to the tested application is generated according to the obtained test data, including:
  • test data corresponding to the control does not match the corresponding area pixel data in the configuration file, determine that the control is a test abnormal control
  • test report includes the determined list information of the test exception control.
  • FIG. 11 is a hardware structural diagram of a second embodiment of a test device according to the present invention.
  • the test device is basically similar to the test device in the first embodiment, and the main difference is that touch is adopted.
  • the input/display unit 17 is substituted for the input/output unit 12 and the display unit 15 in the test apparatus.
  • the touch input/display unit 17 is configured to provide a human-machine interaction interface for the user to input an instruction based on the human-computer interaction interface, and output a response data indicating the test device to the user instruction.
  • the touch input/display unit 17 includes a touch input unit and a display unit, and the touch input unit is used for touch input in the touch sensing area of the human-machine interaction interface.
  • the display unit is a display unit with a touch panel.
  • the human-computer interaction interface includes one or more virtual keys (not shown), which have the same functions as the physical keys in the first embodiment of the present invention, and are not described here. Additionally, it will be appreciated that any of the physical keys and/or mouse and/or joysticks in the first embodiment may be replaced with virtual keys on the touch input/display unit 17.
  • the present invention provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the following steps:
  • the pre-preparation is extracted in the virtual test grid according to a preset coordinate extraction rule Set the number of coordinate data, including:
  • the virtual test grid comprises a grid block within a range of pixels of the [X, Y] region; wherein the X and Y are both positive integers;
  • Coordinate extraction is performed from one or more preset positions of the determined grid blocks to obtain a preset number of coordinate data.
  • the acquiring, according to the preset test rule, the testing of the respective controls based on the acquired coordinate data and the area pixel data, and acquiring test data of the respective controls including:
  • each of the sorted controls is tested one by one, and the test data corresponding to each of the controls is obtained.
  • the each of the sorted controls is tested one by one according to a preset test rule, and the test data corresponding to each of the controls is obtained, including:
  • test reminder information is sent according to the test priority ordering for the control arranged after the corresponding control sequence
  • test data of the corresponding control is not obtained from the terminal under test, the test data of the corresponding control is continuously obtained from the terminal to be tested.
  • the generating, according to the obtained test data, a test report corresponding to the tested application including:
  • test data corresponding to the control does not match the corresponding area pixel data in the configuration file, determine that the control is a test abnormal control
  • test report includes the determined list information of the test exception control.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)
  • User Interface Of Digital Computer (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开一种测试方法、系统、设备及可读存储介质,对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;根据获取的所述测试数据,生成所述被测应用程序对应的测试报告;提高了测试准确率和测试效率。

Description

测试方法、系统、设备及可读存储介质 技术领域
本发明涉及自动化测试技术领域,尤其涉及一种测试方法、系统、设备及可读存储介质。
背景技术
随着通信技术的不断发展进步,各种智能移动终端在人们的日常工作、生活和学习中所占据的地位也越来越重,例如,智能手机,几乎人人都在使用,而平板电脑也在日渐普及。用户根据自身需求,可以在移动终端中安装多种不同的应用程序(Applications,APP),以享用不同的业务和服务。
目前,很多智能移动终端例如手机的操作系统比较封闭,用于用户界面(User Interface,UI)自动化测试的应用程序编程接口(Application Programming Interface,API)太少,而且点击效率不高,使得对手机上安装的应用程序的测试准确性不高,且测试效率低。
发明内容
鉴于以上内容,有必要提供一种测试方法、系统、设备及可读存储介质,用以:自动化执行对被测终端上的应用程序进行测试,提高测试准确率和测试效率。
一种测试方法,包括以下步骤:
测试系统对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
一种测试系统,所述测试系统包括:
设置模块,用于对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
网格生成模块,用于针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
提取模块,用于按照预设坐标提取规则,在所述虚拟测试网格内提取出 预设数量的坐标数据;
获取模块,用于从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
测试模块,用于基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
报告生成模块,用于根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
一种测试设备,该测试设备包括处理单元,及与该处理单元连接的测试系统、输入/输出单元、通信单元及存储单元;
该输入/输出单元用于输入用户指令,并输出测试设备对输入的用户指令的响应数据;
该通信单元用于与预先确定的终端或后台服务器通信连接;
该存储单元用于存储该测试系统,及该测试系统的运行数据;
该处理单元用于调用并执行该测试系统,以执行如下步骤:
对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现以下步骤:
对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
本发明一种测试方法、系统、设备及可读存储介质可以达到如下有益效果:
通过测试系统对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;根据获取的所述测试数据,生成所述被测应用程序对应的测试报告;具有自动化执行对被测终端上的应用程序进行测试、提高测试准确率和测试效率的有益效果,避免了因被测终端上用于自动化测试的应用程序编程接口太少,而导致的测试效率低下的问题,使得测试方式不受对应的应用程序编程接口数量的影响。
附图说明
图1是本发明测试方法的一种实施方式的流程示意图;
图2是本发明测试方法中,图1所述实施例中步骤S30的一种实施例方式的流程示意图;
图3是本发明测试方法中,图1所述实施例中步骤S50的一种实施方式的流程示意图;
图4是本发明测试方法中,图1所述实施例中步骤S60的一种实施方式的流程示意图;
图5是本发明测试系统的一种实施例方式的框图;
图6是本发明测试系统中,图5所述实施例中提取模块300的一种实施方式的框图;
图7是本发明测试系统中,图5所述实施例中提取模块300的另一种实施方式的框图;
图8是本发明测试系统中,图5所述实施例中测试模块500的一种实施方式的框图;
图9是本发明测试系统中,图5所述实施例中报告生成模块600的一种实施方式的框图;
图10是本发明测试设备第一实施例的硬件结构图;
图11是本发明测试设备第二实施例的硬件结构图。
本发明实施例目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
以下结合说明书附图及具体实施例进一步说明本发明的技术方案。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明测试方法及测试系统的下述实施例中,所描述的测试系统包括:测试使用的任何终端,包括但不限于:智能终端如个人计算机,智能移动终端如笔记本电脑、智能手机、平板电脑等;本发明实施例对测试系统的具体表现形式和具体类型不做限定。
本发明提供了一种测试方法,用以:自动化执行对被测终端上的应用程序进行测试,提高测试准确率和测试效率。如图1所示,本发明测试方法可以实施为如下描述的步骤S10-S60:
步骤S10、测试系统对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
本发明实施例中,测试系统首先对测试网格进行参数设置,其中上述测试网格用于进行网格测试;测试系统为上述测试网格设置的参数包括但不限于:测试网格的尺寸参数,例如:测试网格的宽度和高度,以及测试网格的行数和列数等。
测试系统可以根据具体的测试需求来设置测试网格所对应的具体参数,本发明实施例对测试系统得到的设置参数的具体类型和具体参数值,不进行限定。
步骤S20、针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
针对被测应用程序操作界面上的最上层图层表面,测试系统模拟生成一个与上述设置参数相对应的虚拟测试网格。其中,模拟生成的上述虚拟测试网格由:多个横向均匀分布的虚拟直线和多个纵向均匀分布的虚拟直线交汇而成的多个网格块组成,所述横向的虚拟直线的个数与所述虚拟测试网格的行数一致,所述纵向的虚拟直线的个数与所述虚拟测试网格的列数一致。
步骤S30、按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
按照预先设置好的坐标提取规则,测试系统从模拟生成的上述虚拟测试网格内提取出预设数量的坐标数据。例如,测试系统根据被测应用程序的具体类型,分别从上述虚拟测试网格的不同位置提取出对应的坐标数据;比如,分别从上述虚拟测试网格的上下左右和中央这五处位置处,提取出对应数量的坐标数据,用于后续的测试工作。
步骤S40、从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
测试系统从被测终端中获取上述被测应用程序所对应的配置文件;其中, 所述被测终端包括但不限于智能移动终端如手机等。基于提取出的配置文件,测试系统确定出该被测应用程序的各个控件所分别对应的区域像素数据;其中,所述各个控件为:所述被测应用程序的操作界面上所包含的所有控件。比如,其中某一个控件在被测应用程序的操作界面上的显示区域为一个矩形区域,该矩形区域的区域像素数据的横坐标为:从像素A到像素B区域,其纵坐标为从C像素到D像素区域。
步骤S50、基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
测试系统根据提取出的坐标数据和被测应用程序各个控件所分别对应的区域像素数据,对被测应用程序的各个控件按照预设测试规则进行测试;例如,根据被测应用程序中各个控件在预设时长内的使用频率,对各个控件进行重要等级排序,并按照排序结果对各个控件进行测试;或者,根据被测应用程序中各个控件在该被测应用程序操作界面上的位置顺序,按照操作界面上位置顺序的由上到下、由左到右,对各个控件进行排序,并按照排序结果对各个控件进行测试等。
根据对上述被测应用程序上各个控件的测试情况,测试系统获取上述各个控件所分别对应的测试数据。
本发明实施例中,测试系统对被测应用程序上的各个控件进行测试的预设测试规则,可以根据被测应用程序的具体类型和具体应用场景以及被测应用程序的操作界面上所包括的控件,进行具体配置,本发明实施例对上述预设测试规则的具体规则内容,不做限定。
步骤S60、根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
根据获取的被测应用程序操作界面上各个控件所分别对应的测试数据,测试系统生成对应的测试报告,供用户查看。
例如,测试系统将上述每个控件分别对应的所有测试数据,按照控件类型进行分类,按照类别生成对应的测试包括;或者,测试系统将上述每个控件分别对应的测试数据,按照测试结果是否异常进行分类,将测试结果正常和测试结果异常所分别对应的控件,生成测试结果正常对应的测试报告和测试结果异常对应的测试报告;或者,测试系统仅将上述测试结果异常的控件所对应的测试数据,生成对应的测试报告。
本发明测试方法通过测试系统对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;根据获取的所述测试数据,生成所述被测应用程序对应 的测试报告;具有自动化执行对被测终端上的应用程序进行测试、提高测试准确率和测试效率的有益效果,避免了因被测终端上用于自动化测试的应用程序编程接口太少,而导致的测试效率低下的问题,使得测试方式不受对应的应用程序编程接口数量的影响。
基于图1所述实施例的描述,本发明测试方法中,测试系统可以按照图2所述的实施方式,从模拟生成的虚拟测试网格内提取出预设数量的坐标数据。
如图2所示,本发明测试方法中,图1所述实施例中“步骤S30、按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据”,可以实施为如下描述的步骤S301-S302:
步骤S301、确定出所述虚拟测试网格包含在[X,Y]区域像素范围内的网格块;其中,所述X和Y均为正整数;
步骤S302、从确定出的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据。
本发明实施例中,测试系统先确定出提取的坐标数据在虚拟测试网格中的区域像素范围,进而基于确认的区域像素范围,来提取预设数量的坐标数据。
例如,测试系统确定出在虚拟测试网格内包含在[X,Y]区域像素范围内的网格块,进而,从确定的区域像素范围在上述[X,Y]区域内的网格块中,提取出预设数量的坐标数据。在提取坐标数据时,从确定的上述各个网络块的至少一个预设位置处进行提取。例如,从每一个网格块的中心位置处、及/或左上角位置处、及/或右上角位置处、及/或左下角位置处、及/或右下角位置处,提取对应的坐标数据。本发明实施例中,X、Y均为正整数。
在本发明一优选实施例中,测试系统还可以通过下述方式来提取出对应的坐标数据:
测试系统直接从虚拟测试网格的各个网格块的一个或者多个预设位置处进行坐标提取,提取出预设数量的坐标数据。其中,上述预设数量为该虚拟测试网格中网络块数量的整数倍。
本发明实施例中,所述预设数量根据被测应用程序的控件数量和被测应用程序的类型、被测应用程序的重要等级、被测应用程序的使用频率等因素,来确定所提取的坐标数据的具体数量,本发明实施例对预设数量的具体取值不做限定。
本发明测试方法通过按照不同的预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;具有进一步提高测试准确率的有益效果。
基于图1、图2所述实施例的描述,本发明测试方法中,测试系统对被测应用程序操作界面上的各个控件进行测试,可以通过图3所描述的方式实现。
如图3所示,本发明测试方法中,图1所述实施例中“步骤S50、基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进 行测试,获取所述各个控件的测试数据”,可以实施为如下描述的步骤S501-S503:
步骤S501、将提取出的所述坐标数据按照所属的区域像素数据进行分组;
本发明实施例中,测试系统首先将提取出的坐标数据进行分组,分组依据为:上述坐标数据所属的区域像素数据;例如,将属于同一区域像素数据的坐标数据分到同一组,将属于不同区域像素数据的坐标数据分到不同的组。
步骤S502、按照预设排序规则,为所述各个控件进行测试优先级排序,得到按照所述测试优先级排序后的各个控件;
对上述坐标数据进行分组后,对分组后的坐标数据再按照预设的排序规则,对上述各个控件进行测试优先级排序。
例如,将横坐标下限值较小的区域像素数据对应的控件排序在前,纵坐标下限值较小的区域像素数据对应的控件排序在前。针对横坐标下限值若一致的多个区域像素数据,继续比较所述多个区域像素数据的纵坐标下限值大小,纵坐标下限值较小的区域像素数据对应的控件排序在前;针对纵坐标下限值若一致的多个区域像素数据,继续比较所述多个区域像素数据的横坐标下限值大小,横坐标下限值较小的区域像素数据对应的控件排序在前。
步骤S503、按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据。
针对排序后的各个控件,测试系统按照预设测试规则,逐个进行测试。例如,针对各个控件的点击操作进行测试,则针对排序后的各个控件逐个发送对应的“请点击A控件”的测试提醒信息至被测终端,并从被测终端获取该控件对应的测试数据;待该对应控件测试完成后,按照排序,对紧挨着该控件的下一个控件继续进行测试。
在本发明一优选的实施例中,测试系统按照所述测试优先级排序逐个向被测终端发送对应控件的测试提醒信息,并识别是否从所述被测终端获取到所述对应控件的测试数据;若识别出从所述被测终端获取到所述对应控件的测试数据,则按照所述测试优先级排序针对排在所述对应控件顺序后的控件发送所述测试提醒信息;若识别出未从所述被测终端获取到所述对应控件的测试数据,则继续从所述被测终端获取所述对应控件的测试数据。
例如,在针对各控件的点击操作的具体测试环境中,测试系统按照测试优先级排序逐个向被测终端发送对应控件的测试提醒信息,比如上述测试提醒信息为“请点击A控件”;操作人员按照上述测试提醒信息,针对该A控件进行点击操作;若测试系统获取到该A控件的测试数据,则按照上述测试优先级排序继续针对紧挨着该A控件的顺序在后的控件发送上述测试提醒信息;若测试系统未获取到该A控件的测试数据,则测试系统继续从所述被测终端获取该A控件对应的测试数据。
本发明测试方法通过基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;具有根据控件优先测试等级进行测试的有益效果,提高了测试的智能性。
基于图1、图2和图3所述实施例的描述,本发明测试方法中,测试系统可以按照图4所描述的方式来生成被测应用程序对应的测试报告。
如图4所示,本发明测试方法中,图1所述实施例中“步骤S60、根据获取的所述测试数据,生成所述被测应用程序对应的测试报告”可以实施为如下描述的步骤S601-S603:
步骤S601、将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
步骤S602、若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
步骤S603、为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
本发明实施例中,测试系统根据从被测终端获取到的各个控件所分别对应的测试数据,将控件对应的测试数据与该控件对应的被测应用程序的配置文件中对应的区域像素数据进行匹配;例如,测试系统判断上述测试数据中的坐标数据是否属于对应区域像素数据。若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则测试系统确定该控件为测试异常控件,并为确定的测试异常控件生成对应的测试报告;该测试报告中包含了确定的所述测试异常控件的列表信息。
在本发明一优选的实施例中,测试系统生成的测试报告可以根据对被测应用程序操作界面上各控件对应的具体测试操作,来命名;例如,针对被测应用程序操作界面上各控件的点击操作,则生成的测试报告为控件点击测试报告。
本发明测试方法通过根据获取的所述测试数据,生成所述被测应用程序对应的测试报告;具有可根据具体测试数据生成对应的测试报告的有益效果,提高了测试报告生成的灵活性。
对应于以上实施例所描述的测试方法,本发明还提供了一种测试系统,所述测试系统适用于上述图1、图2、图3和图4任一实施例所描述的测试系统。
如图5所示,本发明测试系统包括:设置模块100、网格生成模块200、提取模块300、获取模块400、测试模块500和报告生成模块600;其中:
设置模块100,用于对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
网格生成模块200,用于针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
提取模块300,用于按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
获取模块400,用于从被测终端中获取所述被测应用程序的配置文件,并 从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
测试模块500,用于基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
报告生成模块600,用于根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
在本发明一优选的实施例中,如图6所示,本发明测试系统中所述提取模块300包括:
提取单元310,用于从所述虚拟测试网格的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据;其中,所述预设数量为所述虚拟测试网格中网络块数量的整数倍;
在本发明一优选的实施例中,如图7所示,本发明测试系统中所述提取模块300还包括:
确定单元320,用于确定出所述虚拟测试网格包含在[X,Y]区域像素范围内的网格块;其中,所述X和Y均为正整数;
本发明实施例中,所述提取单元310还用于:从确定出的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据。
在本发明一优选的实施例中,如图8所示,本发明测试系统中所述测试模块500包括:
分组单元510,用于将提取出的所述坐标数据按照所属的区域像素数据进行分组;
排序单元520,用于按照预设排序规则,为所述各个控件进行测试优先级排序,得到按照所述测试优先级排序后的各个控件;
测试单元530,用于按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据。
在本发明一优选的实施例中,所述测试单元530还用于:
按照所述测试优先级排序逐个向被测终端发送对应控件的测试提醒信息,并识别是否从所述被测终端获取到所述对应控件的测试数据;
若识别出从所述被测终端获取到所述对应控件的测试数据,则按照所述测试优先级排序针对排在所述对应控件顺序后的控件发送所述测试提醒信息;
若识别出未从所述被测终端获取到所述对应控件的测试数据,则继续从所述被测终端获取所述对应控件的测试数据。
在本发明一优选的实施例中,如图9所示,本发明测试系统中所述报告生成模块600包括:
匹配单元610,用于将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
生成单元620,用于:
若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配, 则确定该控件为测试异常控件;
为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
本发明测试系统通过对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;根据获取的所述测试数据,生成所述被测应用程序对应的测试报告;具有自动化执行对被测终端上的应用程序进行测试、提高测试准确率和测试效率的有益效果,避免了因被测终端上用于自动化测试的应用程序编程接口太少,而导致的测试效率低下的问题,使得测试方式不受对应的应用程序编程接口数量的影响。
在硬件实现上,以上设置模块100、网格生成模块200、提取模块300、获取模块400、测试模块500和报告生成模块600等可以以硬件形式内嵌于或独立于测试设备中,也可以以软件形式存储于测试设备的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。
如图10所示,图10为本发明测试设备第一实施例的硬件结构图,在本实施例中,该测试设备包括处理单元10,及与该处理单元10连接的测试系统11、输入/输出单元12、通信单元13、存储单元14及显示单元15。
该输入/输出单元12可以是一个或多个物理按键和/或鼠标和/或操作杆,用于输入用户指令,并输出测试设备对输入的用户指令的响应数据;
该通信单元13与一个或者多个预先确定的终端(例如,手机、平板电脑等)或后台服务器通信连接,该通信单元13可以包括wifi模块(通过wifi模块可以经移动互联网与后台服务器通信)、蓝牙模块(通过蓝牙模块可以与手机进行近距离通信)及/或GPRS模块(通过GPRS模块可以经移动互联网与后台服务器通信)。
该存储单元14可以包括一个存储空间或者为多个存储空间的集合,用于存储该测试系统11,及该测试系统11的运行数据;
该显示单元15用于显示人机交互界面,以供用户输入指令,且输出显示该测试设备对用户指令的响应数据;
该处理单元10用于调用并执行该测试系统11,以执行如下步骤:
对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设 置参数对应的虚拟测试网格;
按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
其中,该测试系统11由一系列程序代码或者代码指令组成,其可以被处理单元10调用并执行与所包含的程序代码或者代码指令对应的功能。
优选地,该处理单元10调用并执行该测试系统11,所述按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据,包括:
从所述虚拟测试网格的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据;其中,所述预设数量为所述虚拟测试网格中网络块数量的整数倍;
或者:
确定出所述虚拟测试网格包含在[X,Y]区域像素范围内的网格块;其中,所述X和Y均为正整数;
从确定出的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据。
优选地,该处理单元10调用并执行该测试系统11,所述基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据,包括:
将提取出的所述坐标数据按照所属的区域像素数据进行分组;
按照预设排序规则,为所述各个控件进行测试优先级排序,得到按照所述测试优先级排序后的各个控件;
按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据。
优选地,该处理单元10调用并执行该测试系统11,所述按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据,包括:
按照所述测试优先级排序逐个向被测终端发送对应控件的测试提醒信息,并识别是否从所述被测终端获取到所述对应控件的测试数据;
若识别出从所述被测终端获取到所述对应控件的测试数据,则按照所述测试优先级排序针对排在所述对应控件顺序后的控件发送所述测试提醒信息;
若识别出未从所述被测终端获取到所述对应控件的测试数据,则继续从所述被测终端获取所述对应控件的测试数据。
优选地,该处理单元10调用并执行该测试系统11,所述根据获取的所述测试数据,生成所述被测应用程序对应的测试报告,包括:
将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
如图11所示,图11为本发明测试设备第二实施例的硬件结构图,在本实施例中,该测试设备与第一实施例中的测试设备基本相似,主要区别在于:采用触控输入/显示单元17来代替测试设备中的输入/输出单元12和显示单元15。
该触控输入/显示单元17用于提供人机交互界面,以供用户基于该人机交互界面触控式输入指令,且输出显示该测试设备对用户指令的响应数据。在本实施例中,该触控输入/显示单元17包括触控输入单元和显示单元,所述触控输入单元用于在所述人机交互界面的触控感应区的触控式输入,所述显示单元为带触控面板的显示单元。该人机交互界面包括一个或多个虚拟按键(图中未示出),所述虚拟按键与本发明第一实施例中的物理按键的功能相同,在此不在累述。另外,可以理解,所述第一实施例中的任何物理按键和/或鼠标和/或操作杆均可采用触控输入/显示单元17上的虚拟按键替代。
本发明提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现以下步骤:
对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
优选地,所述按照预设坐标提取规则,在所述虚拟测试网格内提取出预 设数量的坐标数据,包括:
从所述虚拟测试网格的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据;其中,所述预设数量为所述虚拟测试网格中网络块数量的整数倍;
或者:
确定出所述虚拟测试网格包含在[X,Y]区域像素范围内的网格块;其中,所述X和Y均为正整数;
从确定出的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据。
优选地,所述基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据,包括:
将提取出的所述坐标数据按照所属的区域像素数据进行分组;
按照预设排序规则,为所述各个控件进行测试优先级排序,得到按照所述测试优先级排序后的各个控件;
按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据。
优选地,所述按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据,包括:
按照所述测试优先级排序逐个向被测终端发送对应控件的测试提醒信息,并识别是否从所述被测终端获取到所述对应控件的测试数据;
若识别出从所述被测终端获取到所述对应控件的测试数据,则按照所述测试优先级排序针对排在所述对应控件顺序后的控件发送所述测试提醒信息;
若识别出未从所述被测终端获取到所述对应控件的测试数据,则继续从所述被测终端获取所述对应控件的测试数据。
优选地,所述根据获取的所述测试数据,生成所述被测应用程序对应的测试报告,包括:
将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
需要说明的是,在本文中,术语“包括”、“包含”或者任何其他带有非 排他性涵盖意义的词语,其作用是表明包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
以上所述仅为本发明的优选实施例,并非因此限制其专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,直接或间接运
用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (22)

  1. 一种测试方法,其特征在于,包括以下步骤:
    测试系统对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
    针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
    按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
    从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
    基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
    根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
  2. 如权利要求1所述的测试方法,其特征在于,所述按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据,包括:
    从所述虚拟测试网格的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据;其中,所述预设数量为所述虚拟测试网格中网络块数量的整数倍;
    或者:
    确定出所述虚拟测试网格包含在[X,Y]区域像素范围内的网格块;其中,所述X和Y均为正整数;
    从确定出的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据。
  3. 如权利要求1所述的测试方法,其特征在于,所述基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据,包括:
    将提取出的所述坐标数据按照所属的区域像素数据进行分组;
    按照预设排序规则,为所述各个控件进行测试优先级排序,得到按照所述测试优先级排序后的各个控件;
    按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据。
  4. 如权利要求3所述的测试方法,其特征在于,所述按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据,包括:
    按照所述测试优先级排序逐个向被测终端发送对应控件的测试提醒信息,并识别是否从所述被测终端获取到所述对应控件的测试数据;
    若识别出从所述被测终端获取到所述对应控件的测试数据,则按照所述测试优先级排序针对排在所述对应控件顺序后的控件发送所述测试提醒信息;
    若识别出未从所述被测终端获取到所述对应控件的测试数据,则继续从所述被测终端获取所述对应控件的测试数据。
  5. 如权利要求1所述的测试方法,其特征在于,所述根据获取的所述测试数据,生成所述被测应用程序对应的测试报告,包括:
    将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  6. 如权利要求2所述的测试方法,其特征在于,所述根据获取的所述测试数据,生成所述被测应用程序对应的测试报告,包括:
    将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  7. 如权利要求3所述的测试方法,其特征在于,所述根据获取的所述测试数据,生成所述被测应用程序对应的测试报告,包括:
    将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  8. 如权利要求4所述的测试方法,其特征在于,所述根据获取的所述测试数据,生成所述被测应用程序对应的测试报告,包括:
    将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  9. 一种测试系统,其特征在于,所述测试系统包括:
    设置模块,用于对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
    网格生成模块,用于针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
    提取模块,用于按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
    获取模块,用于从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
    测试模块,用于基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
    报告生成模块,用于根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
  10. 如权利要求9所述的测试系统,其特征在于,所述提取模块包括:
    提取单元,用于从所述虚拟测试网格的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据;其中,所述预设数量为所述虚拟测试网格中网络块数量的整数倍;
    或者:
    所述提取模块还包括:
    确定单元,用于确定出所述虚拟测试网格包含在[X,Y]区域像素范围内的网格块;其中,所述X和Y均为正整数;
    所述提取单元还用于:从确定出的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据。
  11. 如权利要求9所述的测试系统,其特征在于,所述测试模块包括:
    分组单元,用于将提取出的所述坐标数据按照所属的区域像素数据进行分组;
    排序单元,用于按照预设排序规则,为所述各个控件进行测试优先级排序,得到按照所述测试优先级排序后的各个控件;
    测试单元,用于按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据。
  12. 如权利要求11所述的测试系统,其特征在于,所述测试单元还用于:
    按照所述测试优先级排序逐个向被测终端发送对应控件的测试提醒信 息,并识别是否从所述被测终端获取到所述对应控件的测试数据;
    若识别出从所述被测终端获取到所述对应控件的测试数据,则按照所述测试优先级排序针对排在所述对应控件顺序后的控件发送所述测试提醒信息;
    若识别出未从所述被测终端获取到所述对应控件的测试数据,则继续从所述被测终端获取所述对应控件的测试数据。
  13. 如权利要求9所述的测试系统,其特征在于,所述报告生成模块包括:
    匹配单元,用于将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
    生成单元,用于:
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  14. 如权利要求10所述的测试系统,其特征在于,所述报告生成模块包括:
    匹配单元,用于将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
    生成单元,用于:
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  15. 如权利要求11所述的测试系统,其特征在于,所述报告生成模块包括:
    匹配单元,用于将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
    生成单元,用于:
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  16. 如权利要求12所述的测试系统,其特征在于,所述报告生成模块包括:
    匹配单元,用于将获取的各个控件对应的测试数据与所述配置文件中对 应的区域像素数据进行匹配;
    生成单元,用于:
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  17. 一种测试设备,其特征在于,该测试设备包括处理单元,及与该处理单元连接的测试系统、输入/输出单元、通信单元及存储单元;
    该输入/输出单元用于输入用户指令,并输出测试设备对输入的用户指令的响应数据;
    该通信单元用于与预先确定的终端或后台服务器通信连接;
    该存储单元用于存储该测试系统,及该测试系统的运行数据;
    该处理单元用于调用并执行该测试系统,以执行如下步骤:
    对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
    针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
    按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
    从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
    基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
    根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
  18. 如权利要求17所述的测试设备,其特征在于,所述按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据,包括:
    从所述虚拟测试网格的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据;其中,所述预设数量为所述虚拟测试网格中网络块数量的整数倍;
    或者:
    确定出所述虚拟测试网格包含在[X,Y]区域像素范围内的网格块;其中,所述X和Y均为正整数;
    从确定出的各个网格块的一个或多个预设位置处进行坐标提取,得到预设数量的坐标数据。
  19. 如权利要求17所述的测试设备,其特征在于,所述基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据,包括:
    将提取出的所述坐标数据按照所属的区域像素数据进行分组;
    按照预设排序规则,为所述各个控件进行测试优先级排序,得到按照所述测试优先级排序后的各个控件;
    按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据。
  20. 如权利要求19所述的测试设备,其特征在于,所述按照预设测试规则,对排序后的所述各个控件逐个进行测试,获取所述各个控件分别对应的测试数据,包括:
    按照所述测试优先级排序逐个向被测终端发送对应控件的测试提醒信息,并识别是否从所述被测终端获取到所述对应控件的测试数据;
    若识别出从所述被测终端获取到所述对应控件的测试数据,则按照所述测试优先级排序针对排在所述对应控件顺序后的控件发送所述测试提醒信息;
    若识别出未从所述被测终端获取到所述对应控件的测试数据,则继续从所述被测终端获取所述对应控件的测试数据。
  21. 如权利要求17所述的测试设备,其特征在于,所述根据获取的所述测试数据,生成所述被测应用程序对应的测试报告,包括:
    将获取的各个控件对应的测试数据与所述配置文件中对应的区域像素数据进行匹配;
    若存在控件对应的测试数据与配置文件中对应的区域像素数据不匹配,则确定该控件为测试异常控件;
    为确定的测试异常控件生成对应的测试报告;其中,所述测试报告包含确定的所述测试异常控件的列表信息。
  22. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行,以实现以下步骤:
    对用于进行网格测试的测试网格进行参数设置,得到对应的设置参数;
    针对被测应用程序操作界面的最上层图层表面,模拟生成一个与所述设置参数对应的虚拟测试网格;
    按照预设坐标提取规则,在所述虚拟测试网格内提取出预设数量的坐标数据;
    从被测终端中获取所述被测应用程序的配置文件,并从获取的所述配置文件中,确定出所述被测应用程序的各个控件所分别对应的区域像素数据;
    基于获取的所述坐标数据和区域像素数据,按照预设测试规则,对所述各个控件进行测试,获取所述各个控件的测试数据;
    根据获取的所述测试数据,生成所述被测应用程序对应的测试报告。
PCT/CN2017/071198 2016-01-16 2017-01-15 测试方法、系统、设备及可读存储介质 Ceased WO2017121400A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
US15/735,983 US10282284B2 (en) 2016-01-16 2017-01-15 Test method, system, and device, and readable storage medium
AU2017206394A AU2017206394B2 (en) 2016-01-16 2017-01-15 Method, system and device for testing and readable storage medium
EP17738213.2A EP3404552A4 (en) 2016-01-16 2017-01-15 METHOD, SYSTEM AND DEVICE FOR TESTING AND READABLE STORAGE MEDIUM
SG11201800340RA SG11201800340RA (en) 2016-01-16 2017-01-15 Test method, system, and device, and readable storage medium
KR1020187019504A KR102167879B1 (ko) 2016-01-16 2017-01-15 테스트 방법, 시스템, 기기 및 판독 가능 저장매체
JP2018525572A JP6512676B2 (ja) 2016-01-16 2017-01-15 試験方法、試験システム、試験装置及び読み取り可能な記録媒体

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610029774.6A CN105930261B (zh) 2016-01-16 2016-01-16 测试方法及测试终端
CN201610029774.6 2016-01-16

Publications (1)

Publication Number Publication Date
WO2017121400A1 true WO2017121400A1 (zh) 2017-07-20

Family

ID=56840315

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/071198 Ceased WO2017121400A1 (zh) 2016-01-16 2017-01-15 测试方法、系统、设备及可读存储介质

Country Status (8)

Country Link
US (1) US10282284B2 (zh)
EP (1) EP3404552A4 (zh)
JP (1) JP6512676B2 (zh)
KR (1) KR102167879B1 (zh)
CN (1) CN105930261B (zh)
AU (1) AU2017206394B2 (zh)
SG (1) SG11201800340RA (zh)
WO (1) WO2017121400A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786855A (zh) * 2020-06-30 2020-10-16 曙光信息产业(北京)有限公司 一种网卡的压力测试方法、装置、电子设备及存储介质
CN112345962A (zh) * 2020-09-29 2021-02-09 漳州立达信灯具有限公司 多智能照明设备的组合测试系统
CN113138925A (zh) * 2021-04-23 2021-07-20 闻泰通讯股份有限公司 应用程序的功能测试方法、装置、计算机设备及存储介质
CN113297072A (zh) * 2021-05-17 2021-08-24 阿里巴巴新加坡控股有限公司 容器测试方法及装置
CN114006838A (zh) * 2021-10-30 2022-02-01 杭州迪普信息技术有限公司 流控设备的测试方法及系统
CN114338451A (zh) * 2021-12-31 2022-04-12 武汉思普崚技术有限公司 一种控制器局域网总线测试系统、方法和存储介质
CN114896160A (zh) * 2022-05-25 2022-08-12 平安银行股份有限公司 应用程序测试方法、装置、计算机设备及存储介质
CN115470064A (zh) * 2022-07-29 2022-12-13 重庆长安汽车股份有限公司 待测设备的安全测试方法、装置、电子设备及存储介质

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930261B (zh) * 2016-01-16 2018-06-22 平安科技(深圳)有限公司 测试方法及测试终端
CN106598846B (zh) * 2016-11-29 2018-03-16 上海壹账通金融科技有限公司 应用界面测试方法和装置
CN106850347B (zh) * 2017-01-25 2019-09-13 迈普通信技术股份有限公司 纵向虚拟化测试方法及装置
CN108172154B (zh) * 2018-01-03 2021-03-19 惠科股份有限公司 一种测试方法及测试设备
CN108595322A (zh) * 2018-04-04 2018-09-28 北京潘达互娱科技有限公司 一种应用测试方法及装置
CN109240915A (zh) * 2018-08-14 2019-01-18 平安普惠企业管理有限公司 系统测试方法、装置、计算机设备及存储介质
CN109144868B (zh) * 2018-08-15 2022-02-01 无线生活(杭州)信息科技有限公司 一种页面判断方法及装置
CN110874315B (zh) * 2018-08-30 2024-04-19 阿里巴巴新加坡控股有限公司 测试方法、装置、电子设备和存储介质
CN109800119A (zh) * 2018-12-25 2019-05-24 深圳市元征科技股份有限公司 一种产品功能测试方法及装置
CN109614169B (zh) * 2018-12-29 2022-03-15 上海上讯信息技术股份有限公司 基于像素坐标方式的Windows客户端应用程序自动运行方法
CN109828926B (zh) * 2019-01-31 2022-02-08 北京云测信息技术有限公司 一种判断应用界面是否加载异常的方法和装置
CN110046088A (zh) * 2019-02-19 2019-07-23 阿里巴巴集团控股有限公司 一种接口测试方法、装置及设备
CN111694567B (zh) * 2019-03-13 2024-10-18 京东科技信息技术有限公司 一种数据处理方法及装置、存储介质
CN112241361B (zh) * 2019-07-19 2025-01-14 北京搜狗科技发展有限公司 测试用例生成方法及装置、问题场景自动复现方法及装置
CN110704317A (zh) * 2019-09-26 2020-01-17 凡普数字技术有限公司 对接口参数的参数规则进行测试的方法、装置及存储介质
CN110888812B (zh) * 2019-11-26 2023-11-07 国核自仪系统工程有限公司 终端页面的响应时间的测试系统及测试方法
CN111104324B (zh) * 2019-12-17 2023-08-18 广州品唯软件有限公司 测试用例的生成方法、生成装置及计算机可读存储介质
CN111239523B (zh) * 2020-02-21 2022-01-25 江西三晶电气有限公司 一种变频器测试系统、方法、装置和存储介质
CN111476898B (zh) * 2020-03-09 2023-11-28 深圳市瑞立视多媒体科技有限公司 流体展示方法、装置、计算机可读存储介质及终端设备
CN111694752B (zh) * 2020-07-28 2023-09-05 中移(杭州)信息技术有限公司 应用测试方法、电子设备及存储介质
CN112559352A (zh) * 2020-12-16 2021-03-26 平安银行股份有限公司 接口测试的方法、装置、设备及存储介质
CN113407450B (zh) * 2021-06-22 2024-03-15 平安国际智慧城市科技股份有限公司 基于参数自动识别的接口测试方法、装置、设备及介质
CN114363939B (zh) * 2021-12-29 2024-01-19 上海庆科信息技术有限公司 节点模拟测试方法、装置、存储介质、处理器及设备
CN114780376A (zh) * 2022-03-03 2022-07-22 浙江吉利控股集团有限公司 应用功能遍历测试方法、装置和存储介质
CN115269402B (zh) * 2022-07-20 2023-09-15 上海复深蓝软件股份有限公司 测试数据匹配方法、装置、计算机设备及存储介质
CN116227116A (zh) * 2022-11-28 2023-06-06 北京瑞风协同科技股份有限公司 一种快速虚实比对器
CN118283353B (zh) * 2024-03-21 2025-05-27 北京视游互动科技有限公司 应用程序测试方法、装置、设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164300A (zh) * 2011-12-13 2013-06-19 腾讯科技(深圳)有限公司 一种移动终端触摸屏自动测试方法及装置
CN104484093A (zh) * 2014-12-15 2015-04-01 北京国双科技有限公司 图形界面的排列显示方法及装置
CN104794050A (zh) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 应用程序的测试方法、装置及系统
US20150261659A1 (en) * 2014-03-12 2015-09-17 Bjoern BADER Usability testing of applications by assessing gesture inputs
CN105930261A (zh) * 2016-01-16 2016-09-07 平安科技(深圳)有限公司 测试方法及测试终端

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7136796B2 (en) 2002-02-28 2006-11-14 Timbre Technologies, Inc. Generation and use of integrated circuit profile-based simulation information
US7747984B2 (en) * 2006-05-30 2010-06-29 Microsoft Corporation Automatic test case for graphics design application
CN101013386A (zh) * 2007-02-06 2007-08-08 华中科技大学 基于反馈机制的网格任务调度方法
JP4821653B2 (ja) * 2007-02-28 2011-11-24 富士ゼロックス株式会社 画像処理装置及び画像処理プログラム
FR2914099B1 (fr) * 2007-03-22 2013-04-05 Eads Test & Services Systeme de test universel apte a controler une pluralite de parametres relatifs au fonctionnement de dispositif de presentation d'informations optoelectroniques de types varies
CN100451989C (zh) * 2007-04-20 2009-01-14 北京航空航天大学 软件测试系统及测试方法
US8904358B1 (en) * 2010-06-08 2014-12-02 Cadence Design Systems, Inc. Methods, systems, and articles of manufacture for synchronizing software verification flows
JP5490036B2 (ja) * 2011-02-14 2014-05-14 株式会社Nttドコモ 試験装置
US20130249580A1 (en) * 2012-03-26 2013-09-26 Primestar Solar, Inc. Apparatus and method for evaluating characteristics of a photovoltaic device
US9992379B2 (en) * 2014-04-10 2018-06-05 Entit Software Llc Partial snapshots for creating generalized snapshots
US9424167B2 (en) * 2014-05-21 2016-08-23 Cgi Technologies And Solutions Inc. Automated testing of an application system
CA2965122C (en) * 2014-10-20 2021-11-09 Ab Initio Technology Llc Specifying and applying rules to data
US10084642B2 (en) * 2015-06-02 2018-09-25 ALTR Solutions, Inc. Automated sensing of network conditions for dynamically provisioning efficient VPN tunnels
US10169189B2 (en) * 2015-09-11 2019-01-01 International Business Machines Corporation Functional test automation of mobile applications interacting with native stock applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164300A (zh) * 2011-12-13 2013-06-19 腾讯科技(深圳)有限公司 一种移动终端触摸屏自动测试方法及装置
CN104794050A (zh) * 2014-01-21 2015-07-22 腾讯科技(深圳)有限公司 应用程序的测试方法、装置及系统
US20150261659A1 (en) * 2014-03-12 2015-09-17 Bjoern BADER Usability testing of applications by assessing gesture inputs
CN104484093A (zh) * 2014-12-15 2015-04-01 北京国双科技有限公司 图形界面的排列显示方法及装置
CN105930261A (zh) * 2016-01-16 2016-09-07 平安科技(深圳)有限公司 测试方法及测试终端

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786855A (zh) * 2020-06-30 2020-10-16 曙光信息产业(北京)有限公司 一种网卡的压力测试方法、装置、电子设备及存储介质
CN112345962A (zh) * 2020-09-29 2021-02-09 漳州立达信灯具有限公司 多智能照明设备的组合测试系统
CN113138925A (zh) * 2021-04-23 2021-07-20 闻泰通讯股份有限公司 应用程序的功能测试方法、装置、计算机设备及存储介质
CN113297072A (zh) * 2021-05-17 2021-08-24 阿里巴巴新加坡控股有限公司 容器测试方法及装置
CN113297072B (zh) * 2021-05-17 2023-11-03 阿里巴巴新加坡控股有限公司 容器测试方法及装置
CN114006838A (zh) * 2021-10-30 2022-02-01 杭州迪普信息技术有限公司 流控设备的测试方法及系统
CN114006838B (zh) * 2021-10-30 2023-06-27 杭州迪普信息技术有限公司 流控设备的测试方法及系统
CN114338451A (zh) * 2021-12-31 2022-04-12 武汉思普崚技术有限公司 一种控制器局域网总线测试系统、方法和存储介质
CN114338451B (zh) * 2021-12-31 2023-10-13 武汉思普崚技术有限公司 一种控制器局域网总线测试系统、方法和存储介质
CN114896160A (zh) * 2022-05-25 2022-08-12 平安银行股份有限公司 应用程序测试方法、装置、计算机设备及存储介质
CN115470064A (zh) * 2022-07-29 2022-12-13 重庆长安汽车股份有限公司 待测设备的安全测试方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
SG11201800340RA (en) 2018-02-27
EP3404552A4 (en) 2019-09-04
JP6512676B2 (ja) 2019-05-15
CN105930261B (zh) 2018-06-22
JP2019501446A (ja) 2019-01-17
KR102167879B1 (ko) 2020-10-21
KR20180103881A (ko) 2018-09-19
US10282284B2 (en) 2019-05-07
AU2017206394A1 (en) 2017-11-23
EP3404552A1 (en) 2018-11-21
AU2017206394B2 (en) 2019-01-24
US20180173618A1 (en) 2018-06-21
CN105930261A (zh) 2016-09-07

Similar Documents

Publication Publication Date Title
WO2017121400A1 (zh) 测试方法、系统、设备及可读存储介质
CN108416198B (zh) 人机识别模型的建立装置、方法及计算机可读存储介质
CN104331373A (zh) 一种Monkey测试系统及方法
CN103377119B (zh) 一种非标准控件自动化测试方法和装置
US9804955B2 (en) Method and apparatus for creating reference images for an automated test of software with a graphical user interface
CN107608609B (zh) 一种事件对象发送方法与装置
CN114281627A (zh) 回收检测自动化操作方法及装置
CN111459823B (zh) 游戏软件的测试方法和装置、存储介质、处理器
CN112612469A (zh) 一种界面元素的处理方法、装置和电子设备
CN115687146A (zh) Bios测试方法、装置、计算机设备和存储介质
CN103678059A (zh) 一种随机按键测试方法及装置
CN210016474U (zh) 配网测试控制设备及系统
CN105739973A (zh) 一种基于Android的UI控件自动识别刷新方法及装置
CN111124841B (zh) 一种异常页面的报警方法、装置及计算机系统
CN115292179A (zh) 测试数据的生成方法、装置、电子设备及存储介质
CN102778959B (zh) 键盘输入方法、装置和终端
CN114895836A (zh) 基于智能全流程数据触摸屏触控方法、装置及电子设备
CN107885452A (zh) 3D‑Touch模拟方法及装置、计算机装置和计算机可读存储介质
CN114064479B (zh) 一种安全键盘的自动化识别方法、装置、介质及电子设备
CN112463227A (zh) 基于触摸屏的bios控制方法、系统及触摸屏控制板
CN105930262A (zh) 应用程序用户界面自动化测试方法及电子设备
CN113220596B (zh) 应用的测试方法、装置、设备、存储介质及程序产品
CN117910400B (zh) 一种数据比对验证方法、系统、设备及介质
CN111163309A (zh) 基于行为模拟的测试方法、电视设备及存储介质
CN117371235A (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: 17738213

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017206394

Country of ref document: AU

Date of ref document: 20170115

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15735983

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 11201800340R

Country of ref document: SG

WWE Wipo information: entry into national phase

Ref document number: 2018525572

Country of ref document: JP

ENP Entry into the national phase

Ref document number: 20187019504

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE