Home | Sign in | French EN
This content has been translated automatically. Click here to view the French version.
  • This lesson will teach you the following concepts
  • NOTE2
  • Project
  • For example
Lesson 4.13. Monitor the evolution of your applications
This lesson will teach you the following concepts
  • What is the dashboard?
  • Automatic tests.

Lesson duration: Estimated time
Previous LessonTable of contentsNext Lesson
NOTE2_1. Overview
The project dashboard is an essential element for managing the WINDEV projects
The project dashboard gives an overall view of the progress of a project.
The dashboard includes several elements (widgets) that give an overall view of the project status.

In this section

Answer: If you did not create the windows in the previous lessons, you can follow this lesson by opening a corrected project
in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (with windows)".: A full corrected application project is also available
  • in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)"
Display the project dashboard. NOTE3
The dashboard. Project dashboard
For example
The "Static audit and Compilation" Widget is used to quickly see whether the project contains compilation errors
You have the ability to enable (or not) a Widget, to add one or to delete one at any time.
NOTE4. NOTE4_1. Automatic tests. One of the most interesting features of the dashboard is to give information about the tests that have been run on the application.
Several tests have already been run while developing our application.
The automatic tests are a category of specific tests

The automatic tests are used to automatically perform some operations on your windows

These tests are recorded as WLanguage scenarios and they can be easily modified in the code editor
  • Once recorded, the automatic test can be re-run as many times as necessary, to test for example the impact of a modification made to a window, a procedure, ...
    1. Let's give it a try! We are going to create an automatic test on the edit window that was created at the beginning of this lesson.
    2. Remark
    3. The automatic tests can be run on the windows, procedures, classes.
    4. To create an automatic test on a window, all you have to do is run the test of the window:
    5. Open the "WIN_Menu" window in the editor.
    6. On the "" pane, in the "" group, expand "" and select "Record a new scenario".
    7. Automatic tests
    8. Tests.

      In the window that is displayed

      The test of the window is run.. Click the "Finding orders" tab pane..
    9. Choose the "Credit card" payment mode.
    10. Click "Find".. Close the window via "Menu .. Exit" and confirm the end of application: Remark. This option may not be available if you did not follow the entire tutorial
    11. In this case, click the "x" to close the window: The recording of the automatic test has ended.
    12. The test editor proposes to save a description for the automatic test we just created:
      • Enter the name of the automatic test.
      • "Test for finding orders".
    13. Validate.
    14. The test editor displays the WLanguage code of the test that has just been recorded.
      The test is currently available and has not been executed ( icon in front of the test name under the editor).

      WLanguage code of an automatic test

      Available test
  • The test can be run at any time. Select the test name in the test editor. In the popup menu (right click), select "Run"
    1. The test runs automatically and the test editor displays the result in the "Test Results" pane (the test passed in our case).
    2. Record the test if necessary ( or Ctrl + S)
    3. Registering
    4. Remark
    5. The WLanguage functions used to run automatic tests are the EmulateXXX functions.
    6. We are now going to perform a modification in our window and to run the test again
    7. The modification affects the "Find" Button control.
    8. We are going to gray it..
    9. Display the "WIN_Menu" window if necessary.. In the editor, click the "Finding orders" tab pane and select the "Find" Button control..
    10. Open the control description ("Description" in the popup menu)..
    11. In the "UI" tab, select "Grayed".
    12. Validate the control description window.
    13. Save the window.
    14. Go back to the test editor (click the corresponding button in the open documents bar).
    15. Run the test again. The test appears again in the test editor
  • The "Compilation errors" tab pane reports several test errors. Redisplay the "WIN_Menu" window in the editor
    1. Open the description of the "Find" Button control ("Description" in the popup menu).
    2. In the "UI" tab, select "Enabled".
      // If the Table control contains no record
      IF WIN_Menu.TABLE_QRY_FindOrders..Count = 0 THEN
      // An error must be signaled
      TestWriteResult(twrError, ...
       "The Table control is empty after search")
      Display the test editor if necessary (for example, double-click "TEST_Menu" in the "Tests" folder of the "Project explorer" pane).
    3. Add the following code before the line "EmulateMenu("_Menu","OPT_Exit")":
    4. //############. // If the Table control contains no record. IF WIN_Menu.TABLE_QRY_FindOrders..Count = 0 THEN.
// An error must be signaled
  • TestWriteResult(twrError.
  • "The Table control is empty after search")
  • END
Record the test ( or Ctrl + S)
  • Click the icon
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 24
Click [Add] to post a comment