CN108829587A - Test case parameter replacing method, device, computer equipment and storage medium - Google Patents

Test case parameter replacing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN108829587A
CN108829587A CN201810533193.5A CN201810533193A CN108829587A CN 108829587 A CN108829587 A CN 108829587A CN 201810533193 A CN201810533193 A CN 201810533193A CN 108829587 A CN108829587 A CN 108829587A
Authority
CN
China
Prior art keywords
application program
parameter
version information
updated
test case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810533193.5A
Other languages
Chinese (zh)
Inventor
戴新云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201810533193.5A priority Critical patent/CN108829587A/en
Publication of CN108829587A publication Critical patent/CN108829587A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

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)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a kind of test case parameter replacing method, device, computer equipment and storage mediums.This method includes judging whether application program has updated;If the application program has updated, the version information and preset parameter mapping table of updated application program are obtained;According to the version information of the updated application program and preset parameter mapping table, the corresponding test case parameter of the updated application program is obtained;The corresponding test case parameter of application program before update is replaced with into the corresponding test case parameter of the updated application program.Implement the present invention and implement the automatic modification, it can be achieved that test case parameter, reduce manual intervention number, is conducive to promote testing efficiency.

Description

Test case parameter replacing method, device, computer equipment and storage medium
Technical field
The present invention relates to field of computer data processing more particularly to a kind of test case parameter replacing methods, device, meter Calculate machine equipment and computer readable storage medium.
Background technique
Continuous with computer application is popularized, and the renewal speed of types of applications program is constantly being accelerated.In application program It usually requires to test application program before formal publication.For example, corresponding to application program each by test case Interface is tested, to ensure that application program can normal use.The application program of different editions may correspond to different interface letters The access address of breath or database.After application program carries out version updating, interface message or database frequently can lead to Access address change, thus application program carry out version updating after need to the corresponding parameters of test case into Row modification.If needing to consume plenty of time modification interface message and database access address by manually modifying one by one, causing Testing efficiency is low.
Summary of the invention
The embodiment of the invention provides a kind of test case parameter replacing method, device, computer equipment and storage medium, Aim to solve the problem that the low problem of testing efficiency.
In a first aspect, the embodiment of the invention provides a kind of test case parameter replacing methods comprising:
Judge whether application program has updated;
If the application program has updated, version information and the mapping of preset parameter of updated application program are obtained Table;
According to the version information of the updated application program and preset parameter mapping table, after obtaining the update The corresponding test case parameter of application program;
It is corresponding that the corresponding test case parameter of application program before update is replaced with into the updated application program Test case parameter.
Second aspect, the embodiment of the invention provides a kind of test case parameter alternatives comprising:
First judging unit, for judging whether application program has updated;
First acquisition unit obtains the version information of updated application program if having updated for the application program And preset parameter mapping table;
Second acquisition unit, for according to the version information of the updated application program and the mapping of preset parameter Table obtains the corresponding test case parameter of the updated application program;
Replacement unit, for the corresponding test case parameter of application program before updating to be replaced with described updated answer With the corresponding test case parameter of program.
The third aspect, the embodiment of the present invention provide a kind of computer equipment again comprising memory, processor and storage On the memory and the computer program that can run on the processor, wherein the processor executes described program The above-mentioned test case parameter replacing method of Shi Shixian.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, wherein the computer can It reads storage medium and is stored with computer program, the computer program includes program instruction, and described program instruction is when by processor The processor is set to execute above-mentioned test case parameter replacing method when execution.
The embodiment of the present invention provides a kind of test case parameter replacing method, device, computer equipment and computer-readable Storage medium.Wherein method includes:Judge whether application program has updated;If the application program has updated, obtain after updating Application program version information and preset parameter mapping table;According to the version information of the updated application program with And preset parameter mapping table, obtain the corresponding test case parameter of the updated application program;By the application before update The corresponding test case parameter of program replaces with the corresponding test case parameter of the updated application program.Implement the present invention Implement the automatic modification, it can be achieved that test case parameter, reduce manual intervention number, is conducive to promote testing efficiency.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram for test case parameter replacing method that one embodiment of the invention provides;
Fig. 2 is a kind of sub-process schematic diagram for test case parameter replacing method that one embodiment of the invention provides;
Fig. 3 is a kind of sub-process schematic diagram for test case parameter replacing method that one embodiment of the invention provides;
Fig. 4 is a kind of flow diagram for test case parameter replacing method that one embodiment of the invention provides;
Fig. 5 is a kind of flow diagram for test case parameter replacing method that one embodiment of the invention provides;
Fig. 6 is a kind of schematic block diagram for test case parameter alternative that one embodiment of the invention provides;
The signal of first judging unit in a kind of test case parameter alternative that Fig. 7 provides for one embodiment of the invention Property block diagram;
The signal of first acquisition unit in a kind of test case parameter alternative that Fig. 8 provides for one embodiment of the invention Property block diagram;
Fig. 9 is a kind of another schematic block diagram for test case parameter alternative that one embodiment of the invention provides;
Figure 10 is a kind of another schematic block diagram for test case parameter alternative that one embodiment of the invention provides;
Figure 11 is a kind of schematic block diagram for computer equipment that one embodiment of the invention provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more other spies are not precluded Sign, entirety, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
Fig. 1 is please referred to, for a kind of process signal for test case parameter replacing method that one embodiment of the invention provides Figure.The test case parameter replacing method includes but is not limited to step S110-S140.
S110, judges whether application program has updated.
In specific implementation, application program includes but is not limited to client application and Web page application program.Wherein, objective Family end application program refers to that being mounted on terminal provides the application program of service for user.For example, being mounted on intelligent mobile phone terminal Application program.Web page application program (web app) refers to the application program based on webpage (web), it can passes through web page access Application program.For example, webpage (web) website etc..
Specifically referring to figure 2., a kind of subflow of the test case parameter replacing method provided for one embodiment of the invention Journey schematic diagram.Further, described in step S110 judges whether application program has updated, including step S111-S114.
S111 obtains version information of the application program before more new button is triggered, and the more new button is for touching Hair updates the application program.
In specific implementation, more new button is for updating the application program;If detecting, more new button is triggered, and shows to use Family has selected to be updated application program, then executes the update to application program and handle.
Wherein, whether judgement more new button is triggered and can be realized by the event trigger mechanism in Java Swing.Specifically Ground, event monitoring method include but is not limited to addMouseListener (MouseListener ml), addActionListener(ActionListener al).Wherein, addMouseListener (MouseListenerml) is used In the release for capturing mouse, the movement pressed, click, entered and left;After capturing corresponding movement, event handling class is transferred to (realizing MouseListener interface) is handled.addActionListener(ActionListener al);It captures similar The keyboard carriage return movement on the either similar input frame component of mouse click action on button assembly;It then will movement and phase Closing information transfers to the correlation method of event handling class (realizing ActionListener interface) to be handled.
Specifically, version information can be start context etc. for distinguishing the information of application program different editions.For example, institute The version information for stating application program before more new button is triggered can be " V1703001 ".
S112 obtains version information of the application program after the more new button is triggered.
Similarly, the mode for obtaining version information of the application program after the more new button is triggered can refer to acquisition The embodiment of the version information of application program before more new button is triggered.
S113 judges that the version after the version information before the more new button is triggered and the more new button are triggered is believed It whether identical ceases.
In specific implementation, it is assumed that the version information of application program can be before the more new button is triggered " V1703001 ", the version information of application program can be " V1703002 " before the more new button is triggered;It then determines and updates Button be triggered before version information be triggered with more new button after version information it is not identical.
S114, if the more new button be triggered before version information and the more new button be triggered after version information It is not identical, determine that the application program has updated.
In specific implementation, by obtain before more new button is triggered and more new button be triggered after application program version Information, and judge whether the version information of more new button triggering correspondence is identical;If more new button is triggered and more new button The version information for triggering correspondence is not identical, it is determined that the application program has updated, to realize to application program more The identification of new state.
S120, if the application program has updated, obtain updated application program version information and preset ginseng Number mapping table.The preset parameter mapping table is for storing by version information, test environment parameter and test case parameter The parameter mapping relations of composition.
Specifically referring to figure 3., a kind of subflow of the test case parameter replacing method provided for one embodiment of the invention Journey schematic diagram.Further, the version information of the updated application program of the acquisition in step S120, including step S121-S123。
S121 obtains the corresponding package manager of updated application program.
In specific implementation, it is applied the corresponding package manager of program (PackageManager) by Context;Pass through Package manager (PackageManager) obtains the list for currently having installed application program, has installed to all in list using journey Sequence is quickly scanned.Wherein, package manager (PackageManager) is used for management package, passes through package manager (PackageManager) the various information of available mounted application program, such as the packet name of application program The interface name of (packagename, the character string for uniquely tagged application program), application program (activityInfoName), cache size (cachsize), the size of data of application program of application program occupancy (datasize) etc..
S122 obtains APMB package information according to the package manager.
In specific implementation, by calling the side getApplicationInfo in package manager (PackageManager) Method obtains the APMB package information.
S123 parses the APMB package information to obtain the version information of updated application program.
In specific implementation, the APMB package information preservation has the corresponding title of the application program, size, opposed platforms master Program path, fileversion number.By parsing to the APMB package, the version letter of the current application program can be got Breath.
Specifically referring to figure 4., a kind of process of the test case parameter replacing method provided for one embodiment of the invention Schematic diagram.Further, if the application program has updated, the version information of updated application program and pre- is obtained If parameter mapping table after, the method also includes:
S210, according to the version information of the updated application program and preset parameter mapping table, described in acquisition The corresponding test environment parameter of updated application program.
In specific implementation, which is stored with version information and test environment parameter and test case The parameter mapping relations of parameter.For example, it is assumed that the parameter mapping relations are that version information V1703002 is directed toward test environment parameter E1 and test case parameter A1.If the version information of updated application program is V1703002, after can getting update The corresponding test case parameter of application program be test case parameter A1.If the version information of updated application program is V1703002, then can get the corresponding test environment parameter of the updated application program is E1.
S220 shows the test environment parameter.
In specific implementation, it is assumed that trying environmental parameter E1 includes:CPU is four cores, inside saves as 4G.Then by the test environment parameter It is showed at display interface, to facilitate user's fast construction test environment corresponding with the application program.Wherein, display interface packet Include computer monitor, mobile terminal display screen.
S130, according to the version information of the updated application program and preset parameter mapping table, described in acquisition The corresponding test case parameter of updated application program.
In specific implementation, which is stored with version information and test environment parameter and test case The parameter mapping relations of parameter.For example, it is assumed that the parameter mapping relations are that version information V1703002 is directed toward test environment parameter E1 and test case parameter A1.If the version information of updated application program is V1703002, after can getting update The corresponding test case parameter of application program be test case parameter A1.
Specifically referring to figure 5., a kind of process of the test case parameter replacing method provided for one embodiment of the invention Schematic diagram.Further, before the version information and preset parameter mapping table for obtaining updated application program, institute The method of stating further includes:
S310 constructs the parameter mapping relations being made of version information, test environment parameter and test case parameter.
In specific implementation, computer hardware, software, net necessary to test environment refers to complete Experience of Software Testing Work Network equipment, the general name of historical data.Test environment (Testing environment) parameter refers to the software of test run thereon Description and any other software interacted with tested software with hardware environment, including driving and stake.For example, test environment Parameter E1 includes:CPU is four cores, inside saves as 4G;Testing environment E2 includes:CPU is eight cores, inside saves as 8G.Different editions are answered It may not be identical with the test environment that program is built in carrying out mapping process.
Test case (Test Case) refer to some special objective and work out one group of test input, execution condition and Expected results, to test some Program path or to verify whether meet some particular demands.Test case parameter includes test The corresponding interface access address of use-case or database access address etc., the corresponding interface access address of different test cases Or database access address may not be identical.By obtaining the test environment parameter and test case parameter of user's input, Test environment parameter, test case parameter, version information are set into mapping relations, to construct parameter mapping relations.For example, being connect The test environment parameter of receipts is E1, and test case parameter is A1.Wherein E1 and A1 is respectively test environment parameter and test The corresponding identifier of use-case parameter;According to test environment parameter and the corresponding identifier of test case parameter, may be read into The one-to-one test environment parameter of the identifier and test case parameter.
By the way that test environment parameter, test case parameter, version information are set mapping relations, closed with generating parameter mapping System.Such as the parameter mapping relations can be directed toward test environment parameter E1 and test case parameter for version information V1703002 A1。
The parameter mapping relations are saved as form document to generate the preset parameter mapping table by S320.
In specific implementation, the quantity of parameter mapping relations can be it is multiple, by the way that parameter mapping relations are saved as table File is conducive to promote reading speed to realize the orderly management to parameter mapping relations.Assuming that the parameter mapping relations quantity It is three, the parameter mapping relations is saved as into form document and generate the preset parameter mapping table specifically such as 1 institute of table Show.The preset parameter mapping table can be stored in preset storing path, reflect in order to quickly read the preset parameter Firing table.
Table 1
Version information Test environment parameter Test case parameter
V1703001 E2 A2
V1703002 E1 A1
V1703003 E3 A3
The corresponding test case parameter of application program before update is replaced with the updated application program pair by S140 The test case parameter answered.
In specific implementation, according to accessed test case parameter, the corresponding test of the application program before update is used Example parameter replaces with the corresponding test case parameter of the updated application program, realizes automatic after application program update Test case parameter is modified, is conducive to promote testing efficiency.
The embodiment of the invention also provides a kind of test case parameter alternative, which is used In any embodiment for executing aforementioned test case parameter replacing method.
Fig. 6 is please referred to, is a kind of the schematic of test case parameter alternative 100 that one embodiment of the invention provides Block diagram.The test case parameter alternative 100 includes the first judging unit 110, the acquisition list of first acquisition unit 120, second Member 130 and replacement unit 140.
In specific implementation, application program includes but is not limited to client application and Web page application program.Wherein, objective Family end application program refers to that being mounted on terminal provides the application program of service for user.For example, being mounted on intelligent mobile phone terminal Application program.Web page application program (web app) refers to the application program based on webpage (web), it can passes through web page access Application program.For example, webpage (web) website etc..
First judging unit 110, for judging whether application program has updated.
7 specifically are please referred to, first in a kind of test case parameter alternative 100 provided for one embodiment of the invention The schematic block diagram of judging unit 110.Further, first judging unit 110 includes third acquiring unit the 111, the 4th Acquiring unit 111, second judgment unit 113 and determination unit 114.
Third acquiring unit 111, it is described for obtaining version information of the application program before more new button is triggered More new button updates the application program for triggering.
In specific implementation, more new button is for updating the application program;If detecting, more new button is triggered, and shows to use Family has selected to be updated application program, then executes the update to application program and handle.
Wherein, whether judgement more new button is triggered and can be realized by the event trigger mechanism in Java Swing.Specifically Ground, event monitoring method include but is not limited to addMouseListener (MouseListener ml), addActionListener(ActionListener al).Wherein, addMouseListener (MouseListenerml) is used In the release for capturing mouse, the movement pressed, click, entered and left;After capturing corresponding movement, event handling class is transferred to (realizing MouseListener interface) is handled.addActionListener(ActionListener al);It captures similar The keyboard carriage return movement on the either similar input frame component of mouse click action on button assembly;It then will movement and phase Closing information transfers to the correlation method of event handling class (realizing ActionListener interface) to be handled.
Specifically, version information can be start context etc. for distinguishing the information of application program different editions.For example, institute The version information for stating application program before more new button is triggered can be " V1703001 ".
4th acquiring unit 111, for obtaining version information of the application program after the more new button is triggered.
Similarly, the mode for obtaining version information of the application program after the more new button is triggered can refer to acquisition The embodiment of the version information of application program before more new button is triggered.
Second judgment unit 113, for judging version information and the more new button before the more new button is triggered Whether the version information after being triggered is identical.
In specific implementation, it is assumed that the version information of application program can be before the more new button is triggered " V1703001 ", the version information of application program can be " V1703002 " before the more new button is triggered;It then determines and updates Button sent out before version information be triggered with more new button after version information it is not identical.
Determination unit 114, if the version information before being triggered for the more new button is triggered with the more new button Version information afterwards is not identical, determines that the application program has updated.
In specific implementation, by obtain before more new button is triggered and more new button be triggered after application program version Information, and judge whether the version information of more new button triggering correspondence is identical;If more new button is triggered and more new button The version information for triggering correspondence is not identical, it is determined that the application program has updated, to realize to application program more The identification of new state.
First acquisition unit 120 obtains the version letter of updated application program if having updated for the application program Breath and preset parameter mapping table.The preset parameter mapping table for store by version information, test environment parameter with And the parameter mapping relations of test case parameter composition.
8 specifically are please referred to, first in a kind of test case parameter alternative 100 provided for one embodiment of the invention The schematic block diagram of acquiring unit 120.Further, the first acquisition unit 120 includes the 5th acquiring unit the 121, the 6th Acquiring unit 122 and resolution unit 123.
5th acquiring unit 121, for obtaining the corresponding package manager of updated application program.
In specific implementation, it is applied the corresponding package manager of program (PackageManager) by Context;Pass through Package manager (PackageManager) obtains the list for currently having installed application program, has installed to all in list using journey Sequence is quickly scanned.Wherein, package manager (PackageManager) is used for management package, passes through package manager (PackageManager) the various information of available mounted application program, such as the packet name of application program The interface name of (packagename, the character string for uniquely tagged application program), application program (activityInfoName), cache size (cachsize), the size of data of application program of application program occupancy (datasize) etc..
6th acquiring unit 122, for obtaining APMB package information according to the package manager.
In specific implementation, by calling the side getApplicationInfo in package manager (PackageManager) Method obtains the APMB package information.
Resolution unit 123, for parsing the APMB package information to obtain the version information of updated application program.
In specific implementation, the APMB package information preservation has the corresponding title of the application program, size, opposed platforms master Program path, fileversion number.By parsing to the APMB package, the version letter of the current application program can be got Breath.
Fig. 9 specifically is please referred to, is a kind of the another of test case parameter alternative 100 that one embodiment of the invention provides One schematic block diagram.The test case parameter alternative 100 further includes the 7th acquiring unit 210 and display unit 220.
7th acquiring unit 210, for according to the updated application program version information and preset parameter Mapping table obtains the corresponding test environment parameter of the updated application program.
In specific implementation, which is stored with version information and test environment parameter and test case The parameter mapping relations of parameter.For example, it is assumed that the parameter mapping relations are that version information V1703002 is directed toward test environment parameter E1 and test case parameter A1.If the version information of updated application program is V1703002, after can getting update The corresponding test case parameter of application program be test case parameter A1.If the version information of updated application program is V1703002, then can get the corresponding test environment parameter of the updated application program is E1.
Display unit 220, for showing the test environment parameter.
In specific implementation, it is assumed that trying environmental parameter E1 includes:CPU is four cores, inside saves as 4G.Then by the test environment parameter It is showed at display interface, to facilitate user to build test environment corresponding with the application program.Wherein, display interface includes electricity Brain display, mobile terminal display screen.
Second acquisition unit 130, for according to the updated application program version information and preset parameter Mapping table obtains the corresponding test case parameter of the updated application program.
In specific implementation, which is stored with version information and test environment parameter and test case The parameter mapping relations of parameter.For example, it is assumed that the parameter mapping relations are that version information V1703002 is directed toward test environment parameter E1 and test case parameter A1.If the version information of updated application program is V1703002, after can getting update The corresponding test case parameter of application program be test case parameter A1.
Figure 10 is please referred to, is a kind of the another of test case parameter alternative 100 that one embodiment of the invention provides Schematic block diagram.Further, the test case parameter alternative 100 further includes construction unit 310 and generation unit 320。
Construction unit 310, for constructing the parameter being made of version information, test environment parameter and test case parameter Mapping relations.
In specific implementation, computer hardware, software, net necessary to test environment refers to complete Experience of Software Testing Work Network equipment, the general name of historical data.Test environment (Testing environment) parameter refers to the software of test run thereon Description and any other software interacted with tested software with hardware environment, including driving and stake.For example, test environment Parameter E1 includes:CPU is four cores, inside saves as 4G;Testing environment E2 includes:CPU is eight cores, inside saves as 8G.Different editions are answered It may not be identical with the test environment that program is built in carrying out mapping process.
Test case (Test Case) refer to some special objective and work out one group of test input, execution condition and Expected results, to test some Program path or to verify whether meet some particular demands.Test case parameter includes test The corresponding interface access address of use-case or database access address etc., the corresponding interface access address of different test cases Or database access address may not be identical.By obtaining the test environment parameter and test case parameter of user's input, Test environment parameter, test case parameter, version information are set into mapping relations, to construct parameter mapping relations.For example, being connect The test environment parameter of receipts is E1, and test case parameter is A1.Wherein E1 and A1 is respectively test environment parameter and test The corresponding identifier of use-case parameter;According to test environment parameter and the corresponding identifier of test case parameter, may be read into The one-to-one test environment parameter of the identifier and test case parameter.
By the way that test environment parameter, test case parameter, version information are set mapping relations, closed with generating parameter mapping System.Such as the parameter mapping relations can be directed toward test environment parameter E1 and test case parameter for version information V1703002 A1。
Generation unit 320, for the parameter mapping relations to be saved as form document to generate the preset parameter Mapping table.
In specific implementation, the quantity of parameter mapping relations can be it is multiple, by the way that parameter mapping relations are saved as table File is conducive to promote reading speed to realize the orderly management to parameter mapping relations.Assuming that the parameter mapping relations quantity It is three, the parameter mapping relations is saved as into form document and generate the preset parameter mapping table specifically such as 1 institute of table Show.The preset parameter mapping table can be stored in preset storing path, reflect in order to quickly read the preset parameter Firing table.
Replacement unit 140, after the corresponding test case parameter of application program before updating is replaced with the update The corresponding test case parameter of application program.
In specific implementation, according to accessed test case parameter, the corresponding test of the application program before update is used Example parameter replaces with the corresponding test case parameter of the updated application program, realizes automatic after application program update Test case parameter is modified, is conducive to promote testing efficiency.
Above-mentioned apparatus 100 can be implemented as a kind of form of computer program, and computer program can be as shown in figure 11 Computer equipment on run.
Figure 11 is please referred to, Figure 11 is a kind of schematic block diagram of computer equipment provided in an embodiment of the present invention.The calculating 500 equipment of machine equipment can be terminal.The terminal can be smart phone, tablet computer, laptop, desktop computer, a Personal digital assistant and wearable device etc. have the electronic equipment of communication function.
The computer equipment 500 includes processor 520, memory and the network interface connected by system bus 510 550, wherein memory may include non-volatile memory medium 530 and built-in storage 540.
The non-volatile memory medium 530 can storage program area 531 and computer program 532.The computer program 532 It is performed, processor 520 may make to execute a kind of test case parameter replacing method.
The processor 520 supports the operation of entire computer equipment 500 for providing calculating and control ability.
The built-in storage 540 provides environment for the operation of the computer program in non-volatile memory medium, the computer When program is executed by processor 520, processor 520 may make to execute a kind of test case parameter replacing method.
The network interface 550 such as sends the task dispatching of distribution for carrying out network communication.Those skilled in the art can manage Solution, the schematic block diagram of the computer equipment are only the block diagram of part-structure relevant to the present invention program, composition pair The restriction for the computer equipment 500 that the present invention program is applied thereon, specific computer equipment 500 may include than in figure Shown more or fewer components perhaps combine certain components or with different component layouts.
Wherein, the processor 520 is for running program code stored in memory, to implement function such as:
Judge whether application program has updated;
If the application program has updated, version information and the mapping of preset parameter of updated application program are obtained Table;
According to the version information of the updated application program and preset parameter mapping table, after obtaining the update The corresponding test case parameter of application program;
It is corresponding that the corresponding test case parameter of application program before update is replaced with into the updated application program Test case parameter.
In one embodiment, processor 520 execute it is described judge application program whether updated step when, specifically hold Row following steps:
Version information of the application program before more new button is triggered is obtained, the more new button is updated for triggering The application program;
Obtain version information of the application program after the more new button is triggered;
Judging the version information after the version information before the more new button is triggered is triggered with the more new button is It is no identical;
If the more new button be triggered before version information be triggered with the more new button after version information not phase Together, determine that the application program has updated.
In one embodiment, processor 520 is the step of executing the version information for obtaining updated application program When, specifically execute following steps:
Obtain the corresponding package manager of updated application program;
APMB package information is obtained according to the package manager;
The APMB package information is parsed to obtain the version information of updated application program.
In one embodiment, processor 520 is executing the version information for obtaining updated application program and pre- If parameter mapping table the step of before, specifically execute following steps:
Construct the parameter mapping relations being made of version information, test environment parameter and test case parameter;
The parameter mapping relations are saved as into form document to generate the preset parameter mapping table.
In one embodiment, if processor 520 has been updated in the execution application program, updated application program is obtained Version information and preset parameter mapping table the step of after, specifically execute following steps:
According to the version information of the updated application program and preset parameter mapping table, after obtaining the update The corresponding test environment parameter of application program;
Show the test environment parameter.
It should be appreciated that in embodiments of the present invention, processor 520 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or Person's processor is also possible to any conventional processor etc..
It will be understood by those skilled in the art that the schematic block diagram of the computer equipment 500 is not constituted and is set to computer Standby 500 restriction may include perhaps combining certain components or different component cloth than illustrating more or fewer components It sets.
A kind of computer readable storage medium is provided in another embodiment of the invention, the computer readable storage medium It is stored with computer program, wherein computer program includes program instruction.Described program instruction is realized such as when being executed by processor Lower step:
Judge whether application program has updated;
If the application program has updated, version information and the mapping of preset parameter of updated application program are obtained Table;
According to the version information of the updated application program and preset parameter mapping table, after obtaining the update The corresponding test case parameter of application program;
It is corresponding that the corresponding test case parameter of application program before update is replaced with into the updated application program Test case parameter.
In one embodiment, described program instruction is executed by processor to realize and described judge whether application program has updated Step when, be implemented as follows step:
Version information of the application program before more new button is triggered is obtained, the more new button is updated for triggering The application program;
Obtain version information of the application program after the more new button is triggered;
Judging the version information after the version information before the more new button is triggered is triggered with the more new button is It is no identical;
If the more new button be triggered before version information be triggered with the more new button after version information not phase Together, determine that the application program has updated.
In one embodiment, described program instruction is executed by processor to realize the updated application program of acquisition When the step of version information, it is implemented as follows step:
Obtain the corresponding package manager of updated application program;
APMB package information is obtained according to the package manager;
The APMB package information is parsed to obtain the version information of updated application program.
In one embodiment, described program instruction is executed by processor to realize the updated application program of acquisition Before the step of version information and preset parameter mapping table, it is implemented as follows step:
Construct the parameter mapping relations being made of version information, test environment parameter and test case parameter;
The parameter mapping relations are saved as into form document to generate the preset parameter mapping table.
In one embodiment, it if described program instruction is executed by processor to realize that the application program has updated, obtains After the step of version information of updated application program and preset parameter mapping table, it is implemented as follows step:
According to the version information of the updated application program and preset parameter mapping table, after obtaining the update The corresponding test environment parameter of application program;
Show the test environment parameter.
The computer readable storage medium can be USB flash disk, mobile hard disk, read-only memory (ROM, Read- OnlyMemory), the various media that can store program code such as magnetic or disk.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.It is apparent to those skilled in the art that for convenience of description and simple Clean, the device of foregoing description and the specific work process of unit can refer to corresponding processes in the foregoing method embodiment, herein It repeats no more.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.Such as more than one unit or assembly can To combine or be desirably integrated into another system, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with It is that two or more units are integrated in one unit.Above-mentioned integrated unit both can take the form of hardware realization, It can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a storage medium, including some instructions are with so that a computer is set Standby (can be personal computer, terminal or the network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.
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 readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. a kind of test case parameter replacing method, which is characterized in that including:
Judge whether application program has updated;
If the application program has updated, the version information and preset parameter mapping table of updated application program are obtained, The preset parameter mapping table is for storing the parameter being made of version information, test environment parameter and test case parameter Mapping relations;
According to the version information of the updated application program and preset parameter mapping table, described updated answer is obtained With the corresponding test case parameter of program;
The corresponding test case parameter of application program before update is replaced with into the corresponding test of the updated application program Use-case parameter.
2. the method as described in claim 1, which is characterized in that it is described to judge whether application program has updated, including:
Version information of the application program before more new button is triggered is obtained, the more new button is for triggering described in update Application program;
Obtain version information of the application program after the more new button is triggered;
Judge the version information after the version information before the more new button is triggered is triggered with the more new button whether phase Together;
If the more new button be triggered before version information be triggered with the more new button after version information it is not identical, really The fixed application program has updated.
3. the method as described in claim 1, which is characterized in that the version information for obtaining updated application program, packet It includes:
Obtain the corresponding package manager of updated application program;
APMB package information is obtained according to the package manager;
The APMB package information is parsed to obtain the version information of updated application program.
4. the method as described in claim 1, which is characterized in that if the application program has updated, obtain updated After the version information of application program and preset parameter mapping table, further include:
According to the version information of the updated application program and preset parameter mapping table, described updated answer is obtained With the corresponding test environment parameter of program;
Show the test environment parameter.
5. the method as described in claim 1, which is characterized in that the version information for obtaining updated application program and Before preset parameter mapping table, further include:
Construct the parameter mapping relations being made of version information, test environment parameter and test case parameter;
The parameter mapping relations are saved as into form document to generate the preset parameter mapping table.
6. a kind of test case parameter alternative, which is characterized in that described device includes:
First judging unit, for judging whether application program has updated;
First acquisition unit, if having been updated for the application program, obtain updated application program version information and Preset parameter mapping table, the preset parameter mapping table is for storing by version information, test environment parameter and test The parameter mapping relations of use-case parameter composition;
Second acquisition unit, for the version information and preset parameter mapping table according to the updated application program, Obtain the corresponding test case parameter of the updated application program;
Replacement unit, it is described updated using journey for replacing with the corresponding test case parameter of application program before updating The corresponding test case parameter of sequence.
7. device as claimed in claim 6, which is characterized in that first judging unit includes:
Third acquiring unit, for obtaining version information of the application program before more new button is triggered, the update is pressed Button updates the application program for triggering;
4th acquiring unit obtains version information of the application program after the more new button is triggered;
Second judgment unit, for judging the version information before the more new button is triggered and described after more new button is triggered Version information it is whether identical;
Determination unit, if version information before being triggered for the more new button and the more new button be triggered after version Information is not identical, determines that the application program has updated.
8. device as claimed in claim 6, which is characterized in that the first acquisition unit includes:
5th acquiring unit, for obtaining the corresponding package manager of updated application program;
6th acquiring unit, for obtaining APMB package information according to the package manager;
Resolution unit, for parsing the APMB package information to obtain the version information of updated application program.
9. a kind of computer equipment, including memory, processor and it is stored on the memory and can be on the processor The computer program of operation, which is characterized in that the processor is realized when executing described program as any in claim 1 to 5 The test case parameter replacing method of item.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program include program instruction, and described program instruction executes the processor such as The described in any item test case parameter replacing methods of claim 1-5.
CN201810533193.5A 2018-05-29 2018-05-29 Test case parameter replacing method, device, computer equipment and storage medium Pending CN108829587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810533193.5A CN108829587A (en) 2018-05-29 2018-05-29 Test case parameter replacing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810533193.5A CN108829587A (en) 2018-05-29 2018-05-29 Test case parameter replacing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN108829587A true CN108829587A (en) 2018-11-16

Family

ID=64146651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810533193.5A Pending CN108829587A (en) 2018-05-29 2018-05-29 Test case parameter replacing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108829587A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069397A (en) * 2019-03-15 2019-07-30 深圳壹账通智能科技有限公司 Function test method, device, computer equipment and storage medium
CN111221743A (en) * 2020-03-18 2020-06-02 时时同云科技(成都)有限责任公司 Automatic testing method and system
CN111338958A (en) * 2020-02-28 2020-06-26 中国平安人寿保险股份有限公司 Parameter generation method and device of test case and terminal equipment
CN111427774A (en) * 2020-03-09 2020-07-17 深圳开源互联网安全技术有限公司 Request parameter modification method and system for application program test case

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110289499A1 (en) * 2010-05-19 2011-11-24 Microsoft Corporation Techniques to automatically update software applications
CN104636254A (en) * 2015-01-16 2015-05-20 北京创毅视讯科技有限公司 Method and device for generating test case, testing method and testing equipment
CN104836843A (en) * 2015-03-31 2015-08-12 北京奇虎科技有限公司 Client application program updating method and device
CN107844409A (en) * 2016-09-18 2018-03-27 平安科技(深圳)有限公司 Test example executing method and device
CN107908540A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Test case creation method, apparatus, computer equipment and medium
CN107908543A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Applied program testing method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110289499A1 (en) * 2010-05-19 2011-11-24 Microsoft Corporation Techniques to automatically update software applications
CN104636254A (en) * 2015-01-16 2015-05-20 北京创毅视讯科技有限公司 Method and device for generating test case, testing method and testing equipment
CN104836843A (en) * 2015-03-31 2015-08-12 北京奇虎科技有限公司 Client application program updating method and device
CN107844409A (en) * 2016-09-18 2018-03-27 平安科技(深圳)有限公司 Test example executing method and device
CN107908540A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Test case creation method, apparatus, computer equipment and medium
CN107908543A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Applied program testing method, device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069397A (en) * 2019-03-15 2019-07-30 深圳壹账通智能科技有限公司 Function test method, device, computer equipment and storage medium
CN111338958A (en) * 2020-02-28 2020-06-26 中国平安人寿保险股份有限公司 Parameter generation method and device of test case and terminal equipment
CN111427774A (en) * 2020-03-09 2020-07-17 深圳开源互联网安全技术有限公司 Request parameter modification method and system for application program test case
CN111221743A (en) * 2020-03-18 2020-06-02 时时同云科技(成都)有限责任公司 Automatic testing method and system

Similar Documents

Publication Publication Date Title
CN108829587A (en) Test case parameter replacing method, device, computer equipment and storage medium
CN105378696B (en) Message count is not seen across the offer of each equipment
CN106569585B (en) A kind of method and terminal managing program process
CN107147724A (en) A kind of information push method, server and computer-readable recording medium
CN110032451A (en) Distributed multilingual message realization method, device and server
CN108665239A (en) Workflow processing method, device, computer equipment and storage medium
CN106254172A (en) Heterogeneous applications collecting method and device
CN107995242A (en) A kind of method for processing business and system
CN106681587B (en) A kind of the footmark processing method and terminal of application icon
CN107071865A (en) The method and device that a kind of Wireless Fidelity is quickly connected
CN111737609B (en) WEB system menu bar display method, terminal and storage medium
CN105550052B (en) Distributed lock implementation method and device
CN107656750A (en) Update of plug-in method and device
CN109597798A (en) Network file delet method, device, computer equipment and storage medium
CN108804484A (en) The data measures and procedures for the examination and approval, equipment and computer readable storage medium
CN107944000A (en) Flight freight rate update method, device, electronic equipment, storage medium
CN104714805B (en) A kind of method and device of the setting menu of control application program
CN107315591A (en) A kind of service design method and system
CN106843818B (en) Business model generation method and device
CN107678744A (en) Application controls pattern customizing method, device and computer-readable recording medium
US11544119B2 (en) Business rules processing framework for implementing new desired functionality in a telecommunication application
CN109685595A (en) Method for pushing, device, mobile terminal and storage medium based on data analysis
CN106155746A (en) Installation file processing method and device and server
CN102333164A (en) Incoming call screen display method of call system based on B/S (Browser/Server) framework
CN114401187A (en) Gray scale distribution method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20181116

WD01 Invention patent application deemed withdrawn after publication