-
Notifications
You must be signed in to change notification settings - Fork 22
Adding A Test App Target to Unit Tests #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@seanoshea it's redundant to have RZUtilsTests, RZUtilsTestApp, and RZUtilsTestAppTests. Any way to consolidate this? |
|
@ZevEisenberg I'd agree that all the different targets are getting a bit confusing. I guess that everything could be consolidated into the The only downside to consolidating into the Anyone else see a better way of tackling this before I amend #139? cc @KingOfBrian |
|
Could also have a UI test target and a non-UI test target, and name them accordingly. |
|
That would work too I think. Assuming I understand, that would mean:
|
|
Or, it looks like you've named it Genuinely don't have strong feelings on this from a naming perspective. Just wanted to add some unit tests to an awesome utils library. |
|
If you prefer the name Otherwise, anyone have any better ideas for naming here? |
|
@seanoshea I don't mind what it's called. I'm also probably going to redo that image tinting code at some point, or stick it in a different library, so don't worry about maintaining compatibility with that PR. |
|
@ZevEisenberg - OK, I'll go ahead with the rename I mentioned on May 12th and update the PR. |
|
@ZevEisenberg - renamed the test app. Here's the output: [Info] Loading settings for scheme 'RZUtilsAllTests' ... (936 ms)
=== BUILD ===
xcodebuild build RZUtilsAllTests
RZUtilsTests / RZUtilsAllTests (Debug)
~ Check dependencies (30 ms)
~ Run custom shell script 'Run Script' (16538 ms)
--------------------------------------------------------------------------------
[Info] Loading settings for scheme 'RZUtilsTests' ... (1118 ms)
=== TEST ===
xcodebuild build build
Pods / Pods-RZUtils (Debug)
~ Check dependencies (265 ms)
~ Compile CAAnimation+RZBlocks.m (2772 ms)
~ Compile NSAttributedString+RZExtensions.m (2349 ms)
~ Compile NSDate+RZExtensions.m (2790 ms)
~ Compile NSDictionary+RZExtensions.m (2755 ms)
~ Compile NSObject+RZBlockKVO.m (2713 ms)
~ Compile NSString+RZStringFormatting.m (2750 ms)
~ Compile NSString+RZStringSize.m (2739 ms)
~ Compile NSUndoManager+RZBlockUndo.m (2752 ms)
~ Compile Target Support Pods-RZUtils-dummy.m (206 ms)
~ Compile RZAnimatedCountingLabel.m (314 ms)
~ Compile RZAnimatedImageView.m (222 ms)
~ Compile RZButtonView.m (193 ms)
~ Compile RZCollectionTableView.m (314 ms)
~ Compile RZCollectionTableViewCell.m (289 ms)
~ Compile RZCollectionViewAnimationAssistant.m (198 ms)
~ Compile RZCommonUtils.m (100 ms)
~ Compile RZDelayedOperation.m (254 ms)
~ Compile RZDispatch.m (100 ms)
~ Compile RZLocationService.m (393 ms)
~ Compile RZProgressView.m (268 ms)
~ Compile RZRevealViewController.m (408 ms)
~ Compile RZSegmentViewController.m (277 ms)
~ Compile RZSingleChildContainerViewController.m (276 ms)
~ Compile RZSplitViewController.m (287 ms)
~ Compile RZTelprompt.m (215 ms)
~ Compile RZViewControllerTransitioningContext.m (194 ms)
~ Compile RZViewFactory.m (198 ms)
~ Compile Test RZWaiter.m (150 ms)
~ Compile RZWebViewController.m (296 ms)
~ Compile UIAlertView+RZCompletionBlocks.m (188 ms)
~ Compile UIColor+RZExtensions.m (135 ms)
~ Compile UIFont+RZExtensions.m (104 ms)
~ Compile UIImage+RZAverageColor.m (114 ms)
~ Compile UIImage+RZResize.m (103 ms)
~ Compile UIImage+RZSnapshotHelpers.m (1019 ms)
~ Compile UIImage+RZSolidColor.m (248 ms)
~ Compile UIImage+RZStretchHelpers.m (154 ms)
~ Compile UIImageView+RZAXMaintainImageColors.m (273 ms)
~ Compile UIView+RZAutoLayoutHelpers.m (260 ms)
~ Compile UIView+RZBorders.m (227 ms)
~ Compile UIView+RZFrameUtils.m (184 ms)
~ Compile UIViewController+RZKeyboardWatcher.m (149 ms)
~ Create static library libPods-RZUtils.a (141 ms)
0 errored, 0 warning (4861 ms)
Pods / Pods (Debug)
~ Check dependencies (0 ms)
~ Compile Target Support Pods-dummy.m (73 ms)
~ Create static library libPods.a (8 ms)
0 errored, 0 warning (89 ms)
RZUtilsTests / RZUtilsTests (Debug)
~ Check dependencies (1 ms)
~ Write auxiliary files (0 ms)
--------------------------------------------------------------------------------
/bin/mkdir -p /Users/Sean/Library/Developer/Xcode/DerivedData/RZUtilsTests-dbhiipqvlbiauofglqlciwprhzre/Build/Intermediates/PrecompiledHeaders/RZUtilsTests-Prefix-bodrzkenuipmetcwueyyxsbmoenq
write-file /Users/Sean/Library/Developer/Xcode/DerivedData/RZUtilsTests-dbhiipqvlbiauofglqlciwprhzre/Build/Intermediates/PrecompiledHeaders/RZUtilsTests-Prefix-bodrzkenuipmetcwueyyxsbmoenq/RZUtilsTests-Prefix.pch.pch.hash-criteria
--------------------------------------------------------------------------------
~ Run custom shell script 'Check Pods Manifest.lock' (53 ms)
~ Precompile Supporting RZUtilsTests-Prefix.pch (1452 ms)
~ Compile RZAutoLayoutTests.m (191 ms)
~ Compile RZBlockKVOTests.m (223 ms)
~ Link RZUtilsTests (404 ms)
~ Generate RZUtilsTests.xctest.dSYM (170 ms)
~ Run custom shell script 'Copy Pods Resources' (83 ms)
--------------------------------------------------------------------------------
building file list ... done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
--------------------------------------------------------------------------------
~ Touch RZUtilsTests.xctest (6 ms)
0 errored, 0 warning (2469 ms)
[Info] Collecting info for testables... (3864 ms)
run-test RZUtilsTests.xctest (iphonesimulator8.4, logic-test)
~ -[RZAutoLayoutTests testMultipleLevels] (83 ms)
~ -[RZAutoLayoutTests testParentChildAndUnrelated] (0 ms)
~ -[RZAutoLayoutTests testParentChildOrder1] (0 ms)
~ -[RZAutoLayoutTests testReturnsSingleView] (0 ms)
~ -[RZAutoLayoutTests testTwoUnrelatedViews] (0 ms)
~ -[RZBlockKVOTests testObservation] (0 ms)
~ -[RZBlockKVOTests testObserverDeallocation] (0 ms)
~ -[RZBlockKVOTests testObserverRemoval] (0 ms)
8 passed, 0 failed, 0 errored, 8 total (87 ms)
** TEST SUCCEEDED: 8 passed, 0 failed, 0 errored, 8 total ** (14387 ms)
--------------------------------------------------------------------------------
~ Run custom shell script 'Run Script' (60116 ms)
--------------------------------------------------------------------------------
[Info] Loading settings for scheme 'RZUtilsTestApp' ... (1197 ms)
=== TEST ===
xcodebuild build build
Pods / Pods-RZUtils (Debug)
~ Check dependencies (161 ms)
~ Compile CAAnimation+RZBlocks.m (2721 ms)
~ Compile NSAttributedString+RZExtensions.m (2716 ms)
~ Compile NSDate+RZExtensions.m (1650 ms)
~ Compile NSDictionary+RZExtensions.m (2720 ms)
~ Compile NSString+RZStringFormatting.m (2769 ms)
~ Compile NSObject+RZBlockKVO.m (2785 ms)
~ Compile NSString+RZStringSize.m (2712 ms)
~ Compile NSUndoManager+RZBlockUndo.m (2726 ms)
~ Compile Target Support Pods-RZUtils-dummy.m (54 ms)
~ Compile RZAnimatedCountingLabel.m (119 ms)
~ Compile RZAnimatedImageView.m (102 ms)
~ Compile RZButtonView.m (96 ms)
~ Compile RZCollectionTableView.m (184 ms)
~ Compile RZCollectionTableViewCell.m (148 ms)
~ Compile RZCollectionViewAnimationAssistant.m (96 ms)
~ Compile RZCommonUtils.m (61 ms)
~ Compile RZDelayedOperation.m (81 ms)
~ Compile RZDispatch.m (79 ms)
~ Compile RZLocationService.m (361 ms)
~ Compile RZProgressView.m (250 ms)
~ Compile RZRevealViewController.m (464 ms)
~ Compile RZSegmentViewController.m (245 ms)
~ Compile RZSingleChildContainerViewController.m (281 ms)
~ Compile RZSplitViewController.m (269 ms)
~ Compile RZTelprompt.m (140 ms)
~ Compile RZViewControllerTransitioningContext.m (171 ms)
~ Compile RZViewFactory.m (297 ms)
~ Compile Test RZWaiter.m (173 ms)
~ Compile RZWebViewController.m (281 ms)
~ Compile UIAlertView+RZCompletionBlocks.m (248 ms)
~ Compile UIColor+RZExtensions.m (262 ms)
~ Compile UIFont+RZExtensions.m (206 ms)
~ Compile UIImage+RZAverageColor.m (196 ms)
~ Compile UIImage+RZResize.m (126 ms)
~ Compile UIImage+RZSnapshotHelpers.m (735 ms)
~ Compile UIImage+RZSolidColor.m (124 ms)
~ Compile UIImage+RZStretchHelpers.m (161 ms)
~ Compile UIImageView+RZAXMaintainImageColors.m (212 ms)
~ Compile UIView+RZAutoLayoutHelpers.m (264 ms)
~ Compile UIView+RZBorders.m (232 ms)
~ Compile UIView+RZFrameUtils.m (168 ms)
~ Compile UIViewController+RZKeyboardWatcher.m (218 ms)
~ Create static library libPods-RZUtils.a (32 ms)
0 errored, 0 warning (4170 ms)
Pods / Pods (Debug)
~ Check dependencies (0 ms)
~ Compile Target Support Pods-dummy.m (76 ms)
~ Create static library libPods.a (7 ms)
0 errored, 0 warning (91 ms)
RZUtilsTests / RZUtilsTests (Debug)
~ Check dependencies (1 ms)
~ Write auxiliary files (0 ms)
--------------------------------------------------------------------------------
/bin/mkdir -p /Users/Sean/Library/Developer/Xcode/DerivedData/RZUtilsTests-dbhiipqvlbiauofglqlciwprhzre/Build/Intermediates/PrecompiledHeaders/RZUtilsTests-Prefix-aannaygijdsnrnfvdlowimkaofdf
write-file /Users/Sean/Library/Developer/Xcode/DerivedData/RZUtilsTests-dbhiipqvlbiauofglqlciwprhzre/Build/Intermediates/PrecompiledHeaders/RZUtilsTests-Prefix-aannaygijdsnrnfvdlowimkaofdf/RZUtilsTests-Prefix.pch.pch.hash-criteria
--------------------------------------------------------------------------------
~ Run custom shell script 'Check Pods Manifest.lock' (35 ms)
~ Precompile Supporting RZUtilsTests-Prefix.pch (1453 ms)
~ Compile RZAutoLayoutTests.m (185 ms)
~ Compile RZBlockKVOTests.m (222 ms)
~ Link RZUtilsTests (678 ms)
~ Generate RZUtilsTests.xctest.dSYM (182 ms)
~ Run custom shell script 'Copy Pods Resources' (62 ms)
--------------------------------------------------------------------------------
building file list ... done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
--------------------------------------------------------------------------------
~ Touch RZUtilsTests.xctest (6 ms)
0 errored, 0 warning (2715 ms)
RZUtilsTests / RZHostApp (Debug)
~ Check dependencies (0 ms)
~ Compile RZHostAppDelegate.m (1510 ms)
~ Compile main.m (1338 ms)
~ Link RZHostApp (71 ms)
~ Generate RZHostApp.app.dSYM (106 ms)
~ Touch RZHostApp.app (6 ms)
0 errored, 0 warning (1714 ms)
RZUtilsTests / RZHostAppTests (Debug)
~ Check dependencies (33 ms)
~ Compile RZAutoLayoutHelpersTest.m (1767 ms)
~ Link RZHostAppTests (68 ms)
~ Generate RZHostAppTests.xctest.dSYM (152 ms)
~ Touch RZHostAppTests.xctest (6 ms)
0 errored, 0 warning (2048 ms)
[Info] Collecting info for testables... (3682 ms)
run-test RZHostAppTests.xctest (iphonesimulator8.4, application-test)
[Info] Installed 'RZ.RZHostApp'. (36231 ms)
[Info] Launching test host and running tests ... (0 ms)
~ -[RZUtilsTestAppTests testCenteringViews] (8 ms)
~ -[RZUtilsTestAppTests testCenteringWithOffsetViews] (1 ms)
~ -[RZUtilsTestAppTests testPinningViews] (1 ms)
3 passed, 0 failed, 0 errored, 3 total (12 ms)
** TEST SUCCEEDED: 3 passed, 0 failed, 0 errored, 3 total ** (57814 ms)
--------------------------------------------------------------------------------
0 errored, 0 warning (76699 ms)
** BUILD SUCCEEDED ** (77555 ms) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend using XCTAssertNotNil here, since it gives better logs when it fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be taken care of in 8139519.
See #128 for details.