CN107688530A - Method for testing software and device - Google Patents

Method for testing software and device Download PDF

Info

Publication number
CN107688530A
CN107688530A CN201710221079.4A CN201710221079A CN107688530A CN 107688530 A CN107688530 A CN 107688530A CN 201710221079 A CN201710221079 A CN 201710221079A CN 107688530 A CN107688530 A CN 107688530A
Authority
CN
China
Prior art keywords
data
software
point data
testing
burying
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
CN201710221079.4A
Other languages
Chinese (zh)
Other versions
CN107688530B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710221079.4A priority Critical patent/CN107688530B/en
Priority to PCT/CN2018/074874 priority patent/WO2018184420A1/en
Publication of CN107688530A publication Critical patent/CN107688530A/en
Application granted granted Critical
Publication of CN107688530B publication Critical patent/CN107688530B/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/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Landscapes

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

Abstract

The present invention discloses a kind of method for testing software and device.The method for testing software includes:Software under testing is run on the client, and software under testing includes at least one functional module, and each functional module is provided with least one bury a little;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 MongoDB databases;Burying point data 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 failure, are defined as data to be analyzed;The parameter information treated using presupposition analysis algorithm in analyze data is analyzed, and obtains the analysis result for causing to bury a test crash.In the method for testing software, point data is buried using MongoDB database purchases, flexibility is stronger;Point data is buried using awk scripts and obtains data to be analyzed, there is the advantages of threshold is low, positioning is simple, data-handling efficiency is fast.

Description

