Shadow pattern: A new design pattern for testing

Yong Zhong Tu, Chen Xi Shao, Wei Tek Tsai, Xiang Dong Hu

Research output: Contribution to journalArticlepeer-review

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.

Original languageEnglish (US)
Pages (from-to)34-40
Number of pages7
JournalJisuanji Yanjiu yu Fazhan/Computer Research and Development
Volume41
Issue number1
StatePublished - Jan 2004

Keywords

  • Design pattern
  • Object-oriented testing
  • Shadow pattern

ASJC Scopus subject areas

  • Software
  • Hardware and Architecture
  • Computer Networks and Communications

Fingerprint

Dive into the research topics of 'Shadow pattern: A new design pattern for testing'. Together they form a unique fingerprint.

Cite this