Notes

From STRIDE Wiki
Jump to navigation Jump to search

Note macros provide a simple means to add annotations attached to the currently executing test case. These annotations are added to the test report with a level of either Error, Warning, or Info according to the macro that is used. The message also includes the file and line number.

Example usage of Notes

srNOTE_INFO("This is an info message with format string %s and %s.", "this", "that");
srNOTE_WARN("This is a warning message with format string %d.", 123);
srNOTE_ERROR("This is an error message.");

Syntax

The message is a pointer to a null-terminated format string

 srNOTE_INFO(message, ...)
 srNOTE_WARN(message, ...)
 srNOTE_ERRO(message, ...)
  • versions of these log macros also exist for use with dynamically generated test cases. To use these macros, just append _DYN to the macro names shown above and then pass the explicit testCaseHandle_t item as the first argument to the macros.
  • The maximum length of the message string approximately 1000 characters. If the maximum length is exceeded, the message string is truncated.