UI automation tool for a windows based WPF application with Record and Playback feauture - wpf

I am in the process of recommending an UI automation tool for a windows based WPF application in a company
Which targets wide range of customers . The Application lives on a layer of WCF services for getting
The data. The company is already having a small VBScript framework written specifically for Test Complete
and is really not robust, Hence I am lookout for a right tool, where we could reuse the scripts or
Improve the already existing tool. Any ideas are welcome.
I have looked at Microsoft UI Automation, Project White, UIA Verify and Ranorex. Each one of them
Is having a feature lack.
I was able to go through the process of Microsoft UI Automation. I am still in the process of understanding how it works
with WPF, since it is totally dependent on Automation IDS.
Our application is huge and is not written with this in mind. All the code either does not implement
Automation ID property or Name property which is very much essential for object identification in the visual tree
in tools like UISpy and VisualUIAVerify.
What I am looking in specific are the following. Please give ratings to each of these
1) Recording : Recording , play back and automatic execution of test scripts and generate a report.
2) Dependencies : Minimal Dependencies(.NET frameworks, API modules , SDK Versions etc..)
3) )Code Generation : Code Generation of test scripts from Templates, Macros and Recording.
4)Object Name Mapping: Avoid explicit usage of Automation IDS and screen corrdinates, if they use, does it support any tools which would take XAML Files and insert Automation IDS into it and also avoid Problems With duplicate Automation IDS.
5) Events: Any Events and call backs that the user(tester) may receive if the GUI has undergone any changes
and how the scripts would change in this Case.
6) Support : Support for different scripting languages and easy Code conversions(C#, VBScript, Python.. etc)
7) Fast and Reliable: Easy and fast accessibility of GUI elements for manipulation( Like support to xml dom, Json.. etc), navigation, code duplication replacement tasks for changes in UI and easy configuration(xml, ini files)
8)Code Converters: the tester writes code in vbscript and developer could simply convert it into c# for embedding them into any stand alone framework if need be).
9)Custom controls: Support for custom controls and object mapping. If you have a custom object that behaves like one of standard controls. are you able to map (tell the test tool that the custom control behaves like the standard) control? Does it support all the standard controls methods? Can you add the custom control to it’s own class of control?
10)Reports: Should be able to execute multiple tests at once and generate a report similar to VisualUIAVerify.

Visual Studio 2010 Coded UI Tests
You can use Visual Studio 2010 Ultimate or Visual Studio 2010 Premium to create automated tests of the user interface known as coded UI tests. These tests provide functional testing of the user interface and validation of user interface controls.
I am using Coded UI Tests to automate tests of a WPF application built on the MVVM pattern. The record/playback features of the tool are impressive, generating really nice models. For large suites, the advice is to tear apart the generated code, structuring and extending it for your own purposes.
I recommend Visual UIA Verify to assist viewing the automation structure of your application while developing and debugging.

Have you tried AutomatedQA testcomplete
http://www.automatedqa.com/products/testcomplete/

Related

Coded-UI Auto Generate UIMap

