SkillAgentSearch skills...

Xctester

Commandline test runner for Swift.

Install / Use

/learn @digoreis/Xctester
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

xctester

Build Status

Commandline test runner for Swift.

Installation

$ brew tap digoreis/formulae
$ brew install xctester

Note: this needs Xcode 8.0

Usage

Having to create those pesky Xcode projects just to run your tests is annoying. With xctester, you don't have to anymore.

Consider this test case:

import XCTest

class MyTests : XCTestCase {
  func testAdd() {
    let result = add(3, 5)
    XCTAssertEqual(result, 8, "")
  }

  func testAddFail() {
    XCTAssertTrue(false, "lol")
  }

  func testThrows() {
    NSException.raise("Exception", format:"#yolo", arguments: getVaList([]))
  }
}

Simply running xctester will execute the tests and give you the results:

MyTests

✅  -[MyTests testAdd]
❌  -[MyTests testAddFail]
	XCTAssertTrue failed - lol
❌  -[MyTests testThrows]
	failed: caught "Exception", "#yolo"

 Executed 2 tests, with 1 failures (1 unexpected) in 0.001 seconds

License

xctester is licensed under the MIT license. See LICENSE for more information.

View on GitHub
GitHub Stars57
CategoryDevelopment
Updated2y ago
Forks2

Languages

Swift

Security Score

80/100

Audited on Dec 18, 2023

No findings