CN112612664B - Electronic equipment testing method and device, electronic equipment and storage medium - Google Patents

Electronic equipment testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112612664B
CN112612664B CN202011550971.5A CN202011550971A CN112612664B CN 112612664 B CN112612664 B CN 112612664B CN 202011550971 A CN202011550971 A CN 202011550971A CN 112612664 B CN112612664 B CN 112612664B
Authority
CN
China
Prior art keywords
log information
target
electronic device
information
extracting
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.)
Active
Application number
CN202011550971.5A
Other languages
Chinese (zh)
Other versions
CN112612664A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011550971.5A priority Critical patent/CN112612664B/en
Publication of CN112612664A publication Critical patent/CN112612664A/en
Application granted granted Critical
Publication of CN112612664B publication Critical patent/CN112612664B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2268Logging of test results

Abstract

The application discloses a testing method and device of electronic equipment, the electronic equipment and a storage medium, and relates to the technical field of data processing, in particular to the technical field of artificial intelligence. The specific implementation scheme is as follows: acquiring a log information configuration file and generating an event configuration table according to the log information configuration file; performing pressure test on the electronic equipment to generate log information; extracting target log information from the log information according to the event configuration table; and generating a test result according to the target log information. According to the testing method, the auxiliary judgment can be carried out by providing the scene information through the target log information, so that the accuracy of the pressure test is improved.

Description

