PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Message displayed in the status report of tests
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Warning
From version 23, TestVerify is kept for backward compatibility. This function is replaced by TestCheck.
Writes a result into the status report of a test according to the result of a boolean expression.
Note: This function can only be used in the code of an automatic test.
Example
// Check the validity of an email address
// We assume that a bEmailValid function is used to check the validity of an email address
// Call this procedure with test values that represent valid addresses,
// via the sEmailAddress parameter
// In the status report of the test, a line will appear for each address checked
TestCheck(bValidEmail(sEmailAddress), "Invalid address", "OK", ...
"test about the validity of email address '" + sAddress + "': ")

// To get the invalid addresses only in the status report of test
TestCheck(bEmailValid(sEmailAddress), sAddress + ": Invalid address")
Syntax
<Result> = TestCheck(<Boolean Expression> [, <Caption if Error> [, <Caption if Success> [, <Common Caption>]]])
<Result>: Boolean
Result of <Boolean Expression>.
<Boolean Expression>: Boolean
Expression that returns a boolean (True or False).
<Caption if Error>: Optional character string
Caption that will be displayed if <Boolean Expression> is set to False.
<Caption if Success>: Optional character string
Caption that will be displayed if <Boolean Expression> is set to True.
<Common Caption>: Optional character string
Caption that will be displayed in all cases.
Remarks

Message displayed in the status report of tests

  • If the boolean expression is set to True:
    • if the sum of <Common Caption>+<Caption if Success> is not empty, TestCheck is equivalent to:
      TestWriteResult(twrInfo, <Common Caption>+<Caption if Success>)
    • if the sum of <Common Caption>+<Caption if Success> is empty, the function has no action.
  • If the boolean expression is set to False:
    • if the sum of <Common Caption>+<Caption if Error> is not empty, TestCheck is equivalent to:
      TestWriteResult(twrError, <Common Caption>+<Caption if Error>)
    • if the sum of <Common Caption>+<Caption if Error> is empty, TestCheck is equivalent to:
      TestWriteResult(twrError, <Standard error message>)
Component : wd240testexe.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment