|
|
|
|
- Other possibilities
- Availability of the function
InTestMode (Function) In french: EnModeTest
Warning
From version 16, OntestMode is kept for backward compatibility. This function is replaced by InTestMode.
Indicates whether the application or the site is started: - from the WINDEV or WEBDEV editor,
- from the executable or browser.
from the WEBDEV administrator.
IF InTestMode() = True THEN Trace("MenuNum variable: " + MenuNum) END
Syntax <Result>: Boolean - True if the application is run:
- from the WINDEV editor (window or project Go).
- from the editor of Reports and Queries (report Go).
- in debug on Mobile.
- in component debug via executable.
- from the WEBDEV editor (page or project Go).
from the WEBDEV administrator (Test button).
- False otherwise.
Special cases: In AWP mode, this parameter always corresponds to False. In a REST Webservice, this parameter always corresponds to False.
Checking the origin of start mode of application test Hide the details
<Result> = InTestMode([<Type of execution>])
<Result>: Boolean - True if the test is run from the requested element,
- False otherwise.
Remark: The start mode taken into account is the one for the origin of test. For example, if the test of the report is run from a window displayed by a project GO, the origin of test will be the project GO.
<Type of execution>: Integer constant (or combination of constants) Origin of test execution: | | tmPage | Test run from a page Go. | tmProcedure | Test run from a procedure Go. | tmProject | Test run from a project Go. | tmQuery | Test run from a query Go. | tmReport | Test run from a report Go. | tmTest | Test run from the Go of an automatic test. | tmWindow | Test run from a window Go. |
Remarks Availability of the function InTestMode can be used in all IDEs to allow for cross-platform code. Functions or procedures that use InTestMode can be shared between several products without generating any compilation error. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|