Performance test method and device of application program, electronic equipment and storage medium

By simulating user operations to obtain application log information, and utilizing a vector space model and a lightweight image recognition algorithm, the system can quickly identify and classify application crashes, white screens, and black screens, solving the problem of low identification efficiency in existing technologies and improving software testing efficiency.

CN118132429BActive Publication Date: 2025-11-28ABC FINANCIAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410271469.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-11
Publication Date
2025-11-28
Estimated Expiration
2044-03-11

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively identify and categorize performance issues such as crashes, white screens, and black screens that occur during application use, leading to low efficiency in software development and testing.

Method used

By simulating user operations to obtain application log information, extracting and generating vectors of target text, retrieving pre-generated sample information, using a vector space model to match sample text with target text, performing classification and labeling, and combining a lightweight image recognition algorithm to identify black and white screen problems.

Benefits of technology

It enables rapid identification and classification of application performance issues, improves software development and testing efficiency, reduces model training costs, and enhances testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118132429B_ABST
    Figure CN118132429B_ABST
Patent Text Reader

Abstract

The application provides a performance test method and device of an application program, electronic equipment and a storage medium, and relates to the technical field of software testing. The application program is simulated to operate, and log information of the application program is acquired. Then, target text matched with a performance to be tested is extracted from the log information, and a vector of the target text is generated. Further, sample information of the performance to be tested is called, the sample information contains pre-generated structured information of different samples, and the structured information contains a vector of sample text of the sample. Finally, the vector of the sample text is matched with the vector of the target text, and the application program is classified and marked based on the performance to be tested in the case that the target text has a target sample according to a matching result. The application can simulate user operation and text vector matching to quickly identify and classify performance problems such as crash, black screen and white screen during use of the application program, and improve software development and testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software testing, and more particularly to a performance testing method and device of an application program, an electronic device and a storage medium. BACKGROUND

[0002] Software testing is an important part of the software development process and an important means of software quality assurance. Performance, as an important quality indicator of an application program (APP), is an important part of software testing.

[0003] Therefore, how to effectively identify performance problems such as crashes, white screens and black screens that occur during application use has become a problem that needs to be solved at the present stage. SUMMARY

[0004] Therefore, in order to solve the above problems, the present application provides a performance testing method and device of an application program, an electronic device and a storage medium, and the technical solutions are as follows:

[0005] A performance testing method of an application program, the performance testing method of the application program comprising:

[0006] Simulating user operation of the application program to obtain log information of the application program;

[0007] Extracting target text in the log information that matches the performance to be tested and generating a vector of the target text;

[0008] Retrieving sample information of the performance to be tested, the sample information including pre-generated structured information of different samples, the structured information including a vector of sample text of the sample;

[0009] Matching the vector of the sample text with the vector of the target text, and in the case where it is determined according to the matching result that the target text has a target sample, classifying and labeling the application program based on the performance to be tested.

[0010] Preferably, the performance to be tested is application crash, the sample text is crash stack text, and the structured information further includes first solution information and record information of the sample;

[0011] The extracting of the target text in the log information that matches the performance to be tested and the generating of the vector of the target text comprises:

[0012] Extracting system stack text in the log information that matches the application crash and generating a vector of the system stack text;

[0013] The matching the vector of the sample text with the vector of the target text, and in the case that it is determined according to the matching result that the target text has the target sample to which it belongs, classifying and labeling the application program based on the to-be-tested performance, comprises:

[0014] Calculating a first similarity between the vector of the crash stack text and the vector of the system stack text;

[0015] Taking the sample with the highest first similarity and greater than a preset first similarity threshold in the sample information as the target sample to which the system stack text belongs;

[0016] Classifying and labeling the application program based on the first resolution information and the record information of the target sample.

[0017] Preferably, the to-be-tested performance is application black and white screen, the sample text is a first request path text, the structured information further comprises an image category and second resolution information of the belonging sample, and the image category is application black screen or application white screen.

[0018] The extracting the target text matching the to-be-tested performance in the log information and generating the vector of the target text, comprises:

