CWTTLogger::StartTestEx method
The StartTestEx method traces the start of a test case and enables you to specify a GUID-based test ID and a test hierarchy.
Syntax
HRESULT StartTestEx(
LPWSTR pwszTUID,
LPWSTR pwszTestName,
DWORD dwTestType,
LPWSTR pwszParentTUID,
LPWSTR pwszParentTestName,
LONG hDevice
);
Parameters
pwszTUID
[in] A globally unique identifier (GUID) for the test case.pwszTestName
[in] The name of the test case.dwTestType
[in] The type of the test case. This parameter can be one of the following values: WTTLOG_TESTCASE_TYPE_NOPARENTWTTLOG_TESTCASE_TYPE_ISCHILDWTTLOG_TESTCASE_TYPE_ISSIBLINGWTTLOG_TESTCASE_TYPE_SPECIFYPARENTpwszParentTUID
[in] The GUID for the parent test.pwszParentTestName
[in] Te name of the parent test.hDevice
[in] A handle to the device tracing topology. You can combine multiple handles by using the bitwise OR operator (for example, hDevice1 OR hDevice2).
Return value
StartTestEx returns one of the following values:
Return code | Description |
---|---|
S_OK | The operation was successful. |
S_FALSE | The operation was successful but the last device has been detached, which has triggered a rollup. |
HRESULT | The operation failed. You should use the FAILED macro to check HRESULT values. |
Remarks
The following code example demonstrates how to use the StartTestEx method.
Log.StartTestEx (
L"b55de776-ea89-4dbe-9abd-df2041040cd7", // GUID of the test case
L"This is a sample test," // Optional test case name,
WTTLOG_TESTCASE_TYPE_NOPARENT, // This test case is an independent test case
NULL, // GUID of the parent test case
NULL, // Optional name of the parent test case
hDevice
);
Log.EndTestEx (
WTT_TESTCASE_RESULT_PASS, // Test case result
L"b55de776-ea89-4dbe-9abd-df2041040cd7", // GUID of the test case
L"This is a sample test", // Optional test case name,
NULL, // GUID of the parent test case
NULL, // Optional name of the parent test case
hDevices
);
Requirements
Header |
Wttlogger.h |
Library |
Library:WTTLog.dll |
See also
Build date: 9/14/2012