CN115495358A - Log automatic test method, device, system and medium - Google Patents

Log automatic test method, device, system and medium Download PDF

Info

Publication number
CN115495358A
CN115495358A CN202211157173.5A CN202211157173A CN115495358A CN 115495358 A CN115495358 A CN 115495358A CN 202211157173 A CN202211157173 A CN 202211157173A CN 115495358 A CN115495358 A CN 115495358A
Authority
CN
China
Prior art keywords
log
test
verification
preset
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211157173.5A
Other languages
Chinese (zh)
Inventor
杨明兴
张晓媛
李渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211157173.5A priority Critical patent/CN115495358A/en
Publication of CN115495358A publication Critical patent/CN115495358A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Landscapes

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

Abstract

The invention discloses a log automatic test method, a device, a system and a medium, wherein the method comprises the following steps: responding to the test request, and adding a log corresponding to the request parameter into a preset log tool; acquiring all logs of a log link in the preset log tool according to the request parameters, and generating a log file to be tested; confirming a currently set verification mode, and performing verification test on the log file to be tested according to a verification rule corresponding to the verification mode; and displaying the log test result in the verification mode. The log test request initiated by the user is responded, the full-link log of the current request is obtained, the full-link log is verified and tested, and the high-coverage and high-efficiency log automatic test is realized.

Description

