Custom Module Creation for the Windows CE Stress Tool (Windows CE 5.0)

Send Feedback

You can create a custom test module for the Windows CE Stress tool. When you design a test module, take advantage of the capabilities of the harness and conform to established standards for the Windows CE Stress tool. The Windows CE Stress tool is only as effective as the test modules that it runs.

A test module for the Windows CE Stress tool should have the following qualities:

  • Be duration-based.

    The test module should run for an arbitrary duration and terminate when that time expires. Each test module should be an indivisible unit of testing that is intended to be run in several iterations in a loop.

  • Record test passage or failure on a per-iteration basis and report test results to the harness.

  • Support the use of filtered logging through the use of logging functions in the StressUtils.dll module.

You can implement a test module as a dynamic-link library (DLL) that is loaded by a generic Stressmod.exe container. Stressmod.exe manages command-line parsing, module duration, and results recoding and reporting for the test.

Your DLL must export an InitializeStressModule function, a DoStressIteration function, and a TerminateStressModule function. For more information about the functions that your DLL must export, see Custom Stress Module Functions.

In your test module, use the members of the MODULE_PARAMS structure to access information from the command line. For more information, see InitializeStressModule.

Design the test module to run for an arbitrary duration. Separate your tests into iterations that the harness can run in a loop. At the end of the duration requested by the harness, the test module should clean up, report results, and exit gracefully.

Most test modules require a minimum amount of time to perform a single iteration. Add information about the minimum duration of the test module to the initialization file for the harness so that the harness requests the test module to run for at least the minimum amount of time required for a single iteration.

Under most circumstances you may not want detailed comments throughout the log for a test. At other times, for example when debugging or attempting to reproduce a problem, you want detailed information to appear in the log. You can control the verbosity level of the log. The harness and associated modules provide a set of logging functions that you can use to preemptively filter the log for verbosity. For more information, see Windows CE Stress Tool Functions.

The test module must report whether the test passed or failed. The harness gathers information about test passage or failure on a per iteration basis. Every call to the DoStressIteration function exported by your test module is considered iteration and the harness records the return value. For information about possible return values, see CESTRESS Return Value.

See Also

Design Considerations for Stress Module Creation | Windows CE Stress Tool | Options for the Windows CE Stress Tool

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.