-info
option of RunTest to query a specific key-value pair in the dictionary. This table shows the predefined keys and values.
Key | Keyword (value) | Description | |
kDescriptionKey | Description | Description of the purpose of this class. Example: "TWellBehavedObjectTestOf tests the copying, streaming, and flattening of MCollectible objects." | |
kInputSyntaxKey | Input Syntax | Description of the command-line input syntax for this subclass. Example: "TSimpleTest [-i] [-t <targetClass>] # -i to ignore errors" | |
kTargetClassKey | Target Class | Name of target class | |
kTargetSharedLibraryKey | Target Shared Library | Name of shared library of target | |
kTestNameKey | Test Name | Name of test | |
kTestVersionKey | Test Version | Version number of test | |
kTestTypeKey | Test Type | Type of test | |
kBugIDKey | Bug ID | Bug report number, if applicable | |
kSubSystemKey | SubSystem | Name of subsystem to which this test applies | |
kTestAreaKey | Test Area | Test area | |
kTestNumberKey | Test Number | Number of the test | |
kOwnerKey | Owner | Owner of the test | |
kOwnerPhoneKey | Owner Phone | Phone number of owner | |
kScriptsKey | Scripts | Name of test script, if applicable | |
kDataFilesKey | Data Files | Data files of test | |
kAutoRunKey | Auto Run | Yes/No field indicating that test can be run without human intervention | |
kPublishableKey | Publishable |
Yes/No field indicating that test is to be entered into the Test Publishing Database |
|
kReportDescriptionKey | Report Description | Description of report or report data provided by test | |
kFunctionalClaimsKey | Functional Claims | Claims that are being verified by test cases | |
kTestCasesKey | Test Cases | Description of test cases | |
kComponentKey | Component | Name of component to which this test applies |
The following example shows how you assign values to the test information keys:
To display the information assigned to your test, use the // Copyright (C) 1995 Taligent, Inc. All rights reserved.
void TSampleObjectStringTest::CopyInfo(TDictionaryOf<TStandardText,TText>& infoDict) const
{
TSampleObjectBaseTest::CopyInfo;
TAllocationHeap heap(&infoDict);
infoDict.AddKeyValuePair(new(heap) TStandardText(kDescriptionKey), new(heap) TStandardText(
"TSampleObjectStringTest parses optional text to a command-line argument."));
infoDict.AddKeyValuePair(new(heap) TStandardText(kInputSyntaxKey), new(heap) TStandardText(
"TSampleObjectStringTest SampleObjectTestLib -o [<text>]"));
infoDict.AddKeyValuePair(new(heap) TStandardText(kTargetClassKey), new(heap) TStandardText(
"TSampleObject"));
infoDict.AddKeyValuePair(new(heap) TStandardText(kTargetSharedLibraryKey), new(heap) TStandardText(
"TestSamplesLib"));
}
-
info
option when you start RunTest. The next line shows an example command that uses no keywords, so all of the available information is displayed.
The previous command displays the following information to the console: RunTest -info -t TSampleObjectStringTest SampleObjectTestLib
To display specific information, you must provide a keyword after the info: {
Description = "TSampleObjectStringTest parses optional text to a command-line argument."
Target Shared Library = "TestSamplesLib"
Target Class = "TSampleObject"
Input Syntax = "TSampleObjectStringTest SampleObjectTestLib -o [<text>]"
}
-info
option, as in the following example.
The previous command displays the following information to the console: RunTest -info "Input Syntax" -t TSampleObjectStringTest SampleObjectTestLib
NOTE
The keyword you specify must match exactly--including capitalization and spacing--the keyword defined for the information you want to display. If the keyword you specify does not match the defined keyword, info: {
Input Syntax = "TSampleObjectStringTest SampleObjectTestLib -o [<text>]"
}
RunTest
displays a message that the key was not found.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.