Reputation: 10828
I am just jumping into testing of a GUI-heavy app written in C++(MFC) and C# (WinForms, WPF). I have played with coded ui tests briefly, and I am happy with what I see. The trouble is that my program is non-trivial, so this does not work for me for 2 reasons:
VS 2010 Coded UI Test - Launch Referenced Application
What are some good approaches? If you find that this question is too vague, please let me know what it is missing.
Upvotes: 1
Views: 1924
Reputation: 5374
There is code that gets generated for the coded UI tests. You can edit the coded UI test and add your own code to wait for things to occur before letting the next recorded step to take place. If you want to bring a certain application to the forefront, you can use Process.GetProcessesByName to get process information about your running application(s) and get its mainwindow handle to bring it to the front.
Upvotes: 1
Reputation: 4772
I you want to delay your test and wait some tasks (for example log-in or server response) you can check this article. http://msdn.microsoft.com/en-us/library/gg316453.aspx
Upvotes: 1