Log automatic test method, device, system and medium
Technical Field
The invention relates to the technical field of testing, in particular to a log automatic testing method, device, system and medium.
Background
Network devices, systems, and services, etc., all operate to generate a log event record. Each row of the log records the description of the relevant operations such as service, participation, response message, date, time, user and action. Thus, each log use case may correspond to different execution logic.
At present, for the test of the log use case, a manual test method is generally adopted. And triggering a log use case to generate a log by the action of the executor, and checking whether the content of the generated log record is correct or not on the server by the executor after the log is generated.
However, the manual test log case is time-consuming, cannot ensure the test coverage rate, and has long regression test time.
Disclosure of Invention
In view of the above shortcomings in the prior art, an object of the present invention is to provide a method, an apparatus, a system and a medium for log automated testing, which can be applied to financial technologies or other related fields, and aims to improve log testing efficiency and coverage.
The technical scheme of the invention is as follows:
a log automation test method comprises the following steps:
responding to the test request, and adding a log corresponding to the request parameter into a preset log tool;
acquiring all logs of a log link in the preset log tool according to the request parameters, and generating a log file to be tested;
confirming a currently set verification mode, and performing verification test on the log file to be tested according to a verification rule corresponding to the verification mode;
and displaying the log test result in the verification mode.
In one embodiment, the adding, in response to the test request, the log corresponding to the request parameter to a preset log tool includes:
receiving a test request, and analyzing to obtain a request parameter carried in the test request;
and acquiring a corresponding log according to the request parameters and adding the acquired log to a preset log tool.
In an embodiment, the obtaining all logs of a log link in the preset log tool according to the request parameter and generating a log file to be tested includes:
confirming a target thread id from the preset log tool according to the request parameter;
continuously acquiring a target log on a corresponding log link in the preset log tool according to the target thread id;
and when the number of the target logs obtained for a plurality of times is not increased, generating a log file to be tested according to all the target logs obtained at the last time.
In an embodiment, when the number of the target logs obtained continuously for a plurality of times is not increased, generating a log file to be tested according to all the target logs obtained last time specifically includes:
and when the number of the target logs obtained continuously for three times is the same, generating a log file to be tested according to all the target logs obtained at the last time.
In an embodiment, the determining a currently set verification mode, and performing a verification test on the log file to be tested according to a verification rule corresponding to the verification mode includes:
confirming a currently set verification mode, wherein the verification mode comprises an interface test mode and an application test mode;
acquiring a preset verification rule in the verification mode;
and carrying out verification test on the log file to be tested according to the verification rule.
In an embodiment, if the interface test mode is currently set, the performing a verification test on the log file to be tested according to the verification rule includes:
analyzing the log file to be tested to obtain an interface check item, a parameter check item and a log category;
and counting the interface check items, the parameter check items and the log types, and comparing the interface check items, the parameter check items and the log types with a preset expected value to obtain a log test result.
In an embodiment, if the application test mode is currently set, the performing a verification test on the log file to be tested according to the verification rule includes:
and calling a preset interface to perform abnormal log test on the log file to be tested to obtain log string information matched with preset abnormal items in the log file to be tested.
An automated log testing device, comprising:
the log adding module is used for responding to the test request and adding the log corresponding to the request parameter into a preset log tool;
the log acquisition module is used for acquiring all logs of a log link in the preset log tool according to the request parameters and generating a log file to be tested;
the verification test module is used for confirming a currently set verification mode and carrying out verification test on the log file to be tested according to a verification rule corresponding to the verification mode;
and the display module is used for displaying the log test result in the verification mode.
A log automated testing system, the system comprising at least one processor; and the number of the first and second groups,
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 log automated testing method described above.
A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the log automated testing method described above.
Has the advantages that: compared with the prior art, the embodiment of the invention responds to the log test request initiated by a user to obtain the full-link log of the current request, and performs the verification test on the full-link log, thereby realizing the automatic log test with high coverage rate and high efficiency.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flowchart of a log automation test method according to an embodiment of the present invention;
fig. 2 is a flowchart of step S100 in the log automation test method according to the embodiment of the present invention;
fig. 3 is a flowchart of step S200 in the log automation test method according to the embodiment of the present invention;
fig. 4 is a flowchart of step S300 in the log automation test method according to the embodiment of the present invention;
fig. 5 is a flowchart of step S303 in the log automation test method according to the embodiment of the present invention;
FIG. 6 is a functional block diagram of an automatic log test device according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of the log automation test system according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is described in further detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart illustrating an exemplary log automation testing method according to the present invention. The log automatic testing method provided by the embodiment is suitable for the automatic testing of the log use case in the development process, and is particularly applied to a system comprising terminal equipment, a network and a server, wherein the network is a medium for directly providing a communication link between the terminal equipment and the server, and can comprise various connection types, such as a wired communication link, a wireless communication link or an optical fiber cable and the like; the operating system on the terminal device may include an iPhone operating system (iOS system), an android system, or another operating system, and the terminal device is connected to the server through a network to perform an interaction, so as to perform operations such as receiving or sending data, and may specifically be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a portable computer, a desktop server, and the like. As shown in fig. 1, the method specifically includes the following steps:
and S100, responding to the test request, and adding the log corresponding to the request parameter into a preset log tool.
In this embodiment, when a User initiates a test request through a UI (User Interface) or an Interface of a client, a server responds to the test request, and adds a LOG corresponding to a request parameter generated in a program running process to a preset LOG tool, where the preset LOG tool may be CAT-LOG, and the CAT-LOG is a LOG tool for system LOG viewing and management, and a User of the CAT-LOG through the LOG tool can better query and search a background LOG record, thereby facilitating application management settings.
In an embodiment, please refer to fig. 2, which is a flowchart of step S100 in the log automation test method according to an embodiment of the present invention, as shown in fig. 2, step S100 includes:
s101, receiving a test request, and analyzing to obtain a request parameter carried in the test request;
and S102, acquiring a corresponding log according to the request parameter and adding the acquired log to a preset log tool.
In this embodiment, the client sends a test request to the server, and the server parses the request after receiving the test request to obtain a request parameter carried therein, where the specific request parameter may be a parameter, and then calls an interface based on the request parameter to obtain a log generated during a program running process, and prints and adds the obtained log to a preset log tool, so as to implement a flexible log test requirement.
S200, acquiring all logs of a log link in the preset log tool according to the request parameters, and generating a log file to be tested.
In this embodiment, after the test request response is finished, all logs of the log link are acquired in the preset log tool according to the request characteristics, that is, the full-link logs in the test response process are acquired, and the to-be-tested log file is generated so as to perform a full coverage test on the log file, thereby improving the coverage of the log test.
In an embodiment, please refer to fig. 3, which is a flowchart illustrating a step S200 of the log automation test method according to the embodiment of the present invention, as shown in fig. 3, the step S200 includes:
s201, confirming a target thread id from the preset log tool according to the request parameter;
s202, continuously acquiring a target log on a corresponding log link in the preset log tool according to the target thread id;
s203, when the number of the target logs obtained continuously for a plurality of times is not increased, generating a log file to be tested according to all the target logs obtained at the last time.
In this embodiment, when obtaining a full link log, a request parameter is sent to a preset log tool to call a target thread id corresponding to an added log through an interface, the preset log tool performs a thread query after receiving the request parameter, if the request parameter is not queried within a certain time (for example, 60 s), timeout end information is returned, and if the request parameter is queried within a certain time, the target thread id corresponding to the request parameter is returned.
The server side continuously acquires a target log on a log link corresponding to the thread in a preset log tool according to the received target thread id, for example, the target log is acquired once every preset time, the log state is continuously monitored through multiple acquisition, when the number of the target logs acquired for a plurality of times is not increased, the current test request is considered to be responded, all logs on the log link are acquired currently, and therefore a log file to be tested is generated according to all the target logs acquired last time.
Preferably, when the number of the target logs obtained in three consecutive times is the same, the log file to be tested is generated according to all the target logs obtained in the last time, that is, if no new target log is added in three consecutive times, the response is considered to be finished, and of course, other times, for example, 5 times, may also be set in other embodiments, which is not limited in this embodiment.
S300, confirming the currently set verification mode, and performing verification test on the log file to be tested according to the verification rule corresponding to the verification mode.
In this embodiment, based on different log test scenarios, different verification modes and corresponding verification rules can be flexibly set, and the generated log file to be tested is analyzed and verified through the verification rules in different verification modes, so that efficient and flexible log test is realized.
In an embodiment, please refer to fig. 4, which is a flowchart of step S300 in the log automation test method according to the embodiment of the present invention, as shown in fig. 4, step S300 includes:
s301, confirming a currently set verification mode, wherein the verification mode comprises an interface test mode and an application test mode;
s302, acquiring a preset verification rule in the verification mode;
s303, carrying out verification test on the log file to be tested according to the verification rule.
In this embodiment, when performing log testing, the interface test mode and the application test mode may be specifically set to confirm the verification mode set by the current user, that is, an automatic test may be performed on a log in the interface test process, and also an overall application log scan test may be performed.
In an embodiment, please refer to fig. 5, which is a flowchart of step S303 in the log automation test method according to the embodiment of the present invention when the interface test mode is currently set, as shown in fig. 5, step S303 includes:
s3031, analyzing the log file to be tested to obtain an interface check item, a parameter check item and a log category;
s3032, counting the interface check items, the parameter check items and the log types, and comparing the interface check items, the parameter check items and the log types with a preset expected value to obtain a log test result.
In this embodiment, when log automation test is performed in an interface test process, log files test.log to be tested are analyzed, comparison items which can be tested in the log files test.log files are sorted and output, the comparison items include an interface check item, a parameter check item and a log category, the interface check item, the parameter check item and the log category are counted, and compared with a preset expected value, so that a log test result is obtained.
Specifically, the interface check item may include interface request times, interface request time consumption, and the like, the parameter check item may include an access parameter value of the interface, whether an interface access parameter exists, and the like, the log category may include the number of logs of different levels, an error log category, and the like, when performing comparison check, the statistical corresponding value is compared with a preset expected value, for example, the interface request times expected value of a certain interface is 1, if the interface request times obtained through analysis and statistics is 1, the test is passed, and if the interface request times obtained through analysis and statistics is greater than 1, prompt information indicating whether a repeat request exists is output; similarly, for example, a request time consumption expected value, an access parameter existing state, different levels of log number expected values, error log categories and the like can be sequentially set, and accurate and efficient test on the logs is realized through efficient matching with the expected values.
In one embodiment, if the application test mode is currently set, step S303 includes:
and calling a preset interface to perform abnormal log test on the log file to be tested to obtain log string information matched with preset abnormal items in the log file to be tested.
In this embodiment, when performing a log scanning test on an entire application, the preset interface is called to perform an abnormal log test on a log file to be tested, that is, the abnormal log test interface is called to scan a log of the entire application to obtain log string information matched with a preset abnormal item, where the specific preset abnormal item may be, for example, null pointer abnormality, JSON abnormality, or the like, and the log string matched with the preset abnormal item and the matching frequency may be specifically output to obtain specific error log information.
S400, displaying the log test result in the verification mode.
In this embodiment, log test results in different verification modes are displayed in a visual manner, and the specific log test results may include test states such as success, failure, undetermined state, and the like, and specific test matching values and prompts, such as the number of interface requests recorded in the log, time consumed for the interface requests, and the like, and if the test matching values are not matched with the preset expected value, the user is prompted to further confirm whether the values in the log are accurate, so that efficient and intuitive log test is realized.
Another embodiment of the present invention provides an automatic log testing apparatus, as shown in fig. 6, the apparatus 1 includes:
the log adding module 11 is configured to add, in response to the test request, a log corresponding to the request parameter to a preset log tool;
the log obtaining module 12 is configured to obtain all logs of a log link in the preset log tool according to the request parameter, and generate a log file to be tested;
the verification test module 13 is configured to determine a currently set verification mode, and perform a verification test on the log file to be tested according to a verification rule corresponding to the verification mode;
and the display module 14 is configured to display the log test result in the verification mode.
The modules referred to in the present invention refer to a series of computer program instruction segments capable of performing specific functions, and are more suitable for describing the execution process of log automation test than programs.
In one embodiment, the log adding module 11 includes:
the receiving and analyzing unit is used for receiving the test request and analyzing to obtain the request parameters carried in the test request;
and the adding unit is used for acquiring a corresponding log according to the request parameter and adding the acquired log to a preset log tool.
In one embodiment, the log obtaining module 12 includes:
the thread confirming unit is used for confirming a target thread id from the preset log tool according to the request parameter;
the log obtaining unit is used for continuously obtaining a target log on a corresponding log link in the preset log tool according to the target thread id;
and the file generating unit is used for generating the log file to be detected according to all the target logs acquired at the last time when the number of the target logs acquired for a plurality of times is not increased.
In an embodiment, the file generating unit is specifically configured to:
and when the number of the target logs obtained continuously for three times is the same, generating a log file to be tested according to all the target logs obtained at the last time.
In one embodiment, the verification test module 13 includes:
the mode confirming unit is used for confirming a currently set verification mode, and the verification mode comprises an interface test mode and an application test mode;
a rule obtaining unit, configured to obtain a preset verification rule in the verification mode;
and the verification test unit is used for performing verification test on the log file to be tested according to the verification rule.
In one embodiment, the verification test unit includes:
the analysis unit is used for analyzing the log file to be tested to obtain an interface check item, a parameter check item and a log category;
and the statistic comparison unit is used for counting the interface check items, the parameter check items and the log categories and comparing the statistic with a preset expected value to obtain a log test result.
In one embodiment, the verification test unit is further configured to:
and calling a preset interface to perform an abnormal log test on the log file to be tested to obtain log string information matched with a preset abnormal item in the log file to be tested.
Another embodiment of the present invention provides an automated log testing system, as shown in fig. 7, the system 10 includes:
one or more processors 110 and a memory 120, where fig. 7 illustrates one processor 110, the processor 110 and the memory 120 may be connected by a bus or other means, and fig. 7 illustrates a connection via a bus.
Processor 110 is used to implement various control logic for system 10, which may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a single chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. Also, the processor 110 may be any conventional processor, microprocessor, or state machine. Processor 110 may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The memory 120 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions corresponding to the log automation test method in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the system 10 by executing nonvolatile software programs, instructions and units stored in the memory 120, that is, implements the log automation test method in the above method embodiment.
The memory 120 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the system 10, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 120 optionally includes memory located remotely from processor 110, which may be connected to system 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more units are stored in the memory 120, and when executed by the one or more processors 110, perform the steps of:
responding to the test request, and adding a log corresponding to the request parameter into a preset log tool;
acquiring all logs of a log link in the preset log tool according to the request parameters, and generating a log file to be tested;
confirming a currently set verification mode, and performing verification test on the log file to be tested according to a verification rule corresponding to the verification mode;
and displaying the log test result in the verification mode.
In one embodiment, the adding, in response to the test request, the log corresponding to the request parameter to a preset log tool includes:
receiving a test request, and analyzing to obtain a request parameter carried in the test request;
and acquiring a corresponding log according to the request parameters and adding the acquired log to a preset log tool.
In an embodiment, the obtaining all logs of the log link in the preset log tool according to the request parameter to generate the log file to be tested includes:
confirming a target thread id from the preset log tool according to the request parameter;
continuously acquiring a target log on a corresponding log link in the preset log tool according to the target thread id;
and when the number of the target logs obtained continuously for a plurality of times is not increased, generating a log file to be detected according to all the target logs obtained at the last time.
In an embodiment, when the number of the target logs obtained continuously for a plurality of times is not increased, generating a log file to be tested according to all the target logs obtained last time specifically includes:
and when the number of the target logs obtained continuously for three times is the same, generating a log file to be tested according to all the target logs obtained last time.
In an embodiment, the determining a currently set verification mode, and performing a verification test on the log file to be tested according to a verification rule corresponding to the verification mode includes:
confirming a currently set verification mode, wherein the verification mode comprises an interface test mode and an application test mode;
acquiring a preset verification rule in the verification mode;
and carrying out verification test on the log file to be tested according to the verification rule.
In an embodiment, if the interface test mode is currently set, the performing a verification test on the log file to be tested according to the verification rule includes:
analyzing the log file to be tested to obtain an interface check item, a parameter check item and a log category in the log file to be tested;
and counting the interface check items, the parameter check items and the log types, and comparing the interface check items, the parameter check items and the log types with a preset expected value to obtain a log test result.
In an embodiment, if the application test mode is currently set, the performing a verification test on the log file to be tested according to the verification rule includes:
and calling a preset interface to perform abnormal log test on the log file to be tested to obtain log string information matched with preset abnormal items in the log file to be tested.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions for execution by one or more processors, e.g., to perform method steps S100-S400 of fig. 1 described above.
By way of example, nonvolatile storage media can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The disclosed memory components or memory of the operating environment described herein are intended to comprise one or more of these and/or any other suitable types of memory.
To sum up, in the log automated testing method, apparatus, system and medium disclosed by the present invention, the method adds the log corresponding to the request parameter to the preset log tool by responding to the test request; acquiring all logs of a log link in the preset log tool according to the request parameters, and generating a log file to be tested; confirming a currently set verification mode, and performing verification test on the log file to be tested according to a verification rule corresponding to the verification mode; and displaying the log test result in the verification mode. The log test request initiated by the user is responded, the full-link log of the current request is obtained, the full-link log is verified and tested, and the high-coverage and high-efficiency log automatic test is realized.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program, which may be stored in a non-volatile computer-readable storage medium, and the computer program may include the processes of the above method embodiments when executed. The storage medium may be a memory, a magnetic disk, a floppy disk, a flash memory, an optical memory, etc.
It will be understood that the invention is not limited to the examples described above, but that modifications and variations will occur to those skilled in the art in light of the above teachings, and that all such modifications and variations are considered to be within the scope of the invention as defined by the appended claims.

