So I'm starting to use junit more and more and so more and more test-driven development, and I'm feeling pretty good about it.
However, I run into problems when attempting to test a user interface - my first instinct is for junit to create a robot that object that crontols the mouse and the keyboard to mimic a human working though a test - but that feels both inelegant and not very resilient to change. Am I approaching this all wrong? What's the best practice in this case?
The particular case I'm looking at is SWT-based, but any general overviews would be great :)