[0019] Extracting a second request path text matching the application black and white screen in the log information and generating the vector of the second request path text;

[0020] The matching the vector of the sample text with the vector of the target text, and in the case that it is determined according to the matching result that the target text has the target sample to which it belongs, classifying and labeling the application program based on the to-be-tested performance, comprises:

[0021] Calculating a second similarity between the vector of the first request path text and the vector of the second request path text;

[0022] Taking the sample with the highest second similarity and greater than a preset second similarity threshold in the sample information as the target sample to which the second request path text belongs;

[0023] Classifying and labeling the application program based on the image category and the second resolution information of the target sample.

[0024] Preferably, the determination method of the image category comprises:

[0025] Collecting image information of the belonging sample and converting the image information into an RGB three-dimensional array;

[0026] Randomly selecting a plurality of pixel points from the image information, and performing mean value calculation on a three-dimensional array corresponding to each pixel point in the RGB three-dimensional array to obtain a one-dimensional array;

[0027] Performing mean value calculation on the one-dimensional array to obtain a pixel mean value of the image information;

[0028] If the pixel mean value is less than a preset first pixel threshold value, determining that the image category is an application black screen;

[0029] If the pixel mean value is greater than a preset second pixel threshold value, determining that the image category is an application white screen, the second pixel threshold value being greater than the first pixel threshold value.

[0030] Preferably, the performance test method of the application program further comprises:

[0031] Outputting a detection report based on the classification and labeling result of the application program.

[0032] A performance test device of an application program, comprising:

[0033] A log acquisition module configured to acquire log information of the application program by simulating user operation of the application program;

[0034] A vector generation module configured to extract target text matching a to-be-tested performance from the log information and generate a vector of the target text;

[0035] A sample retrieval module configured to retrieve sample information of the to-be-tested performance, the sample information comprising pre-generated structured information of different samples, the structured information comprising a vector of sample text of a sample belonging to the structured information;

[0036] A classification and labeling module configured to match the vector of the sample text with the vector of the target text, and in a case where it is determined according to a matching result that the target text has a target sample belonging to the target text, perform classification and labeling on the application program based on the to-be-tested performance.

[0037] Preferably, the to-be-tested performance is an application crash, the sample text is a crash stack text, and the structured information further comprises first solution information and record information of a sample belonging to the structured information.

[0038] The vector generation module is specifically configured to:

[0039] Extract system stack text matching the application crash from the log information and generate a vector of the system stack text;

[0040] The classification and labeling module is specifically configured to:

[0041] calculate a first similarity between the vector of the crash stack text and the vector of the system stack text; take a sample with the highest first similarity and greater than a preset first similarity threshold in the sample information as a target sample to which the system stack text belongs; and classify and label the application program based on the first resolution information and the record information of the target sample.

[0042] Preferably, the to-be-tested performance is application of black and white screens, the sample text is a first request path text, and the structured information further includes an image category and second resolution information of the target sample, the image category being application of black screens or application of white screens.

[0043] The vector generation module is specifically configured to:

[0044] extract a second request path text matched with the application of black and white screens from the log information, and generate a vector of the second request path text;

[0045] The classification and labeling module is specifically configured to:

[0046] calculate a second similarity between the vector of the first request path text and the vector of the second request path text; take a sample with the highest second similarity and greater than a preset second similarity threshold in the sample information as a target sample to which the second request path text belongs; and classify and label the application program based on the image category and the second resolution information of the target sample.

[0047] An electronic device, comprising at least one memory and at least one processor; the memory stores an application program, and the processor invokes the application program stored in the memory, and the application program is used to implement the performance testing method of the application program.

[0048] A storage medium, which stores computer program code, and the computer program code implements the performance testing method of the application program when executed.

[0049] Compared with the prior art, the application has the following beneficial effects:

[0050] The application provides a performance test method and device of an application program, electronic equipment and a storage medium. BRIEF DESCRIPTION OF DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of the provided drawings.

[0052] Figure 1 The method flowchart of the performance test method of the application program provided by the embodiment of the present application;

[0053] Figure 2 The partial method flowchart of the performance test method of the application program provided by the embodiment of the present application;

[0054] Figure 3 The structural schematic diagram of the performance test device of the application program provided by the embodiment of the present application. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the scope of protection of the present application.

[0056] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0057] In order to facilitate understanding of the present application, the related concepts involved in the present application are described as follows:

[0058] White screen, black screen: there is a very important indicator in the application performance indicator, which is the white screen and black screen rate, which is an abnormal use experience. From the technical point of view, it is because the page is not loaded into the layout file, and the window background is displayed. The reasons for white screen and black screen are that the terminal has been used for a long time, the page loading is too slow, the memory is small, the network problem, the program design problem and so on cause the execution time of onRusume method to be long.

[0059] Appium: an open source mobile automation testing framework that can test native, hybrid and mobile web projects. It can test Android, Ios applications, and supports multiple languages. It uses the WebDriver protocol to drive Android, Ios and Windows applications.

[0060] Vector space model (VSM, Vector Space Model): an algebraic model applied to information filtering, information retrieval, indexing and relevance evaluation. The processing of text content is simplified as vector operation in vector space, and it expresses the similarity of semantics in space, which is intuitive and easy to understand. When the document is represented as a vector in the document space, the similarity between documents can be measured by calculating the similarity between vectors. The most common similarity measure in text processing is cosine distance.

[0061] See Figure 1 , Figure 1 The method flow chart of the application performance test method provided by the embodiment of the application. As Figure 1 shown, the application performance test method comprises the following steps:

[0062] S10, by simulating user operation of the application program, obtaining log information of the application program.

[0063] In order to detect the performance problems such as crash, black screen, white screen and the like occurred in the use process of the application program, the application utilizes the mobile terminal automation testing tool Appium to simulate user UI (User Interface, user interface) operation, and automatically saves the test results in the automatic screenshot during the UI test process.

[0064] It should be noted that Appium is an automation testing tool because Appium can support Android and Ios across platforms, a set of test scripts can be used to test Android and Ios, without providing multiple sets of test scripts. In this regard, the application can use Appium to write an automatic execution script for UI operation of the application program and start the test, so as to save the log information in the test process to the data server.

[0065] Based on this, in the process of simulating user operation of the application program by the Appium, the log information of the application program can be captured, the log information can record the operation behavior of the user to the user program, and the system processing process of the application program can also be recorded.

[0066] In addition, an automatic data reporting SDK can be embedded in the application program, the log information collected by the Appium is reported to a remote application server, and the remote application server implements the performance test method of the application program.

[0067] S20, target text matching the to-be-tested performance is extracted from the log information, and a vector of the target text is generated.

[0068] In the embodiment of the application, for performance problems such as crash, black screen, white screen, etc., the to-be-tested performance can be set, and then the text matching the to-be-tested performance is extracted from the log information as the target text, and the vector space model is used to process the target text to obtain the vector of the target text. Specifically, the weight of each word in the vector of the target text can be calculated by term frequency (TF) and inverse document frequency (IDF), and the specific weight calculation formula is shown in the following formula (1):

[0069]

[0070] Wherein, v i represents the i th word in the target text, TF i represents the term frequency of v i , IDF i represents the inverse document frequency of v i , f i represents the frequency of v i in the target text, n represents the total number of words in the target text, N represents the total number of target texts, and m i represents the total number of texts containing v i .

[0071] S30, sample information of the to-be-tested performance is called, the sample information contains pre-generated structured information of different samples, and the structured information contains the vector of the sample text of the sample.

[0072] In the embodiment of the present application, for different types of performance to be tested, corresponding sample information can be generated in advance, which includes a plurality of samples, each sample has corresponding structured information, and the structured information at least includes the vector of the sample text of the sample to which the structured information belongs. For example, for the application crash as the performance to be tested, the structured information of each sample in the sample information at least includes the crash stack text and the vector of the crash stack text; for example, for the application black screen and the application white screen (hereinafter referred to as the application black and white screen) as the performance to be tested, the structured information of each sample in the sample information at least includes the image category (divided into the application black screen and the application white screen), the request path text (i.e., the first request path text), and the vector of the request path text.

