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.
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.
How to Setup:
Pre-requisite: VisualStudio, Windows System
- Clone the PSCTest repo.
- Install TestStack.White from NuGet(PM> Install-Package TestStack.White)
- Install NUNIT from NuGet (To run the test)
- Download inspect for app properties(https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk)
- 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.