2

Our GUI for our Windows application is written in C#. I want to write some automated regression tests. Which programming languages would work?

Have in mind:

  • I do not have access to source code.
  • I do not want a record/playback application.
| improve this question | | | | |
  • Forms app, WPF app, windows 8 apps, windows 8.1 apps... err I think you can even write for OpenGL in C#. ASP if you allow mixed contenders. Are you actually testing the UI or trying to dig down into the model? It may help to be more specific. – Nathan Cooper Oct 8 '14 at 19:42
  • Both Model and UI, i want to test WPF app – Ter Oct 21 '14 at 6:19
2

Tests that explore the GUI of an application need to simulate the keyboard and mouse to send commands. They also need to read the screen to validate that the correct things are displayed. To me the mechanisms for keyboard and mouse entry and for screen reading are more important than the programming language. However as your application is in C# writing the tests in C# makes sense as knowledge, training and people can be transferred between development and test teams.

There are several test frameworks that provide what you want. Many include record and playback facilities but they allow you write the test code yourself rather so you can ignore the record capabilities. However, the record facilities can be used to your advantage. Whilst your real tests may be manually written, a sandbox project can be used for recording things then the generated code examined to learn techniques and to copy code. This technique works well with Coded UI in Microsoft's Visual Studio.

| improve this answer | | | | |
  • I tried visual studio with coded UI it pretty good but with some restrictions, do you have any other tool to add? – Ter Oct 21 '14 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.