WPF application test automation - wpf

We have large WPF application and WCF server behind it. I was wandering if there is tool for automated testing of such application similar to selenium for web apps ?
I've googled about the topic, and I've seen some tools, like Ranorex (http://www.ranorex.com/wpf-ui-test-automation.html) and I'd like to hear about the experience that you had with some the tools (it doesn't have to be free).

My experience with Ranorex is that Ranorex Studio is buggy. It crashes relatively often and doesnt seem to have a good support for Team Foundation Server.
For WPF testing I use UI Automation. It doesnt give you a nice interface for creating the tests like Ranorex. I like to use UI Automation because I generally prefer coded tests.
Ranorex has the advantage that it supports all kinds of applications (windows apps, websites). UI Automation is only for Windows Apps.

Related

Performing Automation Testing for both Web and Desktop Applications at the same time

I am performing an automation testing, and I have two applications. one is web application and the other is desktop application (WPF). They work together and one needs the other. To perform task on the desktop application the task should be finished first by the web application. I can do automation testing for the web application using Selenium or Protractor. At the same time I I can do automation testing for the Desktop application using Winium. But what I want is to perform automation for both sequentially. Is there any solution some one can provide me?
For your information my web application is developed using Angular JS.
Thank you in advance
Below is how I have configured my tests. I choose C# as the programming language. Selenium has .Net bindings so for UI interaction I use Selenium (C#). For Desktop App I am using FlaUI / (TestStack.White). My tests are written in SpecFlow (BDD's implementation in .Net). So that way I am able to test all of my apps under one umbrella and still use all of the open source technology for testing.
You can use following Tools : By using following tools you can interact with both Desktop and Web Component in a Single Test
Tosca :
It also supports Desktop and Web Automation. It's Community edition is FREE.
Refer Tosca
Ranorex
It supports Desktop, Web And Mobile as well. It is paid tool.
Refer Ranorex
TestComplete
It is an automated testing tool that lets you create, manage and run tests for any Windows, Web or Rich Client software. It makes it easy for anyone to create automated tests. And automated tests run faster, increase test coverage and lower costs. It is paid tool.
Refer Test Complete

Automation for testing desktop application with chromium,WPF,awesomium

We have a desktop application developed with below technologies
WPF,
Chromium,
awesomium controls
Can anyone suggest me any tool for automating this application
We tried all popular tools in market but no luck.
Let me know if anyone have worked on these application or please provide any suggestions
I had similar application to test. I used UIA for WinForm and WPF.
After a lot of research, For Chromium interface, since it's not UIA implementation and browser embedded UI and since the code for web browser and desktop is same. I preferred testing that module in web browser than desktop.
The only other way I found is by using Sikuli. Since it is based on images, I couldn't rely on it.
You can use Ranorex studio, there inside plugin sections you can configure CEF settings as well as WPF settings.
More info - https://www.ranorex.com/

Selenium for WPF UI automation testing

Can I use Selenium to do WPF UI automation testing?
Support for WPF automation exists in WPF itself. Check out AutomationPeer. This article might help. This article is more detailed. All this is good if you want to automate interaction with the UI itself (the usefulness of which is debatable).
Another course of action is to unit test the business logic without touching the UI - if the application uses MVVM then the loose coupling between View and ViewModel should make unit testing a breeze. I get the impression that you're more into automating the UI though.
Yes, you can use Appium which is based on Selenium.
There is a pretty good introductory blog post by Scott Hanselman: WinAppDriver - Test any app with Appium's Selenium-like tests on Windows.
You'll need the WinAppDriver that "supports testing Universal Windows Platform (UWP) and Classic Windows (Win32) apps on Windows 10 PCs".
Selenium can be used to automate only web applications. If your WPF is an windows application you can not automate it.
If you WPF application runs in a web browser using XBAP, still you will not be able to automate the application. So the answer is NO.

Switching from Web UI testing to Windows Forms application testing

I have been using Selenium (WebDriver) for some time now, utilising Microsoft Team Foundation Server (VS2010, Microsoft Test Manager, Lab Management) to trigger my automated tests on specified builds. This has been working great and I have even written a wrapper framework to allow for a lot of re-usability and switching to WatiN should it be needed.
My issue is, now the applications I am to test are Windows Forms (with infragistics and Teecharts), not Web Applications, and I am under the impression from my research that both Selenium and WatiN will now be inappropriate. I have been reading about NUnitForms and White as they appear to be common free choices amongst SO posts asking a similar question. However, I am wondering if anyone has had experience with setting up TFS with automated UI tests for a Windows Forms Application?
Or, failing that, has anyone used Visual Studio 2010 with a free Windows Forms UI testing package and had some success? My plan is to try White/NUnitForms next week, but though I would look for some personal recounts just in case this is not worth pursuing.
After some more reading and checking around SO, I have found a few more helpful links. I am still at a loss as to a solid way to do things but am confident it can be done.
The following links I found helpful; winforms Post on SO, Continuous Integration in White Documentation (I missed this initially somehow...), and as a further look I found utilising NUnit with White TFS is fully supported for my needs. NUnit with TFS can be found here.
Hope this helps anyone in the same position, and I welcome any further answers as I still have not commenced any actual testing.
EDIT:
Have decided to use White with NUnit as NUnit has a lot of documentation with results integrated with TFS and White is somewhat of a wrapper to Visual Studio's Automation Tools.

Automated Silverlight 5 Unit testing for business logic

Our team is using Silverlight 5 for development as it has features we require going forward. I have discovered that NUnit doesn't work as standard as it isn't Silverlight and that the tools available for Silverlight testing appear to primarily be aimed at running within browsers and are a pain to automate it seems.
However a lot of the code I want to test is the View Models which aren't specifically Silverlight, so I was hoping there is a way of using NUnit or similar to just test this and integrating into a build server (which is currently being decided upon)
So, is it possible to test Silverlight in this way?
I haven't tried it but looks interesting:
http://statlight.codeplex.com/
and what about third parties (maybe Telerik offers something on their testing suite).
I know it's no ideal, but if it's just VM and non dependant on UI you can link the files to a WPF project and execute the unit tests (in our case we had to share two versions the SL and the WPF one that's why we chose to test our VM in the WPF version :-)).
The unit testing from Silverlight (toolkit) I haven't found a way to link it to an automated build process
The best solution I have found is AgUnit:
http://agunit.codeplex.com/
AgUnit is an open source plugin for ReSharper. This solution of course assumes that you're using ReSharper. AgUnit allows you to run Silverlight unit tests in the ReSharper test running. Unfortunately, I just checked the AgUnit site and it looks like they only support Silverlight 5. You may want to head over there and find out about their plans for supporting Silverlight 5 though as it is a great plugin.
Prior to using AgUnit, we were using Statlight and found it to be pretty good as well, just not quite as convenient as AgUnit.

Resources