[go: up one dir, main page]

WO2018120721A1 - Method and system for testing user interface, electronic device, and computer readable storage medium - Google Patents

Method and system for testing user interface, electronic device, and computer readable storage medium Download PDF

Info

Publication number
WO2018120721A1
WO2018120721A1 PCT/CN2017/091256 CN2017091256W WO2018120721A1 WO 2018120721 A1 WO2018120721 A1 WO 2018120721A1 CN 2017091256 W CN2017091256 W CN 2017091256W WO 2018120721 A1 WO2018120721 A1 WO 2018120721A1
Authority
WO
WIPO (PCT)
Prior art keywords
control
tested
information
user interface
test
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/091256
Other languages
French (fr)
Chinese (zh)
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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Publication of WO2018120721A1 publication Critical patent/WO2018120721A1/en
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/368Test management for test version control, e.g. updating test cases to a new software version
    • 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

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a user interface testing method, system, electronic device, and computer readable storage medium.
  • the user interface developer's automated test for the user interface is usually pre-written test scripts and test information collection and analysis through the control identification, the tester's experience and professional skills are high. Programming is inefficient and error-prone. In addition, version iterations of the user interface are usually faster, resulting in high maintenance costs for test scripts.
  • the main object of the present invention is to provide a test method, system, electronic device and computer readable storage medium for a user interface, which aims to improve the efficiency of generating a test script of a user interface.
  • a first aspect of the present invention provides a method for testing a user interface, the method comprising the following steps:
  • the preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is the user that the user terminal displays in response to the user for the user terminal.
  • the preset type log information of the operation behavior is detected and recorded during the operation behavior of the interface, and the preset type log information includes operation control information and operation type information;
  • the parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested;
  • a second aspect of the present invention provides a test system for a user interface, the test system comprising:
  • the receiving module is configured to receive preset type log information corresponding to the user interface displayed on the user terminal, and the preset type log information is that the user terminal responds to the user for the user Detect and record the operation behavior of the user interface displayed on the terminal Preset type log information of the operation behavior, the preset type log information includes operation control information and operation type information;
  • the parsing module is configured to parse the received preset type log information to parse operation control information and operation type information included in each preset type log information;
  • a categorization module configured to classify the parsed operation control information and/or operation type information according to a predetermined categorization rule to determine each control to be tested, and an operation type corresponding to each control to be tested;
  • a generating module configured to determine a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generate a test script based on the test code corresponding to each control to be tested, to generate a test script
  • the test script tests the user interface displayed on the user terminal.
  • a third aspect of the present application provides an electronic device, including a processing device, a storage device, and a user interface test system, where the test system of the user interface is stored in the storage device, including at least one computer readable instruction, the at least one computer A read command can be executed by the processing device to:
  • the preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is the user that the user terminal displays in response to the user for the user terminal.
  • the preset type log information of the operation behavior is detected and recorded during the operation behavior of the interface, and the preset type log information includes operation control information and operation type information;
  • the parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested;
  • a fourth aspect of the present application provides a computer readable storage medium having stored thereon at least one computer readable instruction executable by a processing device to:
  • the preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is the user that the user terminal displays in response to the user for the user terminal.
  • the preset type log information of the operation behavior is detected and recorded during the operation behavior of the interface, and the preset type log information includes operation control information and operation type information;
  • the parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested;
  • the user interface testing method, system, electronic device and computer readable storage medium provided by the present invention perform the preset type log information corresponding to the user interface displayed on the user terminal sent by the user terminal within a preset time period. Parsing, obtaining operation control information and operation type information corresponding to each preset type log information; and determining each control to be tested and corresponding operation type; determining each according to a predetermined mapping relationship between the control, the operation type, and the test code The test code corresponding to the test to be tested, and the test script is generated based on the test code corresponding to each test to be tested for user interface test.
  • the test code corresponding to the control to be tested is obtained according to the log information generated by the operation behavior of the user on the user interface, and the test code corresponding to the control to be tested is obtained according to the operation control information and the operation type information corresponding to the operation behavior of the user.
  • the test code corresponding to each test to be tested generates a test script without requiring the developer to manually write the test script, which is more efficient and less error-prone, and only needs to re-acquire each iteration after the iteration of the subsequent user interface version.
  • the test code corresponding to the control can automatically generate test scripts, and the maintenance cost is low.
  • FIG. 1 is a schematic diagram of an application environment of a preferred embodiment of a test method for a user interface according to the present invention
  • FIG. 2 is a schematic flowchart of a first embodiment of a test method for a user interface according to the present invention
  • FIG. 3 is a schematic flowchart of a second embodiment of a test method for a user interface according to the present invention.
  • FIG. 4 is a schematic diagram of functional modules of a first embodiment of a test system for a user interface according to the present invention
  • FIG. 5 is a schematic diagram of functional modules of a second embodiment of a test system for a user interface according to the present invention.
  • FIG. 1 it is a schematic diagram of an application environment of a preferred embodiment of a method for implementing a user interface according to the present invention.
  • the application environment diagram includes an electronic device 1 and a terminal device 2.
  • the electronic device 1 can perform data interaction with the terminal device 2 through a suitable technology such as a network or a near field communication technology.
  • the terminal device 2 includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, or an individual.
  • the network in which the user equipment and the network device are located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.
  • VPN virtual private network
  • the electronic device 1 is an apparatus capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance.
  • the electronic device 1 may be a computer, a single network server, a server group composed of multiple network servers, or a cloud-based cloud composed of a large number of hosts or network servers, where cloud computing is a type of distributed computing, A super virtual computer consisting of a loosely coupled set of computers.
  • the electronic device 1 includes, but is not limited to, a storage device 11, a processing device 12, and a network interface 13 that are communicably connected to each other through a system bus. It should be noted that FIG. 1 only shows the electronic device 1 having the components 11-13, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.
  • the storage device 11 includes a memory and at least one type of readable storage medium.
  • the memory provides a cache for the operation of the electronic device 1;
  • the readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like.
  • the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1; in other embodiments, the non-volatile storage medium may also be external to the electronic device 1.
  • a storage device such as a plug-in hard disk equipped with an electronic device 1, a smart memory card (SMC), a Secure Digital (SD) card, a flash card, or the like.
  • SMC smart memory card
  • SD Secure Digital
  • the readable storage medium of the storage device 11 is generally used to store an operating system installed in the electronic device 1 and various types of application software, such as program code of the test system 10 of the user interface in an embodiment of the present application. Further, the storage device 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • Processing device 12 may, in some embodiments, include one or more microprocessors, microcontrollers, digital processors, and the like.
  • the processing device 12 is generally used to control the operation of the electronic device 1, for example, to perform control and processing related to data interaction or communication with the terminal device 2.
  • the processing device 12 is configured to run program code or process data stored in the storage device 11, such as the test system 10 running a user interface, and the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 1 and other electronic devices.
  • the network interface 13 is mainly used to connect the electronic device 1 with one or more terminal devices 2, and establish a data transmission channel and a communication connection between the electronic device 1 and one or more terminal devices 2.
  • the test system 10 of the user interface includes at least one computer readable instructions stored in the storage device 11, the at least one computer readable instructions being executable by the processing device 12 to implement a test method for a user interface of various embodiments of the present application.
  • the at least one computer readable instruction can be classified into different logic modules depending on the functions implemented by its various parts.
  • the testing system 10 of the user interface when executed by the processing device 12, the following operations are performed: receiving the preset type date information corresponding to the user interface displayed on the user terminal sent by the terminal device 2 within a preset time Parsing the received preset type log information to parse out the operation control information and operation type information included in each preset type log information; according to the predetermined return of the parsed operation control information and/or operation type information Class rules are categorized to Determining the respective control types to be tested, and the operation types corresponding to the respective to-be-tested controls; determining the test codes corresponding to the respective control to be tested according to the predetermined mapping relationship between the control to be tested, the operation type and the test code, and based on each test to be tested The test code corresponding to the control generates a test script to test the user interface displayed on the user terminal by using the generated test script.
  • the invention provides a test method for a user interface.
  • FIG. 2 is a schematic flowchart diagram of a first embodiment of a test method for a user interface according to the present invention.
  • the test method of the user interface includes:
  • step S10 the preset type log information corresponding to the user interface displayed on the user terminal sent by the user terminal is received in the preset time, and the preset type log information is that the user terminal is responding to the user for the user terminal.
  • the preset type log information of the operation behavior that is detected and recorded during the operation behavior of the displayed user interface, and the preset type log information includes operation control information and operation type information;
  • the user terminal monitors the operation behavior of the user for the user interface in real time or periodically, and if the user is monitored, An operation behavior of the user interface is responded, and the user terminal detects and records the preset type log information corresponding to the operation behavior, where the preset type log information includes operation control information (eg, operation control name, identifier, etc.) And operation type information including, but not limited to, a click operation, a slide operation, a scroll operation, a drag operation, a press operation, and the like.
  • operation control information eg, operation control name, identifier, etc.
  • operation type information including, but not limited to, a click operation, a slide operation, a scroll operation, a drag operation, a press operation, and the like.
  • the user terminal may retrieve system log information when monitoring the user's operation behavior for the user interface, and extract operation control information and operation type corresponding to the operation behavior from the system log information. information.
  • the user terminal is pre-configured with a log information collection module, and the log information collection module detects and records the operation control information corresponding to each user operation behavior of the user interface in real time or periodically. And operation type information.
  • the preset type log information sent by the user terminal is received within a preset time (for example, within the last 30 days) to obtain operation control information and operation type information corresponding to the operation behavior of the user for the user interface.
  • step S20 the received preset type log information is parsed to parse out the operation control information and the operation type information included in the log information of each preset type;
  • Step S30 classifying the parsed operation control information and/or operation type information according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested;
  • the parsing of the received preset type log information is performed, and the operation control information and the operation type information recorded in the log information of each preset type are parsed.
  • the operation control information and the operation type information corresponding to the operation behavior of the user interface are classified, for example, the operation control information may be classified into the same class according to the operation control information, and The operations type information may be classified into the same class according to the operation type information, and may also be the same test code according to a predetermined correspondence between the same test code and various operation control information or operation type information.
  • the corresponding operation controls of various operation control information or operation type information are classified into the same class, and the like.
  • the operation control of the same class is classified as a control to be tested, and each control to be tested in the received preset type log information, and the operation type corresponding to each control to be tested are determined.
  • Step S40 Determine a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generate a test script based on the test code corresponding to each test to be tested, so as to utilize the generated test.
  • the script tests the user interface displayed on the user terminal.
  • the test code corresponding to each test to be tested may be determined according to a predetermined mapping relationship between different controls, operation types, and test codes. . Since the test code corresponding to the same control and its corresponding operation type is fixed, the mapping relationship between different controls, operation types and test codes can be determined in advance, and the control to be tested and its corresponding operation are determined. After the type, the modular test code corresponding to the control to be tested and its corresponding operation type can be obtained according to the predetermined mapping relationship.
  • the test code corresponding to each test to be tested can be spliced, combined, and the like to generate a final test script to display the user terminal by using the generated test script.
  • the user interface performs tests for various types of operations.
  • the preset type log information corresponding to the user interface displayed on the user terminal sent by the user terminal is parsed, and the operation control information and the operation type information corresponding to the log information of each preset type are obtained. And determining each control to be tested and the corresponding operation type; determining the test code corresponding to each control to be tested according to the predetermined mapping relationship between the control, the operation type and the test code, and based on the test code corresponding to each control to be tested Generate test scripts for user interface testing.
  • the test code corresponding to the control to be tested is obtained according to the log information generated by the operation behavior of the user on the user interface, and the test code corresponding to the control to be tested is obtained according to the operation control information and the operation type information corresponding to the operation behavior of the user.
  • test code corresponding to each test to be tested generates a test script without requiring the developer to manually write the test script, which is more efficient and less error-prone, and only needs to re-acquire each iteration after the iteration of the subsequent user interface version.
  • the test code corresponding to the control can automatically generate test scripts, and the maintenance cost is low.
  • the predetermined categorization rules include:
  • the operation type information corresponding to the parsed operation control information is classified, so that the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to different operation control information is classified into different attributes. class;
  • the operation control corresponding to each attribute class is used as a control to be tested, and all operation types under each attribute class are used as corresponding operation types of the control to be tested corresponding to the attribute class.
  • the operation control information is used as a classification, for example, when the operation control information is the operation control name, the same control name and The corresponding operation type information is classified into the same attribute class, and different control names and their corresponding operation type information are classified into different attribute classes.
  • the operation control corresponding to the same control name As the control to be tested, and all the operation types under the same control name as the corresponding operation type of the control to be tested. Because the test code corresponding to the operation control corresponding to the same control name is the same or similar, the same control name and its corresponding operation type information are classified into the same attribute class, and the operation control with the same or similar test code can be returned.
  • the operation type and the test code After determining the test code corresponding to each test to be tested according to the mapping relationship between the predetermined control, the operation type and the test code, it is only necessary to find the test corresponding to each operation type according to different operation types of the same type of operation control.
  • the code does not need to search for the operation controls of each of the same or different operation control information, which simplifies the search process and determines that the test code corresponding to each control to be tested is more efficient.
  • the predetermined classification rule further includes:
  • the operation corresponding to each attribute class is also performed.
  • the control performs filtering, for example, whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested.
  • the user can set a list of the control to be tested according to the test needs in the actual application. For example, according to the focus of each test, the list of the control to be tested in the list of the control to be tested can be added or deleted, and the subsequent control can be controlled.
  • the control to be tested corresponding to the determined test code is the control to be tested required for the test, and the custom acquisition of the test code is realized, and the required test script can be generated more flexibly, and the utility is higher.
  • a second embodiment of the present invention provides a test method for a user interface.
  • the method further includes:
  • Step S50 Determine, according to the configuration file of the user interface, all configuration controls corresponding to the user interface;
  • Step S60 comparing the determined control to be tested with each configuration control to filter out configuration controls of all the configuration controls that are not to be tested;
  • step S70 a reminder message is generated to remind the user to add a test code to the selected configuration control, and/or to remind the necessary check for the selected configuration control.
  • the user interface corresponds to all the configuration controls, and compares the determined control to be tested with each configuration control to filter out the configuration controls of all the configuration controls that are not to be tested. Since each control to be tested is determined based on the user's operational behavior for the user interface, the user's operational behavior for the user interface may not involve all the controls on the user interface.
  • the configuration control is the control on the user interface that is not involved in the user's operation behavior for the user interface.
  • Generating reminder information such as sending reminder information to a predetermined terminal, to remind the user to add a test generation to the filtered configuration control Code, and/or, reminder to check the necessary configuration controls, add test code to the configuration control that is necessary to test, and combine the added test code with the test code corresponding to each control to be tested to form the final complete Test scripts to test the user interface more comprehensively.
  • the invention further provides a test system for a user interface.
  • FIG. 4 is a schematic diagram of functional modules of a first embodiment of a test system for a user interface according to the present invention.
  • test system of the user interface comprises:
  • the receiving module 01 is configured to receive preset type log information corresponding to the user interface displayed on the user terminal, and the preset type log information is that the user terminal responds to the user
  • the preset type log information of the operation behavior is detected and recorded when the operation behavior of the user interface is displayed on the user terminal, and the preset type log information includes operation control information and operation type information;
  • the user terminal monitors the operation behavior of the user for the user interface in real time or periodically, and if the user is monitored for the user interface, When the operation behavior is responded, the user terminal detects and records the preset type log information corresponding to the operation behavior, and the preset type log information includes operation control information (eg, operation control name, identifier, etc.) and operation type information.
  • the operation type information includes, but is not limited to, a click operation, a slide operation, a scroll operation, a drag operation, a press operation, and the like.
  • the user terminal may retrieve system log information when monitoring the user's operation behavior for the user interface, and extract operation control information and operation type corresponding to the operation behavior from the system log information. information.
  • the user terminal is pre-configured with a log information collection module, and the log information collection module detects and records the operation control information corresponding to each user operation behavior of the user interface in real time or periodically. And operation type information.
  • the test system receives the preset type log information sent by the user terminal within a preset time (for example, the last 30 days) to obtain the operation control information and the operation type information corresponding to the operation behavior of the user for the user interface.
  • a preset time for example, the last 30 days
  • the parsing module 02 is configured to parse the received preset type log information to parse the operation control information and the operation type information included in the log information of each preset type;
  • the categorization module 03 is configured to classify the parsed operation control information and/or operation type information according to a predetermined categorization rule to determine each control to be tested, and an operation type corresponding to each control to be tested;
  • the test system parses the received preset type log information, and parses out operation control information and operation type information recorded in each preset type log information.
  • the operation control information and the operation type information corresponding to the operation behavior of the user interface are classified, for example, the operation control information may be classified into the same class according to the operation control information, and The operation type information may be classified into the same class according to the operation type information, or may be the same as the corresponding correspondence between the same test code and various operation control information or operation type information.
  • the operation controls corresponding to various operation control information or operation type information corresponding to the test code are classified into the same class, and the like.
  • the operation control of the same class is classified as a control to be tested, and each control to be tested in the received preset type log information, and the operation type corresponding to each control to be tested are determined.
  • the generating module 04 is configured to determine a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generate a test script based on the test code corresponding to each control to be tested, to utilize The generated test script tests the user interface displayed on the user terminal.
  • the test code corresponding to each test to be tested may be determined according to a predetermined mapping relationship between different controls, operation types, and test codes. . Since the test code corresponding to the same control and its corresponding operation type is fixed, the mapping relationship between different controls, operation types and test codes can be determined in advance, and the control to be tested and its corresponding operation are determined. After the type, the modular test code corresponding to the control to be tested and its corresponding operation type can be obtained according to the predetermined mapping relationship.
  • the test code corresponding to each test to be tested can be spliced, combined, and the like to generate a final test script to display the user terminal by using the generated test script.
  • the user interface performs tests for various types of operations.
  • the test system parses the preset type log information corresponding to the user interface displayed on the user terminal, which is sent by the user terminal in the preset time, and obtains the operation control information and operation corresponding to the log information of each preset type. Type information; and determine each control to be tested and the corresponding operation type; according to the predetermined mapping relationship between the control, the operation type and the test code, determine the test code corresponding to each control to be tested, and based on the corresponding control to be tested The test code generates test scripts for user interface testing.
  • the test code corresponding to the control to be tested is obtained according to the log information generated by the operation behavior of the user on the user interface, and the test code corresponding to the control to be tested is obtained according to the operation control information and the operation type information corresponding to the operation behavior of the user.
  • the test code corresponding to each test to be tested generates a test script without requiring the developer to manually write the test script, which is more efficient and less error-prone, and only needs to re-acquire each iteration after the iteration of the subsequent user interface version.
  • the test code corresponding to the control can automatically generate test scripts, and the maintenance cost is low.
  • the predetermined categorization rules include:
  • the operation type information corresponding to the parsed operation control information is classified, so that the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to different operation control information is classified into different attributes. class;
  • the operation control corresponding to each attribute class is used as a control to be tested, and all operation types under each attribute class are used as corresponding operation types of the control to be tested corresponding to the attribute class.
  • the operation control information is used as a classification, for example, when the operation control information is the operation control name, the same control name and The corresponding operation type information is classified into the same attribute class, and different control names and their corresponding operation type information are classified into different attribute classes.
  • the operation control corresponding to the same control name As the control to be tested, and all the operation types under the same control name as the corresponding operation type of the control to be tested. Because the test code corresponding to the operation control corresponding to the same control name is the same or similar, the same control name and its corresponding operation type information are classified into the same attribute class, and the operation control with the same or similar test code can be returned.
  • the operation type and the test code After determining the test code corresponding to each test to be tested according to the mapping relationship between the predetermined control, the operation type and the test code, it is only necessary to find the test corresponding to each operation type according to different operation types of the same type of operation control.
  • the code does not need to search for the operation controls of each of the same or different operation control information, which simplifies the search process and determines that the test code corresponding to each control to be tested is more efficient.
  • the predetermined classification rule further includes:
  • the operation corresponding to each attribute class is also performed.
  • the control performs filtering, for example, whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested.
  • the user can set a list of the control to be tested according to the test needs in the actual application. For example, according to the focus of each test, the list of the control to be tested in the list of the control to be tested can be added or deleted, and the subsequent control can be controlled.
  • the control to be tested corresponding to the determined test code is the control to be tested required for the test, and the custom acquisition of the test code is realized, and the required test script can be generated more flexibly, and the utility is higher.
  • the second embodiment of the present invention provides a test system for a user interface. Based on the foregoing embodiments, the method further includes:
  • a determining module 05 configured to determine, according to the configuration file of the user interface, all configuration controls corresponding to the user interface
  • the comparison module 06 is configured to compare the determined control to be tested with each configuration control to filter out configuration controls of all the configuration controls that are not to be tested;
  • the reminder module 07 is configured to generate reminder information to remind the test code to be added to the filtered configuration control, and/or to remind the necessary check for the filtered configuration control.
  • the user interface corresponds to all the configuration controls, and compares the determined control to be tested with each configuration control to filter out the configuration controls of all the configuration controls that are not to be tested. Since each control to be tested is determined based on the user's operational behavior for the user interface, the user's operational behavior for the user interface may not involve all the controls on the user interface.
  • the configuration control is the control on the user interface that is not involved in the user's operation behavior for the user interface.
  • Generating reminder information such as sending reminder information to a predetermined terminal, to remind the user to add a test generation to the filtered configuration control Code, and/or, reminder to check the necessary configuration controls, add test code to the configuration control that is necessary to test, and combine the added test code with the test code corresponding to each control to be tested to form the final complete Test scripts to test the user interface more comprehensively.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and can also be implemented by hardware, but in many cases, the former is A better implementation.
  • 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, an air conditioner, 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)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A method for testing a user interface, the method comprising: receiving a preset type of log information sent by a user terminal within a preset period of time and corresponding to a user interface displayed on the user terminal, the preset type of log information being preset type of log information of an operation behavior detected and recorded when the user terminal responds to the operation behavior of a user on the user interface displayed on the user terminal (S10); parsing the received preset type of log information to obtain operation control information and operation type information comprised in each preset type of log information (S20); classifying the parsed operation control information and/or operation type information according to a predetermined classification rule to determine each control to be tested and an operation type corresponding to each control to be tested (S30); and determining a testing code corresponding to each control to be tested according to a predetermined mapping relation among controls to be tested, operation types, and testing codes, and generating a testing script based on the testing code corresponding to each control to be tested so as to test the user interface displayed on the user terminal by using the generated testing script (S40). The method does not need a developer to manually write a testing script, thereby achieving high efficiency with a low error rate.

