Getting Started with DTM Logger
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.
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:
- Register the COM version of the logging engine (WttLogCM.dll).
- Use the WttLogger object as you would use any Microsoft ActiveX object.
This section includes:
Send feedback on this topic
Built on December 10, 2009