Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing framework for C# WPF application [closed]

I have already created C# WPF application and I would like to create test application for same. I have searched for that on Internet, I have found below test framework :

  • Nunit

  • Robot framework

  • Unit testing

I am confused to select the best test framework for C# WPF application. Can you please suggest me

like image 392
Hkachhia Avatar asked Jan 03 '23 04:01

Hkachhia


2 Answers

  1. Use an accepted pattern such as MVVM to ensure that there’s no business logic in the UI.

  2. Use NUnit or similar to test the business logic.

  3. Don’t bother with automatically testing the view. It should be simple enough so if it looks right, it is right.

like image 52
Iain Holder Avatar answered Jan 08 '23 16:01

Iain Holder


I assume your question is about unit test frameworks.

NUnit is well tested and proven to work. I don't know about the other two but there's also Microsoft's one and xUnit. You really should check xUnit out: https://xunit.github.io/docs/why-did-we-build-xunit-1.0.html

It's actually just a matter of preference. Go after the one you feel comfortable with. Test the others and decide. I can recommend you xUnit as I work with it myself. There's no the best.

like image 43
Konrad Avatar answered Jan 08 '23 15:01

Konrad