PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Running the automatic tests of an executable from WINDEV
  • Running the automatic tests on an executable from WINDEV
  • Running the automatic tests on an executable from WINDEV Mobile
  • Running the automatic tests of an executable without WINDEV
  • Caution
  • Running the automatic tests of an executable without WINDEV
  • Translating the entries of the .wx file
  • "Automatic test" process of project
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
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 module (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).
Notes:
  • Use in Windows Vista: At the moment, the UAC (user account control) must be disabled in order to record and replay the automatic tests.
  • The automatic tests do not operate on a non-interactive TSE session.
  • Until version 21, the automatic tests on Windows CE executable could also be run from WINDEV Mobile.
Note: The automatic tests do not operate on a non-interactive TSE session.
Running the automatic tests of an executable from WINDEV

Running the automatic tests on an executable from WINDEV

To directly run the automatic tests on an executable from WINDEV:
  1. Create the executable ("Workshop .. Executable .. Generate the Windows executable (32 bits)" for example).Create the executable: expand among the quick access buttons and select "Generate the Windows executable (32 bits)" for example.
  2. Generate the test library ("Automatic tests .. Generate the test library"). The test library has the following format: TEST_<ProjectName>.WDL. This library is created in the "Data of automatic tests" sub-directory of project.Generate the test library: on the "Automatic tests" pane, in the "Test robot" group, click "Generate the library". The test library has the following format: TEST_<ProjectName>.WDL. This library is created in the "Data of automatic tests" sub-directory of project.
  3. Run the tests on the executable ("Automatic tests .. Run the test robot"). In this window, you must select:Run the tests on the executable: on the "Automatic tests" pane, in the "Test robot" group, click "Start the robot". 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.
  4. Click the "Run the tests" button. The tests are automatically run and the result is displayed in the test robot.
Windows Mobile

Running the automatic tests on an executable from WINDEV Mobile

To directly run the automatic tests on an executable from WINDEV Mobile:
  1. Create the executable ("Workshop .. Generate the Windows CE/Mobile application"). The executable must be copied onto the mobile device.Create the executable: expand among the quick access buttons and select "Generate the Windows CE/Mobile application". The executable must be copied onto the mobile device.
  2. Generate the test library ("Automatic tests .. Generate the test library"). The test library has the following format: TEST_<ProjectName>.WDL. This library is created in the "Data of automatic tests" sub-directory of project.Generate the test library: on the "Automatic tests" pane, in the "Test robot" group, click "Generate the library". The test library has the following format: TEST_<ProjectName>.WDL. This library is created in the "Data of automatic tests" sub-directory of project.
  3. Run the tests on the executable ("Automatic tests.. Run the test robot". In this window, you must select:Run the tests on the executable: on the "Automatic tests" pane, in the "Test robot" group, click "Start the robot". In this window, you must select:
    • The relevant product (WINDEV Mobile).
    • The executable whose test must be run (on the mobile device).
    • The test library to use.
    • The command line (if necessary)
    • The tests to run.
  4. Click the "Run the tests" button. The tests are automatically run on the mobile device and the result is displayed in the test robot.
Running the automatic tests of an executable without WINDEV
The automatic 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). For WINDEV Mobile, the executable must be installed on a Mobile computer connected to the current computer.
  • Test library and test data (the "Data of automatic tests" sub-directory of the project must be copied to the computer)
The result of the automatic tests can be viewed in WINDEV or in WINDEV Mobile: to do so, open the project corresponding to the executable.The result of the automatic 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.
Running the automatic tests 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]
ACTIF=1
FICHIER=<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.

Translating the entries of the .wx file

The entries of the .wx file are available in French or in English. In French, the following section must be added:
[SCENARIO]
ENABLED=1
FILE=<name and path of the test scenario file to record
(the extension of this file must be .wsct)>
CHEMINDLL=<path of the DLLs required to record the scenario>
"Automatic test" process of project
WINDEV and WINDEV Mobile allow you to enable or disable the code for automatic test of the project ("Automatic tests .. Enable the code of automatic test for the project" and "Automatic tests .. Disable the code of automatic test for the project").WINDEV and WINDEV Mobile allow you to enable (or not) the code of automatic test for the project. On the "Automatic tests" pane, 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".
WINDEV allows you to enable (or not) the"Automatic test" process of project. On the "Automatic tests" pane, 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".
For an automatic test, this process is run before the initialization code of the project. This code us used to process some special cases where the automatic test may be locked: opening a window in the initialization code of the project (configuration window, license window, custom login window, ...).
The "Automatic test" process of project allows you to use EmulateWindow to validate the window for example.
Minimum required version
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment