CN108920377A - A kind of log playback test method, system, device and readable storage medium storing program for executing - Google Patents

A kind of log playback test method, system, device and readable storage medium storing program for executing Download PDF

Info

Publication number
CN108920377A
CN108920377A CN201810778196.5A CN201810778196A CN108920377A CN 108920377 A CN108920377 A CN 108920377A CN 201810778196 A CN201810778196 A CN 201810778196A CN 108920377 A CN108920377 A CN 108920377A
Authority
CN
China
Prior art keywords
log
work
work log
mkodification
alteration ruler
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.)
Granted
Application number
CN201810778196.5A
Other languages
Chinese (zh)
Other versions
CN108920377B (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.)
Hangzhou Dbappsecurity Technology Co Ltd
Original Assignee
Hangzhou Dbappsecurity 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 Hangzhou Dbappsecurity Technology Co Ltd filed Critical Hangzhou Dbappsecurity Technology Co Ltd
Priority to CN201810778196.5A priority Critical patent/CN108920377B/en
Publication of CN108920377A publication Critical patent/CN108920377A/en
Application granted granted Critical
Publication of CN108920377B publication Critical patent/CN108920377B/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/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

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

This application discloses a kind of logs to play back test method:The work log that target device generates is collected by preset path;The work log type according to belonging to work log matches corresponding alteration ruler from mkodification comparison table, and is modified using alteration ruler to work log, obtains log to be played back;Playback log, which is treated, using log playback measuring technology carries out log playback test.This method pre-establishes the mkodification comparison table including corresponding relationship between each work log type and each alteration ruler, whenever needing to carry out a work log log playback test, the corresponding alteration ruler of the work log need to be only determined according to the mkodification comparison table, without relying on experience manual modification by technical staff, and great promotion can be brought for modification efficiency, to modify that more accurate, accidentally modification rate is lower simultaneously, actual effect is more preferably.The application further simultaneously discloses a kind of log playback test macro, device and computer readable storage medium, has above-mentioned beneficial effect.

Description

