ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Test / Automated tests
  • Overview
  • How to create the test?
  • To create an automatic test on a procedure (or on a class method):
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 automatic tests of procedure or class are used to test the different features proposed by the procedure or by the class.
Remark: Use in Windows Vista (and later): To record and replay the automatic unit tests, the UAC mechanism must be disabled.
How to create the test?

To create an automatic test on a procedure (or on a class method):

1st method
  1. Display the "Project explorer" pane if necessary.
  2. In the "Project explorer" pane, select the name of the method or the name of the global or local procedure whose test must be run.
  3. Select "Unit tests .. Create a unit test" in the popup menu.
  4. A new test scenario is automatically created. The test scenario contains the call to the function. The code required to run the test of the procedure or the test of method must be written by the developer. If parameters are expected by the method or by the procedure, you have the ability to create a set of data for test.
2nd method
  1. Display the "Code" pane if necessary.
  2. In the "Code" pane, select the name of the method or procedure whose test must be run.
  3. Select "Unit tests .. Create a unit test" in the popup menu.
  4. A new test scenario is automatically created. The test scenario contains the call to the function. The code required to run the test of the procedure or the test of method must be written by the developer. If parameters are expected by the method or by the procedure, you have the ability to create a set of data for test.
3rd method
  1. Display the procedure or the method in the code editor.
  2. On the "Automated tests" tab, in the "Tests" group, expand "New" and select "Record a new scenario".
  3. A new test scenario is automatically created. The test scenario contains the call to the function. The code required to run the test of the procedure or the test of method must be written by the developer. If parameters are expected by the method or by the procedure, you have the ability to create a set of data for test.
Remark: To create a set of test data, use TestAddIteration. See Code of scenario for more details.
Related Examples:
WD Example of unit test Training (WINDEV): WD Example of unit test
[ + ] This example presents the use of the test editor included in WINDEV:
- test of a window
- test of a global procedure
- test of a global procedure from a set of test data (available from the versions 12)
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help