Method for testing software and device
Technical 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 right Each functional module of software is tested.In existing method for testing software, few one is respectively provided in each functional module of software It 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 generation And 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 out Wrong 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 developer Row 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 asks Topic.Point data is buried according to dedicated analysis software (such as Python softwares) analysis, though test process is reduced to a certain extent Workload, but dedicated analysis software (such as Python softwares) need to carry out cumbersome installation and configuration, and need to have code ability stronger Professional, 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 procedure The 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 module It 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 sent Give 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, really It 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 little The 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 completed Information 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 and It 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 point Solution 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 described Bury 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 function Module, 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 parameter Information;
Data determining module to be analyzed, the awk scripts for making to configure on MongoDB databases obtain test check code To 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 analyzed Analysis, 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 MongoDB The 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 failure Bury point data.
Preferably, the parameter information include unit type, device configuration, the triggered time, network type, network bandwidth and It 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 point Solution 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 server Order, 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 corresponding Fruit.
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 formed It 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 again The awk scripts configured on MongoDB databases are analyzed burying point data, to obtain test check code as all of failure Burying 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, without Carry out cumbersome installation and configuration, you can the point data of burying in MongoDB databases is directly operated.Calculated again using presupposition analysis The 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 point Analysis result can intuitively show each parameter information to burying an influence for place functional module test crash, in order to enter to software under testing Row 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 detail The 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 kimonos Business device coordinates, and completes the test process to software under testing.Wherein, WiFi network, 3G nets can be passed through between client and server The 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 measured The 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. 1 Shown, 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 module It 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 mould Block, and each functional module is buried a little provided with least one, should when client runs the corresponding function module of the software under testing Burying 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 MongoDB Database;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 APP In, including user log-in block, product enquiry module, upload product and payment module etc., and user log-in block includes user Registration, 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 change Name 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 data It 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 implementation In example, this preset numbers rule it can be numbered by functional module ID+ sequence numbers, in such as above-mentioned finance product APP, if user The 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 on First 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 kinds Test 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 tables Show.By test check code distinguish bury a little corresponding to program code test whether success, based on test check code can be by institute Bury point data and be divided into two classes, by analyzing point data of burying of the test check code for failure, opened without special Hair 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 testing Success is closely related.Specifically, parameter information includes unit type, device configuration, triggered time, network type, network bandwidth It 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 visitor The 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, with Unit type distinguishes the smart mobile phone of different editions, such as iphone4, iphone5.Device configuration can be pacified in client The operating system of dress, such as Android system, IOS, Windows systems, linux system, or can be mounted in The model of processor or other hardware in client, such as i5 or i7 processors.Triggered time can run the software under testing Time, the triggered time is related to client operational network, generally, network peak triggering software under testing failure Rate can be higher than the mortality in network ebb triggering software under testing.Network type is net used by client and server communication Network, can be the wireless networks such as cable network or WiFi network, 3G network or 4G networks.When network bandwidth is unit The 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 data Storehouse 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 more By 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, really It 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 bury Point 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 out Analyzing and processing.In the present embodiment, all point datas of burying are analyzed using the awk scripts configured on MongoDB databases, obtained Take 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 analyzed The 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 that Ground, 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 again Other 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 somebody Put, coordinate without the stronger professional of code ability and complete test, further reduce the manpower of software under testing test process Cost.
S40:The parameter information treated using presupposition analysis algorithm in analyze data is analyzed, and acquisition causes to bury a test The analysis result of failure.
Specifically, the awk scripts configured on MongoDB databases first bury all test check codes for all of failure Point data is defined as data to be analyzed, is investigated without special developer's timing, can mitigate test process to a certain extent In 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, nothing Professional 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 knot Structure 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 work The more detailed definition made.Resource Breakdown Structure (Resouree Breakdowm Structure, abbreviation RBS) algorithm is according to money Source category and form and the resource hierarchy divided, it is one kind of Project decomposition structure, can be in resource requirement by it Schedule is formulated in details, and can be by way of collecting to higher level summarizing resource demand and Resource Availability.Group It is project organization structure's figure to knit decomposition texture (Organizational Breakdowm Structure, abbreviation OBS) algorithm A kind of outstanding form, describe to be responsible for the specific organizational unit of each project activity, it divides saddlebag and relevant departments or unit Level, 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 one Determine principle of classification, by all parameter informations be first divided into unit type, device configuration, the triggered time, network type, network bandwidth and The 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 again Into some groups ..., the like, all parameter informations are divided into the class categories that can not split again, then judged every Whether 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 process Middle 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 not The corresponding category IDs of the class categories of segmentation;Parameter information corresponding to each class categories ID can be judged using control variate method is It 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 soft What 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 little Data are not limited by storage table, and flexibility is stronger.Again by the awk scripts that are configured on MongoDB databases to burying point data Analyzed, be defined as data to be analyzed to obtain all bury point datas of the test check code as failure, awk scripts have door The advantages of sill are low, positioning is simple, data-handling efficiency is fast, without carrying out cumbersome installation and configuration, you can to MongoDB data Point data of burying in storehouse directly operates.The parameter information treated again using presupposition analysis algorithm in analyze data is analyzed, with The 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 result The 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 testing Point data is sent to corresponding MongoDB databases, need to be configured accordingly, to ensure that burying point data is transmitted directly to MongoDB databases and awk scripts can narrow data to burying in MongoDB databases and analyze.Therefore, the software test side In 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 MongoDB Installing DB is on the server.Then data directory is created on the server, and starts server, waiting for server and client End connection.Mongod meeting default data catalogue/data/db typically in the case of no parameter, if mistake will be started by being not present Lose;In the present embodiment, establishment data directory is mkdir-p/data/db.Again to MongoDB databases configure 27017 ports with Server 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 branch Hold the more complicated data of data storage type so that MongoDB databases can monitoring server receives in real time http please Ask, when client, which uploads, buries point data server, can be stored directly in MongoDB databases, without being converted into storage table Structure 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 treating Analyze data, awk scripts have the advantages that threshold is low, positioning is simple, pinpoint investigation without special tester, be advantageous to carry High testing efficiency.Check code is tested by awk scripts timing acquisition and buries point data and using presupposition analysis algorithm for failure Analyzed, 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 receives After the query statement, the query statement is sent to server.The query statement only can bury point ID including one, to inquire about shadow Sound is specific to bury a parameter information or functional module ID for the program code at place, and the functional module includes at least one Point 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 server According to storehouse after query statement is received, can obtain using presupposition analysis algorithm pair with query statement to bury point ID corresponding all The analysis result that data to be analyzed are analyzed, and exported the analysis result as Query Result.Client display inquiry knot Fruit, 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 Documents Coordinate with the awk scripts for being good at processing document ranks, directly all point datas of burying uploaded in MongoDB databases can be entered The operations such as row screening, contrast, statistics, timing output or circulation output.Moreover, in the method for testing software, client can be based on Original development environment, without being changed to the running environment of client, do not sacrificing Consumer's Experience, delayed data request On 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 removable Plant 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 client And server, coordinated by client and server, complete the test process to software under testing.Wherein, client and server Between 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 service The connected terminal of device communication.As shown in Fig. 2 the software testing device includes running software module 10, buries point data generation module 20th, data determining module 30 to be analyzed, analysis result acquisition module 40, information collocation module 50, query statement receiving module 60 With 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 mould Block, 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 mould Block, and each functional module is buried a little provided with least one, should when client runs the corresponding function module of the software under testing Burying 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 buried Point 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 APP In, including user log-in block, product enquiry module, upload product and payment module etc., and user log-in block includes user Registration, 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 change Name 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 data It 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 implementation In example, this preset numbers rule it can be numbered by functional module ID+ sequence numbers, in such as above-mentioned finance product APP, if user The 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 on First 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 kinds Test 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 tables Show.By test check code distinguish bury a little corresponding to program code test whether success, based on test check code can be by institute Bury point data and be divided into two classes, by analyzing point data of burying of the test check code for failure, opened without special Hair 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 testing Success is closely related.Specifically, parameter information includes unit type, device configuration, triggered time, network type, network bandwidth It 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 visitor The 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, with Unit type distinguishes the smart mobile phone of different editions, such as iphone4, iphone5.Device configuration can be pacified in client The operating system of dress, such as Android system, IOS, Windows systems, linux system, or can be mounted in The model of processor or other hardware in client, such as i5 or i7 processors.Triggered time can run the software under testing Time, the triggered time is related to client operational network, generally, network peak triggering software under testing failure Rate can be higher than the mortality in network ebb triggering software under testing.Network type is net used by client and server communication Network, can be the wireless networks such as cable network or WiFi network, 3G network or 4G networks.When network bandwidth is unit The 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 data Storehouse 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 more By 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 generation Code 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 bury Point 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 out Analyzing and processing.In the present embodiment, all point datas of burying are analyzed using the awk scripts configured on MongoDB databases, obtained Take 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 analyzed The 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 that Ground, 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 again Other 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 somebody Put, coordinate without the stronger professional of code ability and complete test, further reduce the manpower of software under testing test process Cost.
Analysis result acquisition module 40, divided for treating the parameter information in analyze data using presupposition analysis algorithm Analysis, 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 failure Point data is defined as data to be analyzed, is investigated without special developer's timing, can mitigate test process to a certain extent In 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, nothing Professional 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 knot Structure 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 work The more detailed definition made.Resource Breakdown Structure (Resouree Breakdowm Structure, abbreviation RBS) algorithm is according to money Source category and form and the resource hierarchy divided, it is one kind of Project decomposition structure, can be in resource requirement by it Schedule is formulated in details, and can be by way of collecting to higher level summarizing resource demand and Resource Availability.Group It is project organization structure's figure to knit decomposition texture (Organizational Breakdowm Structure, abbreviation OBS) algorithm A kind of outstanding form, describe to be responsible for the specific organizational unit of each project activity, it divides saddlebag and relevant departments or unit Level, 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 one Determine principle of classification, by all parameter informations be first divided into unit type, device configuration, the triggered time, network type, network bandwidth and The 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 again Into some groups ..., the like, all parameter informations are divided into the class categories that can not split again, then judged every Whether 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 process Middle 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 not The corresponding category IDs of the class categories of segmentation;Parameter information corresponding to each class categories ID can be judged using control variate method is It 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 soft What 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 little Data are not limited by storage table, and flexibility is stronger.Again by the awk scripts that are configured on MongoDB databases to burying point data Analyzed, be defined as data to be analyzed to obtain all bury point datas of the test check code as failure, awk scripts have door The advantages of sill are low, positioning is simple, data-handling efficiency is fast, without carrying out cumbersome installation and configuration, you can to MongoDB data Point data of burying in storehouse directly operates.The parameter information treated again using presupposition analysis algorithm in analyze data is analyzed, with The 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 result The 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 testing Point data is sent to corresponding MongoDB databases, need to be configured accordingly, to ensure that burying point data is transmitted directly to MongoDB databases and awk scripts can narrow data to burying in MongoDB databases and analyze.Therefore, the software test fills Putting also includes information collocation module 50.
Information collocation module 50, in server, MongoDB installing DBs to be completed into MongoDB databases and clothes The 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 MongoDB Installing DB is on the server.Then data directory is created on the server, and starts server, waiting for server and client End connection.Mongod meeting default data catalogue/data/db typically in the case of no parameter, if mistake will be started by being not present Lose;In the present embodiment, establishment data directory is mkdir-p/data/db.Again to MongoDB databases configure 27017 ports with Server 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 numbers According to storehouse the more complicated data of data storage type are supported, so that MongoDB databases monitoring server can receive in real time Http request, when client, which uploads, buries point data server, it can be stored directly in MongoDB databases, without being converted into Storage 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 treating Analyze data, awk scripts have the advantages that threshold is low, positioning is simple, pinpoint investigation without special tester, be advantageous to carry High testing efficiency.Check code is tested by awk scripts timing acquisition and buries point data and using presupposition analysis algorithm for failure Analyzed, 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 obtains Modulus block 70.
Query statement receiving module 60, the query statement sent for receiving client by user end to server, inquiry Instruction includes burying point ID.
Specifically, client (such as tester or developer) can instruct to client input inquiry, and client receives After the query statement, the query statement is sent to server.The query statement only can bury point ID including one, to inquire about shadow Sound is specific to bury a parameter information or functional module ID for the program code at place, and the functional module includes at least one Point 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 server According to storehouse after query statement is received, can obtain using presupposition analysis algorithm pair with query statement to bury point ID corresponding all The analysis result that data to be analyzed are analyzed, and exported the analysis result as Query Result.Client display inquiry knot Fruit, 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 Documents Coordinate with the awk scripts for being good at processing document ranks, directly all point datas of burying uploaded in MongoDB databases can be entered The operations such as row screening, contrast, statistics, timing output or circulation output.Moreover, in the software testing device, client can be based on Original development environment, without being changed to the running environment of client, do not sacrificing Consumer's Experience, delayed data request On 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 removable Plant 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 from In 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 tool Body 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 disclosed Specific embodiment, and whole embodiments for falling within the scope of the appended claims should be included.

