I want to do automated testing of DevExpress control.
I have found some frameworks like guia, NUnitForm etc. but they all are for standard WPF controls.
Is there any other framework which can help me to test DevExpress control?
Switch the DevExpress WPF controls to UI Testing mode. To do this, set the DX.UITESTINGENABLED environment variable to 1 or the ClearAutomationEventsHelper.UITestingEnabled property to true for the application under test (on application startup). This mode produces the following changes:
You can create automated tests with the UIAutomationClient library API or use any UI testing library based on the UI Automation technology. DevExpress WPF Controls include a UI Testing mode option.
Microsoft recommends Appium with WinAppDriver for testing desktop and UWP apps, and this message has sparked the interest among our users: are DevExpress controls compatible with Appium? We have tested a number of our controls, and the short answer is - yes. Here’s what you should do to create automated UI tests with Appium.
In short, you can create UI Automation tests for basic scenarios, but more complex cases may require custom code. We are looking for more feedback from developers before we commit to full UI Automation testing support. If you would like to share additional info about your test protocols, please feel free to contact me at [email protected].
If you are using the DevExpress XAF framework, then DevExpress provide EasyTests. There is some evidence that you could get EasyTests working with non-XAF applications - I'd ask in the Support Center.
Another option: DevExpress have recently launched TestCafe which is definitely worth a look, but I don't have any experience with it yet. It is commercial software, but there is a free evaluation available. It is not XAF-specific (nor even DevExpress-specific) and can target any web application.
You can also use Selenium. It's not very easy because the DevExpress controls are complex and it's sometimes hard to find the right element to click on. Also, since a lot of AJAX calls take place you end up with a lot of waitForElementPresent()
and so forth. For instance, your code might end up looking like this
selenium.type("xpath=//input[contains(@id,'_xaf_dviUserName_Edit_I')]", username);
selenium.type("xpath=//input[contains(@id,'_xaf_dviPassword_Edit_I')]", "");
selenium.click("Logon_PopupActions_Menu_DXI0_T");
That example is taken from my blog post about automating testing against DevExpress expressAppFramework. I use the Firefox Selenium-IDE plugin to help find working syntax and then write scripts accordingly.
Finally, a commercial product called Ranorex claims to support DevExpress controls. I do not have any experience of it.
You can also use Microsoft Coded UI Tests. Disadvantage is that you need Universal-Licence of DevExpress and at least Visual Studio (2012) Premium. Works fine in your projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With