Predefined test information keys

The text values for the keys can be used with the -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:

      // 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"));
      }
To display the information assigned to your test, use the -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.

      RunTest -info -t TSampleObjectStringTest SampleObjectTestLib
The previous command displays the following information to the console:

      info: {
          Description = "TSampleObjectStringTest parses optional text to a command-line argument."
          Target Shared Library = "TestSamplesLib"
          Target Class = "TSampleObject"
          Input Syntax = "TSampleObjectStringTest SampleObjectTestLib -o  [<text>]"
      }
To display specific information, you must provide a keyword after the -info option, as in the following example.

      RunTest -info "Input Syntax" -t TSampleObjectStringTest SampleObjectTestLib
The previous command displays the following information to the console:

      info: {
          Input Syntax = "TSampleObjectStringTest SampleObjectTestLib -o  [<text>]"
      }
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, 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.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker