IDE Test Logicals

Test logicals enable you to customize the command used to spawn a component for testing using the Actions > Test option in the Component Editor.

Note:  The Uniface IDE must be restarted after setting or changing the commands specified by these logicals.
 
TEST_COMMAND_CPT

Customizes the command used to test form, report, and service components. The default command uses the current IDE configuration. This is equivalent to the following:

TEST_COMMAND_CPT = %ExeFile /adm=%AdmDir /dir=%WorkDir /asn=%AsnFile /ini=%IniFile /tst %CptName {ApsName}

  • %ExeFile—path and name of the current executable; default is ide.exe.

    It is possible to specify uniface.exe instead, but in this case you must specify the application shell name (ApsName) at the end of the command.

  • %AdmDir—full path of the current \adm directory; default is uniface\adm.
  • %WorkDir—full path of the current working directory; default is \UserDataDir\project.
  • %AsnFile—path and name of the current assignment file; default is uniface\adm\ide.asn.
  • %IniFile—path and name of the current initialization file; default is uniface\adm\usys.ini.
  • %CptName—name of the component name to test.

You can override some or all of these variables, and add other command line switches that you want to use. For example, if you want to change the assignment file and attach the Uniface Debugger, you could specify the following:

;ide.asn
[LOGICALS]
...
TEST_COMMAND_CPT = %ExeFile /adm=%AdmDir /dir=%WorkDir /asn=MyApp.asn %\
 /ini=%IniFile /deb /tst %CptName 

If you wanted to use uniface.exe instead, you could set the following command line:

;ide.asn
[LOGICALS]
...
TEST_COMMAND_CPT = D:\uniface10\bin\uniface.exe adm=%AdmDir /dir=%WorkDir %\
 /asn=MyApp.asn /ini=%IniFile /tst %CptName MyApp
TEST_COMMAND_CPT_WEB

Customizes the command used to test dynamic and static server page components and generate QR codes for testing on mobile devices. When generating QR codes, only the specified URL is used to generate the code.

TEST_COMMAND_CPT_WEB = {cmd /c start} | {"BrowserExecutable"} http://ServerName:%TomcatPort/uniface/wrd/%CptName

  • {cmd /c start}—command to start the Windows preferred browser; optional. Default after installation.
  • BrowserExecutable—path and name of a different web browser to use. Optional.
  • WebServer—address of the web server. Default after installation is http://localhost:, but this can be changed to access a network name or an IP number, for example AMS12345D1.myorg.local or 123.456.789.00. This is necessary when generating QR codes for testing on mobile devices.
  • %TomcatPort—the Tomcat port number as configured in the [install] section of the initialization file. If you have configured a different port after installation, you can specify it here.
  • %CptName—name of the component to test.

The default command starts the component with the preferred Windows browser, running in the Uniface test environment:

TEST_COMMAND_CPT_WEB = cmd /c start http://localhost:%TomcatPort/uniface/wrd/%CptName

You can edit the logical to specify a specific browser, host name, or port number. For example:

;ide.asn
[LOGICALS]
...
TEST_COMMAND_CPT_WEB = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://AMS12345D1.myorg.local:8090/uniface/wrd/%CptName