[0073] It should be noted that the vector of the sample text in the structured data of the sample in the embodiment of the present application is also obtained by processing the sample text using the vector space model, which will not be described here.

[0074] In S40, the vector of the sample text is matched with the vector of the target text, and in the case that it is determined according to the matching result that the target text has the target sample to which it belongs, the application program is classified and labeled based on the performance to be tested.

[0075] In the embodiment of the present application, the vector of the target text is matched with the vector of the sample text of each sample, so as to determine the sample to which the target text belongs, i.e., the target sample. Therefore, it can be determined that the application program has the problem of the performance to be tested, and the application program can be classified and labeled based on the performance to be tested.

[0076] Specifically, the cosine similarity calculation can be used to match the similarity between the vector of the sample text and the vector of the target text. The cosine similarity calculation can use the following formula (2) shown:

[0077]

[0078] wherein Distince v,q represents the similarity between the vector q of the sample text and the vector v of the target text, q i represents the i th word in the sample text, and the total number of words in the sample text is also n.

[0079] In the specific implementation process, when the performance to be tested is the application crash, and the sample text is the crash stack text, the structured information in the sample information further includes the solution information (i.e., the first solution information) and the record information of the sample to which it belongs. The first solution information includes a flag bit indicating whether the solution is solved, a solution code, and the like, and the record information includes the crash reason, the crash time, the device model, and the like.

[0080] In practical applications, the original information obtained from the data source can be processed into structured data through data preprocessing. After obtaining the vector of the crash stack text using the vector space model, the vector of the crash stack text can be written back to the structured data through the write-back operation.

[0081] Based on this, the step S20 of "extracting the target text matched with the to-be-tested performance in the log information, and generating the vector of the target text" can adopt the following steps:

[0082] extracting the system stack text matched with the application crash in the log information, and generating the vector of the system stack text;

[0083] The step S40 of "matching the vector of the sample text with the vector of the target text, and in the case that it is determined that the target text has the target sample to which it belongs according to the matching result, classifying and labeling the application program based on the to-be-tested performance" can adopt the following steps:

[0084] calculating the first similarity between the vector of the crash stack text and the vector of the system stack text;

[0085] selecting the sample with the highest first similarity and greater than a preset first similarity threshold in the sample information as the target sample to which the system stack text belongs;

[0086] classifying and labeling the application program based on the first resolution information and the record information of the target sample.

[0087] Specifically, in the embodiment of the application, the similarity between the vector of the crash stack text and the vector of the system stack text of each sample can be calculated by cosine similarity calculation, that is, the first similarity; further, the sample with the highest first similarity and greater than a preset first similarity threshold (such as 0.75) is selected as the target sample to which the system stack text belongs, which can determine that the system stack text has an intersection with the sample information; further, the application program is classified and labeled based on the first resolution information and the record information of the target sample.

[0088] In the specific implementation process, when the to-be-tested performance is application black and white screen and the sample text is the first request path text, the structured information further includes the image category and the resolution information (i.e., the second resolution information) of the belonging sample, and the image category is application black screen or application white screen. The second resolution information contains a flag bit indicating whether the resolution is successful, resolution code and other information.

[0089] In practical applications, the original information obtained from the data source can be processed into structured data through data preprocessing. After obtaining the vector of the first request path text using the vector space model, the vector of the first request path text can be written back to the structured data through the write-back operation.

[0090] Based on this, the step S20 "extracts the target text matched with the to-be-tested performance in the log information, and generates the vector of the target text" can adopt the following steps:

[0091] extracting the second request path text matched with the application black and white screen in the log information, and generating the vector of the second request path text;

[0092] The step S40 "matches the vector of the sample text with the vector of the target text, and in the case that it is determined that the target text has the target sample belonging to it according to the matching result, classifies and labels the application program based on the to-be-tested performance" can adopt the following steps:

