Parallel UI Testing with EarlGrey on Xcode 9 - PhaseScriptExecution [CP] \ Embed \ Pods Error

I am trying to run parallel user interface tests using the EarlGrey framework (works as the unit test target), following this tutorial . I succeeded in launching the XCTest UI target and the EarlGrey test target, but I get the following errors when adding another test target to Earlgrey or while running two Earlgrey test targets at the same time.

Using apple script im looks like this:

tell application "iTerm"
    set myterm to create window with default profile
    tell myterm
        activate current session
        launch session "Default Session"
        tell the current session
            write text "cd ~/Desktop/tddSplitter/Splitter"
            write text "xcodebuild clean -workspace Splitter.xcworkspace -scheme EarlGreyWelcomeScreenTests -sdk iphonesimulator11.0 -destination 'platform=iOS Simulator,id=476E9E8C-8248-4EF6-8054-67900D603E83'  test | xcpretty" without newline
            tell (split vertically with same profile)
                write text "cd ~/Desktop/tddSplitter/Splitter"
                write text "xcodebuild clean -workspace Splitter.xcworkspace -scheme EarlGreyMyBillsTests -sdk iphonesimulator11.0 -destination 'platform=iOS Simulator,id=F3DEA448-147B-4DDB-AD83-16D18BA1A87F' test | xcpretty" without newline
            end tell
            tell (split vertically with same profile)
                write text "cd ~/Desktop/tddSplitter/Splitter"
                write text "xcodebuild clean -workspace Splitter.xcworkspace -scheme EarlGreyNewBillTests -sdk iphonesimulator11.0 -destination 'platform=iOS Simulator,id=9129B18A-BC9A-452C-BA38-B968ED73B9EC' test | xcpretty" without newline
            end tell
        end tell
        write (sessions of current tab) text linefeed
    end tell
end tell

The error that I get at the bottom of each window is the same for each test target and the following:

The following build commands failed:
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/waynerumble/Library/Developer/Xcode/DerivedData/Splitter-dujnwkiaikdyiiczdwxhjrusebvf/Build/Intermediates.noindex/Splitter.build/Debug-iphonesimulator/Splitter.build/Script-84DCB13FCAD79943430C6362.sh

, , script, :

EarlGreyWelcomeScreenTests:

Testing failed:
/Users/waynerumble/Library/Developer/Xcode/DerivedData/Splitter-dujnwkiaikdyiiczdwxhjrusebvf/Build/Products/Debug-iphonesimulator/Splitter.app/Frameworks/GTMSessionFetcher.framework: No such file or directory

EarlGreyMyBillsTests:

Testing failed:
/Users/waynerumble/Library/Developer/Xcode/DerivedData/Splitter-dujnwkiaikdyiiczdwxhjrusebvf/Build/Products/Debug-iphonesimulator/Splitter.app/Frameworks/GTMSessionFetcher.framework: No such file or directory
error: couldn't remove '/Users/waynerumble/Library/Developer/Xcode/DerivedData/Splitter-dujnwkiaikdyiiczdwxhjrusebvf/Build/Products/Debug-iphonesimulator/Splitter.app/Frameworks/GTMSessionFetcher.framework' after command failed: No such file or directory

EarlGreyNewBillTests:

Testing failed:
Command builtin-rm failed with exit code 513
Command /bin/sh failed with exit code 1

, , , , - , :

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Splitter' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!
    inhibit_all_warnings!

    def allPods
      pod 'Firebase'
      pod 'Firebase/Database'
      pod 'Firebase/Auth'
      pod 'Firebase/Storage'
      pod 'LifetimeTracker'
      pod 'iCarousel'
    end

    def earlGreyUITests
      project 'Splitter'
      use_frameworks!
      inherit! :search_paths
      pod 'EarlGrey'
    end

    # Pods for Splitter

    allPods

    target 'UnitTests' do
      inherit! :search_paths
      allPods
    end

    target 'EarlGreyWelcomeScreenTests' do
      earlGreyUITests
      allPods
    end

    target 'EarlGreyMyBillsTests' do
      earlGreyUITests
      allPods
    end

    target 'EarlGreyNewBillTests' do
      earlGreyUITests
      allPods
    end

    post_install do |installer|
        installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
                config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = "NO"
                config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
                config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
            end
        end
    end
end

, , , , .

+4

Source: https://habr.com/ru/post/1687024/


All Articles