Electronic equipment testing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to an artificial intelligence technology, and in particular, to a method and an apparatus for testing an electronic device, and a storage medium.
Background
Currently, performance testing tools of Android (Android) devices in the industry often focus on performance data such as CPUs (Central Processing Unit, central processing units), memories, hard disks and the like of the devices (e.g., smart speakers with screens and smart calendars).
The conventional pressure testing tool (i.e., pressure testing tool) of the Android device in the industry is based on an ADB (Android Debug Bridge ) provided by Android to communicate with the device, and extracts data such as CPU and memory data to perform pressure testing.
Disclosure of Invention
The application provides a test method and device of electronic equipment, the electronic equipment and a storage medium.
According to an aspect of the present application, there is provided a method for testing an electronic device, including:
acquiring a log information configuration file, and generating an event configuration table according to the log information configuration file;
performing pressure test on the electronic equipment to generate log information;
extracting target log information from the log information according to the event configuration table; and
and generating a test result according to the target log information.
According to another aspect of the present application, there is provided a test apparatus for an electronic device, including:
the acquisition module is used for acquiring the log information configuration file and generating an event configuration table according to the log information configuration file;
the first generation module is used for performing pressure test on the electronic equipment to generate log information;
the extraction module is used for extracting target log information from the log information according to the event configuration table; and
and the second generation module is used for generating a test result according to the target log information.
According to another aspect of the present application, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of testing an electronic device as described in the embodiments of the above aspect.
According to another aspect of the present application, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method for testing an electronic device according to the embodiment of the above aspect.
According to another aspect of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method for testing an electronic device according to the embodiment of the above aspect.
It should be understood that the description of this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
fig. 1 is a flow chart of a testing method of an electronic device according to an embodiment of the present application;
fig. 2 is a flow chart of another testing method of electronic equipment according to an embodiment of the present application;
fig. 3 is a flow chart of another testing method of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a test device of an electronic device according to an embodiment of the present application; and
fig. 5 is a block diagram of an electronic device according to a test method of the electronic device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The following describes a test method and apparatus for an electronic device, the electronic device, and a storage medium according to embodiments of the present application with reference to the accompanying drawings.
Data (Data) is a representation of facts, concepts, or instructions that may be processed by manual or automated means. After the data is interpreted and given a certain meaning, the data becomes information. Data processing (data processing) is the collection, storage, retrieval, processing, transformation, and transmission of data. The basic purpose of data processing is to extract and derive data that is valuable and meaningful to some particular person from a large, possibly unorganized, unintelligible, data. Data processing is a fundamental link of system engineering and automatic control. Data processing extends throughout various areas of social production and social life. The development of data processing technology and the breadth and depth of application thereof greatly influence the progress of human society development.
Artificial intelligence is the discipline of studying certain mental processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.) of a person using a computer, both in the technical field of hardware and in the technical field of software. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a deep learning technology, a big data processing technology, a knowledge graph technology and the like.
The method for testing the electronic device provided in the embodiments of the present application may be performed by an electronic device, which may be a PC (Personal Computer ) computer, a tablet computer, a server, or the like, and is not limited herein.
In an embodiment of the application, the electronic device may be provided with a processing component, a storage component and a driving component. Alternatively, the driving component and the processing component may be integrally provided, and the storage component may store an operating system, an application program or other program modules, and the processing component implements the test method of the electronic device provided in the embodiment of the present application by executing the application program stored in the storage component.
Fig. 1 is a flow chart of a testing method of an electronic device according to an embodiment of the present application.
The test method of the electronic device of the embodiment of the application may be further executed by the test device of the electronic device, where the device may be configured in the electronic device to generate an event configuration table according to the obtained log information configuration file, perform a pressure test on the electronic device to generate log information, extract target log information from the log information according to the event configuration table, and generate a test result according to the target log information, so as to improve accuracy of the pressure test.
As a possible case, the method for testing the electronic device in the embodiment of the present application may also be executed at a server, where the server may be a cloud server, and the method for testing the electronic device may be executed at a cloud.
As shown in fig. 1, the method for testing an electronic device may include:
step 101, acquiring a log information configuration file and generating an event configuration table according to the log information configuration file. The event configuration table may be a data table C related to a log configuration file, where the data table C related to the log configuration file may include a log configuration file name, a log public format field, a statistical manner, and the like.
In the embodiment of the application, the log information configuration file can be a log configuration file of an intelligent sound box with a screen or an electronic device waiting for testing by an intelligent calendar.
It should be noted that, the log information configuration file described in this embodiment may be pre-written by related testers according to test requirements, where the log information configuration file may be written in JSON (JavaScript Object Notation ) format and stored (configured) in a test tool in advance, where the test tool may be a script test tool, which may be executed in an electronic device such as a computer, a server, or the like.
As a possible case, the pre-written log information configuration can be pre-stored in the storage space of the electronic equipment such as a computer, a server and the like, so that the test tool can be conveniently called and used when running in the electronic equipment. The storage space is not limited to an entity-based storage space, and may be a storage space (cloud storage space) of a network hard disk connected to an electronic device such as a computer or a server.
In addition, the log information configuration file described in this embodiment may be divided into 4 parts, namely, a configuration file introduction, a log public format field, a description of a subdivided scene, and a statistical manner, where the statistical manner may include pv (page view) and uv (Unique viewer), the pv manner may be to count the total number of subdivided scenes, the total number of occurrences of the scenes is one record, and uv may be to count one record according to the time of occurrence of the scenes.
In this embodiment of the present application, a data table a of information of an electronic device to be tested (for example, a smart speaker with a screen, an intelligent calendar, etc.), a data table B related to the current test, and a data table D of keywords and explanatory notes may also be generated according to the log information configuration file.
The data table a of the information of the electronic device to be tested may include a SN (Serial Number) code, a ROM (Read-Only Memory) version Number, a model Number of the electronic device to be tested, and the like; the data table B related to the test can comprise a test purpose, a tester, a test plan time, a start time, a data file generation catalog and the like; the data in the data table D of keywords and explanatory notes can be divided into two cases, one being a specific scene within a known finite set and its notes, the other being a non-finite set, with the randomness of the test, e.g. the speech recognition result being a non-finite set, but such random result still occurring at a fixed location, the explanatory notes can be unconcertained, without any limitation here.
Specifically, when the related tester needs to perform pressure test on the electronic device to be tested (for example, a smart speaker with a screen, an intelligent calendar, etc.), the log information configuration file of the electronic device to be tested can be pre-compiled according to the requirement, and can be configured in a pressure test tool, and then the pressure test tool is installed in a computer (i.e., the electronic device).
Then, when the computer receives a test start instruction, the pressure test tool starts to run, and in the running process of the pressure test tool, the pressure test tool can firstly create a plurality of data tables, namely a data table A of information of the electronic equipment to be tested, a data table B related to the test, a data table C related to a log configuration file, a data table D of keywords and explanation remarks and a data table E for storing statistical results. The stress test tool may then read the information in the log information configuration file and may store the configuration file name, log common format fields, subdivision scenario description, statistical manner, and other information for testing in tables a, B, C, and D in the database.
It should be noted that the pressure testing tool described in this embodiment adopts an SQLite (lightweight database) database, and the SQLite database is deployed in the computer, where the data table a, the data table B, the data table C, the data table D, and the data table E may be created in the SQLite database. The data table E may include time of log printing, keywords, statistics, file pointers, and the like.
And 102, performing pressure test on the electronic equipment to generate log information.
In this embodiment of the present application, when the computer runs the pressure testing tool, the computer may be connected to the electronic device to be tested through a data interface, for example, a USB (Universal Serial Bus ) interface, so as to obtain log information of the electronic device to be tested.
Specifically, when the computer runs the pressure testing tool, the electronic equipment to be tested can be subjected to pressure testing, for example, some instructions can be sent to the electronic equipment to be tested through the computer to perform pressure testing on the electronic equipment to be tested. In the process of performing pressure test on the electronic equipment to be tested, the electronic equipment to be tested can generate log information.
And step 103, extracting target log information from the log information according to the event configuration table.
And 104, generating a test result according to the target log information.
Specifically, when the computer runs the pressure testing tool, the pressure testing can be performed on the electronic equipment to be tested so as to generate log information of the electronic equipment to be tested. Then the computer extracts the target log information from the log information according to the data table C (namely, the event configuration table) related to the log configuration file through the data interface, and generates a test result according to the target log information.
It should be noted that, in the process of operating the pressure testing tool, a process of recording logs may be started for the computer, so as to obtain log information from the electronic device to be tested.
In the embodiment of the application, firstly, a log information configuration file is obtained, an event configuration table is generated according to the log information configuration file, then, pressure test is conducted on the electronic equipment to generate log information, target log information is extracted from the log information according to the event configuration table, and finally, a test result is generated according to the target log information. Therefore, the auxiliary judgment can be performed by providing the scene information through the target log information, so that the accuracy of the pressure test is improved.
To clearly illustrate the above embodiment, in one embodiment of the present application, the event configuration table may include at least one log common format field, extracting the target log information from among the log information according to the event configuration table may include extracting the log information matching the at least one log common format field from among the log information according to the at least one log common format field, and acting as the target log information.
Specifically, during the operation of the pressure testing tool, the pressure testing tool may read all log common format fields of all configuration files of the data table C related to the log configuration files in the SQLite database, and then may use the log common format fields to filter log information of the electronic device under test, so as to generate a common format field log file F locally (i.e., in a computer), and take the log information in the log file F as target log information.
In other embodiments of the present application, during the operation of the pressure testing tool, by starting the above-mentioned process of recording logs, log information of the electronic device to be tested may be continuously written into the computer to generate the file G.
The log information at each time may be acquired by the generation file G. However, for the log statistics function, the log information of the electronic device to be tested contains a very small part that the relevant tester wants to obtain, while most log information is required by the irrelevant tester, however, the file G becomes huge as the test proceeds, and filtering a small part of information in the huge file is wasteful for the memory of the server. Therefore, the test method of the electronic equipment can only generate the log file F, so that the speed of pressure test is improved, and the running pressure of a computer is reduced.
Further, in the embodiment of the present application, the log file F may be filtered, and the log information obtained by the filtering may be used as target log information.
Specifically, taking a pressure test of 1 time and 12 hours as an example, a frequency of 2 hours is set to filter the log file F, taking wake-up recognition as an example, the log public format field corresponding to the wake-up recognition in the data table C related to the log configuration file can be read to filter the file F to generate a log file H, so that the log file H can only contain log information of the wake-up recognition, and the log information can be used as target log information. Therefore, the pressure test can be performed in a targeted manner, and the accuracy of the pressure test is further improved.
In one embodiment of the present application, as shown in fig. 2, generating a test result according to the target log information may include:
step 201, a remark table is obtained. The remark table may be the keyword and the data table D for explaining remarks.
In this embodiment of the present application, the data table D of the keywords and the explanatory remarks may be obtained from the SQLite database, where the data table D may include an aggregate attribute, a preset keyword, etc., where the aggregate attribute may be a finite aggregate or a non-finite aggregate.
And 202, extracting target information from the target log information according to the remark table to generate a test result.
Specifically, after the computer obtains the target log information through the pressure testing tool, the computer can also read the set attribute and the preset keyword in the data table D through the pressure testing tool, and extract the target information from the target log information based on the set attribute and the preset keyword to generate a test result, so that auxiliary judgment of the pressure testing of the scene information can be provided, and the accuracy of the pressure testing is improved.
To clearly illustrate the above embodiment, in one embodiment of the present application, as shown in fig. 3, extracting target information from the target log information according to the remark table to generate a test result may include:
in step 301, the set attributes in the remark table are extracted.
Step 302, if the set attribute is a limited set, extracting a preset keyword from the remark table. The preset keywords can be calibrated according to actual conditions, and if the electronic device to be tested is an intelligent sound box with a screen, the preset keywords can comprise "music-lyrics loading succeeded", "music-lyrics loading failed", "music-loading playlist succeeded", "swan-loading swan", and the like.
And step 302, taking the content matched with the preset keyword in the target log information as target information, and adding the target information to the test result.
It should be noted that the test results described in this embodiment may be stored in the data table E for storing the statistical results.
And step 304, if the combination attribute is a non-finite set, extracting target information from the target log information according to a preset regular expression, and adding the target information to a test result. The preset regular expression can be calibrated according to actual conditions.
Specifically, taking a pressure test of 12 hours for example, setting a frequency of 2 hours to filter the log file F to obtain a log file H, then reading a keyword and a data table D for interpreting remarks to obtain a set attribute (i.e., interpreting remarks) in the data table D, judging the set attribute, if the set attribute is a limited set, reading a preset keyword in the data table D, taking content matched with the preset keyword in target log information (i.e., log information in the log file H) as target information, and adding the content to a test result, i.e., writing the test result into the data table E. If the combined attribute is a non-finite set, the target information may be extracted from among the target log information (i.e., the log information in the log file H) according to a preset regular expression and added to the test result, i.e., written into the data table E. Therefore, the information of the scene class of the electronic equipment to be detected can be obtained, and the reason of the fault of the electronic equipment to be detected can be rapidly positioned.
Further, in an embodiment of the present application, the method for testing an electronic device may further include obtaining a current pointer of the target log information, and adding the current pointer to the test result.
In the embodiment of the present application, the current pointer of the target log information may be a pointer of the current reading position of the log file H.
Specifically, in the process of acquiring the target information from the log information in the log file H according to the preset keyword, if the set attribute is a limited set, a pointer of the position of the preset keyword matched to the related content may be acquired, and the pointer and the target information are added together to the test result, that is, written into the data table E. If the combined attribute is a non-finite set, a pointer to the location of the extracted content from the log file H according to a preset regular expression may be obtained and added to the test result together with the target information, i.e., written into the data table E. Therefore, when the next filtering is performed, the file pointer in the data table E can be read first, and the filtering of the file H is started from the pointer position, so that the time of the pressure test is further reduced, and meanwhile, the accuracy of the pressure test can be improved.
Further, after the test result is written into the data table E, the statistical mode in the data table C can be read, and if the statistical mode is the pv mode, the statistical mode is summarized in the pv mode in the data table E; in UV mode, the data table E is read and summarized in UV mode.
Fig. 4 is a schematic structural diagram of a testing device of an electronic device according to an embodiment of the present application.
The testing device of the electronic equipment can be configured in the electronic equipment to generate the event configuration table according to the acquired log information configuration file, perform pressure test on the electronic equipment to generate log information, extract target log information from the log information according to the event configuration table, and generate a testing result according to the target log information, so that accuracy of the pressure test is improved.
As shown in fig. 4, the test apparatus 400 of the electronic device may include: the acquisition module 410, the first generation module 420, the extraction module 430, and the second generation module 440.
The obtaining module 410 is configured to obtain the log information configuration file, and generate an event configuration table according to the log information configuration file. The event configuration table may be a data table C related to a log configuration file, where the data table C related to the log configuration file may include a log configuration file name, a log public format field, a statistical manner, and the like.
In the embodiment of the application, the log information configuration file can be a log configuration file of an intelligent sound box with a screen or an electronic device waiting for testing by an intelligent calendar.
It should be noted that, the log information configuration file described in this embodiment may be pre-written by related testers according to test requirements, where the log information configuration file may be written in JSON (JavaScript Object Notation ) format and stored (configured) in advance in a test tool (for example, the test device 400 of the electronic device), where the test tool may be a script test tool, which may be executed in an electronic device such as a computer, a server, or the like.
As a possible case, the pre-written log information configuration can be pre-stored in the storage space of the electronic equipment such as a computer, a server and the like, so that the test tool can be conveniently called and used when running in the electronic equipment. The storage space is not limited to an entity-based storage space, and may be a storage space (cloud storage space) of a network hard disk connected to an electronic device such as a computer or a server.
In addition, the log information configuration file described in this embodiment may be divided into 4 parts, namely, a configuration file introduction, a log public format field, a description of a subdivided scene, and a statistical manner, where the statistical manner may include pv (page view) and uv (Unique viewer), the pv manner may be to count the total number of subdivided scenes, the total number of occurrences of the scenes is one record, and uv may be to count one record according to the time of occurrence of the scenes.
In this embodiment of the present application, the obtaining module 410 may further generate a data table a of information of the electronic device to be tested (for example, a smart speaker with a screen, an intelligent calendar, etc.), a data table B related to the current test, and a data table D of keywords and explanatory notes according to the log information configuration file.
The data table a of the information of the electronic device to be tested may include a SN (Serial Number) code, a ROM (Read-Only Memory) version Number, a model Number of the electronic device to be tested, and the like; the data table B related to the test can comprise a test purpose, a tester, a test plan time, a start time, a data file generation catalog and the like; the data in the data table D of keywords and explanatory notes can be divided into two cases, one being a specific scene within a known finite set and its notes, the other being a non-finite set, with the randomness of the test, e.g. the speech recognition result being a non-finite set, but such random result still occurring at a fixed location, the explanatory notes can be unconcertained, without any limitation here.
Specifically, when the related tester needs to perform pressure test on the electronic device to be tested (for example, a smart speaker with a screen, an intelligent calendar, etc.), the log information configuration file of the electronic device to be tested can be pre-compiled according to the requirement, and can be configured in a pressure test tool, and then the pressure test tool is installed in a computer (i.e., the electronic device).
Then, when the computer receives a test start instruction, the pressure test tool starts to run, and in the process of running the pressure test tool, the acquisition module 410 may first create a plurality of data tables locally, that is, a data table a of information of the electronic device to be tested, a data table B related to the current test, a data table C related to the log configuration file, a data table D of keywords and explanatory notes, and a data table E for storing statistical results. The acquisition module 410 may then read the information in the log information profile and may store the profile name, log common format fields, subdivision scenario description, statistical manner, and other information for testing in tables a, B, C, and D in the database.
It should be noted that the pressure testing tool described in this embodiment adopts an SQLite (lightweight database) database, and the SQLite database is deployed in the computer, where the data table a, the data table B, the data table C, the data table D, and the data table E may be created in the SQLite database. The data table E may include time of log printing, keywords, statistics, file pointers, and the like.
The first generating module 420 is configured to perform stress test on the electronic device to generate log information.
In this embodiment, when the pressure testing tool is operated, the first generating module 420 may be connected to the electronic device to be tested through a data interface, for example, a USB (Universal Serial Bus ) interface, so as to obtain log information of the electronic device to be tested.
Specifically, when the computer runs the pressure testing tool, the first generating module 420 may perform pressure testing on the electronic device to be tested, for example, may perform pressure testing on the electronic device to be tested by sending some instructions to the electronic device to be tested. In the process of performing pressure test on the electronic equipment to be tested, the electronic equipment to be tested can generate log information.
The extraction module 430 is configured to extract target log information from the log information according to the event configuration table.
The second generating module 440 is configured to generate a test result according to the target log information.
Specifically, when the computer runs the pressure testing tool, the first generating module 420 may perform pressure testing on the electronic device to be tested to generate log information of the electronic device to be tested. The extraction module 430 may then extract the target log information from the log information via the data interface described above and according to the log profile related data table C (i.e., event configuration table), and the second generation module 440 generates the test result according to the target log information.
It should be noted that, during the operation of the pressure testing tool, the extracting module 430 may start a process of recording a log for the computer, so as to obtain log information from the electronic device under test.
In this embodiment of the present application, firstly, a log information configuration file is obtained through an obtaining module, an event configuration table is generated according to the log information configuration file, then, a stress test is performed on an electronic device through a first generating module to generate log information, a target log information is extracted from the log information through an extracting module according to the event configuration table, and finally, a test result is generated according to the target log information through a second generating module 440. Therefore, the auxiliary judgment can be performed by providing the scene information through the target log information, so that the accuracy of the pressure test is improved.
In one embodiment of the present application, the event configuration table includes at least one common format field of the log, and the extracting module 430 is specifically configured to extract, from the log information, the log information matching the at least one common format field of the log, and as target log information.
In one embodiment of the present application, as shown in fig. 4, the second generating module 440 may include: an acquisition unit 441 and a generation unit 442.
Wherein, the obtaining unit 441 is configured to obtain a remark table.
The generating unit 442 is configured to extract target information from among the target log information according to the remark table to generate a test result.
In one embodiment of the present application, the generating unit 442 is specifically configured to: extracting set attributes in the remark table; if the set attribute is a limited set, extracting preset keywords from the remark table; taking the content matched with the preset keyword in the target log information as target information, and adding the target information to a test result; and if the combination attribute is a non-limited set, extracting target information from the target log information according to a preset regular expression, and adding the target information to a test result.
In one embodiment of the present application, the generating unit 442 is further configured to: and acquiring a current pointer of the target log information, and adding the current pointer to the test result.
It should be noted that the foregoing explanation of the embodiment of the testing method of the electronic device is also applicable to the testing apparatus of the electronic device of the embodiment, which is not described herein again.
In summary, in the test device for an electronic device according to the embodiment of the present application, firstly, a log information configuration file is obtained through an obtaining module, an event configuration table is generated according to the log information configuration file, then, a pressure test is performed on the electronic device through a first generating module to generate log information, a target log information is extracted from the log information through an extracting module according to the event configuration table, and finally, a test result is generated according to the target log information through a second generating module 440. Therefore, the auxiliary judgment can be performed by providing the scene information through the target log information, so that the accuracy of the pressure test is improved.
According to embodiments of the present application, there is also provided an electronic device, a readable storage medium and a computer program product.
Fig. 5 shows a schematic block diagram of an example electronic device 500 that may be used to implement embodiments of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 5, the apparatus 500 includes a computing unit 501 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Various components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as a test method for an electronic device. For example, in some embodiments, the method of testing an electronic device may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the test method of the electronic device described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the test method of the electronic device by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (8)