A kind of log playback test method, system, device and readable storage medium storing program for executing
Technical field
This application involves log playback technology field, in particular to a kind of log playback test method, system, device and meter Calculation machine readable storage medium storing program for executing.
Background technique
In order to the safety to equipment is analyzed, except using gateway to carry out real-time monitoring to network traffic flow Outside method, a kind of safety analysis mechanism based on equipment performance log is had also appeared.
Safety analysis mechanism based on equipment performance log, be it is a kind of using log playback technology to from various types of equipment (host class, network class, security classes, using class) at collect come real work log carry out log play back to reappear corresponding equipment The course of work, therefrom to have found that it is likely that existing safety issue.But safety analysis platform development manufacturer can not simulate institute There is the working environment of type equipment and then obtain the log generated under the environment, so that safety analysis platform development manufacturer is carrying out It will receive limitation when functional test.
The prior art provides one kind and extracts from user rs environment on customer equipment after various types of logs, by skill The experience of art personnel carries out manual modification so that modified log meets the implementation for carrying out the condition of playback test, but by In needing before each playback the variable field in all manual modification logs, and need to aim at different types of day it is different can Different modifications is carried out at mutilation section, not only very relies on the experience of technical staff, but also efficiency is very low, while there is also Higher accidentally modification rate, actual effect are bad.
Therefore, how to overcome items technological deficiency existing for existing log playback test method, provide a kind of without artificial It modifies manually by experience, is more efficient, mistake modification rate is lower, actual effect more preferably log playback testing mechanism is this Field technical staff's urgent problem to be solved.
Summary of the invention
The purpose of the application is to provide a kind of log playback test method, initially set up including each work log type and The mkodification comparison table of corresponding relationship between each alteration ruler is only needed when needing to carry out a work log log playback test The corresponding alteration ruler of the work log is determined according to the mkodification comparison table, rely on experience hand without technical staff It is dynamic to modify, and great promotion can be brought for modification efficiency by the alteration ruler, while to modify more accurate, accidentally modification Rate is lower, and actual effect is more preferably.
The another object of the application is the provision of a kind of log playback test macro, device and computer-readable storage medium Matter.
To achieve the above object, the application provides a kind of log playback test method, and log playback test method includes:
The work log that target device generates is collected by preset path;Wherein, the target device is to have returned with log Put the equipment that test platform establishes a connection;
Corresponding alteration ruler is matched from mkodification comparison table according to work log type belonging to the work log, and It is modified using the alteration ruler to the work log, obtains log to be played back;Wherein, it is wrapped in the mkodification comparison table Include the corresponding relationship between each work log type and each alteration ruler;
Log playback test is carried out to the log to be played back using log playback measuring technology.
Optionally, the establishment process of the mkodification comparison table includes:
Extract the format character of every workday will in history work log, and the work that the identical format character will be possessed It incorporates into as log as the same work log type;
Corresponding alteration ruler is preset respectively for each work log type;
The mkodification comparison table is established according to the corresponding relationship between each work log type and each alteration ruler.
Optionally, the work log type according to belonging to the work log matches corresponding modification from mkodification comparison table Rule, and modified using the alteration ruler to the work log, log to be played back is obtained, including:
The format character for extracting the work log obtains object format feature;
It determines work log type corresponding with the object format feature, obtains target operation log type;
Alteration ruler corresponding with the target operation log type is matched using the mkodification comparison table, target is obtained and repairs Change rule;
It modifies according to the target modification rule to the work log, obtains the log to be played back.
Optionally, log playback test method further includes:
Each alteration ruler is formatted respectively using regular expression, obtains log modification regular expressions Formula, to carry out log modification using with each matched log modification regular expression of work log.
Optionally, log playback test method further includes:
Whenever adding fresh target equipment, judge whether that new work log can be modified using the mkodification comparison table;Wherein, The new work log is the work log that the fresh target equipment generates;
If it is not, corresponding alteration ruler then is arranged for the new work log, and it is supplemented to the mkodification comparison table.
To achieve the above object, present invention also provides a kind of logs to play back test macro, which plays back test macro Including:
Work log collector unit, for collecting the work log that target device generates by preset path;Wherein, described Target device is to have played back the equipment that test platform establishes a connection with log;
Unit is modified in log, is matched from mkodification comparison table for the work log type according to belonging to the work log Corresponding alteration ruler, and modified using the alteration ruler to the work log, obtain log to be played back;Wherein, It include the corresponding relationship between each work log type and each alteration ruler in the mkodification comparison table;
Log plays back test cell, for carrying out log playback to the log to be played back using log playback measuring technology Test.
Optionally, log playback test macro further includes:
Unit is sorted out in feature extraction and log, for extracting the format character of every workday will in history work log, And the work log for possessing the identical format character is incorporated into as the same work log type;
Alteration ruler setting unit, for presetting corresponding alteration ruler respectively for each work log type;
Mkodification comparison table establishes unit, for according to each work log type with it is corresponding between each alteration ruler Relationship establishes the mkodification comparison table.
Optionally, the log modification unit includes:
Object format feature extraction subelement obtains object format spy for extracting the format character of the work log Sign;
Target operation log type determines subelement, for determining work log kind corresponding with the object format feature Class obtains target operation log type;
Target modification rule match subelement, for utilizing mkodification comparison table matching and the target operation log kind The corresponding alteration ruler of class obtains target modification rule;
Log modifies subelement and obtains institute for modifying according to the target modification rule to the work log State log to be played back.
Optionally, log playback test macro further includes:
Format conversion unit is obtained for being formatted respectively using regular expression to each alteration ruler Regular expression is modified to log, to carry out log using with each matched log modification regular expression of work log Modification.
Optionally, log playback test macro further includes:
Judging unit is modified in new work log, can be repaired using described for judging whether whenever adding fresh target equipment Change the table of comparisons and modifies new work log;Wherein, the new work log is the work log that the fresh target equipment generates;
Alteration ruler increases newly and supplementary units, can not modify the new work log using the mkodification comparison table for working as When, corresponding alteration ruler is set for the new work log, and be supplemented to the mkodification comparison table.
To achieve the above object, present invention also provides a kind of logs to play back test device, which plays back test device Including:
Memory, for storing computer program;
Processor realizes that the log as described in above content plays back test method when for executing the computer program The step of.
To achieve the above object, described computer-readable to deposit present invention also provides a kind of computer readable storage medium It is stored with computer program on storage media, the day as described in above content is realized when the computer program is executed by processor Will plays back the step of test method.
Log provided herein plays back test method:The working day that target device generates is collected by preset path Will;Wherein, the target device is to have played back the equipment that test platform establishes a connection with log;The work log is pressed Mkodification comparison table carries out corresponding modification, obtains log to be played back;It wherein, include each work log kind in the mkodification comparison table Corresponding relationship between class and each alteration ruler;Log playback is carried out to the log to be played back using log playback measuring technology to survey Examination.
Obviously, technical solution provided by the present application is advised by pre-establishing including each work log type and each modification The mkodification comparison table of corresponding relationship between then only need to be according to later when needing to carry out work log log playback test The mkodification comparison table determines the corresponding alteration ruler of the work log, repairs manually without technical staff by experience Change, and great promotion can be brought by the alteration ruler for modification efficiency, while to modify more accurate, mistake modification rate more Low, actual effect is more preferably.The application additionally provides a kind of log playback test macro, device and computer-readable storage medium simultaneously Matter has above-mentioned beneficial effect, and details are not described herein.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart that a kind of log provided by the embodiments of the present application plays back test method;
Fig. 2 is the flow chart that another log provided by the embodiments of the present application plays back test method;
Fig. 3 is the flow chart that another log provided by the embodiments of the present application plays back test method;
Fig. 4 is the structural block diagram that a kind of log provided by the embodiments of the present application plays back test macro;
Fig. 5 is the structural block diagram that another log provided by the embodiments of the present application plays back test macro.
Specific embodiment
The core of the application is to provide a kind of log playback test method, and this method is by pre-establishing including each work The mkodification comparison table of corresponding relationship between log type and each alteration ruler ought need to carry out log to a work log later to return When putting test, the corresponding alteration ruler of the work log only need to be determined according to the mkodification comparison table, without technology people Member relies on experience manual modification, and can bring great promotion by the alteration ruler for modification efficiency, while making modification more Add precisely, accidentally modification rate it is lower, actual effect is more preferably.Another core of the application be to provide a kind of log playback test macro, Device and computer readable storage medium have above-mentioned beneficial effect.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art All other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Embodiment one
Below in conjunction with Fig. 1, Fig. 1 is the flow chart that a kind of log provided by the embodiments of the present application plays back test method, tool Body includes the following steps:
S101:The work log that target device generates is collected by preset path;Wherein, target device is to have returned with log Put the equipment that test platform establishes a connection;
This step is intended to collect the work log of these equipment generation from various types of equipment, specifically, the application is with one A establish with various types of equipment has the log of connection relationship to play back test platform as executing subject, it is intended to flat from log playback test The visual angle of platform illustrates how to realize the detailed process of log playback test.
The equipment that log playback test platform establishes a connection, can play back test platform with the log in many ways It establishes a connection, can substantially be divided into wire transmission and wireless transmission, wherein when using wire transmission, a kind of implementation is: Every equipment is based respectively on individual data transmission path, and that the work log that itself is generated is transmitted to log playback test is flat Platform;The work log respectively generated is transmitted to this based on unified data transmission path for all devices by another implementation Log plays back test platform.Further, in the work log generated based on unified data transmission path transmission multiple equipment When, there are multiple equipment while data transfer request may be initiated in synchronization, to prevent the log from playing back test platform A receiving queue can also be arranged in the data corruption situation being likely to occur when receiving data, and will according to certain rule The data transmission initiated simultaneously is arranged in the receiving queue, so that subsequent choose from the receiving queue modifies execution journal With the target operation log of log playback test operation.
Various scenes when similar to using wire transmission, can be according to similar processing side when using wireless transmission Formula can also be adjusted correspondingly since specifically used wireless transmission protocol is there are when some special points for attention.This The purpose of step is the original work log that acquisition will be handled in the next steps, these original work logs are according to life The difference of agreement and format that forming apparatus is followed can externally be rendered as different operating log type, and how this step is to not obtaining It takes the details of these original work logs specifically to be limited, can flexibly be mentioned on include but is not limited to according to the actual situation The original work log acquisition modes of most suitable current application scene are chosen in the implementation of confession.
S102:The work log type according to belonging to work log matches corresponding alteration ruler from mkodification comparison table, And modified using alteration ruler to work log, obtain log to be played back;It wherein, include each working day in mkodification comparison table Corresponding relationship between will type and each alteration ruler;
On the basis of S101, the original work log that this step is intended to receive is carried out by preset mkodification comparison table Corresponding modification, to obtain can use the log to be played back of log playback measuring technology progress log playback operation.It needs It is bright, it include the corresponding relationship between each work log type and each alteration ruler in the mkodification comparison table, with A type working day For will, which is corresponded to comprising A class alteration ruler corresponding with A type work log in table, and the A class alteration ruler is energy A kind of enough words being revised as A type using the log to be played back for carrying out log playback operation using log playback measuring technology Segment information modifications or substitutions rule, and each work log type being located in the mkodification comparison table is the history work from the big order of magnitude Make to obtain in log through feature extraction and concluding, and alteration ruler corresponding with every workday will type is also from technology people Abstract obtains in the modification experience of member, and only needing technical staff to pay primary labour in this way can be used for a long time, and not Can exist and modify result using differentiation log caused by the difference of artificial bring visual fatigue and working condition.
Specifically, the form of expression of the alteration ruler is varied, it can be used separately matching rule and Substitution Rules, i.e., The field to be modified is found first, completes modification using corresponding Substitution Rules, it can also be directly using integral type Alteration ruler, one of preferable mode of effect are that the alteration ruler is embodied using regular expression.
Regular expression (Regular Expression, regex, regexp or RE are often abbreviated as in code), also known as Regular expression, is a concept in computer science, and regular expression, which is usually used to retrieval, replaces those meets The text of some mode (rule).And the programming language of numerous species is all supported directly to carry out word using regular expression Accord with the other operation of tandem.It is, of course, also possible to specifically indicate the alteration ruler using other functionally similar modes to reach phase With or similar effect, can the most suitable manifestation mode of flexible choice according to the actual situation.
It is a kind of using regular expression performance alteration ruler specific implementation be:
Each alteration ruler is formatted respectively using regular expression, obtains log modification regular expression, To carry out log modification using with the matched log modification regular expression of every workday will.
S103:Playback log, which is treated, using log playback measuring technology carries out log playback test.
This step realizes the final step of log playback test purpose as the application, gets various types of equipment in S101 Original work log on the basis of, in S102 according to the original work log according to preset mkodification comparison table using corresponding On the basis of alteration ruler is modified wait play back log, this step only need to be using existing log playback measuring technology to modification The log to be played back obtained afterwards carries out log playback test.Since this step has directly used existing log playback test Technology, and be not the emphasis of the claimed scheme of the application, herein without repeating.
Further, since the work log type for including in the mkodification comparison table is the history work based on the big order of magnitude Log is obtained through feature extraction and conclusion, can contain kind belonging to the most work logs newly received of lid under normal conditions Class, but with the development of science and technology, the promotion of standard, will appear unavoidably using unknown protocol and format generation New raxa working day Will, this when due in mkodification comparison table there is no the alteration ruler of corresponding type work log, can also cannot by this Technical staff is submitted in the new work log of processing, the alteration ruler corresponding with the new work log that keeps it newly-increased, and will be new Corresponding relationship is supplemented in the mkodification comparison table.
Based on the above-mentioned technical proposal, a kind of log provided by the embodiments of the present application plays back test method, by pre-establishing Well include the mkodification comparison table of corresponding relationship between each work log type and each alteration ruler, ought be needed later to a working day When will carries out log playback test, the corresponding alteration ruler of the work log, nothing need to be only determined according to the mkodification comparison table Experience manual modification need to be relied on by technical staff, and can bring great promotion by the alteration ruler for modification efficiency, together When to modify that more accurate, accidentally modification rate is lower, actual effect is more preferably.
Embodiment two
Below in conjunction with Fig. 2, Fig. 2 is the flow chart that another log provided by the embodiments of the present application plays back test method, this Embodiment on the basis of example 1, additionally provides how one kind establishes the implementation of the mkodification comparison table, and is based on How the mkodification comparison table of offer specifically carries out the matching and modification of corresponding alteration ruler, and specific embodiment is as follows:
S201:The format character of every workday will in history work log is extracted, and same format feature will be possessed Work log is incorporated into as the same work log type;
S202:Corresponding alteration ruler is preset respectively for every workday will type;
S203:Mkodification comparison table is established according to the corresponding relationship between each work log type and each alteration ruler;
S201, S202 and S203 provide a kind of method for establishing mkodification comparison table, the history work based on big quantity Log, and the extraction of format character is carried out to every workday will wherein included, the work of same format feature will be possessed Log is incorporated into as the same work log type, can be obtained a certain number of work log types, is then for each work later Log type presets corresponding alteration ruler respectively, finally then can construct this modification according to corresponding relationship existing between it The table of comparisons.
Wherein, which can be the work that some safety analysis device manufacturer for a long time generates various types of equipment It is obtained as log collection, can also be got from certain authoritative issuing web sites with public credibility etc., it is therefore intended that Work log type as much as possible is covered for generating the basic data of the mkodification comparison table as far as possible.
S204:The work log that target device generates is collected by preset path;
S205:The format character for extracting work log, obtains object format feature;
S206:It determines work log type corresponding with object format feature, obtains target operation log type;
S207:Alteration ruler corresponding with target operation log type is matched using mkodification comparison table, obtains target modification Rule;
S208:It modifies according to target modification rule to work log, obtains log to be played back;
S205, S206, S207 and S208 provide a kind of in the mkodification comparison provided using S201, S202 and S203 How to be modified according to mkodification comparison table to the work log being newly collected under table method for building up, obtain the side of log to be played back Method first has to determine work log type belonging to the new work log collected and, better basis after the type belonging to determining Mkodification comparison table determines corresponding alteration ruler, to use target modification rule that the work log that new collection comes is modified, It finally obtains and can use the log to be played back that log playback measuring technology treats playback log progress log playback test.
S209:Playback log, which is treated, using log playback measuring technology carries out log playback test.
Embodiment three
Fig. 3 is referred to, this implementation provides on the basis of embodiment one and embodiment two in conjunction with practical application scene A kind of specific implementation is divided into 5 execution parts, and each execution part will be described in detail respectively below:
1, extract equipment log:
Various types log caused by access device is extracted, each log correspondence is saved in a journal file, Wherein, access device refers to the equipment for accessing to log analysis platform, log analysis platform be one can be used for analyzing log from And identify the platform of various vulnerability informations.
For example, the journal file that some system in equipment dev1 generates is stored in A file.
2, uploading device log:
Journal file is uploaded to playback platform, and reads journal file, wherein playback platform is log analysis platform One functional module is mainly used for carrying out playback test to customer equipment log.
Still by taking A file as an example, file A is uploaded into playback platform, and certain log read from file A is:
172.16.101.239 352-[10/May/2017:18:28:48 +0800]"GET/?RDBTO=MEGWKGBF HTTP/1.1"200 7933"http://172.16.101.61/ZGZJMOM""Mozilla/4.0(compatible;MSIE 8.0;Windows NT 5.2;Win64;x64;Trident/4.0)""1""111.111.111.111""172.16.101.61"
3, configuration modification information:
3.1 configuration modification fields:When carrying out playback test, need to modify field in log according to test scene demand Daily record data, wherein configurable modification field includes but is not limited to:SIP (source IP address), DIP (purpose IP address), when Between;
3.2 configuration modification regular expressions:Modification to field each in log, is criticized by configuring regular expression Amount modification, to meet the playback test of test scene.
It is assumed that present testing requirement is the access times tested current time and be 172.169.101.240 from IP, because This needs to modify field to meet testing requirement:
Time, [10/May/2017:18:28:48+0800]
4, batch modification daily record data:
According to the regular expression that step 3.2 configures, the daily record data read in step 2 is subjected to batch modification, is needed It is noted that for the authenticity for guaranteeing daily record data as far as possible, amended daily record data will keep original log Its field data format of format, amended daily record data is constant.
After regular expression, certain log in file A is changed to:
172.16.101.240 352-[22/May/2018:14:40:00+0800]"GET/?RDBTO=MEGWKGBF HTTP/1.1"200 7933"http://172.16.101.61/ZGZJMOM""Mozilla/4.0(compatible;MSIE 8.0;Windows NT 5.2;Win64;x64;Trident/4.0)""1""111.111.111.111""172.16.101.61"
The field modified is the time field after " 172.16.101.240 352- ", by original " [10/ May/2017:18:28:48+0800] " it is revised as " [22/May/2018:14:40:00+0800] ", this is because modification be for Playback test is carried out in playback platform convenient for subsequent, it is therefore desirable to the time being revised as after a current time, no Log playback test will can not be then carried out due to timing error.
5, playback test is carried out:
Step 5.1:It plays back platform and the operation of step 2 to step 4 is repeated according to function scene, obtain the test for meeting scene Data;
Step 5.2:Daily record data is directed into log analysis platform to play back, to complete functional test.
Journal file A is imported into log analysis platform, file A is analyzed, with the correctness of authentication function.
Because situation is complicated, it can not enumerate and be illustrated, those skilled in the art should be able to recognize according to the application The basic skills principle combination actual conditions of offer may exist many examples, in the case where not paying enough creative works, It should within the scope of protection of this application.
Fig. 4 and Fig. 5 are referred to below, and Fig. 4 and Fig. 5 are respectively a kind of log playback test system provided by the embodiments of the present application The structural block diagram of system, log playback test macro may include:
Work log collector unit 100, for collecting the work log that target device generates by preset path;Wherein, Target device is to have played back the equipment that test platform establishes a connection with log;
Unit 200 is modified in log, is matched from mkodification comparison table for the work log type according to belonging to work log Corresponding alteration ruler, and modified using alteration ruler to work log, obtain log to be played back;Wherein, mkodification comparison It include the corresponding relationship between each work log type and each alteration ruler in table;
Log plays back test cell 300, carries out log playback for treating playback log using log playback measuring technology Test.
Further, log playback test macro can also include:
Unit is sorted out in feature extraction and log, for extracting the format character of every workday will in history work log, And the work log for possessing same format feature is incorporated into as the same work log type;
Alteration ruler setting unit, for presetting corresponding alteration ruler respectively for every workday will type;
Mkodification comparison table establishes unit, for being established according to the corresponding relationship between each work log type and each alteration ruler Mkodification comparison table.
Wherein, log modification unit 200 may include:
Object format feature extraction subelement obtains object format feature for extracting the format character of work log;
Target operation log type determines subelement, for determining work log type corresponding with object format feature, Obtain target operation log type;
Target modification rule match subelement, it is corresponding with target operation log type for being matched using mkodification comparison table Alteration ruler obtains target modification rule;
Log modifies subelement and obtains log to be played back for modifying according to target modification rule to work log.
Further, log playback test macro can also include:
Format conversion unit obtains day for formatting respectively using regular expression to each alteration ruler Will modifies regular expression, to carry out log modification using with the matched log modification regular expression of every workday will.
Further, log playback test macro can also include:
Judging unit is modified in new work log, can utilize modification pair for judging whether whenever adding fresh target equipment New work log is modified according to table;Wherein, new work log is the work log that fresh target equipment generates;
Alteration ruler increases newly and supplementary units, for being new when mkodification comparison table can not be utilized to modify new work log Corresponding alteration ruler is arranged in work log, and is supplemented to mkodification comparison table.
Based on the above embodiment, present invention also provides a kind of logs to play back test device, which plays back test device It may include memory and processor, wherein have computer program in the memory, which calls in the memory When computer program, step provided by above-described embodiment may be implemented.Certainly, log playback test device can also include Various necessary network interfaces, power supply and other components etc..
Present invention also provides a kind of computer readable storage mediums, have computer program thereon, the computer program Step provided by above-described embodiment may be implemented when being performed terminal or processor execution.The storage medium may include:U Disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), the various media that can store program code such as magnetic or disk.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration ?.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond scope of the present application.
Specific examples are used herein to illustrate the principle and implementation manner of the present application, and above embodiments are said It is bright to be merely used to help understand the present processes and its core concept.For those skilled in the art, Under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, these improvement and modification It falls into the protection scope of the claim of this application.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also other elements including being not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or equipment for including element.