Claims (10)

  1. A kind of 1. method for testing software, it is characterised in that including:
    Software under testing is run on the client, and the software under testing includes at least one functional module, set in each functional module There is at 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 sent to 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, are defined as Data to be analyzed;
    The parameter information in the data to be analyzed is analyzed using presupposition analysis algorithm, obtains and a test is buried described in causing The analysis result of failure.
  2. 2. method for testing software according to claim 1, it is characterised in that it is described to run software under testing on the client, Also include before:
    By the MongoDB installing DBs in the server, the letter of the MongoDB databases and the server is completed Breath 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.
  3. 3. method for testing software according to claim 1, it is characterised in that the parameter information includes unit type, set It is at least one in standby configuration, triggered time, network type, network bandwidth and network broadband time delay product.
  4. 4. method for testing software according to claim 1, it is characterised in that the presupposition analysis algorithm includes job analysis Structure algorithm, Resource Breakdown Structure algorithm or obs algorithm.
  5. 5. according to the method for testing software described in claim any one of 1-4, it is characterised in that also include:
    The query statement that client is sent by the client to the server is received, the query statement includes described bury a little ID;
    Based on the query statement, obtain and the Query Result that to bury point ID corresponding.
  6. A kind of 6. software testing device, it is characterised in that including:
    Running software module, for running software under testing on the client, the software under testing includes at least one functional module, Each functional module is 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 will The point data of burying is sent to MongoDB databases;The point data of burying includes burying point ID, test check code and parameter letter Breath;
    Data determining module to be analyzed, the awk scripts for making to configure on MongoDB databases obtain test check code to lose Point data is buried described in losing, is defined as data to be analyzed;
    Analysis result acquisition module, for being divided using presupposition analysis algorithm the parameter information in the data to be analyzed Analysis, obtaining causes the analysis result for burying a test crash.
  7. 7. software testing device according to claim 6, it is characterised in that also include:
    Information collocation module, in the server, the MongoDB installing DBs to be completed into the MongoDB data The information configuration of storehouse 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 burying for failure Point data.
  8. 8. software testing device according to claim 6, it is characterised in that the parameter information includes unit type, set It is at least one in standby configuration, triggered time, network type, network bandwidth and network broadband time delay product.
  9. 9. software testing device according to claim 6, it is characterised in that the presupposition analysis algorithm includes job analysis Structure algorithm, Resource Breakdown Structure algorithm or obs algorithm.
  10. 10. according to the software testing device described in claim any one of 6-9, it is characterised in that also include:
    Query statement receiving module, the query statement sent for receiving client by the client to the server, institute State query statement and bury point ID including described;
    Query Result acquisition module, for based on the query statement, obtaining and the Query Result that to bury point ID corresponding.
