CN109388555A - The treating method and apparatus of test script - Google Patents

The treating method and apparatus of test script Download PDF

Info

Publication number
CN109388555A
CN109388555A CN201710683420.8A CN201710683420A CN109388555A CN 109388555 A CN109388555 A CN 109388555A CN 201710683420 A CN201710683420 A CN 201710683420A CN 109388555 A CN109388555 A CN 109388555A
Authority
CN
China
Prior art keywords
test script
program
script
edition
test
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
CN201710683420.8A
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.)
BEYONDSOFT Corp
Original Assignee
BEYONDSOFT Corp
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 BEYONDSOFT Corp filed Critical BEYONDSOFT Corp
Priority to CN201710683420.8A priority Critical patent/CN109388555A/en
Publication of CN109388555A publication Critical patent/CN109388555A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind for the treatment of method and apparatus of test script.Wherein, this method comprises: obtaining the program of the first test script and the second edition, the program of the second edition is compared with the program of first version, obtain the difference of the program of the second edition and the program of first version, the first test script is adjusted according to difference to obtain the second test script, wherein, the first test script is for testing the program of first version, and the second test script is for testing the program of the second edition.The present invention solves the technical problem lower due to the rate of return on investment for after application program update, needing to rewrite automatic test caused by test script is tested.

Description

