Bluepill is a reliable iOS testing tool that runs UI tests using multiple simulators on a single machine

Overview

BluepillIcon

Bluepill is a tool to run iOS tests in parallel using multiple simulators.

Motivation

LinkedIn created Bluepill to run its large iOS test suite in a reasonable amount of time. If you want the long story, read the blog post.

Features

  • Running tests in parallel by using multiple simulators.
  • Automatically packing tests into groups.
  • Running tests in headless mode to reduce memory consumption.
  • Generating a junit report after each test run.
  • Reporting test running stats, including test running speed and environment robustness.
  • Retrying when the Simulator hangs or crashes.

Usages

It is quick and easy to start using Bluepill!

  • Get bluepill binary: build from source or use our releases. You can also get the binary from Homebrew.
$ brew install bluepill
  • Build your app and test bundle. You must build-for-testing if you use xcodebuild in terminal.
  • Run bluepill using the .xctestrun file generated by Xcode.
$ bluepill --xctestrun-path ./SampleAppTest_iphonesimulator10.3-x86_64.xctestrun -o ./output/

Alternatively, you can use a configuration file like the one below:

{
   "xctestrun-path": "./SampleAppTest_iphonesimulator10.3-x86_64.xctestrun", # Relative path or abs path
   "output-dir": "./build/" # Relative path or abs path
}

And run

$ bluepill -c config.json

Flags

A full list supported options are listed here.

Config Arguments Command Line Arguments Explanation Required Default value
app -a The path to the host application to execute (your .app) N n/a
xctestrun-path The path to the .xctestrun file that xcode leaves when you build-for-testing. Y n/a
test-plan-path The path of a json file which describes the test plan. It is equivalent to the .xctestrun file generated by Xcode, but it can be generated by a different build system, e.g. Bazel Y n/a
output-dir -o Directory where to put output log files. (bluepill only) Y n/a
config -c Read options from the specified configuration file instead of the command line. N n/a
device -d On which device to run the app. N iPhone 8
exclude -x Exclude a testcase in the set of tests to run (takes priority over include). N empty
headless -H Run in headless mode (no GUI). N off
clone-simulator -L Spawn simulator by clone from simulator template. N off
xcode-path -X Path to xcode. N xcode-select -p
include -i Include a testcase in the set of tests to run (unless specified in exclude). N all tests
list-tests -l Only list tests and exit without executing tests. N false
num-sims -n Number of simulators to run in parallel. (bluepill only) N 4
printf-config -P Print a configuration file suitable for passing back using the -c option. N n/a
error-retries -R Number of times to recover from simulator/app crashing/hanging and continue running. N 4
failure-tolerance -f Number of times to retry on test failures N 0
only-retry-failed -F Only retry failed tests instead of all. Also retry test that timed-out/crashed. N false
runtime -r What runtime to use. N iOS 13.3
stuck-timeout -S Timeout in seconds for a test that seems stuck (no output). N 300s
test-timeout -T Timeout in seconds for a test that is producing output. N 300s
test-bundle-path -t The path to the test bundle to execute (single .xctest). N n/a
additional-unit-xctests n/a Additional XCTest bundles that is not Plugin folder N n/a
additional-ui-xctests n/a Additional XCTUITest bundles that is not Plugin folder N n/a
repeat-count -C Number of times we'll run the entire test suite (used for load testing). N 1
no-split -N Test bundles you don't want to be packed into different groups to run in parallel. N n/a
quiet -q Turn off all output except fatal errors. N YES
diagnostics n/a Enable collection of diagnostics in output directory in case of test failures. N NO
help -h Help. N n/a
runner-app-path -u The test runner for UI tests. N n/a
screenshots-directory n/a Directory where simulator screenshots for failed ui tests will be stored. N n/a
videos-directory n/a Directory where videos of test runs will be saved. If not provided, videos are not recorded. N n/a
keep-passing-videos n/a Whether to keep the recorded video for passing tests. Deleted by default. N false
video-paths -V A list of videos that will be saved in the simulators. N n/a
image-paths -I A list of images that will be saved in the simulators. N n/a
unsafe-skip-xcode-version-check Skip Xcode version check N NO
retry-app-crash-tests Retry tests that crashed app and consider it non-fatal if it passes on retry. N false

Exit Status

The exit code of Bluepill uses bit indicators which could represent multiple exit status. Please refer to the header for meaning of each bit.

Demo

BluepillDemo

Requirements

Bluepill officially supports Xcode 13.0. If you're looking for old Xcode support, please checkout the following branches:

If you're looking for newer Xcode version support, try using Bluepill with unsafe-skip-xcode-version-check flag but make sure your app is tested with it and the underlying risks are understood.

Acknowledgement

Bluepill was inspired by parallel iOS test and Facebook’s xctool and FBSimulatorControl. The Bluepill icon was created by Maria Iu.

Fastlane Support

If you're using Fastlane to run your tests, you're in luck! You can integrate Bluepill into your project with very little change to your existing setup. Just integrate one of the following Fastlane plugins, and you'll be on your way:

  • Redpill - The most up-to-date plugin; it's is maintained by Omni and offers a full set of options to hook into Bluepill. As of this writing, Redpill is compiled against Xcode 9.1, and intended for use with CircleCI. It will be updated with newer versions of Xcode when CircleCI supports them.
  • fastlane-plugin-bluepill - Last updated Nov. 7th, offers basic support for working with the Bluepill binary.
  • Bluepillar - Last updated May 29th, it's the original fastlane plugin for working with Bluepill. It was inspired by this blog post.
  • XBluepill - Last updated Jan 27th. It supports all Bluepill options. Thera are some differences from other plugins:
    • Support Xcode 9.2
    • No need to build your project before using the plugin. Builds you project by itself and put xctestrun file automatically;
    • Can reset all simulators if needed (removes all current simulators and recreates default from scratch);

