About Me

My photo
Have an overall 13 + yrs of experience Currently working as an Senior Architect.Expertise in design,implementation of Automation frameworks for Opensource automation tools like Selenium,Jmeter, Webdriver,Appium, Robotium Expertise in integrating Test & ALM Management tools like Rally,Qmetry,JIRA-Zephyr with Automation frameworks Expertise in design and developmenet Mobile Automation frameworks for tools like Appium, Robotium Remote Control,Cucumber BDD,Manual Testing

Friday, July 15, 2011

White: Windows Desktop Applications Automation

I have been experimenting on various Windows automation tools and have been looking for good tools which can support Windows desktop applications Automation. Certainly, we have some very good automation tools readily available in the market like QTP. I started out looking for some open source tools and came across some popular open source tools like Auto IT and Auto hot key. Being experienced with various open-source Automation tools, first thing that I would have in my mind from windows desktop application automation context are:
·         Tool Maintainability
·         Tool Integration
·         Programming Language Integration
·         Version Control of test scripts
·         Test Script Continuous Integration
·         Object Oriented framework support
·         Test Framework Integration (like Junit and Nunit)
·         Support for Win forms, Dotnet based WPF...

Tools like Auto IT and Auto Hot Key can be used at a very high level of Automation and does not support the powerful Object Oriented Scripting and Test Frameworks. One such open source tool which supports all the above points is WHITE.

White is a framework for automating rich client applications based on Win32, WinForms, WPF, Silverlight and SWT (Java) platforms. It is a .NET based automation tool and does not require the use of any proprietary scripting languages. Tests/automation programs using White can be written with whatever .NET language, IDE and tools you are already using. White provides a consistent object-oriented API, hiding the complexity of Microsoft's UI Automation library (on which White is based) and windows messages.
I prepared out a matrix which has list of basic window objects where I targeted to automate these objects as an initial analysis on White. 

                                                                 Windows Object Matrix
Next thing that I had in my mind is a sample application hosting all the above windows objects. Quickly, I got C# express edition installed which is a lite and free version of Visual Studio releases. So I started developing a sample dotnet application in C# and targeted it with White API and was able to automate most of the User actions (like click, multi select.) on these objects and White seems to be promising for all kinds of user actions that can be performed on the windows applications.


Also I tried White on one of our windows project developed in dotnet having WPF forms and White seems to be supporting most of the objects with in that application. On Further analysis on White, it also supports browser automation. 


In continuation to this blog I would like share my experiences on the following which I would be posting in my next blog
·         Setting up dev environment for White API (Plz Refer to blog Setting up WHITE with Visual C# Express edition and Nunit assembly with Sample )
·   Handling different components like Textbox, Data Grid, List View, Tree, and File Dialogues, browser automation, Radio buttons, Check boxes and Buttons etc..;
·         Integrating Nunit framework
·         Generating HTML Test Result Reports

















Sunday, March 6, 2011

Setting up WHITE with Visual C# Express edition and Nunit assembly with Sample Example - Calculator Launch

1.Download the Visual C# Express edition
2.Download the White from http://white.codeplex.com/
3.Install the Visual C# Express edition and open it
4.Extract the contents of the White (zip file)
5.Create a Project as shown in below snapshot
6.Provide Project Name and click on OK button
7.From the Solution Explorer(Typically you find it towards your left of the screen) right click and Add the ITEM as shown in below snapshots
8. Select the ITEM as class and click on Add Button
9. Now that the class file should be created as shown in below snapshot
10.Now is the time to add some stuff. Before that we need to configure the White API assembly to the project
11.Right Click on the references folder , select add reference and browser for the dll file White.Core.dll in the White bin directory(remember this is the api we had downloaded initially)

12.Ensure the below hightlighted assemblies are added as references to the project.
13. Now add the below code to your Main Method and run the program using the debug button as highlighted in the below snapshot


14.Next you should see the calculator application being opened automatically and performing some addition



Saturday, March 5, 2011

What are the prerequisites for White Usage?

1. Dotnet Framework 3.5 and above
2. Visual Studio or at least an MS C# express version  is required (which ever is your favorite Dotnet programming lang)
3.NUnit Assembly(Unit Test framework)

What is WHITE ?

WHITE is an Open source Windows Automation framework  from ThoughtWorks for automating rich client applications based on Win32, WinForms, WPF, Silverlight and SWT (Java) platforms. It is .NET based and does not require the use of any proprietary scripting languages. Tests/automation programs using White can be written with whatever .NET language, IDE and tools you are already using. White provides a consistent object-oriented API, hiding the complexity of Microsoft's UIAutomation library (on which White is based) and windows messages