CN201710221079.4A 2017-04-06 2017-04-06 Software testing method and device Active CN107688530B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710221079.4A CN107688530B (en) 2017-04-06 2017-04-06 Software testing method and device
PCT/CN2018/074874 WO2018184420A1 (en) 2017-04-06 2018-01-31 Software testing method, apparatus, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710221079.4A CN107688530B (en) 2017-04-06 2017-04-06 Software testing method and device

Publications (2)

Publication Number Publication Date
CN107688530A true CN107688530A (en) 2018-02-13
CN107688530B CN107688530B (en) 2020-04-10

Family

ID=61152357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710221079.4A Active CN107688530B (en) 2017-04-06 2017-04-06 Software testing method and device

Country Status (2)

Country Link
CN (1) CN107688530B (en)
WO (1) WO2018184420A1 (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664401A (en) * 2018-05-11 2018-10-16 阿里巴巴集团控股有限公司 Bury a little rational appraisal procedure and device
CN109101414A (en) * 2018-06-14 2018-12-28 挖财网络技术有限公司 Based on the magnanimity UI Self -adaptive method and device thereof for burying point data
CN109684155A (en) * 2018-08-27 2019-04-26 平安科技(深圳)有限公司 Monitor configuration method, device, equipment and readable storage medium storing program for executing
CN109960651A (en) * 2019-02-13 2019-07-02 北京达佳互联信息技术有限公司 Bury a test method, system, device and computer readable storage medium
CN110515830A (en) * 2019-07-15 2019-11-29 平安普惠企业管理有限公司 Operation trace method for visualizing, device, equipment and storage medium
CN110674048A (en) * 2019-09-27 2020-01-10 北京新氧科技有限公司 Buried point test feature acquisition method and related device
CN110875858A (en) * 2018-08-31 2020-03-10 北京京东尚科信息技术有限公司 Application test data capturing method, system, equipment and storage medium
CN111090592A (en) * 2019-12-20 2020-05-01 上海品顺信息科技有限公司 Automatic testing method of buried point, terminal and readable storage medium
CN111190807A (en) * 2018-11-14 2020-05-22 杭州萤石软件有限公司 Buried point testing method and device
CN111506489A (en) * 2019-01-30 2020-08-07 阿里巴巴集团控股有限公司 Test method, system, device, server and storage medium
CN111813698A (en) * 2020-08-27 2020-10-23 江苏洲际软件有限公司 Software testing device and testing method
CN112286834A (en) * 2020-12-31 2021-01-29 智道网联科技(北京)有限公司 Multi-device software testing method, testing device, electronic device and storage medium
CN113485889A (en) * 2021-06-29 2021-10-08 平安银行股份有限公司 Buried point data checking method and device, electronic equipment and storage medium
CN113673997A (en) * 2021-08-27 2021-11-19 深圳鼎盛电脑科技有限公司 Visualized processing method, device, equipment and medium of fund calculation engine
CN113688031A (en) * 2021-07-15 2021-11-23 上海浦东发展银行股份有限公司 Testing positioning method based on byte code enhancement technology
CN114168430A (en) * 2022-01-06 2022-03-11 携程旅游网络技术(上海)有限公司 Front-end abnormal alarm configuration method, system, equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110401899A (en) * 2019-07-25 2019-11-01 厦门盈趣科技股份有限公司 Audio testing method and relevant apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070234017A1 (en) * 2006-03-29 2007-10-04 Freescale Semiconductor, Inc. Selective instruction breakpoint generation
CN101201787A (en) * 2006-12-12 2008-06-18 英业达股份有限公司 System and method for debugging software program
CN103778244A (en) * 2014-02-11 2014-05-07 五八同城信息技术有限公司 Automatic report analytical method based on user behavior logs
CN104915296A (en) * 2015-06-29 2015-09-16 北京金山安全软件有限公司 Buried point testing method, data query method and device
CN106294091A (en) * 2016-08-11 2017-01-04 福建富士通信息软件有限公司 A kind of without intrusive mood daily record interception method for analyzing performance and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9111030B1 (en) * 2008-10-03 2015-08-18 Federal Home Loan Mortgage Corporation Systems and methods for testing a software application
CN102053906A (en) * 2009-10-30 2011-05-11 国际商业机器公司 System and method for collecting program runtime information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070234017A1 (en) * 2006-03-29 2007-10-04 Freescale Semiconductor, Inc. Selective instruction breakpoint generation
CN101201787A (en) * 2006-12-12 2008-06-18 英业达股份有限公司 System and method for debugging software program
CN103778244A (en) * 2014-02-11 2014-05-07 五八同城信息技术有限公司 Automatic report analytical method based on user behavior logs
CN104915296A (en) * 2015-06-29 2015-09-16 北京金山安全软件有限公司 Buried point testing method, data query method and device
CN106294091A (en) * 2016-08-11 2017-01-04 福建富士通信息软件有限公司 A kind of without intrusive mood daily record interception method for analyzing performance and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
微笑很纯洁: "从零到百亿互联网金融架构发展史", 《CSDN博客》 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664401A (en) * 2018-05-11 2018-10-16 阿里巴巴集团控股有限公司 Bury a little rational appraisal procedure and device
CN109101414A (en) * 2018-06-14 2018-12-28 挖财网络技术有限公司 Based on the magnanimity UI Self -adaptive method and device thereof for burying point data
CN109101414B (en) * 2018-06-14 2021-10-15 挖财网络技术有限公司 Massive UI test generation method and device based on buried point data
CN109684155A (en) * 2018-08-27 2019-04-26 平安科技(深圳)有限公司 Monitor configuration method, device, equipment and readable storage medium storing program for executing
CN110875858B (en) * 2018-08-31 2023-06-27 北京京东尚科信息技术有限公司 Application test data grabbing method, system, equipment and storage medium
CN110875858A (en) * 2018-08-31 2020-03-10 北京京东尚科信息技术有限公司 Application test data capturing method, system, equipment and storage medium
CN111190807A (en) * 2018-11-14 2020-05-22 杭州萤石软件有限公司 Buried point testing method and device
CN111190807B (en) * 2018-11-14 2023-08-18 杭州萤石软件有限公司 Buried point testing method and equipment
CN111506489B (en) * 2019-01-30 2023-05-30 斑马智行网络(香港)有限公司 Test method, system, device, server and storage medium
CN111506489A (en) * 2019-01-30 2020-08-07 阿里巴巴集团控股有限公司 Test method, system, device, server and storage medium
CN109960651A (en) * 2019-02-13 2019-07-02 北京达佳互联信息技术有限公司 Bury a test method, system, device and computer readable storage medium
CN110515830A (en) * 2019-07-15 2019-11-29 平安普惠企业管理有限公司 Operation trace method for visualizing, device, equipment and storage medium
CN110674048A (en) * 2019-09-27 2020-01-10 北京新氧科技有限公司 Buried point test feature acquisition method and related device
CN110674048B (en) * 2019-09-27 2023-09-22 北京新氧科技有限公司 Buried point test characteristic acquisition method and related device
CN111090592A (en) * 2019-12-20 2020-05-01 上海品顺信息科技有限公司 Automatic testing method of buried point, terminal and readable storage medium
CN111813698A (en) * 2020-08-27 2020-10-23 江苏洲际软件有限公司 Software testing device and testing method
CN112286834B (en) * 2020-12-31 2021-04-16 智道网联科技(北京)有限公司 Multi-device software testing method, testing device, electronic device and storage medium
CN112286834A (en) * 2020-12-31 2021-01-29 智道网联科技(北京)有限公司 Multi-device software testing method, testing device, electronic device and storage medium
CN113485889B (en) * 2021-06-29 2023-08-15 平安银行股份有限公司 Buried data verification method and device, electronic equipment and storage medium
CN113485889A (en) * 2021-06-29 2021-10-08 平安银行股份有限公司 Buried point data checking method and device, electronic equipment and storage medium
CN113688031A (en) * 2021-07-15 2021-11-23 上海浦东发展银行股份有限公司 Testing positioning method based on byte code enhancement technology
CN113688031B (en) * 2021-07-15 2024-03-26 上海浦东发展银行股份有限公司 Test positioning method based on byte code enhancement technology
CN113673997A (en) * 2021-08-27 2021-11-19 深圳鼎盛电脑科技有限公司 Visualized processing method, device, equipment and medium of fund calculation engine
CN114168430A (en) * 2022-01-06 2022-03-11 携程旅游网络技术(上海)有限公司 Front-end abnormal alarm configuration method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN107688530B (en) 2020-04-10
WO2018184420A1 (en) 2018-10-11

Similar Documents

Publication Publication Date Title
CN107688530A (en) Method for testing software and device
US10678683B2 (en) System and method for automated service layer testing and regression
CN106844217A (en) Control to applying bury method and device, readable storage medium storing program for executing a little
US11483218B2 (en) Automating 5G slices using real-time analytics
CN105376335B (en) Collected data uploading method and device
CN107957940B (en) Test log processing method, system and terminal
CN109684047A (en) Event-handling method, device, equipment and computer storage medium
CN110428127B (en) Automatic analysis method, user equipment, storage medium and device
CN107341098A (en) Software performance testing method, platform, equipment and storage medium
CN107222331B (en) method and device for monitoring performance of distributed application system, storage medium and equipment
CN107894889A (en) Bury point methods, equipment and computer-readable recording medium
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN105577472A (en) Data acquisition test method and device
CN109062807B (en) Method and device for testing application program, storage medium and electronic device
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN111654495B (en) Method, apparatus, device and storage medium for determining traffic generation source
CN105553770B (en) Data acquisition control method and device
CN111782317A (en) Page testing method and device, storage medium and electronic device
CN106713011A (en) Method and system for obtaining test data
CN107430590B (en) System and method for data comparison
CN114151293A (en) Fault early warning method, system, equipment and storage medium of fan variable pitch system
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN109389972B (en) Quality testing method and device for semantic cloud function, storage medium and equipment
CN113672497B (en) Method, device and equipment for generating non-buried point event and storage medium
CN111786991B (en) Block chain-based platform authentication login method and related device

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