[0093] calculating a second similarity between the vector of the first request path text and the vector of the second request path text;

[0094] taking the sample with the highest second similarity and greater than a preset second similarity threshold in the sample information as the target sample to which the second request path text belongs;

[0095] classifying and labeling the application program based on the image category of the target sample and the second resolution information.

[0096] Specifically, after the request path text (i.e., the second request path text) is extracted from the log information in the embodiment of the application, the vector of the second request path text can be obtained using the vector space model; then the similarity between the vector of the first request path text and the vector of the second request path text of each sample, i.e., the second similarity, can be calculated through cosine similarity calculation; further, the sample with the highest second similarity and greater than a preset second similarity threshold (such as 0.85) is selected as the target sample to which the second request path text belongs, so that it can be determined that the second request path text has intersection with the sample information; further, the application program is classified and labeled based on the image category of the target sample and the second resolution information.

[0097] In addition, the traditional deep learning image recognition scheme requires a large sample order and high computing power to recognize black screen and white screen, which is too high in cost for the test platform. In order to reduce the deployment cost and improve the test efficiency, the embodiment of the application further proposes an image processing algorithm to determine the image category in the structured information, so as to complete the recognition of black and white images. This scheme does not require model training, and only simple arithmetic operations are required for each image. For this purpose, the determination method of the image category in the embodiment of the application can include the following steps, and the method flow chart is as shown in Figure 2

[0098] S301, collecting image information of the belonging sample, and converting the image information into an RGB three-dimensional array.

[0099] ​S302, randomly select a plurality of pixel points from the image information, and perform mean value calculation on the three-dimensional array corresponding to each pixel point in the RGB three-dimensional array to obtain a one-dimensional array.

[0100] S303, performing mean value calculation on the one-dimensional array to obtain a pixel mean value of the image information.

[0101] S304, if the pixel mean value is less than a preset first pixel threshold, determining that the image category is an application black screen.

[0102] S305, if the pixel mean value is greater than a preset second pixel threshold, determining that the image category is an application white screen, and the second pixel threshold is greater than the first pixel threshold.

[0103] Since the application needs to identify white screen and black screen problems, it does not need to pay too much attention to intermediate colors, therefore, the image recognition algorithm in the application selects an RGB color model, and image recognition is performed by using a lightweight algorithm of the application, compared with traditional image recognition technology, the scheme does not need to perform a large amount of model training, and image recognition efficiency is improved.

[0104] In the embodiment of the application, for each sample in the sample information, image information of the sample can be collected by screenshot, and the image information is converted into an RGB three-dimensional array, the RGB three-dimensional array includes three-dimensional arrays of each pixel point in three dimensions of three primary colors;

[0105] Further, 256 pixel points are randomly selected from the image information, and the three-dimensional arrays corresponding to each pixel point in the RGB three-dimensional array are subjected to mean value calculation, and a one-dimensional array composed of mean value calculation results of the 256 pixel points is calculated, and the calculation method is shown in the following formula (3):

[0106]

[0107] Wherein, Avg[k] represents the mean value calculation result of the kth pixel point in the one-dimensional array, which can be represented by avg i,j , k∈[1, 256]; i, j represent the coordinate position of the kth pixel point in the image information; avg i,j [0] represents the value of the R dimension in the three-dimensional array of the kth pixel point; avg i,j [1] represents the value of the G dimension in the three-dimensional array of the kth pixel point; avg i,j [2] represents the value of the B dimension in the three-dimensional array of the kth pixel point.

[0108] Further, the sum of all elements in the one-dimensional array is calculated to obtain a pixel mean value of the image information, and the calculation method is shown in the following formula (4):

[0109]

[0110] Wherein, A represents the pixel mean of image information; M represents the element number in one-dimensional value, M=256.

[0111] Further, a pixel threshold for detecting application black screen, i.e. the first pixel threshold (such as 15) is set. That is, if the pixel mean is less than the first pixel threshold, the image category is determined as application black screen.

[0112] Similarly, a pixel threshold for detecting application white screen, i.e. the second pixel threshold (such as 240) is set. That is, if the pixel mean is greater than the second pixel threshold, the image category is determined as application white screen.