The treating method and apparatus of test script
Technical field
The present invention relates to software test fields, in particular to a kind for the treatment of method and apparatus of test script.
Background technique
When carrying out automatic test to application program, the automation of application program is completed generally by test script Test.Wherein, test script records test foot generally by programming personnel's manual compiling, or by the tool of recording script This.When needing to update however, working as application program, and having the application issued of new version, need manually to rewrite or modify Corresponding test script, or test script is recorded again.Especially when application program update compares more frequently, to survey Examination shell script is rewritten or is recorded, and not only consumes a large amount of manpower and material resources, but also also add programming personnel's Work load causes the rate of return on investment of the automatic test of application program lower.
For above-mentioned automatic caused by test script is tested due to after application program update, needing to rewrite Change the lower problem of the rate of return on investment of test, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind for the treatment of method and apparatus of test script, at least to solve due to using journey After sequence updates, need to rewrite the lower technology of rate of return on investment of automatic test caused by test script is tested Problem.
According to an aspect of an embodiment of the present invention, a kind of processing method of test script is provided, comprising: obtain first Test script, wherein the first test script is for testing the program of first version;Obtain the program of the second edition;It will The program of the second edition is compared with the program of first version, obtains the difference of the program of the second edition and the program of first version Not;The first test script is adjusted according to difference to obtain the second test script, wherein the second test script is used for second The program of version is tested.
According to another aspect of an embodiment of the present invention, a kind of processing unit of test script is additionally provided, comprising: first obtains Modulus block, for obtaining the first test script, wherein the first test script is for testing the program of first version;The Two obtain module, for obtaining the program of the second edition;Contrast module, for by the journey of the program of the second edition and first version Sequence is compared, and obtains the difference of the program of the second edition and the program of first version;Adjust module, for according to difference to the One test script is adjusted to obtain the second test script, wherein the second test script is used to carry out the program of the second edition Test.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, which includes storage Program, wherein the processing method of program execution test script.
According to another aspect of an embodiment of the present invention, a kind of processor is additionally provided, which is used to run program, In, the processing method of test script is executed when program is run.
In embodiments of the present invention, by the way of updating test script according to the difference of the program of two versions, pass through The program of the first test script and the second edition is obtained, and the program of the second edition is compared with the program of first version, The difference of the program of the second edition and the program of first version is obtained, the first test script is adjusted according to difference to obtain Two test scripts, wherein for testing the program of first version, the second test script is used for the first test script The program of two versions is tested, and has achieved the purpose that automatic updating test script, improves automatic test to realize The technical effect of rate of return on investment, so solve due to after application program update, need to rewrite test script into The lower technical problem of the rate of return on investment of automatic test caused by row test.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of method flow diagram of the processing method of test script according to an embodiment of the present invention;
Fig. 2 is a kind of interface schematic diagram of optional automatic test platform according to an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of optional display interface for obtaining test script according to an embodiment of the present invention;
Fig. 4 is a kind of method flow diagram of the processing method of optional test script according to an embodiment of the present invention;
Fig. 5 is a kind of interface schematic diagram being optionally updated to test script according to an embodiment of the present invention;
Fig. 6 is a kind of method flow diagram of the processing method of optional test script according to an embodiment of the present invention;
Fig. 7 is a kind of method flow diagram of the processing method of optional test script according to an embodiment of the present invention;
Fig. 8 is a kind of schematic diagram of the display interface of second test script of optional operation according to an embodiment of the present invention;
Fig. 9 is a kind of method flow diagram of the processing method of optional test script according to an embodiment of the present invention;And
Figure 10 is a kind of apparatus structure schematic diagram of the processing unit of test script according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the method for the processing method of test script is provided, needs to illustrate It is that step shown in the flowchart of the accompanying drawings can execute in a computer system such as a set of computer executable instructions, Also, although logical order is shown in flow charts, and it in some cases, can be to be different from sequence execution herein Shown or described step.
Fig. 1 is the method flow diagram of the processing method of test script according to an embodiment of the present invention, as shown in Figure 1, the party Method includes the following steps:
Step S102 obtains the first test script, wherein the first test script is for surveying the program of first version Examination.
It should be noted that the program of first version is that the application of legacy version or program, the first test script can be to first The program of version is tested.Specifically, automatic test platform can pass through api interface (Application Programming Interface, the i.e. abbreviation of application programming interface) get the first test script.Wherein, automatic test platform can be with To install software platform on the terminal device, or independently operated hardware platform, above-mentioned terminal can be but unlimited In computer, smart phone etc..
In addition it is also necessary to illustrate, test script corresponding to the application of different editions or program is different, because This needs to be updated test script or modify in the case where change has occurred in application or program, so that test script energy Application or program are accurately tested.
Step S104 obtains the program of the second edition.
It should be noted that the program of the second edition is updated for the program to first version or modified version institute Corresponding program.
Specifically, user can get multiple equipment by automatic test platform, and determine from multiple equipment to The equipment of test, wherein application in need of test or program are equipped in equipment to be tested.It is to be tested having determined After equipment, the application or program installed in equipment to be tested can be further determined that.
In an alternative embodiment, the interface schematic diagram of a kind of optional automatic test platform as shown in Figure 2, In Fig. 2, tester has selected millet mobile phone as equipment to be tested, and shows on the display interface of automatic test platform Show the relevant parameter of equipment to be tested, for example, the nucleus number of size, CPU and frequency, the size of RAM etc..
In addition it is also necessary to explanation, by the above method, automatic test platform can obtain legacy version (the i.e. first edition Originally program), can also get the program of new version (i.e. the second edition).Wherein, what automatic test platform can be got answers With or program following information: the contents such as application or the content of program, interface element, control mark, control type and screenshot.
The program of the second edition is compared with the program of first version, obtains the program of the second edition by step S106 With the difference of the program of first version.
Specifically, automatic test platform is after the program of the program and the second edition that get first version, to obtaining The information of the program of the program and second edition for the first version got is compared, and obtains the information of the program of two versions Difference for example, getting the screenshot of application or program, and indicates the title of application or program, wherein the screenshot of application or program Type can include but is not limited to installation license, log in judgement, permission pop-up, code keyboard (suitable for financial class using or Program).
It should be noted that automatic test platform can be used the first test script to the second edition application or program into Capable test, and in conjunction with the first test script collected to the letter of the information of the program of first version and the program of the second edition Breath is parsed, so that the difference of the second edition and first version is obtained, it can also be by directly comparing first version and second The application of version or program determine between the two existing difference.
Step S108 is adjusted the first test script according to difference to obtain the second test script, wherein the second test Script is for testing the program of the second edition.
It should be noted that the second test script is obtained by being updated or modify on the basis of the first test script Test script the second test script can be used to test the second edition after obtaining the second test script.
In addition it is also necessary to explanation, in the application or journey of the application or program and the second edition that first version has been determined The difference of sequence and then according to obtained difference to the first test script be updated to obtain be suitable for test the second edition Originally the test script of application or program, without rewriting or recording test script, and then improves automatic test Rate of return on investment.
Based on scheme defined by above-mentioned steps S102 to step S108, it can know, by obtaining the first test script With the program of the second edition, and the program of the second edition is compared with the program of first version, obtains the journey of the second edition The difference of sequence and the program of first version is adjusted the first test script according to difference to obtain the second test script, wherein For testing the program of first version, the second test script is used to carry out the program of the second edition first test script Test.
It is easily noted that, due to being surveyed according to the difference of the program of first version and the program of the second edition to first Training is originally adjusted, so that the second test script tested the program of the second edition is obtained, without compiling again Shell script is write or recorded, cannot be multiplexed so as to avoid the test script in program frequent updating, write before or multiple It is not high with rate, the problem of tester writes a large amount of test scripts is resulted in the need for, and then alleviate the work load of tester.
In addition, above-described embodiment can achieve the purpose of automatic updating test script, surveyed to realize raising automation The technical effect of the rate of return on investment of examination, and then solve due to after application program update, needing to rewrite test foot The lower technical problem of the rate of return on investment of automatic test caused by this is tested.
In an alternative embodiment, the first test script can be obtained by any one following method: passes through record The test operation of user processed obtains the first test script, alternatively, receiving the first test script that user writes.
It should be noted that after obtaining the first test script by the test operation of user or tester, automatically Change test platform to be stored in the first obtained test script under the local predetermined directories of automatic test platform.In addition, After the first test script write is uploaded to automatic test platform by user or tester, automatic test platform is certainly It is dynamic to save the first test script received to local predetermined directories.
Specifically, the schematic diagram of the optional display interface for obtaining test script of one kind as shown in Figure 3, is surveyed in automation After examination platform and equipment to be tested are successfully connected, and get the relevant information of equipment to be tested and be mounted on to be tested set After standby upper application or program, script upload interface is entered, user selects test frame (figure in the script upload interface Appium+Python test frame has been selected in 3), and " select file " button is clicked, it is obtained from the local of automatic test platform Target script (i.e. the first test script) is taken, and clicks " upload " button, selected test script can be uploaded.
After obtaining the first test script, based on the first test script by the journey of the program of the second edition and first version Sequence is compared, and the difference for obtaining the program of the second edition and the program of first version includes: by the program of the second edition and the At least one of of the program of one version is compared to obtain difference: the screenshot of first version, content, element, control mark, Control type.
Specifically, the screenshot type of the screenshot of above-mentioned first version includes installation license, logs in judgement, is permission pop-up, close Code key disk (suitable for financial class application or program), for example, using or program install when, confirm the pop-up interface of installation cut When figure, application or program are run, when confirming that screenshot, application or the program at the pop-up interface of permission log in, pop-up keyboard is not included Login interface screenshot and application or program when logging in, the screenshot of the login interface comprising popping up keyboard.
It should be noted that above-mentioned control type can be but be not limited to button, check box, combo box, forms, rolling Item, progress bar and status bar etc..In addition, each control has a unique mark, i.e. control identifies, wherein control mark Knowledge can be but be not limited to the title of control and the ID of control etc..Above-mentioned element can by but be not limited to apply or program is right Resolution ratio, background color, font demonstration and the position of control at the interface answered etc..The content of above-mentioned application or program include but Content, the function that the number and each display interface for being not limited to each application or the program display interface that is included are included, For example, there is record step number, movement duration and moving line etc. to show boundary for the application of certain movement class or the first version of program Face, and the movement class application or program the second edition be added on the basis of first version with amusement function (for example, The functions such as chat, listen to music, sharing) display interface.
In an alternative embodiment, the method stream of the processing method of a kind of optional test script as shown in Figure 4 Cheng Tu, is adjusted to obtain the second test script and specifically comprises the following steps: according to difference to the first test script
Step S402, the program based on the second edition play back the first test script, obtain playback result;
Step S404 is adjusted the script information in the first test script to obtain according to playback result and difference Two test scripts, wherein script information includes at least one of: the movement of execution, the object elements of movement, object elements Parameter.
Specifically, tester is surveyed by automatic test platform using first after getting the first test script This tests the program of the second edition for training, due to the program of the second edition and the program difference of first version, because This, during program of first test script to the second edition is tested, automatic test platform can prompt to test out The problems such as wrong, at this point, automatic test platform is adjusted the script information of the first test script, so as to the second edition Test can be normally carried out, and by used in adjustment process to parameter preserve.For example, in the program of first version Or the position of " pause " button is (A1, B1) on the display interface of application, and display circle of the program or application in the second edition The position of " pause " button is (A2, B2) on face, when the first test script is tested in the program or application to the second edition When, " pause " button is not detected on the position (A1, B1), and " pause " button is detected on the position (A2, B2), this When, location parameter corresponding to " pause " button in the first test script is revised as (A2, B2) by automatic test platform.
In another example user's adopting consecutive click chemical reaction on the display interface of the program or application of first version " suspends " button i.e. twice Video being played on or audio can be exited, the time interval clicked twice is less than C1 seconds, and in the program of the second edition or answers On display interface, the time interval clicked twice in succession is less than C2 seconds, wherein C1 is not identical as C2.It is surveyed using first Training this when testing the program or application of the second edition, automatic test platform is by company corresponding to the first test script The interval time that continuous click " suspends " button twice is revised as C2 seconds.
Have there is also a kind of application scenarios, on the display interface of the program or application of first version " pause " button with " stopping " button, and only there is " pause " button on the display interface of the program or application of the second edition, user is in the second edition Program or application display interface on by double-clicking " pause " button the function of " stopping " button can be completed, i.e., " suspend " and press Button is provided with the function of " stopping " button.Therefore, it is surveyed using program or application of first test script to the second edition When examination, automatic test platform can will be revised as to double-click " pause " button the detection of " stopping " button in the first test script Detection, the detection to the position of " stopping " button will be deleted.
In an alternative embodiment, a kind of interface that optionally test script is updated as shown in Figure 5 Schematic diagram, after the difference of the program or application of the program or application and the second edition that obtain first version, automatic test First test script is included in the list (being not shown in Fig. 5) of " scalable script " by platform, and tester can be from " scalable Selection script to be upgraded in script " clicks upload button, i.e., the upgrading of executable test script.Wherein, the progress in Fig. 5 The upgrading progress of item expression test script.If test script upgrading failure, such as the uiscript.zip test script in Fig. 5, Warning prompt icon is had before the title of test script, meanwhile, there is the button of " checking log " in the side of upgrade button, test Personnel can check the log of upgrading by click " checking log " button, in order to which tester quickly can search and analyze The reason of upgrading failure.In addition, tester again can also rise test script by continuing to click " upgrading " button Grade.It should be noted that the test script after upgrading is included in " Available scripts " column automatically after test script upgrades successfully In table (being not shown in Fig. 5).
It should be noted that the parameter of above-mentioned object elements can include but is not limited to position and the category of object elements Property, the movement of above-mentioned execution includes at least the type of execution movement and the execution step of movement.
In addition it is also necessary to which explanation, after obtaining the first test script, can be obtained above-mentioned based on the first test script The script information of first test script, wherein Fig. 6 shows a kind of method flow of the processing method of optional test script Figure, as shown in fig. 6, this method specifically comprises the following steps:
Step S602 plays back the first test script;
Step S604 obtains the script information of the first test script during playback.
In addition, automatic test platform is in script information after the script information for obtaining the first test script Hold and classification preservation is carried out according to the relationship of object elements.
It should be noted that by carrying out classification preservation to script information, by first version application or program with It, can be according to object in the first test script when the application of the second edition or the difference of program are adjusted the first test script Member usually determines the type of script information, and determines according to the type of script information movement, the movement of the execution in script information Object elements and object elements parameter, and then the first test script is adjusted.It is easily noted that, due to right Script information is classified preservation, therefore, as long as can rapidly find corresponding script according to the relationship of object elements Information, to obtain script information, further improves processing test without playing back again to the first test script again The speed of script.
In an alternative embodiment, the first test script is being adjusted according to difference to obtain the second test script Later, the second test script can be run, that is, runs promoted test script.Wherein, Fig. 7 shows a kind of optional test The method flow diagram of the processing method of script, as shown in fig. 7, this method specifically comprises the following steps:
Step S702, the program based on the second edition play back the second test script;
Step S704 obtains the script information of the second test script in replayed section;
Step S706 carries out classification guarantor to the content in the script information of the second test script according to the relationship of element object It deposits.
It is right it should be noted that identical as the processing method to the first test script, then after obtaining the second test script Second test script, which carries out playback, can be obtained the script information of the second test script, while can also be to the second obtained test foot This script information carries out classification preservation, and processing method is identical as the processing method to the first test script, no longer superfluous herein It states.
In an alternative embodiment, the display interface of one kind the second test script of optional operation as shown in Figure 8 Schematic diagram, after obtaining the second test script (upgrade after the first test script), tester can pass through available foot This list selection target script (needs the test script tested the application of the second edition or program, selects in Fig. 8 Appium-ios.zip test script), and " next step " is clicked, target device in need of test is selected, is automated Test.
In an alternative embodiment, after obtaining the second test script, based on the second test script to second The program of version is tested, and obtains test result, and whether just to confirm the adjustment to the first test script according to test result Really, it is highlighted in the incorrect position of adjustment.Specifically, being adjusted to obtain the second test to the first test script After script, tested using program of second test script to the second edition, if during the test, the second test Script cannot be executed correctly, for example, there is exception during the second test script executes, at this point, confirmation is surveyed to first The adjustment of training sheet is incorrect, and marks in the code of the first test script and abnormal position occur, for example, to appearance Abnormal position is highlighted and/or underscore highlights, and tester can be quickly fixed according to highlighted code It modifies to the position for exception occur, and to there is abnormal code position.
In a kind of preferred embodiment, a kind of method stream of the processing method of optional test script as shown in Figure 9 Cheng Tu, in Fig. 9, test platform is automatic test platform, and old edition APK is the application or program of above-mentioned first version, new edition APK is the application or program of the second edition, and old edition automatized script is the first test script, and the new script after upgrading is the second survey Training sheet.Specifically, old edition APK can be uploaded to test platform by external interface by tester, and pass through automatic test Platform chooses smart phone to be tested, clicks on automatic test platform and records button, completes to the script of old edition APK It records, and generates old edition automatized script, then old edition automatized script is played back to obtain and be automated with old edition to old edition APK The corresponding script information of script.Meanwhile automatic test platform also receives the new edition APK of tester's upload, and selects new APK is to upgrade old edition automatized script for version.Obtaining old edition automatized script and old edition automatized script is corresponding After script information, new edition APK is played back by external interface, obtains comparison result, and according to comparison result to old edition Script carries out variable replacement, the new script after being upgraded, and the new script after upgrading finally can be used carries out new edition APK automatic Change test.
It should be noted that the application of above-mentioned first version or the application of program and the second edition or program, including but The application for being not limited to develop under android system or program and the application developed under iOS system or program (for example, .IPA the application or program of format).
Embodiment 2
According to embodiments of the present invention, a kind of Installation practice of the processing unit of test script is additionally provided.
Figure 10 is the apparatus structure schematic diagram of the processing unit of test script according to an embodiment of the present invention, such as Figure 10 institute Show, which includes: that the first acquisition module 1001, second obtains module 1003, contrast module 1005 and adjustment module 1007.
Wherein, first module 1001 is obtained, for obtaining the first test script, wherein the first test script is used for the The program of one version is tested;Second obtains module 1003, for obtaining the program of the second edition;Contrast module 1005 is used In the program of the second edition to be compared with the program of first version, the program of the second edition and the program of first version are obtained Difference;Module 1007 is adjusted, obtains the second test script for being adjusted according to difference to the first test script, wherein Second test script is for testing the program of the second edition.
It should be noted that above-mentioned first obtains the acquisition of module 1001, second module 1003, contrast module 1005 and adjusts Mould preparation block 1007 corresponds to the step S102 to step S108 in embodiment 1, and four modules are shown with what corresponding step was realized Example is identical with application scenarios, but is not limited to the above embodiments 1 disclosure of that.
In an alternative embodiment, contrast module includes: matching module.Wherein, matching module is used for the second edition This program is compared to obtain difference at least one of of the program of first version: the screenshot of first version, content, member Element, control mark, control type.
In an alternative embodiment, the first acquisition module includes: that third obtains module.Wherein, third obtains module, The first test script is obtained for the test operation by recording user, alternatively, receiving the first test script that user writes.
In an alternative embodiment, adjustment module includes: the first playback module and adjusting submodule.Wherein, One playback module plays back the first test script, obtains playback result for the program based on the second edition;Adjustment Module, for being adjusted to obtain the second test foot to the script information in the first test script according to playback result and difference This, wherein script information includes at least one of: the movement of execution, the object elements of movement, the parameter of object elements.
It should be noted that above-mentioned first playback module and adjusting submodule correspond to the step S402 in embodiment 1 To step S404, two modules are identical as example and application scenarios that corresponding step is realized, but are not limited to the above embodiments 1 Disclosure of that.
In an alternative embodiment, the processing unit of test script further include: the second playback module and the 4th obtain Modulus block.Wherein, the second playback module, for being played back to the first test script;4th obtains module, in playback The script information of the first test script is obtained in the process.
It should be noted that above-mentioned second playback module and the 4th acquisition module correspond to the step in embodiment 1 S602 to step S604, two modules are identical as example and application scenarios that corresponding step is realized, but are not limited to above-mentioned reality Apply 1 disclosure of that of example.
In an alternative embodiment, the processing unit of test script further include: the first preserving module.Wherein, first Preserving module, for carrying out classification preservation according to the relationship of object elements to the content in script information.
In an alternative embodiment, the processing unit of test script further include: third playback module, the 5th obtain mould Block and the second preserving module.Wherein, third playback module, for the program based on the second edition, to the second test script into Row playback;5th obtains module, for obtaining the script information of the second test script in replayed section;Second preserving module, For carrying out classification preservation to the content in the script information of the second test script according to the relationship of element object.
Implement it should be noted that above-mentioned third playback module, the 5th acquisition module and the second preserving module correspond to Step S702 to step S706 in example 1, three modules are identical as example and application scenarios that corresponding step is realized, but not It is limited to 1 disclosure of that of above-described embodiment.
Embodiment 3
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, which includes storage Program, wherein program executes the processing method of the test script in embodiment 1.
Embodiment 4
According to another aspect of an embodiment of the present invention, a kind of processor is additionally provided, which is used to run program, In, the processing method of the test script in embodiment 1 is executed when program is run.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, 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 sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (10)

