KB Article T752621
Visible to All Users

EasyTest - Syntax highlighting, collapsible regions, and code snippets in functional test files (*.ets, *.inc) opened with Notepad++ and Visual Studio Code

The XAF team has been using EasyTest for functional testing from 2005 - when XAF was created. Thousands of functional tests are run daily as part of our continuous integration (CI) system. Our product is huge and functional tests with EasyTest help us maintain and improve quality for both design and runtime environments for Windows and the Web (we use TestCafe and Selenium for UI tests).
We believe that any professional team of developers creating complex XAF apps should put EasyTest or any other functional testing framework at the core of their CI systems. To get started, see Functional Testing.

PROBLEM
Every day we create new or edit existing test scripts for new features or bug fixes. Our typical flow with test scripts includes running the TestExecutor tool from the command line. Example: TestExecutor.v19.1.exe D:\MySolution.Tests\ContactTest.ets -d:9. We wanted basic syntax highlighting and a lightweight editor, because test files are opened very often. Visual Studio apparently was too heavy for this task. Our solution was to develop extensions for two popular and lightweight editors used in our team: VS Code and Notepad++.
We want to share these tools with other XAF teams. If there is interest from the XAF community, we can maintain and improve these tools further at https://github.com/DevExpress.

FEATURES
Our extensions for Notepad++ and VSCode provide the following basic functionality:

1.  Syntax highlighting for main EasyTest language elements.
Notepad++

VS Code

2.  Collapse/expand commands for the #IfDef directive and command parameters (VS Code only).
Notepad++

VS Code

3.  Comments support.
Notepad++

VS Code

4.  Code snippets for the #IfDef/#Endif directives (VS Code only).

SETUP
Notepad++

  1. Open Notepad++. In the menu bar, select Language and then Define your language.
  2. Press Import and select the DevExpress.XAF.EasyTest_NPP-1.0.0.xml file (downloaded earlier).
  3. Restart Notepad++. Languages menu will show the EasyTest at the bottom after restart.

VS Code

  1. Open VS Code and press Ctrl+Shift+P to show Command Palette.
  2. Type Install from VSIX and select it.
  3. Select the DevExpress.XAF.EasyTest_VSCode-1.0.0.vsix file (downloaded earlier) and click Install. For more information, see the official documentation: Install from a VSIX.

Learn More About Functional & Unit Testing in XAF
Functional Testing | EasyTest Basics | Script Reference
How to write lightweight unit tests for XAF Actions, Controllers and other custom UI logic
EasyTest - How to integrate XAF functional testing with Continuous Integration systems like Azure DevOps
How to use EasyTest and Selenium WebDriver to create functional tests for XAF's Blazor UI with C#, VB.NET or a human-readable scripting language
T is for Testing: XAF & XPO by Manuel Grundner (DevExpress MVP)

Search keywords
tests, functional testing, EasyTest, Script Recorder, usability, team developers, continuous integration, CI, high quality, catch errors

Show previous comments (5)

    I'm just writing test cases and this is awesome, thanks guys!

    Dennis Garavsky (DevExpress) 5 years ago

      @Bernd: Cool!

      C C
      Christoph Weinzierl-Heigl [msg] 5 years ago

        Very welcome addition. This should be in VS Code's marketplace.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.