CN113419950A - Method and device for generating UI automation script, computer equipment and storage medium - Google Patents

Method and device for generating UI automation script, computer equipment and storage medium Download PDF

Info

Publication number
CN113419950A
CN113419950A CN202110692102.4A CN202110692102A CN113419950A CN 113419950 A CN113419950 A CN 113419950A CN 202110692102 A CN202110692102 A CN 202110692102A CN 113419950 A CN113419950 A CN 113419950A
Authority
CN
China
Prior art keywords
user
data
test
test case
generating
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.)
Pending
Application number
CN202110692102.4A
Other languages
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.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202110692102.4A priority Critical patent/CN113419950A/en
Publication of CN113419950A publication Critical patent/CN113419950A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the field of test cases, and discloses a method and a device for generating a UI automation script, computer equipment and a storage medium, wherein the method comprises the following steps: globally monitoring a user operation event of a specified application through a first embedded point rule to obtain user operation information and configuration data; generating a user behavior track according to the user operation information, inputting the user behavior track and service data into a preset association model, and obtaining a service weight which is output by the association model and corresponds to the user behavior track; when the business weight is greater than or equal to a preset threshold value, setting a test case according to a user behavior track corresponding to the business weight; and executing the test steps related to the test case in a preset recording environment to obtain a test script of the test case. The invention improves the accuracy and efficiency of UI automatic test and saves the time required by test.

Description