Claims (10)

1. An automated log testing method, comprising:
responding to the test request, and adding a log corresponding to the request parameter into a preset log tool;
acquiring all logs of a log link in the preset log tool according to the request parameters, and generating a log file to be tested;
confirming a currently set verification mode, and performing verification test on the log file to be tested according to a verification rule corresponding to the verification mode;
and displaying the log test result in the verification mode.
2. The log automation test method as claimed in claim 1, wherein the adding the log corresponding to the request parameter to a preset log tool in response to the test request comprises:
receiving a test request, and analyzing to obtain a request parameter carried in the test request;
and acquiring a corresponding log according to the request parameters and adding the acquired log to a preset log tool.
3. The method for automatically testing the logs according to claim 1, wherein the step of obtaining all logs of a log link in the preset log tool according to the request parameters and generating a log file to be tested comprises:
confirming a target thread id from the preset log tool according to the request parameter;
continuously acquiring a target log on a corresponding log link in the preset log tool according to the target thread id;
and when the number of the target logs obtained for a plurality of times is not increased, generating a log file to be tested according to all the target logs obtained at the last time.
4. The automatic log testing method according to claim 3, wherein when the number of the target logs obtained continuously for several times is not increased, the log file to be tested is generated according to all the target logs obtained last time, and the method specifically comprises:
and when the number of the target logs obtained continuously for three times is the same, generating a log file to be tested according to all the target logs obtained last time.
5. The log automatic testing method according to claim 1, wherein the determining a currently set verification mode and performing a verification test on the log file to be tested according to a verification rule corresponding to the verification mode includes:
confirming a currently set verification mode, wherein the verification mode comprises an interface test mode and an application test mode;
acquiring a preset verification rule in the verification mode;
and carrying out verification test on the log file to be tested according to the verification rule.
6. The automated log test method of claim 5, wherein if the interface test mode is currently set, the performing the verification test on the log file to be tested according to the verification rule comprises:
analyzing the log file to be tested to obtain an interface check item, a parameter check item and a log category;
and counting the interface check items, the parameter check items and the log types, and comparing the interface check items, the parameter check items and the log types with a preset expected value to obtain a log test result.
7. The automated log test method of claim 5, wherein if the application test mode is currently set, the performing the verification test on the log file to be tested according to the verification rule comprises:
and calling a preset interface to perform abnormal log test on the log file to be tested to obtain log string information matched with preset abnormal items in the log file to be tested.
8. An automated log testing device, comprising:
the log adding module is used for responding to the test request and adding the log corresponding to the request parameter into a preset log tool;
the log acquisition module is used for acquiring all logs of a log link in the preset log tool according to the request parameters and generating a log file to be tested;
the verification test module is used for confirming a currently set verification mode and carrying out verification test on the log file to be tested according to a verification rule corresponding to the verification mode;
and the display module is used for displaying the log test result in the verification mode.
9. An automated log testing system, the system comprising at least one processor; and the number of the first and second groups,
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 log automation test method of any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the log automation testing method of any one of claims 1 to 7.
CN202211157173.5A 2022-09-21 2022-09-21 Log automatic test method, device, system and medium Pending CN115495358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211157173.5A CN115495358A (en) 2022-09-21 2022-09-21 Log automatic test method, device, system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211157173.5A CN115495358A (en) 2022-09-21 2022-09-21 Log automatic test method, device, system and medium

