automation · white · windows

Build Test Framework for WPF Apps

Recently I build a test framework for WPF apps on windows. When I started the project, I wanted to use open source tools and wanted to make easy to add test and flexible to use for future use.

I am happy to share that project and uploaded on github:https://github.com/skapil/pscwhite

Technology Used: C#, White tool , inspect ( For element search) and NUNIT

This project is kind of prototype for building the Test Framework for Windows app. I build this project for one of the windows app. You can take the inspiration from this project to build your own. If you want to use any part of the code, you are free to use.

Architecture:

The project is consist of three layers:(It build on POM concept)

  • Core Libraries: This contain all the core libraries like actions(click, drag, input, screenshot. etc..)
  • Utilities: Which basically have each class for each page
  • Tests: Which have NUNIT test for different scenarios.

white_architecture

How to Setup:

Pre-requisite: VisualStudio, Windows System

  1. Clone the PSCTest repo.
  2. Install TestStack.White from NuGet(PM> Install-Package TestStack.White)
  3. Install NUNIT from NuGet (To run the test)
  4. Download inspect for app properties(https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk)
  5. open the project on Vistualstudio

Hope this will help someone to automate WPF app on windows.

You can learn more about white framework here: https://github.com/TestStack/White

Please post your comments, for your feedback. If you need any help regrading the window framework, please reach out to me directly, I would be happy to help you out.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s