Giter Club home page Giter Club logo

pxctest's Introduction

pxctest

Execute tests in parallel on multiple iOS Simulators.

Build Status

screencast

Installation

To install via Homebrew you can use the plu/homebrew-pxctest tap:

brew tap plu/pxctest
brew install pxctest

Usage

Compile your tests with build-for-testing, example:

xcodebuild \
  -IDEBuildLocationStyle=Custom \
  -IDECustomBuildLocationType=Absolute \
  -IDECustomBuildProductsPath="$PWD/build/Products" \
  -scheme 'MyApp' \
  -workspace 'MyApp.xcworkspace' \
  -destination 'platform=iOS Simulator,name=iPhone 5,OS=10.1' \
  build-for-testing

In build/Products you should find a .xctestrun file. This can then be passed to pxctest:

pxctest \
  run-tests \
  --destination 'name=iPhone 5,os=iOS 9.3' \
  --destination 'name=iPhone 5,os=iOS 10.1' \
  --testrun build/Products/MyApp_iphonesimulator10.1-i386.xctestrun

The --destination option can be passed in several times and will execute the tests in parallel on all Simulators.

run-tests options

To see a list of possible options, just run:

pxctest run-tests --help

Most of the options should be self-explanatory. If not, please open an issue or submit some pull request. However the --defaults option needs a special section here.

run-tests --defaults

This option expects a path to a file, which contains some JSON. After loading this file, its content gets applied to the Simulator's defaults. On the top level the keys must be either a relative path or a domain where the defaults are located.

Example: You can turn off all keyboard settings that you can find in the Simulator's Settings app by using following JSON content:

{
  "com.apple.Preferences": {
    "KeyboardAllowPaddle": false,
    "KeyboardAssistant": false,
    "KeyboardAutocapitalization": false,
    "KeyboardAutocorrection": false,
    "KeyboardCapsLock": false,
    "KeyboardCheckSpelling": false,
    "KeyboardPeriodShortcut": false,
    "KeyboardPrediction": false,
    "KeyboardShowPredictionBar": false
  }
}

Development

git clone --recursive https://github.com/plu/pxctest.git pxctest
cd pxctest
scripts/bootstrap.sh
NSUnbufferedIO=YES xcodebuild -scheme pxctest test | xcpretty -c

FBSimulatorControl

The functionality of pxctest would not be possible without the great FBSimulatorControl Framework provided by Lawrence Lomax at Facebook.

There are two command line tools that come with FBSimulatorControl:

  • fbsimctl - command line interface to the FBSimulatorControl Framework
  • fbxctest - test runner for running iOS testing bundles for the iOS Simulator Platform

Both of them are more flexible than pxctest, so it might be worth having a look at them.

License

MIT

pxctest's People

Contributors

plu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.