Description

用户界面的测试方法、系统、电子装置及计算机可读存储介质User interface test method, system, electronic device and computer readable storage medium

优先权申明Priority claim

本申请基于巴黎公约申明享有2016年12月30日递交的申请号为CN2016112657437、名称为“用户界面的测试方法及服务器”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。The present application is based on the priority of the Paris Convention, the priority of the Chinese Patent Application No. CN2016112657437, entitled "Test Method and Server for User Interface", which is filed on Dec. 30, 2016, the entire contents of which are incorporated by reference. In this application.

技术领域Technical field

本发明涉及计算机技术领域,尤其涉及一种用户界面的测试方法、系统、电子装置及计算机可读存储介质。The present invention relates to the field of computer technologies, and in particular, to a user interface testing method, system, electronic device, and computer readable storage medium.

背景技术Background technique

目前,用户界面开发人员针对用户界面(User Interface,UI)的自动化测试通常是预先编写测试脚本并通过控件识别进行测试信息采集和分析的,对测试脚本的编程人员的经验和专业技能要求较高,编程效率低下且容易出错,另外,用户界面的版本迭代通常较快,导致测试脚本的维护代价高。At present, the user interface developer's automated test for the user interface (UI) is usually pre-written test scripts and test information collection and analysis through the control identification, the tester's experience and professional skills are high. Programming is inefficient and error-prone. In addition, version iterations of the user interface are usually faster, resulting in high maintenance costs for test scripts.

