Using Error Lists

DTM Logger has built-in support for error checking. This support is very useful when dealing with expected errors in your application, which are errors that are intentional or desired. You can use expected errors to show that a testing configuration gives negative results when it should, such as when an access restriction prevents an unauthorized user from completing a test.

While expected errors are valuable for verifying an intended behavior, they are not a basis for causing a test to fail. Therefore, DTM Logger uses error lists to encapsulate the details of error checking and to determine which error codes are expected and should not cause the test to fail. DTM Logger makes the following error lists available:

  • List of expected errors
  • List of break-on errors

An error list is a collection of errors that have both a value and a type. If the error that is being checked matches any error in the expected error list for both value and type, the error is considered a valid error and does not cause the test to fail. If the error that is being checked matches any error in the break-on error list for both value and type, DTM Logger will try to break into the debugger on behalf of the application.

S_OK error code

DTM Logger treats the S_OK error code different than other error codes. If the error list is empty, DTM Logger considers S_OK a valid error. However, if the list is not empty and S_OK is not in the error lists, the logger considers S_OK a failure.

For more information about how to use error lists, see the following topics:

Maintaining Error Lists

Checking the Test Results

Note  If you do not want to deal with error lists, call the CWTTLogger::CheckResultEx function instead of the CWTTLogger::CheckResult function.

See Also

Getting Started with DTM Logger, Error List Sample Using C++

Send feedback on this topic
Built on December 10, 2009