CN106445818A - Debug method and device for automated scripts based on model driving - Google Patents
Debug method and device for automated scripts based on model driving Download PDFInfo
- Publication number
- CN106445818A CN106445818A CN201610820867.0A CN201610820867A CN106445818A CN 106445818 A CN106445818 A CN 106445818A CN 201610820867 A CN201610820867 A CN 201610820867A CN 106445818 A CN106445818 A CN 106445818A
- Authority
- CN
- China
- Prior art keywords
- script
- mbt
- model
- unit
- automatized
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
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/362—Software debugging
Abstract
The invention discloses a debug method and device for automated scripts based on model driving. The method comprises the steps of using pel of an MBT to generate business logic; generating the automated scripts; embedding script debugging plug-in in an MBT model tool; selecting modified sentences in the scripts, and directly executing the modified sentences on the basis that the executed sentences and environment are reserved in the buffer memory. The debug method and device for automated scripts based on model driven can shorten performance periods of the scripts and a test suite so as to reduce debug time of the whole automation.
Description
Technical field
The invention belongs to software automated testing technical field, more particularly to a kind of automation pin based on model-driven
This adjustment method and device.
Background technology
For software automated testing work, take the most in the whole cycle of automatic test is exactly to automate pin
This debugging, debugging method of the prior art is more single, is in test suite, script to be debugged one by one, if in debugging pin
The data variable of test suite is changed, then test suite will rerun, because test suite wants initialization apparatus during this
Environmental variance and node parameter, therefore run time are all long.
Content of the invention
For solving the above problems, the invention provides a kind of automatized script adjustment method based on model-driven and dress
Put, the run time of script and test suite can be shortened, thus reducing the debug time of whole automation.
A kind of automatized script adjustment method based on model-driven that the present invention provides, including:
Using the pel of MBT, generate service logic;
Generate automatized script;
Script debugging plug-in unit is embedded in MBT modeling tool;
Select amended sentence in described script, the basis retaining in the buffer in the sentence having executed and environment
On, directly execute described amended sentence.
Preferably, above-mentioned based in the automatized script adjustment method of model-driven, described will be embedding for script debugging plug-in unit
Enter and in MBT modeling tool be:
Described script debugging plug-in unit is embedded in described MBT modeling tool in the way of once compiling Dynamic link library.
Preferably, above-mentioned based in the automatized script adjustment method of model-driven, the pel of described utilization MBT, raw
Service logic is become to include:
By the way of xml document, using pel control logic node parameter the opening up to physical node parameter of described MBT
Flutter mapping.
Preferably, above-mentioned based in the automatized script adjustment method of model-driven, the pel of described utilization MBT controls
The Topological Mapping of logical node parameter to physical node parameter includes:
Using dynamic link library, the described script of many-to-one connection execution, while script executes unsuccessfully or completes
Discharge described dynamic link library.
Preferably, above-mentioned based in the automatized script adjustment method of model-driven, in the pel of described utilization MBT,
Before generating service logic, also include:
Reading and writing and the common unit forwarding for data is taken out using Python, wherein, using proxy mode
Realize the forwarding of described data.
A kind of automatized script debugging apparatus based on model-driven that the present invention provides, including:
First signal generating unit, for the pel using MBT, generates service logic;
Second signal generating unit, for generating automatized script;
Embedded unit, for being embedded into script debugging plug-in unit in MBT modeling tool;
Performance element, for selecting amended sentence in described script, in the sentence having executed and environment slow
On the basis of depositing reservation, directly execute described amended sentence.
Preferably, above-mentioned based in the automatized script debugging apparatus of model-driven, described embedded unit specifically for
Described script debugging plug-in unit is embedded in described MBT modeling tool in the way of once compiling Dynamic link library.
Preferably, above-mentioned based in the automatized script debugging apparatus of model-driven, described first signal generating unit is concrete
For, by the way of xml document, the topology using pel control logic node parameter to the physical node parameter of described MBT is reflected
Penetrate.
Preferably, above-mentioned based in the automatized script debugging apparatus of model-driven, described first signal generating unit is concrete
For utilizing dynamic link library, the described script of many-to-one connection execution, discharge while script executes unsuccessfully or completes
Described dynamic link library.
Preferably, above-mentioned based in the automatized script debugging apparatus of model-driven, also include:
Abstraction unit, for taking out reading and writing and the common unit forwarding for data using Python, its
In, the forwarding of described data is realized using proxy mode.
The above-mentioned automatized script adjustment method based on model-driven being provided by foregoing description, the present invention and dress
Put, because the method includes:Using the pel of MBT, generate service logic;Generate automatized script;Will be embedding for script debugging plug-in unit
Enter in MBT modeling tool;Select amended sentence in described script, in the sentence having executed and environment in the buffer
On the basis of reservation, directly execute described amended sentence, therefore, it is possible to shorten the run time of script and test suite, thus
Reduce the debug time of whole automation.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this
Inventive embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing providing obtains other accompanying drawings.
The signal of the first automatized script adjustment method based on model-driven that Fig. 1 provides for the embodiment of the present application
Figure;
The signal of the first automatized script debugging apparatus based on model-driven that Fig. 2 provides for the embodiment of the present application
Figure.
Specific embodiment
The core concept of the present invention is to provide a kind of automatized script adjustment method based on model-driven and device, energy
Enough shorten the run time of script and test suite, thus reducing the debug time of whole automation.
The test object of the method and device is mass memory unit, and the debugging based on model-driven is it is simply that automating
On the basis of script generates, increase substantially the efficiency of script debugging, it is to avoid a large amount of consumptions in automatic test for the script debugging
When, reduce the feedback cycle of the automatic test of software version, changing manual test pattern is full-automatic test pattern.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work
Embodiment, broadly falls into the scope of protection of the invention.
The first automatized script adjustment method based on model-driven that the embodiment of the present application provides is as shown in figure 1, Fig. 1
The schematic diagram of the first the automatized script adjustment method based on model-driven providing for the embodiment of the present application.The method includes
Following steps:
S1:Using the pel of MBT, generate service logic;
It should be noted that MBT therein is Model Based Testing, based on pattern-driven debugging, first have to
Based on the understanding of business model, draw service logic using the pel that MBT enriches.
S2:Generate automatized script;
S3:Script debugging plug-in unit is embedded in MBT modeling tool;
In this step, embedded MBT automation debugging plug-in unit after automatized script generates, this plug-in unit is exactly script debugging core
Heart technology, the design of this plug-in unit considers that the automation of facility environment parameter refreshes, the mapping of apparatus logic parameter and physical parameter,
And service logic again from being dynamically connected.
S4:Select amended sentence in described script, retain in the buffer in the sentence having executed and environment
On the basis of, directly execute described amended sentence.
During actual script debugging, mouse final election amended sentence can be passed through, click directly on operation
Final election sentence just can be only carried out, the assignment having completed in the language of executed before and environment is constant and protects in caching
Stay, thus operational efficiency is significantly lifted.In this case it is possible in the feelings not exclusively running test suite and test script again
Under condition, the sentence of specified modification is run, refresh data and node parameter in facility environment.
The first automatized script based on model-driven above-mentioned being provided by foregoing description, the embodiment of the present application
Adjustment method, due to including:Using the pel of MBT, generate service logic;Generate automatized script;Will be embedding for script debugging plug-in unit
Enter in MBT modeling tool;Select amended sentence in described script, in the sentence having executed and environment in the buffer
On the basis of reservation, directly execute described amended sentence, therefore, it is possible to shorten the run time of script and test suite, thus
Reduce the debug time of whole automation.
The automatized script adjustment method based on model-driven for the second that the embodiment of the present application provides, is above-mentioned first
On the basis of planting based on the automatized script adjustment method of model-driven, also include following technical characteristic:
Described script debugging plug-in unit is embedded in MBT modeling tool be:
Described script debugging plug-in unit is embedded in described MBT modeling tool in the way of once compiling Dynamic link library.
In this case, just shield the manual risk that reports an error installed and run by hand, improve security.
The third automatized script adjustment method based on model-driven that the embodiment of the present application provides, is above-mentioned second
On the basis of planting based on the automatized script adjustment method of model-driven, also include following technical characteristic:
The pel of described utilization MBT, generates service logic and includes:
By the way of xml document, using pel control logic node parameter the opening up to physical node parameter of described MBT
Flutter mapping.
Just physical node and logical point can be mapped using aforesaid way, topological diagram assumes physical node.
The 4th kind of automatized script adjustment method based on model-driven that the embodiment of the present application provides, is the above-mentioned 3rd
On the basis of planting based on the automatized script adjustment method of model-driven, also include following technical characteristic:
The Topological Mapping of described pel control logic node parameter to the physical node parameter using MBT includes:
Using dynamic link library, the described script of many-to-one connection execution, while script executes unsuccessfully or completes
Discharge described dynamic link library.
Using aforesaid way, just solve and slow asking is mapped to physical node due to the logical node leading to service node more
Topic, said process is not take up memory source.
The 5th kind of automatized script adjustment method based on model-driven that the embodiment of the present application provides, is the above-mentioned 4th
On the basis of planting based on the automatized script adjustment method of model-driven, also include following technical characteristic:
In the pel of described utilization MBT, before generating service logic, also include:
Reading and writing and the common unit forwarding for data is taken out using Python, wherein, using proxy mode
Realize the forwarding of described data.
It should be noted that the compatible multiple ripe automation frameworks of described Python and programming language, can be across
Platform development whole flow process.
In sum, traditional script debugging is first to run automatic test set, adjusts one by one after initialization context variable again
Examination automatized script, if necessary to modification script, need whole script rerun, if modification test suite if it is necessary to
Discharging whole resource and reruning test suite wastes time and energy, and the said method that the embodiment of the present application provides has following advantage:
Amended script need not be reruned, directly run amended sentence;Amended test suite need not be reruned, directly
Run test suite sentence the map environment parameter of modification;Script debugging plug-in unit is embedded in MBT modeling tool, and shielding is manual to be pacified
Fill and run the risk reporting an error, the features such as internal memory is low, and operation is fast is consumed using dynamic link library mode.
The first automatized script debugging apparatus based on model-driven that the embodiment of the present application provides are as shown in Fig. 2 Fig. 2
The schematic diagram of the first the automatized script debugging apparatus based on model-driven providing for the embodiment of the present application.This device bag
Include:
First signal generating unit 201, for the pel using MBT, generates service logic, it should be noted that the pattern of being based on
The debugging driving, first has to the understanding based on business model, draws service logic using the pel that MBT enriches;
Second signal generating unit 202, for generating automatized script;
Embedded unit 203, for being embedded into script debugging plug-in unit in MBT modeling tool, this plug-in unit is exactly script debugging
Core technology, the design of this plug-in unit considers that the automation of facility environment parameter refreshes, and apparatus logic parameter is reflected with physical parameter
Penetrate, and service logic again from being dynamically connected;
Performance element 204, for selecting amended sentence in described script, exists in the sentence having executed and environment
On the basis of retaining in caching, directly execute described amended sentence, mouse final election amended sentence can be passed through,
Click directly on operation and just can only carry out final election sentence, the assignment having completed in the language of executed before and environment is constant
And retain in caching, thus operational efficiency is significantly lifted.In this case it is possible to not exclusively run test suite and survey again
In the case of training originally, the sentence of specified modification is run, refresh data and node parameter in facility environment.
The first automatized script based on model-driven above-mentioned being provided by foregoing description, the embodiment of the present application
Debugging apparatus, can shorten the run time of script and test suite, thus reducing the debug time of whole automation.
The automatized script debugging apparatus based on model-driven for the second that the embodiment of the present application provides, are above-mentioned first
On the basis of planting based on the automatized script debugging apparatus of model-driven, also include following technical characteristic:
Described embedded unit is specifically for being embedded into described script debugging plug-in unit in the way of once compiling Dynamic link library
In described MBT modeling tool.In this case, just shield the manual risk that reports an error installed and run by hand, improve peace
Quan Xing.
The third automatized script debugging apparatus based on model-driven that the embodiment of the present application provides, are above-mentioned second
On the basis of planting based on the automatized script debugging apparatus of model-driven, also include following technical characteristic:
Described first signal generating unit specifically for by the way of xml document, using the pel control logic section of described MBT
Point parameter is to the Topological Mapping of physical node parameter.This makes it possible to physical node and logical point to be mapped, topological diagram is in
Existing physical node.
The 4th kind of automatized script debugging apparatus based on model-driven that the embodiment of the present application provides, are the above-mentioned 3rd
On the basis of planting based on the automatized script debugging apparatus of model-driven, also include following technical characteristic:
Described first signal generating unit specifically for utilizing dynamic link library, the described script of many-to-one connection execution,
Script executes unsuccessfully or discharges described dynamic link library while completing.Which solves the logic due to leading to service node more
Node, to the slow problem of physical node mapping, is not take up memory source.
The 5th kind of automatized script debugging apparatus based on model-driven that the embodiment of the present application provides, are the above-mentioned 4th
On the basis of planting based on the automatized script debugging apparatus of model-driven, also include following technical characteristic:
Also include:
Abstraction unit, for taking out reading and writing and the common unit forwarding for data using Python, its
In, the forwarding of described data is realized using proxy mode.
It should be noted that the compatible multiple ripe automation frameworks of described Python and programming language, can be across
Platform development whole flow process.
In sum, the compatible multiple automation frameworks of said apparatus, compatible multiple automatic programming language, break completely
The in the past debugging mentality of automatized script, using the powerful advantages of model, where problematic just debugging where, and where modification just adjusts
Examination where, does not need to rerun whole automatic test set and automatized script, time-consuming place is all cut.
Described above to the disclosed embodiments, makes professional and technical personnel in the field be capable of or uses the present invention.
Multiple modifications to these embodiments will be apparent from for those skilled in the art, as defined herein
General Principle can be realized without departing from the spirit or scope of the present invention in other embodiments.Therefore, the present invention
It is not intended to be limited to the embodiments shown herein, and be to fit to and principles disclosed herein and features of novelty phase one
The scope the widest causing.
Claims (10)
1. a kind of automatized script adjustment method based on model-driven is it is characterised in that include:
Using the pel of MBT, generate service logic;
Generate automatized script;
Script debugging plug-in unit is embedded in MBT modeling tool;
Select amended sentence in described script, on the basis of the sentence having executed and environment retain in the buffer,
Directly execute described amended sentence.
2. the automatized script adjustment method based on model-driven according to claim 1 it is characterised in that described by pin
This debugging plug-in unit is embedded in MBT modeling tool:
Described script debugging plug-in unit is embedded in described MBT modeling tool in the way of once compiling Dynamic link library.
3. the automatized script adjustment method based on model-driven according to claim 2 is it is characterised in that described utilization
The pel of MBT, generates service logic and includes:
By the way of xml document, the topology using pel control logic node parameter to the physical node parameter of described MBT is reflected
Penetrate.
4. the automatized script adjustment method based on model-driven according to claim 3 is it is characterised in that described utilization
The Topological Mapping of pel control logic node parameter to the physical node parameter of MBT includes:
Using dynamic link library, the described script of many-to-one connection execution, discharge while script executes unsuccessfully or completes
Described dynamic link library.
5. the automatized script adjustment method based on model-driven according to claim 4 is it is characterised in that in described profit
With the pel of MBT, before generating service logic, also include:
Reading and writing and the common unit forwarding for data is taken out using Python, wherein, is realized using proxy mode
The forwarding of described data.
6. a kind of automatized script debugging apparatus based on model-driven are it is characterised in that include:
First signal generating unit, for the pel using MBT, generates service logic;
Second signal generating unit, for generating automatized script;
Embedded unit, for being embedded into script debugging plug-in unit in MBT modeling tool;
Performance element, for selecting amended sentence in described script, in the sentence having executed and environment in the buffer
On the basis of reservation, directly execute described amended sentence.
7. the automatized script debugging apparatus based on model-driven according to claim 6 are it is characterised in that described embed
Unit is specifically for being embedded into described MBT modeling tool by described script debugging plug-in unit in the way of once compiling Dynamic link library
In.
8. the automatized script debugging apparatus based on model-driven according to claim 7 are it is characterised in that described first
Signal generating unit specifically for by the way of xml document, using described MBT pel control logic node parameter to physical node
The Topological Mapping of parameter.
9. the automatized script debugging apparatus based on model-driven according to claim 8 are it is characterised in that described first
Signal generating unit, specifically for utilizing dynamic link library, the described script of many-to-one connection execution, executes unsuccessfully or complete in script
Described dynamic link library is discharged while one-tenth.
10. the automatized script debugging apparatus based on model-driven according to claim 9 are it is characterised in that also include:
Abstraction unit, for being taken out reading and writing and the common unit forwarding for data using Python, wherein, is adopted
Realize the forwarding of described data with proxy mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610820867.0A CN106445818B (en) | 2016-09-13 | 2016-09-13 | A kind of automatized script adjustment method and device based on model-driven |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610820867.0A CN106445818B (en) | 2016-09-13 | 2016-09-13 | A kind of automatized script adjustment method and device based on model-driven |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106445818A true CN106445818A (en) | 2017-02-22 |
CN106445818B CN106445818B (en) | 2019-05-10 |
Family
ID=58168806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610820867.0A Active CN106445818B (en) | 2016-09-13 | 2016-09-13 | A kind of automatized script adjustment method and device based on model-driven |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106445818B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108170789A (en) * | 2017-12-27 | 2018-06-15 | 郑州云海信息技术有限公司 | A kind of classification storage method and relevant apparatus based on distributed file system |
CN110209565A (en) * | 2018-02-28 | 2019-09-06 | 华为软件技术有限公司 | A kind of metadata schema adjustment method and its device |
CN110286901A (en) * | 2019-07-04 | 2019-09-27 | 广州广燃设计有限公司 | A kind of scenario generation method based on CAD, system and storage medium |
CN110543429A (en) * | 2019-09-10 | 2019-12-06 | 深圳前海微众银行股份有限公司 | Test case debugging method and device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425012A (en) * | 2008-12-10 | 2009-05-06 | 深圳华为通信技术有限公司 | Method and device for generating case script based on model automatization |
CN102033743A (en) * | 2010-09-02 | 2011-04-27 | 西安赛斐软件科技有限公司 | System and method for expanding model driving development capability by applying plug-in |
CN102053912A (en) * | 2011-01-06 | 2011-05-11 | 中国工商银行股份有限公司 | Device and method for automatically testing software based on UML (unified modeling language) graphs |
CN104615541A (en) * | 2015-02-10 | 2015-05-13 | 上海创景计算机系统有限公司 | Simulation testing modeling system and method based on flow chart |
CN105068929A (en) * | 2015-08-06 | 2015-11-18 | 网易(杭州)网络有限公司 | Test script generation method, test script generation device, testing method, testing device and testing system |
-
2016
- 2016-09-13 CN CN201610820867.0A patent/CN106445818B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101425012A (en) * | 2008-12-10 | 2009-05-06 | 深圳华为通信技术有限公司 | Method and device for generating case script based on model automatization |
CN102033743A (en) * | 2010-09-02 | 2011-04-27 | 西安赛斐软件科技有限公司 | System and method for expanding model driving development capability by applying plug-in |
CN102053912A (en) * | 2011-01-06 | 2011-05-11 | 中国工商银行股份有限公司 | Device and method for automatically testing software based on UML (unified modeling language) graphs |
CN104615541A (en) * | 2015-02-10 | 2015-05-13 | 上海创景计算机系统有限公司 | Simulation testing modeling system and method based on flow chart |
CN105068929A (en) * | 2015-08-06 | 2015-11-18 | 网易(杭州)网络有限公司 | Test script generation method, test script generation device, testing method, testing device and testing system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108170789A (en) * | 2017-12-27 | 2018-06-15 | 郑州云海信息技术有限公司 | A kind of classification storage method and relevant apparatus based on distributed file system |
CN110209565A (en) * | 2018-02-28 | 2019-09-06 | 华为软件技术有限公司 | A kind of metadata schema adjustment method and its device |
CN110209565B (en) * | 2018-02-28 | 2021-08-13 | 华为技术有限公司 | Metadata model debugging method and device |
CN110286901A (en) * | 2019-07-04 | 2019-09-27 | 广州广燃设计有限公司 | A kind of scenario generation method based on CAD, system and storage medium |
CN110543429A (en) * | 2019-09-10 | 2019-12-06 | 深圳前海微众银行股份有限公司 | Test case debugging method and device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106445818B (en) | 2019-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Mathur et al. | Advancements in the V-Model | |
CN105678169B (en) | A kind of binary program bug excavation method and system | |
CN101706753B (en) | Unit testing framework and method based on Perl | |
US6658633B2 (en) | Automated system-on-chip integrated circuit design verification system | |
CN106445818B (en) | A kind of automatized script adjustment method and device based on model-driven | |
CN112270149B (en) | Verification platform automatic integration method and system, electronic equipment and storage medium | |
US20150294061A1 (en) | Graphical Design Verification Environment Generator | |
CN104125504B (en) | Deployment method, device and system based on continuous integration | |
CN103970659A (en) | Android application software automation testing method based on pile pitching technology | |
CN104679488A (en) | Flow path customized development platform and method | |
CN103309800B (en) | A kind of webpage automated testing method and system | |
CN106919398A (en) | A kind of software distribution method and device | |
CN106708718A (en) | Service framework interface testing method and device | |
CN109739759A (en) | A method of verifying Black-box testing Cases design integrity | |
US9792402B1 (en) | Method and system for debugging a system on chip under test | |
CN109189479A (en) | A kind of parallel automatic verification method for processor instruction set | |
CN109933521A (en) | Automated testing method, device, computer equipment and storage medium based on BDD | |
CN101706750A (en) | Detective pole acquiring method based on embedded type simulator | |
CN102486749B (en) | Method and system for data driving test | |
CN103176894A (en) | Test data automatic derivative method and automatic derivative device facing database | |
CN103699478A (en) | Test case generation system and test case generation method | |
Engels et al. | Model-based verification and validation of properties | |
CN108287720A (en) | software compilation method, device, equipment and storage medium | |
CN104077225A (en) | Script debugging method and script debugging device both based on JavaScript | |
CN109144849A (en) | A kind of embedded software adjusting, measuring method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |