41e61d75ad
Summary: When xctest is bootstrapped from command line testmanagerd "hangs up" XPC connection, probobaly because of protocol differences. Reviewed By: lawrencelomax Differential Revision: D3144335 fb-gh-sync-id: 7a740fab46d045f516e49ba11b47e83442895db6 fbshipit-source-id: 7a740fab46d045f516e49ba11b47e83442895db6 |
||
---|---|---|
.. | ||
Bundles | ||
Categories | ||
DeviceHandling | ||
Strategies | ||
TestManager | ||
Utility | ||
README.md | ||
XCTestBootstrap-Info.plist | ||
XCTestBootstrap.h | ||
XCTestBootstrap.xcconfig |
README.md
XCTestBootstrap
A Mac OS X library for launching XCTest & XCUITest and managing connection with testmanager daemon.
Features
- Prepares XCTest bundle.
- Launches application and injects XCTest bundle.
- Opens and manages connection with testmanager daemon during the test.
- It works with iOS simulator & device tests.
- It works with Mac OSX tests.
Usage
In order to use XCTestBootstrap you need to provide class that implements <FBDeviceOperator>
supplying basic device instructions like install application, launch application etc.
A good example is FBSimulatorControlOperator
and FBSimulatorInteraction+XCTest
\
FBSimulatorTestPreparationStrategy *testPrepareStrategy =
[FBSimulatorTestPreparationStrategy strategyWithTestRunnerBundleID:configuration.bundleID
testBundlePath:testBundlePath
workingDirectory:workingDirectory
];
FBSimulatorControlOperator *operator = [FBSimulatorControlOperator operatorWithSimulator:self.simulator];
FBXCTestRunStrategy *testRunStrategy = [FBXCTestRunStrategy strategyWithDeviceOperator:operator testPrepareStrategy:testPrepareStrategy logger:simulator.logger];
NSError *innerError = nil;
FBTestManager *testManager = [testRunStrategy startTestManagerWithAttributes:configuration.arguments environment:configuration.environment error:&innerError];
FBTestManager
needs to be kept alive in order to keep test running.
Contributing
See the CONTRIBUTING file for how to help out. There's plenty to work on the issues!
License
XCTestBootstrap
is BSD-licensed. We also provide an additional patent grant.