Claims (10)

1. a kind of log plays back test method, which is characterized in that including:
The work log that target device generates is collected by preset path;Wherein, the target device is to play back to survey with log The equipment that examination platform establishes a connection;
Corresponding alteration ruler is matched from mkodification comparison table according to work log type belonging to the work log, and is utilized The alteration ruler modifies to the work log, obtains log to be played back;It wherein, include each in the mkodification comparison table Corresponding relationship between work log type and each alteration ruler;
Log playback test is carried out to the log to be played back using log playback measuring technology.
2. method according to claim 1, which is characterized in that the establishment process of the mkodification comparison table includes:
Extract the format character of every workday will in history work log, and the working day that the identical format character will be possessed Will incorporates into as the same work log type;
Corresponding alteration ruler is preset respectively for each work log type;
The mkodification comparison table is established according to the corresponding relationship between each work log type and each alteration ruler.
3. method according to claim 2, which is characterized in that according to work log type belonging to the work log from repairing Change and match corresponding alteration ruler in the table of comparisons, and modified using the alteration ruler to the work log, obtain to Log is played back, including:
The format character for extracting the work log obtains object format feature;
It determines work log type corresponding with the object format feature, obtains target operation log type;
Alteration ruler corresponding with the target operation log type is matched using the mkodification comparison table, obtains target modification rule Then;
It modifies according to the target modification rule to the work log, obtains the log to be played back.
4. method according to any one of the claim 1 to 3, which is characterized in that further include:
Each alteration ruler is formatted respectively using regular expression, obtains log modification regular expression, To carry out log modification using with each matched log modification regular expression of work log.
5. method according to claim 4, which is characterized in that further include:
Whenever adding fresh target equipment, judge whether that new work log can be modified using the mkodification comparison table;Wherein, described New work log is the work log that the fresh target equipment generates;
If it is not, corresponding alteration ruler then is arranged for the new work log, and it is supplemented to the mkodification comparison table.
6. a kind of log plays back test macro, which is characterized in that including:
Work log collector unit, for collecting the work log that target device generates by preset path;Wherein, the target Equipment is to have played back the equipment that test platform establishes a connection with log;
Unit is modified in log, matches correspondence from mkodification comparison table for the work log type according to belonging to the work log Alteration ruler, and modified using the alteration ruler to the work log, obtain log to be played back;Wherein, described It include the corresponding relationship between each work log type and each alteration ruler in mkodification comparison table;
Log plays back test cell, surveys for carrying out log playback to the log to be played back using log playback measuring technology Examination.
7. system according to claim 6, which is characterized in that further include:
Unit is sorted out in feature extraction and log, for extracting the format character of every workday will in history work log, and will The work log for possessing the identical format character is incorporated into as the same work log type;
Alteration ruler setting unit, for presetting corresponding alteration ruler respectively for each work log type;
Mkodification comparison table establishes unit, for according to the corresponding relationship between each work log type and each alteration ruler Establish the mkodification comparison table.
8. system according to claim 7, which is characterized in that the log modifies unit and includes:
Object format feature extraction subelement obtains object format feature for extracting the format character of the work log;
Target operation log type determines subelement, for determining work log type corresponding with the object format feature, Obtain target operation log type;
Target modification rule match subelement, for utilizing mkodification comparison table matching and the target operation log type pair The alteration ruler answered obtains target modification rule;
Subelement is modified in log, for modifying according to the target modification rule to the work log, obtain it is described to Play back log.
9. a kind of log plays back test device, which is characterized in that including:
Memory, for storing computer program;
Processor is realized when for executing the computer program such as log described in any one of claim 1 to 5 playback test The step of method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes that log described in any one of claim 1 to 5 such as plays back test side when the computer program is executed by processor The step of method.
CN201810778196.5A 2018-07-16 2018-07-16 Log playback test method, system and device and readable storage medium Active CN108920377B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810778196.5A CN108920377B (en) 2018-07-16 2018-07-16 Log playback test method, system and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810778196.5A CN108920377B (en) 2018-07-16 2018-07-16 Log playback test method, system and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN108920377A true CN108920377A (en) 2018-11-30
CN108920377B CN108920377B (en) 2022-03-04

Family

ID=64412238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810778196.5A Active CN108920377B (en) 2018-07-16 2018-07-16 Log playback test method, system and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN108920377B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381519A (en) * 2020-11-20 2021-02-19 北京云族佳科技有限公司 Method and device for processing work logs and readable storage medium
CN112559333A (en) * 2020-12-10 2021-03-26 武汉联影医疗科技有限公司 Log production method and device, computer equipment and storage medium
CN114445184A (en) * 2022-01-27 2022-05-06 聚好看科技股份有限公司 Order flow playback method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866315A (en) * 2010-06-11 2010-10-20 中国科学院计算技术研究所 Test method and system of software development tool
CN103023710A (en) * 2011-09-21 2013-04-03 阿里巴巴集团控股有限公司 Safety test system and method
CN104717085A (en) * 2013-12-16 2015-06-17 中国移动通信集团湖南有限公司 Log parsing method and device
US20150264047A1 (en) * 2014-03-12 2015-09-17 Agreeya Mobility, Inc. Method and system for providing secure communication between multiple operating systems in a communication device
CN105119762A (en) * 2015-09-23 2015-12-02 普元信息技术股份有限公司 System and method of cloud platform for realizing transaction playback and transaction reworking based on logs
CN105335278A (en) * 2014-06-16 2016-02-17 阿里巴巴集团控股有限公司 Testing method and device
CN105930274A (en) * 2016-05-05 2016-09-07 中国银行股份有限公司 Automated test method and system
CN106547658A (en) * 2016-10-28 2017-03-29 合网络技术(北京)有限公司 A kind of automated testing method and device
CN106909499A (en) * 2015-12-22 2017-06-30 阿里巴巴集团控股有限公司 Method of testing and device
CN107741902A (en) * 2016-12-23 2018-02-27 腾讯科技(深圳)有限公司 Program application detection method and program application detection means
US20180115580A1 (en) * 2016-10-25 2018-04-26 Fortress Information Security, Llc Security appliance

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866315A (en) * 2010-06-11 2010-10-20 中国科学院计算技术研究所 Test method and system of software development tool
CN103023710A (en) * 2011-09-21 2013-04-03 阿里巴巴集团控股有限公司 Safety test system and method
CN104717085A (en) * 2013-12-16 2015-06-17 中国移动通信集团湖南有限公司 Log parsing method and device
US20150264047A1 (en) * 2014-03-12 2015-09-17 Agreeya Mobility, Inc. Method and system for providing secure communication between multiple operating systems in a communication device
CN105335278A (en) * 2014-06-16 2016-02-17 阿里巴巴集团控股有限公司 Testing method and device
CN105119762A (en) * 2015-09-23 2015-12-02 普元信息技术股份有限公司 System and method of cloud platform for realizing transaction playback and transaction reworking based on logs
CN106909499A (en) * 2015-12-22 2017-06-30 阿里巴巴集团控股有限公司 Method of testing and device
CN105930274A (en) * 2016-05-05 2016-09-07 中国银行股份有限公司 Automated test method and system
US20180115580A1 (en) * 2016-10-25 2018-04-26 Fortress Information Security, Llc Security appliance
CN106547658A (en) * 2016-10-28 2017-03-29 合网络技术(北京)有限公司 A kind of automated testing method and device
CN107741902A (en) * 2016-12-23 2018-02-27 腾讯科技(深圳)有限公司 Program application detection method and program application detection means

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381519A (en) * 2020-11-20 2021-02-19 北京云族佳科技有限公司 Method and device for processing work logs and readable storage medium
CN112559333A (en) * 2020-12-10 2021-03-26 武汉联影医疗科技有限公司 Log production method and device, computer equipment and storage medium
CN114445184A (en) * 2022-01-27 2022-05-06 聚好看科技股份有限公司 Order flow playback method and device

