CN109977011A - Automatic generation method, device, storage medium and the electronic equipment of test script - Google Patents
Automatic generation method, device, storage medium and the electronic equipment of test script Download PDFInfo
- Publication number
- CN109977011A CN109977011A CN201910203340.7A CN201910203340A CN109977011A CN 109977011 A CN109977011 A CN 109977011A CN 201910203340 A CN201910203340 A CN 201910203340A CN 109977011 A CN109977011 A CN 109977011A
- Authority
- CN
- China
- Prior art keywords
- information
- automatic test
- interface information
- test script
- model
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 191
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000008569 process Effects 0.000 claims abstract description 20
- 238000013528 artificial neural network Methods 0.000 claims description 12
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 238000012549 training Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 claims description 5
- 238000012956 testing procedure Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 230000008859 change Effects 0.000 description 5
- 230000006854 communication Effects 0.000 description 4
- 230000007547 defect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000009227 behaviour therapy Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000001556 precipitation Methods 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test 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)
- Debugging And Monitoring (AREA)
Abstract
The present invention provides a kind of automatic generation method of test script, the automatically generating device of test script, computer readable storage medium and electronic equipments, this method comprises: calling interface information identification model, current interface information is identified, the corresponding progress information of the current interface information is obtained;According to the progress information, automatic test model is called, and the corresponding automatic test script information of the progress information is obtained according to the automatic test model;According to the automatic test script information, automatic test is carried out to the current interface information.Technical solution of the present invention can not only simplify testing procedure, improve the intelligence degree of test process, and can be improved testing efficiency.
Description
Technical field
The present invention relates to technical field of data processing, automatic generation method, survey in particular to a kind of test script
Automatically generating device, computer readable storage medium and the electronic equipment of training sheet.
Background technique
With flourishing for Internet technology, various application programs are come into being, and software test is in this process
It plays an important role.Software test is the important ring in software life-cycle, and test process is more complicated.Thus,
How to simplify test process in the case where guaranteeing software test accuracy rate, becomes Software Industry focus of attention problem.
In the prior art, for the test of software or code, test code is voluntarily finished generally by developer,
And artificial real-time control and the execution step for adjusting code, test each script one by one.Thus, the intelligence of test
It can change that degree is lower, and testing efficiency is lower.
Therefore, the intelligence degree of test script generation method in the prior art and testing efficiency are to be improved.
It should be noted that information is only used for reinforcing the reason to background of the invention disclosed in above-mentioned background technology part
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The automatic life of the automatic generation method for being designed to provide a kind of test script, test script of the embodiment of the present invention
At device, computer readable storage medium and electronic equipment, and then test in the prior art is overcome at least to a certain extent
The automatic generation method of script is time-consuming and laborious, intelligence degree is lower and the lower defect of testing efficiency.
Other characteristics and advantages of the invention will be apparent from by the following detailed description, or partially by the present invention
Practice and acquistion.
According to a first aspect of the embodiments of the present invention, a kind of automatic generation method of test script is provided, comprising: call
Interface information identification model identifies current interface information, obtains the corresponding progress information of the current interface information;Root
According to the progress information, automatic test model is called, and the progress information pair is obtained according to the automatic test model
The automatic test script information answered;According to the automatic test script information, the current interface information is carried out automatic
Change test.
In some embodiments of the invention, aforementioned schemes are based on, the current interface information to system identifies,
Obtain the corresponding progress information of the current interface information, comprising: know interface information described in the current interface information input
In other model, code information is obtained;The code information is parsed, the corresponding progress information of the current interface information is obtained.
In some embodiments of the invention, aforementioned schemes are based on, the parsing code information obtains described current
The corresponding progress information of interface information, comprising: the code information is encoded, semantic vector is obtained;By it is described it is semantic to
Amount is compared with the default vector in database, obtains at least one semantic similarity numerical value;According at least one described language
Adopted similarity numerical value obtains the corresponding progress information of the current interface information.
In some embodiments of the invention, aforementioned schemes, described at least one semantic similarity number according to are based on
Value, obtains the corresponding progress information of the current interface information, comprising: compares at least one described semantic similarity numerical value, obtains
To maximum semantic similarity numerical value;Obtain the corresponding default vector of the maximum semantic similarity numerical value it is semantic as it is described into
Journey information.
In some embodiments of the invention, aforementioned schemes are based on, it is described according to the progress information, call automation to survey
Die trial type, and the corresponding automatic test script information of the progress information is obtained according to the automatic test model, comprising:
The progress information is inputted into automatic test neural network algorithm model, is obtained according to the output of the automatic test model
The corresponding automatic test script information of the progress information.
In some embodiments of the invention, aforementioned schemes are based on, further includes: obtain the sample number of magnanimity automatic test
According to the sample data includes progress information and automatic test script information;Sample based on the magnanimity automatic test
Data train neural network algorithm model, obtain automatic test model.
In some embodiments of the invention, aforementioned schemes are based on, further includes: obtain the sample of magnanimity interface information identification
Data;Sample data training neural network algorithm model based on magnanimity interface information identification, obtains interface information identification
Model.
According to a second aspect of the embodiments of the present invention, a kind of automatically generating device of test script is provided, comprising: first
Calling module identifies current interface information for calling interface information identification model, obtains the current interface information
Corresponding progress information;Second calling module, for calling automatic test model according to the progress information, and according to institute
It states automatic test model and obtains the corresponding automatic test script information of the progress information;Test module, for according to institute
Automatic test script information is stated, automatic test is carried out to the code in the current interface information.
According to a third aspect of the embodiments of the present invention, a kind of computer readable storage medium is provided, meter is stored thereon with
Calculation machine program realizes the automatic of the test script as described in first aspect in above-described embodiment when described program is executed by processor
Generation method.
According to a fourth aspect of the embodiments of the present invention, a kind of electronic equipment is provided, comprising: one or more processors;
Storage device, for storing one or more programs, when one or more of programs are held by one or more of processors
When row, so that one or more of processors realize the automatic life of the test script as described in first aspect in above-described embodiment
At method.
Technical solution provided in an embodiment of the present invention can include the following benefits:
In the technical solution provided by some embodiments of the present invention, on the one hand, by calling interface information to identify mould
Type identifies current interface information, obtains the corresponding progress information of the current interface information, can be directed to a variety of differences
The interface information of situation is identified, and updates corresponding progress information;On the other hand, it according to the progress information, adjusts
The corresponding automatic test script of the progress information is obtained with automatic test model, and according to the automatic test model
Information can be avoided and write the defect that the step of test script may cause is cumbersome, time-consuming and laborious manually, thus, effectively promoted
The execution speed of automatic test;Further, according to the automatic test script information, to the current interface information into
Row automatic test executes the next according to the actual situation of test process intelligence automatically, improves the intelligence of test
Degree and testing efficiency.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 diagrammatically illustrates the automatic generation method flow chart of the test script of embodiment according to the present invention;
Fig. 2 diagrammatically illustrates the automatic generation method flow chart of test script according to another embodiment of the present invention;
Fig. 3 diagrammatically illustrates the automatic generation method flow chart of the test script of another embodiment according to the present invention;
Fig. 4 diagrammatically illustrates the automatic generation method flow chart of test script according to still another embodiment of the invention;
Fig. 5 diagrammatically illustrates the automatic generation method flow chart of the test script of an embodiment according to the present invention;
Fig. 6 diagrammatically illustrates the automatically generating device block diagram of the test script of embodiment according to the present invention;
Fig. 7 shows the structural schematic diagram for being suitable for the computer system for the electronic equipment for being used to realize the embodiment of the present invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner
In example.In the following description, many details are provided to provide and fully understand to the embodiment of the present invention.However,
It will be appreciated by persons skilled in the art that technical solution of the present invention can be practiced without one or more in specific detail,
Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side
Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity.
I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit
These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step,
It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close
And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
In the prior art, for the test of software, test code is voluntarily finished generally by developer, and artificial
Real-time control and the execution step for adjusting code, test each script one by one, and the workload of software test is very big,
Many steps in test process be it is repeated, non-intelligence and non-creative, thus, test process is time-consuming and laborious,
The intelligence degree of very complicated, test is lower, and testing efficiency is lower.Therefore, using test script in the prior art
Automatic generation method can not carry out validity test to software, and intelligence degree and testing efficiency are to be improved.
In the present embodiment, a kind of automatic generation method of test script is provided firstly, at least to a certain extent gram
Take that the automatic generation method of test script provided in the prior art is time-consuming and laborious, intelligence degree is lower and testing efficiency compared with
Low defect.
Fig. 1 diagrammatically illustrates the automatic generation method flow chart of test script according to an embodiment of the invention,
The executing subject of the automatic generation method of the test script can be automatically generated the server of test script.
With reference to Fig. 1, the automatic generation method of test script according to an embodiment of the invention the following steps are included:
Step S110 calls interface information identification model, identifies to current interface information, obtain the current interface
The corresponding progress information of information;
Step S120 calls automatic test model according to the progress information, and according to the automatic test model
Obtain the corresponding automatic test script information of the progress information;
Step S130 carries out automatic test to the current interface information according to the automatic test script information.
In technical solution provided by embodiment shown in Fig. 1, on the one hand, right by calling interface information identification model
Current interface information is identified, the corresponding progress information of the current interface information is obtained, and can be directed to a variety of different situations
Interface information identified, and update corresponding progress information;On the other hand, it according to the progress information, calls certainly
Dynamicization test model, and the corresponding automatic test script of the progress information is obtained according to the automatic test model and is believed
Breath, can be avoided and write the defect that the step of test script may cause is cumbersome, time-consuming and laborious manually, thus, it is effectively promoted certainly
The execution speed of dynamicization test;Further, according to the automatic test script information, the current interface information is carried out
Automatic test executes the next according to the actual situation of test process intelligence automatically, improves the intelligent journey of test
Degree and testing efficiency.
The specific implementation process of each step in Fig. 1 is described in detail below:
In the exemplary embodiment, the technical program provides a kind of interface information identification model.Fig. 2 is schematically shown
The automatic generation method flow chart of test script according to another embodiment of the present invention, specifically illustrates and is obtained according to sample data
To the flow chart of interface information identification model, below in conjunction with Fig. 2 to specific implementation the step of obtaining interface information identification model
Mode is illustrated.
In step s 201, the sample data of magnanimity interface information identification is obtained.
In the exemplary embodiment, interface, that is, active user can see, the window being shown on device screen;Boundary
Face information can be information composed by the display content of current window, such as: picture, text and the number that current interface is shown
Word etc..
In the exemplary embodiment, need to obtain the sample data of the interface information identification of magnanimity, sample data can be with
It is the process identified for different interface information and corresponding recognition result, such as: it is digital phase for interface information
Corresponding different identification process and recognition result;Or when for interface information being text accordingly different identification process with
And recognition result;It or for interface information is corresponding different identification process and to identify knot in the presence of text is common with number
Fruit.
In step S202, the sample data training neural network algorithm model based on magnanimity interface information identification,
Obtain interface information identification model.
In the exemplary embodiment, after the sample data for getting the identification of magnanimity interface information, can be based on should
The sample data training neural network algorithm model of magnanimity interface information identification passes through sea to obtain interface information identification model
The sample data of amount interface information identification can guarantee the accuracy of recognition result, and then can guarantee to identify by interface information
Model obtains the accuracy of interface recognition result.
In the exemplary embodiment, the technical program additionally provides a kind of automatic test model.Fig. 3 is schematically shown
The automatic generation method flow chart of the test script of another embodiment according to the present invention, specifically illustrates and is obtained according to sample data
To the flow chart of automatic test model, below in conjunction with Fig. 3 to specific embodiment the step of obtaining automatic test model
It is illustrated.
In step S301, obtain magnanimity automatic test sample data, the sample data include progress information and
Automatic test script information.
In the exemplary embodiment, automatic test is the behavioral test taking human as driving to be converted into what machine executed
A kind of process.
In the exemplary embodiment, need to obtain the sample data of magnanimity automatic test, sample data may include
Progress information and automatic test script information, progress information, that is, current interface program process, automatic test script information
That is the corresponding test script of current progress information, the series of instructions of a test script i.e. fc-specific test FC, these instructions can be with
The testing tool that is automated executes.
In step s 302, the sample data training neural network algorithm model based on the magnanimity automatic test, obtains
To automatic test model.
In the exemplary embodiment, after the sample data for getting magnanimity automatic test, magnanimity can be based on
The sample data training neural network algorithm model of automatic test, to obtain automatic test model.It is automated by magnanimity
Test sample data can guarantee to obtain the accuracy of automatic test result by automatic test model.
Determine that interface information identification model and automation are surveyed to the technical solution that embodiment illustrated in fig. 3 provides according to fig. 2
After die trial type, it can identify current progress information by calling interface information identification model, in turn, be believed based on process
Breath calls automatic test model, obtains automatic test script information, in turn, can be according to automatic test script information pair
Interface information carries out automatic test.Specifically, it continues to refer to figure 1.
In step s 110, interface information identification model is called, current interface information is identified, is obtained described current
The corresponding progress information of interface information.
In the exemplary embodiment, Fig. 4 diagrammatically illustrates test script according to still another embodiment of the invention
The flow chart of automatic generation method specifically illustrates and obtains the flow chart of progress information according to current interface information, below in conjunction with Fig. 4
Step S110 is illustrated.
In step S401, code letter in interface information identification model described in the current interface information input, will be obtained
Breath.
It in the exemplary embodiment, can be by current interface information (such as: current interface images) input interface
In identification model, identification by interface identification model to current interface information, the code information of available current interface.
In step S402, the code information is parsed, obtains the corresponding progress information of the current interface information.
In the exemplary embodiment, Fig. 5 diagrammatically illustrates oneself of the test script of an embodiment according to the present invention
The flow chart of dynamic generation method, specifically illustrates parsing code information, obtains the process of the corresponding progress information of current interface information
Figure, is illustrated step S110 below in conjunction with Fig. 5.
In step S501, the code information is encoded, semantic vector is obtained.
In the exemplary embodiment, semantic vector be server can identify, the vector for indicating code information,
It can be umerical vector;Corresponding semantic vector can be obtained by encoding to code information.Such as: it can
Word the is encoded to vector [0.4,0.3], number 6 can be encoded to vector [2.1,3.3], specific coding rule
And encoding value can sets itself according to the actual situation, belong to the scope of protection of the present invention.
In step S502, the semantic vector is compared with the default vector in database, obtains at least one
Semantic similarity numerical value.
It in the exemplary embodiment, can will be default in semantic vector and database after obtaining semantic vector
Vector is compared, and obtains multiple semantic similarity numerical value.Such as: word the coding after corresponding semantic vector be [0.4,
0.3], the default semantic vector and in database has multiple, can be [0.8,0.7], [0.6,0.9], [0.41,0.32] etc.
Deng, then semantic vector [0.4,0.3] can be compared with the default semantic vector in database, it is in turn, available more
A semantic similarity numerical value;Such as: it is similar that semantic vector [0.4,0.3] compares obtained semanteme with default vector [0.8,0.7]
Angle value is 40%, and it is 50% that semantic vector [0.4,0.3], which compares obtained semantic similarity value with default vector [0.6,0.9],
It is 90% that semantic vector [0.4,0.3] and default vector [0.41,0.32], which compare obtained semantic similarity value,.
In step S503, at least one described semantic similarity numerical value is compared, maximum semantic similarity numerical value is obtained.
In the exemplary embodiment, process is the implementation progress of program, and progress information can be the execution of current interface
Progress.
In the exemplary embodiment, the multiple semantic similarity numerical value that can be compared obtain maximum semantic similar
Degree value.It can be determined with reference to the corresponding relevant explanation of above-mentioned steps S502 by comparing at least one semantic similarity numerical value
Maximum semantic similarity numerical value is 90% out.
In step S504, obtain the corresponding default vector of the maximum semantic similarity numerical value it is semantic as it is described into
Journey information.
In the exemplary embodiment, the semantic conduct of the corresponding default vector of available maximum semantic similarity numerical value
Progress information.Such as: the above-mentioned maximum semantic similarity numerical value 90% got, 90% corresponding default vector be [0.41,
0.32], and [0.41,0.32] it is corresponding it is semantic be the, then can be using the as progress information;Illustratively, if code
Information is a word or a code, can also be encoded in the same way to it, in turn, the multiple languages that will be obtained
Justice combines, to obtain the progress information of current interface.
It continues to refer to figure 1, in the step s 120, according to the progress information, calls automatic test model, and according to institute
It states automatic test model and obtains the corresponding automatic test script information of the progress information.
In the exemplary embodiment, after obtaining progress information, automatic test model can be called, is obtained current
Progress information is inputted automatic test neural network algorithm model by the corresponding automatic test script information of progress information,
The corresponding automatic test script information of the progress information is obtained according to the output of the automatic test model.Such as: solution
The progress information of precipitation is that current code compiling has executed completion, needs to enter the debugging stage, it is possible to obtain accordingly
To debugging script information.
In step s 130, according to the automatic test script information, the current interface information is automated
Test.
In the exemplary embodiment, can based on obtained automatic test script information, to current interface information into
Row automatic test.Such as: it, can be to working as after getting debugging script information with reference to the relevant explanation in step S120
Front interface information carries out automation debugging.
The device of the invention embodiment introduced below can be used for executing automatically generating for the above-mentioned test script of the present invention
Method.
Fig. 6 diagrammatically illustrates the automatically generating device block diagram of test script according to an embodiment of the invention, should
The automatically generating device of test script can be set in the server for automatically generating test script.
Referring to shown in Fig. 6, the automatically generating device block diagram 600 of test script according to an embodiment of the invention, packet
Include following module: the first calling module 601, the second calling module 602 and test module 603 are illustrated in detailed below:
First calling module 601 identifies current interface information, obtains for calling interface information identification model
The corresponding progress information of the current interface information.
In the exemplary embodiment, the first calling module is used for interface information described in the current interface information input
In identification model, code information is obtained;The code information is parsed, the corresponding progress information of the current interface information is obtained.
Second calling module 602, for according to the progress information, calling automatic test model, and according to it is described from
Dynamicization test model obtains the corresponding automatic test script information of the progress information.
In the exemplary embodiment, the second calling module is used for after obtaining progress information, can call automation
Test model obtains the corresponding automatic test script information of current progress information, i.e., progress information is inputted automatic test
Neural network algorithm model obtains the corresponding automatic test of the progress information according to the output of the automatic test model
Script information.Such as: the progress information parsed is that current code compiling has executed completion, needs to enter the debugging stage, that
, debugging script information can be got accordingly.
Test module 603 is used for according to the automatic test script information, to the code in the current interface information
Carry out automatic test.
In the exemplary embodiment, test module is used for based on obtained automatic test script information, to working as prezone
The conscientious automatic test of face information.Such as: after getting debugging script information, current interface information can be carried out automatic
Change debugging.
Due to each functional module and above-mentioned survey of the automatically generating device of the test script of example embodiments of the present invention
The step of example embodiment of the automatic generation method of training sheet, is corresponding, therefore for undisclosed in apparatus of the present invention embodiment
Details please refers to the embodiment of the automatic generation method of the above-mentioned test script of the present invention.
Below with reference to Fig. 7, it illustrates the computer systems 700 for the electronic equipment for being suitable for being used to realize the embodiment of the present invention
Structural schematic diagram.The computer system 700 of electronic equipment shown in Fig. 7 is only an example, should not be to the embodiment of the present invention
Function and use scope bring any restrictions.
As shown in fig. 7, computer system 700 includes central processing unit (CPU) 701, it can be read-only according to being stored in
Program in memory (ROM) 702 or be loaded into the program in random access storage device (RAM) 703 from storage section 708 and
Execute various movements appropriate and processing.In RAM 703, it is also stored with various programs and data needed for system operatio.CPU
701, ROM 702 and RAM 703 is connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to bus
704。
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.;
And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because
The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon
Computer program be mounted into storage section 708 as needed.
Particularly, according to an embodiment of the invention, may be implemented as computer above with reference to the process of flow chart description
Software program.For example, the embodiment of the present invention includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 709, and/or from detachable media
711 are mounted.When the computer program is executed by central processing unit (CPU) 701, executes and limited in the system of the application
Above-mentioned function.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium can be for example but not limited to
Electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.It is computer-readable
The more specific example of storage medium can include but is not limited to: have electrical connection, the portable computing of one or more conducting wires
Machine disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM
Or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned
Any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage program it is tangible
Medium, the program can be commanded execution system, device or device use or in connection.And in the present invention,
Computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying
Computer-readable program code.The data-signal of this propagation can take various forms, and including but not limited to electromagnetism is believed
Number, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable storage medium
Any computer-readable medium other than matter, the computer-readable medium can be sent, propagated or transmitted for being held by instruction
Row system, device or device use or program in connection.The program code for including on computer-readable medium
It can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. or above-mentioned any conjunction
Suitable combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part realizes that described unit also can be set in the processor.Wherein, the title of these units is in certain situation
Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer readable storage medium, the computer-readable storage mediums
Matter can be included in electronic equipment described in above-described embodiment;It is also possible to individualism, and without the supplying electricity
In sub- equipment.Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by one
When a electronic equipment executes, so that the electronic equipment realizes the side of automatically generating such as above-mentioned test script as described in the examples
Method.
For example, the electronic equipment may be implemented as shown in Figure 1: step S110 calls interface information to identify mould
Type identifies current interface information, obtains the corresponding progress information of the current interface information;Step S120, according to institute
Progress information is stated, calls automatic test model, and corresponding according to the automatic test model acquisition progress information
Automatic test script information;Step S130 carries out the current interface information according to the automatic test script information
Automatic test.
For another example, each step as shown in any figure of Fig. 2-5 may be implemented in the electronic equipment.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description
Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more
Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould
The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention
The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server, touch control terminal or network equipment etc.) executes embodiment according to the present invention
Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. a kind of automatic generation method of test script characterized by comprising
Call interface information identification model, current interface information is identified, obtain the current interface information it is corresponding into
Journey information;
According to the progress information, automatic test model is called, and the process is obtained according to the automatic test model
The corresponding automatic test script information of information;
According to the automatic test script information, automatic test is carried out to the current interface information.
2. being obtained the method according to claim 1, wherein the current interface information to system identifies
To the corresponding progress information of the current interface information, comprising:
By in interface information identification model described in the current interface information input, code information is obtained;
The code information is parsed, the corresponding progress information of the current interface information is obtained.
3. method according to claim 1 or 2, which is characterized in that the parsing code information obtains described current
The corresponding progress information of interface information, comprising:
The code information is encoded, semantic vector is obtained;
The semantic vector is compared with the default vector in database, obtains at least one semantic similarity numerical value;
According at least one described semantic similarity numerical value, the corresponding progress information of the current interface information is obtained.
4. according to the method described in claim 3, it is characterized in that, described at least one semantic similarity numerical value according to,
Obtain the corresponding progress information of the current interface information, comprising:
At least one described semantic similarity numerical value is compared, maximum semantic similarity numerical value is obtained;
The semanteme of the corresponding default vector of the maximum semantic similarity numerical value is obtained as the progress information.
5. the method according to claim 1, wherein described according to the progress information, calling automatic test
Model, and the corresponding automatic test script information of the progress information is obtained according to the automatic test model, comprising:
The progress information is inputted into automatic test neural network algorithm model, according to the output of the automatic test model
Obtain the corresponding automatic test script information of the progress information.
6. the method according to claim 1, wherein further include:
The sample data of magnanimity automatic test is obtained, the sample data includes progress information and automatic test script letter
Breath;
Sample data training neural network algorithm model based on the magnanimity automatic test, obtains automatic test model.
7. the method according to claim 1, wherein further include:
Obtain the sample data of magnanimity interface information identification;
Sample data training neural network algorithm model based on magnanimity interface information identification, obtains interface information identification mould
Type.
8. a kind of automatically generating device of test script characterized by comprising
First calling module identifies current interface information for calling interface information identification model, obtains described current
The corresponding progress information of interface information;
Second calling module, for calling automatic test model according to the progress information, and according to the automatic test
Model obtains the corresponding automatic test script information of the progress information;
Test module, for being carried out certainly to the code in the current interface information according to the automatic test script information
Dynamicization test.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is by processor
The automatic generation method of the test script as described in any one of claims 1 to 7 is realized when execution.
10. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing
When device executes, so that one or more of processors realize oneself of the test script as described in any one of claims 1 to 7
Dynamic generation method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910203340.7A CN109977011A (en) | 2019-03-18 | 2019-03-18 | Automatic generation method, device, storage medium and the electronic equipment of test script |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910203340.7A CN109977011A (en) | 2019-03-18 | 2019-03-18 | Automatic generation method, device, storage medium and the electronic equipment of test script |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109977011A true CN109977011A (en) | 2019-07-05 |
Family
ID=67079247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910203340.7A Pending CN109977011A (en) | 2019-03-18 | 2019-03-18 | Automatic generation method, device, storage medium and the electronic equipment of test script |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109977011A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112685318A (en) * | 2021-01-07 | 2021-04-20 | 广州三星通信技术研究有限公司 | Method and system for generating test script |
CN113032257A (en) * | 2021-03-19 | 2021-06-25 | 中国工商银行股份有限公司 | Automatic test method, device, computer system and readable storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103268289A (en) * | 2013-06-18 | 2013-08-28 | 北京云测信息技术有限公司 | Method and system for transcribing and applying test script on mobile terminal |
CN104407973A (en) * | 2014-11-25 | 2015-03-11 | 珠海格力电器股份有限公司 | Automatic unit test realizing method and device |
CN106649106A (en) * | 2016-12-09 | 2017-05-10 | 北京锐安科技有限公司 | Test case generation method and device |
CN107368421A (en) * | 2017-07-28 | 2017-11-21 | 北京深思数盾科技股份有限公司 | The method and system of automatic test interface program |
CN107391383A (en) * | 2017-08-11 | 2017-11-24 | 上海巍擎信息技术有限责任公司 | The method of testing and test system of a kind of Application Program Interface |
CN107463500A (en) * | 2017-08-09 | 2017-12-12 | 网易(杭州)网络有限公司 | Adjustment method, medium, system and the computing device of test script |
CN107608877A (en) * | 2017-08-11 | 2018-01-19 | 上海巍擎信息技术有限责任公司 | A kind of automation application program interface method of testing and test system based on machine learning |
CN108897724A (en) * | 2018-07-03 | 2018-11-27 | 天津芯海创科技有限公司 | Function schedule determines method and device |
CN108920376A (en) * | 2018-07-13 | 2018-11-30 | 北京京东金融科技控股有限公司 | Test method, device and the medium of application program |
-
2019
- 2019-03-18 CN CN201910203340.7A patent/CN109977011A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103268289A (en) * | 2013-06-18 | 2013-08-28 | 北京云测信息技术有限公司 | Method and system for transcribing and applying test script on mobile terminal |
CN104407973A (en) * | 2014-11-25 | 2015-03-11 | 珠海格力电器股份有限公司 | Automatic unit test realizing method and device |
CN106649106A (en) * | 2016-12-09 | 2017-05-10 | 北京锐安科技有限公司 | Test case generation method and device |
CN107368421A (en) * | 2017-07-28 | 2017-11-21 | 北京深思数盾科技股份有限公司 | The method and system of automatic test interface program |
CN107463500A (en) * | 2017-08-09 | 2017-12-12 | 网易(杭州)网络有限公司 | Adjustment method, medium, system and the computing device of test script |
CN107391383A (en) * | 2017-08-11 | 2017-11-24 | 上海巍擎信息技术有限责任公司 | The method of testing and test system of a kind of Application Program Interface |
CN107608877A (en) * | 2017-08-11 | 2018-01-19 | 上海巍擎信息技术有限责任公司 | A kind of automation application program interface method of testing and test system based on machine learning |
CN108897724A (en) * | 2018-07-03 | 2018-11-27 | 天津芯海创科技有限公司 | Function schedule determines method and device |
CN108920376A (en) * | 2018-07-13 | 2018-11-30 | 北京京东金融科技控股有限公司 | Test method, device and the medium of application program |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112685318A (en) * | 2021-01-07 | 2021-04-20 | 广州三星通信技术研究有限公司 | Method and system for generating test script |
CN113032257A (en) * | 2021-03-19 | 2021-06-25 | 中国工商银行股份有限公司 | Automatic test method, device, computer system and readable storage medium |
CN113032257B (en) * | 2021-03-19 | 2024-03-01 | 中国工商银行股份有限公司 | Automated testing method, apparatus, computer system, and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109325541A (en) | Method and apparatus for training pattern | |
CN112699991A (en) | Method, electronic device, and computer-readable medium for accelerating information processing for neural network training | |
CN109446099A (en) | Automatic test cases generation method, device, medium and electronic equipment | |
US11106434B1 (en) | Method, device, and computer program product for generating program code | |
US11586817B2 (en) | Word vector retrofitting method and apparatus | |
CN108846440A (en) | Image processing method and device, computer-readable medium and electronic equipment | |
CN108984399A (en) | Detect method, electronic equipment and the computer-readable medium of interface difference | |
CN109614111A (en) | Method and apparatus for generating code | |
CN108830329A (en) | Image processing method and device | |
CN109271403A (en) | A kind of operating method of data query, device, medium and electronic equipment | |
CN109871311A (en) | A kind of method and apparatus for recommending test case | |
CN110119445A (en) | The method and apparatus for generating feature vector and text classification being carried out based on feature vector | |
CN109857388A (en) | Code generating method, device, server and computer-readable medium | |
CN109582954A (en) | Method and apparatus for output information | |
CN109829164A (en) | Method and apparatus for generating text | |
CN112650841A (en) | Information processing method and device and electronic equipment | |
CN113590776A (en) | Text processing method and device based on knowledge graph, electronic equipment and medium | |
CN109960650A (en) | Application assessment method, apparatus, medium and electronic equipment based on big data | |
CN109558605A (en) | Method and apparatus for translating sentence | |
US20220414689A1 (en) | Method and apparatus for training path representation model | |
CN110298615A (en) | For selecting method, apparatus, medium and the calculating equipment of the kinds of goods in warehouse | |
CN110516261A (en) | Resume appraisal procedure, device, electronic equipment and computer storage medium | |
CN109190123A (en) | Method and apparatus for output information | |
CN109977011A (en) | Automatic generation method, device, storage medium and the electronic equipment of test script | |
CN110309293A (en) | Text recommended method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information |
Address after: 201, room 518000, building A, No. 1, front Bay Road, Qianhai Shenzhen Guangdong Shenzhen Hong Kong cooperation zone (Qianhai business secretary) Applicant after: Pingan Pu Hui Enterprise Management Co., Ltd. Address before: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A Applicant before: Pingan Pu Hui Enterprise Management Co., Ltd. |
|
CB02 | Change of applicant information | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |