Automation Testing Framework by c++, Practice-1: tips from POSA4

本文探讨了使用Pattern-Oriented Software Architecture Volume 4: A Pattern Language for Distributed Computing中的反射模式来构建测试框架的可能性。通过引入自省接口和动态调用接口模式,可以实现对外部客户端的支持,如测试框架或对象浏览器,使其能够获取关于基本级别域对象的信息,而无需依赖其内部结构。此外,还讨论了如何利用C++反射库和XML来增强配置能力。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  
When I am reading some chapters in "Pattern.Oriented.Software.Architecture.Volume4: A Pattern Language for Distributed Computing",
one glue came into my mind if we can use some "Reflection" pattern to build up the test framework.
Further more,  it also can help Transactive in supporting "plug-in-out" features in future as a real configurable product.
 
As one summary introduces this practice in page 199, that is: 
 
An INTROSPECTIVE INTERFACE (286) and a DYNAMIC INVOCATION INTERFACE (288) support application-external clients such as test frameworks or object browsers, to obtain information about base level domain objects without becoming dependent on their internal structure, as well as invoking methods on them without the need to use their functional interfaces.
 
Below is of detail explanations for those two patterns,
 
The INTROSPECTIVE INTERFACE (286) pattern offers a supplementary interface that supports clients in accessing information about a component’s type, functionality, public interface, internal structure, behavior, and computational state. Clients or application-external tools can use this information to monitor a component or control their use of the component.
 
The DYNAMIC INVOCATION INTERFACE (288) pattern offers a supplementary
interface that allows clients to invoke methods on
components dynamically, composing the calls at runtime rather
than selecting them from declarations.
 
My thought is,
Since I studied some libs done by c++, implementing Reflection, it's very useful to build one part of the framework to call the interfaces provided by Transactive.
Further, we also can use XML as an assistant to work with Reflection, so that the test cases can be configured one by one.
 
But, it needs to modify the current Transactive, since the reflection mechanism must be imported first.
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值