Method and device for generating UI automation script, computer equipment and storage medium
Technical Field
The invention relates to the field of test cases, in particular to a method and a device for generating a UI automation script, computer equipment and a storage medium.
Background
With the rapid development of the internet, the application of a UI (User Interface, i.e. User Interface) automation framework is more and more extensive, and most enterprises develop corresponding UI automation frameworks according to the needs of their own services. The mainstream UI automation framework is uiautomator, appium, robotium, Airtest, webdriveragent, selenium, etc. However, due to the situations of complex business links of enterprises, dispersion of front-end business personnel, personnel change and the like, the use and maintenance of the UI automation framework have at least the following problems:
1. the UI automatic test case is obtained by a manual case instead of an on-line user real behavior track conversion;
2. the technical threshold of UI automatic test generation is high, a large amount of learning and coding time of testers is consumed when the UI automatic test generation is installed from the environment to the code generation, the test quality is low, and the operation failure rate is high;
3. because the front-end page changes frequently, the UI automation test script requires a lot of manpower and time to maintain.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for generating a UI automation script, a computer device, and a storage medium for generating a test script based on an on-line user real behavior track to solve the problem of low efficiency of UI automation test.
A method for generating a UI automation script, comprising:
globally monitoring a user operation event of a specified application through a first embedded point rule to obtain user operation information and configuration data;
generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service;
inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track;
when the business weight is greater than or equal to a preset threshold value, setting a test case according to the user behavior track corresponding to the business weight;
and executing the test steps related to the test case in a preset recording environment to obtain a test script of the test case.
An apparatus for generating a UI automation script, comprising:
the user data acquisition module is used for carrying out overall monitoring on a user operation event of the specified application through a first embedded point rule to acquire user operation information and configuration data;
the user data processing module is used for generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service;
the association model module is used for inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track;
the test case module is used for setting a test case according to the user behavior track corresponding to the business weight when the business weight is greater than or equal to a preset threshold value;
and the test script module is used for executing the test steps related to the test case in a preset recording environment to obtain the test script of the test case.
A computer device comprising a memory, a processor and computer readable instructions stored in the memory and executable on the processor, the processor implementing the method of generating a UI automation script as described above when executing the computer readable instructions.
One or more readable storage media storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform a method of generating a UI automation script as described above.
According to the method and the device for generating the UI automation script, the computer equipment and the storage medium, the user operation event of the specified application is monitored globally through the first embedded point rule, and user operation information and configuration data are acquired; generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service; inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track; when the business weight is greater than or equal to a preset threshold value, setting a test case according to the user behavior track corresponding to the business weight; and executing the test steps related to the test case in a preset recording environment to obtain a test script of the test case. According to the method and the device, the real operation of the user is obtained through the buried point, the behavior track of the user is generated, the behavior track of the user with higher service weight is obtained through the association model, and then the test script associated with the service is obtained. The invention improves the accuracy and efficiency of UI automatic test and saves the time required by test.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram of an application environment for a method for generating UI automation scripts in accordance with an embodiment of the present invention;
FIG. 2 is a flow diagram of a method for generating UI automation scripts in accordance with an embodiment of the invention;
FIG. 3 is a block diagram of an apparatus for generating UI automation scripts in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method for generating the UI automation script provided by this embodiment can be applied to an application environment as shown in fig. 1, in which a client communicates with a server. The client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, a method for generating a UI automation script is provided, which is described by taking the method as an example of being applied to a server in fig. 1, and includes the following steps:
and S10, performing global monitoring on the user operation event of the specified application through the first fixed point rule, and acquiring user operation information and configuration data.
It is understood that the first fixed point rule refers to a monitoring rule adopted when monitoring elements of a specified application page. The first embedding rule can adopt a full embedding mode and is used for tracking series of behaviors of a user on each page of the platform. The global monitoring refers to monitoring global self-defined elements of a specified application page in a full-buried point mode. The user operation event is an operation event such as a click or a slide of the user in a designated application page. User operation events such as user clicking and sliding and element information and page information corresponding to the user operation events can be recorded through global monitoring. Meanwhile, the configuration data of the page is recorded. The configuration data refers to environment operation information provided by the configuration platform.
S20, generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service.
Specifically, all the monitored elements of the page are obtained, all the monitored elements are traversed, and a monitoring event is added. And when monitoring that a certain element is clicked, acquiring element information, page information and configuration data of the clicked element, collecting the element information, the page information and the configuration data, storing the element information, the page information and the configuration data in a local cache library, setting a timing task, and reporting the collected element information, the collected page information and the collected configuration data of the clicked element to a data uploading platform. And calculating the routing process and the operation process of the page according to the element information and the page information of the element clicked by the user, thereby obtaining the behavior track of the user. The data uploading platform is a storage management platform for the buried point data. The target service is a service for embedding points according to requirements. By embedding points in the target service, the service data can be collected, a timing task is set, and the service data is reported to the data uploading platform. The service data comprises service ID, element information, page information, user operation event, element binding data and the like, and the service data has an association relation with a plurality of service pages. A configuration platform is a platform that provides configuration data.
S30, inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track.
Understandably, the preset association model is a model based on a frequent itemset algorithm. Frequently occurring data sets in the data values can be found out through a preset correlation model. The business data and a plurality of business pages have an incidence relation. The frequent item set can be evaluated through the support degree, the confidence degree and the promotion degree. In one example, the frequent item set is calculated as follows:
inputting: a data set D (user behavior track and service data), a support threshold value alpha;
and (3) outputting: the largest frequent k term set.
(1) And scanning the whole data set to obtain all the appeared data as a candidate frequent 1 item set. k is 1, and the frequent 0 item set is an empty set.
(2) Mining a frequent k term set:
scanning data to calculate the support degree of a candidate frequent k item set;
and removing the data set with the support degree lower than the threshold value in the candidate frequent k item set to obtain the frequent k item set. And if the obtained frequent k item set is empty, directly returning the set of the frequent k-1 item set as an algorithm result, and ending the algorithm. And if the obtained frequent k item set has only one item, directly returning the set of the frequent k item set as an algorithm result, and ending the algorithm.
Based on the frequent k term set, the connection generates a candidate frequent k +1 term set.
(3) Let k be k +1 and proceed to step 2.
Through the steps (1) to (3), the frequent item set (service page) corresponding to the user behavior track can be obtained, so that the times of the frequent item set being accessed by the user are obtained, and the access rate of the frequent item set (service page) being accessed by the user, namely the service weight of the service page, is calculated.
And S40, when the business weight is larger than or equal to a preset threshold value, setting a test case according to the user behavior track corresponding to the business weight.
It will be appreciated that the preset threshold may be set according to actual needs. And when the service weight is greater than or equal to a preset threshold value, acquiring a user behavior track corresponding to the service weight, and setting the user behavior track as a test case. When the service weight is smaller than the preset threshold, the user behavior track corresponding to the service weight may not be set as the test case.
And S50, executing the test steps related to the test case in a preset recording environment to obtain the test script of the test case.
Understandably, the preset recording environment is a preset tool for recording the test cases, and the test steps related to the test cases can be automatically recorded, so that the test scripts are generated. The test script comprises a script method or a library, a module and a method which are depended by keywords. Specifically, when the test case is recorded, the operation information and the element information of the test case are standardized to obtain a list which is output as a json object, an event in the list is extracted and converted into a method name or a keyword which is required in the test script, parameters in the list are extracted and used as corresponding parameters of the method name or the keyword in the test script, and page information in the list is extracted to generate the name of the test script.
In the embodiment S10-S50, the user operation event of the designated application is monitored globally through a first embedded point rule, and user operation information and configuration data are acquired; generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service; inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track; when the business weight is greater than or equal to a preset threshold value, setting a test case according to the user behavior track corresponding to the business weight; and executing the test steps related to the test case in a preset recording environment to obtain a test script of the test case. According to the method and the device, the real operation of the user is obtained through the buried point, the behavior track of the user is generated, the behavior track of the user with higher service weight is obtained through the association model, and then the test script associated with the service is obtained. The accuracy and the efficiency of UI automation test are improved, and the time required by the test is saved.
Optionally, in step S10, the obtaining configuration data includes:
s101, when a local interface recording switch of a user side is in an open state, acquiring request contents of the user through a plurality of designated interfaces; the plurality of designated interfaces are determined according to the interface configuration data after the user side acquires the interface configuration data from the configuration platform; the request content is the content fed back by the service system aiming at the request information after the user side sends the request information to the service system;
and S102, generating the configuration data according to the request content.
It can be understood that the local interface recording switch is arranged at the user end, and the request content of the user can be acquired through a plurality of designated interfaces only when the local interface recording switch of the user end is in an open state. The configuration platform comprises a plurality of configuration data and a plurality of interface configuration data corresponding to the configuration data.
In an example, when the local interface recording switch is in an on state, the user side sends request information to the service system, the service system feeds back the request information, and the request content is obtained according to the feedback content. Specifically, the user side obtains interface configuration data from the configuration platform, and can determine a plurality of designated interfaces according to the interface configuration data. The requested content of the user can be obtained through a plurality of specified interfaces. Further, configuration data is generated according to the content of the request of the user.
Optionally, in step S10, that is, the acquiring the user operation information, further includes:
s103, when the operation of the user for accessing the specified application is monitored, recording the operation of the user on the specified application, and generating user operation information.
Understandably, when monitoring the operation of the user for accessing the specified application, recording operation events such as clicking and sliding performed by the user when accessing the specified application, and element information and page information corresponding to the user operation events, and generating user operation information. For example, when it is monitored that the user accesses a panning application, the operations of clicking, sliding and the like performed by the user in the application are recorded, and the element information and the page information clicked by the user are recorded, for example, when the user jumps out of an a page link of a certain activity after entering panning, and clicks the link and enters an a page of the activity, the information of the link and the information of the a page are recorded.
Optionally, in step S20, the reporting the user operation information to a data uploading platform includes:
s104, acquiring a first reporting interface of the data uploading platform, and reporting the user operation information to the data uploading platform through the first reporting interface.
Understandably, when monitoring the operation of the user for accessing the specified application, recording operation events such as clicking and sliding performed by the user when accessing the specified application, and element information and page information corresponding to the user operation events, and generating user operation information. The data uploading platform provides a plurality of reporting interfaces, and different reporting interfaces are configured for reporting different data. And when data is reported, acquiring a corresponding reporting interface, and reporting the data to the data uploading platform. And acquiring a first reporting interface from the data uploading platform, and reporting the user operation information to the data uploading platform.
Optionally, before step S10, that is, before the globally monitoring the user operation event of the specified application by the first fixed point rule and acquiring the user operation information and the configuration data, the method further includes:
s105, embedding points of the target service through a second embedding point rule, and collecting the service data through the embedded points;
s106, acquiring a second reporting interface of the data uploading platform, and reporting the service data to the data uploading platform through the second reporting interface.
It can be understood that the second embedded point rule refers to a monitoring rule adopted when monitoring elements of the service page, and the second embedded point rule can adopt a back-end embedded point mode and is used for collecting service data such as service ID, element information, page information, user operation events, element binding data and the like of specified services. And when the data is reported, acquiring a corresponding reporting interface, and reporting the data to the data uploading platform through the reporting interface. In an example, the second reporting interface is obtained from the data uploading platform, and the obtained service data is reported to the data uploading platform at regular time.
Optionally, in step S50, that is, the step of executing the test case in the preset recording environment to obtain the test script of the test case includes:
s501, judging whether the local cache library contains configuration data corresponding to the test case;
s502, when the local cache library contains the configuration data corresponding to the test case, executing a first recording operation of the test case according to the configuration data corresponding to the test case in the local cache library;
and S503, generating a first test script according to the first recording operation.
Understandably, the preset recording environment can automatically record the test steps related to the test cases, and can generate the test scripts. When the test case is recorded through the preset recording environment, configuration data corresponding to the test case needs to be acquired to complete recording of the test case. The configuration platform comprises a plurality of configuration data, the configuration data of the configuration platform is randomly configured to the client, and different configuration data have different contents displayed on the page of the client. Resulting in the possibility that the user will not be the same page displayed by the mobile application each time the user opens it.
Specifically, the obtained test case is input into an automatic generation system, and when the test case is recorded by the automatic generation system, whether configuration data corresponding to the test case exists in a local cache library or not can be inquired through test case data. And if the local cache library is inquired to have the corresponding configuration data, acquiring the configuration data to execute the operation in the test case, and determining the operation as the first recording operation. And the automatic generation system generates a test script corresponding to the first recording operation according to the first recording operation, and determines the test script as the first test script.
Optionally, after step S501, that is, after determining whether the local cache library includes the configuration data corresponding to the test case, the method further includes:
s504, when the local cache library does not contain the configuration data corresponding to the test case, executing a second recording operation of the test case according to the configuration data of the server;
and S505, generating a second test script according to the second recording operation.
It can be understood that if the configuration data corresponding to the test case is not queried in the local cache library, the configuration data corresponding to the test case cannot be acquired from the local cache library to execute the recording operation.
Specifically, when the local cache library does not contain configuration data corresponding to the test case, the real configuration data is obtained from the mobile application server to execute the recording operation of the test case, and the operation is determined as a second recording operation. And the automatic generation system generates a test script corresponding to the second recording operation according to the second recording operation, and determines the test script as the second test script.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In one embodiment, there is provided a UI automation script generation apparatus, which corresponds one-to-one to the generation method of the UI automation script in the above-described embodiment. As shown in fig. 3, the UI automation script generation apparatus includes a user data acquisition module 10, a user data processing module 20, an association model module 30, a test case module 40, and a test script module 50. The functional modules are explained in detail as follows:
the user data acquisition module 10 is configured to perform global monitoring on a user operation event of a specific application through a first embedded point rule, and acquire user operation information and configuration data;
the user data processing module 20 is configured to generate a user behavior track according to the user operation information, store the user operation information and the configuration data in a local cache library, report the user operation information to a data uploading platform, and send the configuration data to the configuration platform; the data uploading platform stores service data of a target service;
the association model module 30 is configured to input the user behavior trajectory and the service data into a preset association model, and obtain a service weight output by the association model and corresponding to the user behavior trajectory;
the test case module 40 is configured to set a test case according to the user behavior trajectory corresponding to the service weight when the service weight is greater than or equal to a preset threshold;
and the test script module 50 is configured to execute the test steps related to the test case in a preset recording environment to obtain a test script of the test case.
Optionally, the user data obtaining module 10 includes:
the request content acquisition unit is used for acquiring the request content of the user through a plurality of designated interfaces when a local interface recording switch of the user side is in an open state; the plurality of designated interfaces are determined according to the interface configuration data after the user side acquires the interface configuration data from the configuration platform; the request content is the content fed back by the service system aiming at the request information after the user side sends the request information to the service system;
and the configuration data generating unit is used for generating the configuration data according to the request content.
Optionally, the user data obtaining module 10 further includes:
and the user operation information unit is used for recording the operation of the user on the specified application to generate user operation information when the operation of the user for accessing the specified application is monitored.
Optionally, the user data processing module 20 includes:
and the user operation information processing unit is used for acquiring a first reporting interface of the data uploading platform and reporting the user operation information to the data uploading platform through the first reporting interface.
Optionally, before the user data obtaining module 10, the method includes:
the service data unit is used for embedding points into the target service through a second point embedding rule and collecting the service data through the embedded points;
and the service data processing unit is used for acquiring a second reporting interface of the data uploading platform and reporting the service data to the data uploading platform through the second reporting interface.
Optionally, the test script module 50 further includes:
the judging unit is used for judging whether the local cache library contains configuration data corresponding to the test case;
the first recording operation unit is used for executing a first recording operation of the test case according to the configuration data corresponding to the test case in the local cache library when the local cache library contains the configuration data corresponding to the test case;
and the first test script unit is used for generating a first test script according to the first recording operation.
Optionally, after the determining unit, the method further includes:
the second recording operation unit is used for executing second recording operation of the test case according to the configuration data of the server side when the local cache library does not contain the configuration data corresponding to the test case;
and the second test script unit is used for generating a second test script according to the second recording operation.
For specific limitations of the UI automation script generation device, reference may be made to the above limitations of the UI automation script generation method, which will not be described herein again. The respective modules in the UI automation script generation apparatus described above may be entirely or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a readable storage medium and an internal memory. The readable storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operating system and execution of computer-readable instructions in the readable storage medium. The database of the computer device is used for storing data related to the generation method of the UI automation script. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer readable instructions, when executed by a processor, implement a method of generating a UI automation script. The readable storage media provided by the present embodiment include nonvolatile readable storage media and volatile readable storage media.
In one embodiment, a computer device is provided, comprising a memory, a processor, and computer readable instructions stored on the memory and executable on the processor, the processor when executing the computer readable instructions implementing the steps of:
globally monitoring a user operation event of a specified application through a first embedded point rule to obtain user operation information and configuration data;
generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service;
inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track;
when the business weight is greater than or equal to a preset threshold value, setting a test case according to the user behavior track corresponding to the business weight;
and executing the test steps related to the test case in a preset recording environment to obtain a test script of the test case.
In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided, the readable storage media provided by the embodiments including non-volatile readable storage media and volatile readable storage media. The readable storage medium has stored thereon computer readable instructions which, when executed by one or more processors, perform the steps of:
globally monitoring a user operation event of a specified application through a first embedded point rule to obtain user operation information and configuration data;
generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service;
inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track;
when the business weight is greater than or equal to a preset threshold value, setting a test case according to the user behavior track corresponding to the business weight;
and executing the test steps related to the test case in a preset recording environment to obtain a test script of the test case.
It will be understood by those of ordinary skill in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware related to computer readable instructions, which may be stored in a non-volatile readable storage medium or a volatile readable storage medium, and when executed, the computer readable instructions may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for generating a UI automation script, comprising:
globally monitoring a user operation event of a specified application through a first embedded point rule to obtain user operation information and configuration data;
generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service;
inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track;
when the business weight is greater than or equal to a preset threshold value, setting a test case according to the user behavior track corresponding to the business weight;
and executing the test steps related to the test case in a preset recording environment to obtain a test script of the test case.
2. The method of generating a UI automation script of claim 1 wherein the obtaining configuration data comprises:
when a local interface recording switch of a user side is in an open state, acquiring request contents of the user through a plurality of designated interfaces; the plurality of designated interfaces are determined according to the interface configuration data after the user side acquires the interface configuration data from the configuration platform; the request content is the content fed back by the service system aiming at the request information after the user side sends the request information to the service system;
and generating the configuration data according to the request content.
3. The method for generating a UI automation script according to claim 1, wherein the acquiring user operation information includes:
and when monitoring the operation of the user accessing the specified application, recording the operation of the user on the specified application to generate the user operation information.
4. The method for generating the UI automation script of claim 3, wherein the reporting the user operation information to a data uploading platform comprises:
and acquiring a first reporting interface of the data uploading platform, and reporting the user operation information to the data uploading platform through the first reporting interface.
5. The method for generating a UI automation script according to claim 1, wherein the globally monitoring the user operation event of the specified application by the first fixed point rule before acquiring the user operation information and the configuration data comprises:
embedding points of a target service through a second point embedding rule, and collecting the service data through the embedded points;
and acquiring a second reporting interface of the data uploading platform, and reporting the service data to the data uploading platform through the second reporting interface.
6. The method for generating the UI automation script of claim 1, wherein the step of executing the test related to the test case in a preset recording environment to obtain the test script of the test case comprises:
judging whether the local cache library contains configuration data corresponding to the test case or not;
when the local cache library contains configuration data corresponding to the test case, executing a first recording operation of the test case according to the configuration data corresponding to the test case in the local cache library;
and generating a first test script according to the first recording operation.
7. The method for generating a UI automation script of claim 6, after determining whether the local cache library contains configuration data corresponding to the test case, further comprising:
when the local cache library does not contain the configuration data corresponding to the test case, executing a second recording operation of the test case according to the configuration data of the server;
and generating a second test script according to the second recording operation.
8. An apparatus for generating a UI automation script, comprising:
the user data acquisition module is used for carrying out overall monitoring on a user operation event of the specified application through a first embedded point rule to acquire user operation information and configuration data;
the user data processing module is used for generating a user behavior track according to the user operation information, storing the user operation information and the configuration data in a local cache library, reporting the user operation information to a data uploading platform, and sending the configuration data to the configuration platform; the data uploading platform stores service data of a target service;
the association model module is used for inputting the user behavior track and the service data into a preset association model to obtain a service weight which is output by the association model and corresponds to the user behavior track;
the test case module is used for setting a test case according to the user behavior track corresponding to the business weight when the business weight is greater than or equal to a preset threshold value;
and the test script module is used for executing the test steps related to the test case in a preset recording environment to obtain the test script of the test case.
9. A computer device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer readable instructions, implements a method of generating a UI automation script as claimed in any one of claims 1 to 7.
10. One or more readable storage media storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform a method of generating a UI automation script as claimed in any one of claims 1 to 7.
CN202110692102.4A 2021-06-22 2021-06-22 Method and device for generating UI automation script, computer equipment and storage medium Pending CN113419950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110692102.4A CN113419950A (en) 2021-06-22 2021-06-22 Method and device for generating UI automation script, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110692102.4A CN113419950A (en) 2021-06-22 2021-06-22 Method and device for generating UI automation script, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113419950A true CN113419950A (en) 2021-09-21

Family

ID=77716061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110692102.4A Pending CN113419950A (en) 2021-06-22 2021-06-22 Method and device for generating UI automation script, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113419950A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003499A (en) * 2021-11-02 2022-02-01 中国银行股份有限公司 POS machine testing method and device
CN114090436A (en) * 2021-11-12 2022-02-25 乐元素科技(北京)股份有限公司 Test method and device
CN115934574A (en) * 2023-03-02 2023-04-07 云账户技术(天津)有限公司 Automatic recording method, system, electronic device and medium for interface test case

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140303756A1 (en) * 2013-04-05 2014-10-09 Stephan A. Tarnutzer Human-Machine Interface Test System
CN106202430A (en) * 2016-07-13 2016-12-07 武汉斗鱼网络科技有限公司 Live platform user interest-degree digging system based on correlation rule and method for digging
CN110297758A (en) * 2019-05-20 2019-10-01 深圳壹账通智能科技有限公司 User interface automated testing method, device and computer readable storage medium
CN110309061A (en) * 2019-05-24 2019-10-08 深圳壹账通智能科技有限公司 Automated testing method, device and storage medium, computer equipment
CN111104324A (en) * 2019-12-17 2020-05-05 广州品唯软件有限公司 Test case generation method, test case generation device and computer-readable storage medium
CN112115039A (en) * 2019-06-21 2020-12-22 百度在线网络技术(北京)有限公司 Test case generation method, device and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140303756A1 (en) * 2013-04-05 2014-10-09 Stephan A. Tarnutzer Human-Machine Interface Test System
CN106202430A (en) * 2016-07-13 2016-12-07 武汉斗鱼网络科技有限公司 Live platform user interest-degree digging system based on correlation rule and method for digging
CN110297758A (en) * 2019-05-20 2019-10-01 深圳壹账通智能科技有限公司 User interface automated testing method, device and computer readable storage medium
CN110309061A (en) * 2019-05-24 2019-10-08 深圳壹账通智能科技有限公司 Automated testing method, device and storage medium, computer equipment
CN112115039A (en) * 2019-06-21 2020-12-22 百度在线网络技术(北京)有限公司 Test case generation method, device and equipment
CN111104324A (en) * 2019-12-17 2020-05-05 广州品唯软件有限公司 Test case generation method, test case generation device and computer-readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003499A (en) * 2021-11-02 2022-02-01 中国银行股份有限公司 POS machine testing method and device
CN114090436A (en) * 2021-11-12 2022-02-25 乐元素科技(北京)股份有限公司 Test method and device
CN115934574A (en) * 2023-03-02 2023-04-07 云账户技术(天津)有限公司 Automatic recording method, system, electronic device and medium for interface test case

