- Method that must be taken into account before recording a test script
- Some precautions are necessary:
- Recording a test script
- Screen shot
WDTest : Recording a test script
Recording the test script is an important step.
The test script is a text file (".TXT" extension) that contains all operations performed when recording the script. For each operation, the script contains:
- the action performed (mouse movement, key used, ...).
- the position of mouse cursor, if it is a mouse action.
- the key used, if it is a keyboard action.
- the action duration (in milliseconds).
- the title of window used.
WDTest allows you to view the script:
Note: The following operations are not stored:
- Using the mouse wheel.
- Using the Windows keys on the keyboard (key opening the "Start" menu or displaying the popup menu of hovered element).
Caution: Using the Windows keys while recording a script may generate failures in WDTest.
Method that must be taken into account before recording a test script
Some precautions are necessary:
- Plan the operations to perform before recording a test script.
Caution: The number of operations stored in a script cannot be exceed 100,000. If there is an important number of actions to record, we recommend that you record several test scripts. Then, these scripts can be played one after the other if necessary.
- Close the current applications that could affect the script recording (applications displaying a window every 5 minutes for example).
- Run the application to test.
Caution: The position of mouse cursor will be saved. Therefore, the Windows windows (file picker, directory picker, explorer, ...) must be handled via the keyboard keys only (Tab, Enter, ...).
WDTest allows you to replay an action performed by the mouse on a window even if the window is not positioned in the same place as when the test was recorded. For example, if a button found in a window was moved since the recording of a script that clicks this button, there is no need to record the script again.
- WDTest allows you to replay the test scripts on any computer. However, we recommend that you record and run the test script on the same computer. Indeed, running the script on another computer requires a setting similar to the one of initial computer (same screen resolution, same operating system, ...).
- A test script cannot contain the operations performed in the debugger of WINDEV or WINDEV Mobile.
To record a test script:
- Start (if necessary) the application to test.
- Start WDTest if necessary. When minimizing WDTest, the application to test must be the first application displayed.
- Click the "New" button to add a new test script.
- Specify the following information in the new window:
- the name of the script.
- the description of the script
- the directory of the script file. Use the "Browse" button if necessary. By default, the script file is saved in the "Programs" sub-directory of WINDEV setup directory.
- the directory of result file. Use the "Browse" button if necessary. By default, the script file is saved in the "Programs" sub-directory of WINDEV setup directory.
- Validate. WDTest automatically proposes to start recording the script.
- Perform the operations to record. The description of these actions is automatically saved in the script file (".TXT" file).
- To end the recording of test script:
- press the Scroll Lock key,
- press Ctrl + Shift + + key on the numeric keypad.
WDTest allows you to perform screen shots when running the test script.
To perform screen shots:
- When recording the script, press Alt+[Scroll Lock] as soon as a screen shot must be performed.
- When running the script, the screen shots will be automatically performed. Each screen shot will be saved in a bitmap file (".BMP" extension).
These files are named "<NameResultScriptFile>XXX.BMP" and they are created in the directory of the result script file (directory of the ".LOG" file).
"XXX" represents a three-digit number corresponding to the order in which the screen shots have been performed. The first screen copy will be named "<NameResultScriptFile>000.BMP", the second one "<NameResultScriptFile>001.BMP", and so on.
This page is also available for…
Click [Add] to post a comment