文件名称:guitestfirst
介绍说明--下载内容均来自于网络,请自行研究使用
《使用测试优先方法开发用户界面》
测试优先是测试驱动开发(Test-Driven Development, TDD)的核心思想,它要求在编写产品代码前先编写基于产品代码的测试代码。在测试驱动开发的单元测试中,对GUI应用实施自动测试应该是测试驱动开发的软肋之一。由于界面的操作是有由人来完成的,所以要想在GUI中完成单元自动测试是有一定难度的。Kent Beck在它的《测试驱动开发》中就曾提到过这个问题。
本文将通过一个例子来讲解在测试驱动开发中如何针对GUI进行单元测试。这个例子是David Astels著的《测试驱动开发实用指南(影印版)》中一个关于影片列表管理的例子。该书中文版即将在国内出版。书中讨论并介绍了开发这个例子的多种方法。笔者将介绍其中的一种,并且为了方便使用C++的朋友的学习,书中的代码我用C++写了一遍,类名和变量名尽量和原书保持一致,以方便阅读该书的C++读者。在此也要感谢David Astels给我们带来如此精彩的一本书。
本文叙述背景为:CppUnit1.9.0, Visual C++ 6.0, Windows2000 pro-"priority use of test methods developed user interface" priority testing is test-driven development (Test-Dri ven Development, TDD), the core ideas It requires the preparation of products prior to the preparation of code based on the product code of test code. In test-driven development of unit testing, the introduction of the automated GUI application testing should be test-driven development one of the weak links. Interface operation is to be completed by the people, in order to complete GUI module automatically tests are necessarily difficult. Kent Beck, in its "test-driven development" had mentioned this issue. This will be an example to explain the test-driven development in how to address GUI unit test. This is David Astels example of a "test-driven developme
测试优先是测试驱动开发(Test-Driven Development, TDD)的核心思想,它要求在编写产品代码前先编写基于产品代码的测试代码。在测试驱动开发的单元测试中,对GUI应用实施自动测试应该是测试驱动开发的软肋之一。由于界面的操作是有由人来完成的,所以要想在GUI中完成单元自动测试是有一定难度的。Kent Beck在它的《测试驱动开发》中就曾提到过这个问题。
本文将通过一个例子来讲解在测试驱动开发中如何针对GUI进行单元测试。这个例子是David Astels著的《测试驱动开发实用指南(影印版)》中一个关于影片列表管理的例子。该书中文版即将在国内出版。书中讨论并介绍了开发这个例子的多种方法。笔者将介绍其中的一种,并且为了方便使用C++的朋友的学习,书中的代码我用C++写了一遍,类名和变量名尽量和原书保持一致,以方便阅读该书的C++读者。在此也要感谢David Astels给我们带来如此精彩的一本书。
本文叙述背景为:CppUnit1.9.0, Visual C++ 6.0, Windows2000 pro-"priority use of test methods developed user interface" priority testing is test-driven development (Test-Dri ven Development, TDD), the core ideas It requires the preparation of products prior to the preparation of code based on the product code of test code. In test-driven development of unit testing, the introduction of the automated GUI application testing should be test-driven development one of the weak links. Interface operation is to be completed by the people, in order to complete GUI module automatically tests are necessarily difficult. Kent Beck, in its "test-driven development" had mentioned this issue. This will be an example to explain the test-driven development in how to address GUI unit test. This is David Astels example of a "test-driven developme
(系统自动生成,下载前可以参看下载内容)
下载文件列表
guitestfirst
............\AppMovieList
............\............\AppMovieList.cpp
............\............\AppMovieList.dsp
............\............\AppMovieList.h
............\............\AppMovieList.rc
............\............\AppMovieListDlg.cpp
............\............\AppMovieListDlg.h
............\............\MyEditor.cpp
............\............\MyEditor.h
............\............\ReadMe.txt
............\............\res
............\............\...\AppMovieList.rc2
............\............\Resource.h
............\............\StdAfx.cpp
............\............\StdAfx.h
............\GuiTestFirst
............\............\GuiTestFirst.cpp
............\............\GuiTestFirst.dsp
............\............\GuiTestFirst.dsw
............\............\GuiTestFirst.h
............\............\GuiTestFirst.rc
............\............\GuiTestFirstDlg.cpp
............\............\GuiTestFirstDlg.h
............\............\mockEditor.cpp
............\............\mockEditor.h
............\............\ReadMe.txt
............\............\res
............\............\...\GuiTestFirst.rc2
............\............\Resource.h
............\............\StdAfx.cpp
............\............\StdAfx.h
............\............\SuiteName.h
............\............\TestFirstSuite.cpp
............\............\TestFirstSuite.h
............\............\TestOperation.cpp
............\............\TestOperation.h
............\............\TestWidgets.cpp
............\............\TestWidgets.h
............\Movie
............\.....\Movie.cpp
............\.....\Movie.def
............\.....\Movie.dsp
............\.....\Movie.rc
............\.....\MovieListEditor.cpp
............\.....\MovieListEditor.h
............\.....\MovieListWindow.cpp
............\.....\MovieListWindow.h
............\.....\ReadMe.txt
............\.....\res
............\.....\...\Movie.rc2
............\.....\Resource.h
............\.....\StdAfx.cpp
............\.....\StdAfx.h
............\AppMovieList
............\............\AppMovieList.cpp
............\............\AppMovieList.dsp
............\............\AppMovieList.h
............\............\AppMovieList.rc
............\............\AppMovieListDlg.cpp
............\............\AppMovieListDlg.h
............\............\MyEditor.cpp
............\............\MyEditor.h
............\............\ReadMe.txt
............\............\res
............\............\...\AppMovieList.rc2
............\............\Resource.h
............\............\StdAfx.cpp
............\............\StdAfx.h
............\GuiTestFirst
............\............\GuiTestFirst.cpp
............\............\GuiTestFirst.dsp
............\............\GuiTestFirst.dsw
............\............\GuiTestFirst.h
............\............\GuiTestFirst.rc
............\............\GuiTestFirstDlg.cpp
............\............\GuiTestFirstDlg.h
............\............\mockEditor.cpp
............\............\mockEditor.h
............\............\ReadMe.txt
............\............\res
............\............\...\GuiTestFirst.rc2
............\............\Resource.h
............\............\StdAfx.cpp
............\............\StdAfx.h
............\............\SuiteName.h
............\............\TestFirstSuite.cpp
............\............\TestFirstSuite.h
............\............\TestOperation.cpp
............\............\TestOperation.h
............\............\TestWidgets.cpp
............\............\TestWidgets.h
............\Movie
............\.....\Movie.cpp
............\.....\Movie.def
............\.....\Movie.dsp
............\.....\Movie.rc
............\.....\MovieListEditor.cpp
............\.....\MovieListEditor.h
............\.....\MovieListWindow.cpp
............\.....\MovieListWindow.h
............\.....\ReadMe.txt
............\.....\res
............\.....\...\Movie.rc2
............\.....\Resource.h
............\.....\StdAfx.cpp
............\.....\StdAfx.h