В настоящее время я работаю над проектом, использующим Xamarin UItest для тестирования приложения IOS. Я настроил решение, как показано ниже. Но я получаю сообщение об ошибке при выполнении тестового примера на физическом устройстве, а также на виртуальном устройстве. Мне было интересно, что я делаю не так с конфигурацией, или я что-то упустил? DeviceAgent устанавливается, но после этого ничего не происходит.
using System;
using System.Threading.Tasks;
using Xamarin.UITest;
using Xamarin.UITest.Queries;
namespace Testframework_DitApp
{
public class AppInitializer
{
public static IApp StartApp(Platform platform)
{
if (platform == Platform.iOS)
{
return ConfigureApp
.iOS
.Debug()
.EnableLocalScreenshots()
.DeviceIdentifier("8b7937ef87210a797fc4fa0750e3c62d194bd5b1")
.InstalledApp("/Users/R/Stack/Developer/Testframework_DitApp/Payload/Prod.app")
.StartApp();
}
return ConfigureApp.iOS.InstalledApp("/Users/R/Stack/Developer/Testframework_DitApp/Payload/Prod.ipa").DeviceIdentifier("8b7937ef87210a797fc4fa0750e3c62d194bd5b1").StartApp();
}
}
}
Logfile при выполнении
/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/uitest/log-2018-08-30_09-40-59-050.txt
iOS test running Xamarin.UITest version: 2.2.5
Skipping IDE integration as important properties are configured. To force IDE integration, add .PreferIdeSettings() to ConfigureApp.
Artifact folder: /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/uitest/a-0482DFE3EAA4B590406DC5DEDBA3EAF6BB72CD5E
Running command. { Path: "chmod", Arguments: "a+x /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/uitest/a-0482DFE3EAA4B590406DC5DEDBA3EAF6BB72CD5E/20021/idevice-tools/iappdata", CurrentDirectory: "/Users/R/Stack/Developer/Testframework_DitApp2/Testframework_DitApp/bin/Debug" }
Running command. { Path: "chmod", Arguments: "a+x /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/uitest/a-0482DFE3EAA4B590406DC5DEDBA3EAF6BB72CD5E/20021/idevice-tools/iproxy", CurrentDirectory: "/Users/R/Stack/Developer/Testframework_DitApp2/Testframework_DitApp/bin/Debug" }
Artifact folder: /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/uitest/a-98F82CFEDF0FB026556412C4B9E68EF3BED6D9ED
Starting app. { BundleId: "/Users/R/Stack/Developer/Testframework_DitApp/Payload/Prod.app" }
Running command. { Path: "ps", Arguments: "-xww -o pid,user,args", CurrentDirectory: "/Users/R/Stack/Developer/Testframework_DitApp2/Testframework_DitApp/bin/Debug" }
Killing portforwarding process with PID 19419
Running command. { Path: "ps", Arguments: "-xww -o pid,user,args", CurrentDirectory: "/Users/R/Stack/Developer/Testframework_DitApp2/Testframework_DitApp/bin/Debug" }
Killing portforwarding process with PID 19421
Finished with exit code 0 in 174 ms.
Running command. { Path: "ps", Arguments: "-xww -o pid,user,args", CurrentDirectory: "/Users/R/Stack/Developer/Testframework_DitApp2/Testframework_DitApp/bin/Debug" }
Starting process. { Path: "/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/uitest/a-0482DFE3EAA4B590406DC5DEDBA3EAF6BB72CD5E/idevice-tools/iproxy", Arguments: "37265 37265 8b7937ef87210a797fc4fa0750e3c62d194bd5b1", CurrentDirectory: "/Users/R/Stack/Developer/Testframework_DitApp2/Testframework_DitApp/bin/Debug" }
Running command. { Path: "ps", Arguments: "-xww -o pid,user,args", CurrentDirectory: "/Users/R/Stack/Developer/Testframework_DitApp2/Testframework_DitApp/bin/Debug" }
Starting process. { Path: "/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/uitest/a-0482DFE3EAA4B590406DC5DEDBA3EAF6BB72CD5E/idevice-tools/iproxy", Arguments: "27753 27753 8b7937ef87210a797fc4fa0750e3c62d194bd5b1", CurrentDirectory: "/Users/R/Stack/Developer/Testframework_DitApp2/Testframework_DitApp/bin/Debug" }
Clearing app data.
1 - ClearData:
bundleId: /Users/R/Stack/Developer/Testframework_DitApp/Payload/Prod.app
deviceId: 8b7937ef87210a797fc4fa0750e3c62d194bd5b1
HTTP POST { Url: { AbsolutePath: "/exit", AbsoluteUri: "http://127.0.0.1:37265/exit", LocalPath: "/exit", Authority: "127.0.0.1:37265", HostNameType: IPv4, IsDefaultPort: False, IsFile: False, IsLoopback: True, PathAndQuery: "/exit", Segments: [ "/", "exit" ], IsUnc: False, Host: "127.0.0.1", Port: 37265, Query: "", Fragment: "", Scheme: "http", OriginalString: "http://127.0.0.1:37265/exit", DnsSafeHost: "127.0.0.1", IdnHost: "127.0.0.1", IsAbsoluteUri: True, UserEscaped: False, UserInfo: "" } }
Running: /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/bin/iOSDeviceManager is-installed /Users/R/Stack/Developer/Testframework_DitApp/Payload/Prod.app -d 8b7937ef87210a797fc4fa0750e3c62d194bd5b1
POST Complete { StatusCode: 0, StatusDescription: "A task was canceled.", ResponseHeaders: "", Content: "" }
Exit code '2' received from '/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/bin/iOSDeviceManager is-installed /Users/R/Stack/Developer/Testframework_DitApp/Payload/Prod.app -d 8b7937ef87210a797fc4fa0750e3c62d194bd5b1'
false
3 - LaunchTestAsync:
deviceId: 8b7937ef87210a797fc4fa0750e3c62d194bd5b1
4 - HTTP GET http://127.0.0.1:27753/1.0/version
4 - HTTP GET complete
DeviceAgent '1533657035' not found, launching
5 - HTTP DELETE http://127.0.0.1:27753/1.0/session
5 - HTTP DELETE complete
DeviceAgent delete session response: RequestTimeout -
6 - HTTP POST http://127.0.0.1:27753/1.0/shutdown
6 - HTTP POST complete
DeviceAgent shutdown response: RequestTimeout -
7 - HTTP GET http://127.0.0.1:27753/1.0/ping
Running: /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/bin/iOSDeviceManager install "/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/ipa/DeviceAgent-Runner.app" -d 8b7937ef87210a797fc4fa0750e3c62d194bd5b1
Exit code '0' received from '/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/bin/iOSDeviceManager install "/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/ipa/DeviceAgent-Runner.app" -d 8b7937ef87210a797fc4fa0750e3c62d194bd5b1'
Running: /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/bin/iOSDeviceManager is-installed /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/ipa/DeviceAgent-Runner.app -d 8b7937ef87210a797fc4fa0750e3c62d194bd5b1
Exit code '0' received from '/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/bin/iOSDeviceManager is-installed /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/ipa/DeviceAgent-Runner.app -d 8b7937ef87210a797fc4fa0750e3c62d194bd5b1'
8 - HTTP GET http://127.0.0.1:27753/1.0/ping
3 - Unsuccessful