PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
TestWriteResult (Function)
In french: TestEcritRésultat
AjaxNot available
Writes information or an error into the status report of a unit test, in the test editor.
Note: This function is available for the unit tests only. At run time, this information or these errors are ignored to avoid interfering with the operation of the application or site.
Example
WINDEVWEBDEV - Server code
// Add an information into the status report of a test
TestWriteResult(twrInfo, "Beginning of test")
WINDEVWEBDEV - Server code
// Check the existence of the file
IF fFileExist("C:\My Documents\MyFile.txt") = False THEN
// If the file does not exist, an error is triggered in the unit test
// and "The file does not exist" is displayed in the status report of the test
TestWriteResult(twrError, "The file does not exist.")
END
Windows Mobile
// Check the existence of the file
IF fFileExist("\My Documents\MyFile.txt") = False THEN
// If the file does not exist, an error is triggered in the unit test
// and "The file does not exist" is displayed in the status report of the test
TestWriteResult(twrError, "The file does not exist.")
END
Syntax
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.
Versions 17 and later
The type of information to write can be combined with the twrCallingProcess constant.
Versions 17 and later
twrCallingProcess
New in version 17
twrCallingProcess
twrCallingProcess
Used to write a custom check procedure.
When TestWriteResult is called from the custom procedure, the results of TestWriteResult will be referenced in the call to the custom procedure (and not in the call to TestWriteResult).
Therefore, a double click performed in the results of the test will open the code editor on the call to the custom check procedure.
New in version 17
The type of information to write can be combined with the twrCallingProcess constant.
Versions 17 and later
twrCallingProcess
New in version 17
twrCallingProcess
twrCallingProcess
Used to write a custom check procedure.
When TestWriteResult is called from the custom procedure, the results of TestWriteResult will be referenced in the call to the custom procedure (and not in the call to TestWriteResult).
Therefore, a double click performed in the results of the test will open the code editor on the call to the custom check procedure.
The type of information to write can be combined with the twrCallingProcess constant.
Versions 17 and later
twrCallingProcess
New in version 17
twrCallingProcess
twrCallingProcess
Used to write a custom check procedure.
When TestWriteResult is called from the custom procedure, the results of TestWriteResult will be referenced in the call to the custom procedure (and not in the call to TestWriteResult).
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 (with quotes)
Information to write into the status report of the unit test.
Business / GUI classification : Neutral code
Component : wd240testexe.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment