views:

769

answers:

5

We're doing automated acceptance testing of our windows forms apps. We're using Fitnesse to have our business people write the tests, and then writing C# fixtures to carry out the tests.

We're currently looking at both UI Automated (using project White) and just running the code itself.

I'm curious as to what other people do for this kind of thing - google isn't turning up a lot of useful information on automated UI testing...

+3  A: 

On our last software project we used the commercial TestComplete. This has excellent tools for automating UI tests. You can either 'record' UI events like you would a macro or you can write scripts that simulate UI events. When you record events, it generates a script that you can choose to modify if need be. This can be scheduled to execute just like you would a typically automated unit test.

j0rd4n
A: 

An interesting concept (Source ObjectMentor): The Humble Dialog Box (PDF)

daanish.rumani
+1  A: 

There are tons of commercial and open source tools out there. Some helpful links, but by no means comprehensive.

open source

gui test tools

SQAForums

Tom E
+1  A: 

Maybe I'm the only one doing that, but I just use a few helper functions that

  • find a control in a Form/UserControl by name
  • Simulate Button-Clicks and stuff
  • Assert values of TableLayoutPanels and other complex controls
  • start a timer so I run code in a delegate as soon as a modal form pops up

That way, I can write code like this:

var addButton = (Button)TestHelpers.FindControl(myForm, "buttonAdd");
...
textBox1.Text = "1";
addButton.SimClick();
textBox1.Text = "2";
addButton.SimClick();
Assert.AreEqual(new[] { "1", "2" }, listBox1.Items);
Niki
Niki - do you put all of your code in a delegate, or just for dealing with modal forms? Got any sample code for the modal handling?
Tom E
A: 

With Ranorex you can record your UI testing easily and generate real C# and VB.NET test code. Following article could be interesting for you, see how to use Ranorex together with FitNesse:

http://www.ranorex.com/blog/manage-test-data-and-execute-automtated-test-scenarios-with-fitnesse-and-ranorex

gherget