发明内容Summary of the invention

本发明的主要目的在于提供一种用户界面的测试方法、系统、电子装置及计算机可读存储介质,旨在提高用户界面的测试脚本的生成效率。The main object of the present invention is to provide a test method, system, electronic device and computer readable storage medium for a user interface, which aims to improve the efficiency of generating a test script of a user interface.

为实现上述目的,本发明第一方面提供一种用户界面的测试方法,所述方法包括以下步骤:To achieve the above object, a first aspect of the present invention provides a method for testing a user interface, the method comprising the following steps:

接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;And receiving, by the user terminal, the preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is the user that the user terminal displays in response to the user for the user terminal. The preset type log information of the operation behavior is detected and recorded during the operation behavior of the interface, and the preset type log information includes operation control information and operation type information;

对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;Parsing the received preset type log information to parse the operation control information and the operation type information included in the log information of each preset type;

对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;The parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested;

根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。Determining a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generating a test script based on the test code corresponding to each control to be tested, to use the generated test script to The user interface displayed on the user terminal is tested.

本发明第二方面提供一种用户界面的测试系统,所述测试系统包括:A second aspect of the present invention provides a test system for a user interface, the test system comprising:

接收模块,用于接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录 的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;The receiving module is configured to receive preset type log information corresponding to the user interface displayed on the user terminal, and the preset type log information is that the user terminal responds to the user for the user Detect and record the operation behavior of the user interface displayed on the terminal Preset type log information of the operation behavior, the preset type log information includes operation control information and operation type information;

解析模块,用于对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;The parsing module is configured to parse the received preset type log information to parse operation control information and operation type information included in each preset type log information;

归类模块,用于对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;a categorization module, configured to classify the parsed operation control information and/or operation type information according to a predetermined categorization rule to determine each control to be tested, and an operation type corresponding to each control to be tested;

生成模块,用于根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。a generating module, configured to determine a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generate a test script based on the test code corresponding to each control to be tested, to generate a test script The test script tests the user interface displayed on the user terminal.

本申请第三方面提供一种电子装置,包括处理设备、存储设备及用户界面的测试系统,该用户界面的测试系统存储于该存储设备中,包括至少一个计算机可读指令,该至少一个计算机可读指令可被所述处理设备执行,以实现以下操作:A third aspect of the present application provides an electronic device, including a processing device, a storage device, and a user interface test system, where the test system of the user interface is stored in the storage device, including at least one computer readable instruction, the at least one computer A read command can be executed by the processing device to:

接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;And receiving, by the user terminal, the preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is the user that the user terminal displays in response to the user for the user terminal. The preset type log information of the operation behavior is detected and recorded during the operation behavior of the interface, and the preset type log information includes operation control information and operation type information;

对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;Parsing the received preset type log information to parse the operation control information and the operation type information included in the log information of each preset type;

对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;The parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested;

根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。Determining a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generating a test script based on the test code corresponding to each control to be tested, to use the generated test script to The user interface displayed on the user terminal is tested.

本申请第四方面提供一种计算机可读存储介质,其上存储有至少一个可被处理设备执行以实现以下操作的计算机可读指令:A fourth aspect of the present application provides a computer readable storage medium having stored thereon at least one computer readable instruction executable by a processing device to:

接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;And receiving, by the user terminal, the preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is the user that the user terminal displays in response to the user for the user terminal. The preset type log information of the operation behavior is detected and recorded during the operation behavior of the interface, and the preset type log information includes operation control information and operation type information;

对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;Parsing the received preset type log information to parse the operation control information and the operation type information included in the log information of each preset type;

对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型; The parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested;

根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。Determining a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generating a test script based on the test code corresponding to each control to be tested, to use the generated test script to The user interface displayed on the user terminal is tested.

本发明提出的用户界面的测试方法、系统、电子装置及计算机可读存储介质,通过对预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息进行解析,得到各个预设类型日志信息对应的操作控件信息和操作类型信息;并确定出各个待测试控件及对应的操作类型;根据预先确定的控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本来进行用户界面测试。由于是根据针对用户在用户界面上的操作行为所生成的日志信息进行解析,并根据用户的操作行为对应的操作控件信息和操作类型信息获取到各个待测试控件对应的测试代码,能自动根据获取的各个待测试控件对应的测试代码生成测试脚本,而无需开发人员人工编写测试脚本,效率较高且不易出错,而且,在后续用户界面的版本迭代时,只需重新获取迭代后的各个待测试控件对应的测试代码即可自动生成测试脚本,维护成本较低。The user interface testing method, system, electronic device and computer readable storage medium provided by the present invention perform the preset type log information corresponding to the user interface displayed on the user terminal sent by the user terminal within a preset time period. Parsing, obtaining operation control information and operation type information corresponding to each preset type log information; and determining each control to be tested and corresponding operation type; determining each according to a predetermined mapping relationship between the control, the operation type, and the test code The test code corresponding to the test to be tested, and the test script is generated based on the test code corresponding to each test to be tested for user interface test. The test code corresponding to the control to be tested is obtained according to the log information generated by the operation behavior of the user on the user interface, and the test code corresponding to the control to be tested is obtained according to the operation control information and the operation type information corresponding to the operation behavior of the user. The test code corresponding to each test to be tested generates a test script without requiring the developer to manually write the test script, which is more efficient and less error-prone, and only needs to re-acquire each iteration after the iteration of the subsequent user interface version. The test code corresponding to the control can automatically generate test scripts, and the maintenance cost is low.

附图说明DRAWINGS

图1为本发明用户界面的测试方法的较佳实施例的应用环境示意图;1 is a schematic diagram of an application environment of a preferred embodiment of a test method for a user interface according to the present invention;

图2为本发明用户界面的测试方法第一实施例的流程示意图;2 is a schematic flowchart of a first embodiment of a test method for a user interface according to the present invention;

图3为本发明用户界面的测试方法第二实施例的流程示意图;3 is a schematic flowchart of a second embodiment of a test method for a user interface according to the present invention;

图4为本发明用户界面的测试系统第一实施例的功能模块示意图;4 is a schematic diagram of functional modules of a first embodiment of a test system for a user interface according to the present invention;

图5为本发明用户界面的测试系统第二实施例的功能模块示意图。FIG. 5 is a schematic diagram of functional modules of a second embodiment of a test system for a user interface according to the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.

具体实施方式detailed description

为了使本发明所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, in order to make the present invention. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

参阅图1所示,是本发明实现用户界面的测试方法的较佳实施例的应用环境示意图。该应用环境示意图包括电子装置1及终端设备2。电子装置1可以通过网络、近场通信技术等适合的技术与终端设备2进行数据交互。Referring to FIG. 1 , it is a schematic diagram of an application environment of a preferred embodiment of a method for implementing a user interface according to the present invention. The application environment diagram includes an electronic device 1 and a terminal device 2. The electronic device 1 can perform data interaction with the terminal device 2 through a suitable technology such as a network or a near field communication technology.

终端设备2包括,但不限于,任何一种可与用户通过键盘、鼠标、遥控器、触摸板或者声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA),游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式 设备等。其中,所述用户设备及网络设备所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。The terminal device 2 includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, or an individual. Digital Assistant (PDA), game console, Internet Protocol Television (IPTV), smart wearable Equipment, etc. The network in which the user equipment and the network device are located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.

电子装置1是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。电子装置1可以是计算机、也可以是单个网络服务器、多个网络服务器组成的服务器组或者基于云计算的由大量主机或者网络服务器构成的云,其中云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。The electronic device 1 is an apparatus capable of automatically performing numerical calculation and/or information processing in accordance with an instruction set or stored in advance. The electronic device 1 may be a computer, a single network server, a server group composed of multiple network servers, or a cloud-based cloud composed of a large number of hosts or network servers, where cloud computing is a type of distributed computing, A super virtual computer consisting of a loosely coupled set of computers.

在本实施例中,电子装置1包括,但不仅限于,可通过系统总线相互通信连接的存储设备11、处理设备12、及网络接口13。需要指出的是,图1仅示出了具有组件11-13的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。In the present embodiment, the electronic device 1 includes, but is not limited to, a storage device 11, a processing device 12, and a network interface 13 that are communicably connected to each other through a system bus. It should be noted that FIG. 1 only shows the electronic device 1 having the components 11-13, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead.

其中,存储设备11包括内存及至少一种类型的可读存储介质。内存为电子装置1的运行提供缓存;可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,可读存储介质可以是电子装置1的内部存储单元,例如该电子装置1的硬盘;在另一些实施例中,该非易失性存储介质也可以是电子装置1的外部存储设备,例如电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。本实施例中,存储设备11的可读存储介质通常用于存储安装于电子装置1的操作系统和各类应用软件,例如本申请一实施例中的用户界面的测试系统10的程序代码等。此外,存储设备11还可以用于暂时地存储已经输出或者将要输出的各类数据。The storage device 11 includes a memory and at least one type of readable storage medium. The memory provides a cache for the operation of the electronic device 1; the readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1; in other embodiments, the non-volatile storage medium may also be external to the electronic device 1. A storage device, such as a plug-in hard disk equipped with an electronic device 1, a smart memory card (SMC), a Secure Digital (SD) card, a flash card, or the like. In this embodiment, the readable storage medium of the storage device 11 is generally used to store an operating system installed in the electronic device 1 and various types of application software, such as program code of the test system 10 of the user interface in an embodiment of the present application. Further, the storage device 11 can also be used to temporarily store various types of data that have been output or are to be output.

