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
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
Writes information or an error into the status report of a unit test, in the test editor.
Note: This function is only taken into account during a unit test.. At runtime, this information or these errors are ignored to avoid interfering with the operation of the application or site.
Ejemplo
WINDEV
// Ajout d'une information dans le compte-rendu d'un test
TestWriteResult(twrInfo, "Début du test")
WINDEV
// Test de l'existence du fichier
IF fFileExist("C:\Mes Documents\MonFichier.txt") = False THEN
	// Si le fichier n'existe pas, une erreur est provoquée dans le test unitaire
	// et l'information "Le fichier n'existe pas" apparaît dans le compte-rendu du test
	TestWriteResult(twrError, "Le fichier n'existe pas.")
END
Sintaxis
TestWriteResult(<Type of information> , <Text to Write>)
<Type of information>: Integer constant
Type of information to write:
twrErrorUsed to write an error into the status report of the test. The test continues until it fails (WLanguage error for example).
If an error was written, the test is displayed as failed in the test manager.
twrInfoAn information is written into the status report of the test.

The type of information to write can be combined with the twrCallingProcess constant.
twrCallingProcessUsed to write a custom check procedure.
When the TestWriteResult function is called from the custom procedure, the results of the TestWriteResult function will be referenced at the level of the call to the custom procedure and not at the level of the call to the TestWriteResultfunction. .
Therefore, a double click performed in the results of the test will open the code editor on the call to the custom check procedure.
<Text to Write>: Character string
Information to write into the status report of the unit test.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300testexe.dll
Versión mínima requerida
  • Versión 11
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

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