Publications (1)

Publication Number Publication Date
CN115495358A true CN115495358A (en) 2022-12-20

Family

ID=84470302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211157173.5A Pending CN115495358A (en) 2022-09-21 2022-09-21 Log automatic test method, device, system and medium

Country Status (1)

Country Link
CN (1) CN115495358A (en)

Similar Documents

Publication Publication Date Title
CN108376112B (en) Pressure testing method, device and readable medium
CN107688530B (en) Software testing method and device
CN104834602B (en) A kind of program dissemination method, device and program delivery system
CN110851339A (en) Method and device for reporting buried point data, storage medium and terminal equipment
CN111221727A (en) Test method, test device, electronic equipment and computer readable medium
CN112241362A (en) Test method, test device, server and storage medium
CN112000582A (en) Server-side automatic test early warning method, device, equipment and storage medium
CN114238036A (en) Method and device for monitoring abnormity of SAAS (software as a service) platform in real time
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN112612706A (en) Automated testing method, computer device and storage medium
CN117215953A (en) Verification method and device for equipment configuration information, storage medium and electronic equipment
CN112416648A (en) Data verification method and device
CN111797008A (en) Automatic verification method, equipment and storage medium for mobile terminal buried point data
CN107807885B (en) Task information display method and device
CN115495358A (en) Log automatic test method, device, system and medium
CN113672497B (en) Method, device and equipment for generating non-buried point event and storage medium
CN115599467A (en) Capacity expansion processing method, device, system and medium for stock service
CN115629940A (en) Micro-service full-link tracking method, device, system and medium
CN112905445B (en) Log-based test method, device and computer system
CN114528213A (en) Automatic baffle plate testing method, device, equipment and storage medium
CN112631929A (en) Test case generation method and device, storage medium and electronic equipment
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN110704218A (en) Data processing method, data processing device, computer equipment and storage medium
CN111597101A (en) SDK access state detection method, computer device and computer readable storage medium
CN116028731B (en) Display method of target event completion degree and related products

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