处理设备12在一些实施例中可以包括一个或者多个微处理器、微控制器、数字处理器等。该处理设备12通常用于控制电子装置1的运行,例如执行与终端设备2进行数据交互或者通信相关的控制和处理等。在本实施例中,处理设备12用于运行存储设备11中存储的程序代码或者处理数据,例如运行用户界面的测试系统10等。Processing device 12 may, in some embodiments, include one or more microprocessors, microcontrollers, digital processors, and the like. The processing device 12 is generally used to control the operation of the electronic device 1, for example, to perform control and processing related to data interaction or communication with the terminal device 2. In the present embodiment, the processing device 12 is configured to run program code or process data stored in the storage device 11, such as the test system 10 running a user interface, and the like.

网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在电子装置1与其他电子设备之间建立通信连接。本实施例中,网络接口13主要用于将电子装置1与一个或多个终端设备2相连,在电子装置1与一个或多个终端设备2之间建立数据传输通道和通信连接。The network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 1 and other electronic devices. In this embodiment, the network interface 13 is mainly used to connect the electronic device 1 with one or more terminal devices 2, and establish a data transmission channel and a communication connection between the electronic device 1 and one or more terminal devices 2.

用户界面的测试系统10包括至少一个存储在存储设备11中的计算机可读指令,该至少一个计算机可读指令可被处理设备12执行,以实现本申请各实施例的用户界面的测试方法。如后续所述,该至少一个计算机可读指令依据其各部分所实现的功能不同,可被划为不同的逻辑模块。The test system 10 of the user interface includes at least one computer readable instructions stored in the storage device 11, the at least one computer readable instructions being executable by the processing device 12 to implement a test method for a user interface of various embodiments of the present application. As described later, the at least one computer readable instruction can be classified into different logic modules depending on the functions implemented by its various parts.

在一实施例中,用户界面的测试系统10被处理设备12执行时,实现以下操作:接收预设时间内终端设备2发送来的该用户终端上显示的用户界面所对应的预设类型日子信息;对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确 定出各个待测试控件,以及各个待测试控件对应的操作类型;根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。In an embodiment, when the testing system 10 of the user interface is executed by the processing device 12, the following operations are performed: receiving the preset type date information corresponding to the user interface displayed on the user terminal sent by the terminal device 2 within a preset time Parsing the received preset type log information to parse out the operation control information and operation type information included in each preset type log information; according to the predetermined return of the parsed operation control information and/or operation type information Class rules are categorized to Determining the respective control types to be tested, and the operation types corresponding to the respective to-be-tested controls; determining the test codes corresponding to the respective control to be tested according to the predetermined mapping relationship between the control to be tested, the operation type and the test code, and based on each test to be tested The test code corresponding to the control generates a test script to test the user interface displayed on the user terminal by using the generated test script.

本发明提供一种用户界面的测试方法。The invention provides a test method for a user interface.

参照图2,图2为本发明用户界面的测试方法第一实施例的流程示意图。Referring to FIG. 2, FIG. 2 is a schematic flowchart diagram of a first embodiment of a test method for a user interface according to the present invention.

在第一实施例中,该用户界面的测试方法包括:In the first embodiment, the test method of the user interface includes:

步骤S10,接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;In step S10, the preset type log information corresponding to the user interface displayed on the user terminal sent by the user terminal is received in the preset time, and the preset type log information is that the user terminal is responding to the user for the user terminal. The preset type log information of the operation behavior that is detected and recorded during the operation behavior of the displayed user interface, and the preset type log information includes operation control information and operation type information;

本实施例中,在预先确定的需要进行测试的用户界面所在的用户终端(终端设备2)上,由该用户终端实时或定时监测每一次用户针对该用户界面的操作行为,若监测到用户针对该用户界面的一个操作行为被响应,则该用户终端侦测并记录该操作行为所对应的预设类型日志信息,所述预设类型日志信息包括操作控件信息(例如操作的控件名称、标识等)以及操作类型信息,该操作类型信息包括但不限于点击操作、滑动操作、滚动操作、拖动操作、按压操作等。In this embodiment, on the user terminal (terminal device 2) where the user interface that needs to be tested is determined, the user terminal monitors the operation behavior of the user for the user interface in real time or periodically, and if the user is monitored, An operation behavior of the user interface is responded, and the user terminal detects and records the preset type log information corresponding to the operation behavior, where the preset type log information includes operation control information (eg, operation control name, identifier, etc.) And operation type information including, but not limited to, a click operation, a slide operation, a scroll operation, a drag operation, a press operation, and the like.

在一种实施方式中,该用户终端可在监测到用户针对该用户界面的操作行为时,调取系统日志信息,并从系统日志信息中提取出该操作行为所对应的操作控件信息以及操作类型信息。在另一种实施方式中,该用户终端上预先配置有日志信息采集模块,通过该日志信息采集模块实时或定时地侦测并记录每一次用户针对该用户界面的操作行为所对应的操作控件信息以及操作类型信息。In an implementation manner, the user terminal may retrieve system log information when monitoring the user's operation behavior for the user interface, and extract operation control information and operation type corresponding to the operation behavior from the system log information. information. In another implementation manner, the user terminal is pre-configured with a log information collection module, and the log information collection module detects and records the operation control information corresponding to each user operation behavior of the user interface in real time or periodically. And operation type information.

接收预设时间内(例如,最近30天内)该用户终端发送来的预设类型日志信息,以获知每一次用户针对该用户界面的操作行为所对应的操作控件信息以及操作类型信息。The preset type log information sent by the user terminal is received within a preset time (for example, within the last 30 days) to obtain operation control information and operation type information corresponding to the operation behavior of the user for the user interface.

步骤S20,对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;In step S20, the received preset type log information is parsed to parse out the operation control information and the operation type information included in the log information of each preset type;

步骤S30,对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;Step S30, classifying the parsed operation control information and/or operation type information according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested;

所述对接收的预设类型日志信息进行解析,解析出各个预设类型日志信息中记录的操作控件信息和操作类型信息。对预设时间内每一次用户针对该用户界面的操作行为所对应的操作控件信息以及操作类型信息进行归类,如可按各个操作控件信息将操作控件相同或相近似的归为同一类,还可按操作类型信息将操作类型相同或相近似的归为同一类,还可按预先确定的同一测试代码与多种操作控件信息或操作类型信息的对应关系,将与同一测试代码 对应的多种操作控件信息或操作类型信息的操作控件归为同一类,等等。将归类后同一类的操作控件作为一个待测试控件,确定接收的预设类型日志信息中的各个待测试控件,以及各个待测试控件所对应的操作类型。The parsing of the received preset type log information is performed, and the operation control information and the operation type information recorded in the log information of each preset type are parsed. For each time in the preset time, the operation control information and the operation type information corresponding to the operation behavior of the user interface are classified, for example, the operation control information may be classified into the same class according to the operation control information, and The operations type information may be classified into the same class according to the operation type information, and may also be the same test code according to a predetermined correspondence between the same test code and various operation control information or operation type information. The corresponding operation controls of various operation control information or operation type information are classified into the same class, and the like. The operation control of the same class is classified as a control to be tested, and each control to be tested in the received preset type log information, and the operation type corresponding to each control to be tested are determined.

步骤S40,根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。Step S40: Determine a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generate a test script based on the test code corresponding to each test to be tested, so as to utilize the generated test. The script tests the user interface displayed on the user terminal.

确定出接收的预设类型日志信息中的各个待测试控件及其对应的操作类型之后,可根据预先确定的不同控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码。由于同一控件及其对应的操作类型所对应的测试代码是固定不变的,因此,可预先确定不同控件、操作类型和测试代码之间的映射关系,在确定出待测试控件及其对应的操作类型之后,即可根据预先确定的映射关系,得出待测试控件及其对应的操作类型所对应的模块化的测试代码。依次确定各个待测试控件对应的测试代码之后,即可对各个待测试控件对应的测试代码进行拼接、组合等简单的操作以生成最终的测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行各种操作类型的测试。After determining the to-be-tested control and the corresponding operation type in the received preset type log information, the test code corresponding to each test to be tested may be determined according to a predetermined mapping relationship between different controls, operation types, and test codes. . Since the test code corresponding to the same control and its corresponding operation type is fixed, the mapping relationship between different controls, operation types and test codes can be determined in advance, and the control to be tested and its corresponding operation are determined. After the type, the modular test code corresponding to the control to be tested and its corresponding operation type can be obtained according to the predetermined mapping relationship. After determining the test code corresponding to each test to be tested, the test code corresponding to each test to be tested can be spliced, combined, and the like to generate a final test script to display the user terminal by using the generated test script. The user interface performs tests for various types of operations.

本实施例通过对预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息进行解析,得到各个预设类型日志信息对应的操作控件信息和操作类型信息;并确定出各个待测试控件及对应的操作类型;根据预先确定的控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本来进行用户界面测试。由于是根据针对用户在用户界面上的操作行为所生成的日志信息进行解析,并根据用户的操作行为对应的操作控件信息和操作类型信息获取到各个待测试控件对应的测试代码,能自动根据获取的各个待测试控件对应的测试代码生成测试脚本,而无需开发人员人工编写测试脚本,效率较高且不易出错,而且,在后续用户界面的版本迭代时,只需重新获取迭代后的各个待测试控件对应的测试代码即可自动生成测试脚本,维护成本较低。In this embodiment, the preset type log information corresponding to the user interface displayed on the user terminal sent by the user terminal is parsed, and the operation control information and the operation type information corresponding to the log information of each preset type are obtained. And determining each control to be tested and the corresponding operation type; determining the test code corresponding to each control to be tested according to the predetermined mapping relationship between the control, the operation type and the test code, and based on the test code corresponding to each control to be tested Generate test scripts for user interface testing. The test code corresponding to the control to be tested is obtained according to the log information generated by the operation behavior of the user on the user interface, and the test code corresponding to the control to be tested is obtained according to the operation control information and the operation type information corresponding to the operation behavior of the user. The test code corresponding to each test to be tested generates a test script without requiring the developer to manually write the test script, which is more efficient and less error-prone, and only needs to re-acquire each iteration after the iteration of the subsequent user interface version. The test code corresponding to the control can automatically generate test scripts, and the maintenance cost is low.

进一步地,在其他实施例中,所述预先确定的归类规则包括:Further, in other embodiments, the predetermined categorization rules include:

对解析出的操作控件信息对应的操作类型信息进行归类,以将相同的操作控件信息对应的操作类型信息归为同一属性类,并将不同的操作控件信息对应的操作类型信息归为不同属性类;The operation type information corresponding to the parsed operation control information is classified, so that the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to different operation control information is classified into different attributes. class;

将每一属性类对应的操作控件作为待测试控件,并将每一属性类下的所有操作类型作为该属性类对应的待测试控件的对应操作类型。The operation control corresponding to each attribute class is used as a control to be tested, and all operation types under each attribute class are used as corresponding operation types of the control to be tested corresponding to the attribute class.

