CN106294146A - Parameter replacement test method and device - Google Patents

Parameter replacement test method and device Download PDF

Info

Publication number
CN106294146A
CN106294146A CN201610644654.7A CN201610644654A CN106294146A CN 106294146 A CN106294146 A CN 106294146A CN 201610644654 A CN201610644654 A CN 201610644654A CN 106294146 A CN106294146 A CN 106294146A
Authority
CN
China
Prior art keywords
parameter
link
replacement
logic
alternative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610644654.7A
Other languages
Chinese (zh)
Other versions
CN106294146B (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 device.Described parameter replacement test method, including: obtain the link of at least one parameter request including macroparameter to be replaced;Replacing logic according to parameter, the macroparameter included the link of each parameter request respectively carries out parameter replacement, obtains including that each parameter of alternative parameter returns link;Described each parameter returns the parameter preset linking the alternative parameter included corresponding with parameter replacement logic compare, obtain described each parameter and return the replacement result that link is corresponding;Return, according to described each parameter, the replacement result that link is corresponding, determine whether described parameter replacement logic can be properly functioning.The parameter replacement test method of the embodiment of the present invention, it is possible to increase parameter replaces the testing efficiency of logic.

Description

Parameter replacement test method and device
Technical field
The present invention relates to computer realm, particularly relate to a kind of parameter replacement test method and device.
Background technology
Carry out in advertisement delivery system and third-party DSP (Demand-Side Platform, party in request's platform) system During Jiao Hu, for the ease of statistical data, dsp system asks it in the advertisement putting receiving advertisement delivery system transmission After, the link including macroparameter to be replaced is sent to advertisement delivery system.Advertisement delivery system is carrying out parameter to macroparameter After replacing it, the link including alternative parameter is sent to dsp system.
At present, parameter is replaced the test of logic, the method generally using manual testing.Third party is triggered by staff Such as dsp system sends and includes the link of macroparameter to be replaced, and completes after parameter replaces it, staff check chain Connect the alternative parameter included the most correct.But it is relatively time-consuming that manual testing's parameter replaces logic ratio, it is impossible to ensure the coverage rate of test, The regression test time is the most long.
Summary of the invention
Technical problem
In view of this, the technical problem to be solved in the present invention is, how to improve parameter and replaces the testing efficiency of logic.
Solution
In order to solve above-mentioned technical problem, according to one embodiment of the invention, it is provided that a kind of parameter replacement test method, Including:
Obtain the link of at least one parameter request including macroparameter to be replaced;
Replacing logic according to parameter, the macroparameter included the link of each parameter request respectively carries out parameter replacement, is wrapped The each parameter including alternative parameter returns link;
Described each parameter returns the parameter preset linking the alternative parameter included corresponding with parameter replacement logic compare Relatively, obtain described each parameter and return the replacement result that link is corresponding;
Return, according to described each parameter, the replacement result that link is corresponding, determine whether described parameter replacement logic can be normal Run.
For said method, in a kind of possible implementation, replace logic according to parameter, respectively to each parameter request The macroparameter that link includes carries out parameter replacement, obtains including that each parameter of alternative parameter returns link, including:
Find each parameter request respectively and link the identification information that the macroparameter included is corresponding;
Replace logic and described identification information according to parameter, the macroparameter that the link of each parameter request includes is replaced with replacement Parameter, obtains including that each parameter of alternative parameter returns link.
For said method, in a kind of possible implementation, described each parameter is returned the replacement ginseng that link includes The parameter preset that number replaces logic corresponding with parameter compares, and obtains described each parameter and returns the replacement result that link is corresponding, Including:
Described each parameter returns the parameter preset linking the alternative parameter included corresponding with parameter replacement logic compare Relatively, in the case of described alternative parameter is identical with described parameter preset, described replacement result is for being replaced successfully;Or,
Described each parameter returns the parameter preset linking the alternative parameter included corresponding with parameter replacement logic compare Relatively, in the case of described alternative parameter and described parameter preset differ, described replacement result is for replace unsuccessfully.
For said method, in a kind of possible implementation, return, according to described each parameter, the replacement that link is corresponding As a result, determine whether described parameter replacement logic can be properly functioning, including:
Each parameter return replacement result corresponding to link for being replaced successfully in the case of, described parameter replacement logic can Properly functioning;Or,
In the case of the replacement result that the return link of each parameter is corresponding exists and replaces unsuccessfully, described parameter replaces logic not Can be properly functioning.
For said method, in a kind of possible implementation, obtain at least one and include macroparameter to be replaced Parameter request links, including:
In the case of the code finding system to be tested is updated, trigger the business that the link of each parameter request is corresponding Hyperlink request, to obtain the link of at least one parameter request including macroparameter to be replaced.
In order to solve above-mentioned technical problem, according to another embodiment of the present invention, it is provided that a kind of parameter replacement test dress Put, including:
Acquisition module, for obtaining the link of at least one parameter request including macroparameter to be replaced;
Replacement module, is connected with described acquisition module, for replacing logic according to parameter, links each parameter request respectively Including macroparameter carry out parameter replacement, obtain including that each parameter of alternative parameter returns link;
Comparison module, is connected with described replacement module, for described each parameter is returned the alternative parameter that includes of link with The parameter preset that parameter replaces logic corresponding compares, and obtains described each parameter and returns the replacement result that link is corresponding;
Determine module, be connected with described comparison module, for returning, according to described each parameter, the replacement result that link is corresponding, Determine whether described parameter replacement logic can be properly functioning.
For said apparatus, in a kind of possible implementation, described replacement module, including:
Search unit, be used for finding each parameter request respectively and link the identification information that the macroparameter included is corresponding;
Replacement unit, is connected with described lookup unit, for replacing logic and described identification information according to parameter, by each ginseng The macroparameter that number hyperlink request includes replaces with alternative parameter, obtains including that each parameter of alternative parameter returns link.
For said apparatus, in a kind of possible implementation, described comparison module, including:
First comparing unit, it is corresponding that the alternative parameter included for described each parameter returns link replaces logic with parameter Parameter preset compare, in the case of described alternative parameter is identical with described parameter preset, described replacement result is for replacing Change merit into;And/or,
Second comparing unit, it is corresponding that the alternative parameter included for described each parameter returns link replaces logic with parameter Parameter preset compare, in the case of described alternative parameter and described parameter preset differ, described replacement result is Replace unsuccessfully.
For said apparatus, in a kind of possible implementation, described determine module, including:
First determines unit, in the case of the replacement result corresponding in the return link of each parameter is for being replaced successfully, and institute Stating parameter replacement logic can be properly functioning;And/or,
Second determines unit, exists in the case of replacing unsuccessfully for the replacement result corresponding in the return link of each parameter, Described parameter replaces logic can not be properly functioning.
For said apparatus, in a kind of possible implementation, described acquisition module, specifically for
In the case of the code finding system to be tested is updated, trigger the business that the link of each parameter request is corresponding Hyperlink request, to obtain the link of at least one parameter request including macroparameter to be replaced.
Beneficial effect
The parameter replacement test method of the embodiment of the present invention, replaces logic to treating that parameter request link includes according to parameter The macroparameter replaced carries out parameter replacement, generates and includes that the parameter of alternative parameter returns link, and returns link according to each parameter Corresponding replacement result, determines whether described parameter replacement logic can be properly functioning, it is possible to increase parameter replaces the survey of logic Examination efficiency.
Further, the parameter replacement test method of the embodiment of the present invention, can apply to various types of parameters are replaced Change logic to test, it is possible to simulate substantial amounts of parameter and replace scene, add the coverage rate of test, it is ensured that parameter is replaced and patrolled The quality collected.
Further, in the case of the code of system is updated, mutual each third party can be there is to system The parameter request link sent is tested, it is possible to testing efficiency is greatly improved, shortens the regression test time, eliminate code update Parameter is replaced the impact of logic.
According to below with reference to the accompanying drawings detailed description of illustrative embodiments, the further feature of the present invention and aspect being become Clear.
Accompanying drawing explanation
Including in the description and accompanying drawing and the description of the part that constitutes description together illustrates the present invention's Exemplary embodiment, feature and aspect, and for explaining the principle of the present invention.
Fig. 1 illustrates the flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 2 illustrates another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 3 illustrates another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 4 illustrates another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 5 illustrates another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 6 illustrates another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 7 illustrates another flow chart of parameter replacement test method according to an embodiment of the invention;
Fig. 8 illustrates the structured flowchart of parameter replacement test device according to another embodiment of the present invention;
Fig. 9 illustrates another structured flowchart of parameter replacement test device according to another embodiment of the present invention;
Figure 10 illustrates another structured flowchart of parameter replacement test device according to another embodiment of the present invention;
Figure 11 illustrates another structured flowchart of parameter replacement test device according to another embodiment of the present invention;
Figure 12 illustrates the structured flowchart of parameter replacement test equipment according to another embodiment of the present invention.
Detailed description of the invention
Various exemplary embodiments, feature and the aspect of the present invention is described in detail below with reference to accompanying drawing.In accompanying drawing identical Reference represent the same or analogous element of function.Although the various aspects of embodiment shown in the drawings, but remove Non-specifically is pointed out, it is not necessary to accompanying drawing drawn to scale.
The most special word " exemplary " means " as example, embodiment or illustrative ".Here as " exemplary " Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
It addition, in order to better illustrate the present invention, detailed description of the invention below gives numerous details. It will be appreciated by those skilled in the art that do not have some detail, the present invention equally implements.In some instances, for Method well known to those skilled in the art, means, element and circuit are not described in detail, in order to highlight the purport of the present invention.
Embodiment 1
Fig. 1 illustrates the flow chart of parameter replacement test method according to an embodiment of the invention.As it is shown in figure 1, this parameter Replacement test method, specifically includes that
Step 101, obtain at least one parameter request including macroparameter to be replaced link;
Step 102, replace logic according to parameter, respectively the macroparameter that includes of each parameter request link is carried out parameter and replace Change, obtain including that each parameter of alternative parameter returns link;
Step 103, the default ginseng that the alternative parameter return link of described each parameter included is corresponding with parameter replacement logic Number compares, and obtains described each parameter and returns the replacement result that link is corresponding;
Step 104, return, according to described each parameter, the replacement result that link is corresponding, determine whether described parameter replaces logic Can be properly functioning.
The macroparameter of the embodiment of the present invention can include various types of batch parameters that needs are replaced, and alternative parameter is permissible Including replace that logic obtains according to parameter for the parameter that corresponding macroparameter is replaced, the present embodiment does not limit grand ginseng Number and the particular type of alternative parameter.Wherein, grand (Macro) can be a kind of rule or pattern, or claims grammer to replace, and is used for How bright a certain specific input (typically character string) is converted into corresponding output (generally also character according to predefined rule String).This replacement is carried out when precompile, referred to as macro expansion.
Specifically, macroparameter can be realized by the macrodefinition of band parameter.Macrodefined general type with parameter is such as Under: #define<grand name>(<parameter list>)<grand body>.Wherein,<grand name>is an identifier, and the parameter in<parameter list>is permissible It it is one, it is also possible to be multiple, be determined on a case-by-case basis.<grand body>is the character string being replaced, and the character string in grand body is The expression formula being made up of the parameters in parameter list.
Parameter request link can be included in system and third-party interaction, and third party is required in order to obtain Statistical data, such as, Mac (Medium Access Control, hardware address) address, IP (Internet Protocol, net Network agreement) address etc., and the link for obtaining various types of parameter sent to system.Parameter returns link and can include After the macroparameter that parameter request link includes being replaced according to parameter replacement logic, 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 compositions one can be held The overall process of row.Specifically, link can represent the annexation pointing to a target from a webpage, pointed target Another webpage can be included, it is also possible to include the diverse location in same web page, it is also possible to include picture, Email ground Location, file, application program etc..
As an example of the present invention, advertisement delivery system needs to throw the advertisement of third party's such as dsp system.? In the case of user sends advertisement putting request, advertisement delivery system sends solicited message to dsp system, and dsp system is receiving After solicited message, return response message.Response message includes the parameter request link of dsp system.Advertisement delivery system exists After receiving the parameter request link of dsp system, including macroparameter replace, generate parameter and return link and be also sent to Dsp system.Wherein, solicited message and response message can pass through such as JSON (JavaScript Object Notation) Data realize.
In a kind of possible implementation, as in figure 2 it is shown, replace logic according to parameter, respectively to each parameter request chain Connect the macroparameter included and carry out parameter replacement, obtain including that each parameter of alternative parameter returns link (step 102), the most permissible Including:
Step 201, find the identification information that the macroparameter that includes of each parameter request link is corresponding respectively;
Step 202, replace logic and described identification information according to parameter, the macroparameter that the link of each parameter request includes is replaced It is changed to alternative parameter, obtains including that each parameter of alternative parameter returns link.
The embodiment of the present invention does not limit the concrete number of macroparameter, and such as, parameter request link can include a grand ginseng Number, it is also possible to include multiple macroparameter.In the case of parameter request link includes multiple macroparameter, each grand ginseng can be found The identification information that number is corresponding, such as, the title of macroparameter, the address of macroparameter, the numbering etc. of macroparameter, do not limit at this.
As an example of the present invention, in the case of advertisement delivery system receives parameter request link, according to example If the name lookup of macroparameter is to macroparameter.For example, parameter request is linked as: http://www.sina.com.cn/ yes/90003?Mac=MAC, wherein, MAC is exactly macroparameter.Then, advertisement delivery system replaces logic according to parameter, should Macroparameter replaces with the Mac address of the equipment of advertisement putting, such as 40-A8-F0-45-90-0B, generates and includes this Mac address Parameter returns link, such as http://www.sina.com.cn/yes/90003?Mac=40-A8-F0-45-90-0B.
In a kind of possible implementation, as it is shown on figure 3, described each parameter is returned the alternative parameter that includes of link with The parameter preset that parameter replaces logic corresponding compares, and obtains described each parameter and returns the replacement result (step that link is corresponding 103), specifically may include that
Step 301, the default ginseng that the alternative parameter return link of described each parameter included is corresponding with parameter replacement logic Number compares, and in the case of described alternative parameter is identical with described parameter preset, described replacement result is for being replaced successfully; Or,
Step 302, the default ginseng that the alternative parameter return link of described each parameter included is corresponding with parameter replacement logic Number compares, and in the case of described alternative parameter and described parameter preset differ, described replacement result is for replace unsuccessfully.
In a kind of possible implementation, as shown in Figure 4, return, according to described each parameter, the replacement knot that link is corresponding Really, determine whether described parameter replacement logic can be properly functioning, including:
Step 401, each parameter return replacement result corresponding to link for being replaced successfully in the case of, the replacement of described parameter Logic can be properly functioning;Or,
Step 402, returning in the case of replacement result corresponding to link exist and replace unsuccessfully in each parameter, described parameter is replaced Changing logic can not be properly functioning.
It should be noted that it can be pre-designed that parameter replaces logic, the parameter therefore generated returns link institute Including alternative parameter generally should follow parameter replace logic.Further, parameter is returned the replacement ginseng included by link Number and parameter preset compare, and in the case of alternative parameter is identical with parameter preset, illustrate that the parameter generated returns link Included alternative parameter is followed parameter and is replaced logic, and parameter is replaced successfully.In the feelings that alternative parameter and parameter preset differ Under condition, illustrating that the parameter generated returns the alternative parameter included by link and do not follows parameter replacement logic, parameter is replaced unsuccessfully.
As an example of the present invention, as shown in Figure 5 and Figure 6, the idiographic flow of parameter replacement test method is as follows:
S1, different parameter request links are placed in same array, such as in array A.Specifically, array A is wrapped The each parameter request link included may be used for test parameter and replaces logic.This example does not limit the parameter request that array A includes The number of link and type.It is said that in general, replace for test parameter the parameter request link of logic number is the most, type more Extensively, the test of parameter replacement logic is the most accurate.
S2, this example do not limit the particular order that the link of each parameter request carries out testing, for example, it may be serial is surveyed Examination, is successively read the parameter request link that array A includes, respectively the link of each parameter request is carried out parameter and replace survey Examination;Can also be concurrent testing, the whole parameter request link including array A carries out parameter replacement test simultaneously.Wherein, Serial test can be realized by single-threaded parameter replacement test, and concurrent testing can be by the parameter replacement test of multithreading Realize.
Whether the link that S3, inspection obtain is that the parameter request that array A includes links, and is not belonging to number in the link obtained In the case of group A, it is considered as the parameter request link that array A includes and has been completed.Simultaneously, it means that before this The replacement result of each parameter return link correspondence is for being replaced successfully, and further, parameter is replaced logic and can normally be transported Row (step S6).In the case of the link obtained belongs to array A, continue the link to this acquisition and perform step S4.
S4, execution parameter replacement test.Concrete, in step s 4, as shown in Figure 6, also include following sub-step:
S41, to include macroparameter to be replaced parameter request link, according to parameter replace logic carry out parameter replacement. Such as, parameter request is linked, advertisement delivery system according to the title such as Mac address search of macroparameter to macroparameter.So After, replace logic according to parameter, this macroparameter is replaced with the Mac address of the equipment of advertisement putting, such as 40-A8-F0-45- 90-0B, further, generates and includes that the parameter of this Mac address returns link.
S42, inspection parameter return whether link replaces correct.Such as, in step S41, advertisement delivery system is by parameter The Mac address returning the equipment linking the Mac address 40-A8-F0-45-90-0B included and actual input compares.
If the Mac address of the equipment of the actual input of S43 advertisement is 40-A8-F0-45-90-0B, by the ratio of step S42 Relatively, find that the alternative parameter that parameter return link includes is identical with parameter preset, then parameter is replaced successfully.
If the Mac address of the equipment of the actual input of S44 advertisement is 40-A8-F0-45-80-0A, by the ratio of step S42 Relatively, find that the alternative parameter that parameter return link includes differs with parameter preset, then parameter is replaced unsuccessfully.
S5, judge the whether success of parameter replacement test.The replacement result returning link corresponding in the parameter of current test is In the case of being replaced successfully, perform step S2, obtain next parameter request link to be tested in array A.In current test Parameter return replacement result corresponding to link for replacing unsuccessfully in the case of, further, parameter replacement logic can not be just Often run (step S7).
In a kind of possible implementation, as it is shown in fig. 7, obtain at least one parameter including macroparameter to be replaced Hyperlink request (step 101), including:
Step 701, in the case of the code finding system to be tested is updated, trigger the link of each parameter request right The service request link answered, to obtain the link of at least one parameter request including macroparameter to be replaced.
In embodiments of the present invention, link by triggering service request, service request can be sent to third party, thus draw Play third party's return parameters hyperlink request.As an example of the present invention, by triggering the advertisement putting of advertisement delivery system Hyperlink request (service request link), advertisement delivery system can send advertisement putting request to third party's such as dsp system.Enter One step ground, dsp system, after receiving advertisement putting request, sends to advertisement delivery system and replaces the connection of Mac Address requests (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 by such as Robot Framework framework, call test module to parameter request link to be tested Test.Wherein, Robot Framework is the Function Test Automation framework that a Python writes, and it possesses well Extensibility, support keyword drive, polytype client or interface can be tested simultaneously, can carry out distributed Test execution.
Further, it is also possible to by the situation of Jenkins monitoring continuous integrating.The code of system to be tested is updated In the case of, trigger the service request link that the link of each parameter request is corresponding, include macroparameter to be replaced obtaining at least one Parameter request link.In the case of the amendment of system is compared more frequently, the substantial amounts of testing time can be saved.Wherein, Jenkins is a kind of continuous integrating instrument based on Java exploitation, and the work persistently repeated for monitoring, function can include holding Continuous software version issue/test event, and the work that monitoring external call performs.
The parameter replacement test method of the embodiment of the present invention, replaces logic to treating that parameter request link includes according to parameter The macroparameter replaced carries out parameter replacement, generates and includes that the parameter of alternative parameter returns link, and returns link according to each parameter Corresponding replacement result, determines whether described parameter replacement logic can be properly functioning, it is possible to increase parameter replaces the survey of logic Examination efficiency.
Further, the parameter replacement test method of the embodiment of the present invention, can apply to various types of parameters are replaced Change logic to test, it is possible to simulate substantial amounts of parameter and replace scene, add the coverage rate of test, it is ensured that parameter is replaced and patrolled The quality collected.
Further, in the case of the code of system is updated, mutual each third party can be there is to system The parameter request link sent is tested, it is possible to testing efficiency is greatly improved, shortens the regression test time, eliminate code update Parameter is replaced the impact of logic.
Embodiment 2
Fig. 8 illustrates the structured flowchart 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 acquisition module 11, for obtaining at least one parameter including macroparameter to be replaced Hyperlink request.Replacement module 13, is connected with described acquisition module 11, for replacing logic according to parameter, and respectively please to each parameter The macroparameter asking link to include carries out parameter replacement, obtains including that each parameter of alternative parameter returns link.Comparison module 15, with Described replacement module 13 connects, and it is corresponding that the alternative parameter included for described each parameter returns link replaces logic with parameter Parameter preset compares, and obtains described each parameter and returns the replacement result that link is corresponding.Determine module 17, compare mould with described Block 15 connects, and for returning, according to described each parameter, the replacement result that link is corresponding, determines that described parameter is replaced logic and whether can Enough properly functioning.Concrete principle and example may refer to the associated description of embodiment 1 and Fig. 1.
In a kind of possible implementation, as it is shown in figure 9, described replacement module 13, including: search unit 131, be used for Find each parameter request respectively and link the identification information that the macroparameter included is corresponding.Replacement unit 133, with described lookup unit 131 connect, and for replacing logic and described identification information according to parameter, the macroparameter that the link of each parameter request includes are replaced with Alternative parameter, obtains including that each parameter of alternative parameter returns link.Concrete principle and example may refer to embodiment 1 and figure The associated description of 2.
In a kind of possible implementation, as shown in Figure 10, described comparison module 15, including: the first comparing unit 151, the parameter preset that the alternative parameter included for described each parameter returns link replaces logic corresponding with parameter compares Relatively, in the case of described alternative parameter is identical with described parameter preset, described replacement result is for being replaced successfully;And/or, second Comparing unit 153, the alternative parameter included for described each parameter returns link replaces, with parameter, the default ginseng that logic is corresponding Number compares, and in the case of described alternative parameter and described parameter preset differ, described replacement result is for replace unsuccessfully. Concrete principle and example may refer to the associated description of embodiment 1 and Fig. 3.
In a kind of possible implementation, as shown in figure 11, described determine module 17, including: first determines unit 171, in the case of the replacement result corresponding in the return link of each parameter is for being replaced successfully, described parameter replaces logic can Properly functioning;And/or, second determines unit 173, replaces unsuccessfully for the replacement result existence returning link corresponding in each parameter In the case of, described parameter replaces logic can not be properly functioning.Concrete principle and example may refer to embodiment 1 and Fig. 4, The associated description of Fig. 5 and Fig. 6.
In a kind of possible implementation, described acquisition module, specifically at the code finding system to be tested In the case of being updated, trigger the service request link that the link of each parameter request is corresponding, include waiting to replace obtaining at least one The parameter request link of the macroparameter changed.Concrete principle and example may refer to the associated description of embodiment 1 and Fig. 7.
The parameter replacement test device of the embodiment of the present invention, replaces logic to treating that parameter request link includes according to parameter The macroparameter replaced carries out parameter replacement, generates and includes that the parameter of alternative parameter returns link, and returns link according to each parameter Corresponding replacement result, determines whether described parameter replacement logic can be properly functioning, it is possible to increase parameter replaces the survey of logic Examination efficiency.
Further, the parameter replacement test device of the embodiment of the present invention, can apply to various types of parameters are replaced Change logic to test, it is possible to simulate substantial amounts of parameter and replace scene, add the coverage rate of test, it is ensured that parameter is replaced and patrolled The quality collected.
Further, in the case of the code of system is updated, mutual each third party can be there is to system The parameter request link sent is tested, it is possible to testing efficiency is greatly improved, shortens the regression test time, eliminate code update Parameter is replaced the impact of logic.
Embodiment 3
Figure 12 illustrates the structured flowchart of parameter replacement test equipment according to another embodiment of the present invention.Described parameter is replaced Test equipment 1100 can be to possess the host server of computing capability, personal computer PC or portable portable meter Calculation machine or terminal etc..Calculating node is not implemented and limits by the specific embodiment of the invention.
Described parameter replacement test equipment 1100 includes processor (processor) 1110, communication interface (Communications Interface) 1120, memorizer (memory) 1130 and bus 1140.Wherein, processor 1110, Communication interface 1120 and memorizer 1130 complete mutual communication by bus 1140.
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 used for performing program.Processor 1110 is probably a central processor CPU, or special collection Become circuit ASIC (Application Specific Integrated Circuit), or be configured to implement the present invention One or more integrated circuits of embodiment.
Memorizer 1130 is used for depositing file.Memorizer 1130 potentially includes high-speed RAM memorizer, it is also possible to also include non- Volatile memory (non-volatile memory), for example, at least one disk memory.Memorizer 1130 can also be to deposit Memory array.Memorizer 1130 is also possible to by piecemeal, and described piece can be by certain rule sets synthesis virtual volume.
In a kind of possible embodiment, said procedure can be the program code including computer-managed instruction.This journey Sequence is particularly used in: realize each step in embodiment 1.
Those of ordinary skill in the art are it is to be appreciated that each exemplary cell in embodiment described herein and algorithm Step, it is possible to being implemented in combination in of electronic hardware or computer software and electronic hardware.These functions are actually with hardware also It is that software form realizes, depends on application-specific and the design constraint of technical scheme.Professional and technical personnel can be for Specific application selects different methods to realize described function, but this realization is it is not considered that exceed the model of the present invention Enclose.
If using the form of computer software realize described function and as independent production marketing or use time, then exist To a certain extent it is believed that all or part of (part such as contributed prior art) of technical scheme is Embody in form of a computer software product.This computer software product is generally stored inside the non-volatile of embodied on computer readable In storage medium, including some instructions with so that computer equipment (can be that personal computer, server or network set Standby etc.) perform all or part of step of various embodiments of the present invention method.And aforesaid storage medium include USB flash disk, portable hard drive, Read only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic The various medium that can store program code such as dish or CD.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art, in the technical scope that the invention discloses, can readily occur in change or replace, should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with described scope of the claims.

Claims (10)

1. a parameter replacement test method, it is characterised in that including:
Obtain the link of at least one parameter request including macroparameter to be replaced;
Replacing logic according to parameter, the macroparameter included the link of each parameter request respectively carries out parameter replacement, obtains including replacing The each parameter changing parameter returns link;
Described each parameter returns the parameter preset linking the alternative parameter included corresponding with parameter replacement logic compare, The replacement result that link is corresponding is returned to described each parameter;
Return, according to described each parameter, the replacement result that link is corresponding, determine that described parameter replaces whether logic can normally transport OK.
Method the most according to claim 1, it is characterised in that replace logic according to parameter, respectively to each parameter request chain Connect the macroparameter included and carry out parameter replacement, obtain including that each parameter of alternative parameter returns link, including:
Find each parameter request respectively and link the identification information that the macroparameter included is corresponding;
Replace logic and described identification information according to parameter, the macroparameter that the link of each parameter request includes is replaced with replacement ginseng Number, obtains including that each parameter of alternative parameter returns link.
Method the most according to claim 1, it is characterised in that described each parameter is returned the alternative parameter that includes of link with The parameter preset that parameter replaces logic corresponding compares, and obtains described each parameter and returns the replacement result that link is corresponding, including:
Described each parameter returns the parameter preset linking the alternative parameter included corresponding with parameter replacement logic compare, In the case of described alternative parameter is identical with described parameter preset, described replacement result is for being replaced successfully;Or,
Described each parameter returns the parameter preset linking the alternative parameter included corresponding with parameter replacement logic compare, In the case of described alternative parameter and described parameter preset differ, described replacement result is for replace unsuccessfully.
Method the most according to claim 3, it is characterised in that return the replacement knot that link is corresponding according to described each parameter Really, determine whether described parameter replacement logic can be properly functioning, including:
Each parameter return replacement result corresponding to link for being replaced successfully in the case of, described parameter replacement logic can be normal Run;Or,
In the case of the replacement result that the return link of each parameter is corresponding exists and replaces unsuccessfully, described parameter replaces logic can not Properly functioning.
Method the most according to any one of claim 1 to 4, it is characterised in that obtain at least one and include to be replaced The parameter request link of macroparameter, including:
In the case of the code finding system to be tested is updated, trigger the service request that the link of each parameter request is corresponding Link, to obtain the link of at least one parameter request including macroparameter to be replaced.
6. a parameter replacement test device, it is characterised in that including:
Acquisition module, for obtaining the link of at least one parameter request including macroparameter to be replaced;
Replacement module, is connected with described acquisition module, for replacing logic according to parameter, includes the link of each parameter request respectively Macroparameter carry out parameter replacement, obtain including that each parameter of alternative parameter returns link;
Comparison module, is connected with described replacement module, for described each parameter returns alternative parameter and the parameter that link includes The parameter preset replacing logic corresponding compares, and obtains described each parameter and returns the replacement result that link is corresponding;
Determine module, be connected with described comparison module, for returning, according to described each parameter, the replacement result that link is corresponding, determine Whether described parameter replaces logic can be properly functioning.
Device the most according to claim 6, it is characterised in that described replacement module, including:
Search unit, be used for finding each parameter request respectively and link the identification information that the macroparameter included is corresponding;
Replacement unit, is connected with described lookup unit, for replacing logic and described identification information according to parameter, and please by each parameter The macroparameter asking link to include replaces with alternative parameter, obtains including that each parameter of alternative parameter returns link.
Device the most according to claim 6, it is characterised in that described comparison module, including:
First comparing unit, for returning by described each parameter to pre-corresponding with parameter replacement logic of the alternative parameter that includes of link Setting parameter compares, and in the case of described alternative parameter is identical with described parameter preset, described replacement result is for replacing to Merit;And/or,
Second comparing unit, for returning by described each parameter to pre-corresponding with parameter replacement logic of the alternative parameter that includes of link Setting parameter compares, and in the case of described alternative parameter and described parameter preset differ, described replacement result is for replacing Failure.
Device the most according to claim 8, it is characterised in that described determine module, including:
First determines unit, in the case of the replacement result corresponding in the return link of each parameter is for being replaced successfully, and described ginseng Number replaces logic can be properly functioning;And/or,
Second determines unit, exists in the case of replacing unsuccessfully for the replacement result corresponding in the return link of each parameter, described Parameter replaces logic can not be properly functioning.
10. according to the device according to any one of claim 6 to 9, it is characterised in that described acquisition module, specifically for
In the case of the code finding system to be tested is updated, trigger the service request that the link of each parameter request is corresponding Link, to obtain the link of at least one parameter request including 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 true CN106294146A (en) 2017-01-04
CN106294146B 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)

Cited By (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

Cited By (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

Also Published As

Publication number Publication date
CN106294146B (en) 2019-02-12

Similar Documents

Publication Publication Date Title
CN108153670B (en) Interface testing method and device and electronic equipment
US10474974B2 (en) Reciprocal models for resource allocation
CN111258773B (en) Service call flow information processing method and device and electronic equipment
CN108874926A (en) Mass data inquiry method, device, computer equipment and storage medium
CN110378434A (en) Training method, recommended method, device and the electronic equipment of clicking rate prediction model
CN110096496A (en) A kind of form validation method, relevant apparatus and equipment
CN107894919A (en) Timed task triggering method, device, equipment and readable storage medium storing program for executing
CN107274023A (en) Flow of insuring generation method, insure request processing method and device and electronic equipment
CN107292560A (en) Material storage management method and system
CN104133765B (en) The test case sending method of network activity and test case server
CN108737534A (en) A kind of data transmission method, device, block catenary system based on block chain
WO2016101811A1 (en) Information arrangement method and apparatus
CN106648556A (en) Front end and back end integrated development testing method and device
CN107545451A (en) A kind of advertisement sending method and device
CN109582452A (en) A kind of container dispatching method, dispatching device and electronic equipment
CN106921578A (en) The generation method and device of a kind of forwarding-table item
CN106934027A (en) Distributed reptile realization method and system
CN109981745A (en) A kind of journal file processing method and server
CN105989213A (en) Communication engineering drawing generation method and drawing design client
CN108134812A (en) Data processing method and device
CN107832446A (en) A kind of searching method and computing device of configuration item information
CN107392582A (en) The implementation method and device of resource transfers, the implementation method of bank settlement and device
CN111209111B (en) Resource allocation method, device, equipment and storage medium based on block chain system
CN106294146A (en) Parameter replacement test method and device
CN108154024A (en) A kind of data retrieval method, device and electronic equipment

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

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.

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

Granted publication date: 20190212

Termination date: 20200809

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