AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de pruebas
  • Message displayed in the status report of tests
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Advertencia
A partir de la versión 23, TestVerify se conserva por motivos de compatibilidad. Esta función ha sido reemplazada por TestCheck.
Writes a result into the status report of a test according to the result of a boolean expression.
Remarks:
  • This function can only be used in the code of an automated test.
  • To test the result of a Boolean expression on all platforms, use dbgCheckXXX functions. For more details, see Debugging functions.
Ejemplo
// 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(bEmailValide(sAdresseEmail), sAdresse + ": Invalid address")
Sintaxis
<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.
Observaciones

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>)
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300testexe.dll
Versión mínima requerida
  • Versión 12
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local