ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Test / WEBDEV test
  • Overview
  • How to?
  • Testing the current page (session or AWP mode)
  • Events executed
  • Stopping the test of a page in session or AWP mode
  • Notes
  • Directory of the data files used for testing
  • Managing passwords (analysis or data file)
  • Checking the runtime environment before the test
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The test of a single page runs the current page in WEBDEV.
This allows you to test your project from a given page, or to check if a page runs properly once its development is completed.
You can start the debugger during this test.
How to?

Testing the current page (session or AWP mode)

To test the current page (session or AWP mode) from the editor:
  1. Click in the quick access buttons (or press F9).
  2. The editor is automatically minimized and the page is run in the default browser.
Tip: To select the browser used when running the test of the page, click the test icon of the page in the quick access buttons. The arrow on the right expands a menu to choose the browser to be used for the test.
You can also select the default browser in the WEBDEV options. To select the test browser, go to the "Project" tab, "Test mode" group, expand "Test mode" and select "Test browser".
Remarks:
  • When testing a page that expects one or more parameters, a window appears automatically to enter the expected parameters.
  • To start the debugger, you just have to use the STOP keyword in the code or set a breakpoint.
  • The last test run (window, query, report, etc.) can be run again from any project element via the "GO .. Re-run the last test" option in the quick access buttons.
  • The "Test from a phone (access via a QR Code)" option allows you to test the page directly on a mobile device. A window appears, and shows a QR code to be scanned with the device. Once the code is scanned, the page is displayed on the device. This allows you to test the page on any mobile device.
    Caution:
    • This test mode is not available if you use the built-in IIS Express server.
    • The mobile device and the computer must be connected to the same network (Wi-Fi, for example).
    For more details, see Testing a WEBDEV site on a mobile device.

Events executed

The following WLanguage events are executed when a page in session mode is tested:
  • Declaring the classes (server code),
  • Initializing the project (server code),
  • Global declarations of the current page (server code),
  • Initializing the controls found in the current page (server code),
  • Initializing the current page (server code),
  • Loading the current page (browser code),
  • Entering the first control of current page (if this control has an entry process) (browser code).
When an Active WEBDEV Page is tested, the page is run with an URL containing the parameters of the page and the command line of the project. To define the command line of the project, go to the "Project" tab, "Test mode" group, expand "Test mode" and select "Configure test mode". The following WLanguage events are executed:
  • Declaring the classes (server code),
  • Initializing the project (server code),
  • Global declarations of the current page (server code),
  • Initializing the controls found in the current page (server code),
  • Initializing the current page (server code),
  • Loading the current page (browser code),
  • Entry in the first control of the current page (if the control has a "Control entry" event) (browser code).
During the test:
  • The initialization codes (project, classes, sets of procedures, etc.) are executed again each time an action is performed in the Active WEBDEV Page and each time a new AWP is displayed.
  • All the features of the page can be run. You will be able to open other pages, for example. When switching from one page to another (using PageDisplay, for example), the debugger blocks the execution of the next page until all the features of the previous page have been tested.
  • InTestMode returns True.

Stopping the test of a page in session or AWP mode

There are multiple methods to stop the test:
  • 1st method: Close the site being tested. WEBDEV displays the editor open when the test was started.
  • 2nd method: Go back to the editor via the taskbar (or Alt + Tab) and stop the test. WEBDEV displays the editor open when the test was started.
Notes

Directory of the data files used for testing

To define the location of the data files used when testing an application in the editor:
  1. Open the project description: on the "Project" tab, in the "Project" group, click "Description".
  2. In the "File" tab, select the location of the test data files:
    • Current directory: The data files will be located in the project EXE subdirectory.
    • Specific directory: The data files will be located in the specified directory.

Managing passwords (analysis or data file)

No password is requested during the test of the dynamic page, regardless of whether the page is associated with an analysis protected at runtime or with a password-protected data file.
The necessary passwords must be specified in the "Initialization" event of the project:
  • If the page uses a data file from a password-protected analysis, the password must be specified with HOpenAnalysis.
  • If the page uses one or more password-protected data files, the password must be specified with HPass.
A WLanguage error occurs when testing the page if the passwords are not specified in the "Initialization" event of the project.

Checking the runtime environment before the test

Before running a project test, WEBDEV checks whether the test environment is properly configured.
If a problem is detected, WEBDEV prompts you to:
  • "Diagnose" opens the detailed diagnosis window.
  • "Run test" ignores the diagnostic and runs the test. This option must be used if the diagnostic is incorrect.
  • "Cancel" cancels the test.
The window for detailed diagnostic is as follows:
Diagnostic details
This window performs a set of tests to check whether the test environment is properly configured.
For each detected error, a "Fix" button allows you to automatically solve the issue.
The "Help" button will be enabled if an additional help is available.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 05/05/2023

Send a report | Local help