Lesson 2 – Creating a Test Method
433
2-1 Overview
To execute one or more testmethod-based test suites on the Test
Flow editor, a shared library, which is an executable library, must
be built for test methods related with the test.
To handle files related to test method program such as a shared
library and source files on the SmarTest software, the environment
called a project is needed. The project is a directory for managing
the files related to test method program and consists of all test
method files.
The test method programs grouped according to a user’s arbitrary
unit are called a class. The class is a unit of your source file. And
user-defined functions (test method programs) in each source file
are called method functions.
Creating a class source file is called “adding a class to the
project”. And creating a method function into a class source file is
called “adding a method to the class”. For the relationships among
shared libraries and classes, see the following figure. The following
figure shows the relationship of testmethod-based test suites,
shared library, and classes.
Relationship of shared Library and Class
NOTE
In the above figure, the first test suite is used to execute the connect
testfunction for connecting DPS and digital channels to a test device.
You can also achieve this connection using the CONNECT API in your
test method program, instead of the connect testfunction.
When the test flow reaches the end of the test flow, they are
automatically disconnected.
M: Testmethod-based TestSuite
M
MM
Subroutine
Test Method
Program
Test Method
Program
Test Method
Program
Test Method
Program
Subroutine
Test Method
Program
Test Method
Program
Test Method
Program
Test Method
Program
Shared Library
Test Flow
Class
Source
Files
Compile/Link
Call/Return
Data sharing
eg. global variable
M
connect
Test function-based TestSuite for
executing connect test function.
Class