vendredi 25 septembre 2015

Why does Travis fail despite all unit tests succeeding?

Trying to set up continuous integration for what is basically an empty and fresh swift project in Xcode 7 (code below). In the travis log I can see that all (two) unit tests succeeded. Travis outputs the error in the screenshot below. Any ideas?

Noteworthy:

  1. Scheme has been set to 'Shared'.
  2. All two Unit Tests succeed.

Screenshot of Travis-CI log output enter image description here

Contents of .travis.yml

language: objective-c
osx_image: xcode7
xcode_project: Toys.xcodeproj
xcode_scheme: Toys
xcode_sdk: iphonesimulator9.0

Contents of Toy.swift (the only modified file in the main target)

import Foundation

class Toy {

    func isToy() -> Bool {
        return true
    }

    func isExpensive() -> Bool {
        return true
    }
}

Contents of ToysTests.swift

import XCTest

@testable import Toys

class ToysTests: XCTestCase {

    override func setUp() {
        super.setUp()
    }

    override func tearDown() {
        super.tearDown()
    }

    func testIsToy() {

        if let myToy: Toy? = Toy() {

            XCTAssertTrue(myToy!.isToy())

        }
    }

    func testIsExpensive() {

        if let myToy: Toy? = Toy() {
            XCTAssertTrue(myToy!.isExpensive())
        }
    }
}

Aucun commentaire:

Enregistrer un commentaire