How to do automated UI testing of devexpress controls?

5.1k views Asked by At

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?

2

There are 2 answers

1
shamp00 On BEST ANSWER

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.

0
Micha On

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.