本实施例中在对解析出的操作控件信息和操作类型信息进行归类时,以操作控件信息为准进行归类,如当该操作控件信息为操作的控件名称时,可将相同控件名称及其对应的操作类型信息归为同一属性类,将不同控件名称及其对应的操作类型信息归为不同属性类。将同一控件名称对应的操作控件 作为待测试控件,并将同一控件名称下的所有操作类型作为该待测试控件的对应操作类型。由于同一控件名称对应的操作控件所对应的测试代码均相同或相似,因此,将相同控件名称及其对应的操作类型信息归为同一属性类,能将对应的测试代码相同或相似的操作控件归为一类,使得后续在根据预先确定的控件、操作类型和测试代码的映射关系确定各个待测试控件对应的测试代码时,只需根据同一类操作控件的不同操作类型找到各个操作类型对应的测试代码,而不用对每一个相同或不同操作控件信息的操作控件均进行查找,简化了查找过程,确定各个待测试控件对应的测试代码的效率更高。In the embodiment, when the parsed operation control information and the operation type information are classified, the operation control information is used as a classification, for example, when the operation control information is the operation control name, the same control name and The corresponding operation type information is classified into the same attribute class, and different control names and their corresponding operation type information are classified into different attribute classes. The operation control corresponding to the same control name As the control to be tested, and all the operation types under the same control name as the corresponding operation type of the control to be tested. Because the test code corresponding to the operation control corresponding to the same control name is the same or similar, the same control name and its corresponding operation type information are classified into the same attribute class, and the operation control with the same or similar test code can be returned. For a class, after determining the test code corresponding to each test to be tested according to the mapping relationship between the predetermined control, the operation type and the test code, it is only necessary to find the test corresponding to each operation type according to different operation types of the same type of operation control. The code does not need to search for the operation controls of each of the same or different operation control information, which simplifies the search process and determines that the test code corresponding to each control to be tested is more efficient.

进一步地,在其他实施例中,所述预先确定的归类规则还包括:Further, in other embodiments, the predetermined classification rule further includes:

分析每一属性类对应的操作控件是否包含在预设的待测试控件列表中,若是,则将该属性类对应的操作控件作为待测试控件。Analyze whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested.

本实施例中,在将相同的操作控件信息对应的操作类型信息归为同一属性类,将不同的操作控件信息对应的操作类型信息归为不同属性类之后,还对每一属性类对应的操作控件进行筛选,如可分析每一属性类对应的操作控件是否包含在预设的待测试控件列表中,若是,才将该属性类对应的操作控件作为待测试控件。这样,用户可根据实际应用中的测试需要来设定一待测试控件列表,如可根据每次测试的着重点不同,可增加或删除待测试控件列表中的待测试控件名单,即可控制后续确定的测试代码所对应的待测试控件为该次测试所需的待测试控件,实现测试代码的自定义获取,能更加灵活的生成所需的测试脚本,实用性更高。In this embodiment, after the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to the different operation control information is classified into different attribute classes, the operation corresponding to each attribute class is also performed. The control performs filtering, for example, whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested. In this way, the user can set a list of the control to be tested according to the test needs in the actual application. For example, according to the focus of each test, the list of the control to be tested in the list of the control to be tested can be added or deleted, and the subsequent control can be controlled. The control to be tested corresponding to the determined test code is the control to be tested required for the test, and the custom acquisition of the test code is realized, and the required test script can be generated more flexibly, and the utility is higher.

如图3所示,本发明第二实施例提出一种用户界面的测试方法,在上述实施例的基础上,在上述步骤S30之后还包括:As shown in FIG. 3, a second embodiment of the present invention provides a test method for a user interface. On the basis of the foregoing embodiment, after the step S30, the method further includes:

步骤S50,根据该用户界面的配置文件,确定出该用户界面对应的所有配置控件;Step S50: Determine, according to the configuration file of the user interface, all configuration controls corresponding to the user interface;

步骤S60,将确定出的各个待测试控件与各个配置控件进行比对,以筛选出所有配置控件中不是待测试控件的配置控件;Step S60, comparing the determined control to be tested with each configuration control to filter out configuration controls of all the configuration controls that are not to be tested;

步骤S70,生成提醒信息,以提醒为筛选出的配置控件添加测试代码,及/或,提醒针对筛选出的配置控件进行必要性检查。In step S70, a reminder message is generated to remind the user to add a test code to the selected configuration control, and/or to remind the necessary check for the selected configuration control.

本实施例中,在对解析出的操作控件信息和操作类型信息按照预先确定的归类规则进行归类并确定出各个待测试控件之后,进一步地,还根据该用户界面的配置文件,确定出该用户界面对应的所有配置控件,并将确定出的各个待测试控件与各个配置控件进行比对,以筛选出所有配置控件中不是待测试控件的配置控件。由于各个待测试控件是基于用户针对该用户界面的操作行为所确定出的,而用户针对该用户界面的操作行为有可能没有涉及到该用户界面上的所有控件。因此,要对该用户界面进行全面测试,则将确定出的各个待测试控件与该用户界面对应的所有配置控件进行比对,筛选出所有配置控件中不是待测试控件的配置控件,筛选出的配置控件即为用户针对该用户界面的操作行为所没有涉及到的该用户界面上的控件。则生成提醒信息如向预先确定的终端发送提醒信息,以提醒为筛选出的配置控件添加测试代 码,及/或,提醒针对筛选出的配置控件进行必要性检查,以为有必要进行测试的配置控件添加测试代码,并将添加的测试代码与各个待测试控件对应的测试代码一起组合形成最终完整的测试脚本,以更加全面的对用户界面进行测试。In this embodiment, after the parsed operation control information and the operation type information are classified according to a predetermined classification rule and the respective to-be-tested controls are determined, further, according to the configuration file of the user interface, The user interface corresponds to all the configuration controls, and compares the determined control to be tested with each configuration control to filter out the configuration controls of all the configuration controls that are not to be tested. Since each control to be tested is determined based on the user's operational behavior for the user interface, the user's operational behavior for the user interface may not involve all the controls on the user interface. Therefore, to comprehensively test the user interface, compare the determined control to be tested with all the configuration controls corresponding to the user interface, and filter out the configuration controls of all the configuration controls that are not to be tested, and filter out The configuration control is the control on the user interface that is not involved in the user's operation behavior for the user interface. Generating reminder information, such as sending reminder information to a predetermined terminal, to remind the user to add a test generation to the filtered configuration control Code, and/or, reminder to check the necessary configuration controls, add test code to the configuration control that is necessary to test, and combine the added test code with the test code corresponding to each control to be tested to form the final complete Test scripts to test the user interface more comprehensively.

本发明进一步提供一种用户界面的测试系统。The invention further provides a test system for a user interface.

参照图4,图4为本发明用户界面的测试系统第一实施例的功能模块示意图。Referring to FIG. 4, FIG. 4 is a schematic diagram of functional modules of a first embodiment of a test system for a user interface according to the present invention.

在第一实施例中,该用户界面的测试系统包括:In a first embodiment, the test system of the user interface comprises:

接收模块01,用于接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;The receiving module 01 is configured to receive preset type log information corresponding to the user interface displayed on the user terminal, and the preset type log information is that the user terminal responds to the user The preset type log information of the operation behavior is detected and recorded when the operation behavior of the user interface is displayed on the user terminal, and the preset type log information includes operation control information and operation type information;

本实施例中,在预先确定的需要进行测试的用户界面所在的用户终端上,由该用户终端实时或定时监测每一次用户针对该用户界面的操作行为,若监测到用户针对该用户界面的一个操作行为被响应,则该用户终端侦测并记录该操作行为所对应的预设类型日志信息,所述预设类型日志信息包括操作控件信息(例如操作的控件名称、标识等)以及操作类型信息,该操作类型信息包括但不限于点击操作、滑动操作、滚动操作、拖动操作、按压操作等。In this embodiment, on the user terminal where the predetermined user interface that needs to be tested is located, the user terminal monitors the operation behavior of the user for the user interface in real time or periodically, and if the user is monitored for the user interface, When the operation behavior is responded, the user terminal detects and records the preset type log information corresponding to the operation behavior, and the preset type log information includes operation control information (eg, operation control name, identifier, etc.) and operation type information. The operation type information includes, but is not limited to, a click operation, a slide operation, a scroll operation, a drag operation, a press operation, and the like.

在一种实施方式中,该用户终端可在监测到用户针对该用户界面的操作行为时,调取系统日志信息,并从系统日志信息中提取出该操作行为所对应的操作控件信息以及操作类型信息。在另一种实施方式中,该用户终端上预先配置有日志信息采集模块,通过该日志信息采集模块实时或定时地侦测并记录每一次用户针对该用户界面的操作行为所对应的操作控件信息以及操作类型信息。In an implementation manner, the user terminal may retrieve system log information when monitoring the user's operation behavior for the user interface, and extract operation control information and operation type corresponding to the operation behavior from the system log information. information. In another implementation manner, the user terminal is pre-configured with a log information collection module, and the log information collection module detects and records the operation control information corresponding to each user operation behavior of the user interface in real time or periodically. And operation type information.

测试系统接收预设时间内(例如,最近30天内)该用户终端发送来的预设类型日志信息,以获知每一次用户针对该用户界面的操作行为所对应的操作控件信息以及操作类型信息。The test system receives the preset type log information sent by the user terminal within a preset time (for example, the last 30 days) to obtain the operation control information and the operation type information corresponding to the operation behavior of the user for the user interface.

解析模块02,用于对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;The parsing module 02 is configured to parse the received preset type log information to parse the operation control information and the operation type information included in the log information of each preset type;

归类模块03,用于对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;The categorization module 03 is configured to classify the parsed operation control information and/or operation type information according to a predetermined categorization rule to determine each control to be tested, and an operation type corresponding to each control to be tested;

所述测试系统对接收的预设类型日志信息进行解析,解析出各个预设类型日志信息中记录的操作控件信息和操作类型信息。对预设时间内每一次用户针对该用户界面的操作行为所对应的操作控件信息以及操作类型信息进行归类,如可按各个操作控件信息将操作控件相同或相近似的归为同一类,还可按操作类型信息将操作类型相同或相近似的归为同一类,还可按预先确定的同一测试代码与多种操作控件信息或操作类型信息的对应关系,将与同一 测试代码对应的多种操作控件信息或操作类型信息的操作控件归为同一类,等等。将归类后同一类的操作控件作为一个待测试控件,确定接收的预设类型日志信息中的各个待测试控件,以及各个待测试控件所对应的操作类型。The test system parses the received preset type log information, and parses out operation control information and operation type information recorded in each preset type log information. For each time in the preset time, the operation control information and the operation type information corresponding to the operation behavior of the user interface are classified, for example, the operation control information may be classified into the same class according to the operation control information, and The operation type information may be classified into the same class according to the operation type information, or may be the same as the corresponding correspondence between the same test code and various operation control information or operation type information. The operation controls corresponding to various operation control information or operation type information corresponding to the test code are classified into the same class, and the like. The operation control of the same class is classified as a control to be tested, and each control to be tested in the received preset type log information, and the operation type corresponding to each control to be tested are determined.

生成模块04,用于根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。The generating module 04 is configured to determine a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generate a test script based on the test code corresponding to each control to be tested, to utilize The generated test script tests the user interface displayed on the user terminal.