[0113] Of course, if the pixel mean is greater than or equal to the first pixel threshold and less than or equal to the second pixel threshold, the image category is other.

[0114] In addition, to help the test personnel to reproduce the fault, the performance test method of the application program provided by the embodiment of the application further includes the following steps:

[0115] Output the detection report based on the classification and labeling result of the application program.

[0116] In the embodiment of the application, the first solution information, the recording information, the image category, the second solution information and the like of the application program are summarized according to the classification and labeling result of the application program, and the test personnel is notified for analysis in the form of email. Of course, if the test personnel analysis has a problem, the application program can be continuously labeled and added to the sample information.

[0117] In addition, the embodiment of the application can also use the control release technology to automatically clean up the useless data after the performance test is completed, so as to release the storage space.

[0118] Through the above description, the performance test method of the application program provided by the embodiment of the application makes up for a large number of application program crash, white screen, black screen and other related performance problems on the market, which is very important for users to provide good use experience. In addition, the application uses the image recognition algorithm based on RGB to perform image recognition and accurately locate the performance problem, reduces the low efficiency problem caused by model training, and uses the vector space model to perform text recognition and extraction, improves the test efficiency.

[0119] Based on the performance test method of the application program provided in the above embodiment, the embodiment of the application correspondingly provides a device for executing the performance test method of the application program, and a structure diagram of the device is shown in Figure 3 The device includes:

[0120] The log acquisition module 10 is used to acquire the log information of the application program by simulating the user operation of the application program.

[0121] The vector generation module 20 is configured to extract target text matching the to-be-tested performance from the log information, and generate a vector of the target text.

[0122] The sample retrieval module 30 is configured to retrieve sample information of the to-be-tested performance, the sample information including pre-generated structured information of different samples, and the structured information including a vector of sample text of a sample belonging to the structured information.

[0123] The classification and labeling module 40 is configured to match the vector of the sample text with the vector of the target text, and in a case where it is determined according to a matching result that the target text has a target sample belonging to the target text, perform classification and labeling on the application based on the to-be-tested performance.

[0124] Optionally, the to-be-tested performance is application crash, and the sample text is crash stack text, and the structured information further includes first resolution information and record information of the sample belonging to the structured information.

[0125] The vector generation module 20 is specifically configured to:

[0126] extract system stack text matching the application crash from the log information, and generate a vector of the system stack text;

[0127] The classification and labeling module 40 is specifically configured to:

[0128] calculate a first similarity between the vector of the crash stack text and the vector of the system stack text, take a sample with the highest first similarity and greater than a preset first similarity threshold in the sample information as a target sample to which the system stack text belongs, and perform classification and labeling on the application based on first resolution information and record information of the target sample.

[0129] Optionally, the to-be-tested performance is application black and white screen, the sample text is first request path text, and the structured information further includes an image category and second resolution information of the sample belonging to the structured information, and the image category is application black screen or application white screen.

[0130] The vector generation module 20 is specifically configured to:

[0131] extract second request path text matching the application black and white screen from the log information, and generate a vector of the second request path text;

[0132] The classification and labeling module 40 is specifically configured to:

[0133] calculate a second similarity between the vector of the first request path text and the vector of the second request path text, take a sample with the highest second similarity and greater than a preset second similarity threshold in the sample information as a target sample to which the second request path text belongs, and perform classification and labeling on the application based on the image category and the second resolution information of the target sample.

[0134] Optionally, the classification marking module 40 is configured to determine the determination manner of the image category, and specifically configured to:

[0135] The image information of the sample is collected, the image information is converted into an RGB three-dimensional array, a plurality of pixel points are randomly selected from the image information, a one-dimensional array is obtained by performing mean value calculation on the three-dimensional array corresponding to each pixel point in the RGB three-dimensional array, the one-dimensional array is subjected to mean value calculation to obtain a pixel mean value of the image information, if the pixel mean value is less than a preset first pixel threshold value, the image category is determined as an application black screen, and if the pixel mean value is greater than a preset second pixel threshold value, the image category is determined as an application white screen, the second pixel threshold value is greater than the first pixel threshold value.

[0136] Optionally, the classification marking module 40 is further configured to:

[0137] The classification marking result of the application program is output to obtain a detection report.

[0138] It should be noted that the detailed functions of each module in the embodiments of the present application can be referred to the corresponding disclosure part of the above-mentioned performance test method of the application program, which will not be described here.

[0139] Based on the performance test method of the application program provided in the above embodiments, the embodiments of the present application further provide an electronic device, which comprises at least one memory and at least one processor; the memory stores an application program, and the processor calls the application program stored in the memory, and the application program is used to realize the above-mentioned performance test method of the application program.

[0140] Based on the performance test method of the application program provided in the above embodiments, the embodiments of the present application further provide a storage medium, which stores computer program code, and the computer program code realizes the above-mentioned performance test method of the application program when executed.

[0141] The above provides a detailed description of the performance test method, device, electronic device and storage medium of the application program, and the principles and implementation modes of the present application are described in this paper; the above embodiment is only used to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as the limitation of the present application.

[0142] It should be noted that each embodiment in the present application is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the related part can be referred to the method part.

[0143] It is also important to note that the use of relational terms such as first and second, and the like, are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0144] The above description of disclosed embodiments provides enabling concepts for practicing or using the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A performance test method of an application program, characterized by, The performance test method of the application program comprises: A mobile terminal automatic test tool Appium is used to simulate user interface operation of a user, and in the process of simulating user operation of the application program by the Appium, log information of the application program is captured, the log information recording operation behavior of the user on the user program and recording system processing of the application program; Target text matching the to-be-tested performance is extracted from the log information, and a vector of the target text is generated; Sample information of the to-be-tested performance is called, the sample information comprising pre-generated structured information of different samples, the structured information comprising a vector of sample text of a sample belonging to the structured information; The vector of the sample text is matched with the vector of the target text, and in the case where it is determined according to a matching result that the target text has a target sample belonging to the target text, the application program is classified and labeled based on the to-be-tested performance; When the to-be-tested performance is application crash and the sample text is crash stack text, the structured information further comprises first resolution information and record information of the sample belonging to the structured information, the first resolution information comprising a flag bit indicating whether the application crash is resolved and a resolution code, and the record information comprising a crash reason, a crash time and a device model; When the to-be-tested performance is application black and white screen and the sample text is first request path text, the structured information further comprises an image category and second resolution information of the sample belonging to the structured information, the image category being application black screen or application white screen, and the second resolution information comprising a flag bit indicating whether the application black and white screen is resolved and a resolution code.

2. The method of claim 1, wherein, When the to-be-tested performance is application crash and the sample text is crash stack text, the extracting of the target text matching the to-be-tested performance from the log information and the generation of the vector of the target text comprise: System stack text matching the application crash is extracted from the log information, and a vector of the system stack text is generated; The matching of the vector of the sample text with the vector of the target text and, in the case where it is determined according to a matching result that the target text has a target sample belonging to the target text, the classification and labeling of the application program based on the to-be-tested performance comprise: A first similarity between the vector of the crash stack text and the vector of the system stack text is calculated; A sample having the highest first similarity and greater than a preset first similarity threshold in the sample information is taken as the target sample to which the system stack text belongs; The application program is classified and labeled based on the first resolution information and the record information of the target sample.

3. The method of claim 1, wherein the performance test of the application is performed by a performance test tool. When the to-be-tested performance is application black and white screen and the sample text is first request path text, the extracting of the target text matching the to-be-tested performance from the log information and the generation of the vector of the target text comprise: Second request path text matching the application black and white screen is extracted from the log information, and a vector of the second request path text is generated; The matching of the vector of the sample text with the vector of the target text and, in the case where it is determined according to a matching result that the target text has a target sample belonging to the target text, the classification and labeling of the application program based on the to-be-tested performance comprise: calculate a second similarity between a vector of the first request path text and a vector of the second request path text; take a sample with the second highest similarity and greater than a preset second similarity threshold in the sample information as a target sample to which the second request path text belongs; classify and label the application program based on an image category and second resolution information of the target sample.

