Programming language for testing GUI written in C#



  • 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.


  • 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.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2