Back to Devexpress

End-to-End Tests with xUnit

expressappframework-403852-debugging-testing-and-error-handling-functional-tests-easy-test-write-tests-csharp-vb-end-to-end-tests-with-xunit.md

latest2.2 KB
Original Source

End-to-End Tests with xUnit

  • Feb 21, 2026
  • 2 minutes to read

You can use the xUnit framework to create and run functional tests for XAF applications. There are two ways to create such tests in XAF applications: with the Wizard (recommended) or manually. The following sections describe each option in more detail.

Step 1—Add the Selenium Driver to Your System

Tip

You can skip this step if you test only WinForms XAF applications.

XAF exposes API that allows you to use the Selenium driver to interact with browser and individual web page elements.

To run functional tests for ASP.NET Core Blazor XAF Applications, install browser drivers.

Selenium requires a path to the downloaded driver. Add a folder with that driver to the system’s PATH variable.

Step 2—Create a Test Project

Add a Test Project to a New Application

When you create a new solution, select the End-to-End / Functional Tests check box in the Template Kit to add an integrated functional test project in the solution.

Add a Test Project to Existing Application

  1. Add a new xUnit Test Project to your solution.

  2. In the project file, change the following:

  3. Add EasyTest references.

  4. Configure end-to-end tests. For this purpose, add a new Tests.cs file to your test project.

  5. Add test code to the Tests.cs file. For example:

Step 3—Run Tests

  1. Switch the solution configuration to EasyTest.
  2. Build the solution.
  3. Right-click the solution and select Run Tests.