title: App Crash during Automated unit testing using XCTest iOS
body: <p>I am getting crash on trying automated unit test using XCTest. Written "testLogin" function. </p>
  
  <pre><code>func testLogin() {
  
      let controller  = ViewController()
      controller.usernameTextField.text = "username"
      controller.passwordTextField.text = "password"
     controller.LoginPressed(self)
  
      XCTAssert(true, "Pass")
  }
  </code></pre>
  
  <p>username and Password Text fields are IBOutlets of the controller. But when I try to test the app using XCTest, app is crashing at usernameTextField saying the value is nil. How can an IBOutlet be nil.. Did I miss any setup here?</p>