Bitrise.io Support

If you're using Bitrise.io as your CI/CD, you can start using Bluepill immediately. Just add the Bluepill Build/Test for iOS step to your existing workflow. This open source step is maintained by HealthEngineAU and supports Xcode 8.3 and later.

Q & A

  • Are we able to run Xcode UI Testing bundle with Bluepill

    YES, we recently added support for Xcode UI Testing bundles. Thanks to the inspiration from FBSimulatorControl. Bluepill now supports Xcode unit test bundle and UI test bundles.

  • Easiest way to get Bluepill binary?

    Latest release.

  • How to test Bluepill in Xcode?

    Select BPSampleApp scheme and build it first. Then you can switch back to bluepill or bluepill-cli scheme to run their tests.

  • How to get Bluepill binary from source?

    Run ./scripts/bluepill.sh build to test and build Bluepill. The binary will be output in the ./build folder.

  • How to test my changes to Bluepill?

    Run ./scripts/bluepill.sh test.

  • How to BUMP the max files and max procs to support running multiple simulators on macOS?

    Check - https://blog.dekstroza.io/ulimit-shenanigans-on-osx-el-capitan/

Comments
  • Question: Does bluepill support running Xcode UI testing?

    Question: Does bluepill support running Xcode UI testing?

    I managed to run bluepill against one of my apps with a bunch of UI tests based on Xcode UI testing. However I'm getting the following error. A bit googling suggests that this might be due to UI testing having different test template/config than "regular" XCTests. Is Xcode UI testing supported by bluepill? :)

    Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No target application path specified via test configuration: <XCTestConfiguration: 0x60800011a9d0>

    Thanks!

    enhancement pr coming 
    opened by dyang 35
  • bluepill does not compile with Xcode 10

    bluepill does not compile with Xcode 10

    The latest release fails to compile with:

    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_SimDeviceFramebufferService", referenced from:
          objc-class-ref in SimulatorScreenshotService.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    The top of master branch fails with:

    xcodebuild -workspace Bluepill.xcworkspace -scheme bluepill -configuration Release SYMROOT=../
    […]
    In file included from /tmp/bluepill-20180930-3044-34c569/Bluepill-runner/Bluepill-runner/BPApp.m:10:
    /tmp/bluepill-20180930-3044-34c569/Bluepill-runner/Bluepill-runner/BPApp.h:11:9: fatal error: 'BluepillLib/BPXCTestFile.h' file not found
    #import <BluepillLib/BPXCTestFile.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    opened by fxcoudert 22
  • (BLUEPILL) Failed to read data for UIABCTests - ERROR: Failed to load some test bundles

    (BLUEPILL) Failed to read data for UIABCTests - ERROR: Failed to load some test bundles

    Hello, First time using bluepill.

    I installed bluepill through brew install bluepill

    I build my app by running the following command: xcodebuild -workspace MY.xcworkspace -scheme "UIABCTests" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14 Pro Max' build-for-testing | xcbeautify

    I got the xctestrun from Library/Developer/Xcode/DerivedData/name/Build/Products/UIABCTests_iphonesimulator16.0-arm64.xctestrun

    AND the app from Library/Developer/Xcode/DerivedData/name/Build/Products/Debug-iphonesimulator/NameApp.app

    Running this command:

         bluepill --xctestrun-path ./UIABCTests_iphonesimulator16.0-arm64.xctestrun -o ./output/
    

    OR

    { 
       "app": "~/Desktop/NameApp.app",
       "xctestrun-path": "~/Desktop/UIABCTests_iphonesimulator16.0-arm64.xctestrun",
       "output-dir": "./build/" 
    }
    

    Also tried adding "unsafe-skip-xcode-version-check": "yes" to the abovejson` but did not work. and also tried

    bluepill --unsafe-skip-xcode-version-check YES --xctestrun-path UIABCTests_iphonesimulator16.0-arm64.xctestrun -o ./output
    

    no luck either :(.

    gives me this error

    2022-10-28 18:35:16.764 bluepill[37085:345815] Debug Enabled == 0
    {37085} 20221028.183517 [  INFO  ] (BLUEPILL) Using xctestrun configuration
    {37085} 20221028.183517 [  ERROR ] (BLUEPILL) Failed to read data for UIABCTests
    ERROR: Failed to load some test bundles
    

    bluepill version: Bluepill v5.12.1 xcode version: Version 14.0.1 (14A400) OS: 13.0 (22A380)

    opened by parikhparth23 20
  • Bug in retries for in JUnit reports

    Bug in retries for in JUnit reports

    Hello!

    We'd encountered an issue, connected with retry policy.

    Given:

    10 tests, where 5 always fail, 5 always pass.

    --failure-tolerance = 1 --only-retry-failed = true

    After first run we have Tests-results.xml in JUnit format. (5 passed, 5 failed) As failure-tolerance is enabled all failed tests are rerunned and as a result we have new Tests-results.xml only with these latests failed tests (5 failed) and previous file is removed and replaced with new one, built after latest test-run.

    As a result we have in FINAL-REPORT.xml with only tests that were rerunned (only failed tests)

    Is this behaviour expected? thx

    reporting 
    opened by alexs555 20
  • 'NSInternalInconsistencyException', reason: 'Failed to initialize IO ports for device IO client.'

    'NSInternalInconsistencyException', reason: 'Failed to initialize IO ports for device IO client.'

    Hi all

    Bluepill is great tool for running tests in parallel, but I've got pretty weird error while starting iPhone simulators. Meanwhile it runs perfectly well on iPad. Any ideas on what is causing this issue?

    [  INFO  ] Using xctestrun configuration
    [  INFO  ] This is Bluepill v2.1.0-21-gb0944ab
    [  INFO  ] Running with 2 simulators.
    [  INFO  ] Packed tests into 3 bundles
    [  INFO  ] Started Simulator 1 (PID 6902).
    [  INFO  ] (BP-1) Running Tests. Attempt Number 1.
    [  INFO  ] (BP-1) [Attempt 1] Create Simulator
    [  INFO  ] 1 Simulator still running. [1]
    [  INFO  ] Using 189 of 2048 processes.
    [  INFO  ] Started Simulator 2 (PID 6923).
    [  INFO  ] (BP-2) Running Tests. Attempt Number 1.
    [  INFO  ] (BP-2) [Attempt 1] Create Simulator
    [  INFO  ] (BP-1) Starting SimulatorScreenshotService for device:362A073F-EFC4-4B64-8265-B43494A55853
    [  INFO  ] (BP-1) Booting a simulator without launching Simulator app
    [  INFO  ] (BP-2) Starting SimulatorScreenshotService for device:15476C05-CD96-4F05-8102-ABE7271FE26B
    [  INFO  ] (BP-2) Booting a simulator without launching Simulator app
     bp[6923:26705] CoreSimulatorService connection interrupted.  Resubscribing to notifications.
     bp[6902:26784] CoreSimulatorService connection interrupted.  Resubscribing to notifications.
     bp[6902:26697] *** Assertion failure in -[SimDeviceIOClient ioPorts](), /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-494.33/CoreSimulator/SimDeviceIOClient.m:62
     bp[6923:26757] *** Assertion failure in -[SimDeviceIOClient ioPorts](), /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-494.33/CoreSimulator/SimDeviceIOClient.m:62
     bp[6923:26757] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to initialize IO ports for device IO client.'
     *** First throw call stack:
     (
     	0   CoreFoundation                      0x00007fffc267357b __exceptionPreprocess + 171
     	1   libobjc.A.dylib                     0x00007fffd78d21da objc_exception_throw + 48
     	2   CoreFoundation                      0x00007fffc2678132 +[NSException raise:format:arguments:] + 98
     	3   Foundation                          0x00007fffc4147da6 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
     	4   CoreSimulator                       0x000000010bf69dc1 -[SimDeviceIOClient ioPorts] + 412
     	5   SimulatorKit                        0x000000010c1aff67 +[SimDeviceFramebufferService portForDisplayClass:io:] + 98
     	6   SimulatorKit                        0x000000010c1b1581 __54-[SimDeviceFramebufferService registerClient:onQueue:]_block_invoke.194 + 220
     	7   libdispatch.dylib                   0x00007fffd8186524 _dispatch_call_block_and_release + 12
     	8   libdispatch.dylib                   0x00007fffd817d8fc _dispatch_client_callout + 8
     	9   libdispatch.dylib                   0x00007fffd81939a0 _dispatch_queue_serial_drain + 896
     	10  libdispatch.dylib                   0x00007fffd8186306 _dispatch_queue_invoke + 1046
     	11  libdispatch.dylib                   0x00007fffd817f6b5 _dispatch_root_queue_drain + 476
     	12  libdispatch.dylib                   0x00007fffd817f48c _dispatch_worker_thread3 + 99
     	13  libsystem_pthread.dylib             0x00007fffd83cc5a2 _pthread_wqthread + 1299
     	14  libsystem_pthread.dylib             0x00007fffd83cc07d start_wqthread + 13
     )
     libc++abi.dylib: 2018-03-21 17:31:03.666 bp[6902:26697] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to initialize IO ports for device IO client.'
     *** First throw call stack:
     (
     	0   CoreFoundation                      0x00007fffc267357b __exceptionPreprocess + 171
     	1   libobjc.A.dylib                     0x00007fffd78d21da objc_exception_throw + 48
     	2   CoreFoundation                      0x00007fffc2678132 +[NSException raise:format:arguments:] + 98
     	3   Foundation                          0x00007fffc4147da6 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
     	4   CoreSimulator                       0x000000010eb84dc1 -[SimDeviceIOClient ioPorts] + 412
     	5   SimulatorKit                        0x000000010edcaf67 +[SimDeviceFramebufferService portForDisplayClass:io:] + 98
     	6   SimulatorKit                        0x000000010edcc581 __54-[SimDeviceFramebufferService registerClient:onQueue:]_block_invoke.194 + 220
     	7   libdispatch.dylib                   0x00007fffd8186524 _dispatch_call_block_and_release + 12
     	8   libdispatch.dylib                   0x00007fffd817d8fc _dispatch_client_callout + 8
     	9   libdispatch.dylib                   0x00007fffd81939a0 _dispatch_queue_serial_drain + 896
     	10  libdispatch.dylib                   0x00007fffd8186306 _dispatch_queue_invoke + 1046
     	11  libdispatch.dylib                   0x00007fffd817f6b5 _dispatch_root_queue_drain + 476
     	12  libdispatch.dylib                   0x00007fffd817f48c _dispatch_worker_thread3 + 99
     	13  libsystem_pthread.dylib             0x00007fffd83cc5a2 _pthread_wqthread + 1299
     	14  libsystem_pthread.dylib             0x00007fffd83cc07d start_wqthread + 13
     )
     terminating with uncaught exception of type NSException
     libc++abi.dylib: terminating with uncaught exception of type NSException
     [  INFO  ] Simulator 1 (PID 6902) has finished with exit code 6.
     [  INFO  ] Simulator 2 (PID 6923) has finished with exit code 6.
     [  INFO  ] PID 6902 exited 6.
     [  INFO  ] PID 6923 exited 6.
    
    opened by PavloBasiuk 19
  • Debugging - Tests hang - Simulator still running

    Debugging - Tests hang - Simulator still running

    I am randomly facing this scenario -

    15-Mar-2018 08:45:09 | {2741} 20180315.044509 [  INFO  ] 2 Simulators still running. [2, 5] 15-Mar-2018 08:45:09 | {2741} 20180315.044509 [  INFO  ] Using 722 of 2128 processes. 15-Mar-2018 08:45:23 | {4547} 20180315.044523 [ PASSED ] (BP-5) 100.155758s ViewMyActivity/testViewMyActivity 15-Mar-2018 08:45:23 | {4547} 20180315.044523 [  INFO  ] (BP-5) _XCT_didFinishExecutingTestPlan 15-Mar-2018 08:45:23 | {4547} 20180315.044523 [  INFO  ] (BP-5) All Tests Completed. 15-Mar-2018 08:45:23 | {4547} 20180315.044523 [  INFO  ] (BP-5) Socket transport disconneted 15-Mar-2018 08:45:23 | {4547} 20180315.044523 [  INFO  ] (BP-5) DTXConnection disconnected. 15-Mar-2018 08:45:24 | {4547} 20180315.044524 [  INFO  ] (BP-5) BPDEBUGGING finished 15-Mar-2018 08:45:24 | {4547} 20180315.044524 [  INFO  ] (BP-5) Number of Executions: 1 15-Mar-2018 08:45:24 | {4547} 20180315.044524 [  INFO  ] (BP-5) Final Exit Status: BPExitStatusTestsAllPassed 15-Mar-2018 08:45:24 | {4547} 20180315.044524 [  INFO  ] (BP-5) BP exiting 0 15-Mar-2018 08:45:24 | {2741} 20180315.044524 [  INFO  ] Simulator 5 (PID 4547) has finished with exit code 0. 15-Mar-2018 08:45:24 | {2741} 20180315.044524 [  INFO  ] PID 4547 exited 0. 15-Mar-2018 08:45:39 | {2741} 20180315.044539 [  INFO  ] 1 Simulator still running. [2] 15-Mar-2018 08:45:39 | {2741} 20180315.044539 [  INFO  ] Using 721 of 2128 processes. 15-Mar-2018 08:46:09 | {2741} 20180315.044609 [  INFO  ] 1 Simulator still running. [2] 15-Mar-2018 08:46:09 | {2741} 20180315.044609 [  INFO  ] Using 722 of 2128 processes. 15-Mar-2018 08:46:39 | {2741} 20180315.044639 [  INFO  ] 1 Simulator still running. [2] 15-Mar-2018 08:46:39 | {2741} 20180315.044639 [  INFO  ] Using 718 of 2128 processes. 15-Mar-2018 08:47:09 | {2741} 20180315.044709 [  INFO  ] 1 Simulator still running. [2] 15-Mar-2018 08:47:09 | {2741} 20180315.044709 [  INFO  ] Using 718 of 2128 processes. 15-Mar-2018 08:47:39 | {2741} 20180315.044739 [  INFO  ] 1 Simulator still running. [2] 15-Mar-2018 08:47:39 | {2741} 20180315.044739 [  INFO  ] Using 721 of 2128 processes. 15-Mar-2018 08:48:09 | {2741} 20180315.044809 [  INFO  ] 1 Simulator still running. [2] 15-Mar-2018 08:48:09 | {2741} 20180315.044809 [  INFO  ] Using 718 of 2128 processes. 15-Mar-2018 08:48:39 | {2741} 20180315.044840 [  INFO  ] 1 Simulator still running. [2] ...... 15-Mar-2018 10:12:53 | {2741} 20180315.061253 [  INFO  ] 1 Simulator still running. [2] 15-Mar-2018 10:12:53 | {2741} 20180315.061253 [  INFO  ] Using 727 of 2128 processes.

    I want to know what causes a simulator to be in running situation , i have also tried running with -R (error-retries) as 0 but still i am facing this issue. Is this related to some test that hangs and causing the simulator to be in running state ?

    How can i debug and solve this issue from recurring ?

    bug high priority 
    opened by Vikasgupta09 18
  • Terminating app due to uncaught exception

    Terminating app due to uncaught exception

    Running this:

    bluepill -a XXXX.app/ -s XXXX.xcscheme -o output/

    crashes and returns this:

    bluepill[78419:3224648] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
    *** First throw call stack:
    (
    	0   CoreFoundation                      0x00007fff7d8390db __exceptionPreprocess + 171
    	1   libobjc.A.dylib                     0x00007fff924cba2a objc_exception_throw + 48
    	2   CoreFoundation                      0x00007fff7d8a3b4f -[__NSSingleObjectArrayI objectAtIndex:] + 111
    	3   bluepill                            0x000000010bb80448 +[BPXCTestFile BPXCTestFileFromExecutable:withError:] + 872
    	4   bluepill                            0x000000010bb7f746 +[BPApp BPAppWithAppBundlePath:withExtraTestBundles:withError:] + 907
    	5   bluepill                            0x000000010bb78b3c main + 739
    	6   libdyld.dylib                       0x00007fff92dad255 start + 1
    	7   ???                                 0x0000000000000007 0x0 + 7
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    Abort trap: 6
    
    bug 
    opened by anasb 18
  • Results output with unuseful message on test failure

    Results output with unuseful message on test failure

    <failure type="Failure" message="UNKNOWN ERROR - PARSING FAILED: XCTestOutputBarrierTest Case '-[Target.TestSuite TestCase]' started.">
    Unknown File:0
    </failure>
    
    opened by matax87 16
  • Implement reading xctestrun files and multiple cleanups

    Implement reading xctestrun files and multiple cleanups

    • Removed a bunch of unnecessary abstractions and generally moved towards a bundle-centric instead of an app-centric world view.

    • Clean up errors by reworking BP_ERROR to BP_SET_ERROR that handles the error == nil case.

    • Changed the name of a bunch of properties to better match what's in the .xctestrun files.

    • Check that the app we're given is actually built for the iphonesimualtor and not for iphoneos.

    • Since we're getting environment variables and commandline arguments from the .xctestrun file now, they are properly expanded.

    opened by ob 15
  • Several Questions Related to Bluepill

    Several Questions Related to Bluepill

    I have a few questions:

    1. I have the options - "screenshots-directory": "./screen/". However the screen's folder are empty despite some of the tests failing. Is there anything else that i need to do?
    2. What is the latest most updated fastlane plugin for Bluepill that you guys are using?

    Below is my config file:

      {
     "xctestrun-path": "path to xctestrun", 
       "output-dir": "/Users/Testresults",
       "device": "iPhone 11 Pro",
       "num-sims": 2,
       "screenshots-directory": "./screen/",
       "reuse-simulator": true,
       "failure-tolerance": 3,
       "only-retry-failed": true
    }
    
    opened by Husseinovich 13
  • Tests in xctestrun SkipTestIdentifiers not skipped

    Tests in xctestrun SkipTestIdentifiers not skipped

    I got the latest release of bluepill 1.1.1, and ran bluepill with the new xctestrun-path option pointing to a valid xctestrun file generated by a build-for-testing compile of my project. It ran the correct test scheme, but it did not skip any of the tests specified in SkipTestIdentifiers.

    This is with Xcode 8.3.2 and Bluepill 1.1.1 release

    opened by krze 13
  • Xcode 14.0.1 NSInvalidArgumentException error

    Xcode 14.0.1 NSInvalidArgumentException error

    When I am trying to run xctestrun file using bluepill I got NSInvalidArgumentException error. Here is the screenshot. Screenshot 2022-11-21 at 3 29 41 PM Here is xctestrun file xctestrun file.zip please help to find the solution. Thanks in advance.

    opened by asifhasan002 0
  • `bundleIdentifier != nil` runtime crash

    `bundleIdentifier != nil` runtime crash

    bundleIdentifier != nil issue when running rules_ios/Bazel-built ios_ui_test that doesn't occur when using the standard xctestrunner.

    In this simplistic example, I was getting it to happen always. But in our real project, this crash was happening most of the time (maybe 9/10 cases) but sometimes the app + UI test bundle would launch.

    Reproduction

    1. Checkout https://github.com/mattrobmattrob/rules_swift_testbed/tree/mr/bluepill/bundle.identifier.issue. This is a prebuilt "release" on ~master from this repo.
    2. Use the mr/bluepill/bundle.identifier.issue branch
    3. Run bazelisk test //bluepill:UI_Tests_Bluepill.

    Runtime Error

    {41232} 20221109.230820 [  INFO  ] (BP-1) Test plan started!
    {41232} 20221109.230820 [  INFO  ] (BP-1) Test bundle is connected. Capabilities = <XCTCapabilities: 0x600002b573a0>: {
        "ubiquitous test identifiers" = 1;
    }
    {41232} 20221109.230820 [  INFO  ] (BP-1) _XCT_didBeginExecutingTestPlan
    {41232} 20221109.230820 [  INFO  ] (BP-1) All Tests started.
    {41232} 20221109.230820 [  INFO  ] (BP-1) Starting TestSuite All tests
    {41232} 20221109.230820 [  INFO  ] (BP-1) Starting TestSuite SimpleTest.xctest
    {41232} 20221109.230820 [  INFO  ] (BP-1) Starting TestSuite SimpleUITests
    {41232} 20221109.230820 [ FAILED ] (BP-1)   0.002188s SimpleUITests/testPasses()
    {41232} 20221109.230820 [  ERROR ] (BP-1) HOW DID WE GET AN ERROR THAT WASN'T PARSED? We received an error in a test case that wasn't started or did not parse properly.
    Problem line: XCTestOutputBarrier/tests/ios/ui-test/simple.swift:10: error: -[SimpleTest.SimpleUITests testPasses] : Invalid parameter not satisfying: bundleIdentifier != nil (NSInternalInconsistencyException)
    {41232} 20221109.230820 [  INFO  ] (BP-1) _XCT_didFinishExecutingTestPlan
    {41232} 20221109.230820 [  INFO  ] (BP-1) All Tests Completed.
    {41232} 20221109.230820 [  INFO  ] (BP-1) DTXSocketTransport disconnected
    {41232} 20221109.230820 [  INFO  ] (BP-1) DTXConnection disconnected.
    {41232} 20221109.230821 [  INFO  ] (BP-1) Finished
    
    opened by mattrobmattrob 3
  • Timestamp in Junit xml in GMT format issue.

    Timestamp in Junit xml in GMT format issue.

    @ob @caniszczyk We are using bluepill to run tests and at the end we are using a framework to post the results in xml in UI format. During that process we are facing issue with GMT timestamp format. As Junit XML has to follow ISO8601_DATETIME_PATTERN for timestamp So is it possible to change GMT to UTC format?

    opened by avinashnarra 1
  • bluepill still getting the defualt path for xcode using xcode-path

    bluepill still getting the defualt path for xcode using xcode-path

    I have installed xcode 13.1 as 13.2 is not compatible. i am trying to run bluepill for xcode 13.1 with config file. Note: I have also 13.2 installed i havent deleted.

    {
      "xctestrun-path": "./CounterApp_iphonesimulator10.3-x86_64.xctestrun",
      "output-dir": "./build/",
      "xcode-path": "/Applications/Xcode13.1.app"
    
    }
    

    i have also attached an screenshot of my command. Is there any command i am missing? Screenshot 2022-06-07 at 11 09 39 AM

    opened by Ahmed-Mujahid 1
  • Proposal: Allow Bluepill to run non-app hosted tests

    Proposal: Allow Bluepill to run non-app hosted tests

    Proposal

    Apple has provided a few different ways to run tests. Logic tests without an application, logic tests within an application, and a UI Test target. Currently Bluepill doesn't support tests without an app bundle path associated with them, actively erroring out when one isn't found. This proposal is to add the ability to run logic tests without an associated application to Bluepill.

    Benefits

    There are 2 main benefits for allowing non-app hosted tests.

    Faster Signal

    Tests that run without an application start more quickly and run on a much smaller process compared to an app, usually the xctest process. This allows them to run before a simulator is fully booted (aka when the simulator hits the home screen) and doesn't require a full app install. Fully booting and installing these apps can take a large portion of time and aren't needed when performing tests outside the application context. Removing this need to be hosted will allow them to finish much quicker.

    Booting and installing an application uses lot of resources on the accompanying machine (CPU and memory) slowing down other simulators that are running simultaneously. This could also alleviate some of that burden.

    One thing to note, on a small scale this faster signal doesn't have a huge impact but as you grow your codebase to many hours and/or many modules worth of tests this can be a significant boost

    Single Test Execution Path While I understand Bluepill was originally intended to be used for UI tests this creates a bifurcation of how tests are done and information about those tests are gathered. One for app hosted tests and one for non-hosted tests. Adding the ability to run non-hosted tests allows for developers to have a single way to run and gather information about their tests.

    opened by dostrander 3
Releases(v5.12.2)
  • v5.11.0(Jan 13, 2022)

    What's Changed

    • Support --define=apple.experimental.tree_artifact_outputs=1 by @jschear in https://github.com/MobileNativeFoundation/bluepill/pull/506
    • README: Fix tense by @sj26 in https://github.com/MobileNativeFoundation/bluepill/pull/518
    • When parsing an XML result file fails, don't fail while merging subsequent test results by @jschear in https://github.com/MobileNativeFoundation/bluepill/pull/515
    • Create CODE_OF_CONDUCT.md by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/521
    • Create CODEOWNERS by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/520
    • Bump to Xcode 13.1 by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/522
    • Fix the workflows of main branch and releases by @ravimandala in https://github.com/MobileNativeFoundation/bluepill/pull/524

    New Contributors

    • @jschear made their first contribution in https://github.com/MobileNativeFoundation/bluepill/pull/506
    • @sj26 made their first contribution in https://github.com/MobileNativeFoundation/bluepill/pull/518

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.10.0...v5.11.0

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.11.0.zip(302.92 KB)
  • v5.10.0(Sep 29, 2021)

    What's Changed

    • Fix typos by @dusi in https://github.com/MobileNativeFoundation/bluepill/pull/498
    • Delete videos of passed tests, add flag to retain by @RainNapper in https://github.com/MobileNativeFoundation/bluepill/pull/502
    • Updating README for Xcode 12.5 support by @ravimandala in https://github.com/MobileNativeFoundation/bluepill/pull/507
    • Bugfix: Pack tests by test count if test estimates are missing or adding up to be zero by @ravimandala in https://github.com/MobileNativeFoundation/bluepill/pull/513
    • Add Xcode 13 support by @dusi in https://github.com/MobileNativeFoundation/bluepill/pull/500

    New Contributors

    • @dusi made their first contribution in https://github.com/MobileNativeFoundation/bluepill/pull/498

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.9.0...v5.10.0

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.10.0.zip(302.94 KB)
  • v5.9.0(Jun 28, 2021)

    What's Changed

    • Added an Architecture doc by @Buzz-Lightyear in https://github.com/MobileNativeFoundation/bluepill/pull/494
    • Small cleanups pre 12.5 by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/495
    • Keep parenthesis in Swift tests by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/496
    • Support for Xcode 12.5 by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/497

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.8.1...v5.9.0

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.9.0.zip(302.08 KB)
  • v5.5.4(Apr 29, 2021)

  • v5.8.1(Apr 27, 2021)

    What's Changed

    • Move files closer in pbxproj file by @ymwang1984 in https://github.com/MobileNativeFoundation/bluepill/pull/478
    • Introduce BPSwimlane holding LaneID that keeps the same when reused to fix trace-profile issue. by @YangSun33 in https://github.com/MobileNativeFoundation/bluepill/pull/486

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.8.0...v5.8.1

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.8.1.zip(303.83 KB)
  • v5.8.0(Feb 26, 2021)

    What's Changed

    • Replaced BP_MASTER and BP_SLAVE with inclusive terminology by @Buzz-Lightyear in https://github.com/MobileNativeFoundation/bluepill/pull/476
    • Xcode 12.4 support by @ymwang1984 in https://github.com/MobileNativeFoundation/bluepill/pull/477

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.7.0...v5.8.0

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.8.0.zip(301.52 KB)
  • v5.7.0(Feb 26, 2021)

  • v5.6.0(Jan 19, 2021)

    What's Changed

    • Housekeeping. Misc project changes by @chenxiao0228 in https://github.com/MobileNativeFoundation/bluepill/pull/468
    • Xcode 12.2 Support by @chenxiao0228 in https://github.com/MobileNativeFoundation/bluepill/pull/470

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.5.3...v5.6.0

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.6.0.zip(301.52 KB)
  • v5.5.3(Nov 25, 2020)

    What's Changed

    • Update bazel build script and bazel rule by @AhmedEid in https://github.com/MobileNativeFoundation/bluepill/pull/463
    • Add NSXMLDocumentTidyXML as option to NSXMLDocument by @AhmedEid in https://github.com/MobileNativeFoundation/bluepill/pull/464
    • Fix issue loading Bluepill Bazel rule
    • Strip invalid characters off of XML prior to passing it into report collector

    New Contributors

    • @AhmedEid made their first contribution in https://github.com/MobileNativeFoundation/bluepill/pull/463

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.5.2...v5.5.3

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.5.3.zip(301.51 KB)
  • v5.5.2(Nov 25, 2020)

  • v5.5.1(Oct 9, 2020)

    What's Changed

    • Record video using simctl by @RainNapper in https://github.com/MobileNativeFoundation/bluepill/pull/441
    • Only reference libXCTestBundleInject.dylib if it exists by @RainNapper in https://github.com/MobileNativeFoundation/bluepill/pull/460

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.5.0...v5.5.1

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.5.1.zip(301.59 KB)
  • v5.5.0(Sep 29, 2020)

  • v5.4.0(Jul 2, 2020)

  • v5.3.0(Jul 3, 2020)

  • v5.2.4.1(Jun 8, 2020)

  • v5.2.2(Apr 30, 2020)

    What's Changed

    • Make retry checks more resilient to prevent infinite retries by @RainNapper in https://github.com/MobileNativeFoundation/bluepill/pull/432
    • Added a few more tests to mock test failure scenarios and fixed a few final Exit Status issues by @ravimandala in https://github.com/MobileNativeFoundation/bluepill/pull/430
    • Support sidecar applications by @bogo in https://github.com/MobileNativeFoundation/bluepill/pull/438
    • Add a flag to disable Xcode version check failure by @jerrymarino in https://github.com/MobileNativeFoundation/bluepill/pull/436

    New Contributors

    • @bogo made their first contribution in https://github.com/MobileNativeFoundation/bluepill/pull/438

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.2.0...v5.2.2

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.2.2.zip(291.85 KB)
  • v5.1.11(Apr 30, 2020)

    This release has the below exit status fixes and improvements along with Xcode 11.2 support.

    • Make retry checks more resilient to prevent infinite retries (#432)
    • Log when retry count exceeded max retries.
    • Better and mergeable exit status codes (Refer to README)
      • Changed the Exit Status to powers of 2 to make them mergeable.
    • Fixed a few exit status issues
      • Easy consolidation/aggregation of exit code.
      • In case of failure reporting, report all exit status that happened over multiple attempts, if any.
      • Prevent extra simulator attempt when there are no tests left to execute.
    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.1.11.zip(289.26 KB)
  • v5.1.10(Apr 16, 2020)

    What's Changed

    • Rename CI jobs and switch to using SHAs by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/410
    • Update CI badge by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/411
    • [ISSUE-384] Pass simulator preferences file when clone simulator feature is enabled by @ravimandala in https://github.com/MobileNativeFoundation/bluepill/pull/413
    • Supporting tests and app hosts in subfolders (#419) by @chenxiao0228 in https://github.com/MobileNativeFoundation/bluepill/pull/427
    • Make retry checks more resilient to prevent infinite retries (https://github.com/linkedin/bluepill/pull/432)
    • Fixed a few final Bluepill exit status issues and added tests (https://github.com/linkedin/bluepill/pull/430)

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.1.8...v5.1.10

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.1.10.zip(289.26 KB)
  • v5.2.0(Mar 24, 2020)

  • v5.1.9(Mar 23, 2020)

    What's Changed

    • Rename CI jobs and switch to using SHAs by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/410
    • Update CI badge by @ob in https://github.com/MobileNativeFoundation/bluepill/pull/411
    • [ISSUE-384] Pass simulator preferences file when clone simulator feature is enabled by @ravimandala in https://github.com/MobileNativeFoundation/bluepill/pull/413
    • Supporting tests and app hosts in subfolders by @Biinngg in https://github.com/MobileNativeFoundation/bluepill/pull/419

    New Contributors

    • @Biinngg made their first contribution in https://github.com/MobileNativeFoundation/bluepill/pull/419

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.1.8...v5.1.9

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.1.9.zip(287.88 KB)
  • v5.1.8(Dec 18, 2019)

    What's Changed

    • Splitting test bundles based on estimates test execution times by @ravimandala in https://github.com/MobileNativeFoundation/bluepill/pull/407
    • Continue copying test results even when tests fail by @chenxiao0228 in https://github.com/MobileNativeFoundation/bluepill/pull/409

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.1.7...v5.1.8

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.1.8.zip(288.57 KB)
  • v5.1.7(Dec 6, 2019)

    What's Changed

    • Move files out of archive root to the root of the Pod. by @chenxiao0228 in https://github.com/MobileNativeFoundation/bluepill/pull/405
    • Empty commit to trigger check by @chenxiao0228 in https://github.com/MobileNativeFoundation/bluepill/pull/406

    Full Changelog: https://github.com/MobileNativeFoundation/bluepill/compare/v5.1.6...v5.1.7

    Source code(tar.gz)
    Source code(zip)
    Bluepill-v5.1.7.zip(284.56 KB)
  • v5.1.6(Dec 3, 2019)

Owner
Mobile Native Foundation
Mobile Native Foundation
Write unit tests which test the layout of a view in multiple configurations

Overview This library enables you to write unit tests which test the layout of a view in multiple configurations. It tests the view with different dat

LinkedIn 565 Nov 16, 2022
SwiftCheck is a testing library that automatically generates random data for testing of program properties

SwiftCheck QuickCheck for Swift. For those already familiar with the Haskell library, check out the source. For everybody else, see the Tutorial Playg

TypeLift 1.4k Dec 21, 2022
Switchboard - easy and super light weight A/B testing for your mobile iPhone or android app. This mobile A/B testing framework allows you with minimal servers to run large amounts of mobile users.

Switchboard - easy A/B testing for your mobile app What it does Switchboard is a simple way to remote control your mobile application even after you'v

Keepsafe 287 Nov 19, 2022
Testing the UI without UI Testing, a Swift experiment.

UI tests without UI Testing experiment This repo is a small experiment to see if there's an "in-between" for testing iOS applications. More feature-le

Joe Masilotti 20 Sep 26, 2022
Tool for generating Acceptance Tests in Xcode, inspired by Fitnesse

AcceptanceMark is a tool for generating Acceptance Tests in Xcode, inspired by Fitnesse. Read this blog post for a full introduction to AcceptanceMark

Andrea Bizzotto 64 Jun 18, 2022
Snapshot testing tool for iOS and tvOS

SnapshotTest is a simple view testing tool written completely in Swift to aid with development for Apple platforms. It's like unit testing for views.

Pär Strindevall 44 Sep 29, 2022
Fastbot is a model-based testing tool for modeling GUI transitions to discover app stability problems

Fastbot is a model-based testing tool for modeling GUI transitions to discover app stability problems. It combines machine learning and reinforcement learning techniques to assist discovery in a more intelligent way.

Bytedance Inc. 446 Dec 29, 2022
Swifty tool for visual testing iPhone and iPad apps. Every pixel counts.

Cribble Cribble - a tool for visual testing iPhone and iPad apps. Every pixel counts. Getting Started An example app is included demonstrating Cribble

Max Sokolov 273 Nov 4, 2022
Erik is an headless browser based on WebKit. An headless browser allow to run functional tests, to access and manipulate webpages using javascript.

Erik Erik is a headless browser based on WebKit and HTML parser Kanna. An headless browser allow to run functional tests, to access and manipulate web

Eric Marchand 544 Dec 30, 2022
Marvel - Marvel Characters App using MVVM, and including unit tests

Marvel About The purpose of this project is to develop a app using MVVM, and inc

null 1 Mar 20, 2022
Swift Package with examples of how to tests iOS apps

GimmeTheCodeTDD A swift package with examples of unit tests in iOS development. Requirements Xcode 13 Content Dependency Injection Constructor Injecti

Dominik Hauser 8 Oct 11, 2021
Library for unifying the approach to network mocking in iOS unit- & UI-tests.

TinkoffMockStrapping Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installati

Online financial ecosystem 22 Jan 3, 2023
Upload failing iOS snapshot tests cases to S3

Second Curtain If you're using the cool FBSnapshotTestCase to test your iOS view logic, awesome! Even better if you have continuous integration, like

Ash Furrow 129 Sep 6, 2022
A collection of useful test helpers designed to ease the burden of writing tests for iOS applications.

MetovaTestKit is a collection of useful test helpers designed to ease the burden of writing tests for iOS applications. Requirements Installation Usag

null 23 Aug 29, 2021
Snapshot view unit tests for iOS

iOSSnapshotTestCase (previously FBSnapshotTestCase) What it does A "snapshot test case" takes a configured UIView or CALayer and uses the necessary UI

Uber Open Source 1.7k Jan 4, 2023
TestSchedulerDemo - Demonstration code for iOS Unit Tests and Asynchronous

TestSchedulerDemo This repository contains demonstration code for my Medium arti

Carsten Wenderdel 0 Mar 19, 2022
Mockit is a Tasty mocking framework for unit tests in Swift 5.0

Mockit Introduction Mockit is a Tasty mocking framework for unit tests in Swift 5.0. It's at an early stage of development, but its current features a

Syed Sabir Salman-Al-Musawi 118 Oct 17, 2022
Trying to implement Unit Tests for @Binding properties in a ViewModel

BindingTester Trying to implement Unit Tests for @Binding properties in a ViewModel ViewModel to be tested class SheetViewModel: ObservableObject {

Raphael Guye 0 Oct 22, 2021
Catching fatal errors in unit tests

Precondition Catching When running tests which hit fatal errors, often preconditions the built-in support with XCTest. One package which supports cach

Brennan Stehling 0 Nov 28, 2021