Also Published As

Publication number Publication date
CN108920377B (en) 2022-03-04

Similar Documents

Publication Publication Date Title
CN108920377A (en) A kind of log playback test method, system, device and readable storage medium storing program for executing
CN104615760A (en) Phishing website recognizing method and phishing website recognizing system
CN110020424A (en) Extracting method, the extracting method of device and text information of contract information
CN110798445B (en) Public gateway interface testing method and device, computer equipment and storage medium
CN109361711A (en) Firewall configuration method, apparatus, electronic equipment and computer-readable medium
CN107688541A (en) File reviewing method, device, server and computer-readable recording medium
CN107180343B (en) Method and device for automatic payment
CN108363684A (en) List creation method, device and server
CN103246606A (en) Method and system for testing performances of ESB (enterprises service bus) platform
CN108712428A (en) A kind of method and device carrying out device type identification to terminal
CN109598602A (en) Account checking method, device, equipment and computer readable storage medium
CN111339743B (en) Account number generation method and device
CN108696475A (en) A kind of distribution power automation terminal automatic registration method and device with safety certification
CN104883705B (en) A kind of the problem of data service is complained localization method and device
CN106301976A (en) A kind of intelligent substation schedule information automated testing method
CN106202461B (en) A kind of synchronous method and device
CN107948149A (en) Tactful self study and optimization method and device based on random forest
CN104168206B (en) Adapter gateway load balancing control method, device and system
CN104216986B (en) The device and method of pre-operation raising efficiency data query is carried out with the data update cycle
CN108491521B (en) Knowledge base language conversion method and device
CN112799956B (en) Asset identification capability test method, device and system device
CN113704123B (en) Interface testing method, device, equipment and storage medium
CN106301833A (en) A kind of transformer station schedule information method of testing
CN113626438B (en) Data table management method, device, computer equipment and storage medium
CN112348454B (en) Intelligent management and control system and method for handover test of electrical equipment

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