Share via


WTTLogEndTest function

The WTTLogEndTest function traces the end of a test case, clears the current test case context, and sets it to the parent context.

Syntax

HRESULT WTTLogEndTest(
  LONG hDevice,
  LPWSTR pwszTestName,
  DWORD dwResult,
  LPWSTR pwszRepro
);

Parameters

  • 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).

  • pwszTestName
    [in] The name of the test case.

  • dwResult
    [in] The test case result. This parameter must be one of the following values:

    • WTT_TESTCASE_RESULT_PASS
      This value does not guarantee that the logger will log the test case as "passed". If traces are logged that indicate an error, a warning, or so on, the logger automatically overrides this value.

    • WTT_TESTCASE_RESULT_WARN
      This value does not guarantee that the logger will log the test case as "warned". If traces are logged that indicate an error or so on, the logger automatically overrides this value.

    • WTT_TESTCASE_RESULT_FAIL
      This value does not guarantee that the logger will log the test case as "failed". If traces are logged that indicate a bug or if no error trace is logged, the logger automatically overrides this value.

    • WTT_TESTCASE_RESULT_BLOCKED
      This value guarantees that the logger will log the test case as "blocked".

    • WTT_TESTCASE_RESULT_SKIPPED
      This value guarantees that the logger will log the test case as "skipped".

  • pwszRepro
    [in] The command line for rerunning the test. If this parameter is NULL, DTM Logger tries to get the command line for the current process.

Return value

WTTLogEndTest 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.

 

Requirements

Header

Wttlogger.h

Library

WTTLog.dll

See also

WTTLog Functions (C)

WTTLogEndTestEx

WTTLogStartTest

 

 

Build date: 9/14/2012