我正在尝试通过Appium和webdriverio实现IOS模拟器的自动化。 Appium正在创建具有随机模拟器名称的模拟器,例如“ appiumTest-4F75F52A-4C52-48F0-B818-60C891F72E95-iPhone XR”。 它根据已编写的测试数量来创建模拟器数量。我试图弄清楚为什么appium正在创建模拟器的实例。
测试所需的功能:
功能:[{ maxInstances:1 deviceName:“ iPhone XR”, platformName:“ iOS”, 应用:“应用/路径”, platformVersion:'12 .2', 方向:“肖像”, noReset:是的, automationName:'XCUITest', useNewWDA:是的, waitForQuiescence:否, newCommandTimeout:240, }]
给出的是Ios模拟器测试的 APPIUM 日志
[35m[BaseDriver][39m Session created with session id: 6caa6127-91ad-4770-9e6b-6adbbcfbf000
[debug]
[35m[XCUITest][39m iOS SDK Version set to '12.2'
[35m[XCUITest][39m Simulator udid not provided
[35m[XCUITest][39m Using desired caps to create a new simulator
[debug] [35m[simctl][39m Creating simulator with name 'appiumTest-4F76F52A-4C52-48F0-B818-60C891F72E95-iPhone XR', device type id 'iPhone XR' and runtime id 'com.apple.CoreSimulator.SimRuntime.iOS-12-2'
[35m[iOSSim][39m Constructing iOS simulator for Xcode version 10.2.1 with udid '82827AFA-6BE5-4CCF-9506-CB866477427B'
[35m[XCUITest][39m Created simulator with udid '82827AFA-6BE5-4CCF-9506-CB866477427B'.
[35m[XCUITest][39m Determining device to run tests on: udid: '82827AFA-6BE5-4CCF-9506-CB866477427B', real device: false
[debug] [35m[BaseDriver][39m Event 'xcodeDetailsRetrieved' logged at 1562754343205 (15:55:43 GMT+0530 (India Standard Time))
[35m[BaseDriver][39m Using local app '/Users/faizahmed/Downloads/wdio-mobile/wdioApp/iOS-Simulator-NativeDemoApp-0.2.1.app.zip'
[debug] [35m[BaseDriver][39m Unzipping '/Users/faizahmed/Downloads/wdio-mobile/wdioApp/iOS-Simulator-NativeDemoApp-0.2.1.app.zip'
[debug] [35m[BaseDriver][39m Extracted 84 item(s) from '/Users/faizahmed/Downloads/wdio-mobile/wdioApp/iOS-Simulator-NativeDemoApp-0.2.1.app.zip'
[debug] [35m[BaseDriver][39m Matched 84 item(s) in the extracted archive. Assuming 'iOS-Simulator-NativeDemoApp-0.2.1.app' is the correct bundle
[35m[BaseDriver][39m Unzipped local app to '/var/folders/0v/qnp0rbs13j59m597p5ff016c0000gn/T/2019610-76637-1yhuqt3.dn1ul/iOS-Simulator-NativeDemoApp-0.2.1.app'
[debug] [35m[BaseDriver][39m Event 'appConfigured' logged at 1562754343822 (15:55:43 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Checking whether app '/var/folders/0v/qnp0rbs13j59m597p5ff016c0000gn/T/2019610-76637-1yhuqt3.dn1ul/iOS-Simulator-NativeDemoApp-0.2.1.app' is actually present on file system
[debug] [35m[XCUITest][39m App is present
[debug] [35m[iOS][39m Getting bundle ID from app '/var/folders/0v/qnp0rbs13j59m597p5ff016c0000gn/T/2019610-76637-1yhuqt3.dn1ul/iOS-Simulator-NativeDemoApp-0.2.1.app': 'org.reactjs.native.example.wdioDemoApp'
[debug] [35m[BaseDriver][39m Event 'resetStarted' logged at 1562754343826 (15:55:43 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Reset: noReset is on. Leaving simulator as is
[debug] [35m[BaseDriver][39m Event 'resetComplete' logged at 1562754343827 (15:55:43 GMT+0530 (India Standard Time))
[35m[XCUITest][39m Continuing without capturing device logs: iOS Simulator with udid 82827AFA-6BE5-4CCF-9506-CB866477427B is not running
[35m[XCUITest][39m Setting up simulator
[debug] [35m[iOS][39m No reason to set locale
[debug] [35m[iOS][39m No iOS / app preferences to set
[debug] [35m[iOS][39m Setting did not need to be updated
[debug] [35m[iOSSim][39m Setting preferences of 82827AFA-6BE5-4CCF-9506-CB866477427B Simulator to {"SimulatorWindowOrientation":"Portrait","SimulatorWindowRotationAngle":0,"ConnectHardwareKeyboard":false}
[debug] [35m[iOSSim][39m Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":false}
[debug] [35m[iOSSim][39m Updated 82827AFA-6BE5-4CCF-9506-CB866477427B Simulator preferences at '/Users/faizahmed/Library/Preferences/com.apple.iphonesimulator.plist' with {"DevicePreferences":{"82827AFA-6BE5-4CCF-9506-CB866477427B":{"SimulatorWindowOrientation":"Portrait","SimulatorWindowRotationAngle":0,"ConnectHardwareKeyboard":false}},"RotateWindowWhenSignaledByGuest":true,"ConnectHardwareKeyboard":false}
[35m[iOSSim][39m Booting Simulator with UDID 82827AFA-6BE5-4CCF-9506-CB866477427B...
[35m[iOSSim][39m Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 82827AFA-6BE5-4CCF-9506-CB866477427B -ConnectHardwareKeyboard 0
[35m[iOSSim][39m Simulator with UDID 82827AFA-6BE5-4CCF-9506-CB866477427B booted in 20 seconds
[debug] [35m[IDB][39m Connecting idb service to '82827AFA-6BE5-4CCF-9506-CB866477427B'
[35m[XCUITest][39m idb will not be used for Simulator interaction. Original error: 'idb' has not been found in PATH. Is it installed? Read https://www.fbidb.io for more details
[debug] [35m[BaseDriver][39m Event 'simStarted' logged at 1562754364973 (15:56:04 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Starting log capture for iOS Simulator with udid '82827AFA-6BE5-4CCF-9506-CB866477427B', using 'xcrun simctl spawn 82827AFA-6BE5-4CCF-9506-CB866477427B log stream --style compact'
[debug]
[debug] [35m[XCUITest][39m Verifying application platform
[debug] [35m[XCUITest][39m CFBundleSupportedPlatforms: ["iPhoneSimulator"]
[debug] [35m[XCUITest][39m Cleaning installd cache to save the disk space
[debug] [35m[XCUITest][39m Installing '/var/folders/0v/qnp0rbs13j59m597p5ff016c0000gn/T/2019610-76637-1yhuqt3.dn1ul/iOS-Simulator-NativeDemoApp-0.2.1.app' on Simulator with UUID '82827AFA-6BE5-4CCF-9506-CB866477427B'...
[debug] [35m[XCUITest][39m The app has been installed successfully.
[debug] [35m[BaseDriver][39m Event 'appInstalled' logged at 1562754373051 (15:56:13 GMT+0530 (India Standard Time))
[35m[XCUITest][39m Using WDA path: '/Users/faizahmed/Downloads/appium-mobile-test/node_modules/appium-webdriveragent'
[35m[XCUITest][39m Using WDA agent: '/Users/faizahmed/Downloads/appium-mobile-test/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[debug] [35m[XCUITest][39m No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [35m[XCUITest][39m Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver'
[debug] [35m[XCUITest][39m Capability 'useNewWDA' set to true, so uninstalling WDA before proceeding
[35m[XCUITest][39m Shutting down sub-processes
[debug] [35m[XCUITest][39m Removing WDA application from device
[debug] [35m[BaseDriver][39m Event 'wdaUninstalled' logged at 1562754375211 (15:56:15 GMT+0530 (India Standard Time))
[debug] [35m[XCUITest][39m Trying to start WebDriverAgent 2 times with 10000ms interval
[debug] [35m[XCUITest][39m These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities
[debug] [35m[BaseDriver][39m Event 'wdaStartAttempted' logged at 1562754375212 (15:56:15 GMT+0530 (India Standard Time))
[35m[XCUITest][39m Launching WebDriverAgent on the device
[35m[WebDriverAgent][39m Fetching dependencies
[35m[WebDriverAgent][39m Dependencies up-to-date
[debug] [35m[XCUITest][39m Killing running processes 'xcodebuild.*82827AFA-6BE5-4CCF-9506-CB866477427B, 82827AFA-6BE5-4CCF-9506-CB866477427B.*XCTRunner' for the device 82827AFA-6BE5-4CCF-9506-CB866477427B...
[debug] [35m[XCUITest][39m 'pgrep -ifn xcodebuild.*82827AFA-6BE5-4CCF-9506-CB866477427B' didn't detect any matching processes. Return code: 1
[debug] [35m[XCUITest][39m 'pgrep -ifn 82827AFA-6BE5-4CCF-9506-CB866477427B.*XCTRunner' didn't detect any matching processes. Return code: 1
[debug] [35m[XCUITest][39m Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Users/faizahmed/Downloads/appium-mobile-test/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=82827AFA-6BE5-4CCF-9506-CB866477427B IPHONEOS_DEPLOYMENT_TARGET=12.2 GCC_TREAT_WARNINGS_AS_ERRORS=0 COMPILER_INDEX_STORE_ENABLE=NO' in directory '/Users/faizahmed/Downloads/appium-mobile-test/node_modules/appium-webdriveragent'