• Overview
  • Implementation
  • Creating and recording the scenario
  • Importing a scenario into a project
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Automatic test created by the user

WinDev allows the user to record a test scenario in order to send it to the quality service or to the developer. Therefore, the user can easily transmit a reproduction protocol that is difficult to explain.

The developer will be able to import the tests directly into his project. These tests can be run to reproduce the problem encountered by the user and they can be added to the automatic tests of the application.

The extension of a scenario file is "wsct".


Creating and recording the scenario

The creation of the scenario can be performed:
  • in the application directly, by programming, with 调试开始记录. Several WLanguage functions are available:
调试开始记录Starts recording the scenario.
调试记录结束Stops recording the scenario

  • without modifying the application, via a specific file. To do so, create a file named <Executable Name>.WX beside the executable of the application. This file must contain the following lines:
Enabled = <0/1>
File = <Name of WSCT file>
DLLPath = <DLL path for test>

Let's take a look at these lines:
  • Enabled: This parameter must correspond to 0 to avoid recording the scenario and to 1 to record the scenario
  • File: Name of the scenario file ("wsct" extension). This name can be built with the following elements:
[%ExeDir%]Directory of the executable, always filled with the "\" character. This directory is equivalent to the result of 文件可执行文件目录.
[%ExeName%]Name of the executable.
[%Date%]Start date of the scenario file.
[%Time%]Start time of the scenario file.
[%UserName%]Name of the current user.
[%ComputerName%]Name of the computer.
Directory of HFSQL data files specified by the user when installing the application. This directory is equivalent to the result of 文件数据库目录.
Directory for the data of the current user of the current application. . This directory is equivalent to the result of 文件用户数据目录.
  • CheminDLL: path used to access the wdxxxtest.dll library. This DLL is required to create the scenario.

Importing a scenario into a project
To import a scenario created by the user into a project:
  1. Open the requested project in WinDev.
  2. Select "Automatic tests .. Import a scenario recorded on the application".On the "自动测试" pane, in the "测试" group, expand "新建" and select "Import a scenario recorded on the application".
  3. Select the scenario file to import (wsct extension).
  4. The scenario is automatically imported into the project:
    • An automatic test is created for each window used in the scenario. If some tests already exist for the window, the imported tests are automatically created in the test associated with the window.
    • The imported tests are automatically in construction: the developer must check the tests and enable them if necessary.
    • The description windows corresponding to the imported tests are displayed in the editor: the tests can be viewed one by one.