- How to?
- Testing the current window
- Remark: Minimizing (or not) the editor during the test
- Test in a simulator
- Stopping the window test
- Directory of files used for test
- Managing passwords (analysis or data file)
Testing a single window allows you to run the current window in WINDEV or WINDEV Mobile. This allows you to test your project from a given window or to test a window once it has been finished.
Like for the project test, the debugger can be started if a problem occurs.
Testing the current window
To test the current window from the editor:
- click in the quick access buttons. The editor is automatically minimized and the window is run in a simulator.
The following WLanguage events are run at the start of a window test:
- declaring classes,
- initializing the project,
- declaring the global variables of the current window,
- initializing the controls found in the current window,
- initializing the current window,
- setting focus on the current window,
- entering the first control of the current window (if this control has an entry process).
During the test, all window features can be run. You will be able to open other windows, for example.
- To run the test of a window that expects one or more parameters, a default value must be given to the parameters in their declaration. Otherwise, a window is displayed, allowing you to enter the expected parameters. For more details, see Testing a window with parameters.
- The last test run (window, query, report, ...) can be re-run from any project element via "GO .. Re-run the last test" found in the quick access buttons.
Remark: Minimizing (or not) the editor during the test
During a test, the editor is minimized by default. Depending on the hardware configuration (wide screen, 2 screens, etc.), you may not need to minimize the editor.
To keep the editor opened:
- On the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the code editor".
- In the "Debugger" tab, uncheck "Minimize editor in test mode".
Test in a simulator
For Android, iOS ou Windows Store applications, WINDEV Mobile allows you test the window (and application) on the development computer via the simulation mode. This test simulates a device of the platform used on the development computer. This test is useful if the developer does not have a device (Android, for example) or a Mac computer to compile the iOS application. However, some features are not available in simulator mode.
Stopping the window test
There are multiple methods to stop the test:
- 1st method: Close the application being tested. WINDEV goes back to editor that was open when the test was started.
- 2nd method: Go back to the editor with the taskbar (or press Alt + Tab) and confirm the end of the test. WINDEV or WINDEV Mobile displays the editor that was used at the beginning of test.
Directory of files used for test
To configure the data files used when running the application test in the editor:
- Open the project description: on the "Project" tab, in the "Project" group, click "Description".
- In the "File" tab, select the location of the test files:
- Current directory: The data files will be in the project EXE subdirectory.
- Specific directory: The data files will be found in the specified directory.
Managing passwords (analysis or data file)
No password is requested during the test of the window, regardless of whether the window is associated with an analysis protected at runtime or with a password-protected data file.
The necessary passwords must be specified through programming in the "Initializing" event associated with the project:
- If the window uses a data file of a password-protected analysis at runtime, this password must be specified with HOpenAnalysis.
- If the window uses one or more password-protected data files, the password must be specified with HPass.
A WLanguage error occurs when testing the window if the passwords are not specified in the "Initializing" event of the project.
This page is also available for…