I've been able to see print statements in the debugging window for my app. When I create a 'mock up' program (small trial app) to learn about Swift testing, none of the print statements in my LifecycleTests.swift file under the FirstTests folder display in the debugging window.
import XCTest
class LifecycleTests: XCTestCase {
override class func setUp() {
// Put setup code here. This method is called before the invocation of each test method in the class.
print("In class setUp.")
// NSLog("In class setUp.")
}
override class func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
print("In class tearDown.")
// NSLog("In class tearDown")
}
override func setup() {
print("In setup.")
// NSLog("In setup")
}
override func tearDown() {
print("In tearDown.")
// NSLog("In tearDown.")
}
func testExample() {
print("Starting test.")
// NSLog("Starting test.")
addTearDownBlock {
print("In first tearDown block.")
// NSLog("In first tearDown block.")
}
// print("In middle of test.")
NSLog("In middle of test.")
addTearDownBlock {
print("In second tearDown block.")
// NSLog("In second teardown block.")
}
print("Finishing test.")
// NSLog("Finishing test.")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}