1. A method of testing an electronic device, comprising:
acquiring a log information configuration file, and generating an event configuration table according to the log information configuration file;
performing pressure test on the electronic equipment to generate log information;
extracting target log information from the log information according to the event configuration table; and
generating a test result according to the target log information;
the generating a test result according to the target log information includes:
obtaining a remark table;
extracting target information from the target log information according to the remark table to generate the test result;
wherein the extracting target information from the target log information according to the remark table to generate the test result includes:
extracting set attributes in the remark table;
if the set attribute is a limited set, extracting preset keywords from the remark table;
taking the content matched with the preset keyword in the target log information as the target information, and adding the content to the test result;
and if the set attribute is a non-limited set, extracting the target information from the target log information according to a preset regular expression, and adding the target information to the test result.
2. The method of testing an electronic device according to claim 1, wherein the event configuration table includes at least one log common format field, the extracting target log information from among the log information according to the event configuration table includes:
and extracting the log information matched with the at least one log common format field from the log information according to the at least one log common format field, and taking the log information as the target log information.
3. The method for testing an electronic device according to claim 1, further comprising:
and acquiring a current pointer of the target log information, and adding the current pointer to the test result.
4. A test apparatus for an electronic device, comprising:
the acquisition module is used for acquiring the log information configuration file and generating an event configuration table according to the log information configuration file;
the first generation module is used for performing pressure test on the electronic equipment to generate log information;
the extraction module is used for extracting target log information from the log information according to the event configuration table; and
the second generation module is used for generating a test result according to the target log information;
the second generation module includes:
an acquisition unit configured to acquire a remark table;
a generating unit for extracting target information from the target log information according to the remark table to generate the test result;
the generating unit is specifically configured to:
extracting set attributes in the remark table;
if the set attribute is a limited set, extracting preset keywords from the remark table;
taking the content matched with the preset keyword in the target log information as the target information, and adding the content to the test result;
and if the set attribute is a non-limited set, extracting the target information from the target log information according to a preset regular expression, and adding the target information to the test result.
5. The test apparatus of an electronic device according to claim 4, wherein the event configuration table comprises at least one log common format field, the extraction module being specifically configured to:
and extracting the log information matched with the at least one log common format field from the log information according to the at least one log common format field, and taking the log information as the target log information.
6. The test apparatus of an electronic device according to claim 4, wherein the generating unit is further configured to:
and acquiring a current pointer of the target log information, and adding the current pointer to the test result.
7. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of testing an electronic device of any one of claims 1-3.
8. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of testing an electronic device according to any one of claims 1-3.
CN202011550971.5A 2020-12-24 2020-12-24 Electronic equipment testing method and device, electronic equipment and storage medium Active CN112612664B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011550971.5A CN112612664B (en) 2020-12-24 2020-12-24 Electronic equipment testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011550971.5A CN112612664B (en) 2020-12-24 2020-12-24 Electronic equipment testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112612664A CN112612664A (en) 2021-04-06
CN112612664B true CN112612664B (en) 2024-04-02

Family

ID=75244749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011550971.5A Active CN112612664B (en) 2020-12-24 2020-12-24 Electronic equipment testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112612664B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113344454A (en) * 2021-07-05 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 Pressure measurement data processing method and device
CN115085772B (en) * 2022-08-24 2022-12-09 北京紫光青藤微系统有限公司 Test method, processor, NFC device, electronic apparatus, and storage medium
CN116302726A (en) * 2022-09-09 2023-06-23 北京比特大陆科技有限公司 Test method and device of computing equipment, electronic equipment and storage medium
CN117290190B (en) * 2023-11-27 2024-02-13 博为科技有限公司 Remote serial port log acquisition method, device and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101371245A (en) * 2005-07-12 2009-02-18 维兹博麦哲思公司 Distributed capture and aggregation of dynamic application usage information
CN106682210A (en) * 2016-12-30 2017-05-17 广州华多网络科技有限公司 Log file query method and device
CN106973244A (en) * 2016-01-13 2017-07-21 奥多比公司 Using it is Weakly supervised for image match somebody with somebody captions
CN107660283A (en) * 2015-04-03 2018-02-02 甲骨文国际公司 For realizing the method and system of daily record resolver in Log Analysis System
CN109344060A (en) * 2018-09-20 2019-02-15 迈普通信技术股份有限公司 A kind of analysis method and device of automatic test
CN109359026A (en) * 2018-08-15 2019-02-19 中国平安人寿保险股份有限公司 Log reporting method, device, electronic equipment and computer readable storage medium
CN110046086A (en) * 2018-12-20 2019-07-23 阿里巴巴集团控股有限公司 Expected data generation method and device and electronic equipment for test
CN111309584A (en) * 2018-12-11 2020-06-19 迈普通信技术股份有限公司 Data processing method and device, electronic equipment and storage medium
CN111352838A (en) * 2020-02-28 2020-06-30 中国平安人寿保险股份有限公司 Package file generation method, package file generation device and electronic equipment
CN111352820A (en) * 2020-03-08 2020-06-30 苏州浪潮智能科技有限公司 Method, equipment and device for predicting and monitoring running state of high-performance application
CN111767262A (en) * 2020-06-30 2020-10-13 平安国际智慧城市科技股份有限公司 Log display method, device, equipment and storage medium
CN111832236A (en) * 2020-06-29 2020-10-27 山东云海国创云计算装备产业创新中心有限公司 Chip regression testing method and system, electronic equipment and storage medium
CN111858506A (en) * 2020-06-30 2020-10-30 北京百度网讯科技有限公司 Test data processing method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110113290A1 (en) * 2009-11-09 2011-05-12 International Business Machines Corporation Method and system for testing configuration of environments
US10713365B2 (en) * 2017-09-28 2020-07-14 Oracle International Corporation Testing cloud application integrations, data, and protocols

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101371245A (en) * 2005-07-12 2009-02-18 维兹博麦哲思公司 Distributed capture and aggregation of dynamic application usage information
CN107660283A (en) * 2015-04-03 2018-02-02 甲骨文国际公司 For realizing the method and system of daily record resolver in Log Analysis System
CN106973244A (en) * 2016-01-13 2017-07-21 奥多比公司 Using it is Weakly supervised for image match somebody with somebody captions
CN106682210A (en) * 2016-12-30 2017-05-17 广州华多网络科技有限公司 Log file query method and device
CN109359026A (en) * 2018-08-15 2019-02-19 中国平安人寿保险股份有限公司 Log reporting method, device, electronic equipment and computer readable storage medium
CN109344060A (en) * 2018-09-20 2019-02-15 迈普通信技术股份有限公司 A kind of analysis method and device of automatic test
CN111309584A (en) * 2018-12-11 2020-06-19 迈普通信技术股份有限公司 Data processing method and device, electronic equipment and storage medium
CN110046086A (en) * 2018-12-20 2019-07-23 阿里巴巴集团控股有限公司 Expected data generation method and device and electronic equipment for test
CN111352838A (en) * 2020-02-28 2020-06-30 中国平安人寿保险股份有限公司 Package file generation method, package file generation device and electronic equipment
CN111352820A (en) * 2020-03-08 2020-06-30 苏州浪潮智能科技有限公司 Method, equipment and device for predicting and monitoring running state of high-performance application
CN111832236A (en) * 2020-06-29 2020-10-27 山东云海国创云计算装备产业创新中心有限公司 Chip regression testing method and system, electronic equipment and storage medium
CN111767262A (en) * 2020-06-30 2020-10-13 平安国际智慧城市科技股份有限公司 Log display method, device, equipment and storage medium
CN111858506A (en) * 2020-06-30 2020-10-30 北京百度网讯科技有限公司 Test data processing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Linux内核的智能日志生成系统;刘洪武;梁亮;杨国为;宋高俊;;计算机工程(第18期);第255-257页 *