I have been looking into using MS Coded-UI as part of a new testing initative. We have exisitng UI automation using the HP stack QC/QTP but have found this to be very heavy weight and error prone, and as a result are looking to coded-ui in a bit to move our automation stack closer to the dev stack.
I am testing a wpf application running on windows 7 desktop, primarily on .net 4.5.
I have 2 questions.
Is it possible to auto generate the UIMap? Could i use a top level UITestControl object, find this and iterate over to generate a map of all subsequent children?
As part of continuous integration, is it possible to look coded-ui tests into a TFS build cycle? I am using visual studio 2012 ultimate but only 2010 instance of TFS. I assume these really all need to be in sync in order to pull this off correctly?
Regarding your first question, you can create Coded UI tests manually by recording your actions through Visual Studio or by using an existing action recording from Microsoft Test Manager.
Since a Coded UI tests is just plain code (C# or VB) you an easily edit it and add extra control logic.
Regarding your second question, it's absolutely possible to run your Coded UI tests as a part of your continuous integration build.
You have a couple of options:
Run your Coded UI tests on your Build Server. If you configure your Build Agent for Interactive use, you can let it run Coded UI tests. This is not my favorite option.
Use Lab Management with virtual environments (requires Hyper-V and System Center Virtual Machine Manager) or with Standard Environments. By using Lab Management you can automatically deploy to test machines and execute Coded UI tests on them.
Use Release Management in combination with Microsoft Test Management. This allows you to setup continuous deployment and run Coded UI tests on your target servers.
Lab Management with Standard Environments is the easiest to get started with, especially since you have an Ultimate license which includes Microsoft Test Manager.
Release Management is new and added to TFS 2013 for deploying to machines from test to production. It's a very nice solution but it currently doesn't integrate with Lab Management.
First question: there is not functionality to discover all children of some top-level parent control. But you can start Coded UI Builder, star recording and click or interact in another way with all controls you are interested in(it takes like a minute even for a window with a lot of children controls). That click Generate, name method like Dummy or whatever. All controls will be added to UI Map, and you can change search properties, names etc.
Second question:
It is possible to set up continuous integration flow including Coded UI tests - build, deploy, test.
Create new Build definition, use LabDefaultTemplate.xaml template for it.

Compile each XAML page as DLL

I understand my "this" query may sound very generic but any pointers to guide is highly appreciated.
We are building an WPF application based on MVVM design pattern (with DevXpress controls) and want to achieve the following.
There will be one .EXE file which will run the applications.
All my XAML files need to be as DLL [Why? - Reasons specified below].
Call the DLL dynamically and load with in the WPF application.
[Why?? - Reasons]
Our application is a client/server intranet application. We are planning to use ClickOnce deployment to deploy the application. In case there are any changes to the application, my though is we don't have to change the entire application and recompile it and then deploy so the client machines will be updated.
Instead we can change only those screen or XAML file which are needed and update on the server and ClickOnce will automatically handles the updates on the clients. This also, helps us in maintaining our application and less troublesome for the developers and UI designers.
I am welcome to another better approach also.

How to make an setup just like Devexpress installation (v11.1.8)?

I want to pack my file in to a single executable file "setup.exe", my application is written in c# and WPF, I know that there are a lot of applications out in the store for creating a installation pack, but the point is which one would help me to build my installation pack just like Devexpress dose ?
For an UI similar to DevExpress you will need a setup authoring tool which offers an external UI and rich graphics.
Advanced Installer and InstallShield have some great UI themes which can get you started. You can also find a list of setup tools here:
http://en.wikipedia.org/wiki/List_of_installation_software
You'll probably have to roll a custom solution for this one. I expect nothing less of the Devexpress team then creating their own installer.
If you're application is not heavily bound into the registry and all kind of windows folders it should not be that hard to create an application that extracts some files into a directory and create some great UI while copying.

SQL Reporting Services 2005 vs WPF Fixed Document Control

In my project i have used WPF and am following MVVM pattern. So i have a report module in my project and the reports are just plain reports. So i would like to know should i use SQL Reporting Service 2005 to create reports and then use report viewer as client or should i go for WPf Fixed Document Control- Document viewer.
Can anyone please tell me which of these will be easier to integrate with my project.
Please reply
Thanks
Sharath
WPF Document (Fixed or Flow)
Pros:
Easier to integrate. All is included in regular WPF
Native
More control on the output
Cons:
Must program a lot for a multi-page report
Must program a lot for headers, footes, groups, etc.
SQL Reporting Services
Pros:
Mature tools
Interoperable with other solutions (IE asp.net)
Groups, totals, page headers, graphics built in
Cons:
Not native, must use a embedded windows form control
Must deploy the reporting service runtime separately (not good for click-once apps)
Hard to integrate to your business objects

Can i host WPF Controls in ASP.net 2.0 or sharepoint?

This may seem like a high-level question. But that is because I'm unfamiliar with cutting edge ASP.net and even less with this behemoth called Sharepoint. So please bear with me..
First off is it possible to take functional custom WPF controls which contain certain unmanaged subcomponents that do DirectX rendering (for performance reasons) and drop it into ASP.Net? as an example consider a specialized chart control
Does Sharepoint add anything that makes this possible ?
The use-case is to take certain panes or areas from a thick WPF client and slot it into an existing Sharepoint based solution.
Is this possible or are they (WPF Controls and Web Controls) as different as chalk and cheese? (Assume that the current control interface can be freely changed.) Would it wise to develop web-aware stripped down version of these controls than to attempt to hammer the current controls in somehow...
On a fundamental level, can a web-page contain a control which takes over the rendering for its client-area/rectange ? Or does everything have to broken down into plain html by the time it hits the browser.
I found a few unanswered queries online. But other than that its unexplored (or forbidden).. in either case I'd like to know. Thanks for reading..
The short answer is: Yes it's possible but you probably don't want to do it.
Asp.Net, with the exception of java script, is primarily a server side technology. Meaning that the majority of the processing code runs on the server vs. the client. IIRC share point is built on top of Asp.Net and thus has the same format.
WPF is a client side technology. The code runs on the actual physical client computer.
Combining these two technologies into one application does not work due to their conflicting natures. However, there are several options for you.
Silverlight: It's easiest to think of this as flash for .Net. It allows for rich WPF applications to be run via a web browser on client machines. It's a subset of the full .Net framework but rich enough to build great applications.Silverlight is limited in that it must be a 100% managed solution. You're post mentions using a DirectX control which I presume is native code. If this is the case Silverlight will not work for you
ActiveX controls: These allow for essentially any form of client code to be hosted in a web browser and run on the client machine. This includes .Net, WPF, C++, etc ... If you have a native component this is really your only option.Unfortunately though, ActiveX controls are following out of favor. Primarily due to their insecure nature. Once you run an ActiveX control on your machine you're at the mercy of the control author and it's easy to do malicious acts.More data on ActiveX controls: http://en.wikipedia.org/wiki/ActiveX

Resources