Similar Documents

Publication Publication Date Title
CN110399293B (en) System test method, device, computer equipment and storage medium
CN109522287B (en) Monitoring method, system, equipment and medium for distributed file storage cluster
CN110209652B (en) Data table migration method, device, computer equipment and storage medium
CN113419950A (en) Method and device for generating UI automation script, computer equipment and storage medium
CN110868241B (en) Underground cable fault early warning method and device based on multiple models
CN110113224B (en) Capacity monitoring method and device, computer equipment and storage medium
CN110941555B (en) Test case recommendation method and device, computer equipment and storage medium
CN110309109B (en) Data monitoring method, device, computer equipment and storage medium
CN112491602B (en) Behavior data monitoring method and device, computer equipment and medium
CN110888911A (en) Sample data processing method and device, computer equipment and storage medium
CN111176767B (en) Table data processing method, apparatus, computer device and storage medium
CN112866319B (en) Log data processing method, system and storage medium
CN110362479B (en) System upgrade test method and system
CN113159737B (en) RPA service processing method, RPA management platform, device and medium
CN110750443A (en) Webpage testing method and device, computer equipment and storage medium
CN109542764B (en) Webpage automatic testing method and device, computer equipment and storage medium
CN115277677B (en) Batch file hanging method and device, computer equipment and storage medium
CN114610635A (en) Interface test case generation method and device, computer equipment and storage medium
CN111078500A (en) Method and device for adjusting operation configuration parameters, computer equipment and storage medium
CN112379913B (en) Software optimization method, device, equipment and storage medium based on risk identification
CN112884435A (en) Service data processing method, device, system, computer equipment and storage medium
CN116662126A (en) RPA-based system abnormality prompting method, device, equipment and medium
CN112686010B (en) Resource data report generation method, device, computer equipment and storage medium
CN114385498A (en) Performance test method, system, computer equipment and readable storage medium
CN113934595A (en) Data analysis method and system, storage medium and electronic terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination