UISpec is a Behavior Driven Development framework for the iPhone that provides a full automated testing solution that drives the actual iPhone UI. It is modeled after the very popular RSpec for Ruby. To make finding specific views in the iPhone UI easy, UISpec includes a very powerful view traversal DSL called UIQuery. Not only can you easily traverse the view heirarchy, you can also interact with the views you find.
Currently UISpec is available only through the repository. Soon we will have a distribution zip that you can download. For now just:
Inside you will find
Adding UISpec To Your Project
To add the UISpec project and headers to your iphone XCode project:
To add the headers:
To add the bundle:
Example:
#import "DescribeEmployeeAdmin.h" #import "SpecHelper.h" @implementation DescribeEmployeeAdmin -(void)before { //login as default admin before each example ; } -(void)after { //logout after each example ; } -(void)itShouldHaveDefaultUsers { //Check that all default users are in list should].exist; should].exist; should].exist; } -(void)itShouldAddAUser { //Click the + button ; //Set the form fields. //Also ".with" is optional so we here we can show the different syntax setText:@"Brian"]; setText:@"Knorr"]; setText:@"b@g.com"]; setText:@"bkuser"]; setText:@"test"]; setText:@"test"]; //Click the Save button touch]; //Make sure the error alert view doesn't appear .alertView.should.not.exist; //User list should now have a new entry should].exist; } @end
View MANUFACTURERS Wallboard
Theme by Danetsoft and Danang Probo Sayekti