Friday 23 May 2014

iOS Unit Testing

Challenges
  • Error 'Parse/Parse.h' file not found (Unit Testing in iOS)
    • Background: I added the following Unit Testing lines of code in appropriate sections of my RibbitTests.m file in Xcode 5 to import the view controller header file that I wanted to test.
#import "ImageViewController.h"
@property (nonatomicImageViewController *imageViewController;
#pragma mark - App Test Cases
- (void) testImageViewController{   XCTAssertNotNil(self.imageViewController@"imageViewController model was not nil");}
    • Problem: Received error message 'Parse/Parse.h' file not found 
    • Solution: 
      • Deleted Parse.framework in Xcode 5 (use Apple Finder to check that there is no Parse.framework folder still in your project directory) 
      • Re-downloaded the Parse.com iOS SDK
      • Dragged the downloaded Parse.framework folder into the Frameworks directory within Xcode 5, and ensure that you tick the following boxes (noting that the initial error message you received may have been caused because when you initially installed Parse.com's SDK, you may not have also added a tick next to RibbitTests)
      • Dragged the downloaded Parse.framework folder into the Frameworks directory within Xcode 5, and ensure that you tick the following boxes (noting that the initial error message you received may have been caused because when you initially installed Parse.com's SDK, you may not have also added a tick next to RibbitTests)
Activities @ TeamTreeHouse - 

Unit Testing for iOS (using Xcode 5 IDE) with Amit Bijlani

DONE (using Ribbit iPhone App)
  • Unit Testing { 
    • Runtime errors (insufficient type testing)
    • Logic errors (insufficient scenarios)
    • Regressions (team scenario bugs)
    • XCTest.framework { write tests that a subclasses of XCTestCase }
    • XCT Assertion types
    • Running Unit Tests
      • CMD + U { Product > Tests }
      • Re-Testing { Product > Perform Action > Test Again }
      • Method Testing { Press 'Play' Button in gutter to the left of the method }
    • Navigating Unit Tests
      • Test Navigator (in the Project Navigator)
        • Running Specific Tests { Press 'Play' Button shown on right of: }
          • Test Suite
          • Test Cases
          • Test Methods
    • Creating Tests { Press + Button in bottom left corner of Test Navigator }
      • Test Classes
      • Test Targets
    • Matching Test Case Methods with corresponding Code Methods { Assistant Editor > Click Breadcrumb Navigation bar (at top right), then scroll down and Click either:
      • Test Classes
      • Test Callers { identifies other methods that call the method, including Unit Testing methods }
    • Continuous Integration 
    • Shortcuts 
      • CMD + U  { Runs Unit Test }
      • CMD + Click { Press this combination when hovering a method to toggle between the methods location in the header and implementation files } 

1 comment:

  1. The specifications of the new version are not yet marked and the data OD specific features to be added are not made available. the official announcement about the new version is still in the hold. Until the final announcement, one can only make assumptions about the specifications and features to be added in the new is iOS concept

    ReplyDelete