Re: [Pyobjc-dev] GUI testing
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-05-24 12:20:20
|
On Saturday, May 24, 2003, at 14:01 Europe/Amsterdam, Dinu Gherman wrote: >> I just tried this with simgle widgets and it looks promissing, but >> it could also become very challenging for complex widgets like NS- >> TableView, -OutlineView and basically anything deeply structured. > > Of course, the real challenge would be to trigger the tests from > *outside* the tested application! Honestly, I have no idea if it > is possible to get a handle on a running application from outside, > perhaps via notifications posted by NSApplication? If the application supports loading plugins you could load a dummy plugin that is only used as a communication vehicle between the test framework and the runloop in the application. Writing plugins that load Python code is not too hard, I have done a proof of concept implementation some time ago (check the mailinglist archives) and I intend to add a supported version of that to the bridge. Gui testing is probably a bit too much for testing PyObjC, although I'd love to see such a tool especially if it uses PyObjC. BTW. Does anyone have ideas on how to execute some code when 'your' NSBundle is loaded. I need this to automaticly initialize the Python interpreter when someone loads a Python based bundle. My proof of concept uses the +initialize method of a dummy class. That works, but would mean that the user must install the Developer Tools when she wants to write plugins/preference panes/... in pure python (because you cannot have the same class in two different bundles, which would mean you'd have to generate a .m file based on a template) Ronald |