PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Other possibilities
  • Note
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
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.
AndroidAndroid Widget This function has no effect in this version.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for Windows Phone applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
IF InTestMode() = True THEN
Trace("MenuNum variable: " + MenuNum)
END
Syntax

Checking the start mode of application Hide the details

<Result> = InTestMode()
<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).
  • False otherwise.
Special cases:
  • AndroidAndroid Widget This parameter always corresponds to False.
Versions 16 and later

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.
Note: 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:
Versions 16 and later
tmReport
New in version 16
tmReport
tmReport
Test run from a report Go.
Versions 16 and later
tmWindow
New in version 16
tmWindow
tmWindow
Test run from a window Go.
Versions 16 and later
tmPage
New in version 16
tmPage
tmPage
Test run from a page Go.
Versions 16 and later
tmProcedure
New in version 16
tmProcedure
tmProcedure
Test run from a procedure Go.
Versions 16 and later
tmProject
New in version 16
tmProject
tmProject
Test run from a project Go.
Versions 16 and later
tmQuery
New in version 16
tmQuery
tmQuery
Test run from a query Go.
Versions 16 and later
tmTest
New in version 16
tmTest
tmTest
Test run from the Go of an automatic test.
New in version 16

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.
Note: 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:
Versions 16 and later
tmReport
New in version 16
tmReport
tmReport
Test run from a report Go.
Versions 16 and later
tmWindow
New in version 16
tmWindow
tmWindow
Test run from a window Go.
Versions 16 and later
tmPage
New in version 16
tmPage
tmPage
Test run from a page Go.
Versions 16 and later
tmProcedure
New in version 16
tmProcedure
tmProcedure
Test run from a procedure Go.
Versions 16 and later
tmProject
New in version 16
tmProject
tmProject
Test run from a project Go.
Versions 16 and later
tmQuery
New in version 16
tmQuery
tmQuery
Test run from a query Go.
Versions 16 and later
tmTest
New in version 16
tmTest
tmTest
Test run from the Go of an automatic test.

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.
Note: 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:
Versions 16 and later
tmReport
New in version 16
tmReport
tmReport
Test run from a report Go.
Versions 16 and later
tmWindow
New in version 16
tmWindow
tmWindow
Test run from a window Go.
Versions 16 and later
tmPage
New in version 16
tmPage
tmPage
Test run from a page Go.
Versions 16 and later
tmProcedure
New in version 16
tmProcedure
tmProcedure
Test run from a procedure Go.
Versions 16 and later
tmProject
New in version 16
tmProject
tmProject
Test run from a project Go.
Versions 16 and later
tmQuery
New in version 16
tmQuery
tmQuery
Test run from a query Go.
Versions 16 and later
tmTest
New in version 16
tmTest
tmTest
Test run from the Go of an automatic test.
Remarks
WINDEV MobileWindows Mobile

Other possibilities

  • Windows Mobile InSimulatorMode is used to differentiate between the test mode on the mobile device and on the simulator.
  • WINDEV Mobile InReportsAndQueriesMode is used to differentiate between the test mode from the report editor and the test mode from Reports & Queries.

Note

InTestMode is available for all the products to allow for a multi-product code. Functions or procedures that use InTestMode can be shared between several products without generating any compilation error.
Component : wd240vm.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
EXEMPLO InTestMode
// VAMOS SUPOR QUE EU QUERO COLOCAR UM INFO PARA MOSTRAR ALGO, MAS SOMENTE QUANDO ESTOU TESTANDO
// E NAO NO EXECUTAVEL DO CLIENTE

IF InTestMode()=True THEN
Info("EDT_Codigo_remetente_112:"+CR+EDT_Codigo_remetente_112)
END

// BLOG COM VIDEO E EXEMPLO

http://windevdesenvolvimento.blogspot.com.br/2017/10/aula-1267-comandos-018-intestmode.html

https://www.youtube.com/watch?v=zO1WE2PrkAQ
De matos
Oct. 02 2017