CN106294146B - Parameter replacement test method and device - Google Patents

Parameter replacement test method and device Download PDF

Info

Publication number
CN106294146B
CN106294146B CN201610644654.7A CN201610644654A CN106294146B CN 106294146 B CN106294146 B CN 106294146B CN 201610644654 A CN201610644654 A CN 201610644654A CN 106294146 B CN106294146 B CN 106294146B
Authority
CN
China
Prior art keywords
parameter
replacement
link
logic
macroparameter
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.)
Expired - Fee Related
Application number
CN201610644654.7A
Other languages
Chinese (zh)
Other versions
CN106294146A (en
Inventor
李璇
赵粲
柳亚政
周盛
董亚卫
潘柏宇
王冀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Heyi Intelligent Technology (shenzhen) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Heyi Intelligent Technology (shenzhen) Co Ltd filed Critical Heyi Intelligent Technology (shenzhen) Co Ltd
Priority to CN201610644654.7A priority Critical patent/CN106294146B/en
Publication of CN106294146A publication Critical patent/CN106294146A/en
Application granted granted Critical
Publication of CN106294146B publication Critical patent/CN106294146B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

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)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to a kind of parameter replacement test method and devices.The parameter replacement test method, comprising: obtain the parameter request link that at least one includes macroparameter to be replaced;According to parameter replace logic, respectively to each parameter request link include macroparameter carry out parameter replacement, obtain include alternative parameter each parameter return link;Each parameter is returned to the alternative parameter parameter preset corresponding with parameter replacement logic that link includes to be compared, each parameter is obtained and returns to the corresponding replacement result of link;The corresponding replacement of link is returned according to each parameter as a result, determining whether the parameter replacement logic can operate normally.The parameter replacement test method of the embodiment of the present invention can be improved the testing efficiency of parameter replacement logic.

Description

