We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to perform the programmatic testing in LeanFT for GridDataControl ?

Platform: WPF |
Control: GridDataControl
Tags: leanft

HP Lean Functional Testing (LeanFT) is a powerful and lightweight functional testing solution built specifically for continuous testing and continuous integration. GridDataControl do not have a support for interactive testing in LeanFT because it directly derived from ContentControl. However, you can perform code based testing, but this is not an actual LeanFT testing, it’s like our WPF unit testing.  

Steps for creating code based testing in LeanFT:

1. Open visual studio and choose the LeanFT project

Open visual studio and choose the LeanFT project

2. After creating the LeanFT project, you can add the WPF application and add the GridDataControl in it.

WPF application and add the GridDataControl

3. Add the WPF application project under the reference in LeanFT project

4. You can create the test case in LeanFT test class file under the LeanFT project,

public void TestMethod1()
    var grid = mainWindow.FindElementOfType<GridDataControl>();
    grid.Model.CurrencyManager.CurrentCell.MoveTo(1, 2);
    mainWindow.Dispatcher.Invoke(DispatcherPriority.Render, new Action(() => { }));
    var expectedValue = "Cell [1,2]";
    var cell = grid.Model[1, 2];
    cell.CellValue = expectedValue;
    var actualValue = grid.Model[1, 2].CellValue;
    mainWindow.Dispatcher.Invoke(DispatcherPriority.Render, new Action(() => { }));
    Assert.AreEqual(expectedValue, actualValue);


5. Run the test cases by right clicking the TestMethod and click the Run Tests option like below,

Run Tests




2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile