高级检索

    影子模式:一种新的用于测试的设计模式

    Shadow Pattern: A New Design Pattern for Testing

    • 摘要: 介绍了一种新的设计模式 :用于测试面向对象程序的影子模式 它为每个使用它的对象生成一个影子对象 这种模式允许测试脚本无缝地嵌入到程序中 ,无需额外的测试驱动或测试插件 在测试过程中 ,测试用例可以调用影子对象作为测试插件 ,也可以调用真实的应用代码 ,测试脚本可以在运行时做出选择 这些概念将在模块测试和集成测试中分别举例说明

       

      Abstract: Introduced in this paper is a new design pattern: a shadow for testing object-oriented programs. This pattern creates a shadow object for each object using it. By using this pattern, no additional test driver or test stub is needed. Thus, the pattern allows test scripts to be embedded in the program seamlessly. During testing, the test case can either call the shadow object as test stub or call the actual application code. The test script can make its decision at runtime to select which one to use. These ideas are illustrated in module testing and integration testing.

       

    /

    返回文章
    返回