CN103019922B - A kind of can the component architecture implementation method of independent test - Google Patents
A kind of can the component architecture implementation method of independent test Download PDFInfo
- Publication number
- CN103019922B CN103019922B CN201110283033.8A CN201110283033A CN103019922B CN 103019922 B CN103019922 B CN 103019922B CN 201110283033 A CN201110283033 A CN 201110283033A CN 103019922 B CN103019922 B CN 103019922B
- Authority
- CN
- China
- Prior art keywords
- assembly
- component
- interface
- standard
- definition
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of can the component architecture implementation method of independent test, the method is by proposing a kind of component architecture, this component architecture includes standard package layer interface, component interface defines, component definition and assembly realize, and the most described assembly is the dynamic base of standard, and test script calls described assembly by the command interface of standard, standard package layer interface provides command function execution and method for subscribing, it is achieved in described assembly, concrete function calls and independent test.Being achieved by this scheme can the realization of component technology framework of independent test.
Description
Technical field
The present invention relates to software engineering, particularly relate to a kind of can the component architecture of independent test
Implementation method.
Background technology
Along with the development of IT technology, people are to the function of software, performance, safety etc.
Propose higher demand, cause the scale of software and complexity to increase, also give software
Exploitation bring difficulty with challenge.
For this situation, there has been proposed various technology and scheme.As Object-oriented Technique,
Component technology, component technology, middleware Technology etc..Various technology have its implementation.
Component technology therein is a kind of technology using widely, and it is by by component software
Change and decompose software, thus reduce the complexity of software.Component technology should in software development
Increasingly extensive, and the Some features of component technology makes traditional software test theoretical and
Technology, to the software system constructed based on component technology the most applicable.
Software test, as the important step of software development process, is to ensure that software quality, carries
The important means of high software reliability.The development of software development technique, also will necessarily drive soft
The development of part measuring technology.Generally, software test is to find and point out that software system lacks
The process fallen into.Defect is likely to occur in exploitation and any stage safeguarded, and thus produces
Raw one or more " leak " mistake, misunderstanding and redundancy.Test includes finding defect,
But do not include debugging and repair.
In conventional client software, often by multiple different functional modules and Component Gallery mould
Block forms;Verifying that the functional test of each module need to be with the associating of client mastery routine, this is just
Cause testing mechanism the most complicated, use easy not.
Summary of the invention
The invention provides a kind of can the component architecture implementation method of independent test, the method is given
Having gone out can the component architecture of independent test and implementation method.
For reaching above-mentioned purpose, the technical scheme is that and be achieved in that:
A kind of can the component architecture implementation method of independent test, described implementation method includes:
Component architecture includes standard package layer interface, and component interface defines, component definition and group
Part realizes;
Wherein, described standard package layer interface provides command function execution and method for subscribing;Institute
State the command function mark and command type parameter comprising assembly in component interface definition;Institute
State assemblies different in component definition to be placed in different catalogues, do not wrap in component definition
Realization containing concrete assembly;During described assembly realizes, described assembly is the dynamic base of standard;
The test script command interface invocation component dynamic base by standard, assembly dynamic base is led to
Cross command function execution and method for subscribing that standard package layer interface provides, it is achieved described assembly
Calling and independent test of middle concrete function.
In the above-mentioned methods, described standard package layer interface includes canonical parameter interface;
Standard package layer interface is the standard interface realizing concrete abstract virtual base class.
In the above-mentioned methods, assembly self-defined standard commands parameter and event argument must derive from
In described canonical parameter interface class.
In the above-mentioned methods, the definition of described component interface includes:
At the ID of assembly defined in the management interface header file of assembly;
The definition of described component interface is derived from standard package layer interface.
In the above-mentioned methods, the definition of described component interface includes:
Component interface definition comprises event id and the event argument type that assembly excites.
In the above-mentioned methods, described component definition includes:
Component definition provides pure empty definition and opens other component developer.
In the above-mentioned methods, described assembly realizes including:
The dynamic base of described standard derives initialization module and component registration to manager function;
Described assembly realizes deriving from from index bed assembly module class, applies the grand packaging of component standard
Each functional identity realize function;
Functional identity that standard macrodefinition is general, input-output function with realize Function Mapping.
Farther include at said method: the assembly module note that will realize under described component architecture
Volume is in component manager.
In the above-mentioned methods, described manager includes:
Manager has interface, upper-layer service, underlying traffic, the pipe of each layer assembly of network channel
Reason device, realizes the most in the frame;
The manager of disparate modules reads corresponding configuration file calling and joins in the frame
Put the configuration information adding assembly in file.
In the above-mentioned methods, the method includes:
Described module configuration information includes: the title of assembly, path, assembly place, assembly ID,
Assembly loading sequence and sequence of unloading;
The interface that described manager calls when applying assembly is described initialization module.
From above-mentioned, the invention provides a kind of can the component architecture realization side of independent test
Method, the method is by proposing a kind of component architecture, and this component architecture includes that standard package layer connects
Mouthful, component interface defines, and component definition and assembly realize, and the most described assembly is standard
Dynamic base, test script calls described assembly, standard package layer by the command interface of standard
Interface provides command function execution and method for subscribing, it is achieved the tune of concrete function in described assembly
With with independent test.Being achieved by this scheme can the component technology framework of independent test
Realize.
Accompanying drawing explanation
Fig. 1 is that a kind of in the present invention can the realization of component architecture implementation method of independent test
Schematic diagram;
Fig. 2 is the signal realizing assembly function order test based on the component architecture in the present invention
Figure.
Detailed description of the invention
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached
Figure and specific embodiment describe the present invention.
One, component architecture realizes
Fig. 1 is that a kind of in the present invention can the realization of component architecture implementation method of independent test
Schematic diagram.As it is shown in figure 1, component architecture includes: standard package layer interface, component interface
Definition, component definition and assembly realize.
1. component interface definition
Component interface definition is derived from standard package layer interface.In component interface defines, bag
The command function ID realized containing assembly and command parameter type, it is also possible to comprise what assembly excited
Event id and event argument type.Wherein parameter type unification is derived from from canonical parameter interface
And the ID definition of assembly is contained in the management interface header file of assembly, i.e. in the management of assembly
The ID of assembly defined in interface header file.
2. component definition
In described component definition, different assemblies can be placed in different catalogues.At assembly
Definition does not comprise the realization of concrete assembly.But, it provides pure empty definition and to other groups
Part developer is open, such as: pure virtual function can be used to realize.
3. assembly realizes
Assembly is the dynamic base of standard, can forgive the function that multiple order is corresponding in an assembly
Realizing, command function is unique in assembly.The dynamic base of standard derives initialization module and note
Volume assembly is to manager function.Wherein, initialization module is that manager is adjusted when applying assembly
Interface.
Assembly realizes file and mainly realizes assembly corresponding the implementing of each functional identity.Institute
State assembly to realize deriving from from index bed component template class, and apply the grand packaging of component standard
Each functional identity realize function.Its Plays macro defines general functional identity, input defeated
Go out parameter and realize Function Mapping.
4. standard package layer interface
Standard package layer interface is the standard interface realizing concrete abstract virtual base class, described mark
Prospective component layer interface provides command function execution and method for subscribing and unified calling and survey
Order right way of conduct method for a trial, thus realize calling and independent test of concrete function.Standard package layer connects
Mouth comprises canonical parameter interface, and all self-defined standard commands parameters and event argument must be sent
It is conigenous canonical parameter interface class.
It addition, the assembly module realized under described component architecture is registered to component manager
In.Component manager has interface, upper-layer service, underlying traffic, each layer assembly of network channel
Manager, realize the most in the frame.In the frame, the manager of disparate modules calls
Adding the configuration information of assembly in configuration file, different component managers read corresponding joining
Put file.Module configuration information includes, the title of assembly, path, assembly place, assembly ID,
Assembly loading sequence and sequence of unloading.
Two, the method realizing assembly function order test based on said modules framework
Fig. 2 is the signal realizing assembly function order test based on the component architecture in the present invention
Figure.As in figure 2 it is shown, each function of assembly has unique command function, single group
Part function can be called by external command mode.Wherein, the test script life by standard
Making assembly described in interface interchange, standard package layer interface provides command function execution and subscriber
Method, it is achieved in described assembly, concrete function calls and independent test.
Below as a example by logging in example, enumerate some concrete command parameter and event arguments
Example, illustrate how external command passes to assembly simultaneously.
Registering service logs on layer service assembly dynamic base
1) dynamic base of described standard derives initialization module and is registered to manager function,
I.e. realize in assembly initialization module, certainly be registered to framework, assembly unloading function.
2) described assembly realizes deriving from from index bed assembly module class, and application component standard is grand
Packing the function that realizes of each functional identity, concrete mode is to realize from standard in assembly header file
The definition of component layer interface derivation and standard macrodefinition.
3) assembly header file realizes login feature function, display dialog box function definition.
4) concrete function performance is realized during assembly realizes file.
5) standard macrodefinition is general functional identity, input-output function with realize Function Mapping.
I.e., it is achieved standard macroelement functional identity, the mapping of parameter function:
A, defined function ID;
B, definitions component parameter, such as the login ID of user and password etc., it is derived from standard
Interface.
6) standard package layer interface provides command function execution and method for subscribing, it is achieved described
The calling and independent test of concrete function in assembly:
A, definition underlying traffic parameter, it is also derived from standard interface;
B, by perform command mode call login underlying traffic function.
In sum, the invention provides a kind of can the component architecture realization side of independent test
Method, the method is by proposing a kind of component architecture, and this component architecture includes that standard package layer connects
Mouthful, component interface defines, and component definition and assembly realize.The most described assembly is standard
Dynamic base, test script calls described assembly, standard package layer by the command interface of standard
Interface provides command function execution and method for subscribing, it is achieved the tune of concrete function in described assembly
With with independent test.Being achieved by this scheme can the component technology framework of independent test
Realize.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit this
Bright, all within the spirit and principles in the present invention, any amendment of being made, equivalent,
Improve, within should be included in the scope of protection of the invention.
Claims (7)
1. one kind can the component architecture implementation method of independent test, it is characterised in that described
Implementation method includes:
Component architecture includes standard package layer interface, and component interface defines, component definition and group
Part realizes;
Wherein, described standard package layer interface provides command function execution and method for subscribing;Institute
State the command function mark and command parameter type comprising assembly in component interface definition;Institute
State assemblies different in component definition to be placed in different catalogues, do not wrap in component definition
Realization containing concrete assembly;
During described assembly realizes, assembly is the dynamic base of standard, and the dynamic base of described standard is led
Go out initialization module and component registration to manager function, an assembly can comprise multiple life
The functional realiey that order is corresponding, described assembly realizes deriving from from index bed assembly module class, application
The each functional identity of the grand packaging of component standard realize function;The function that standard macrodefinition is general
ID, input-output function with realize Function Mapping;
The test script command interface invocation component dynamic base by standard, assembly dynamic base is led to
Cross command function execution and method for subscribing that standard package layer interface provides, it is achieved described assembly
Calling and independent test of middle concrete function;
Described standard package layer interface also includes: canonical parameter interface;
Standard package layer interface is the standard interface realizing concrete abstract virtual base class.
Method the most according to claim 1, it is characterised in that
The self-defined standard commands parameter of assembly and event argument must be derived from described standard
Parameter interface.
Method the most according to claim 1, it is characterised in that described component interface is fixed
Justice also includes:
At the ID of assembly defined in the management interface header file of assembly;
The definition of described component interface is derived from standard package layer interface.
Method the most according to claim 3, it is characterised in that described component interface is fixed
Justice also includes:
Component interface definition comprises event id and the event argument type that assembly excites.
Method the most according to claim 1, it is characterised in that described component definition is also
Including:
Component definition provides pure empty definition and opens other component developer.
6. according to the method described in any one of claim 1 to 5, it is characterised in that the party
Method farther includes: the assembly module realized under described component architecture is registered to assembly management
In device;
Described component manager has interface, upper-layer service, underlying traffic, each layer of network channel
The manager of assembly, realizes the most in the frame;
The component manager of disparate modules reads corresponding configuration file and adjusts in the frame
With the configuration information adding assembly in configuration file.
Method the most according to claim 6, it is characterised in that the method includes:
Described module configuration information includes: the title of assembly, path, assembly place, assembly ID,
Assembly loading sequence and sequence of unloading;
The interface that described component manager calls when applying assembly is described initialization module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110283033.8A CN103019922B (en) | 2011-09-22 | 2011-09-22 | A kind of can the component architecture implementation method of independent test |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110283033.8A CN103019922B (en) | 2011-09-22 | 2011-09-22 | A kind of can the component architecture implementation method of independent test |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103019922A CN103019922A (en) | 2013-04-03 |
CN103019922B true CN103019922B (en) | 2016-09-28 |
Family
ID=47968548
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110283033.8A Active CN103019922B (en) | 2011-09-22 | 2011-09-22 | A kind of can the component architecture implementation method of independent test |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103019922B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335286B (en) * | 2014-08-15 | 2018-02-16 | 阿里巴巴集团控股有限公司 | A kind of static library test method and device |
CN107145436A (en) * | 2016-03-01 | 2017-09-08 | 阿里巴巴集团控股有限公司 | Software function verification method and device |
CN107733741A (en) * | 2017-10-30 | 2018-02-23 | 中国电力科学研究院有限公司 | Software architectural method and platform for testing protocol consistency |
CN109857638B (en) * | 2018-12-28 | 2022-10-28 | 北京航天测控技术有限公司 | Universal framework for test system software |
CN113448822A (en) * | 2020-03-25 | 2021-09-28 | 北京同邦卓益科技有限公司 | Test method, test device, computer readable medium and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101098200A (en) * | 2006-06-27 | 2008-01-02 | 中兴通讯股份有限公司 | Method for implementing customizable test procedure |
CN101676880A (en) * | 2008-07-01 | 2010-03-24 | 奥索临床诊断有限公司 | Redundant error detection in a clinical diagnostic analyzer |
-
2011
- 2011-09-22 CN CN201110283033.8A patent/CN103019922B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101098200A (en) * | 2006-06-27 | 2008-01-02 | 中兴通讯股份有限公司 | Method for implementing customizable test procedure |
CN101676880A (en) * | 2008-07-01 | 2010-03-24 | 奥索临床诊断有限公司 | Redundant error detection in a clinical diagnostic analyzer |
Also Published As
Publication number | Publication date |
---|---|
CN103019922A (en) | 2013-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103019922B (en) | A kind of can the component architecture implementation method of independent test | |
CN107807878B (en) | Keyword-based universal test resource driving and execution management method | |
CN103297381B (en) | Service access method based on plugin and system thereof | |
CN105677302B (en) | A kind of application program module melts forwarding method and device | |
CN100435113C (en) | TTCN-3 testing system basedon C++ mapping and its testing method | |
WO2021042849A1 (en) | Cloud platform, service processing method, command interface and computer device | |
CN107171897A (en) | A kind of interface test method and data-interface test system | |
CN106897216A (en) | The method and apparatus of test software | |
CN107241315A (en) | Cut-in method, device and the computer-readable recording medium of bank's gateway interface | |
CN113114498A (en) | Architecture system of trusted block chain service platform and construction method thereof | |
CN113037831A (en) | Service gateway message processing method and device | |
CN103326930B (en) | Open platform interface automatic detecting method and system | |
CN108427636A (en) | Test method, system and the electronic equipment of application | |
CN111786792A (en) | Block chain-based data change recording method and device | |
CN106951785A (en) | A kind of JAVA virtual machine and trust chain extension method therein | |
CN107704277A (en) | Plug-in loading method and system | |
CN109614247A (en) | A kind of statement formula remote service calling system and its execute method | |
CN107357792A (en) | A kind of method and apparatus of data parsing | |
CN101303646A (en) | Modeling method based on electric communication field capable of performing meta language | |
CN106990974A (en) | A kind of APP applications update method, device and electronic equipment | |
CN108805518A (en) | Information processing method, device, system and electronic equipment | |
CN108415727A (en) | Abnormality eliminating method and storage medium in electronic device, Web application and developments | |
CN109491896B (en) | WeChat applet form verification method of education system and electronic equipment | |
CN111241173A (en) | Method and system for data interaction among multiple systems | |
CN100350771C (en) | System and method for implementing function measurement of signalling service apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder |
Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080 Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd. Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building A block 5 layer Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd. |
|
CP02 | Change in the address of a patent holder |