Lesson 2 – Creating a Test Method
434
If the first testmethod-based test suite does not have the CONNECT
API, the
connect testfunction must be executed before the first
testmethod-based test suite in a test flow. In addition, if the
disconnect testfunction is executed in a test flow and if there is a
testmethod-based test suite later, a test suite that executes the
connect testfunction must be used between the test suites.
The following figure shows a typical directory structure for
creating test method programs:
Directory Structure
In the above figure, to create a shared library, the Project1
directory is first created as a project. Then, class source files,
header files, and configuration files required for the shared library
are created under the directory.
If you compile a test method program after you develop it, the
source and header files are compiled and linked according to
MakefileDBG, and the shared library and object files are created
under the
Debug directory.
The following shows the development flow of test method
programs:
Device Directory
User-defined Directory
Project1
(Project directory in which a shared library is stored)
Project1.cpp
Project1.h
Project1.dsw
Project1Tlb.cpp
Project1_i.cpp
(System auto-generated files)
(Directory for test method environment, Default: TestMethod)
MyClass1.cpp
MyClass1.h
MakefileDBG
Debug
<file_name>~
MyClass1.o
Project1.sl
Project1.o
(Directory in which object files and the shared library are stored)
(Backup files)
(Makefile to generate a shared library)
(Class source file)
(Class header file)
(Test Method shared library)
(Library object file)
(Class object file)