4. The method of claim 3, wherein the performance test of the application is performed by a performance test tool. The determination method of the image category comprises: collecting image information of the sample, and converting the image information into an RGB three-dimensional array; randomly selecting a plurality of pixel points from the image information, and performing mean value calculation on three-dimensional arrays corresponding to the pixel points in the RGB three-dimensional array to obtain a one-dimensional array; performing mean value calculation on the one-dimensional array to obtain a pixel mean value of the image information; if the pixel mean value is less than a preset first pixel threshold, determining that the image category is an application black screen; if the pixel mean value is greater than a preset second pixel threshold, determining that the image category is an application white screen, and the second pixel threshold is greater than the first pixel threshold.

5. The method of claim 1, wherein the performance test of the application is performed by a performance test tool. The performance test method of the application program further comprises: outputting a detection report based on the classification and labeling result of the application program.

6. An application performance testing apparatus characterized by comprising: The performance test device of the application program comprises: a log acquisition module configured to simulate user interface operations by a mobile terminal automatic test tool Appium, and configured to capture log information of the application program in the process of simulating user operations on the application program by the Appium, wherein the log information records user operation behaviors on the user program and records system processing processes of the application program; a vector generation module configured to extract target text matching the to-be-tested performance from the log information, and configured to generate a vector of the target text; a sample calling module configured to call sample information of the to-be-tested performance, wherein the sample information comprises pre-generated structured information of different samples, and the structured information comprises a vector of sample text of the sample; a classification and labeling module configured to match the vector of the sample text with the vector of the target text, and configured to classify and label the application program based on the to-be-tested performance in a case where it is determined that the target text has a target sample according to a matching result; the device is further configured to: when the to-be-tested performance is application crash and the sample text is crash stack text, the structured information further comprises first resolution information and record information of the sample, wherein the first resolution information comprises a flag bit indicating whether the application crash is resolved and resolution code, and the record information comprises a crash reason, a crash time, and a device model; when the to-be-tested performance is application black and white screen and the sample text is first request path text, the structured information further comprises an image category and second resolution information of the sample, wherein the image category is application black screen or application white screen, and the second resolution information comprises a flag bit indicating whether the application black and white screen is resolved and resolution code.

7. The performance testing apparatus of an application program according to Claim 6, wherein when the to-be-tested performance is application crash and the sample text is crash stack text, the vector generation module is specifically configured to: extract system stack text matching the application crash from the log information, and generate a vector of the system stack text; The classification and labeling module is specifically configured to: calculate a first similarity between the vector of the crash stack text and the vector of the system stack text; and take a sample in the sample information with the highest first similarity and greater than a preset first similarity threshold as a target sample to which the system stack text belongs; classify and label the application program based on the first resolution information and the record information of the target sample.

8. The performance test apparatus of the application program according to claim 6, wherein When the to-be-tested performance is application black and white screen and the sample text is a first request path text, the vector generation module is specifically configured to: extract a second request path text matching the application black and white screen from the log information, and generate a vector of the second request path text; The classification and labeling module is specifically configured to: calculate a second similarity between the vector of the first request path text and the vector of the second request path text; and take a sample in the sample information with the highest second similarity and greater than a preset second similarity threshold as a target sample to which the second request path text belongs; classify and label the application program based on the image category and the second resolution information of the target sample.

9. An electronic device, comprising: The electronic device comprises at least one memory and at least one processor; the memory stores an application program, and the processor invokes the application program stored in the memory; the application program is used to implement the performance test method of the application program in any one of claims 1-5.

10. A storage medium, characterized by The storage medium stores computer program code, and the computer program code implements the performance test method of the application program in any one of claims 1-5 when executed.

Citation Information

Patent Citations

  • Log analysis method and device and storage medium

    CN115470034A

  • Abnormity detection method based on log semantics and related equipment

    CN117608889A