1. a kind of processing method of test script characterized by comprising
Obtain the first test script, wherein first test script is for testing the program of first version;
Obtain the program of the second edition;
The program of the second edition is compared with the program of the first version, obtain the program of the second edition with The difference of the program of the first version;
First test script is adjusted to obtain the second test script according to the difference, wherein second test Script is for testing the described program of the second edition.
2. the method according to claim 1, wherein by the described program of the second edition and the first edition This program is compared, and obtains the difference packet of the described program of the second edition and the described program of the first version It includes:
The described program of the second edition is compared at least one of of the described program of the first version To the difference: the screenshot of the first version, content, element, control mark, control type.
3. the method according to claim 1, wherein the first test script of acquisition includes:
Test operation by recording user obtains first test script, surveys alternatively, receiving user writes described first Training sheet.
4. the method according to claim 1, wherein being adjusted according to the difference to first test script Whole second test script that obtains includes:
Based on the program of the second edition, first test script is played back, playback result is obtained;
The script information in first test script is adjusted to obtain institute according to the playback result and the difference State the second test script, wherein the script information includes at least one of: the movement of execution, the movement object meta The parameter of plain, the described object elements.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
First test script is played back;
The script information of first test script is obtained during playback.
6. according to the method described in claim 5, it is characterized in that, obtain the first test script script information after, institute State method further include:
Classification preservation is carried out according to the relationship of the object elements to the content in the script information.
7. according to the method described in claim 4, it is characterized in that, being carried out according to the difference to first test script After adjustment obtains the second test script, the method also includes:
Based on the program of the second edition, second test script is played back;
The script information of second test script is obtained in replayed section;
Classification preservation is carried out to the content in the script information of second test script according to the relationship of element object.
8. a kind of processing unit of test script characterized by comprising
First obtains module, for obtaining the first test script, wherein first test script is used for the journey to first version Sequence is tested;
Second obtains module, for obtaining the program of the second edition;
Contrast module obtains institute for the described program of the second edition to be compared with the program of the first version State the difference of the described program of the second edition and the described program of the first version;
Module is adjusted, for being adjusted to obtain the second test script to first test script according to the difference, wherein Second test script is for testing the described program of the second edition.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein described program right of execution Benefit require any one of 1 to 7 described in test script processing method.
10. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run Benefit require any one of 1 to 7 described in test script processing method.
CN201710683420.8A 2017-08-10 2017-08-10 The treating method and apparatus of test script Pending CN109388555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710683420.8A CN109388555A (en) 2017-08-10 2017-08-10 The treating method and apparatus of test script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710683420.8A CN109388555A (en) 2017-08-10 2017-08-10 The treating method and apparatus of test script

Publications (1)

Publication Number Publication Date
CN109388555A true CN109388555A (en) 2019-02-26

Family

ID=65415196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710683420.8A Pending CN109388555A (en) 2017-08-10 2017-08-10 The treating method and apparatus of test script

Country Status (1)

Country Link
CN (1) CN109388555A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597119A (en) * 2020-05-26 2020-08-28 博彦集智科技有限公司 Test script updating method and device, storage medium and processor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616018A (en) * 2008-06-27 2009-12-30 中兴通讯股份有限公司 The method of upgrading network management software and device
CN101620563A (en) * 2008-06-30 2010-01-06 福建升腾资讯有限公司 Method and system for automatically testing input playback mode of terminal system
US20100192128A1 (en) * 2009-01-27 2010-07-29 Honeywell International Inc. System and methods of using test points and signal overrides in requirements-based test generation
CN106021103A (en) * 2016-05-16 2016-10-12 南京大学 Code change-based mobile application test script automatic maintenance method
CN106407124A (en) * 2016-11-10 2017-02-15 中国工商银行股份有限公司 Automated testing method and system of program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616018A (en) * 2008-06-27 2009-12-30 中兴通讯股份有限公司 The method of upgrading network management software and device
CN101620563A (en) * 2008-06-30 2010-01-06 福建升腾资讯有限公司 Method and system for automatically testing input playback mode of terminal system
US20100192128A1 (en) * 2009-01-27 2010-07-29 Honeywell International Inc. System and methods of using test points and signal overrides in requirements-based test generation
CN106021103A (en) * 2016-05-16 2016-10-12 南京大学 Code change-based mobile application test script automatic maintenance method
CN106407124A (en) * 2016-11-10 2017-02-15 中国工商银行股份有限公司 Automated testing method and system of program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597119A (en) * 2020-05-26 2020-08-28 博彦集智科技有限公司 Test script updating method and device, storage medium and processor

Similar Documents

Publication Publication Date Title
US7458064B2 (en) Methods and apparatus for generating a work item in a bug tracking system
CN109726099B (en) Application gray level publishing method, device and equipment
US11520693B2 (en) Method, apparatus, and system for blaming a test case/class for a survived mutation
US9465718B2 (en) Filter generation for load testing managed environments
CN106294133B (en) A kind of detection method, relevant apparatus and the system of application program installation kit
CN108536593A (en) CS Framework Softwares automated testing method based on UI and system
CN108920359B (en) Application program testing method and device, storage medium and electronic device
CN103399814B (en) The method and device of automatic test
CN104899132B (en) Application software testing method, apparatus and system
US11194596B2 (en) Simulating human interface interaction resilient to user interface changes
CN108491321A (en) test case range determining method, device and storage medium
CN109710528A (en) A kind of test script generation method, device, equipment and medium
CN108132887A (en) User interface method of calibration, device, software testing system, terminal and medium
CN109885480A (en) A kind of automatic interface compatibility test method and device based on debugging bridge
CN108207119A (en) To damaging the identification based on machine learning of network connection
CN106681746A (en) Mobile application program pop-up window display method, mobile terminal and system
CN107704389B (en) Page testing method and device
US10990507B2 (en) System and method for provisioning a virtual machine test environment
CN109388555A (en) The treating method and apparatus of test script
CN107590064A (en) A kind of application upgrade method of testing, device and system
CN108595332A (en) Method for testing software and device
CN104166541B (en) Method and apparatus for updating tested widget library
CN102681869A (en) Updating a web package within a manufacturing execution system
CN103164629B (en) A kind of automatic scoring method of Flash software operative skill
CN110162463A (en) Method for testing software, device and electronic equipment based on automated test tool

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190226

RJ01 Rejection of invention patent application after publication