Parameter replacement test method and device
Technical field
The present invention relates to computer field more particularly to a kind of parameter replacement test method and devices.
Background technique
It is carried out in advertisement delivery system and third-party DSP (Demand-Side Platform, party in request's platform) system In interactive process, for the ease of statistical data, dsp system launches request in the advertisement for receiving advertisement delivery system transmission Afterwards, the link including macroparameter to be replaced is sent to advertisement delivery system.Advertisement delivery system is carrying out parameter to macroparameter After replacement, the link including alternative parameter is sent to dsp system.
Currently, the test to parameter replacement logic, the method for generalling use manual testing.Third party is triggered by staff Such as dsp system sends the link including macroparameter to be replaced, and after completing parameter replacement, checks chain by staff Connect including alternative parameter it is whether correct.But manual testing's parameter replaces logical comparison time-consuming, it cannot be guaranteed that the coverage rate of test, The regression test time is also long.
Summary of the invention
Technical problem
In view of this, how the technical problem to be solved by the present invention is to improve the testing efficiency of parameter replacement logic.
Solution
In order to solve the above-mentioned technical problem, an embodiment according to the present invention provides a kind of parameter replacement test method, Include:
Obtain the parameter request link that at least one includes macroparameter to be replaced;
Logic is replaced according to parameter, the macroparameter for including to the link of each parameter request respectively carries out parameter replacement, is wrapped Each parameter for including alternative parameter returns to link;
Each parameter is returned to the alternative parameter parameter preset corresponding with parameter replacement logic that link includes to compare Compared with obtaining each parameter and return to link corresponding replacement result;
The corresponding replacement of link is returned according to each parameter as a result, determining whether the parameter replacement logic can be normal Operation.
For the above method, in one possible implementation, logic is replaced according to parameter, respectively to each parameter request Macroparameter that link includes carries out parameter replacement, obtains including that each parameter of alternative parameter is returned and linked, comprising:
Each parameter request is found respectively links the corresponding identification information of macroparameter for including;
Logic and the identification information are replaced according to parameter, the macroparameter that the link of each parameter request includes is replaced with into replacement Parameter, obtain include alternative parameter each parameter return link.
For the above method, in one possible implementation, each parameter is returned into the replacement that link includes and is joined Several parameter presets corresponding with parameter replacement logic are compared, obtain each parameter return link it is corresponding replace as a result, Include:
Each parameter is returned to the alternative parameter parameter preset corresponding with parameter replacement logic that link includes to compare Compared in alternative parameter situation identical with the parameter preset, the replacement result is to be replaced successfully;Or,
Each parameter is returned to the alternative parameter parameter preset corresponding with parameter replacement logic that link includes to compare Compared under the alternative parameter and the different situation of the parameter preset, the replacement result is replacement failure.
For the above method, in one possible implementation, is returned according to each parameter and link corresponding replacement As a result, determining whether the parameter replacement logic can operate normally, comprising:
In the case where each parameter returns and links corresponding replacement result to be replaced successfully, the parameter replacement logic can It operates normally;Or,
In the case where each parameter returns and links corresponding replacement result in the presence of replacement failure, the parameter replacement logic is not It can operate normally.
For the above method, in one possible implementation, obtaining at least one includes macroparameter to be replaced Parameter request link, comprising:
In the case where finding that the code of system to be tested is updated, triggers each parameter request and link corresponding business Hyperlink request, to obtain the parameter request link that at least one includes macroparameter to be replaced.
In order to solve the above-mentioned technical problem, according to another embodiment of the present invention, a kind of parameter replacement test dress is provided It sets, comprising:
Module is obtained, for obtaining the parameter request link that at least one includes macroparameter to be replaced;
Replacement module is connect with the acquisition module, for replacing logic according to parameter, is linked respectively to each parameter request Including macroparameter carry out parameter replacement, obtain include alternative parameter each parameter return link;
Comparison module is connect with the replacement module, for by each parameter return alternative parameter that link includes with The corresponding parameter preset of parameter replacement logic is compared, and is obtained each parameter and is returned to the corresponding replacement result of link;
Determining module is connect with the comparison module, for returning to the corresponding replacement of link according to each parameter as a result, Determine whether the parameter replacement logic can operate normally.
For above-mentioned apparatus, in one possible implementation, the replacement module, comprising:
Searching unit links the corresponding identification information of macroparameter for including for finding each parameter request respectively;
Replacement unit is connect with the searching unit, for replacing logic and the identification information according to parameter, by each ginseng The number hyperlink requests macroparameter that includes replaces with alternative parameter, obtains including that each parameter of alternative parameter is returned and linked.
For above-mentioned apparatus, in one possible implementation, the comparison module, comprising:
First comparing unit, it is corresponding with parameter replacement logic for each parameter to be returned to the alternative parameter that link includes Parameter preset be compared, in alternative parameter situation identical with the parameter preset, the replacement result be for Change function into;And/or
Second comparing unit, it is corresponding with parameter replacement logic for each parameter to be returned to the alternative parameter that link includes Parameter preset be compared, in the alternative parameter and the different situation of the parameter preset, the replacement result is Replacement failure.
For above-mentioned apparatus, in one possible implementation, the determining module, comprising:
First determination unit, in the case where each parameter returns and links corresponding replacement result to be replaced successfully, institute Stating parameter replacement logic can operate normally;And/or
Second determination unit is used in the case where each parameter returns to the corresponding replacement result of link and fails in the presence of replacement, The parameter replacement logic can not operate normally.
For above-mentioned apparatus, in one possible implementation, the acquisition module is specifically used for
In the case where finding that the code of system to be tested is updated, triggers each parameter request and link corresponding business Hyperlink request, to obtain the parameter request link that at least one includes macroparameter to be replaced.
Beneficial effect
The parameter replacement test method of the embodiment of the present invention, according to parameter replace logic to parameter request link include to The macroparameter of replacement carries out parameter replacement, generates the parameter including alternative parameter and returns to link, and is returned and linked according to each parameter Corresponding replacement can be improved the survey of parameter replacement logic as a result, determine whether parameter replacement logic can operate normally Try efficiency.
Further, the parameter replacement test method of the embodiment of the present invention, can be applied to replace various types of parameters It changes logic to be tested, a large amount of parameter replacement scene can be simulated, increase the coverage rate of test, ensure that parameter replacement is patrolled The quality collected.
Further, in the case where the code of system is updated, there can be each third party interacted to system The parameter request link of transmission is tested, and testing efficiency can be greatly improved, shorten the regression test time, eliminate code update Influence to parameter replacement logic.
According to below with reference to the accompanying drawings becoming to detailed description of illustrative embodiments, other feature of the invention and aspect It is clear.
Detailed description of the invention
Including in the description and constitute the attached drawing of part of specification and specification together illustrate it is of the invention Exemplary embodiment, feature and aspect, and principle for explaining the present invention.
Fig. 1 shows the flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 2 shows another flow charts of parameter replacement test method according to an embodiment of the invention;
Fig. 3 shows another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 4 shows another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 5 shows another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 6 shows another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 7 shows another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 8 shows the structural block diagram of parameter replacement test device according to another embodiment of the present invention;
Fig. 9 shows another structural block diagram of parameter replacement test device according to another embodiment of the present invention;
Figure 10 shows another structural block diagram of parameter replacement test device according to another embodiment of the present invention;
Figure 11 shows another structural block diagram of parameter replacement test device according to another embodiment of the present invention;
Figure 12 shows the structural block diagram of parameter replacement test equipment according to another embodiment of the present invention.
Specific embodiment
Below with reference to attached drawing various exemplary embodiments, feature and the aspect that the present invention will be described in detail.It is identical in attached drawing Appended drawing reference indicate element functionally identical or similar.Although the various aspects of embodiment are shown in the attached drawings, remove It non-specifically points out, it is not necessary to attached drawing drawn to scale.
Dedicated word " exemplary " means " being used as example, embodiment or illustrative " herein.Here as " exemplary " Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
In addition, in order to better illustrate the present invention, numerous details is given in specific embodiment below. It will be appreciated by those skilled in the art that without certain details, the present invention equally be can be implemented.In some instances, for Method, means, element and circuit well known to those skilled in the art are not described in detail, in order to highlight purport of the invention.
Embodiment 1
Fig. 1 shows the flow chart of parameter replacement test method according to an embodiment of the invention.As shown in Figure 1, the parameter Replacement test method, specifically includes that
Step 101 obtains the parameter request link that at least one includes macroparameter to be replaced;
Step 102 replaces logic according to parameter, and the macroparameter for including to the link of each parameter request respectively carries out parameter and replaces Change, obtain include alternative parameter each parameter return link;
Each parameter is returned to the alternative parameter default ginseng corresponding with parameter replacement logic that link includes by step 103 Number is compared, and is obtained each parameter and is returned to the corresponding replacement result of link;
Step 104 returns to the corresponding replacement of link according to each parameter as a result, whether determining the parameter replacement logic It can operate normally.
The macroparameter of the embodiment of the present invention may include needing various types of batch parameters for replacing, and alternative parameter can be with Including replacing the parameter for corresponding macroparameter to be replaced that logic obtains according to parameter, the present embodiment does not limit macro ginseng Several and alternative parameter concrete type.Wherein, macro (Macro) can be it is a kind of rule or mode or grammer replacement, for saying How bright a certain specific input (usually character string) according to predefined rule is converted into corresponding output (generally also character String).This replacement is carried out in precompile, referred to as macro expansion.
Specifically, macroparameter can be realized by the macrodefinition with parameter.The general type of macrodefinition with parameter is such as Under: #define<macro name>(<parameter list>)<macro body>.Wherein,<macro name>is an identifier, and the parameter in<parameter list>can be with One, be also possible to it is multiple, it is depending on the circumstances.<macro body>is the character string being replaced, and the character string in macro body is The expression formula being made of the parameters in parameter list.
Parameter request link may include in system and third-party interactive process, required for third party is in order to obtain Statistical data, for example, Mac (Medium Access Control, hardware address) address, IP (Internet Protocol, net Network agreement) address etc., and the link for being used to obtain various types of parameters sent to system.Parameter returns to link After being replaced according to parameter replacement logic to the macroparameter that parameter request link includes, the use including alternative parameter of generation In returning to third-party link.Wherein, link can be used to Transfer Parameters and control command, and they are formed one can hold Capable overall process.Specifically, link can indicate the connection relationship that a target is directed toward from a webpage, pointed target It may include another webpage, also may include the different location in same web page, can also include picture, Email Location, file, application program etc..
As an example of the invention, advertisement delivery system needs to throw the advertisement of third party's such as dsp system.? In the case that user sends advertisement dispensing request, advertisement delivery system sends solicited message to dsp system, and dsp system is receiving After solicited message, response message is returned.Parameter request in response message including dsp system links.Advertisement delivery system exists Receive dsp system parameter request link after, including macroparameter replacement, generate parameter return link simultaneously is sent to Dsp system.Wherein, solicited message and response message can be for example, by JSON (JavaScript Object Notation) Data are realized.
In one possible implementation, as shown in Fig. 2, logic is replaced according to parameter, respectively to each parameter request chain Connect including macroparameter carry out parameter replacement, obtain including that each parameter of alternative parameter returns and links (step 102), specifically can be with Include:
Step 201 finds the corresponding identification information of macroparameter that each parameter request link includes respectively;
Step 202 replaces logic and the identification information according to parameter, and the macroparameter that the link of each parameter request includes is replaced Be changed to alternative parameter, obtain include alternative parameter each parameter return link.
The embodiment of the present invention does not limit the specific number of macroparameter, for example, parameter request link may include a macro ginseng Number, also may include multiple macroparameters.In the case where parameter request link includes multiple macroparameters, each macro ginseng can be found The corresponding identification information of number, for example, the address of the title of macroparameter, macroparameter, number of macroparameter etc., it is not limited here.
As an example of the invention, in the case where advertisement delivery system receives parameter request link, according to example As the title of macroparameter finds macroparameter.For example, parameter request links are as follows: http://www.sina.com.cn/ Yes/90003? mac=MAC, wherein MAC is exactly macroparameter.Then, advertisement delivery system replaces logic according to parameter, by this Macroparameter replaces with the address Mac of the equipment of advertisement dispensing, such as 40-A8-F0-45-90-0B, and generating includes the address Mac Does parameter return to link, such as http://www.sina.com.cn/yes/90003? mac=40-A8-F0-45-90-0B.
In one possible implementation, as shown in figure 3, by each parameter return alternative parameter that link includes with The corresponding parameter preset of parameter replacement logic is compared, and is obtained each parameter and is returned to the corresponding replacement result (step of link 103) it, can specifically include:
Each parameter is returned to the alternative parameter default ginseng corresponding with parameter replacement logic that link includes by step 301 Number is compared, and in alternative parameter situation identical with the parameter preset, the replacement result is to be replaced successfully; Or,
Each parameter is returned to the alternative parameter default ginseng corresponding with parameter replacement logic that link includes by step 302 Number is compared, and under the alternative parameter and the different situation of the parameter preset, the replacement result is replacement failure.
In one possible implementation, it is tied as shown in figure 4, being returned according to each parameter and linking corresponding replacement Fruit, determines whether the parameter replacement logic can operate normally, comprising:
Step 401, in the case where each parameter returns to that link corresponding replacement result be to be replaced successfully, the parameter is replaced Logic can operate normally;Or,
Step 402, in the case where each parameter returns and links corresponding replacement result and there is replacement and fail, the parameter is replaced Changing logic can not operate normally.
It should be noted that parameter replacement logic can be parameter return link institute that is pre-designed, therefore generating Including alternative parameter should usually follow parameter replacement logic.Further, parameter the included replacement of link is returned to join Several and parameter preset is compared, and in alternative parameter situation identical with parameter preset, illustrates that the parameter generated returns to link Included alternative parameter follows parameter replacement logic, and parameter is replaced successfully.In alternative parameter and the different feelings of parameter preset Under condition, illustrate that the parameter generated returns to the included alternative parameter of link and do not follow parameter replacement logic, parameter replacement failure.
As an example of the invention, as shown in Figure 5 and Figure 6, the detailed process of parameter replacement test method is as follows:
S1, different parameter request links is placed in the same array, such as in array A.Specifically, it is wrapped in array A Each parameter request link included can be used for test parameter replacement logic.The parameter request for including in the unlimited fixed number group A of this example The number and type of link.In general, parameter request link for test parameter replacement logic number is more, type more Extensively, the test of parameter replacement logic is more accurate.
S2, this example do not limit each parameter request and link the specific order tested, for example, it may be serial survey Examination is successively read the parameter request link in array A included, links progress parameter replacement to each parameter request respectively and surveys Examination;It is also possible to concurrent testing, the whole parameter requests for including in array A are linked while carries out parameter replacement test.Wherein, Serially test can realize that concurrent testing can pass through the parameter replacement test of multithreading by the parameter replacement test of single thread It realizes.
S3, it checks whether the link obtained is the parameter request link for including in array A, is not belonging to count in the link of acquisition In the case where group A, it is considered as the parameter request link in array A included and has been completed.Simultaneously, it means that before this It is to be replaced successfully that each parameter, which returns and links corresponding replacement result, and further, parameter replacement logic can be transported normally Row (step S6).In the case where the link of acquisition belongs to array A, continues the link to the acquisition and execute step S4.
S4, parameter replacement test is executed.Specifically, in step s 4, as shown in fig. 6, further including following sub-step:
S41, the parameter request for including macroparameter to be replaced is linked, logic is replaced according to parameter and carries out parameter replacement. For example, linking for parameter request, advertisement delivery system is according to the title such as Mac address search of macroparameter to macroparameter.So Afterwards, logic is replaced according to parameter, which is replaced with to the address Mac of the equipment of advertisement dispensing, such as 40-A8-F0-45- 90-0B further generates the parameter including the address Mac and returns to link.
S42, inspection parameter return to whether link replaces correctly.For example, in step S41, advertisement delivery system is by parameter The address the Mac 40-A8-F0-45-90-0B that link includes is returned to be compared with the address Mac for the equipment actually launched.
If the address Mac of S43, the practical equipment launched of advertisement is 40-A8-F0-45-90-0B, pass through the ratio of step S42 Compared with the alternative parameter that discovery parameter return link includes is identical as parameter preset, then parameter is replaced successfully.
If the address Mac of S44, the practical equipment launched of advertisement is 40-A8-F0-45-80-0A, pass through the ratio of step S42 Compared with discovery parameter returns the alternative parameter that link includes and parameter preset is not identical, then parameter replacement failure.
S5, judge whether parameter replacement test succeeds.Returning to the corresponding replacement result of link in the parameter currently tested is In the case where being replaced successfully, step S2 is executed, obtains next parameter request link to be tested in array A.It is tested currently Parameter return and link in the case that corresponding replacement result is replacement failure, further, parameter replacement logic can not be just Often operation (step S7).
In one possible implementation, as shown in fig. 7, obtaining the parameter that at least one includes macroparameter to be replaced Hyperlink request (step 101), comprising:
Step 701, in the case where finding that the code of system to be tested is updated, trigger each parameter request link pair The service request link answered, to obtain the parameter request link that at least one includes macroparameter to be replaced.
In embodiments of the present invention, by triggering service request link, service request can be sent to third party, to draw Play third party's return parameters hyperlink request.As an example of the invention, the advertisement by triggering advertisement delivery system is launched Hyperlink request (service request link), advertisement delivery system can send advertisement to third party's such as dsp system and launch request.Into One step, dsp system sends replacement Mac Address requests connection after receiving advertisement and launching request, to advertisement delivery system (parameter request link).
Specifically, the parameter replacement test method of the embodiment of the present invention can be packaged into test module.Further, may be used To write test platform for example, by Robot Framework frame, test module is called to link parameter request to be tested It is tested.Wherein, Robot Framework is the Function Test Automation frame that a Python writes, and is had good Scalability, support crucial word drive, a plurality of types of clients or interface can be tested simultaneously, distribution can be carried out Test execution.
Further, it is also possible to the case where monitoring continuous integrating by Jenkins.What the code of system to be tested was updated In the case of, it triggers each parameter request and links corresponding service request link, include macroparameter to be replaced to obtain at least one Parameter request link.When the modification of system is compared more frequently, a large amount of testing time can be saved.Wherein, Jenkins is based on a kind of continuous integrating tool of Java exploitation, and for monitoring persistently duplicate work, function may include holding Continuous software version publication/test item, and the work that monitoring external call executes.
The parameter replacement test method of the embodiment of the present invention, according to parameter replace logic to parameter request link include to The macroparameter of replacement carries out parameter replacement, generates the parameter including alternative parameter and returns to link, and is returned and linked according to each parameter Corresponding replacement can be improved the survey of parameter replacement logic as a result, determine whether parameter replacement logic can operate normally Try efficiency.
Further, the parameter replacement test method of the embodiment of the present invention, can be applied to replace various types of parameters It changes logic to be tested, a large amount of parameter replacement scene can be simulated, increase the coverage rate of test, ensure that parameter replacement is patrolled The quality collected.
Further, in the case where the code of system is updated, there can be each third party interacted to system The parameter request link of transmission is tested, and testing efficiency can be greatly improved, shorten the regression test time, eliminate code update Influence to parameter replacement logic.
Embodiment 2
Fig. 8 shows the structural block diagram of parameter replacement test device according to another embodiment of the present invention.As shown in figure 8, should Parameter replacement test device specifically includes that and obtains module 11, for obtaining the parameter that at least one includes macroparameter to be replaced Hyperlink request.Replacement module 13 is connect with the acquisition module 11, for replacing logic according to parameter, is asked respectively to each parameter The macroparameter of asking link to include carries out parameter replacement, obtains including that each parameter of alternative parameter is returned and linked.Comparison module 15, with The replacement module 13 connects, corresponding with parameter replacement logic for each parameter to be returned to the alternative parameter that link includes Parameter preset is compared, and is obtained each parameter and is returned to the corresponding replacement result of link.Determining module 17, the mould compared with described Block 15 connects, for returning to the corresponding replacement of link according to each parameter as a result, determining that the parameter replacement logic whether can It is enough to operate normally.Concrete principle and example may refer to embodiment 1 and the associated description of Fig. 1.
In one possible implementation, as shown in figure 9, the replacement module 13, comprising: searching unit 131 is used for Each parameter request is found respectively links the corresponding identification information of macroparameter for including.Replacement unit 133, with the searching unit 131 connections replace with the macroparameter that the link of each parameter request includes for replacing logic and the identification information according to parameter Alternative parameter, obtain include alternative parameter each parameter return link.Concrete principle and example may refer to embodiment 1 and figure 2 associated description.
In one possible implementation, as shown in Figure 10, the comparison module 15, comprising: the first comparing unit 151, compare for each parameter to be returned to the alternative parameter parameter preset corresponding with parameter replacement logic that link includes Compared in alternative parameter situation identical with the parameter preset, the replacement result is to be replaced successfully;And/or second Comparing unit 153, for each parameter to be returned to the alternative parameter default ginseng corresponding with parameter replacement logic that link includes Number is compared, and under the alternative parameter and the different situation of the parameter preset, the replacement result is replacement failure. Concrete principle and example may refer to embodiment 1 and the associated description of Fig. 3.
In one possible implementation, as shown in figure 11, the determining module 17, comprising: the first determination unit 171, in the case where each parameter returns and links corresponding replacement result to be replaced successfully, the parameter replacement logic can It operates normally;And/or second determination unit 173, fail for returning to link corresponding replacement result and there is replacement in each parameter In the case where, the parameter replacement logic can not operate normally.Concrete principle and example may refer to embodiment 1 and Fig. 4, The associated description of Fig. 5 and Fig. 6.
In one possible implementation, the acquisition module, specifically in the code for finding system to be tested In the case where being updated, triggers each parameter request and link corresponding service request link, include wait replace to obtain at least one The parameter request for the macroparameter changed links.Concrete principle and example may refer to embodiment 1 and the associated description of Fig. 7.
The parameter replacement test device of the embodiment of the present invention, according to parameter replace logic to parameter request link include to The macroparameter of replacement carries out parameter replacement, generates the parameter including alternative parameter and returns to link, and is returned and linked according to each parameter Corresponding replacement can be improved the survey of parameter replacement logic as a result, determine whether parameter replacement logic can operate normally Try efficiency.
Further, the parameter replacement test device of the embodiment of the present invention, can be applied to replace various types of parameters It changes logic to be tested, a large amount of parameter replacement scene can be simulated, increase the coverage rate of test, ensure that parameter replacement is patrolled The quality collected.
Further, in the case where the code of system is updated, there can be each third party interacted to system The parameter request link of transmission is tested, and testing efficiency can be greatly improved, shorten the regression test time, eliminate code update Influence to parameter replacement logic.
Embodiment 3
Figure 12 shows the structural block diagram of parameter replacement test equipment according to another embodiment of the present invention.The parameter replacement Test equipment 1100 can be the host server for having computing capability, personal computer PC or portable portable meter Calculation machine or terminal etc..The specific embodiment of the invention does not limit the specific implementation of calculate node.
The parameter replacement test equipment 1100 includes processor (processor) 1110, communication interface (Communications Interface) 1120, memory (memory) 1130 and bus 1140.Wherein, processor 1110, Communication interface 1120 and memory 1130 pass through bus 1140 and complete mutual communication.
Communication interface 1120 is used for and network device communications, and wherein the network equipment includes such as Virtual Machine Manager center, is total to Enjoy storage etc..
Processor 1110 is for executing program.Processor 1110 may be a central processor CPU or dedicated collection At circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement the present invention One or more integrated circuits of embodiment.
Memory 1130 is for storing file.Memory 1130 may include high speed RAM memory, it is also possible to further include non- Volatile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 1130 is also possible to deposit Memory array.Memory 1130 is also possible to by piecemeal, and described piece can be combined into virtual volume by certain rule.
In a kind of possible embodiment, above procedure can be the program code for including computer operation instruction.The journey Sequence is particularly used in: realizing each step in embodiment 1.
Those of ordinary skill in the art may be aware that each exemplary cell and algorithm in embodiment described herein Step can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions actually with hardware also It is software form to realize, the specific application and design constraint depending on technical solution.Professional technician can be directed to It is specific that described function is realized using different methods is selected, but this realization is it is not considered that exceed model of the invention It encloses.
If realizing the function and when sold or used as an independent product in the form of computer software, To a certain extent it is believed that all or part (such as the part that contributes to existing technology) of technical solution of the present invention is It embodies in form of a computer software product.The computer software product is generally stored inside computer-readable non-volatile In storage medium, including some instructions are used so that computer equipment (can be personal computer, server or network to set It is standby etc.) execute all or part of the steps of various embodiments of the present invention method.And storage medium above-mentioned include USB flash disk, mobile hard disk, Read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic The various media that can store program code such as dish or CD.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (10)

1. a kind of parameter replacement test method characterized by comprising
Obtain the parameter request link that at least one includes macroparameter to be replaced;
Logic is replaced according to parameter, the macroparameter for including to the link of each parameter request respectively carries out parameter replacement, obtains including replacing Each parameter for changing parameter returns to link;
Each parameter is returned to the alternative parameter parameter preset corresponding with parameter replacement logic that link includes to be compared, is obtained It is returned to each parameter and links corresponding replacement result;
The corresponding replacement of link is returned according to each parameter as a result, determining whether the parameter replacement logic can normally transport Row.
2. the method according to claim 1, wherein logic is replaced according to parameter, respectively to each parameter request chain Connect including macroparameter carry out parameter replacement, obtain include alternative parameter each parameter return link, comprising:
Each parameter request is found respectively links the corresponding identification information of macroparameter for including;
Logic and the identification information are replaced according to parameter, the macroparameter that the link of each parameter request includes is replaced with into replacement ginseng Number, obtain include alternative parameter each parameter return link.
3. the method according to claim 1, wherein by each parameter return alternative parameter that link includes with The corresponding parameter preset of parameter replacement logic is compared, and is obtained each parameter and is returned to the corresponding replacement result of link, comprising:
Each parameter is returned to the alternative parameter parameter preset corresponding with parameter replacement logic that link includes to be compared, In alternative parameter situation identical with the parameter preset, the replacement result is to be replaced successfully;Or,
Each parameter is returned to the alternative parameter parameter preset corresponding with parameter replacement logic that link includes to be compared, Under the alternative parameter and the different situation of the parameter preset, the replacement result is replacement failure.
4. according to the method described in claim 3, being tied it is characterized in that, being returned according to each parameter and linking corresponding replacement Fruit, determines whether the parameter replacement logic can operate normally, comprising:
In the case where each parameter returns and links corresponding replacement result to be replaced successfully, the parameter replacement logic can be normal Operation;Or,
In the case where each parameter returns and links corresponding replacement result in the presence of replacement failure, the parameter replacement logic can not It operates normally.
5. method according to claim 1 to 4, which is characterized in that it includes to be replaced for obtaining at least one The parameter request of macroparameter links, comprising:
In the case where finding that the code of system to be tested is updated, triggers each parameter request and link corresponding service request Link, to obtain the parameter request link that at least one includes macroparameter to be replaced.
6. a kind of parameter replacement test device characterized by comprising
Module is obtained, for obtaining the parameter request link that at least one includes macroparameter to be replaced;
Replacement module is connect with the acquisition module, for replacing logic according to parameter, includes to the link of each parameter request respectively Macroparameter carry out parameter replacement, obtain include alternative parameter each parameter return link;
Comparison module is connect with the replacement module, for each parameter to be returned to the alternative parameter and parameter that link includes The corresponding parameter preset of replacement logic is compared, and is obtained each parameter and is returned to the corresponding replacement result of link;
Determining module is connect with the comparison module, for returning to the corresponding replacement of link as a result, determining according to each parameter Whether the parameter replacement logic can operate normally.
7. device according to claim 6, which is characterized in that the replacement module, comprising:
Searching unit links the corresponding identification information of macroparameter for including for finding each parameter request respectively;
Replacement unit is connect with the searching unit, and for replacing logic and the identification information according to parameter, each parameter is asked The macroparameter for asking link to include replaces with alternative parameter, obtain include alternative parameter each parameter return link.
8. device according to claim 6, which is characterized in that the comparison module, comprising:
First comparing unit, the alternative parameter and parameter replacement logic for including by each parameter return link are corresponding pre- Setting parameter is compared, and in alternative parameter situation identical with the parameter preset, the replacement result is to be substituted for Function;And/or
Second comparing unit, the alternative parameter and parameter replacement logic for including by each parameter return link are corresponding pre- Setting parameter is compared, and under the alternative parameter and the different situation of the parameter preset, the replacement result is replacement Failure.
9. device according to claim 8, which is characterized in that the determining module, comprising:
First determination unit, in the case where each parameter returns and links corresponding replacement result to be replaced successfully, the ginseng Number replacement logic can operate normally;And/or
Second determination unit is used in the case where each parameter returns to the corresponding replacement result of link and fails in the presence of replacement, described Parameter replacement logic can not operate normally.
10. device according to any one of claims 6 to 9, which is characterized in that the acquisition module is specifically used for
In the case where finding that the code of system to be tested is updated, triggers each parameter request and link corresponding service request Link, to obtain the parameter request link that at least one includes macroparameter to be replaced.
CN201610644654.7A 2016-08-09 2016-08-09 Parameter replacement test method and device Expired - Fee Related CN106294146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610644654.7A CN106294146B (en) 2016-08-09 2016-08-09 Parameter replacement test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610644654.7A CN106294146B (en) 2016-08-09 2016-08-09 Parameter replacement test method and device

Publications (2)

Publication Number Publication Date
CN106294146A CN106294146A (en) 2017-01-04
CN106294146B true CN106294146B (en) 2019-02-12

Family

ID=57666415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610644654.7A Expired - Fee Related CN106294146B (en) 2016-08-09 2016-08-09 Parameter replacement test method and device

Country Status (1)

Country Link
CN (1) CN106294146B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344045A (en) * 2018-07-27 2019-02-15 阿里巴巴集团控股有限公司 Operation system switching method, device, electronic equipment and storage medium
CN110134606A (en) * 2019-05-17 2019-08-16 广州品唯软件有限公司 A kind of app automatic checking method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5737592A (en) * 1995-06-19 1998-04-07 International Business Machines Corporation Accessing a relational database over the Internet using macro language files
CN101495998A (en) * 2005-08-19 2009-07-29 微软公司 Encoding of markup-language data
CN102984737A (en) * 2012-12-21 2013-03-20 大唐移动通信设备有限公司 Unified parameter configuration method and device for wireless network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5737592A (en) * 1995-06-19 1998-04-07 International Business Machines Corporation Accessing a relational database over the Internet using macro language files
CN101495998A (en) * 2005-08-19 2009-07-29 微软公司 Encoding of markup-language data
CN102984737A (en) * 2012-12-21 2013-03-20 大唐移动通信设备有限公司 Unified parameter configuration method and device for wireless network

Also Published As

Publication number Publication date
CN106294146A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN106503308B (en) A kind of CAN controller IP verification platform based on UVM
CN104541247B (en) System and method for adjusting cloud computing system
CN107395659A (en) A kind of method and device of service handling and common recognition
CN110347596A (en) A kind of test method, device, system, electronic equipment and medium
CN109302522A (en) Test method, device and computer system and medium
CN105450476B (en) A kind of regression test system and test method
CN110430100A (en) Network connectivty detection method and device
CN110046101A (en) Page automated testing method, device and computer storage medium
CN109656806A (en) A kind of the playback test method and device of interface data
CN106776280A (en) Configurable performance test device
CN109634718A (en) The method and system of cloud platform creation mirror image
CN109815119A (en) A kind of test method and device of APP link channel
CN109743222A (en) A kind of data test method and relevant device
CN110347593A (en) Flow testing method and device
CN108052444A (en) A kind of method and apparatus of performance test for mobile application
CN109684150A (en) Store Performance Test System, test method and the emulation platform of Grain size controlling device
CN106294146B (en) Parameter replacement test method and device
CN107133160A (en) Test system
CN107360036A (en) A kind of network failure locating method, terminal and server
CN106201852A (en) A kind of distributed test method and test system
CN107070719A (en) A kind of device management method and device
CN106549827A (en) The detection method and device of network state
CN111988156B (en) Method for creating network simulation platform, network simulation method and corresponding device
CN116974874A (en) Database testing method and device, electronic equipment and readable storage medium
CN110413287A (en) The dispositions method and device of software

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200519

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Alibaba (China) Co.,Ltd.

Address before: 518030, Sannuo building, 19L02, 3012 Binhai Avenue, Shenzhen, Guangdong, Nanshan District

Patentee before: HEYI INTELLIGENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190212

Termination date: 20200809