CN110069397A - Function test method, device, computer equipment and storage medium - Google Patents

Function test method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110069397A
CN110069397A CN201910198305.0A CN201910198305A CN110069397A CN 110069397 A CN110069397 A CN 110069397A CN 201910198305 A CN201910198305 A CN 201910198305A CN 110069397 A CN110069397 A CN 110069397A
Authority
CN
China
Prior art keywords
test
information
objective function
parameter
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910198305.0A
Other languages
Chinese (zh)
Inventor
吕小立
刘丽珍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910198305.0A priority Critical patent/CN110069397A/en
Publication of CN110069397A publication Critical patent/CN110069397A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

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 embodiment of the invention discloses a kind of function test method, device, computer equipment and storage mediums, comprising: obtains the identity information of objective function to be detected in application program;The test parameter that there are mapping relations with the objective function is searched in preset map listing, wherein the test parameter is the supplemental characteristic for triggering the objective function, and the test parameter of all kinds of objective functions is recorded in the map listing;The test parameter is written in preset test information, so that the application program executes the objective function after reading the test information.The test parameter of the objective function is searched by the identity information description of objective function, and test parameter is directly write in preset test information and completes writing for test case, without manually being write to test case, the quick test of function of application is realized by map listing, improve testing efficiency, testing cost is reduced, the development cost of application program has effectively been saved.

Description

