Getting Started with DTM Logger

Note  This content applies to the Windows Logo Kit (WLK). For the latest information using the new Windows Hardware Certification Kit (HCK), see Windows HCK User's Guide on the Windows Hardware Dev Center.

Whether your tests are coded in C, C++, COM, or .NET, the basic process of using DTM Logger in your code is essentially the same. To add logging to your test program, include these elements:

  • Initialize logging by creating a log device, which sets up your desired outputs. For more information about creating a log device, see Initializing a Log Device.

  • Manage test cases by marking the start and end of each test case in your code. A test case is a set of traces that are grouped by a defined context. For more information about managing your test cases, see Managing a Test Case.

  • Trace application errors during the test run by adding traces to your test cases. For more information about performing a trace, see Performing a Trace.

  • Clean up after the test run.

  • Post-process the log files by using XML transformation templates. For more information about post-processing log files, see Post-Processing Log Files.

Logging engine

There are three versions of the logging engine:

  • WttLog.dll for C/C++. This DLL has minimal dependencies.

  • WttLogCM.dll for COM and scripting.

  • Microsoft.DistributedAutomation.log.dll for .NET.

If you want to statically link to the target DLL during compilation, use the WttLog.lib library files for C/C++.

Scripting the Logger

If you want to access the logging engine through a script, you must:

  1. Register the COM version of the logging engine (WttLogCM.dll).

  2. Use the WttLogger object as you would use any Microsoft ActiveX object.

This section includes:

Initializing a Log Device

Managing a Test Case

Performing a Trace

Post-Processing Log Files

See Also

Logging in DTM, Logger Reference

 

 

Build date: 9/14/2012