Method for testing software and deviceTechnical field
The present invention relates to technical field of computer information processing, more particularly to a kind of method for testing software and device.
Background technology
With developing rapidly for computer technology, there is text editing, image procossing, voice-enabled chat, playing audio-video etc.The various softwares of function emerge in an endless stream, in order to ensure each functional module of software can normal work, need to software issue before, it is rightEach functional module of software is tested.In existing method for testing software, few one is respectively provided in each functional module of softwareIt is individual to bury a little, when user uses a certain functional module, it can trigger and be preset in burying a little in the functional module, point data is buried in generationAnd server is sent to, server is collected and buries point data corresponding to analyzing, and to find out in the software running process, easily goes outWrong functional module, and improved, so as to reach the purpose for improving software.
In existing method for testing software, what server received buries point data substantial amounts and repetition, is entered by developerRow fixed point, which is searched, simultaneously to be analyzed, test process intricate operation and workload is big, there is that the testing time is longer and human cost is high asksTopic.Point data is buried according to dedicated analysis software (such as Python softwares) analysis, though test process is reduced to a certain extentWorkload, but dedicated analysis software (such as Python softwares) need to carry out cumbersome installation and configuration, and need to have code ability strongerProfessional, which coordinates, can just complete software test procedure, the problem of human cost is higher be present.
The content of the invention
In consideration of it, the present invention provides a kind of method for testing software and device, to solve to work in existing software test procedureThe problem of cumbersome and workload is big.
The technical solution adopted for the present invention to solve the technical problems is:
In a first aspect, the present invention provides a kind of method for testing software, including:
Software under testing is run on the client, and the software under testing includes at least one functional module, each functional moduleIt is provided with least one bury a little;
Bury described on the software under testing when being a little triggered, point data is buried in generation, and the point data of burying is sentGive MongoDB databases;The point data of burying includes burying point ID, test check code and parameter information;
The awk scripts for making to configure on MongoDB databases obtain test check code and bury point data for the described of failure, reallyIt is set to data to be analyzed;
The parameter information in the data to be analyzed is analyzed using presupposition analysis algorithm, acquisition causes described bury a littleThe analysis result of test crash.
Preferably, it is described to run software under testing on the client, also include before:
By the MongoDB installing DBs in the server, the MongoDB databases and the server are completedInformation configuration so that the MongoDB databases are monitored and obtained in real time described buries point data;
Test check code described in the awk scripts timing acquisition is set to bury point data for failure.
Preferably, the parameter information include unit type, device configuration, the triggered time, network type, network bandwidth andIt is at least one in network broadband time delay product.
Preferably, the presupposition analysis algorithm includes work breakdown structure (WBS) algorithm, Resource Breakdown Structure algorithm or tissue pointSolution structure algorithm.
Preferably, in addition to:
The query statement that client is sent by the client to the server is received, the query statement includes describedBury point ID;
Based on the query statement, obtain and the Query Result that to bury point ID corresponding.
Second aspect, the present invention also provide a kind of software testing device, including:
Running software module, for running software under testing on the client, the software under testing includes at least one functionModule, each functional module are provided with least one bury a little;
Point data generation module is buried, when being a little triggered for burying described on the software under testing, point data is buried in generation,And the point data of burying is sent to MongoDB databases;The point data of burying includes burying point ID, test check code and parameterInformation;
Data determining module to be analyzed, the awk scripts for making to configure on MongoDB databases obtain test check codeTo bury point data described in failure, it is defined as data to be analyzed;
Analysis result acquisition module, for being carried out using presupposition analysis algorithm to the parameter information in the data to be analyzedAnalysis, obtaining causes the analysis result for burying a test crash.
Preferably, in addition to:
Information collocation module, in the server, the MongoDB installing DBs to be completed into the MongoDBThe information configuration of database and the server, so that the MongoDB databases are monitored and obtained in real time described buries point data;
Described information configuration module, it is additionally operable to set described in the awk scripts timing acquisition and tests check code as failureBury point data.
Preferably, the parameter information include unit type, device configuration, the triggered time, network type, network bandwidth andIt is at least one in network broadband time delay product.
Preferably, the presupposition analysis algorithm includes work breakdown structure (WBS) algorithm, Resource Breakdown Structure algorithm or tissue pointSolution structure algorithm.
Preferably, in addition to:
Query statement receiving module, refer to for receiving the inquiry that client is sent by the client to the serverOrder, the query statement bury point ID including described;
Query Result acquisition module, for based on the query statement, obtaining and the inquiry knot that to bury point ID correspondingFruit.
The present invention has the following advantages that compared with prior art:In method for testing software and device provided by the present invention,Point data, MongoDB databases are buried using what triggering during MongoDB database stores customers end operation software under testing was formedIt is the Oriented Documents type database increased income, its point data of burying stored is not limited by storage table, and flexibility is stronger.Pass through againThe awk scripts configured on MongoDB databases are analyzed burying point data, to obtain test check code as all of failureBurying point data and be defined as data to be analyzed, awk scripts have the advantages of threshold is low, positioning is simple, data-handling efficiency is fast, withoutCarry out cumbersome installation and configuration, you can the point data of burying in MongoDB databases is directly operated.Calculated again using presupposition analysisThe parameter information that method is treated in analyze data is analyzed, and to obtain the analysis result for causing to bury a test crash, passes through this pointAnalysis result can intuitively show each parameter information to burying an influence for place functional module test crash, in order to enter to software under testingRow improves.
Brief description of the drawings
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is a flow chart of method for testing software in the embodiment of the present invention 1.
Fig. 2 is a theory diagram of software testing device in the embodiment of the present invention 2.
Embodiment
In order to which technical characteristic, purpose and the effect of the present invention is more clearly understood, now compares accompanying drawing and describe in detailThe embodiment of the present invention.
Embodiment 1
Fig. 1 shows a flow chart of the method for testing software in the present embodiment.The method for testing software is by client kimonosBusiness device coordinates, and completes the test process to software under testing.Wherein, WiFi network, 3G nets can be passed through between client and serverThe wireless communication such as network or 4G networks is connected, and can be also connected by wired network communication.Client can be provided with it is to be measuredThe terminal that smart mobile phone, notebook, tablet personal computer, PAD or desktop computer of software etc. can be connected with server communication.Such as Fig. 1Shown, the method for testing software comprises the following steps:
S10:Software under testing is run on the client, and software under testing includes at least one functional module, each functional moduleIt is provided with least one bury a little.
Specifically, software under testing is installed on the client and run, the software under testing is provided with least one function mouldBlock, and each functional module is buried a little provided with least one, should when client runs the corresponding function module of the software under testingBurying in functional module is a little triggered.
S20:When burying on software under testing is a little triggered, point data is buried in generation, and will be buried point data and be sent to MongoDBDatabase;Burying point data includes burying point ID, test check code and parameter information.
Specifically, when burying on software under testing is a little triggered, burying point data and can embodying its test result for generation is triggered,Analyzed and improved to bury point data based on this, improve satisfaction of the user to software under testing.Such as in a finance product APPIn, including user log-in block, product enquiry module, upload product and payment module etc., and user log-in block includes userRegistration, login interface, give user name for change or give the program codes such as password for change, then can in user's registration, login interface, give user for changeName or give for change the program codes such as password be equipped with bury a little, when user by client run software under testing, and perform user's registration,Login interface, when giving user name for change or giving the corresponding operatings such as password for change, client generates respectively buries point data and will bury point dataIt is sent to MongoDB databases.
Wherein, bury point ID and be used for unique identification and bury mark a little, the mark is numbered by preset numbers rule.This implementationIn example, this preset numbers rule it can be numbered by functional module ID+ sequence numbers, in such as above-mentioned finance product APP, if userThe functional module ID of login module is X1, and the functional module ID of user's registration is X101, then can use X10101 to represent to be arranged onFirst be provided with user's registration program code buries a little.
Test check code be used for mark bury a little corresponding to program code test whether success, including successfully and unsuccessfully two kindsTest check code.In the present embodiment, test check code can be represented with two letters of Y and N respectively, it is also possible to other code tablesShow.By test check code distinguish bury a little corresponding to program code test whether success, based on test check code can be by instituteBury point data and be divided into two classes, by analyzing point data of burying of the test check code for failure, opened without specialHair personnel timing is investigated, and can mitigate the workload of test process to a certain extent, reduces the testing time, saves human cost.
Parameter information is used for objective embodiment and buries a running environment of the program code at place, and it is tested whether with software under testingSuccess is closely related.Specifically, parameter information includes unit type, device configuration, triggered time, network type, network bandwidthIt is at least one in being accumulated with network broadband time delay.
In the present embodiment, unit type is the internal number for the client for being provided with software under testing, the unit type and visitorThe performance at family end is associated.By taking smart mobile phone as an example, each smart mobile phone producer when producing the smart mobile phone of corresponding brand, withUnit type distinguishes the smart mobile phone of different editions, such as iphone4, iphone5.Device configuration can be pacified in clientThe operating system of dress, such as Android system, IOS, Windows systems, linux system, or can be mounted inThe model of processor or other hardware in client, such as i5 or i7 processors.Triggered time can run the software under testingTime, the triggered time is related to client operational network, generally, network peak triggering software under testing failureRate can be higher than the mortality in network ebb triggering software under testing.Network type is net used by client and server communicationNetwork, can be the wireless networks such as cable network or WiFi network, 3G network or 4G networks.When network bandwidth is unitThe data volume of interior transmission, i.e. data transmission rate.Network broadband time delay product is maximum number bits on link.
Further, the point data of burying that client is sent is stored directly in MongoDB databases, and MongoDB dataStorehouse is that one kind is increased income and Oriented Documents type database, and compared to the relevant database of the table such as SQL structure storage, its flexibility is moreBy force, the point data of burying being stored in MongoDB databases is analyzed in order to realize.
S30:The awk scripts for making to configure on MongoDB databases obtain test check code and bury point data for failure, reallyIt is set to data to be analyzed.
Wherein, awk scripts are a kind of powerful text analyzing instruments, can be to being stored in all in MongoDB databases buryPoint data is read in line by line, then will be buried point data with space or other acquiescence separators and be separated, and the content of separation is carried outAnalyzing and processing.In the present embodiment, all point datas of burying are analyzed using the awk scripts configured on MongoDB databases, obtainedTake test check code to bury point data for failure, be defined as data to be analyzed, to determine to lead based on data to be analyzedThe reason for causing to bury the program code test crash at a place, to be improved based on failure cause to software under testing.It is appreciated thatGround, awk scripts can be directly used to be defined as data to be analyzed by check code is tested for the point data of burying of failure, without pacifying againOther running environment are filled, there is the advantages of threshold is low, positioning is simple, data-handling efficiency is fast, without carrying out cumbersome installation and matching somebody with somebodyPut, coordinate without the stronger professional of code ability and complete test, further reduce the manpower of software under testing test processCost.
S40:The parameter information treated using presupposition analysis algorithm in analyze data is analyzed, and acquisition causes to bury a testThe analysis result of failure.
Specifically, the awk scripts configured on MongoDB databases first bury all test check codes for all of failurePoint data is defined as data to be analyzed, is investigated without special developer's timing, can mitigate test process to a certain extentIn workload, save human cost.The parameter information in all data to be analyzed is analyzed using presupposition analysis algorithm,Can obtain cause this bury a little corresponding to program code test crash the reason for, to form analysis result, analyzed process automation, nothingProfessional need to be configured to be analyzed, advantageously reduce analysis cost.
Specifically, presupposition analysis algorithm includes work breakdown structure (WBS) algorithm, Resource Breakdown Structure algorithm or tissue breakdown knotStructure algorithm.Work breakdown structure (WBS) (Work Breakdowm Structure, abbreviation WBS) algorithm using deliverable achievement as be oriented to,The packet carried out to project elements, it concludes and defined the whole working range of project, often declines one layer and represents to project workThe more detailed definition made.Resource Breakdown Structure (Resouree Breakdowm Structure, abbreviation RBS) algorithm is according to moneySource category and form and the resource hierarchy divided, it is one kind of Project decomposition structure, can be in resource requirement by itSchedule is formulated in details, and can be by way of collecting to higher level summarizing resource demand and Resource Availability.GroupIt is project organization structure's figure to knit decomposition texture (Organizational Breakdowm Structure, abbreviation OBS) algorithmA kind of outstanding form, describe to be responsible for the specific organizational unit of each project activity, it divides saddlebag and relevant departments or unitLevel, a kind of project organization systematically connected arrange figure.
In the present embodiment, work breakdown structure (WBS) (Work Breakdowm Structure, abbreviation WBS) algorithm refers to by oneDetermine principle of classification, by all parameter informations be first divided into unit type, device configuration, the triggered time, network type, network bandwidth andThe major classes such as network broadband time delay product, then each major class is sub-divided into some groups, then each group is further segmented againInto some groups ..., the like, all parameter informations are divided into the class categories that can not split again, then judged everyWhether the parameter information of one class categories is associated with software under testing test crash, and its purpose is clear and definite, to avoid analysis processMiddle omit influences the relevant parameter information that software under testing the corresponding function module is successfully tested or failed.Specifically, per Once is forgivable, twice is notThe corresponding category IDs of the class categories of segmentation;Parameter information corresponding to each class categories ID can be judged using control variate method isIt is no associated with software under testing test crash, to determine to influence the difference parameter information of software under testing successful operation.
In the method for testing software that the present embodiment is provided, run using MongoDB database stores customers end to be measured softWhat triggering was formed during part buries point data, and MongoDB databases are the Oriented Documents type databases increased income, and what it was stored buries a littleData are not limited by storage table, and flexibility is stronger.Again by the awk scripts that are configured on MongoDB databases to burying point dataAnalyzed, be defined as data to be analyzed to obtain all bury point datas of the test check code as failure, awk scripts have doorThe advantages of sill are low, positioning is simple, data-handling efficiency is fast, without carrying out cumbersome installation and configuration, you can to MongoDB dataPoint data of burying in storehouse directly operates.The parameter information treated again using presupposition analysis algorithm in analyze data is analyzed, withThe analysis result for causing to bury a test crash is obtained, can intuitively show each parameter information to burying a place work(by the analysis resultThe influence of energy module testing failure, in order to improve to software under testing.
In an embodiment, due to when burying point data and being triggered, burying for generation need to will be triggered on software under testingPoint data is sent to corresponding MongoDB databases, need to be configured accordingly, to ensure that burying point data is transmitted directly toMongoDB databases and awk scripts can narrow data to burying in MongoDB databases and analyze.Therefore, the software test sideIn method, also comprise the following steps before step S10:
S01:By MongoDB installing DBs in server, the information configuration of MongoDB databases and server is completed,So that MongoDB databases are monitored and obtained in real time buries point data.
Specifically, MongoDB installing DB programs are run on the server, mongod orders are run, by MongoDBInstalling DB is on the server.Then data directory is created on the server, and starts server, waiting for server and clientEnd connection.Mongod meeting default data catalogue/data/db typically in the case of no parameter, if mistake will be started by being not presentLose;In the present embodiment, establishment data directory is mkdir-p/data/db.Again to MongoDB databases configure 27017 ports withServer is monitored, 28017 ports of configuration are to monitor HTTP request, when client accesses http:// server address 28017, i.e.,Realize that client is connected with server.
In step S01, the information configuration between MongoDB databases and server is completed, due to MongoDB database branchHold the more complicated data of data storage type so that MongoDB databases can monitoring server receives in real time http pleaseAsk, when client, which uploads, buries point data server, can be stored directly in MongoDB databases, without being converted into storage tableStructure stores again.
S02:Awk scripts timing acquisition test check code is set to bury point data for failure.
Specifically, pre-set awk scripts timing acquisition test check code and bury point data for failure, to be defined as treatingAnalyze data, awk scripts have the advantages that threshold is low, positioning is simple, pinpoint investigation without special tester, be advantageous to carryHigh testing efficiency.Check code is tested by awk scripts timing acquisition and buries point data and using presupposition analysis algorithm for failureAnalyzed, can timing acquisition analysis result;Without artificial monitoring.
In an embodiment, the method for testing software also comprises the following steps:
S50:The query statement that client is sent by user end to server is received, query statement includes burying point ID.
Specifically, client (such as tester or developer) can instruct to client input inquiry, and client receivesAfter the query statement, the query statement is sent to server.The query statement only can bury point ID including one, to inquire about shadowSound is specific to bury a parameter information or functional module ID for the program code at place, and the functional module includes at least onePoint ID is buried, the parameter information of certain functional modules is influenceed with inquiry.
S60:Based on query statement, the Query Result corresponding with burying point ID is obtained.
Wherein, the Query Result is the analysis result corresponding with burying point ID.Specifically, the MongoDB numbers on serverAccording to storehouse after query statement is received, can obtain using presupposition analysis algorithm pair with query statement to bury point ID corresponding allThe analysis result that data to be analyzed are analyzed, and exported the analysis result as Query Result.Client display inquiry knotFruit, improve so that client buries program code or functional module corresponding to point ID based on Query Result to this.
It is to be appreciated that in the method for testing software that the present embodiment is provided, using the MongoDB databases of Oriented DocumentsCoordinate with the awk scripts for being good at processing document ranks, directly all point datas of burying uploaded in MongoDB databases can be enteredThe operations such as row screening, contrast, statistics, timing output or circulation output.Moreover, in the method for testing software, client can be based onOriginal development environment, without being changed to the running environment of client, do not sacrificing Consumer's Experience, delayed data requestOn the basis of realize and will bury point data in real time or in the MongoDB databases uploaded onto the server of batch, it is light succinct and removablePlant property is high.
Embodiment 2
Fig. 2 shows a theory diagram of the software testing device in the present embodiment.The software testing device includes clientAnd server, coordinated by client and server, complete the test process to software under testing.Wherein, client and serverBetween can be connected by wireless communications such as WiFi network, 3G network or 4G networks, can be also connected by wired network communication.Client can be smart mobile phone, notebook, tablet personal computer, PAD or desktop computer of software under testing etc. are installed can be with serviceThe connected terminal of device communication.As shown in Fig. 2 the software testing device includes running software module 10, buries point data generation module20th, data determining module 30 to be analyzed, analysis result acquisition module 40, information collocation module 50, query statement receiving module 60With Query Result acquisition module 70.
Running software module 10, for running software under testing on the client, software under testing includes at least one function mouldBlock, each functional module are provided with least one bury a little.
Specifically, software under testing is installed on the client and run, the software under testing is provided with least one function mouldBlock, and each functional module is buried a little provided with least one, should when client runs the corresponding function module of the software under testingBurying in functional module is a little triggered.
Point data generation module 20 is buried, for when burying on software under testing is a little triggered, point data to be buried in generation, and will be buriedPoint data is sent to MongoDB databases;Burying point data includes burying point ID, test check code and parameter information.
Specifically, when burying on software under testing is a little triggered, burying point data and can embodying its test result for generation is triggered,Analyzed and improved to bury point data based on this, improve satisfaction of the user to software under testing.Such as in a finance product APPIn, including user log-in block, product enquiry module, upload product and payment module etc., and user log-in block includes userRegistration, login interface, give user name for change or give the program codes such as password for change, then can in user's registration, login interface, give user for changeName or give for change the program codes such as password be equipped with bury a little, when user by client run software under testing, and perform user's registration,Login interface, when giving user name for change or giving the corresponding operatings such as password for change, client generates respectively buries point data and will bury point dataIt is sent to MongoDB databases.
Wherein, bury point ID and be used for unique identification and bury mark a little, the mark is numbered by preset numbers rule.This implementationIn example, this preset numbers rule it can be numbered by functional module ID+ sequence numbers, in such as above-mentioned finance product APP, if userThe functional module ID of login module is X1, and the functional module ID of user's registration is X101, then can use X10101 to represent to be arranged onFirst be provided with user's registration program code buries a little.
Test check code be used for mark bury a little corresponding to program code test whether success, including successfully and unsuccessfully two kindsTest check code.In the present embodiment, test check code can be represented with two letters of Y and N respectively, it is also possible to other code tablesShow.By test check code distinguish bury a little corresponding to program code test whether success, based on test check code can be by instituteBury point data and be divided into two classes, by analyzing point data of burying of the test check code for failure, opened without specialHair personnel timing is investigated, and can mitigate the workload of test process to a certain extent, reduces the testing time, saves human cost.
Parameter information is used for objective embodiment and buries a running environment of the program code at place, and it is tested whether with software under testingSuccess is closely related.Specifically, parameter information includes unit type, device configuration, triggered time, network type, network bandwidthIt is at least one in being accumulated with network broadband time delay.
In the present embodiment, unit type is the internal number for the client for being provided with software under testing, the unit type and visitorThe performance at family end is associated.By taking smart mobile phone as an example, each smart mobile phone producer when producing the smart mobile phone of corresponding brand, withUnit type distinguishes the smart mobile phone of different editions, such as iphone4, iphone5.Device configuration can be pacified in clientThe operating system of dress, such as Android system, IOS, Windows systems, linux system, or can be mounted inThe model of processor or other hardware in client, such as i5 or i7 processors.Triggered time can run the software under testingTime, the triggered time is related to client operational network, generally, network peak triggering software under testing failureRate can be higher than the mortality in network ebb triggering software under testing.Network type is net used by client and server communicationNetwork, can be the wireless networks such as cable network or WiFi network, 3G network or 4G networks.When network bandwidth is unitThe data volume of interior transmission, i.e. data transmission rate.Network broadband time delay product is maximum number bits on link.
Further, the point data of burying that client is sent is stored directly in MongoDB databases, and MongoDB dataStorehouse is that one kind is increased income and Oriented Documents type database, and compared to the relevant database of the table such as SQL structure storage, its flexibility is moreBy force, the point data of burying being stored in MongoDB databases is analyzed in order to realize.
Data determining module 30 to be analyzed, the awk scripts for making to configure on MongoDB databases obtain test verification generationCode buries point data for failure, is defined as data to be analyzed.
Wherein, awk scripts are a kind of powerful text analyzing instruments, can be to being stored in all in MongoDB databases buryPoint data is read in line by line, then will be buried point data with space or other acquiescence separators and be separated, and the content of separation is carried outAnalyzing and processing.In the present embodiment, all point datas of burying are analyzed using the awk scripts configured on MongoDB databases, obtainedTake test check code to bury point data for failure, be defined as data to be analyzed, to determine to lead based on data to be analyzedThe reason for causing to bury the program code test crash at a place, to be improved based on failure cause to software under testing.It is appreciated thatGround, awk scripts can be directly used to be defined as data to be analyzed by check code is tested for the point data of burying of failure, without pacifying againOther running environment are filled, there is the advantages of threshold is low, positioning is simple, data-handling efficiency is fast, without carrying out cumbersome installation and matching somebody with somebodyPut, coordinate without the stronger professional of code ability and complete test, further reduce the manpower of software under testing test processCost.
Analysis result acquisition module 40, divided for treating the parameter information in analyze data using presupposition analysis algorithmAnalysis, obtain the analysis result for causing to bury a test crash.
Specifically, the awk scripts configured on MongoDB databases first bury all test check codes for all of failurePoint data is defined as data to be analyzed, is investigated without special developer's timing, can mitigate test process to a certain extentIn workload, save human cost.The parameter information in all data to be analyzed is analyzed using presupposition analysis algorithm,Can obtain cause this bury a little corresponding to program code test crash the reason for, to form analysis result, analyzed process automation, nothingProfessional need to be configured to be analyzed, advantageously reduce analysis cost.
Specifically, presupposition analysis algorithm includes work breakdown structure (WBS) algorithm, Resource Breakdown Structure algorithm or tissue breakdown knotStructure algorithm.Work breakdown structure (WBS) (Work Breakdowm Structure, abbreviation WBS) algorithm using deliverable achievement as be oriented to,The packet carried out to project elements, it concludes and defined the whole working range of project, often declines one layer and represents to project workThe more detailed definition made.Resource Breakdown Structure (Resouree Breakdowm Structure, abbreviation RBS) algorithm is according to moneySource category and form and the resource hierarchy divided, it is one kind of Project decomposition structure, can be in resource requirement by itSchedule is formulated in details, and can be by way of collecting to higher level summarizing resource demand and Resource Availability.GroupIt is project organization structure's figure to knit decomposition texture (Organizational Breakdowm Structure, abbreviation OBS) algorithmA kind of outstanding form, describe to be responsible for the specific organizational unit of each project activity, it divides saddlebag and relevant departments or unitLevel, a kind of project organization systematically connected arrange figure.
In the present embodiment, work breakdown structure (WBS) (Work Breakdowm Structure, abbreviation WBS) algorithm refers to by oneDetermine principle of classification, by all parameter informations be first divided into unit type, device configuration, the triggered time, network type, network bandwidth andThe major classes such as network broadband time delay product, then each major class is sub-divided into some groups, then each group is further segmented againInto some groups ..., the like, all parameter informations are divided into the class categories that can not split again, then judged everyWhether the parameter information of one class categories is associated with software under testing test crash, and its purpose is clear and definite, to avoid analysis processMiddle omit influences the relevant parameter information that software under testing the corresponding function module is successfully tested or failed.Specifically, per Once is forgivable, twice is notThe corresponding category IDs of the class categories of segmentation;Parameter information corresponding to each class categories ID can be judged using control variate method isIt is no associated with software under testing test crash, to determine to influence the difference parameter information of software under testing successful operation.
In the software testing device that the present embodiment is provided, run using MongoDB database stores customers end to be measured softWhat triggering was formed during part buries point data, and MongoDB databases are the Oriented Documents type databases increased income, and what it was stored buries a littleData are not limited by storage table, and flexibility is stronger.Again by the awk scripts that are configured on MongoDB databases to burying point dataAnalyzed, be defined as data to be analyzed to obtain all bury point datas of the test check code as failure, awk scripts have doorThe advantages of sill are low, positioning is simple, data-handling efficiency is fast, without carrying out cumbersome installation and configuration, you can to MongoDB dataPoint data of burying in storehouse directly operates.The parameter information treated again using presupposition analysis algorithm in analyze data is analyzed, withThe analysis result for causing to bury a test crash is obtained, can intuitively show each parameter information to burying a place work(by the analysis resultThe influence of energy module testing failure, in order to improve to software under testing.
In an embodiment, due to when burying point data and being triggered, burying for generation need to will be triggered on software under testingPoint data is sent to corresponding MongoDB databases, need to be configured accordingly, to ensure that burying point data is transmitted directly toMongoDB databases and awk scripts can narrow data to burying in MongoDB databases and analyze.Therefore, the software test fillsPutting also includes information collocation module 50.
Information collocation module 50, in server, MongoDB installing DBs to be completed into MongoDB databases and clothesThe information configuration of business device, so that MongoDB databases are monitored and obtained in real time buries point data.
Specifically, MongoDB installing DB programs are run on the server, mongod orders are run, by MongoDBInstalling DB is on the server.Then data directory is created on the server, and starts server, waiting for server and clientEnd connection.Mongod meeting default data catalogue/data/db typically in the case of no parameter, if mistake will be started by being not presentLose;In the present embodiment, establishment data directory is mkdir-p/data/db.Again to MongoDB databases configure 27017 ports withServer is monitored, 28017 ports of configuration are to monitor HTTP request, when client accesses http:// server address 28017, i.e.,Realize that client is connected with server.
Information collocation module 50 can complete the information configuration between MongoDB databases and server, due to MongoDB numbersAccording to storehouse the more complicated data of data storage type are supported, so that MongoDB databases monitoring server can receive in real timeHttp request, when client, which uploads, buries point data server, it can be stored directly in MongoDB databases, without being converted intoStorage table structure stores again.
Information collocation module 50, it is additionally operable to set awk scripts timing acquisition test check code to bury point data for failure.
Specifically, pre-set awk scripts timing acquisition test check code and bury point data for failure, to be defined as treatingAnalyze data, awk scripts have the advantages that threshold is low, positioning is simple, pinpoint investigation without special tester, be advantageous to carryHigh testing efficiency.Check code is tested by awk scripts timing acquisition and buries point data and using presupposition analysis algorithm for failureAnalyzed, can timing acquisition analysis result;Without artificial monitoring.
In an embodiment, the software testing device also includes query statement receiving module 60 and Query Result obtainsModulus block 70.
Query statement receiving module 60, the query statement sent for receiving client by user end to server, inquiryInstruction includes burying point ID.
Specifically, client (such as tester or developer) can instruct to client input inquiry, and client receivesAfter the query statement, the query statement is sent to server.The query statement only can bury point ID including one, to inquire about shadowSound is specific to bury a parameter information or functional module ID for the program code at place, and the functional module includes at least onePoint ID is buried, the parameter information of certain functional modules is influenceed with inquiry.
Query Result acquisition module 70, for based on query statement, obtaining the Query Result corresponding with burying point ID.
Wherein, the Query Result is the analysis result corresponding with burying point ID.Specifically, the MongoDB numbers on serverAccording to storehouse after query statement is received, can obtain using presupposition analysis algorithm pair with query statement to bury point ID corresponding allThe analysis result that data to be analyzed are analyzed, and exported the analysis result as Query Result.Client display inquiry knotFruit, improve so that client buries program code or functional module corresponding to point ID based on Query Result to this.
It is to be appreciated that in the software testing device that the present embodiment is provided, using the MongoDB databases of Oriented DocumentsCoordinate with the awk scripts for being good at processing document ranks, directly all point datas of burying uploaded in MongoDB databases can be enteredThe operations such as row screening, contrast, statistics, timing output or circulation output.Moreover, in the software testing device, client can be based onOriginal development environment, without being changed to the running environment of client, do not sacrificing Consumer's Experience, delayed data requestOn the basis of realize and will bury point data in real time or in the MongoDB databases uploaded onto the server of batch, it is light succinct and removablePlant property is high.
The present invention is illustrated by several specific embodiments, it will be appreciated by those skilled in the art that, do not departing fromIn the case of the scope of the invention, various conversion and equivalent substitute can also be carried out to the present invention.In addition, it is directed to particular condition or toolBody situation, various modifications can be made to the present invention, without departing from the scope of the present invention.Therefore, the present invention is not limited to disclosedSpecific embodiment, and whole embodiments for falling within the scope of the appended claims should be included.