background image
<< Appendix A. Template Replacement Variables | datapool_name Variable >>
<< Appendix A. Template Replacement Variables | datapool_name Variable >>

Variables Used in Test Generation Templates

120
Appendix A - Template Replacement Variables
Variables Used in All Unit Test Generation Templates
The following table lists the replacement variables that are used in all of the unit test
generation templates:
Variable
Description and Example
<generation_date>
Shows when the script was generated.
<generation_date> in the template becomes Date: 9/19/00 2:56:32 PM in
the script.
<root_package>
Root directory location for all generated unit test scripts. The
<root-package> is always
unittests
.
<root_package> in the template becomes
unittests
in the script.
<author_name>
Login ID supplied when you connect to a test datastore project.
<package_name>
The package hierarchy in the Rose model, excluding the class and the
top-level package name.
For example, the Rose Item Fully Qualified Name :=
Logical View::COM::MyComponent::MyClass::MyOperationUnderTest"
TestName := MyClassMyOperationUnderTest
tms.StartTestServices "<root_package>\<package_name>\<test_name>"
becomes
unittests\COM\MyComponent\MyClassMyOperationUnderTest"
in the script.
<operation_name>
The name of the operation selected for generation.
Class=<operation_name>; TestNameScript.cls becomes
Class=MyOperationUnderTest; TestNameScript in the script.
<class_name>
The name of the class selected for generation.
Template: <class_name>
Script: MyInterface
<test_name>
The name of the test script, calculated as follows:
ClassNameOperationName
QualityArchitect may modify <test_name> to conform to the target
generation language.
Example:
ClassName := "_Account", OperationName := "Post", Language := "VB"
Before: ExeName32="<test_name>.exe"
After: ExeName32="AccountPost.exe"
Note: In VB an object name cannot begin with "_" character, so the "_" is
removed at generation time.