I'm writing my first OS X Objective-C framework, but I do not know how to test it. How can I execute methods and classes in framework for testing purposes?
One possibility would be to create a new executable target that depends on and calls the framework you're using.
Make a unit test bundle target, and create test case classes in that bundle. You'll link against the OCUnit framework to get the base classes for your tests; there are a few OCUnit tutorials around, which you can find on Google.
For harder-to-test tasks, such as drawing in views, the easiest way is to make a test app and check the results yourself.
You can find several articles about unit testing on the blog of Chris Hanson.
Chris Hanson's excellent set of articles on setting up unit testing for Frameworks in Xcode is a wonderful reference for testing frameworks. Their content has been largely incorporated (and supplanted) by the article, Automated Unit Testing with Xcode 3 and Objective-C, on Apples' Dev site.