确定出接收的预设类型日志信息中的各个待测试控件及其对应的操作类型之后,可根据预先确定的不同控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码。由于同一控件及其对应的操作类型所对应的测试代码是固定不变的,因此,可预先确定不同控件、操作类型和测试代码之间的映射关系,在确定出待测试控件及其对应的操作类型之后,即可根据预先确定的映射关系,得出待测试控件及其对应的操作类型所对应的模块化的测试代码。依次确定各个待测试控件对应的测试代码之后,即可对各个待测试控件对应的测试代码进行拼接、组合等简单的操作以生成最终的测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行各种操作类型的测试。After determining the to-be-tested control and the corresponding operation type in the received preset type log information, the test code corresponding to each test to be tested may be determined according to a predetermined mapping relationship between different controls, operation types, and test codes. . Since the test code corresponding to the same control and its corresponding operation type is fixed, the mapping relationship between different controls, operation types and test codes can be determined in advance, and the control to be tested and its corresponding operation are determined. After the type, the modular test code corresponding to the control to be tested and its corresponding operation type can be obtained according to the predetermined mapping relationship. After determining the test code corresponding to each test to be tested, the test code corresponding to each test to be tested can be spliced, combined, and the like to generate a final test script to display the user terminal by using the generated test script. The user interface performs tests for various types of operations.

本实施例通过测试系统对预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息进行解析,得到各个预设类型日志信息对应的操作控件信息和操作类型信息;并确定出各个待测试控件及对应的操作类型;根据预先确定的控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本来进行用户界面测试。由于是根据针对用户在用户界面上的操作行为所生成的日志信息进行解析,并根据用户的操作行为对应的操作控件信息和操作类型信息获取到各个待测试控件对应的测试代码,能自动根据获取的各个待测试控件对应的测试代码生成测试脚本,而无需开发人员人工编写测试脚本,效率较高且不易出错,而且,在后续用户界面的版本迭代时,只需重新获取迭代后的各个待测试控件对应的测试代码即可自动生成测试脚本,维护成本较低。In this embodiment, the test system parses the preset type log information corresponding to the user interface displayed on the user terminal, which is sent by the user terminal in the preset time, and obtains the operation control information and operation corresponding to the log information of each preset type. Type information; and determine each control to be tested and the corresponding operation type; according to the predetermined mapping relationship between the control, the operation type and the test code, determine the test code corresponding to each control to be tested, and based on the corresponding control to be tested The test code generates test scripts for user interface testing. The test code corresponding to the control to be tested is obtained according to the log information generated by the operation behavior of the user on the user interface, and the test code corresponding to the control to be tested is obtained according to the operation control information and the operation type information corresponding to the operation behavior of the user. The test code corresponding to each test to be tested generates a test script without requiring the developer to manually write the test script, which is more efficient and less error-prone, and only needs to re-acquire each iteration after the iteration of the subsequent user interface version. The test code corresponding to the control can automatically generate test scripts, and the maintenance cost is low.

进一步地,在其他实施例中,所述预先确定的归类规则包括:Further, in other embodiments, the predetermined categorization rules include:

对解析出的操作控件信息对应的操作类型信息进行归类,以将相同的操作控件信息对应的操作类型信息归为同一属性类,并将不同的操作控件信息对应的操作类型信息归为不同属性类;The operation type information corresponding to the parsed operation control information is classified, so that the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to different operation control information is classified into different attributes. class;

将每一属性类对应的操作控件作为待测试控件,并将每一属性类下的所有操作类型作为该属性类对应的待测试控件的对应操作类型。The operation control corresponding to each attribute class is used as a control to be tested, and all operation types under each attribute class are used as corresponding operation types of the control to be tested corresponding to the attribute class.

本实施例中在对解析出的操作控件信息和操作类型信息进行归类时,以操作控件信息为准进行归类,如当该操作控件信息为操作的控件名称时,可将相同控件名称及其对应的操作类型信息归为同一属性类,将不同控件名称及其对应的操作类型信息归为不同属性类。将同一控件名称对应的操作控件 作为待测试控件,并将同一控件名称下的所有操作类型作为该待测试控件的对应操作类型。由于同一控件名称对应的操作控件所对应的测试代码均相同或相似,因此,将相同控件名称及其对应的操作类型信息归为同一属性类,能将对应的测试代码相同或相似的操作控件归为一类,使得后续在根据预先确定的控件、操作类型和测试代码的映射关系确定各个待测试控件对应的测试代码时,只需根据同一类操作控件的不同操作类型找到各个操作类型对应的测试代码,而不用对每一个相同或不同操作控件信息的操作控件均进行查找,简化了查找过程,确定各个待测试控件对应的测试代码的效率更高。In the embodiment, when the parsed operation control information and the operation type information are classified, the operation control information is used as a classification, for example, when the operation control information is the operation control name, the same control name and The corresponding operation type information is classified into the same attribute class, and different control names and their corresponding operation type information are classified into different attribute classes. The operation control corresponding to the same control name As the control to be tested, and all the operation types under the same control name as the corresponding operation type of the control to be tested. Because the test code corresponding to the operation control corresponding to the same control name is the same or similar, the same control name and its corresponding operation type information are classified into the same attribute class, and the operation control with the same or similar test code can be returned. For a class, after determining the test code corresponding to each test to be tested according to the mapping relationship between the predetermined control, the operation type and the test code, it is only necessary to find the test corresponding to each operation type according to different operation types of the same type of operation control. The code does not need to search for the operation controls of each of the same or different operation control information, which simplifies the search process and determines that the test code corresponding to each control to be tested is more efficient.

进一步地,在其他实施例中,所述预先确定的归类规则还包括:Further, in other embodiments, the predetermined classification rule further includes:

分析每一属性类对应的操作控件是否包含在预设的待测试控件列表中,若是,则将该属性类对应的操作控件作为待测试控件。Analyze whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested.

本实施例中,在将相同的操作控件信息对应的操作类型信息归为同一属性类,将不同的操作控件信息对应的操作类型信息归为不同属性类之后,还对每一属性类对应的操作控件进行筛选,如可分析每一属性类对应的操作控件是否包含在预设的待测试控件列表中,若是,才将该属性类对应的操作控件作为待测试控件。这样,用户可根据实际应用中的测试需要来设定一待测试控件列表,如可根据每次测试的着重点不同,可增加或删除待测试控件列表中的待测试控件名单,即可控制后续确定的测试代码所对应的待测试控件为该次测试所需的待测试控件,实现测试代码的自定义获取,能更加灵活的生成所需的测试脚本,实用性更高。In this embodiment, after the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to the different operation control information is classified into different attribute classes, the operation corresponding to each attribute class is also performed. The control performs filtering, for example, whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested. In this way, the user can set a list of the control to be tested according to the test needs in the actual application. For example, according to the focus of each test, the list of the control to be tested in the list of the control to be tested can be added or deleted, and the subsequent control can be controlled. The control to be tested corresponding to the determined test code is the control to be tested required for the test, and the custom acquisition of the test code is realized, and the required test script can be generated more flexibly, and the utility is higher.

如图5所示,本发明第二实施例提出一种用户界面的测试系统,在上述实施例的基础上,还包括:As shown in FIG. 5, the second embodiment of the present invention provides a test system for a user interface. Based on the foregoing embodiments, the method further includes:

确定模块05,用于根据该用户界面的配置文件,确定出该用户界面对应的所有配置控件;a determining module 05, configured to determine, according to the configuration file of the user interface, all configuration controls corresponding to the user interface;

比对模块06,用于将确定出的各个待测试控件与各个配置控件进行比对,以筛选出所有配置控件中不是待测试控件的配置控件;The comparison module 06 is configured to compare the determined control to be tested with each configuration control to filter out configuration controls of all the configuration controls that are not to be tested;

提醒模块07,用于生成提醒信息,以提醒为筛选出的配置控件添加测试代码,及/或,提醒针对筛选出的配置控件进行必要性检查。The reminder module 07 is configured to generate reminder information to remind the test code to be added to the filtered configuration control, and/or to remind the necessary check for the filtered configuration control.

本实施例中,在对解析出的操作控件信息和操作类型信息按照预先确定的归类规则进行归类并确定出各个待测试控件之后,进一步地,还根据该用户界面的配置文件,确定出该用户界面对应的所有配置控件,并将确定出的各个待测试控件与各个配置控件进行比对,以筛选出所有配置控件中不是待测试控件的配置控件。由于各个待测试控件是基于用户针对该用户界面的操作行为所确定出的,而用户针对该用户界面的操作行为有可能没有涉及到该用户界面上的所有控件。因此,要对该用户界面进行全面测试,则将确定出的各个待测试控件与该用户界面对应的所有配置控件进行比对,筛选出所有配置控件中不是待测试控件的配置控件,筛选出的配置控件即为用户针对该用户界面的操作行为所没有涉及到的该用户界面上的控件。则生成提醒信息如向预先确定的终端发送提醒信息,以提醒为筛选出的配置控件添加测试代 码,及/或,提醒针对筛选出的配置控件进行必要性检查,以为有必要进行测试的配置控件添加测试代码,并将添加的测试代码与各个待测试控件对应的测试代码一起组合形成最终完整的测试脚本,以更加全面的对用户界面进行测试。In this embodiment, after the parsed operation control information and the operation type information are classified according to a predetermined classification rule and the respective to-be-tested controls are determined, further, according to the configuration file of the user interface, The user interface corresponds to all the configuration controls, and compares the determined control to be tested with each configuration control to filter out the configuration controls of all the configuration controls that are not to be tested. Since each control to be tested is determined based on the user's operational behavior for the user interface, the user's operational behavior for the user interface may not involve all the controls on the user interface. Therefore, to comprehensively test the user interface, compare the determined control to be tested with all the configuration controls corresponding to the user interface, and filter out the configuration controls of all the configuration controls that are not to be tested, and filter out The configuration control is the control on the user interface that is not involved in the user's operation behavior for the user interface. Generating reminder information, such as sending reminder information to a predetermined terminal, to remind the user to add a test generation to the filtered configuration control Code, and/or, reminder to check the necessary configuration controls, add test code to the configuration control that is necessary to test, and combine the added test code with the test code corresponding to each control to be tested to form the final complete Test scripts to test the user interface more comprehensively.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and can also be implemented by hardware, but in many cases, the former is A 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, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

以上参照附图说明了本发明的优选实施例,并非因此局限本发明的权利范围。上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。另外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The preferred embodiments of the present invention have been described above with reference to the drawings, and are not intended to limit the scope of the invention. The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments. Additionally, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.

本领域技术人员不脱离本发明的范围和实质,可以有多种变型方案实现本发明,比如作为一个实施例的特征可用于另一实施例而得到又一实施例。凡在运用本发明的技术构思之内所作的任何修改、等同替换和改进,均应在本发明的权利范围之内。 A person skilled in the art can implement the invention in various variants without departing from the scope and spirit of the invention. For example, the features of one embodiment can be used in another embodiment to obtain a further embodiment. Any modifications, equivalent substitutions and improvements made within the technical concept of the invention are intended to be included within the scope of the invention.

Claims (20)

