The eXpressApp Framework includes its own functional testing engine - EasyTest. EasyTest is specifically designed to simplify functional testing of XAF WinForms or ASP.NET applications. The Script Recorder Module supplies you with a script recorder, which can record the actions you perform on a UI, and save them to an EasyTest script file. When using the script recorder, recording is performed via a set of Actions available in the Tools menu. Compared to manually writing test scripts, the script recorder allows you to create test scripts in a much more intuitive way. This topic details the basics of using the script recorder.
The Script Recorder Module is represented by two module projects:
You can add this module to the Windows Forms application project. To do this, invoke the Application Designer and drag the ScriptRecorderWindowsFormsModule from the Toolbox to the Modules panel. Do not forget to rebuild your solution after making changes in a Designer.
You can add this module to your ASP.NET application project. To do this, invoke the Application Designer and drag the ScriptRecorderAspNetModule from the Toolbox to the Modules panel. Do not forget to rebuild your solution after making changes in a Designer.
You can add modules to your application when you create a new XAF solution using the Solution Wizard. To do this, select modules in the Choose Extra Modules step.
By default, the script recorder is enabled when a debugger is attached to the application's process. This behavior can be overridden by setting the DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderControllerBase class' nullable Boolean static ScriptRecorderEnabled property. To enable the script recorder, set this property to true. To permanently disable the script recorder, set this property to false. You can do this, for instance, in the application's Global.asax.cs (Global.asax.vb) or Program.cs (Program.vb) file.
The script recorder is represented by three Actions assigned to the Tools Action Container.
If the script recorder is enabled, it is activated from the application start in a recording mode. So the recorded script logs the actions you perform, including logging on to the application.
Please remember that the script recorder does not provide ready-to-use scripts. In most cases, you are required to manually tune the script; refer to the list below.
The Script Recorder module is demonstrated in the Feature Center Demo, installed with XAF. Refer to the Feature Center demo online to see this module in action.