Function test method, device, computer equipment and storage medium
Technical field
The present embodiments relate to data test field, especially a kind of function test method, device, computer equipment and Storage medium.
Background technique
Functional test is exactly to verify to each function of product, according to product characteristic, operation description and user's scheme, is surveyed Try a product characteristic and can operation behavior with determine they meet design requirement.Without the concern for entire software when test Internal structure and code, generally from the interface of software product, framework, the test case for writing out as desired, input Data are evaluated and tested between expected results and actual result, and then propose that product is more made to reach the requirement that user uses.
In the prior art, when carrying out functional test, need to write test case according to the function of application program, and apply journey Each single item function in sequence is intended to write a corresponding test case and be tested.Therefore, per a application program Functional test after test or version updating is required to a large amount of manpower and material resources and participates in test, increases opening for application program Send out cost.
Summary of the invention
The embodiment of the present invention provides a kind of function tested automatically by quickly modifying test parameter realization different function It can test method, device, computer equipment and storage medium.
In order to solve the above technical problems, the technical solution that the embodiment of the invention uses is: providing a kind of function Energy test method, comprising:
Obtain the identity information of objective function to be detected in application program;
The test parameter that there are mapping relations with the objective function is searched in preset map listing, wherein described Test parameter is the supplemental characteristic for triggering the objective function, and the test ginseng of all kinds of objective functions is recorded in the map listing Number;
The test parameter is written in preset test information, so that after the application program reads the test information Execute the objective function.
It is optionally, described to obtain in application program before the identity information of objective function to be detected, comprising:
Obtain the triggering frequency of each functional item in application program;
Successively the triggering frequency of the functional item is compared with preset first frequency threshold value;
When the triggering frequency of functional item is less than first frequency threshold value, confirm that the functional item is to be detected Objective function.
Optionally, described that the test parameter is written in preset test information, so that the application program reads institute It states before executing the objective function after testing information, comprising:
Obtain several informations of preset third party's user terminal;
Test information is extracted in several informations according to preset sampling rule, wherein the test information In include the message parameter for triggering the functional item.
Optionally, described after extraction test information, to be wrapped in several informations according to preset sampling rule It includes:
The message parameter is compared with the test parameter, to judge whether the message parameter can trigger institute State objective function;
When the message parameter can not trigger the objective function, confirmation disappears using locating for test parameter replacement Cease parameter.
Optionally, described after extraction test information, to be wrapped in several informations according to preset sampling rule It includes:
Read the test information;
It calls the functional item operation test information that there are mapping relations with the test information to generate first to reply Information;
First return information is sent to third party's user terminal.
Optionally, described that the test parameter is written in preset test information, so that the application program reads institute It executes the objective function after stating test information and includes:
The test parameter is written in preset test information;
It calls the objective function to run the test information and generates the second return information, wherein described second replys letter It include the internet protocol address of third party's user terminal in breath;
Internet protocol address in second return information is replaced with into preset test network protocol address;
Second return information is sent to the test network protocol address.
Optionally, after second return information to test network protocol address transmission, comprising:
Obtain the screenshot picture that the test terminal of the test network protocol address characterization is sent, wherein the screenshot is drawn Face is second return information in the test terminal display;
The screenshot picture is input in preset image judgment models, to judge the screenshot picture and preset institute Whether the initial standard display for stating the operation result of objective function is identical, wherein described image judgment models are to train in advance extremely Convergence state, for judging the whether identical neural network model of different images;
Described image judgment models classification results are obtained, and determine whether the objective function normally transports according to classification results Row.
In order to solve the above technical problems, the embodiment of the present invention also provides a kind of device for testing functions, comprising:
Module is obtained, for obtaining the identity information of objective function to be detected in application program;
Processing module is joined for searching the test for having mapping relations with the objective function in preset map listing Number, wherein the test parameter is the supplemental characteristic for triggering the objective function, and all kinds of target function are recorded in the map listing The test parameter of energy;
Execution module, for the test parameter to be written in preset test information, so that the application program is read The objective function is executed after the test information.
Optionally, the device for testing functions further include:
First acquisition submodule, for obtaining the triggering frequency of each functional item in application program;
First processing submodule, for successively by the triggering frequency of the functional item and preset first frequency threshold value into Row compares;
First implementation sub-module, for confirming institute when the triggering frequency of functional item is less than first frequency threshold value Stating functional item is objective function to be detected.
Optionally, the device for testing functions further include:
Second acquisition submodule, for obtaining several informations of preset third party's user terminal;
Second processing submodule, for extracting test letter in several informations according to preset sampling rule Breath, wherein include the message parameter for triggering the functional item in the test information.
Optionally, the device for testing functions further include:
First compares submodule, for the message parameter to be compared with the test parameter, to disappear described in judgement Whether breath parameter can trigger the objective function;
Second implementation sub-module, for when the message parameter can not trigger the objective function, confirmation to use institute It states test parameter and replaces locating message parameter.
Optionally, the device for testing functions further include:
First reading submodule, for reading the test information;
Third handles submodule, with the test information there is the functional item of mapping relations to run the survey for calling It tries information and generates the first return information;
Third implementation sub-module, for sending first return information to third party's user terminal.
Optionally, the device for testing functions further include:
First write-in submodule, for the test parameter to be written in preset test information;
First calls submodule, generates the second return information for calling the objective function to run the test information, It wherein, include the internet protocol address of third party's user terminal in second return information;
Fourth process submodule, for the internet protocol address in second return information to be replaced with preset test Internet protocol address;
4th implementation sub-module, for sending second return information to the test network protocol address.
Optionally, the device for testing functions further include:
Third acquisition submodule, the screenshot that the test terminal for obtaining the test network protocol address characterization is sent are drawn Face, wherein the screenshot picture is second return information in the test terminal display;
5th processing submodule, for the screenshot picture to be input in preset image judgment models, to judge It is whether identical as the initial standard display of the operation result of the preset objective function to state screenshot picture, wherein described image Judgment models are that training is to convergence state in advance, for judging the whether identical neural network model of different images;
5th implementation sub-module determines institute for obtaining described image judgment models classification results, and according to classification results State objective function whether normal operation.
In order to solve the above technical problems, the embodiment of the present invention also provides a kind of computer equipment, including memory and processing Device is stored with computer-readable instruction in the memory, when the computer-readable instruction is executed by the processor, so that The processor executes the step of function test method described above.
In order to solve the above technical problems, the embodiment of the present invention also provides a kind of storage Jie for being stored with computer-readable instruction Matter, when the computer-readable instruction is executed by one or more processors, so that one or more processors execute above-mentioned institute The step of stating function test method.
The beneficial effect of the embodiment of the present invention is: the objective function by needing to carry out functional test in reading application program Identity information, test parameter corresponding with objective function, the survey are obtained in preset map listing according to the identity information Examination parameter can trigger the execution of objective function after being performed.Test parameter be written into test information in, application program according to The thread of read test information invocation target function executes the test instruction of test program characterization, and then completes to objective function Test.The test parameter of the objective function is searched by the identity information description of objective function, and test parameter is write direct Writing for test case is completed into preset test information, without manually writing to test case, passes through map listing The quick test for realizing function of application, improves testing efficiency, reduces testing cost, effectively saved application program Development cost.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is the basic procedure schematic diagram of interactive information of embodiment of the present invention test method;
Fig. 2 is the flow diagram that the embodiment of the present invention screens objective function according to the triggering frequency;
Fig. 3 is process of the embodiment of the present invention by sampling selection test information in the information that local terminal is sent Schematic diagram;
Fig. 4 is the flow diagram that the embodiment of the present invention leads to whether confirmation message information carries out test parameter replacement;
Fig. 5 is the flow diagram that server end of the embodiment of the present invention normally replys test information;
Fig. 6 is the flow diagram that the embodiment of the present invention tests objective function using test information;
Fig. 7 is the flow diagram that the embodiment of the present invention verifies test result according to display screenshot;
Fig. 8 is device for testing functions of embodiment of the present invention basic structure schematic diagram;
Fig. 9 is computer equipment of embodiment of the present invention basic structure block diagram.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.
In some processes of the description in description and claims of this specification and above-mentioned attached drawing, contain according to Multiple operations that particular order occurs, but it should be clearly understood that these operations can not be what appears in this article suitable according to its Sequence is executed or is executed parallel, and serial number of operation such as 101,102 etc. is only used for distinguishing each different operation, serial number It itself does not represent and any executes sequence.In addition, these processes may include more or fewer operations, and these operations can To execute or execute parallel in order.It should be noted that the description such as " first " herein, " second ", is for distinguishing not Same message, equipment, module etc., does not represent sequencing, does not also limit " first " and " second " and be different type.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those skilled in the art's every other implementation obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Those skilled in the art of the present technique are appreciated that " terminal " used herein above, " terminal device " both include wireless communication The equipment of number receiver, only has the equipment of the wireless signal receiver of non-emissive ability, and including receiving and emitting hardware Equipment, have on bidirectional communication link, can execute two-way communication reception and emit hardware equipment.This equipment It may include: honeycomb or other communication equipments, shown with single line display or multi-line display or without multi-line The honeycomb of device or other communication equipments;PCS (Personal Communications Service, PCS Personal Communications System), can With combine voice, data processing, fax and/or communication ability;PDA (PersonalDigital Assistant, it is personal Digital assistants), it may include radio frequency receiver, pager, the Internet/intranet access, web browser, notepad, day It goes through and/or GPS (Global Positioning System, global positioning system) receiver;Conventional laptop and/or palm Type computer or other equipment, have and/or the conventional laptop including radio frequency receiver and/or palmtop computer or its His equipment." terminal " used herein above, " terminal device " can be it is portable, can transport, be mounted on the vehicles (aviation, Sea-freight and/or land) in, or be suitable for and/or be configured in local runtime, and/or with distribution form, operate in the earth And/or any other position operation in space." terminal " used herein above, " terminal device " can also be communication terminal, on Network termination, music/video playback terminal, such as can be PDA, MID (Mobile Internet Device, mobile Internet Equipment) and/or mobile phone with music/video playing function, it is also possible to the equipment such as smart television, set-top box.
It is the basic procedure schematic diagram of the present embodiment interactive information test method referring specifically to Fig. 1, Fig. 1.
As shown in Figure 1, a kind of interactive information test method, comprising:
S1100, the identity information for obtaining objective function to be detected in application program;
Before the functional test for carrying out application program, the identity letter of objective function in need of test is obtained first Breath, wherein identity information is the identity coding of the functional module of the objective function to be detected.
In present embodiment, application program is at least made of a functional module, and each functional module can be realized not Same function.For convenient for identifying that each functional module is provided with identity information, identity information is the number of functional module, number by Basis number is formed with version number, such as in number " 1352014.2.8 ", is numbered based on " 1352014 ", and " 2.8 " are version Number, " " is blank character.In present embodiment, the identity information of functional module is not limited to this, not according to concrete application scene Together, in some embodiments, identity information can be Custom Number with uniqueness in the application.
Objective function is determining functional module in need of test, and objective function can be individually, for example, to certain The functional module being newly added in a application program is tested;Objective function can also be tested for multiple functional modules, example Such as, the whole functional module that lives of multiple functional modules in application program is tested.
S1200, the test parameter that there are mapping relations with the objective function is searched in preset map listing, In, the test parameter is the supplemental characteristic for triggering the objective function, records all kinds of objective functions in the map listing Test parameter;
Map listing is set, the test parameter of each functional module is recorded in map listing, which is that can touch The supplemental characteristic sending out functional module each and being characterized.For prompting function in navigation application program, to deviate navigation routine, when User deviate 100 meters of scheduled route apart from when, i.e., send off-line suggestion voice to user, and test parameter is then Indicate that user deviates 100 meters of projected route of supplemental characteristic.In another example in temperature safety application program, when sensor passback When temperature is more than or equal to 75 DEG C, then alarm sound bell is opened, test data is the supplemental characteristic that temperature is greater than 75 DEG C.
Test parameter can be single parameter values, also can be some parameter value section, such as in some implementations In mode, parameter values are the temperature range greater than 75 DEG C.
S1300, the test parameter is written in preset test information, so that the application program reads the test The objective function is executed after information.
In present embodiment, the carrier of test parameter is preset test information, have for each application program and its Matched format transmission message, for example, the data obtained from front end are intended to solicited message when application program is background program Format is sent to backstage, and the message parameter then extracted from solicited message is handled.Therefore, test parameter needs to be written special It in the test information for the formula that fixes, can be identified by application program, in present embodiment, test information is that can be applied journey The solicited message of sequence identification.
Application program is hung and is somebody's turn to do with the execution of the thread of the objective function after the test information for having read write-in test parameter Information is tested, the operation result of the test information is obtained.
By needing to carry out the identity information of the objective function of functional test in reading application program in above embodiment, Test parameter corresponding with objective function is obtained in preset map listing according to the identity information, which is performed The execution of objective function can be triggered afterwards.Test parameter is written into test information, and application program is according to read test information The thread of invocation target function executes the test instruction of test program characterization, and then completes the test to objective function.Pass through mesh The test parameter of the objective function is searched in the identity information description for marking function, and test parameter is directly write to preset test Writing for test case is completed in information, and without manually writing to test case, application program is realized by map listing The quick test of function, improves testing efficiency, reduces testing cost, has effectively saved the development cost of application program.
In some embodiments, for being partially in the application program of use state, it is certain or some without The functional module being often used needs in a period of time to examine whether the functional module works normally to the objective function It is tested.Referring to Fig. 2, Fig. 2 is the flow diagram that the present embodiment screens objective function according to the triggering frequency.
As shown in Fig. 2, before S1100 step shown in FIG. 1, comprising:
S1011, the triggering frequency for obtaining each functional item in application program;
The statistics frequency that each functional item is triggered in application program in a preset time period, wherein function items Mesh corresponds to each functional module in application program, the corresponding functional module of each functional item.
Preset time period is the statistical time of setting, such as counted the period with 24 hours for a statistical time end The triggering frequency of interior each functional item.But the length of preset time period is not limited to this, not according to concrete application scene Together, in some embodiments, preset time period can be (being not limited to): 1 second, 1 point, 1 hour, 1 week or longer time Section.
S1012, successively the triggering frequency of the functional item is compared with preset first frequency threshold value;
By the first frequency threshold value of the triggering frequency of each functional item of statistics arrived within a preset period of time and setting It is compared, the ground mode of comparison is the triggering frequency numerical value of comparing function project and the size of the first frequency threshold value.
First frequency threshold value is the measurement triggering frequency of setting setting numerical value whether up to standard, and the first frequency threshold value is 2, but Be the first frequency threshold value setting numerical value it is not limited to this, according to the difference of concrete application scene, in some embodiments, One frequency threshold value can be the random natural number for being suitable for corresponding application scenarios.
S1013, when the triggering frequency of functional item be less than first frequency threshold value when, confirm the functional item be to The objective function of detection.
When the triggering frequency of functional item is less than the first frequency threshold value, that is, show that the triggering frequency of the functional item is less than Numerical value is set, at this point, confirming that the corresponding functional module of the functional item is objective function in need of test.Work as functional item Triggering frequency when being more than or equal to the first frequency threshold value, then assert that functional item triggering is reasonable.
By statistics obtain the triggering frequency of each functional item, can effectively trigger the lower functional item of the frequency into Row test, can be worked normally with guaranteeing each functional item.
In some embodiments, it for the application program used partially has been put into, needs to send third party's terminal Information as test information tested, for mitigate server end verifying pressure, select to disappear by way of sampling Breath information is tested.Referring to Fig. 3, Fig. 3 is in present embodiment by sampling in the information that local terminal is sent The flow diagram of selection test information.
As shown in figure 3, before S1300 step shown in FIG. 1, comprising:
S1211, several informations for obtaining preset third party's user terminal;
In present embodiment, application program is background application, and third party's user terminal is the server with application program User terminal or service server end are connected by communication interface between end.
Information is the solicited message for the server end that above-mentioned third party's user terminal is sent to application program.
S1212, test information is extracted in several informations according to preset sampling rule, wherein the survey It tries to include the message parameter for triggering the functional item in information.
It is that an information is extracted in every 1000 informations as test information that rule is sampled in present embodiment. But sampling rule is not limited to this, according to the difference of concrete application scene, in some embodiments conduct in sampling rule The quantity of the information of radix can be more or less.
In some embodiments, sampling rule is setting sample rate, for example, set sample rate as 1%, then each message It is 1% that information, which is extracted as the ratio of test post,.But sampling rule is not limited to this, not according to concrete application scene Together, sampling rate score setting can be larger or smaller in sampling rule in sampling rule in some embodiments.
By setting sampling rule, can be dropped to the maximum extent in the case where detection function module normal operating conditions The low operation pressure to server end.
In some embodiments, in the information sampled for part, the parameter for including in information can The scope for the objective function that can be triggered can be already belonged to, at this point, without being replaced to message parameter in the information, just It is able to carry out test.Therefore, it is necessary to screen to message file.Referring to Fig. 4, Fig. 4 is that the present embodiment leads to confirmation message letter Whether breath carries out the flow diagram of test parameter replacement.
As shown in figure 4, after S1212 step shown in Fig. 3, comprising:
S1221, the message parameter is compared with the test parameter, to judge that the message parameter whether can Trigger the objective function;
By sampling to information carry out parameter extraction and obtain message parameter, message parameter and test parameter are carried out It compares, the mode of comparison is to determine whether the numerical value of message parameter is identical as the numerical value of test parameter, or determine message parameter Numerical value whether in the numerical intervals of test parameter.When the numerical value for determining message parameter is identical as the numerical value of test parameter, or Then, when determining that the numerical value of message parameter is in the numerical intervals of test parameter, determine that the message parameter can trigger objective function.
S1222, when the message parameter can not trigger the objective function, confirmation using the test parameter replace Locating message parameter.
When the numerical value of message parameter and the numerical value of test parameter is not identical, or, the numerical value of message parameter is not joined in test When in several numerical intervals, it is determined that the message parameter can not trigger objective function, need to the message ginseng in information Number is replaced.
It is whether identical as test parameter by detection message parameter, avoid the message letter that objective function can be triggered to part Breath carries out parameter modification, can be improved the efficiency that test carries out.
In some embodiments, for the application program used partially has been put into, each third party's user terminal disappears Breath information is user terminal or the normal request information at other service server ends, and server end needs to carry out above-mentioned message It is normal to reply.Referring to Fig. 5, Fig. 5 is the flow diagram that the present embodiment server end normally replys test information.
As shown in figure 5, after S1212 step shown in Fig. 3, comprising:
S1231, the test information is read;
After information is extracted in several informations by sampling prescription as test information, test letter is read Breath.
S1232, it calls and runs test information generation the with functional item that the test information has mapping relations One return information;
Server end needs to carry out operation to test information, this disappears according to the process of operation after read test information The information request item write exactly in breath information, calls the thread process of the corresponding functional item test information, after the completion of operation Operation result is defined as the first return information.For example, by taking the application program for carrying out profile download as an example, under ordinary user's account The document number of pages of load cannot page 5, is page 3 when testing the corresponding document of document links that message parameter is write exactly in information, and the use When family account is ordinary user, server end calls corresponding document, using the document as the partial content of the first return information, It is sent to corresponding user terminal.
S1233, Xiang Suoshu third party's user terminal send first return information.
After first time letter breath generates, according to the IP address (internet protocol address) of user terminal in test post by first Return information is sent to corresponding third party's user terminal.
In some embodiments, server end carries out after normally replying test information, reuses the test information pair The objective function of application program is tested.Referring to Fig. 6, Fig. 6 is that the present embodiment carries out objective function using test information The flow diagram of test.
As shown in fig. 6, S1300 step shown in FIG. 1 includes:
S1311, the test parameter is written in preset test information;
The carrier of test parameter is preset test information, has matched information to transmit each application program Format, for example, the data obtained from front end are intended to after being sent to the format of solicited message when application program is background program Platform, the message parameter then extracted from solicited message are handled.Therefore, test parameter needs to be written the test of specific format In information, it can be identified by application program.
S1312, the objective function is called to run the second return information of the test information generation, wherein described second It include the internet protocol address of third party's user terminal in return information;
After test parameter is written in test information, server end reads the test information and carries out operation, the mistake of operation The information request item write exactly in the test information according to journey calls the test of the thread process of corresponding objective function to believe Operation result is defined as the second return information after the completion of operation by breath.For example, by taking the application program for carrying out profile download as an example, The authentication module of the application program is tested, the document number of pages of ordinary user's account downloading cannot page 5, when in test information The corresponding document of the document links that message parameter is write exactly is page 7, is authenticated to the user account, and it is general for authenticating the user account When logical account, server end sends the notification information for having no right downloading to user terminal, which is replied as second and is believed The partial content of breath is sent to corresponding user terminal.
The internet protocol address of third party's user terminal in second return information in Inherit Testing information, therefore, second time It include the internet protocol address of third party's user terminal in complex information.
S1313, the internet protocol address in second return information is replaced with into preset test network protocol address;
Due to, test information is modified on the basis of user terminal normal informational message, therefore, the Internet protocol address in two return informations is the internet protocol address of third party's user terminal, and the second return information can be sent to Third party's user terminal.It needs to modify to the internet protocol address in the second return information, is revised as test terminal Test network protocol address, the mode of modification are to be replaced to the internet protocol address in the second return information.
S1314, Xiang Suoshu test network protocol address send second return information.
After internet protocol address in second return information is replaced with test network protocol address, by the second return information Test terminal is sent to by test network protocol address.
After modifying to the internet protocol address in the second return information, the forwarding of the second return information can be realized, Using the technical solution can application software in actual use, objective function is tested, with traditional test side Method compares, and is not necessarily to independent testing service device, it will be able to realize the test of objective function.
In some embodiments it may be desirable to which the display result to the second return information judges, replied with identification second Whether information is correct, and then judges whether the operation of objective function is normal.Referring to Fig. 7, Fig. 7 is that the present embodiment is cut according to display The flow diagram that figure verifies test result.
As shown in fig. 7, after S1314 step shown in fig. 6, comprising:
The screenshot picture that S1321, the test terminal for obtaining the test network protocol address characterization are sent, wherein described Screenshot picture is second return information in the test terminal display;
Test terminal after obtaining the second return information, show second return information characterization content, or call and The corresponding display state of second return information.Then, screenshot is carried out to the display content of current page and generates screenshot picture.And it will Screenshot picture is sent to server end.
S1322, the screenshot picture is input in preset image judgment models, to judge the screenshot picture and pre- If the objective function operation result initial standard display it is whether identical, wherein described image judgment models are preparatory Training is to convergence state, for judging the whether identical neural network model of different images;
Screenshot picture is input in preset image judgment models by server end, to judge screenshot picture and preset mesh Whether the initial standard display for marking the operation result of function is identical.
Wherein, image judgment models are that training is to convergence state in advance, for judging the whether identical nerve of different images Network model.
Image judgment models can be the trained convolutional neural networks model (CNN) to convergence state, still, not office Be limited to this, image judgment models can also be: deep neural network model (DNN), Recognition with Recurrent Neural Network model (RNN) or on State the distorted pattern of three kinds of network models.
Initial neural network model as image judgment models in training, draw by the screenshot by collecting a large amount of terminal Whether dough sheet is as training sample, by manually identical in the display picture of the middle screenshot picture and standard that observe training sample Afterwards, (calibration refers to whether training sample screenshot picture is identical as the display picture of standard) is demarcated to each training sample. Then training sample is input in initial neural network model, and obtains the classification results of model output (classification results is The state classification for the training sample that model obtains, i.e. model judge to obtain training sample and whether initial standard display is identical), and The feature of the display picture of the corresponding feature vector of the classification results and standard is calculated by the loss function of neural network model The distance between vector (such as: Euclidean distance, mahalanobis distance or COS distance etc.), by the distance threshold of calculated result and setting (such as 0.05) is compared, and passes through verifying if calculated result is less than or equal to distance threshold, continues next trained sample This training passes through loss function if calculated result is greater than distance threshold and calculates difference between the two, and by reversely passing Broadcast the weight in correction neural network model, make neural network model improve in training sample can accurate assertiveness training sample with The weight of the pixel of initial standard display relativeness increases the accuracy rate of judgement with this.Above scheme is executed by circulation After the training of a large amount of training sample, the obtained neural network model of training is to training sample and initial standard display similitude Judging nicety rate is greater than certain numerical value, for example, 95%, then neural network model training to convergence state, then the training is extremely Convergent neural network is image judgment models.
The image judgment models of training to convergence state can accurately judge whether are screenshot picture and initial standard display It is identical.
Initial standard display is should have when the test terminal of setting obtains the second return information in objective function exploitation Display picture or show state image.
S1323, described image judgment models classification results are obtained, and whether determines the objective function according to classification results It operates normally.
The classification results for obtaining image judgment models, when classification results determine that screenshot picture is identical as initial standard display, Then confirm objective function normal operation;Otherwise, it is determined that objective function operation is abnormal.
Judged by the screenshot picture that neural network model uploads test terminal with initial standard display, it can be fast The display state of the fast function that sets the goal really, greatly improves the efficiency of test, has saved human cost.
In order to solve the above technical problems, the embodiment of the present invention also provides a kind of device for testing functions.
It is the present embodiment device for testing functions basic structure schematic diagram referring specifically to Fig. 8, Fig. 8.
As shown in figure 8, a kind of device for testing functions, comprising: obtain module, processing module and execution module.Wherein, it obtains Module is used to obtain the identity information of objective function to be detected in application program;Processing module is used in preset map listing Middle lookup has the test parameter of mapping relations with objective function, wherein and test parameter is the supplemental characteristic for triggering objective function, The test parameter of all kinds of objective functions is recorded in map listing;Execution module is used to the test parameter preset test information is written In, so that performance objective function after application program read test information.
Device for testing functions passes through the identity information for reading the objective function for needing to carry out functional test in application program, root Test parameter corresponding with objective function is obtained in preset map listing according to the identity information, after which is performed The execution of objective function can be triggered.Test parameter is written into test information, and application program is according to read test information tune The test instruction of test program characterization is executed with the thread of objective function, and then completes the test to objective function.Pass through target The test parameter of the objective function is searched in the identity information description of function, and test parameter is directly write to preset test and is believed Writing for test case is completed in breath, and without manually writing to test case, application program function is realized by map listing The quick test of energy, improves testing efficiency, reduces testing cost, effectively saved the development cost of application program.
In some embodiments, device for testing functions further include: the first acquisition submodule, the first processing submodule and the One implementation sub-module.Wherein, the first acquisition submodule is used to obtain the triggering frequency of each functional item in application program;First Processing submodule is for successively the triggering frequency of functional item to be compared with preset first frequency threshold value;First executes son Module is used for when the triggering frequency of functional item is less than the first frequency threshold value, and confirmation functional item is target function to be detected Energy.
In some embodiments, device for testing functions further include: the second acquisition submodule and second processing submodule.Its In, the second acquisition submodule is used to obtain several informations of preset third party's user terminal;Second processing submodule is used for Test information is extracted in several informations according to preset sampling rule, wherein include Trigger Function item in test information Purpose message parameter.
In some embodiments, device for testing functions further include: first compares submodule and the second implementation sub-module.Its In, the first comparison submodule is for message parameter to be compared with test parameter, to judge whether message parameter can trigger Objective function;Second implementation sub-module is used for when message parameter can not trigger objective function, and confirmation is replaced using test parameter Change locating message parameter.
In some embodiments, device for testing functions further include: the first reading submodule, third processing submodule and the Three implementation sub-modules.Wherein, the first reading submodule is used for read test information;Third processing submodule is for calling and testing There is information the functional item operation test information of mapping relations to generate the first return information;Third implementation sub-module is used for the Tripartite's user terminal sends the first return information.
In some embodiments, device for testing functions further include: the first write-in submodule, first call submodule, the Four processing submodules and the 4th implementation sub-module.Wherein, the first write-in submodule is used to the test parameter preset test is written In information;First calls submodule to generate the second return information for invocation target function operation test information, wherein second time It include the internet protocol address of third party's user terminal in complex information;Fourth process submodule is used for the net in the second return information Network protocol address replaces with preset test network protocol address;4th implementation sub-module is used to send out to test network protocol address Send the second return information.
In some embodiments, device for testing functions further include: third acquisition submodule, the 5th processing submodule and the Five implementation sub-modules.Wherein, what the test terminal that third acquisition submodule is used to obtain test network protocol address characterization was sent Screenshot picture, wherein screenshot picture is the second return information in test terminal display;5th processing submodule will be for that will cut Picture face is input in preset image judgment models, to judge the mark of the operation result of screenshot picture and preset objective function Whether quasi- display picture is identical, wherein image judgment models are that training is to convergence state in advance, for whether judging different images Identical neural network model;5th implementation sub-module is used to obtain image judgment models classification results, and according to classification results Determine objective function whether normal operation.
In order to solve the above technical problems, the embodiment of the present invention also provides computer equipment.It is this referring specifically to Fig. 9, Fig. 9 Embodiment computer equipment basic structure block diagram.
As shown in figure 9, the schematic diagram of internal structure of computer equipment.The computer equipment includes being connected by system bus Processor, non-volatile memory medium, memory and network interface.Wherein, the non-volatile memories of the computer equipment are situated between Matter is stored with operating system, database and computer-readable instruction, can be stored with control information sequence in database, the computer When readable instruction is executed by processor, processor may make to realize a kind of function test method.The processor of the computer equipment For providing calculating and control ability, the operation of entire computer equipment is supported.It can be stored in the memory of the computer equipment There is computer-readable instruction, when which is executed by processor, processor may make to execute a kind of functional test Method.The network interface of the computer equipment is used for and terminal connection communication.It will be understood by those skilled in the art that showing in Fig. 9 Structure out, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme The restriction of computer equipment thereon, specific computer equipment may include than more or fewer components as shown in the figure, or Person combines certain components, or with different component layouts.
Processor obtains module 2100, processing module 2200 and execution module for executing in present embodiment in Fig. 8 2300 concrete function, program code and Various types of data needed for memory is stored with the above-mentioned module of execution.Network interface is used for To the data transmission between user terminal or server.Memory in present embodiment is stored with facial image critical point detection Program code needed for executing all submodules in device and data, server are capable of the program code and data of invoking server Execute the function of all submodules.
Computer equipment passes through the identity information for reading the objective function for needing to carry out functional test in application program, according to The identity information obtains test parameter corresponding with objective function, energy after which is performed in preset map listing Enough trigger the execution of objective function.Test parameter is written into test information, and application program is called according to read test information The thread of objective function executes the test instruction of test program characterization, and then completes the test to objective function.Pass through target function The test parameter of the objective function is searched in the identity information description of energy, and test parameter is directly write to preset test information It is middle to complete writing for test case, without manually writing to test case, function of application is realized by map listing Quick test, improve testing efficiency, reduce testing cost, effectively saved the development cost of application program.
The present invention also provides a kind of storage medium for being stored with computer-readable instruction, computer-readable instruction by one or When multiple processors execute, so that the step of one or more processors execute any of the above-described embodiment function test method.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, which can be stored in a computer-readable storage and be situated between In matter, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium above-mentioned can be The non-volatile memory mediums such as magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random storage note Recall body (Random Access Memory, RAM) etc..
It should be understood that although each step in the flow chart of attached drawing is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, execution sequence, which is also not necessarily, successively to be carried out, but can be with other At least part of the sub-step or stage of step or other steps executes in turn or alternately.

Claims (10)

1. a kind of function test method characterized by comprising
Obtain the identity information of objective function to be detected in application program;
The test parameter that there are mapping relations with the objective function is searched in preset map listing, wherein the test Parameter is to trigger the supplemental characteristic of the objective function, and the test parameter of all kinds of objective functions is recorded in the map listing;
The test parameter is written in preset test information, so that the application program executes after reading the test information The objective function.
2. function test method according to claim 1, which is characterized in that mesh to be detected in the acquisition application program Before the identity information for marking function, comprising:
Obtain the triggering frequency of each functional item in application program;
Successively the triggering frequency of the functional item is compared with preset first frequency threshold value;
When the triggering frequency of functional item is less than first frequency threshold value, confirm that the functional item is target to be detected Function.
3. function test method according to claim 2, which is characterized in that described that test parameter write-in is preset It tests in information, so that before executing the objective function after the application program reading test information, comprising:
Obtain several informations of preset third party's user terminal;
Test information is extracted in several informations according to preset sampling rule, wherein wrap in the test information Include the message parameter for triggering the functional item.
4. function test method according to claim 3, which is characterized in that described regular described according to preset sampling It extracts and is tested after information in several informations, comprising:
The message parameter is compared with the test parameter, to judge whether the message parameter can trigger the mesh Mark function;
When the message parameter can not trigger the objective function, confirmation replaces locating message ginseng using the test parameter Number.
5. function test method according to claim 3, which is characterized in that described regular described according to preset sampling It extracts and is tested after information in several informations, comprising:
Read the test information;
Calling with the test information there is the functional item of mapping relations, which to run the test information, generates the first return information;
First return information is sent to third party's user terminal.
6. function test method according to claim 5, which is characterized in that described that test parameter write-in is preset It tests in information, so that the application program reads and executes the objective function after the test information and include:
The test parameter is written in preset test information;
It calls the objective function to run the test information and generates the second return information, wherein in second return information Internet protocol address including third party's user terminal;
Internet protocol address in second return information is replaced with into preset test network protocol address;
Second return information is sent to the test network protocol address.
7. function test method according to claim 6, which is characterized in that described to be sent out to the test network protocol address After sending second return information, comprising:
Obtain the screenshot picture of the test terminal transmission of test network protocol address characterization, wherein the screenshot picture is Second return information is in the test terminal display;
The screenshot picture is input in preset image judgment models, to judge the screenshot picture and the preset mesh Whether the initial standard display for marking the operation result of function is identical, wherein described image judgment models are that training extremely restrains in advance State, for judging the whether identical neural network model of different images;
Described image judgment models classification results are obtained, and determine the objective function whether normal operation according to classification results.
8. a kind of device for testing functions characterized by comprising
Module is obtained, for obtaining the identity information of objective function to be detected in application program;
Processing module, for searching the test parameter that there are mapping relations with the objective function in preset map listing, Wherein, the test parameter is the supplemental characteristic for triggering the objective function, records all kinds of objective functions in the map listing Test parameter;
Execution module, for the test parameter to be written in preset test information, so that described in application program reading The objective function is executed after test information.
9. a kind of computer equipment, including memory and processor, it is stored with computer-readable instruction in the memory, it is described When computer-readable instruction is executed by the processor, so that the processor executes such as any one of claims 1 to 7 right It is required that the step of function test method.
10. a kind of storage medium for being stored with computer-readable instruction, the computer-readable instruction is handled by one or more When device executes, so that one or more processors execute the functional test side as described in any one of claims 1 to 7 claim The step of method.
CN201910198305.0A 2019-03-15 2019-03-15 Function test method, device, computer equipment and storage medium Pending CN110069397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910198305.0A CN110069397A (en) 2019-03-15 2019-03-15 Function test method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910198305.0A CN110069397A (en) 2019-03-15 2019-03-15 Function test method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110069397A true CN110069397A (en) 2019-07-30