一种用户界面的测试方法,其特征在于,所述方法包括以下步骤:A test method for a user interface, characterized in that the method comprises the following steps: 接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;And receiving, by the user terminal, the preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is the user that the user terminal displays in response to the user for the user terminal. The preset type log information of the operation behavior is detected and recorded during the operation behavior of the interface, and the preset type log information includes operation control information and operation type information; 对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;Parsing the received preset type log information to parse the operation control information and the operation type information included in the log information of each preset type; 对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;The parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested; 根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。Determining a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generating a test script based on the test code corresponding to each control to be tested, to use the generated test script to The user interface displayed on the user terminal is tested. 如权利要求1所述的用户界面的测试方法,其特征在于,所述预先确定的归类规则包括:The method for testing a user interface according to claim 1, wherein the predetermined classification rule comprises: 对解析出的操作控件信息对应的操作类型信息进行归类,以将相同的操作控件信息对应的操作类型信息归为同一属性类,并将不同的操作控件信息对应的操作类型信息归为不同属性类;The operation type information corresponding to the parsed operation control information is classified, so that the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to different operation control information is classified into different attributes. class; 将每一属性类对应的操作控件作为待测试控件,并将每一属性类下的所有操作类型作为该属性类对应的待测试控件的对应操作类型。The operation control corresponding to each attribute class is used as a control to be tested, and all operation types under each attribute class are used as corresponding operation types of the control to be tested corresponding to the attribute class. 如权利要求2所述的用户界面的测试方法,其特征在于,所述预先确定的归类规则包括:The method for testing a user interface according to claim 2, wherein the predetermined classification rule comprises: 分析每一属性类对应的操作控件是否包含在预设的待测试控件列表中,若是,则将该属性类对应的操作控件作为待测试控件。Analyze whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested. 如权利要求1或2所述的用户界面的测试方法,其特征在于,该方法还包括:The method for testing a user interface according to claim 1 or 2, further comprising: 根据该用户界面的配置文件,确定出该用户界面对应的所有配置控件;Determining, according to the configuration file of the user interface, all configuration controls corresponding to the user interface; 将确定出的各个待测试控件与各个配置控件进行比对,以筛选出所有配置控件中不是待测试控件的配置控件;Comparing the determined control to be tested with each configuration control to filter out configuration controls of all configuration controls that are not to be tested; 生成提醒信息,以提醒为筛选出的配置控件添加测试代码,及/或,提醒针对筛选出的配置控件进行必要性检查。Generate a reminder message to remind you to add test code to the filtered configuration control, and/or to remind you of the necessary checks for the filtered configuration controls. 如权利要求1或2所述的用户界面的测试方法,其特征在于,所述操作控件信息包括操作的控件名称,所述操作类型信息包括点击操作、滑动操作、滚动操作和/或拖动操作。The test method of the user interface according to claim 1 or 2, wherein the operation control information includes a control name of the operation, and the operation type information includes a click operation, a slide operation, a scroll operation, and/or a drag operation. . 一种用户界面的测试系统,其特征在于,所述测试系统包括:A test system for a user interface, characterized in that the test system comprises: 接收模块,用于接收预设时间内用户终端发送来的与该用户终端上显示 的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;a receiving module, configured to receive, after being sent by the user terminal, the user terminal, Preset type log information corresponding to the user interface, the preset type log information is a pre-detection and record of the operation behavior of the user terminal in response to the user's operation behavior on the user interface displayed on the user terminal. Setting the type log information, the preset type log information includes operation control information and operation type information; 解析模块,用于对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;The parsing module is configured to parse the received preset type log information to parse operation control information and operation type information included in each preset type log information; 归类模块,用于对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;a categorization module, configured to classify the parsed operation control information and/or operation type information according to a predetermined categorization rule to determine each control to be tested, and an operation type corresponding to each control to be tested; 生成模块,用于根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。a generating module, configured to determine a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generate a test script based on the test code corresponding to each control to be tested, to generate a test script The test script tests the user interface displayed on the user terminal. 如权利要求6所述的用户界面的测试系统,其特征在于,所述预先确定的归类规则包括:The test system of the user interface of claim 6, wherein the predetermined categorization rules comprise: 对解析出的操作控件信息对应的操作类型信息进行归类,以将相同的操作控件信息对应的操作类型信息归为同一属性类,并将不同的操作控件信息对应的操作类型信息归为不同属性类;The operation type information corresponding to the parsed operation control information is classified, so that the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to different operation control information is classified into different attributes. class; 将每一属性类对应的操作控件作为待测试控件,并将每一属性类下的所有操作类型作为该属性类对应的待测试控件的对应操作类型。The operation control corresponding to each attribute class is used as a control to be tested, and all operation types under each attribute class are used as corresponding operation types of the control to be tested corresponding to the attribute class. 如权利要求7所述的用户界面的测试系统,其特征在于,所述预先确定的归类规则包括:The test system of the user interface of claim 7, wherein the predetermined categorization rules comprise: 分析每一属性类对应的操作控件是否包含在预设的待测试控件列表中,若是,则将该属性类对应的操作控件作为待测试控件。Analyze whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested. 如权利要求6或7所述的用户界面的测试系统,其特征在于,还包括:The test system of the user interface according to claim 6 or 7, further comprising: 确定模块,用于根据该用户界面的配置文件,确定出该用户界面对应的所有配置控件;a determining module, configured to determine, according to the configuration file of the user interface, all configuration controls corresponding to the user interface; 比对模块,用于将确定出的各个待测试控件与各个配置控件进行比对,以筛选出所有配置控件中不是待测试控件的配置控件;The comparison module is configured to compare the determined control to be tested with each configuration control to filter out configuration controls of all configuration controls that are not to be tested; 提醒模块,用于生成提醒信息,以提醒为筛选出的配置控件添加测试代码,及/或,提醒针对筛选出的配置控件进行必要性检查。The reminder module is configured to generate a reminder message to remind the user to add a test code to the filtered configuration control, and/or to remind the necessary check for the filtered configuration control. 如权利要求6或7所述的用户界面的测试系统,其特征在于,所述操作控件信息包括操作的控件名称,所述操作类型信息包括点击操作、滑动操作、滚动操作和/或拖动操作。The test system for a user interface according to claim 6 or 7, wherein the operation control information includes a control name of the operation, and the operation type information includes a click operation, a slide operation, a scroll operation, and/or a drag operation. . 一种电子装置,包括处理设备、存储设备,该存储设备存储有用户界面的测试系统,该用户界面的测试系统包括至少一个计算机可读指令,该至少一个计算机可读指令可被所述处理设备执行,以实现以下操作:An electronic device comprising a processing device and a storage device, the storage device storing a test system of a user interface, the test system of the user interface comprising at least one computer readable instruction, the at least one computer readable instruction being readable by the processing device Execute to do the following: 接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针 对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息;And receiving, by the user terminal, preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is that the user terminal is responding to the user pin The preset type log information of the operation behavior is detected and recorded when the operation behavior of the user interface is displayed on the user terminal, and the preset type log information includes operation control information and operation type information; 对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;Parsing the received preset type log information to parse the operation control information and the operation type information included in the log information of each preset type; 对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;The parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested; 根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。Determining a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generating a test script based on the test code corresponding to each control to be tested, to use the generated test script to The user interface displayed on the user terminal is tested. 如权利要求11所述的电子装置,其特征在于,所述预先确定的归类规则包括:The electronic device of claim 11, wherein the predetermined categorization rules comprise: 对解析出的操作控件信息对应的操作类型信息进行归类,以将相同的操作控件信息对应的操作类型信息归为同一属性类,并将不同的操作控件信息对应的操作类型信息归为不同属性类;The operation type information corresponding to the parsed operation control information is classified, so that the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to different operation control information is classified into different attributes. class; 将每一属性类对应的操作控件作为待测试控件,并将每一属性类下的所有操作类型作为该属性类对应的待测试控件的对应操作类型。The operation control corresponding to each attribute class is used as a control to be tested, and all operation types under each attribute class are used as corresponding operation types of the control to be tested corresponding to the attribute class. 如权利要求11所述的电子装置,其特征在于,所述预先确定的归类规则包括:The electronic device of claim 11, wherein the predetermined categorization rules comprise: 分析每一属性类对应的操作控件是否包含在预设的待测试控件列表中,若是,则将该属性类对应的操作控件作为待测试控件。Analyze whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested. 如权利要求11或12所述的电子装置,其特征在于,该至少一个计算机可读指令可被所述处理设备执行,还实现以下操作:The electronic device according to claim 11 or 12, wherein the at least one computer readable instruction is executable by the processing device, and further performing the following operations: 根据该用户界面的配置文件,确定出该用户界面对应的所有配置控件;Determining, according to the configuration file of the user interface, all configuration controls corresponding to the user interface; 将确定出的各个待测试控件与各个配置控件进行比对,以筛选出所有配置控件中不是待测试控件的配置控件;Comparing the determined control to be tested with each configuration control to filter out configuration controls of all configuration controls that are not to be tested; 生成提醒信息,以提醒为筛选出的配置控件添加测试代码,及/或,提醒针对筛选出的配置控件进行必要性检查。Generate a reminder message to remind you to add test code to the filtered configuration control, and/or to remind you of the necessary checks for the filtered configuration controls. 如权利要求11或12所述的电子装置,其特征在于,所述操作控件信息包括操作的控件名称,所述操作类型信息包括点击操作、滑动操作、滚动操作和/或拖动操作。The electronic device according to claim 11 or 12, wherein the operation control information includes a control name of the operation, and the operation type information includes a click operation, a slide operation, a scroll operation, and/or a drag operation. 一种计算机可读存储介质,其上存储有至少一个可被处理设备执行以实现以下操作的计算机可读指令:A computer readable storage medium having stored thereon at least one computer readable instruction executable by a processing device to: 接收预设时间内用户终端发送来的与该用户终端上显示的用户界面所对应的预设类型日志信息,所述预设类型日志信息为该用户终端在响应用户针对该用户终端上显示的用户界面的操作行为时,侦测并记录的该操作行为的预设类型日志信息,所述预设类型日志信息包括操作控件信息、操作类型信息; And receiving, by the user terminal, the preset type log information corresponding to the user interface displayed on the user terminal, where the preset type log information is the user that the user terminal displays in response to the user for the user terminal. The preset type log information of the operation behavior is detected and recorded during the operation behavior of the interface, and the preset type log information includes operation control information and operation type information; 对接收的预设类型日志信息进行解析,以解析出各个预设类型日志信息所包含的操作控件信息和操作类型信息;Parsing the received preset type log information to parse the operation control information and the operation type information included in the log information of each preset type; 对解析出的操作控件信息和/或操作类型信息按照预先确定的归类规则进行归类,以确定出各个待测试控件,以及各个待测试控件对应的操作类型;The parsed operation control information and/or the operation type information are classified according to a predetermined classification rule to determine each control to be tested, and an operation type corresponding to each control to be tested; 根据预先确定的待测试控件、操作类型和测试代码的映射关系,确定出各个待测试控件对应的测试代码,并基于各个待测试控件对应的测试代码生成测试脚本,以利用生成的测试脚本对该用户终端上显示的用户界面进行测试。Determining a test code corresponding to each test to be tested according to a predetermined mapping relationship between the control to be tested, an operation type, and a test code, and generating a test script based on the test code corresponding to each control to be tested, to use the generated test script to The user interface displayed on the user terminal is tested. 如权利要求16所述的计算机可读存储介质,其特征在于,所述预先确定的归类规则包括:The computer readable storage medium of claim 16 wherein said predetermined categorization rules comprise: 对解析出的操作控件信息对应的操作类型信息进行归类,以将相同的操作控件信息对应的操作类型信息归为同一属性类,并将不同的操作控件信息对应的操作类型信息归为不同属性类;The operation type information corresponding to the parsed operation control information is classified, so that the operation type information corresponding to the same operation control information is classified into the same attribute class, and the operation type information corresponding to different operation control information is classified into different attributes. class; 将每一属性类对应的操作控件作为待测试控件,并将每一属性类下的所有操作类型作为该属性类对应的待测试控件的对应操作类型。The operation control corresponding to each attribute class is used as a control to be tested, and all operation types under each attribute class are used as corresponding operation types of the control to be tested corresponding to the attribute class. 如权利要求16所述的计算机可读存储介质,其特征在于,所述预先确定的归类规则包括:The computer readable storage medium of claim 16 wherein said predetermined categorization rules comprise: 分析每一属性类对应的操作控件是否包含在预设的待测试控件列表中,若是,则将该属性类对应的操作控件作为待测试控件。Analyze whether the operation control corresponding to each attribute class is included in the preset control list to be tested, and if so, the operation control corresponding to the attribute class is used as the control to be tested. 如权利要求16或17所述的计算机可读存储介质,其特征在于,所述至少一个计算机指令被处理设备执行时还实现以下操作:The computer readable storage medium of claim 16 or 17, wherein the at least one computer instruction is further executed by the processing device to: 根据该用户界面的配置文件,确定出该用户界面对应的所有配置控件;Determining, according to the configuration file of the user interface, all configuration controls corresponding to the user interface; 将确定出的各个待测试控件与各个配置控件进行比对,以筛选出所有配置控件中不是待测试控件的配置控件;Comparing the determined control to be tested with each configuration control to filter out configuration controls of all configuration controls that are not to be tested; 生成提醒信息,以提醒为筛选出的配置控件添加测试代码,及/或,提醒针对筛选出的配置控件进行必要性检查。Generate a reminder message to remind you to add test code to the filtered configuration control, and/or to remind you of the necessary checks for the filtered configuration controls. 如权利要求16或17所述的计算机可读存储介质,其特征在于,所述操作控件信息包括操作的控件名称,所述操作类型信息包括点击操作、滑动操作、滚动操作和/或拖动操作。 The computer readable storage medium according to claim 16 or 17, wherein the operation control information includes a control name of the operation, and the operation type information includes a click operation, a slide operation, a scroll operation, and/or a drag operation. .
PCT/CN2017/091256 2016-12-30 2017-06-30 Method and system for testing user interface, electronic device, and computer readable storage medium Ceased WO2018120721A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611265743.7A CN106874190B (en) 2016-12-30 2016-12-30 The method of testing and server of user interface
CN201611265743.7 2016-12-30