Also Published As

Publication number Publication date
CN112612664A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN112612664B (en) Electronic equipment testing method and device, electronic equipment and storage medium
JP2021089739A (en) Question answering method and language model training method, apparatus, device, and storage medium
CN113792154B (en) Method and device for determining fault association relationship, electronic equipment and storage medium
CN113657395A (en) Text recognition method, and training method and device of visual feature extraction model
CN113689111A (en) Fault recognition model training method, fault recognition device and electronic equipment
CN115168562A (en) Method, device, equipment and medium for constructing intelligent question-answering system
CN106547726A (en) A kind of automation checking method and checking device based on document
CN117171296A (en) Information acquisition method and device and electronic equipment
CN115328736A (en) Probe deployment method, device, equipment and storage medium
CN116414814A (en) Data checking method, device, equipment, storage medium and program product
CN115905016A (en) BIOS Setup search function test method and device, electronic equipment and storage medium
CN112905743B (en) Text object detection method, device, electronic equipment and storage medium
CN113221566A (en) Entity relationship extraction method and device, electronic equipment and storage medium
CN113963197A (en) Image recognition method and device, electronic equipment and readable storage medium
CN117573561B (en) Automatic test system, method, electronic equipment and storage medium
CN113032581B (en) Method and device for updating product list
CN117571321B (en) Bearing fault detection method, device, equipment and storage medium
CN116244740B (en) Log desensitization method and device, electronic equipment and storage medium
CN114201607B (en) Information processing method and device
US20240095869A1 (en) Information acquisition method and apparatus, electronic device, and storage medium
CN117312123A (en) Bug processing method and device, electronic equipment and storage medium
CN117251196A (en) Data maintenance method, device, equipment and storage medium
CN115617983A (en) Text-based defect analysis method and device, electronic equipment and storage medium
CN117795605A (en) Method and device for processing FASTQ data, electronic equipment and storage medium
CN116340172A (en) Data collection method and device based on test scene and test case detection method

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
GR01 Patent grant
GR01 Patent grant