DTM Logger Example Using COM
The following code example shows the basics of using the DTM Logger in a COM program.
const WTT_TRACE_LVL_MSG =268435456
const WTT_TRACE_LVL_USER =536870912
const WTT_TRACE_LVL_ERR =16777216
const WTT_TRACE_LVL_ASSERT =33554432
const WTT_TRACE_LVL_INVALID_PARAM =67108864
const WTT_TRACE_LVL_BUG =134217728
const WTT_TRACE_LVL_BREAK =1048572
const WTT_TRACE_LVL_WARN =2097152
const WTT_TRACE_LVL_FUNCTION =65536
const WTT_TRACE_LVL_PARAM =131072
const WTT_TRACE_LVL_START_TEST =256
const WTT_TRACE_LVL_END_TEST =512
const WTT_TRACE_LVL_TCMINFO =1024
const WTT_TRACE_LVL_MACHINEINFO =2048
const WTT_TRACE_LVL_ROLLUP =16
const WTT_TESTCASE_RESULT_PASS =1
const WTT_TESTCASE_RESULT_FAIL =2
const WTT_TESTCASE_RESULT_BLOCKED =3
const WTT_TESTCASE_RESULT_WARN =4
const WTT_TESTCASE_RESULT_SKIPPED =5
dim NameObj
dim Handle
Set NameObj = CreateObject("WTTLogger.Logger")
Handle = NameObj.CreateLogDevice("$Logfile;$Console")
NameObj.StartTest "DTM Logger COM Test", Handle
NameObj.Trace WTT_TRACE_LVL_ASSERT, Handle, "test.vbs", 12, "This is an assert"
NameObj.EndTest "DTM Logger COM Test", WTT_TESTCASE_RESULT_PASS, "This is the repro line", Handle
NameObj.CloseLogDevice NULL, Handle
See Also
Send feedback on this topic
Built on December 10, 2009