We use Atlassian Bamboo and have noticed that each of our builds has a different number of executed tests. During the last 6 builds, we have gotten results for 241, 265, 262, 271, 269, and 267 tests. There should have been the same number of tests for each. The last two builds (269 and 267) had identical source code - I just kicked off a new build without adding any new commits. None of these include all of the tests - there should be 306. I have only been able to consistently reproduce this problem on our build machine, though when developing, I run tests via Xcode rather than fastlane. I have seen the issue in Xcode on my development machine as well, but not nearly as often, which is why I think it is a Nimble issue rather than fastlane.
Ran unit tests using fastlane.
All tests execute during every build.
Only some tests execute during every build.
List the software versions you're using:
carthage version in Terminal)Because this problem is intermittent and involves our build stack, I did not make a project to demonstrate it.
Test script:
bundle exec fastlane test --env development
Fastfile:
fastlane_version "1.100.0"
default_platform :ios
platform :ios do
desc "Runs unit tests"
lane :test do
scan(scheme: "UnitTests", custom_report_file_name: "junit_unittests.xml", skip_build: true) #uses defaults from GymFile
end
end
Gymfile:
scheme "MyScheme"
output_directory "./"
silent true
clean true
output_name "MyApp.ipa"
use_legacy_build_api false
Scanfile:
scheme "UnitTests"
output_directory "build/reports"
custom_report_file_name "report"
clean true
skip_slack true
configuration "Release"
code_coverage true
device "iPad 2"
Bamboo build log:
simple 19-Dec-2016 17:07:15 Starting task 'test app' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
command 19-Dec-2016 17:07:15 Beginning to execute external process for build 'My Build - Default Job #6 (MYBUILD-JOB1-6)'\n ... running command line: \n/bin/sh /Users/me/bamboo-agent-home/temp/MYBUILD-JOB1-6-ScriptBuildTask-239867205140649615.sh\n ... in: /Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1\n ... using extra environment variables: \nbamboo_planRepository_1_branch=mybranch\nbamboo_ServerList=\nbamboo_repository_revision_number=6b107cb05c518ec8af1a850b292508356ac4bebb\nbamboo_resultsUrl=https://bamboo.mycompany.com/browse/MYBUILD-JOB1-6\nbamboo_repository_66683133_previous_revision_number=54e7e131baf9ea7fc0bc0a20f55d5854b0bae5d2\nbamboo_capability_system_builder_xcode_iOS_9_3=iphoneos9.3\nbamboo_repository_66683133_git_branch=mybranch\nbamboo_capability_system_builder_xcode_OS_X_10_11=macosx10.11\nbamboo_capability_system_jdk_JDK_1_8_0_77=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre\nbamboo_planRepository_1_name=myapp-ios\nbamboo_build_working_directory=/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1\nbamboo_buildKey=MYBUILD-JOB1\nbamboo_ReleaseName=None\nbamboo_DeployConfiguration=\nbamboo_shortPlanName=MyBranch\nbamboo_repository_66683133_branch_name=mybranch\nbamboo_planRepository_name=myapp-ios\nbamboo_buildNumber=6\nbamboo_DeployAppPoolName=\nbamboo_shortJobName=Default Job\nbamboo_buildResultsUrl=https://bamboo.mycompany.com/browse/MYBUILD-JOB1-6\nbamboo_repository_66683133_name=myapp-ios\nbamboo_planRepository_repositoryUrl=ssh://[email protected]:7999/at/myapp-ios.git\nbamboo_agentId=56131585\nbamboo_planName=MyTeam - myapp-ios - MyBranch\nbamboo_shortPlanKey=MYBUILD109\nbamboo_build_commandline_com_atlassian_bamboo_plugins_scripttask_task_builder_script_8=/bin/sh /Users/me/bamboo-agent-home/temp/MYBUILD-JOB1-6-ScriptBuildTask-3863247250435492791.sh\nbamboo_shortJobKey=JOB1\nbamboo_planRepository_revision=6b107cb05c518ec8af1a850b292508356ac4bebb\nbamboo_repository_previous_revision_number=54e7e131baf9ea7fc0bc0a20f55d5854b0bae5d2\nbamboo_buildTimeStamp=2016-12-19T16:31:03.959-05:00\nbamboo_BUILD_CHANGE_LOG_PATH=CHANGELOG.md\nbamboo_planRepository_previousRevision=54e7e131baf9ea7fc0bc0a20f55d5854b0bae5d2\nbamboo_build_commandline_com_atlassian_bamboo_plugins_scripttask_task_builder_script_3=/bin/sh /Users/me/bamboo-agent-home/temp/MYBUILD-JOB1-6-ScriptBuildTask-2351542363174470548.sh\nbamboo_buildResultKey=MYBUILD-JOB1-6\nbamboo_repository_git_branch=mybranch\nbamboo_repository_branch_name=mybranch\nbamboo_buildPlanName=MyTeam - myapp-ios - MyBranch - Default Job\nbamboo_planRepository_1_revision=6b107cb05c518ec8af1a850b292508356ac4bebb\nbamboo_repository_name=myapp-ios\nbamboo_BuildConfiguration=Debug\nbamboo_DeployServer=\nbamboo_RunAutomation=no\nbamboo_capability_system_builder_xcode_Simulator___iOS_10_0=iphonesimulator10.0\nbamboo_planRepository_branch=mybranch\nbamboo_capability_system_builder_xcode_iOS_10_0=iphoneos10.0\nbamboo_agentWorkingDirectory=/Users/me/bamboo-agent-home/xml-data/build-dir\nbamboo_capability_system_git_executable=/usr/bin/git\nbamboo_planRepository_1_previousRevision=54e7e131baf9ea7fc0bc0a20f55d5854b0bae5d2\nbamboo_repository_git_username=\nbamboo_repository_66683133_git_username=\nbamboo_planRepository_1_type=stash-rep\nbamboo_planRepository_branchName=mybranch\nbamboo_TestConfiguration=Debug\nbamboo_capability_system_jdk_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre\nbamboo_capability_system_builder_xcode_Simulator___iOS_9_3=iphonesimulator9.3\nbamboo_IISAppName=None\nbamboo_planRepository_type=stash-rep\nbamboo_planRepository_1_username=\nbamboo_repository_66683133_git_repositoryUrl=ssh://[email protected]:7999/at/myapp-ios.git\nbamboo_repository_git_repositoryUrl=ssh://[email protected]:7999/at/myapp-ios.git\nbamboo_capability_system_builder_node_Node_js=/usr/local/Cellar/node/6.3.1/bin/node\nbamboo_working_directory=/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1\nbamboo_planKey=MYBUILD\nbamboo_planRepository_1_repositoryUrl=ssh://[email protected]:7999/at/myapp-ios.git\nbamboo_planRepository_username=\nbamboo_repository_66683133_revision_number=6b107cb05c518ec8af1a850b292508356ac4bebb\nbamboo_DeployAppName=\nbamboo_JUnit_TestsPath=build/reports/*.xml\nbamboo_capability_system_jdk_JDK_1_8=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home/jre\nbamboo_planRepository_1_branchName=mybranch\n
build 19-Dec-2016 17:07:16 +---------------------------+---------+-------------------+
build 19-Dec-2016 17:07:16 | [32mUsed plugins[0m |
build 19-Dec-2016 17:07:16 +---------------------------+---------+-------------------+
build 19-Dec-2016 17:07:16 | Plugin | Version | Action |
build 19-Dec-2016 17:07:16 +---------------------------+---------+-------------------+
build 19-Dec-2016 17:07:16 | fastlane-plugin-changelog | 0.6.0 | emojify_changelog |
build 19-Dec-2016 17:07:16 | | | read_changelog |
build 19-Dec-2016 17:07:16 | | | stamp_changelog |
build 19-Dec-2016 17:07:16 | | | update_changelog |
build 19-Dec-2016 17:07:16 +---------------------------+---------+-------------------+
build 19-Dec-2016 17:07:16
build 19-Dec-2016 17:07:16 [17:07:16]: [32m-------------------------------------------------[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32m--- Step: Verifying required fastlane version ---[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32m-------------------------------------------------[0m
build 19-Dec-2016 17:07:16 [17:07:16]: Your fastlane version 2.1.1 matches the minimum requirement of 1.100.0 ?
build 19-Dec-2016 17:07:16 [17:07:16]: [32m------------------------------[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32m--- Step: default_platform ---[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32m------------------------------[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32mLoading from './fastlane/.env.development'[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32mDriving the lane 'ios test' ?[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32m------------------[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32m--- Step: scan ---[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32m------------------[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [32mSuccessfully loaded '/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1/fastlane/Scanfile' ?[0m
build 19-Dec-2016 17:07:16
build 19-Dec-2016 17:07:16 +----------------------+---------------------+
build 19-Dec-2016 17:07:16 | Detected Values from './fastlane/Scanfile' |
build 19-Dec-2016 17:07:16 +----------------------+---------------------+
build 19-Dec-2016 17:07:16 | output_directory | build/reports |
build 19-Dec-2016 17:07:16 | clean | true |
build 19-Dec-2016 17:07:16 | skip_slack | true |
build 19-Dec-2016 17:07:16 | configuration | Release |
build 19-Dec-2016 17:07:16 | code_coverage | true |
build 19-Dec-2016 17:07:16 | device | iPad 2 |
build 19-Dec-2016 17:07:16 +----------------------+---------------------+
build 19-Dec-2016 17:07:16
build 19-Dec-2016 17:07:16 [17:07:16]: [4m[36m$ xcodebuild -list -project ./myapp.xcodeproj -configuration Release[0m[0m
build 19-Dec-2016 17:07:16 [17:07:16]: [4m[36m$ xcodebuild clean -showBuildSettings -scheme UnitTests -project ./myapp.xcodeproj -configuration Release[0m[0m
build 19-Dec-2016 17:07:17 [17:07:17]: [32mSuccessfully loaded '/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1/fastlane/Scanfile' ?[0m
build 19-Dec-2016 17:07:17 [17:07:17]: [33mNo values defined in './fastlane/Scanfile'[0m
build 19-Dec-2016 17:07:17 [17:07:17]: [4m[36m$ xcodebuild -list -project ./myapp.xcodeproj -configuration Release[0m[0m
build 19-Dec-2016 17:07:18 [17:07:18]: [4m[36m$ xcodebuild clean -showBuildSettings -scheme UnitTests -project ./myapp.xcodeproj -configuration Release[0m[0m
build 19-Dec-2016 17:07:19
build 19-Dec-2016 17:07:19 +-------------------------+------------------------------------------------------------------------+
build 19-Dec-2016 17:07:19 | [32mSummary for scan 2.1.1[0m |
build 19-Dec-2016 17:07:19 +-------------------------+------------------------------------------------------------------------+
build 19-Dec-2016 17:07:19 | scheme | UnitTests |
build 19-Dec-2016 17:07:19 | custom_report_file_name | junit_unittests.xml |
build 19-Dec-2016 17:07:19 | skip_build | true |
build 19-Dec-2016 17:07:19 | output_directory | build/reports |
build 19-Dec-2016 17:07:19 | clean | true |
build 19-Dec-2016 17:07:19 | skip_slack | true |
build 19-Dec-2016 17:07:19 | configuration | Release |
build 19-Dec-2016 17:07:19 | code_coverage | true |
build 19-Dec-2016 17:07:19 | device | iPad 2 |
build 19-Dec-2016 17:07:19 | project | ./myapp.xcodeproj |
build 19-Dec-2016 17:07:19 | derived_data_path | /Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1/De... |
build 19-Dec-2016 17:07:19 | address_sanitizer | false |
build 19-Dec-2016 17:07:19 | output_types | html,junit |
build 19-Dec-2016 17:07:19 | buildlog_path | ~/Library/Logs/scan |
build 19-Dec-2016 17:07:19 | open_report | false |
build 19-Dec-2016 17:07:19 | slack_only_on_failure | false |
build 19-Dec-2016 17:07:19 | use_clang_report_name | false |
build 19-Dec-2016 17:07:19 | fail_build | true |
build 19-Dec-2016 17:07:19 | xcode_path | /Applications/Xcode.app |
build 19-Dec-2016 17:07:19 +-------------------------+------------------------------------------------------------------------+
build 19-Dec-2016 17:07:19
build 19-Dec-2016 17:07:19 [17:07:19]: [4m[36m$ set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme UnitTests -project ./myapp.xcodeproj -configuration Release -destination 'platform=iOS Simulator,id=4BFE000A-04CD-4B69-82BB-E4B61DDDB2FC' -derivedDataPath '/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1/DerivedData/myapp' -enableCodeCoverage YES clean test | tee '/Users/me/Library/Logs/scan/MyApp-UnitTests.log' | xcpretty [0m[0m
build 19-Dec-2016 17:07:19 [17:07:19]: ? [35mLoading...[0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCleaning[0m myapp/MyAppModel [Release][0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCleaning[0m myapp/MyAppViewModel [Release][0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCleaning[0m myapp/MyAppView [Release][0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCleaning[0m myapp/MyApp [Release][0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m/var/folders/ys/szvd1t697xn8vf1g4g8dwpyw0000gr/T/SchemeScriptAction-pxYJrZ: line 2: : command not found[0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mClean[0m Succeeded[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m2016-12-19 17:07:20.270 xcodebuild[14132:9247730] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1/DerivedData/myapp/Logs/Test/5801C679-4BE1-4E39-9D0E-902383857DC4/Session-MyAppViewModelTests-2016-12-19_170720-CjjTwn.log[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m2016-12-19 17:07:20.271 xcodebuild[14132:9247678] [MT] IDETestOperationsObserverDebug: (41CBE38C-701A-42F7-AD2A-3BC328D40E58) Beginning test session MyAppViewModelTests-41CBE38C-701A-42F7-AD2A-3BC328D40E58 at 2016-12-19 17:07:20.270 with Xcode 8A218a on target <DVTiPhoneSimulator: 0x7fa3fc276500> {[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35mSimDevice: SimDevice : iPad 2 (4BFE000A-04CD-4B69-82BB-E4B61DDDB2FC) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-2 } runtime={ SimRuntime : 9.3 (13E233) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m} (9.3 (13E233))[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m2016-12-19 17:07:20.299 xcodebuild[14132:9247678] [MT] IDETestOperationsObserverDebug: (E08695C2-DAE1-4B36-8584-B3CB196B71A0) Beginning test session MyAppModelTests-E08695C2-DAE1-4B36-8584-B3CB196B71A0 at 2016-12-19 17:07:20.299 with Xcode 8A218a on target <DVTiPhoneSimulator: 0x7fa3fc276500> {[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35mSimDevice: SimDevice : iPad 2 (4BFE000A-04CD-4B69-82BB-E4B61DDDB2FC) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-2 } runtime={ SimRuntime : 9.3 (13E233) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m} (9.3 (13E233))[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m2016-12-19 17:07:20.300 xcodebuild[14132:9247738] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1/DerivedData/myapp/Logs/Test/5801C679-4BE1-4E39-9D0E-902383857DC4/Session-MyAppModelTests-2016-12-19_170720-xKf4in.log[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m2016-12-19 17:07:20.322 xcodebuild[14132:9247678] [MT] IDETestOperationsObserverDebug: (6FE34F0A-558D-451D-941A-9AA0EC82DE06) Beginning test session MyAppViewTests-6FE34F0A-558D-451D-941A-9AA0EC82DE06 at 2016-12-19 17:07:20.322 with Xcode 8A218a on target <DVTiPhoneSimulator: 0x7fa3fc276500> {[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35mSimDevice: SimDevice : iPad 2 (4BFE000A-04CD-4B69-82BB-E4B61DDDB2FC) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-2 } runtime={ SimRuntime : 9.3 (13E233) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m} (9.3 (13E233))[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m2016-12-19 17:07:20.322 xcodebuild[14132:9247790] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:[0m
build 19-Dec-2016 17:07:20 [17:07:20]: ? [35m/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1/DerivedData/myapp/Logs/Test/5801C679-4BE1-4E39-9D0E-902383857DC4/Session-MyAppViewTests-2016-12-19_170720-p3eDoc.log[0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mBuilding[0m myapp/MyAppModel [Release][0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:07:20 [17:07:20]: [35m[33m?[0m [39;1mProcessing[0m Info.plist[0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35m[33m?[0m [39;1mCompiling[0m MyAppModel_vers.c[0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35m[33m?[0m [39;1mCompiling[0m MyAppModel_vers.c[0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35m[33m?[0m [39;1mLinking[0m MyAppModel[0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35m[33m?[0m [39;1mLinking[0m MyAppModel[0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35mRunning Tests: [33m?[0m [39;1mTouching[0m MyAppModel.framework[0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyAppModel.framework[0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35m[33m?[0m [39;1mBuilding[0m myapp/MyAppModelTests [Release][0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:07:30 [17:07:30]: [35m[33m?[0m [39;1mProcessing[0m Info.plist[0m
build 19-Dec-2016 17:07:48 [17:07:48]: [35m[33m?[0m [39;1mCompiling[0m MyAppModelTests_vers.c[0m
build 19-Dec-2016 17:07:48 [17:07:48]: [35m[33m?[0m [39;1mCompiling[0m MyAppModelTests_vers.c[0m
build 19-Dec-2016 17:07:48 [17:07:48]: [35m[33m?[0m [39;1mLinking[0m MyAppModelTests[0m
build 19-Dec-2016 17:07:48 [17:07:48]: [35m[33m?[0m [39;1mLinking[0m MyAppModelTests[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Quick.framework[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Haneke.framework[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Nimble.framework[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Alamofire.framework[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppModelTests.xctest/Frameworks/Haneke.framework[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppModelTests.xctest/Frameworks/Alamofire.framework[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppModelTests.xctest/Frameworks/Quick.framework[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppModelTests.xctest/Frameworks/Nimble.framework[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35mRunning Tests: [33m?[0m [39;1mTouching[0m MyAppModelTests.xctest[0m
build 19-Dec-2016 17:08:08 [17:08:08]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppModelTests.xctest[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mBuilding[0m myapp/MyAppViewModel [Release][0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mProcessing[0m Info.plist[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mCompiling[0m MyAppViewModel_vers.c[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mCompiling[0m MyAppViewModel_vers.c[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mLinking[0m MyAppViewModel[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mLinking[0m MyAppViewModel[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35mRunning Tests: [33m?[0m [39;1mTouching[0m MyAppViewModel.framework[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyAppViewModel.framework[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mBuilding[0m myapp/MyAppView [Release][0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mCompiling[0m MyAppView_vers.c[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mCompiling[0m MyAppView_vers.c[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mLinking[0m MyAppView[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mLinking[0m MyAppView[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mProcessing[0m Info.plist[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35mRunning Tests: [33m?[0m [39;1mTouching[0m MyAppView.framework[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyAppView.framework[0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mBuilding[0m myapp/MyApp [Release][0m
build 19-Dec-2016 17:08:09 [17:08:09]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:08:11 [17:08:11]: [35m[33m?[0m [39;1mCompiling[0m MyApp_vers.c[0m
build 19-Dec-2016 17:08:11 [17:08:11]: [35m[33m?[0m [39;1mCompiling[0m MyApp_vers.c[0m
build 19-Dec-2016 17:08:19 [17:08:19]: [35m[33m?[0m [39;1mLinking[0m MyApp[0m
build 19-Dec-2016 17:08:19 [17:08:19]: [35m[33m?[0m [39;1mLinking[0m MyApp[0m
build 19-Dec-2016 17:08:19 [17:08:19]: [35m[33m?[0m [39;1mCopying[0m Settings.plist[0m
build 19-Dec-2016 17:08:19 [17:08:19]: [35m[33m?[0m [39;1mProcessing[0m Info.plist[0m
build 19-Dec-2016 17:08:20 [17:08:20]: [35m[33m?[0m [39;1mCopying[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyAppModel.framework[0m
build 19-Dec-2016 17:08:20 [17:08:20]: [35m[33m?[0m [39;1mCopying[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyAppViewModel.framework[0m
build 19-Dec-2016 17:08:20 [17:08:20]: [35m[33m?[0m [39;1mCopying[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyAppView.framework[0m
build 19-Dec-2016 17:08:20 [17:08:20]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/Frameworks/MyAppViewModel.framework[0m
build 19-Dec-2016 17:08:20 [17:08:20]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/Frameworks/MyAppModel.framework[0m
build 19-Dec-2016 17:08:20 [17:08:20]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/Frameworks/MyAppView.framework[0m
build 19-Dec-2016 17:08:20 [17:08:20]: [35m[33m?[0m [39;1mRunning script[0m 'Copy Carthage Frameworks'[0m
build 19-Dec-2016 17:08:29 [17:08:29]: [35m[33m?[0m [39;1mRunning script[0m 'SwiftLint'[0m
build 19-Dec-2016 17:08:34 [17:08:34]: [35m[33m?[0m [39;1mRunning script[0m 'Run fabric crashlytics'[0m
build 19-Dec-2016 17:08:35 [17:08:35]: [35mRunning Tests: [33m?[0m [39;1mTouching[0m MyApp.app[0m
build 19-Dec-2016 17:08:35 [17:08:35]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mBuilding[0m myapp/MyAppViewModelTests [Release][0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mProcessing[0m Info.plist[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCompiling[0m MyAppViewModelTests_vers.c[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCompiling[0m MyAppViewModelTests_vers.c[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mLinking[0m MyAppViewModelTests[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mLinking[0m MyAppViewModelTests[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Alamofire.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Quick.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Nimble.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppViewModelTests.xctest/Frameworks/Alamofire.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppViewModelTests.xctest/Frameworks/Quick.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppViewModelTests.xctest/Frameworks/Nimble.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: ? [35m/var/folders/ys/szvd1t697xn8vf1g4g8dwpyw0000gr/T/SchemeScriptAction-oHFvuL: line 2: : command not found[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35mRunning Tests: [33m?[0m [39;1mTouching[0m MyAppViewModelTests.xctest[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppViewModelTests.xctest[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mBuilding[0m myapp/MyAppViewTests [Release][0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCheck Dependencies[0m[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCompiling[0m MyAppViewTests_vers.c[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCompiling[0m MyAppViewTests_vers.c[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mLinking[0m MyAppViewTests[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mLinking[0m MyAppViewTests[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mProcessing[0m Info.plist[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Quick.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mCopying[0m Carthage/Build/iOS/Nimble.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppViewTests.xctest/Frameworks/Nimble.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppViewTests.xctest/Frameworks/Quick.framework[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35mRunning Tests: [33m?[0m [39;1mTouching[0m MyAppViewTests.xctest[0m
build 19-Dec-2016 17:08:36 [17:08:36]: [35m[33m?[0m [39;1mSigning[0m DerivedData/myapp/Build/Intermediates/CodeCoverage/Products/Release-iphonesimulator/MyApp.app/PlugIns/MyAppViewTests.xctest[0m
build 19-Dec-2016 17:08:40 [17:08:40]: ? [35m[39;1mAll tests[0m[0m
build 19-Dec-2016 17:08:40 [17:08:40]: ? [35m[39;1mQuick.framework[0m[0m
build 19-Dec-2016 17:08:40 [17:08:40]: ? [35mTest Suite [39;1mMyAppViewModelTests.xctest[0m started[0m
build 19-Dec-2016 17:08:40 [17:08:40]: ? [35m[39;1mMyPageViewModelSpec[0m[0m
build 19-Dec-2016 17:08:40 [17:08:40]: ? [35m[32;1m?[0m active_instances_returned_from_service_on_construction ([33m0.039[0m seconds)[0m
...
build 19-Dec-2016 17:08:41 [17:08:41]: ? [35m[32;1m Executed 70 tests, with 0 failures (0 unexpected) in 0.156 (0.211) seconds[0m
build 19-Dec-2016 17:08:41 [17:08:41]: ? [35m[0m[0m
build 19-Dec-2016 17:08:44 [17:08:44]: ? [35m[39;1mAll tests[0m[0m
build 19-Dec-2016 17:08:44 [17:08:44]: ? [35m[39;1mQuick.framework[0m[0m
build 19-Dec-2016 17:08:44 [17:08:44]: ? [35mTest Suite [39;1mMyAppModelTests.xctest[0m started[0m
build 19-Dec-2016 17:08:44 [17:08:44]: ? [35m[39;1mMyPageServiceSpec[0m[0m
build 19-Dec-2016 17:08:44 [17:08:44]: ? [35m[32;1m?[0m service_specs__active_instances_are_correctly_returned (0.007 seconds)[0m
...
build 19-Dec-2016 17:08:46 [17:08:46]: ? [35m[32;1m Executed 144 tests, with 0 failures (0 unexpected) in 1.288 (1.401) seconds[0m
build 19-Dec-2016 17:08:46 [17:08:46]: ? [35m[0m[0m
build 19-Dec-2016 17:08:49 [17:08:49]: ? [35m[39;1mAll tests[0m[0m
build 19-Dec-2016 17:08:49 [17:08:49]: ? [35mTest Suite [39;1mMyAppViewTests.xctest[0m started[0m
build 19-Dec-2016 17:08:50 [17:08:50]: ? [35m[39;1mHtmlLabelSpec[0m[0m
build 19-Dec-2016 17:08:50 [17:08:50]: ? [35m[32;1m?[0m HtmlLabel__stringFrom_html__works_with_special_characters (0.005 seconds)[0m
...
build 19-Dec-2016 17:08:50 [17:08:50]: ? [35m[32;1m Executed 92 tests, with 0 failures (0 unexpected) in 0.457 (0.538) seconds[0m
build 19-Dec-2016 17:08:50 [17:08:50]: ? [35m[0m[0m
build 19-Dec-2016 17:08:50 [17:08:50]: ? [35m[39;1mQuick.framework[0m[0m
build 19-Dec-2016 17:08:51 [17:08:51]: [35m[33m?[0m [39;1mTest[0m Succeeded[0m
build 19-Dec-2016 17:08:52 +--------------------+-----+
build 19-Dec-2016 17:08:52 | Test Results |
build 19-Dec-2016 17:08:52 +--------------------+-----+
build 19-Dec-2016 17:08:52 | Number of tests | 269 |
build 19-Dec-2016 17:08:52 | Number of failures | [32m0[0m |
build 19-Dec-2016 17:08:52 +--------------------+-----+
build 19-Dec-2016 17:08:52
build 19-Dec-2016 17:08:53 [17:08:53]: [32mSuccessfully generated report at '/Users/me/bamboo-agent-home/xml-data/build-dir/MYBUILD-JOB1/build/reports/junit_unittests.xml'[0m
build 19-Dec-2016 17:08:53
build 19-Dec-2016 17:08:53 +------+-------------------------------------+-------------+
build 19-Dec-2016 17:08:53 | [32mfastlane summary[0m |
build 19-Dec-2016 17:08:53 +------+-------------------------------------+-------------+
build 19-Dec-2016 17:08:53 | Step | Action | Time (in s) |
build 19-Dec-2016 17:08:53 +------+-------------------------------------+-------------+
build 19-Dec-2016 17:08:53 | 1 | Verifying required fastlane version | 0 |
build 19-Dec-2016 17:08:53 | 2 | default_platform | 0 |
build 19-Dec-2016 17:08:53 | 3 | scan | 96 |
build 19-Dec-2016 17:08:53 +------+-------------------------------------+-------------+
build 19-Dec-2016 17:08:53
build 19-Dec-2016 17:08:53 [17:08:53]: [32mfastlane.tools finished successfully ?[0m
simple 19-Dec-2016 17:08:54 Finished task 'test app' with result: Success
command 19-Dec-2016 17:08:54 Substituting variable: ${bamboo.BUILD_CHANGE_LOG_PATH} with CHANGELOG.md
command 19-Dec-2016 17:08:54 Substituting variable: ${bamboo.JUnit_TestsPath} with build/reports/*.xml
This is probably a Quick issue, not a Nimble issue. Nimble just adds nicer test matchers/assertions.
@istx25 does this look familiar?
Hmm. Not sure what's happening but it doesn't look like it would be an issue with Nimble. I'll have to do some more investigating.
Okay. I wasn't sure where to start. I have no idea at which point the tests are disappearing. Let me know anything I can do to help!
Mind refiling the issue on Quick? More traffic on there.
Does your stack use xctool or something like that? It looks like the test output is being piped through some sort of formatter. Does your stack have a --verbose option that can display the full, unadulterated output from the tests?
....
build 19-Dec-2016 17:08:41 [17:08:41]: ? �[35m�[32;1m Executed 70 tests, with 0 failures (0 unexpected) in 0.156 (0.211) seconds�[0m
....
build 19-Dec-2016 17:08:46 [17:08:46]: ? �[35m�[32;1m Executed 144 tests, with 0 failures (0 unexpected) in 1.288 (1.401) seconds�[0m
....
build 19-Dec-2016 17:08:46 [17:08:46]: ? �[35m�[32;1m Executed 92 tests, with 0 failures (0 unexpected) in 1.288 (1.401) seconds�[0m
70 + 144 + 92 = 306
It seems like this is a bug of fastlane plugin, which scanning wrong number of tests.
Wow, good catch!!
@wongzigii Thanks so much! I will refile with fastlane.
I've had a bit more time to run through this and figure out exactly what the problem is.
I can reproduce this with asynchronous tests. I have a test that uses waitUntil which does not show up in my xcodebuild log, does not report to the command line (unless it fails), and is not counted in this number. I believe that fastlane isn't counting it in the number because it uses xcpretty to parse the xcodebuild log and there is no output for this async test.
Unfortunately, while it is reproducible, it's not consistent. The same tests sometimes pass and appear in the output/count.
I converted one of my tests from using waitUntil to toEventually in case the waitUntil was the problem but the test still is sometimes missing from the list.
On second thought, what I said doesn't make sense. The test NEVER goes to the xcodebuild log but SOMETIMES is counted. I must be missing something else.
Most helpful comment
70 + 144 + 92 = 306
It seems like this is a bug of fastlane plugin, which scanning wrong number of tests.