Family

ID=67366215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910198305.0A Pending CN110069397A (en) 2019-03-15 2019-03-15 Function test method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110069397A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874326A (en) * 2019-11-21 2020-03-10 望海康信(北京)科技股份公司 Test case generation method and device, computer equipment and storage medium
CN112187561A (en) * 2020-08-19 2021-01-05 深圳市广和通无线股份有限公司 Communication module testing method, device, computer equipment and storage medium
CN112492294A (en) * 2019-09-12 2021-03-12 北京地平线机器人技术研发有限公司 Application program testing method, device and system, network camera and medium
CN113282490A (en) * 2021-05-17 2021-08-20 深圳Tcl新技术有限公司 Intelligent door lock testing method and electronic equipment
CN116192690A (en) * 2023-05-04 2023-05-30 华砺智行(武汉)科技有限公司 Method, system, equipment and medium for rapidly testing C-V2X equipment for surface vector production

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2255978A1 (en) * 1997-12-18 1999-06-18 Northern Telecom Limited Apparatus and method for generating model reference tests
CN103558473A (en) * 2013-11-06 2014-02-05 南车株洲电力机车研究所有限公司 Transducer field debugging system based on human-computer interaction interface and transducer field debugging method
CN104578418A (en) * 2015-01-06 2015-04-29 航天科工深圳(集团)有限公司 Configuration method and system of automatic power distribution equipment based on 101 protocols, and equipment
CN105429712A (en) * 2014-09-22 2016-03-23 惠州市德赛西威汽车电子股份有限公司 Laboratory simulation vehicle-mounted sound equipment RDS function test method
CN106201865A (en) * 2016-06-27 2016-12-07 乐视控股(北京)有限公司 A kind of application programming interface API method of testing, device and terminal unit
CN108664395A (en) * 2018-04-26 2018-10-16 武汉斗鱼网络科技有限公司 Applied program testing method, device, equipment and storage medium
CN108829587A (en) * 2018-05-29 2018-11-16 平安普惠企业管理有限公司 Test case parameter replacing method, device, computer equipment and storage medium
US20180349256A1 (en) * 2017-06-01 2018-12-06 Royal Bank Of Canada System and method for test generation
CN109062802A (en) * 2018-08-13 2018-12-21 深圳壹账通智能科技有限公司 A kind of method for testing software, computer readable storage medium and terminal device
CN109308254A (en) * 2017-07-28 2019-02-05 阿里巴巴集团控股有限公司 A kind of test method, device and test equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2255978A1 (en) * 1997-12-18 1999-06-18 Northern Telecom Limited Apparatus and method for generating model reference tests
CN103558473A (en) * 2013-11-06 2014-02-05 南车株洲电力机车研究所有限公司 Transducer field debugging system based on human-computer interaction interface and transducer field debugging method
CN105429712A (en) * 2014-09-22 2016-03-23 惠州市德赛西威汽车电子股份有限公司 Laboratory simulation vehicle-mounted sound equipment RDS function test method
CN104578418A (en) * 2015-01-06 2015-04-29 航天科工深圳(集团)有限公司 Configuration method and system of automatic power distribution equipment based on 101 protocols, and equipment
CN106201865A (en) * 2016-06-27 2016-12-07 乐视控股(北京)有限公司 A kind of application programming interface API method of testing, device and terminal unit
US20180349256A1 (en) * 2017-06-01 2018-12-06 Royal Bank Of Canada System and method for test generation
CN109308254A (en) * 2017-07-28 2019-02-05 阿里巴巴集团控股有限公司 A kind of test method, device and test equipment
CN108664395A (en) * 2018-04-26 2018-10-16 武汉斗鱼网络科技有限公司 Applied program testing method, device, equipment and storage medium
CN108829587A (en) * 2018-05-29 2018-11-16 平安普惠企业管理有限公司 Test case parameter replacing method, device, computer equipment and storage medium
CN109062802A (en) * 2018-08-13 2018-12-21 深圳壹账通智能科技有限公司 A kind of method for testing software, computer readable storage medium and terminal device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
冯瑶;孙骏亚;刘跃光;王智忠;: "基于交易日志的自动化测试技术在功能测试中的应用", 中国金融电脑, no. 11, 7 November 2018 (2018-11-07) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112492294A (en) * 2019-09-12 2021-03-12 北京地平线机器人技术研发有限公司 Application program testing method, device and system, network camera and medium
CN112492294B (en) * 2019-09-12 2024-03-26 北京地平线机器人技术研发有限公司 Application program testing method, device, system, network camera and medium
CN110874326A (en) * 2019-11-21 2020-03-10 望海康信(北京)科技股份公司 Test case generation method and device, computer equipment and storage medium
CN110874326B (en) * 2019-11-21 2023-10-27 望海康信(北京)科技股份公司 Test case generation method and device, computer equipment and storage medium
CN112187561A (en) * 2020-08-19 2021-01-05 深圳市广和通无线股份有限公司 Communication module testing method, device, computer equipment and storage medium
CN112187561B (en) * 2020-08-19 2022-05-27 深圳市广和通无线股份有限公司 Communication module testing method, device, computer equipment and storage medium
CN113282490A (en) * 2021-05-17 2021-08-20 深圳Tcl新技术有限公司 Intelligent door lock testing method and electronic equipment
CN116192690A (en) * 2023-05-04 2023-05-30 华砺智行(武汉)科技有限公司 Method, system, equipment and medium for rapidly testing C-V2X equipment for surface vector production

Similar Documents

Publication Publication Date Title
CN110069397A (en) Function test method, device, computer equipment and storage medium
CN106658672B (en) A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal
CN107872772B (en) Method and device for detecting fraud short messages
CN106804055B (en) A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal
EP3385919B1 (en) Method of processing passage record and device
CN106973384B (en) A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal
CN106534463A (en) Strange incoming call processing method, device, terminal and server
CN109902471A (en) Detection method, device, computer equipment and the storage medium of sliding block verifying
CN109145590A (en) A kind of function hook detection method, detection device and computer-readable medium
CN111815169A (en) Business approval parameter configuration method and device
CN109828906A (en) UI automated testing method, device, electronic equipment and storage medium
CN109889893A (en) Method for processing video frequency, device and equipment
CN110288755A (en) The invoice method of inspection, server and storage medium based on text identification
CN111223015B (en) Course recommendation method and device and terminal equipment
CN109194689A (en) Abnormal behaviour recognition methods, device, server and storage medium
CN109740834A (en) Workflow engine control method, device, computer equipment and storage medium
CN108764369B (en) Figure identification method and device based on data fusion and computer storage medium
CN110119354A (en) Method for testing software, device and electronic equipment based on Test cases technology
CN110399933A (en) Data mark modification method, device, computer-readable medium and electronic equipment
CN111079499B (en) Writing content identification method and system in learning environment
CN103380443A (en) Object information provision device, object information provision system, terminal, and object informaiton provision method
CN107402720A (en) A kind of processing method of hard disk, device and terminal
CN110297764A (en) Loophole test model training method and device
CN109408304A (en) Block chain introduces test method, device, equipment and readable storage medium storing program for executing
CN110060071A (en) Information of real estate verification method, device, equipment and computer readable storage 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