All Projects → google → Arc Xcode Test Engine

google / Arc Xcode Test Engine

Licence: apache-2.0
An Xcode test engine for use with Phabricator's arc command line tool.

Labels

Projects that are alternatives of or similar to Arc Xcode Test Engine

Utplsql
Testing Framework for PL/SQL
Stars: ✭ 402 (+1196.77%)
Mutual labels:  coverage
Undercover
Actionable code coverage - detects untested code blocks in recent changes
Stars: ✭ 574 (+1751.61%)
Mutual labels:  coverage
Cyr2lat
Converts Cyrillic characters in post, page and term slugs to Latin characters. Useful for creating human-readable URLs.
Stars: ✭ 25 (-19.35%)
Mutual labels:  coverage
Simplecov
Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites
Stars: ✭ 4,362 (+13970.97%)
Mutual labels:  coverage
Gcovr
generate code coverage reports with gcc/gcov
Stars: ✭ 482 (+1454.84%)
Mutual labels:  coverage
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+2196.77%)
Mutual labels:  coverage
Jscover
JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage
Stars: ✭ 377 (+1116.13%)
Mutual labels:  coverage
Rasusa
Randomly subsample sequencing reads to a specified coverage
Stars: ✭ 28 (-9.68%)
Mutual labels:  coverage
Kcov
Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
Stars: ✭ 515 (+1561.29%)
Mutual labels:  coverage
Golang Ci Template Github Actions
example for golang project using github actions
Stars: ✭ 24 (-22.58%)
Mutual labels:  coverage
Coveralls Python
Show coverage stats online via coveralls.io
Stars: ✭ 455 (+1367.74%)
Mutual labels:  coverage
Xcov
Nice code coverage reporting without hassle
Stars: ✭ 467 (+1406.45%)
Mutual labels:  coverage
Xcodecoverage
Code coverage for Xcode projects (Objective-C only)
Stars: ✭ 818 (+2538.71%)
Mutual labels:  coverage
Critic.sh
Dead simple testing framework for Bash with coverage reporting
Stars: ✭ 429 (+1283.87%)
Mutual labels:  coverage
Sbt Ignore Play Generated
Configure linters and coverage tools to ignore Play's generated source files.
Stars: ✭ 10 (-67.74%)
Mutual labels:  coverage
Shellspec
A full-featured BDD unit testing framework for bash, ksh, zsh, dash and all POSIX shells
Stars: ✭ 375 (+1109.68%)
Mutual labels:  coverage
Express Babel
Express starter kit with ES2017+ support, testing, linting, and code coverage
Stars: ✭ 621 (+1903.23%)
Mutual labels:  coverage
Angular2 Webpack Boilerplate
A boilerplate for Angular 2 and Webpack
Stars: ✭ 30 (-3.23%)
Mutual labels:  coverage
Coverme
Code coverage for Haxe
Stars: ✭ 11 (-64.52%)
Mutual labels:  coverage
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+2787.1%)
Mutual labels:  coverage

xcode-test-engine for arc

xcode-test-engine is a test engine for use with Phabricator's arc command line tool.

Features

xcode-test-engine presently works well with projects that have a single root workspace and a single unit test target.

Supports arc unit:

~ $ arc unit
   PASS   42ms★  MyTests::Test1
   PASS    3ms★  MyTests::Test2
   PASS    2ms★  MyTests::Test3
   PASS    2ms★  MyTests::Test4
   PASS    1ms★  MyTests::Test5

And arc unit --coverage:

~ $ arc unit --coverage
COVERAGE REPORT
      5%     src/Widget.m
     18%     src/SomeDirectory/AnotherWidget.m
     69%     src/SomeDirectory/WidgetBuilder.m
     80%     src/Controller/WidgetViewController.m
     93%     src/Controller/WidgetTableViewController.m

Installation

Project-specific

Add this repository as a git submodule.

git submodule init
git submodule add <url for this repo>

Your .arcconfig should list xcode-test-engine in the load configuration:

{
  "load": [
    "path/to/arc-xcode-test-engine"
  ]
}

Global

Clone this repository to the same directory where arcanist and libphutil are globally located. Your directory structure will look like so:

arcanist/
libphutil/
arc-xcode-test-engine/

Your .arcconfig should list arc-xcode-test-engine in the load configuration (without a path):

{
  "load": [
    "arc-xcode-test-engine"
  ]
}

Usage

Create a .arcunit file in the root of your project and add the following content:

{
  "engines": {
    "xcode": {
      "type": "xcode-test-engine",
      "include": "(\\.(m|h|mm|swift)$)",
      "exclude": "(/Pods/)"
    }
  }
}

Feel free to change the include/exclude regexes to suit your project's needs.

Now modify your .arcconfig file by adding the following configuration:

{
  "unit.xcode": {
    "build": {
      "workspace": "path/to/Workspace.xcworkspace",
      "scheme": "UnitTestsScheme",
      "configuration": "Debug",
      "destination": "platform=iOS Simulator,name=iPhone 6S"
    },
    "coverage": {
      "product": "SomeFramework.framework/SomeFramework"
    }
  }
}

Configuration options

Build configuration options

Any value provided to "build" will be passed along to xcodebuild as a flag.

"unit.xcode": {
  "build": { ... }
}

Picking the coverage product

Provide the path to the product for which coverage should be calculated. If building a library/framework this might be the framework binary product.

"unit.xcode": {
  "coverage": {
    "product": " ... "
  }
}

Pre-build commands

Some projects require a pre-build script that runs before the xcodebuild command.

"unit.xcode": {
  "pre-build": "execute this command before the build step"
}

For example, CocoaPods projects may need to be re-generated.

  "pre-build": "pod install --project-directory=path/ --no-repo-update"

Supporting multiple test engines

We support Arcanist's multi test engine extension. Visit the [extension]((https://github.com/tagview/arcanist-extensions#multi_test_engine) page to learn more about it.

Your .arcconfig file will have something similar to the following configuration:

{
  "unit.engine": "MultiTestEngine",
  "unit.engine.multi-test.engines": [
    {
      "engine": "XcodeUnitTestEngine",
      "unit.engine.xcode.config": {
        "build": {
          "workspace": "YourWorkSpace.xcworkspace",
          "scheme": "Scheme1",
          "configuration": "Debug",
          "destination": "platform=iOS Simulator,name=iPhone SE"
        },
        "coverage": {
          "product": "SomeFramework.framework/SomeFramework"
        }
      }
    },
    {
      "engine": "XcodeUnitTestEngine",
      "unit.engine.xcode.config": {
        "build": {
          "workspace": "YourWorkSpace.xcworkspace",
          "scheme": "AnotherScheme",
          "configuration": "Debug"
        }
      }
    }
  ]
}

Viewing coverage results in Phabricator

Coverage will appear for affected source files in Side-by-Side mode as a colored bar.

License

Licensed under the Apache 2.0 license. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].