CN108804310A - function test method, device and equipment - Google Patents
function test method, device and equipment Download PDFInfo
- Publication number
- CN108804310A CN108804310A CN201810399647.4A CN201810399647A CN108804310A CN 108804310 A CN108804310 A CN 108804310A CN 201810399647 A CN201810399647 A CN 201810399647A CN 108804310 A CN108804310 A CN 108804310A
- Authority
- CN
- China
- Prior art keywords
- function
- data
- target detection
- result
- tested
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
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)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention discloses a kind of function test method, device and equipment, this method includes:The configuration information for treating test function is parsed, and analysis result is obtained, wherein the analysis result includes the feature for the data that the function to be tested can be handled;According to the latent structure target detection data;Based on function to be tested described in the target detection data test.In embodiments of the present invention, automatically target detection data can be constructed by treating the parsing of the configuration information of test function, and realize the test to function by the target detection data constructed automatically, due to no longer related personnel being needed to construct test data manually, therefore, it can effectively solve the problems, such as that time-consuming, efficiency is low for test caused by needing related personnel to construct test data manually according to the content of function to be tested in the prior art, improves the testing efficiency for treating test function.
Description
Technical field
The present invention relates to a kind of field of computer technology more particularly to function test method, device and equipment.
Background technology
Currently, when a new function is developed, generally require to test the new function, with largely
On ensure that the new function is not in exception after reaching the standard grade.
In the prior art, when testing new function, generally require related personnel according to the content of the new function come
Construct corresponding test input data.For example, the new function can be the audit work(audited for the content that user delivers
Can, specifically, the content of the audit function is such as:Overstriking is carried out for the keyword " AAA " that user uploads to show, at this point,
Related personnel can construct corresponding test input data:Then the data are input in the new function and carry out work(by CAAAB
It can test, and obtain implementing result:CAAAB, due in the implementing result, having carried out overstriking for keyword " AAA " and having shown, because
This, can be to the test result of the new function based on implementing result determination:Test passes through.At this point, related personnel can root
When determining that the new function is run on line, be not in exception substantially according to the test result.
As shown in the above, in the prior art, when testing new function, it usually needs manually according to the new work(
Can content construct corresponding test input data, then, entered data to realize the test to new function according to the test.
Due to related personnel according to the content of new function construct manually corresponding test input data this process need to expend it is more
Time, thus from construction test input data to obtain test result whole process expend time it is longer, testing efficiency compared with
It is low.
Invention content
The embodiment of the present invention provides a kind of function test method, to solve existing for function test method in the prior art
The low problem of testing efficiency.
In order to solve the above-mentioned technical problem, the invention is realized in this way:
In a first aspect, providing a kind of function test method, this method includes:
The configuration information for treating test function is parsed, and analysis result is obtained, wherein the analysis result includes described
The feature for the data that function to be tested can be handled;
According to the latent structure target detection data;
Based on function to be tested described in the target detection data test.
Second aspect provides a kind of device for testing functions, which includes:
Parsing module, the configuration information for treating test function are parsed, and obtain analysis result, wherein the solution
Analysis result includes the feature for the data that the function to be tested can be handled;
Constructing module, for according to the latent structure target detection data;
Test module, for based on function to be tested described in the target detection data test.
The third aspect provides a kind of terminal device, which includes processor, memory and be stored in described deposit
On reservoir and the computer program that can run on the processor, the computer program are realized when being executed by the processor
The step of method as described in relation to the first aspect.
Fourth aspect provides a kind of computer readable storage medium, which is characterized in that the computer-readable storage medium
Computer program is stored in matter, and the step of method as described in relation to the first aspect is realized when the computer program is executed by processor
Suddenly.
In embodiments of the present invention, the configuration information that can first treat test function is parsed, and analysis result is obtained,
In, may include the feature for the data that the function to be tested can be handled in the analysis result, it is then possible to according to this feature come
Target detection data are constructed, and test the function to be tested based on the target detection data.
As shown in the above, the embodiment of the present invention can be come from by treating the parsing of the configuration information of test function
Dynamic construction target detection data, so as to realize the test for treating test function based on target detection data, due to can be with
Parsing by treating the configuration information of test function constructs target detection data come automatic, and the target by constructing automatically is surveyed
Data are tried to realize the test to function, therefore, can effectively be solved in the prior art because needing related personnel according to be tested
The content of function tests the problem that time-consuming, efficiency is low caused by constructing test data manually, and test function is treated in raising
Testing efficiency.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and constitutes the part of the present invention, this hair
Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the flow diagram of function test method provided by one embodiment of the present invention;
Fig. 2 is one of the module composition schematic diagram of device for testing functions provided in an embodiment of the present invention;
Fig. 3 is the two of the module composition schematic diagram of device for testing functions provided in an embodiment of the present invention;
Fig. 4 is the three of the module composition schematic diagram of device for testing functions provided in an embodiment of the present invention;
Fig. 5 is the hardware architecture diagram of functional test equipment provided by one embodiment of the present invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with the specific embodiment of the invention and
Technical solution of the present invention is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the present invention one
Section Example, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing
Go out the every other embodiment obtained under the premise of creative work, shall fall within the protection scope of the present invention.
The technical solution provided below in conjunction with attached drawing, each embodiment that the present invention will be described in detail.
Fig. 1 is referred to, Fig. 1 is the flow diagram of function test method provided by one embodiment of the present invention, such as Fig. 1 institutes
Show, this approach includes the following steps:
Step 102:The configuration information for treating test function is parsed, and analysis result is obtained, wherein analysis result includes
The feature for the data that function to be tested can be handled.
Step 104:According to latent structure target detection data.
Step 106:Based on target detection data test function to be tested.
In embodiments of the present invention, server-side can first determine function to be tested, wherein when determining function to be tested,
The new function etc. that server-side can just develop the function of currently just running on line, the function that will be reached the standard grade, technical staff
It is determined as function to be tested, the embodiment of the present invention is without limitation.
After function to be tested is determined, server can obtain the configuration information of function to be tested, and to work(to be tested
The configuration information of energy is parsed, and analysis result is obtained.
Wherein, when the configuration information for treating test function is parsed, server can be according to existing analysis mode
It is parsed, can also be parsed according to improved analysis mode, the embodiment of the present invention is not restricted this.
After the configuration information for treating test function is parsed, analysis result can be obtained, wherein the analysis result can
Feature with the data that can be handled including function to be tested.
In one example, the content of function to be tested can be:Belong to type m for what the account of platinum grade was delivered
Content carry out overstriking show that the data that then function to be tested can be handled can be:The account of platinum grade belongs to type m
Content, at this point, the corresponding feature of those data can be respectively:Platinum grade and type m.
After the feature for obtaining the data that function to be tested can be handled, server-side can construct target according to this feature
Test data.
In one embodiment, the feature for the data that server-side can first can be handled according to function to be tested determines pair
The data answered, it is then possible to construct target detection data according to the data of the determination.
For example, the content of function to be tested can be:For the content for belonging to type m delivered of account that grade is A into
Row overstriking is shown, then after the configuration information to the function to be tested parses, can obtain the number that the function can be handled
According to feature:Grade is A and type m, and server-side can determine data corresponding with those features:Account A' and content
M', then, server-side can construct target detection data according to the data of the determination:Account A' delivers m' or account A' hairs
Table includes the content of m'.
After constructing target detection data, server-side can test the work(to be tested based on the target detection data
Can, with determine if normal operation or its after reaching the standard grade, if can be with normal operation.
Wherein, when testing the function to be tested, existing test mode may be used, such as based on target detection data
Test method etc. based on test case is tested, and other test modes of improving can also be used to be tested, the present invention
Embodiment is not restricted this.
In embodiments of the present invention, the configuration information that can first treat test function is parsed, and analysis result is obtained,
In, may include the feature for the data that the function to be tested can be handled in the analysis result, it is then possible to according to this feature come
Target detection data are constructed, and test the function to be tested based on the target detection data.
As shown in the above, the embodiment of the present invention can be come from by treating the parsing of the configuration information of test function
Dynamic construction target detection data, so as to realize the test for treating test function based on target detection data, due to can be with
Target detection data are constructed automatically by corresponding parsing, and are realized to function by the target detection data constructed automatically
Test therefore can effectively solve in the prior art because needing related personnel to be constructed manually according to the content of function to be tested
The problem that time-consuming, efficiency is low is tested caused by test data, improves the testing efficiency to function.
In another inventive embodiments, above-mentioned steps 106 can be specially:Using target detection data as input, obtain
Implementing result on to line of the function to be tested based on the target detection data, wherein the function to be tested may include on line just
In the function of operation, it is then possible to by the function to be tested in implementing result on obtained line and analysis result to that can locate
The expection handling result of the data of reason is matched, and obtains matching result, and according to the matching result, determine function to be tested
Test result.
In embodiments of the present invention, function to be tested may include the function being currently running on line, in one example, clothes
Business end can obtain the current function of just running on line, and the function of acquisition is determined as tested function.
Wherein, it when obtaining the function being currently running, can be obtained according to the predetermined acquisition period,
Specifically, server-side can first obtain the run time of the function of history run, it is then possible to according to the function of history run
Run time changes frequency on the line to determine the function of history run, and above-mentioned to determine according to frequency is changed on determining line
Obtain the period.
Certainly, in the examples described above, can also be arranged according to the situation of change of current business environment according to related personnel
Period determines that above-mentioned acquisition period, the embodiment of the present invention are without limitation.
In embodiments of the present invention, in the target detection data based on construction come during testing the function to be tested,
It can obtain executing knot on the line of the function to be tested based on the target detection data using the target detection data as input
Fruit.
Specifically, which can be input in the function to be tested by server-side, wherein the work(to be tested
It can be able to be the function being currently running on line, after which gets the target detection data, the target can be based on and surveyed
Examination data obtain implementing result on corresponding line, and then, server-side can be obtained to be executed on the line based on the target detection data
As a result.
In one example, the target detection data of construction can be:Account A' delivers m', then server-side can be by the mesh
Test data is marked as input, to be input in the function to be tested of just running on line, which can be based on
The target detection data obtain implementing result on corresponding line:M', then, server-side can obtain implementing result on the line.
It should be noted that in embodiments of the present invention, function to be tested may operate in the service for executing test to it
On end, it can also operate in other server-sides, the embodiment of the present invention is not restricted this.
On obtaining the line based on target detection data after implementing result, server-side can from it is above-mentioned obtain based on to be measured
The expection handling result for trying to obtain the data that function to be tested can be handled in the analysis result of functional configuration information then will
Implementing result is matched with the expection handling result on the line, and obtains matching result, and server-side can be according to the matching knot
Fruit determines the test result of function to be tested.
In embodiments of the present invention, the analysis result of the configuration information based on function to be tested may include function to be tested
Expection handling result to the data that can be handled.
For example, the content of function to be tested can be:For the content for belonging to type m delivered of account that grade is A into
Row overstriking shows that the data that the function to be tested can be handled are:Account A' and content m', then to the function to be tested
Configuration information parsed after, analysis result can be obtained, wherein may include function to be tested in analysis result to institute's energy
The expection handling result of the data of processing:m'.
Server-side can match the expection handling result in analysis result with implementing result on line, work as successful match
When, it may be determined that test result is that test passes through;When it fails to match, it may be determined that test result is that test does not pass through.
For example, the expection handling result in analysis result can be m', implementing result can be m' on line, then can determine
Expection handling result in analysis result and implementing result successful match on line, at this point, server-side can determine it is to be tested to this
The test result of function is that test passes through.
It in embodiments of the present invention, can be first with target detection in function to be tested based on target detection data test
Data obtain implementing result on line of the function to be tested based on the target detection data as input, then, will be on obtained line
Implementing result matches the expection handling result that can handle data with function to be tested in analysis result obtained above,
And the test result of function to be tested is determined according to matching result.
It is by the practical line to target detection data by the content of the embodiment of the present invention it is found that in the embodiment of the present invention
Upper operation result determines the test result of function to be tested, due to be using true running environment come treat test function into
Row test, rather than test function is treated using the virtual execution environment that the test case write by related personnel is built
It is tested, therefore, the test result that the embodiment of the present invention is obtained can preferably combine current true running environment, from
And more accurate test result can be obtained.
In another inventive embodiments, step 104 can be specially:From presetting database, acquisition and characteristic matching
Data then according to the data with characteristic matching, construct target detection data.
In embodiments of the present invention, after obtaining analysis result, server-side analytically can obtain work(to be tested in result
The feature for the data that can be handled, then, server-side can obtain and the matched data of this feature from presetting database.
In one example, server-side can preset an at least database, may include to be measured in the presetting database
The feature of data that examination function can be handled, and data corresponding with feature, wherein different presetting databases include
The feature of data handled by function to be tested is different.
For example, server-side can preset two databases, wherein two presetting databases can respectively such as table 1 and
Shown in table 2:
Table 1
Table 2
Type | Content |
m | m' |
n | n' |
… | … |
After having preset two databases, server-side analytically can obtain what function to be tested can be handled in result
The feature of data:Grade A, type m, then, server-side can be obtained and those features from preset two databases
The data matched:Account A', content m'.
After obtaining the data with characteristic matching, server-side can construct target detection data according to the data of acquisition.
In one example, the data of server-side acquisition can be:Account A', content m', then server-side can be according to this
The data of acquisition construct target detection data:Account A' delivers m' or account A' delivers the content including m', as account A' is sent out
Table n'm'n'.
It should be noted that in embodiments of the present invention, when tested function difference, corresponding target detection data
Can differ, and when based on not corresponding target detection data come when testing tested function, it is more likely that can not be accurately
Function is tested to this to test.
For example, can be there are two needing tested function:Function 1 and function 2, wherein 1 corresponding target of function is surveyed
The account that data can be platinum grade is tried, at this point, the content of function 1 can be:Operation is executed for the account of platinum grade
1;2 corresponding target detection data of function can be the account of common grade, at this point, the content of function 2 can be:For common
The account of grade executes operation 2.
When the account based on common grade is come when executing function 1, although implementing result can be obtained, according to the execution
As a result the test result to function 1 can not be accurately obtained;Similarly, when based on the account of platinum grade come when executing function 2, though
Implementing result can be so obtained, but also can not accurately obtain the test result to function 2 according to the implementing result.
In embodiments of the present invention, server-side can obtain the data with characteristic matching from presetting database, then,
According to the data with characteristic matching, to construct target detection data.It follows that through the embodiment of the present invention, can according to from
The features of the data that the function to be tested of being obtained in analysis result can be handled constructs target detection data, due to the mesh of construction
Mark test data has more specific aim, therefore, can more accurately realize the survey for treating test function based on target detection data
Examination.
In another inventive embodiments, the data of above-mentioned basis and characteristic matching construct target detection data, can have
Body is:It, at least will be with the feature when the function to be tested includes being shown to specified content with default display mode
The specified content in matched data is determined as the target detection data.
In embodiments of the present invention, function to be tested may include:Specified content is shown with default display mode.
For example, the content of the function to be tested can be:Overstriking is carried out for the content for belonging to type m that account is delivered to show, at this point,
It may include the specified content in the data of the characteristic matching for the data that can be handled with function to be tested, such as belong to type m
Content.
After from the data with characteristic matching, getting specified content, server-side can specify content come structure according to this
Make target detection data, wherein when constructing target detection data, server-side can at least determine the specified content of the determination
For target detection data.
In one example, the specified content that server-side determines can be m', then server-side can specify content according to this
Target detection data m' is constructed, or content and preset other content, such as n', construction target detection data m' are specified according to this
n'。
In embodiments of the present invention, server-side according to the data with characteristic matching come when constructing target detection data, can
So that the specified content in the data of major general and characteristic matching is determined as target detection data.It follows that real through the invention
Example is applied, corresponding target detection data can be constructed according to the content of function to be tested, so as to be based on target detection number
According to more accurately realizing the test for treating test function.
In another inventive embodiments, the data of above-mentioned basis and characteristic matching construct target detection data, can have
Body is:The target of the display mode of content is specified to survey to construct characterization according to the display auxiliary data in the data with characteristic matching
Try data, wherein display auxiliary data can be used for constructing the target detection data for the display mode that characterization specifies content.
In embodiments of the present invention, with may include in the data of characteristic matching display auxiliary data, wherein display auxiliary
Data can be used for constructing the target detection data for the display mode that characterization specifies content.
In one embodiment, display auxiliary data may include following at least one:Specified content delivers account, refers to
Determine content deliver the time, specified content delivers place.
In one example, the content of function to be tested can be:The content m' delivered for the account of platinum grade into
Row overstriking is shown, then shows that auxiliary data may include:The account of platinum grade.
In another example, the content of function to be tested can be:Added for the content m' delivered in period T
Thick display, then show that auxiliary data may include:Period T.
In another example, the content of function to be tested can be:Overstriking is carried out for the content m' delivered in place S
It has been shown that, then show that auxiliary data may include:Place S.
In embodiments of the present invention, server-side can obtain display auxiliary data, and according to display auxiliary data come structure
Sign of making a list specifies the target detection data of the display mode of content.
In one example, it may include being shown to specified content with default display format to specify the display mode of content
Show, and or specified content is shown with default indication range.
Wherein, default display format may include following at least one:Shown with designated color, with specific font into
Row display is shown with specified size, is shown with specific context, is shown to specified content with default display format
When showing, above-mentioned at least one display format may be used, specified content is shown.And default indication range may include pair
All accounts are shown, or to specifying account, such as specified good friend's account or current account, are shown, with default display
When range shows specified content, specified content can be shown to all accounts or specified account.
In one example, server-side, can be according at least to specified content and display when constructing target detection data
Auxiliary data constructs target detection data.
For example, specified content can be m', display auxiliary data can be period T and place S, then target detection
Data can be:M' is delivered in period T and place S.
In embodiments of the present invention, server-side, can basis when specified content is at least determined as target detection data
The target detection data that characterization specifies the display mode of content are constructed with the display auxiliary data in the data of characteristic matching, by
This it is found that through the embodiment of the present invention, corresponding target detection data can be constructed according to the content of function to be tested, to
The test for treating test function can be more accurately realized based on target detection data.
In another inventive embodiments, before specified content is at least determined as target detection data, server-side is also
Can be to specifying the validity of content be detected, and obtain the testing result that passes through of detection, wherein to specified content into
When row detection, can specified content be first sent to type identification platform, then, receive being directed to for the type identifying platform return
The type identification of the specified content is as a result, and will be corresponding with specified content in the type recognition result and presetting database
Type is matched, and matching result is obtained, and server-side can determine the validity that content is specified to this according to the matching result
Testing result.
In embodiments of the present invention, in order to ensure the validity of specified content, such as, it is ensured that specified content is not to be mingled with spy
Different character is (for example, character &, character!) content so that the function to be tested in normal condition is based on true by specified content
When fixed target detection data run, server-side can be in base can be shown to specified content with preset display mode
Before specified content determines target detection data, to specifying the validity of content to be detected.
Wherein, when to specifying the validity of content to be detected, this first can be specified content to be sent to pair by server-side
The type identification platform answered specifies content to carry out type identification this by the type identifying platform, and type identification platform is identifying
After going out the type of the specified content, corresponding type identification result can be sent to server-side.
For example, specified content can be the content m' for not being mingled with spcial character, then this can be specified content to send out by server-side
It send to corresponding type identification platform, and obtains the type identification result m of type identification platform return.
For example, specified content is to be mingled with spcial character!Content m'!, then server-side content can be specified to be sent to this
Corresponding type identification platform, and obtain the type identification result q of type identification platform return.
In embodiments of the present invention, server-side can preset the database for including type corresponding with specified content, connect
After receiving type identification result, server-side can obtain type corresponding with specified content, and will obtain from presetting database
Type matched with the type identification result q received, obtain matching result.
In one example, the preset database of server-side can be as shown in table 2, and specified content can be special not to be mingled with
The content m' of character, then server-side can receive type identification result m, and acquisition is corresponding with specified content m' from table 2
Type m, then, server-side matches type identification result m with type m, and both obtains the matching knot fitted through
Fruit.
In another example, the preset database of server-side can be as shown in table 3, specified content can be mingled with it is special
Character!Content m'!, then server-side can receive type identification result q, and be obtained and specified content m' from table 3!It is right
The type m answered, then, server-side match type identification result q with type m, and both obtain matching not by
With result.
Table 3
Type | Content |
m | m'! |
n | n' |
… | … |
It in embodiments of the present invention, can be according to the matching of the type and type identification result that are obtained from presetting database
As a result come determine to specify content validity testing result, specifically, when matching result be both matching when, it may be determined that
The testing result of the validity of the specified content is that detection passes through, i.e., the specified content is effective content, is determined for mesh
Test data is marked, at this point, server-side can specify content to determine target detection data based on this;When matching result be both no
When matching, it may be determined that the testing result of the validity of the specified content is that detection does not pass through, i.e., the specified content is not effective
Content, it is not possible to for determining target detection data, at this point, server-side can notify related personnel to specify content to carry out this
It checks and changes.
In embodiments of the present invention, server-side can be before determining target detection data, to specified based on specified content
The validity of content is detected, and in the case where detection passes through, and specifies content based on this to generate target detection data, by
In server-side before determining target detection data based on specified content, it is ensured that therefore the validity of specified content can be kept away
Exempt from the inaccurate situation for the functional test results to be tested caused by specifying the mistake of content occur, reduces and test is tied
The interference of fruit, so that test result is more accurate.
Corresponding above-mentioned function test method, the embodiment of the present invention additionally provide a kind of device for testing functions, and Fig. 2 is the present invention
One of the module composition schematic diagram of device for testing functions that embodiment provides, as shown in Fig. 2, the device for testing functions includes:
Parsing module 21, the configuration information for treating test function are parsed, and obtain analysis result, wherein described
Analysis result includes the feature for the data that the function to be tested can be handled;
Constructing module 22, for according to the latent structure target detection data;
Test module 23, for based on function to be tested described in the target detection data test.
Optionally, the test module 23 is specifically used for:
When the function to be tested includes the function being currently running on line, using the target detection data as input,
Obtain implementing result on line of the function to be tested based on the target detection data;
By implementing result on the line and function to be tested described in the analysis result to the pre- of the data that can handle
Phase handling result is matched, and matching result is obtained;
According to the matching result, the test result of the function to be tested is determined.
Optionally, the constructing module 22 includes (referring to Fig. 3):
Acquisition submodule 221, for from presetting database, obtaining the data with the characteristic matching;
Submodule 222 is constructed, for according to the data with the characteristic matching, constructing the target detection data.
Optionally, the construction submodule 222 is specifically used for:
It, at least will be with the spy when the function to be tested includes being shown to specified content with default display mode
The specified content levied in matched data is determined as the target detection data.
Optionally, the construction submodule 222 is specifically used for:
According to the display auxiliary data in the data of the characteristic matching, construction characterizes the display side of the specified content
The target detection data of formula, wherein the display auxiliary data is used to construct the mesh for the display mode for characterizing the specified content
Mark test data.
Optionally, the display auxiliary data includes following at least one:The specified content delivers account, the finger
Determine content deliver the time, the specified content delivers place.
Optionally, the default display mode includes following at least one:Default display format, default indication range,
In, the default display format includes following at least one:Shown with designated color, shown with specific font, with
Specified size is shown, is shown with specific context;The default indication range includes following one:To all accounts into
Row display shows specified account.
Optionally, described device further includes (referring to Fig. 4):
Detection module 24, for before determining the target detection data, being carried out to the validity of the specified content
Detection, and obtain the testing result that detection passes through.
Optionally, the detection module 24 is specifically used for:
The specified content is sent to type identification platform;
Receive the type identification result for the specified content that the type identification platform returns;
By the type identification as a result, and type corresponding with the specified content carries out in the presetting database
Match, obtains matching result;
The testing result to the validity of the specified content is determined according to the matching result.
In embodiments of the present invention, the configuration information that can first treat test function is parsed, and analysis result is obtained,
In, may include the feature for the data that the function to be tested can be handled in the analysis result, it is then possible to according to this feature come
Target detection data are constructed, and test the function to be tested based on the target detection data.
As shown in the above, the embodiment of the present invention can be come from by treating the parsing of the configuration information of test function
Dynamic construction target detection data, so as to realize the test for treating test function based on target detection data, due to can be with
Target detection data are constructed automatically by corresponding parsing, and are realized to function by the target detection data constructed automatically
Test therefore can effectively solve in the prior art because needing related personnel to be constructed manually according to the content of function to be tested
The problem that time-consuming, efficiency is low is tested caused by test data, improves the testing efficiency to function.
Corresponding above-mentioned function test method, the embodiment of the present invention additionally provide a kind of functional test equipment, and Fig. 5 is the present invention
The hardware architecture diagram for the functional test equipment that one embodiment provides.
The functional test equipment can be above-described embodiment provide for the terminal device of test function or server etc..
Functional test equipment can generate bigger difference because configuration or performance are different, may include one or one with
On processor 501 and memory 502, one or more storage application programs or number can be stored in memory 502
According to.Wherein, memory 502 can be of short duration storage or persistent storage.The application program for being stored in memory 502 may include one
A or more than one module (diagram is not shown), each module may include can to the series of computation machine in functional test equipment
It executes instruction.Further, processor 501 could be provided as communicating with memory 502, executes and deposits on functional test equipment
Series of computation machine executable instruction in reservoir 502.Functional test equipment can also include one or more power supplys
503, one or more wired or wireless network interfaces 504, one or more input/output interfaces 505, one or
More than one keyboard 506.
Specifically in the present embodiment, functional test equipment includes memory and one or more program,
In one either more than one program is stored in memory and one or more than one program may include one or one
With upper module, and each module may include and being configured to the series of computation machine executable instruction in functional test equipment
With by one either more than one processor execute this or more than one program include can for carrying out following computer
It executes instruction:
The configuration information for treating test function is parsed, and analysis result is obtained, wherein the analysis result includes described
The feature for the data that function to be tested can be handled;
According to the latent structure target detection data;
Based on function to be tested described in the target detection data test.
Optionally, computer executable instructions when executed, can also make the processor:
When the function to be tested includes the function being currently running on line, using the target detection data as input,
Obtain implementing result on line of the function to be tested based on the target detection data;
By implementing result on the line and function to be tested described in the analysis result to the pre- of the data that can handle
Phase handling result is matched, and matching result is obtained;
According to the matching result, the test result of the function to be tested is determined.
Optionally, computer executable instructions when executed, can also make the processor:
From presetting database, the data with the characteristic matching are obtained;
According to the data with the characteristic matching, the target detection data are constructed.
Optionally, computer executable instructions when executed, can also make the processor:
It, at least will be with the spy when the function to be tested includes being shown to specified content with default display mode
The specified content levied in matched data is determined as the target detection data.
Optionally, computer executable instructions when executed, can also make the processor:
According to the display auxiliary data in the data of the characteristic matching, construction characterizes the display side of the specified content
The target detection data of formula, wherein the display auxiliary data is used to construct the mesh for the display mode for characterizing the specified content
Mark test data.
Optionally, the display auxiliary data includes following at least one:The specified content delivers account, the finger
Determine content deliver the time, the specified content delivers place.
Optionally, the default display mode includes following at least one:Default display format, default indication range,
In, the default display format includes following at least one:Shown with designated color, shown with specific font, with
Specified size is shown, is shown with specific context;The default indication range includes following one:To all accounts into
Row display shows specified account.
Optionally, computer executable instructions when executed, can also make the processor:
Before determining the target detection data, the validity of the specified content is detected, and is examined
Survey the testing result passed through.
Optionally, computer executable instructions when executed, can also make the processor:
The specified content is sent to type identification platform;
Receive the type identification result for the specified content that the type identification platform returns;
By the type identification as a result, and type corresponding with the specified content carries out in the presetting database
Match, obtains matching result;
The testing result to the validity of the specified content is determined according to the matching result.
In embodiments of the present invention, the configuration information that can first treat test function is parsed, and analysis result is obtained,
In, may include the feature for the data that the function to be tested can be handled in the analysis result, it is then possible to according to this feature come
Target detection data are constructed, and test the function to be tested based on the target detection data.
As shown in the above, the embodiment of the present invention can be come from by treating the parsing of the configuration information of test function
Dynamic construction target detection data, so as to realize the test for treating test function based on target detection data, due to can be with
Target detection data are constructed automatically by corresponding parsing, and are realized to function by the target detection data constructed automatically
Test therefore can effectively solve in the prior art because needing related personnel to be constructed manually according to the content of function to be tested
The problem that time-consuming, efficiency is low is tested caused by test data, improves the testing efficiency to function.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " patrols
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer
This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages,
The hardware circuit for realizing the logical method flow can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can
Read medium, logic gate, switch, application-specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but not limited to following microcontroller
Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited
Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that in addition to
Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic
Controller is obtained in the form of logic gate, switch, application-specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. to come in fact
Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it
The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions
For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit is realized can in the same or multiple software and or hardware when invention.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer
The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real
The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or
The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus
Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described
There is also other identical elements in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that the embodiment of the present invention can be provided as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the present invention
Form.It is deposited moreover, the present invention can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The present invention can describe in the general context of computer-executable instructions executed by a computer, such as program
Module.Usually, program module includes routines performing specific tasks or implementing specific abstract data types, program, object, group
Part, data structure etc..The present invention can also be put into practice in a distributed computing environment, in these distributed computing environments, by
Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with
In the local and remote computer storage media including storage device.
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method
Part explanation.
Example the above is only the implementation of the present invention is not intended to restrict the invention.For those skilled in the art
For, the invention may be variously modified and varied.It is all within spirit and principles of the present invention made by any modification, equivalent
Replace, improve etc., it should be included within scope of the presently claimed invention.
Claims (17)
1. a kind of function test method, which is characterized in that the method includes:
The configuration information for treating test function is parsed, and analysis result is obtained, wherein the analysis result includes described to be measured
The feature for the data that examination function can be handled;
According to the latent structure target detection data;
Based on function to be tested described in the target detection data test.
2. the method as described in claim 1, which is characterized in that the function to be tested includes the function being currently running on line;
The analysis result further includes expection handling result of the function to be tested to the data that can be handled;
It is described based on function to be tested described in the target detection data test, including:
Using the target detection data as input, obtain holding on line of the function to be tested based on the target detection data
Row result;
Implementing result on the line is matched with the expected handling result, obtains matching result;
According to the matching result, the test result of the function to be tested is determined.
3. the method as described in claim 1, which is characterized in that it is described according to the latent structure target detection data, including:
From presetting database, the data with the characteristic matching are obtained;
According to the data with the characteristic matching, the target detection data are constructed.
4. method as claimed in claim 3, which is characterized in that the function to be tested, including:With default display mode to referring to
Determine content to be shown;Wherein, include the specified content with the data of the characteristic matching;
The data of the basis and the characteristic matching construct the target detection data, specifically include:
The specified content is at least determined as the target detection data.
5. method as claimed in claim 4, which is characterized in that the data with the characteristic matching further include display supplementary number
According to the display auxiliary data is used to construct the target detection data for the display mode for characterizing the specified content;
The data of the basis and the characteristic matching construct the target detection data, further include:
According to the display auxiliary data, construction characterizes the target detection data of the display mode of the specified content.
6. method as claimed in claim 5, which is characterized in that the display auxiliary data includes following at least one:It is described
Specified content deliver account, the specified content deliver the time, the specified content delivers place;
The default display mode includes following at least one:Default display format, default indication range, wherein described default
Display format includes following at least one:It shown with designated color, shown with specific font, being carried out with specified size
Display is shown with specific context;The default indication range includes following one:All accounts are shown, to referring to
Determine account to be shown.
7. method as claimed in claim 4, which is characterized in that described that the specified content is at least determined as the target survey
Before trying data, the method further includes:
The validity of the specified content is detected, and obtains the testing result that detection passes through.
8. the method for claim 7, which is characterized in that the presetting database includes corresponding with the specified content
Type, the validity to the specified content is detected, including:
The specified content is sent to type identification platform;
Receive the type identification result for the specified content that the type identification platform returns;
By the type identification as a result, and type corresponding with the specified content matches in the presetting database,
Obtain matching result;
The testing result to the validity of the specified content is determined according to the matching result.
9. a kind of device for testing functions, which is characterized in that described device includes:
Parsing module, the configuration information for treating test function are parsed, and analysis result is obtained, wherein the parsing knot
Fruit includes the feature for the data that the function to be tested can be handled;
Constructing module, for according to the latent structure target detection data;
Test module, for based on function to be tested described in the target detection data test.
10. device as claimed in claim 9, which is characterized in that the test module is specifically used for:
When the function to be tested includes the function being currently running on line, using the target detection data as input, obtain
Implementing result on line of the function to be tested based on the target detection data;
By function to be tested described in implementing result on the line and the analysis result to the expection for the data that can be handled at
Reason result is matched, and matching result is obtained;
According to the matching result, the test result of the function to be tested is determined.
11. device as claimed in claim 9, which is characterized in that the constructing module includes:
Acquisition submodule, for from presetting database, obtaining the data with the characteristic matching;
Submodule is constructed, for according to the data with the characteristic matching, constructing the target detection data.
12. device as claimed in claim 11, which is characterized in that the construction submodule is specifically used for:
It, at least will be with the feature when the function to be tested includes being shown to specified content with default display mode
The specified content in the data matched is determined as the target detection data.
13. device as claimed in claim 12, which is characterized in that the construction submodule is specifically used for:
According to the display auxiliary data in the data of the characteristic matching, construction characterizes the display mode of the specified content
Target detection data, wherein the target that the display auxiliary data is used to construct the display mode for characterizing the specified content is surveyed
Try data.
14. device as claimed in claim 12, which is characterized in that further include:
Detection module, for before determining the target detection data, being detected to the validity of the specified content, with
And obtain the testing result that detection passes through.
15. device as claimed in claim 14, which is characterized in that the detection module is specifically used for:
The specified content is sent to type identification platform;
Receive the type identification result for the specified content that the type identification platform returns;
By the type identification as a result, and type corresponding with the specified content matches in the presetting database,
Obtain matching result;
The testing result to the validity of the specified content is determined according to the matching result.
16. a kind of terminal device, which is characterized in that including:It memory, processor and is stored on the memory and can be in institute
The computer program run on processor is stated, such as claim 1 to 8 is realized when the computer program is executed by the processor
Any one of described in method the step of.
17. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program is realized when the computer program is executed by processor such as the step of method described in any item of the claim 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810399647.4A CN108804310A (en) | 2018-04-28 | 2018-04-28 | function test method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810399647.4A CN108804310A (en) | 2018-04-28 | 2018-04-28 | function test method, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108804310A true CN108804310A (en) | 2018-11-13 |
Family
ID=64094067
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810399647.4A Pending CN108804310A (en) | 2018-04-28 | 2018-04-28 | function test method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804310A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111897779A (en) * | 2020-07-21 | 2020-11-06 | 北京京瀚禹电子工程技术有限公司 | Data comparison method and device |
CN112468355A (en) * | 2019-09-09 | 2021-03-09 | 北京奇虎科技有限公司 | IOT equipment management application testing method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130275946A1 (en) * | 2012-04-16 | 2013-10-17 | Oracle International Corporation | Systems and methods for test development process automation for a test harness |
CN104536890A (en) * | 2014-12-26 | 2015-04-22 | 小米科技有限责任公司 | Testing system, method and device |
CN104731587A (en) * | 2015-03-12 | 2015-06-24 | 用友网络科技股份有限公司 | Unit testing data generating method and unit testing data generating system |
CN106326108A (en) * | 2016-08-09 | 2017-01-11 | 北京金山安全软件有限公司 | New application testing method and device |
-
2018
- 2018-04-28 CN CN201810399647.4A patent/CN108804310A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130275946A1 (en) * | 2012-04-16 | 2013-10-17 | Oracle International Corporation | Systems and methods for test development process automation for a test harness |
CN104536890A (en) * | 2014-12-26 | 2015-04-22 | 小米科技有限责任公司 | Testing system, method and device |
CN104731587A (en) * | 2015-03-12 | 2015-06-24 | 用友网络科技股份有限公司 | Unit testing data generating method and unit testing data generating system |
CN106326108A (en) * | 2016-08-09 | 2017-01-11 | 北京金山安全软件有限公司 | New application testing method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112468355A (en) * | 2019-09-09 | 2021-03-09 | 北京奇虎科技有限公司 | IOT equipment management application testing method and device, electronic equipment and storage medium |
CN112468355B (en) * | 2019-09-09 | 2024-01-19 | 北京奇虎科技有限公司 | IOT equipment management application testing method and device, electronic equipment and storage medium |
CN111897779A (en) * | 2020-07-21 | 2020-11-06 | 北京京瀚禹电子工程技术有限公司 | Data comparison method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019192261A1 (en) | Payment mode recommendation method and device and equipment | |
CN110007957A (en) | Call link construction method, device and equipment | |
CN108845936A (en) | A kind of AB test method and system based on mass users | |
CN109960653A (en) | Regression testing method, device, equipment and storage medium | |
CN109086961A (en) | A kind of Information Risk monitoring method and device | |
CN110262937A (en) | A kind of recognition methods of Indexes Abnormality reason and device | |
CN105760292B (en) | A kind of assertion verification method and apparatus for unit testing | |
CN107066519A (en) | A kind of task detection method and device | |
CN107329899A (en) | A kind of application compatibility method of testing and device | |
CN106909498A (en) | A kind of java applet injects the method and system of failure | |
CN109582485A (en) | A kind of configuration change method for detecting abnormality and device | |
CN108665158A (en) | A kind of method, apparatus and equipment of trained air control model | |
CN110334013A (en) | Test method, device and the electronic equipment of decision engine | |
CN110457578A (en) | A kind of customer service demand recognition methods and device | |
CN110119860A (en) | A kind of rubbish account detection method, device and equipment | |
CN110046088A (en) | A kind of interface test method, device and equipment | |
CN108459913A (en) | data parallel processing method, device and server | |
CN109299096A (en) | A kind of processing method of pipelined data, device and equipment | |
CN110532295A (en) | A kind of method and device of computer-implemented information processing, information inquiry | |
CN108804310A (en) | function test method, device and equipment | |
CN106095948A (en) | The querying method of form, device and equipment | |
CN111008524A (en) | Language translation processing method and device | |
CN110245978A (en) | Policy evaluation, policy selection method and device in tactful group | |
CN110264213A (en) | A kind of processing method of information, device and equipment | |
CN109492401A (en) | A kind of content vector risk checking method, device, equipment and medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181113 |
|
RJ01 | Rejection of invention patent application after publication |