I'm building a test harness for my Delphi 2009 app. Testing the logic is fairly simple. Making sure the forms work properly is proving a bit more complicated. I'd like a way to simulate real user input, to open a form, make it think there's a user typing certain things and clicking in certain places, and make sure it reacts correctly. I'm sure there's a way to do this, I just don't know what it is. Does anyone know how to do it?
相关问题
- Is there a Delphi 5 component that can handle .png
- Is there a way to install Delphi 2010 on Windows 2
- Is TWebBrowser dependant on IE version?
- Stop child process when parent process stops
- Fire resize event once not based on timing
相关文章
- 放在input的text下文本一直出现一个/(即使还没输入任何值)是什么情况
- What does it means in C# : using -= operator by ev
- Web Test recorder does not allow me to record a te
- How are custom broadcast events implemented in Jav
- Factory_girl has_one relation with validates_prese
- Show a different value from an input that what wil
- What is the difference between `assert_frame_equal
- Is there a way to hide the new HTML5 spinbox contr
TestComplete is a good choice. Another commercial option for GUI testing is SmarteScript:
If there is nothing Deliphi-specic out there and you need a quick solution try some easy to learn scripting solutions like AutoIt. For a bit more sophisticated scripting, you might have a look on Scripted GUI Testing with Ruby.
But be aware, that you should not test too much functionality via the GUI, because such tests are very likely to break. If you end up with too much GUI testing you may need to rethink the design: Decouple logic from the GUI and test the logic directly with some xUnit framework.
Also have a look on a similar question about windows forms test automation.
It seems like DUnit has some gui-testing functionality: delphiextreme.com
well for .net there's NUnitForms for GUI testing a win application. don't know any open source for delphi though.
Test Complete can test delphi forms but it's not free.
Not exactly an answer to your question, but there is a very good page (IMHO of course) about GUI Architectures by Martin Fowler, featuring the "Humble View" architecture as the last entry, which is geared specifically towards test-driven software development. Worth looking into.
This will of course not help you with the task of testing whether all controls are wired correctly and handle all necessary events, but it should help to minimize the amount of GUI code that does need testing.
DUnit has GUITesting.pas whicih extends testing so you can send clicks, keys and text to controls on form, but that is about it.
Last year there where mentions of Zombie GUI testing framework that was used internaly by CodeGear developers, but nothing since Steve left for Falafel.