Viewing: XCTest

Assertions supported in XCTest

Here you can find the list of Assertions supported by XCTest and it is essential to know all these assertion if you are practicing Test Driven Development in IOS. You can get this list from XCTestAssertions.h XCTFail(<#format...#>) - This unconditionally fails the test. XCTAssertNil(<#a1#>, <#format...#>) - Failure message when object is not nil. XCTAssertNotNil(<#a1#>, <#format...#>) […] Read More

Test Driven Development in iOS – Beginners tutorial – Part 2

This is in continuation of the Test Driven Development in iOS - Beginners tutorial and this covers writing XCTest user interfaces in iOS. AddingTwoNumbers app will have following controls 1. Three textfields - For entering the numbers and displaying the result. 2. Two buttons - Add button to perform addition and Reset button to clear […] Read More

Test Driven Development in iOS – Beginners tutorial – Part 1

This is a beginner tutorial on TDD in iOS, explained with an example app that adds two numbers. Let us see try to use some XCTest assertions supported in iOS in this project. Create a New iOS project select the template as Empty Application Enter the required details in Choose options for your new project […] Read More