PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Running the automated tests of an executable from WINDEV
  • Running the automated tests on an executable from WINDEV
  • Running the automated tests of an executable without WINDEV
  • Caution
  • Recording an automated test of an executable without WINDEV
  • "Automated test" event of the project
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
WINDEV proposes to run the different project tests directly on the corresponding executable. This allows you to run the test of an executable in real deployment conditions.
The principle is straightforward:
  1. A test robot (WDAutomate.exe) that operates with its own framework allows you to run the requested executable.
  2. The executable to test must be used in the same conditions as the ones experienced by the end users (including, if necessary, the access to the databases used or to an equivalent test database, the framework used, ...).
  3. To run the different tests, the executable whose test must be run loads a specific library containing the tests.
  4. The tests are run and the result is saved in the Control Centers. The result can be displayed:
    • from the test robot (by selecting the executable and the test library).
    • from WINDEV (for the project version used to create the executable).
Remark: The automated tests do not operate on a non-interactive TSE session.
Running the automated tests of an executable from WINDEV

Running the automated tests on an executable from WINDEV

To directly run the automatic tests on an executable from WINDEV:
  1. Create the executable: expand in the quick access buttons and select "Generate the Windows executable (32 bits)" for example.
  2. Generate test library: on the "Automated tests" tab, in the "Automated test" group, click "Generate library". The test library has the following format: TEST_<ProjectName>.WDL. This library is created in the "Data of automated tests" subdirectory of the project.
  3. Run the tests on the executable: on the "Automated tests" tab, in the "Automated test" group, click "Start the automated test". In this window, you must select:
    • The relevant product (WINDEV).
    • The executable whose test must be run.
    • The test library to use.
    • The command line (if necessary).
    • The tests to run.
      New in version 27
      Remark: If the executable contains internal components, the automated tests of these internal components also appear in the list of tests that can be executed.
  4. Click the "Run the tests" button. The tests are automatically run and the result is displayed in the test robot.
Running the automated tests of an executable without WINDEV
The automated tests of a WINDEV executable can be run without the corresponding product being installed on the current computer. However, some files are required:
  • Files required to start the test robot:
    • WDAutomate.exe
    • wdxxxxx.dll
    • wdxxxtest.dll
  • Files required to save the results of tests: Data files of Control Centers. At least one Control Center must be installed on the computer.
    The data files of Control Centers must be the ones used on the development computer (to be able to see the result of the tests). Several cases may occur:
    • if the Control Centers use a Client/Server database, the data of the Control centers is shared between the computers.
    • if the Control Centers use a HFSQL Classic database in network, the data of Control Centers is found in a shared directory.
  • Executable to test with its framework (and the accesses required for the test).
  • Test library and test data (the "Data of automated tests" subdirectory of the project must be copied to the computer)
The result of the automated tests can be directly viewed in WINDEV: to do so, open the project corresponding to the executable.

Caution

To run the test of an executable created with an earlier WINDEV version, the test engine must have access to the WDxxxTest.DLL library corresponding to the executable version.
Therefore, the WDxxxTest.DLL library corresponding to the version of the executable whose test is run must be copied beside WDAutomate.exe.
Recording an automated test of an executable without WINDEV
The recording of a test scenario can be enabled by an entry in the .wx file of the application.
Reminder: The .wx file must be used to configure some features of the executable. It must be named like the .EXE and it must be found in the same directory. Its extension is.wx (uppercase or lowercase characters).
The following section must be added into the .wx file:
[SCENARIO]
ENABLED=1
FILE=<name and path of the test scenario file to record
(the extension of this file must be .wsct)>
DLLPATH=<path of the DLLs required to record the scenario>
This method can be used if the executable does not use the same version of the DLLs as the test robot (WDAutomate.exe) and therefore the two applications cannot be found in the same directory.
Two additional DLLs are required to record the test: wdxxxtest.dll and wdtest.dll.
"Automated test" event of the project
WINDEV allows you to enable (or not) the event "Automated test" of the project. On the "Automated tests" tab, click in the "Tests" group and select:
  • "Enable the code of automatic test for the project".
  • "Disable the code of automatic test for the project".
In the case of an automated test, this event is run before the project initialization code. This code us used to process some special cases where the automated test may be locked: opening a window in the initialization code of the project (configuration window, license window, custom login window, ...).
The event "Automated test" of project allows you to use EmulateWindow to validate the window for example.
Minimum version required
  • Version 11
Comments
Click [Add] to post a comment