Publications (1)

Publication Number Publication Date
WO2018120721A1 true WO2018120721A1 (en) 2018-07-05

Family

ID=59165371

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/091256 Ceased WO2018120721A1 (en) 2016-12-30 2017-06-30 Method and system for testing user interface, electronic device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN106874190B (en)
WO (1) WO2018120721A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297758A (en) * 2019-05-20 2019-10-01 深圳壹账通智能科技有限公司 User interface automated testing method, device and computer readable storage medium
CN111694752A (en) * 2020-07-28 2020-09-22 中移(杭州)信息技术有限公司 Application testing method, electronic device and storage medium
CN111913868A (en) * 2019-05-07 2020-11-10 杭州海康威视数字技术股份有限公司 User interface testing method, device, system and storage medium
CN112084108A (en) * 2020-08-28 2020-12-15 山东英信计算机技术有限公司 Test script generation method and device and related components
CN112115062A (en) * 2020-09-28 2020-12-22 海尔优家智能科技(北京)有限公司 Method and device for detecting attribute information, storage medium and electronic device
CN112732576A (en) * 2021-01-08 2021-04-30 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface
CN114003506A (en) * 2021-11-10 2022-02-01 广州易方信息科技股份有限公司 A method for interface testing and monitoring based on log recording
CN117331847A (en) * 2023-12-01 2024-01-02 成都中科合迅科技有限公司 Automatic test method and system supporting graphic interface

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874190B (en) * 2016-12-30 2018-03-16 上海壹账通金融科技有限公司 The method of testing and server of user interface
CN107783867B (en) * 2017-07-25 2020-02-14 深圳壹账通智能科技有限公司 Gesture testing method and device, computer equipment and storage medium
CN107729223A (en) * 2017-08-31 2018-02-23 福建天晴数码有限公司 A kind of method and device of recording user operation on mobile terminals
CN108228183B (en) * 2018-01-12 2022-07-12 北京三快在线科技有限公司 Front-end interface code generation method and device, electronic equipment and storage medium
CN108491325B (en) * 2018-03-20 2021-12-07 Oppo广东移动通信有限公司 File system testing method and device, storage medium and terminal
CN109271323B (en) * 2018-10-10 2022-03-15 东软集团股份有限公司 Page element processing method and device, test equipment and storage medium
CN109684210A (en) * 2018-12-18 2019-04-26 宁夏隆基宁光仪表股份有限公司 A kind of website automation test method, device, equipment and readable storage medium storing program for executing
CN109800165A (en) * 2019-01-14 2019-05-24 中国银行股份有限公司 A kind of front end system test method and device
CN110032515B (en) * 2019-04-12 2022-08-19 中国银行股份有限公司 Interface test case generation method and device and storage medium
CN111143228B (en) * 2019-12-31 2023-09-19 中国银行股份有限公司 Test code generation method and device based on decision table method
CN114859859A (en) * 2022-04-26 2022-08-05 重庆长安汽车股份有限公司 A body control module testing system and its testing method
CN114968783A (en) * 2022-05-27 2022-08-30 湖南快乐阳光互动娱乐传媒有限公司 Automatic small program testing method and system, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130007519A1 (en) * 2011-06-30 2013-01-03 Microsoft Corporation Test Framework Extension for Testing Logic on a Modeled User Interface
CN103544106A (en) * 2013-10-31 2014-01-29 广东欧珀移动通信有限公司 Method and device for generating script based on control
CN103631590A (en) * 2013-11-29 2014-03-12 广东明创软件科技有限公司 Method for editing automated testing script
CN104881364A (en) * 2015-06-26 2015-09-02 上海斐讯数据通信技术有限公司 Automated testing method and system applied to Android system
CN105224456A (en) * 2015-09-29 2016-01-06 北京奇虎科技有限公司 A kind of test script generates methods, devices and systems
CN106874190A (en) * 2016-12-30 2017-06-20 上海亿账通互联网科技有限公司 The method of testing and server of user interface

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8732665B2 (en) * 2011-06-28 2014-05-20 Microsoft Corporation Deploying environments for testing by providing instantaneous availability of prebuilt environments
CN103713989B (en) * 2012-09-29 2018-02-02 百度在线网络技术(北京)有限公司 A kind of method for generating test case and device for user terminal
CN105373478B (en) * 2015-12-14 2018-06-08 广州华多网络科技有限公司 Automated testing method and system
CN106021099A (en) * 2016-05-12 2016-10-12 上海联彤网络通讯技术有限公司 System and method for achieving UI automatic test of intelligent terminal
CN106021102B (en) * 2016-05-16 2019-05-28 北京奇虎科技有限公司 The generation method and device of automatic test file

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130007519A1 (en) * 2011-06-30 2013-01-03 Microsoft Corporation Test Framework Extension for Testing Logic on a Modeled User Interface
CN103544106A (en) * 2013-10-31 2014-01-29 广东欧珀移动通信有限公司 Method and device for generating script based on control
CN103631590A (en) * 2013-11-29 2014-03-12 广东明创软件科技有限公司 Method for editing automated testing script
CN104881364A (en) * 2015-06-26 2015-09-02 上海斐讯数据通信技术有限公司 Automated testing method and system applied to Android system
CN105224456A (en) * 2015-09-29 2016-01-06 北京奇虎科技有限公司 A kind of test script generates methods, devices and systems
CN106874190A (en) * 2016-12-30 2017-06-20 上海亿账通互联网科技有限公司 The method of testing and server of user interface

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111913868A (en) * 2019-05-07 2020-11-10 杭州海康威视数字技术股份有限公司 User interface testing method, device, system and storage medium
CN111913868B (en) * 2019-05-07 2023-08-04 杭州海康威视数字技术股份有限公司 User interface testing method, device, system and storage medium
CN110297758A (en) * 2019-05-20 2019-10-01 深圳壹账通智能科技有限公司 User interface automated testing method, device and computer readable storage medium
CN111694752A (en) * 2020-07-28 2020-09-22 中移(杭州)信息技术有限公司 Application testing method, electronic device and storage medium
CN111694752B (en) * 2020-07-28 2023-09-05 中移(杭州)信息技术有限公司 Application testing method, electronic device and storage medium
CN112084108A (en) * 2020-08-28 2020-12-15 山东英信计算机技术有限公司 Test script generation method and device and related components
CN112115062A (en) * 2020-09-28 2020-12-22 海尔优家智能科技(北京)有限公司 Method and device for detecting attribute information, storage medium and electronic device
CN112732576A (en) * 2021-01-08 2021-04-30 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface
CN112732576B (en) * 2021-01-08 2024-06-04 网易(杭州)网络有限公司 Automatic testing method, device and equipment based on user interface
CN114003506A (en) * 2021-11-10 2022-02-01 广州易方信息科技股份有限公司 A method for interface testing and monitoring based on log recording
CN117331847A (en) * 2023-12-01 2024-01-02 成都中科合迅科技有限公司 Automatic test method and system supporting graphic interface
CN117331847B (en) * 2023-12-01 2024-01-30 成都中科合迅科技有限公司 Automated testing methods and systems supporting graphical interfaces

Also Published As

Publication number Publication date
CN106874190A (en) 2017-06-20
CN106874190B (en) 2018-03-16

Similar Documents

Publication Publication Date Title
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
CN104518924B (en) Automatic testing and result comparison method and system
US11119843B2 (en) Verifying application behavior based on distributed tracing
CN110532169A (en) Interface testing case generation method, device, computer equipment and storage medium
CN111552633A (en) Interface exception call testing method, device, computer equipment and storage medium
CN110851471B (en) Distributed log data processing method, device and system
US10754748B2 (en) System and method for constructing extensible event log with javascript object notation (JSON) encoded payload data
CN103268226A (en) Method and device for generating test script file
JP7713058B2 (en) AUTOMATED CONTROL OF DISTRIBUTED COMPUTING DEVICES - Patent application
US10713070B2 (en) Systems and methods for capturing and visualizing user interactions across devices
CN103109293B (en) A user behavior processing system and method
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
CN113792341A (en) Privacy compliance automation detection method, device, equipment and medium for application program
CN113609008A (en) Test result analysis method and device and electronic equipment
CN114968725A (en) Task dependency relationship correction method and device, computer equipment and storage medium
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
CN111209181B (en) Regression testing method, system, device and computer storage medium
CN112416700B (en) Analyzing startup predictive failure and SMART logs
CN115878400A (en) Test method, test apparatus, computer device, storage medium, and program product
CN114090428A (en) Information processing method, information processing device, computer-readable storage medium and computer equipment
CN108628909A (en) Information-pushing method and device
CN117679749A (en) A method, device, equipment and medium for processing game application data
CN115878460A (en) Regression testing method, device, computer equipment and storage medium
US9275358B1 (en) System, method, and computer program for automatically creating and submitting defect information associated with defects identified during a software development lifecycle to a defect tracking system
CN114936148A (en) Page testing method and device, electronic equipment and readable storage medium

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

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

Country of ref document: EP

Kind code of ref document: A1