protected override void OnCreate(Bundle bundle) { // Register tests from shared library. AddTestAssembly(typeof(Config).Assembly); // Try to send results to the host via a socket for CI. try { ResultChannel = TrxResultChannel.CreateTcpTrxResultChannel(ResultChannelHost, Config.ResultChannelPort).Result; } catch (Exception e) { Log.Warn("AppCenterTest", $"Could not connect to host for reporting results.\n{e}"); } // start running the test suites as soon as the application is loaded AutoStart = true; #if !DEBUG // crash the application (to ensure it's ended) and return to springboard TerminateAfterExecution = true; #endif // you cannot add more assemblies once calling base base.OnCreate(bundle); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) { // Clear NSUserDefaults before the test. var plist = NSUserDefaults.StandardUserDefaults; var appDomain = NSBundle.MainBundle.BundleIdentifier; plist.RemovePersistentDomain(appDomain); // Register tests from shared library. AddTestAssembly(typeof(Config).Assembly); // Try to send results to the host via a socket for CI. try { ResultChannel = TrxResultChannel.CreateTcpTrxResultChannel(ResultChannelHost, Config.ResultChannelPort).Result; } catch (Exception e) { Console.WriteLine($"[AppCenterTest] WARN Could not connect to host for reporting results.\n{e}"); } // start running the test suites as soon as the application is loaded AutoStart = true; #if !DEBUG // crash the application (to ensure it's ended) and return to springboard TerminateAfterExecution = true; #endif DistributeUpdateTest.DistributeEvent += ConfigureDataForDistribute; UiApplication = uiApplication; LaunchOptions = launchOptions; return(base.FinishedLaunching(uiApplication, launchOptions)); }
protected override void OnCreate(Bundle bundle) { // Clear shared preferences before the test. var prefs = GetSharedPreferences("AppCenter", FileCreationMode.Private); prefs.Edit().Clear(); // Register tests from shared library. AddTestAssembly(typeof(Config).Assembly); // Try to send results to the host via a socket for CI. try { ResultChannel = TrxResultChannel.CreateTcpTrxResultChannel(ResultChannelHost, Config.ResultChannelPort).Result; } catch (Exception e) { Log.Warn("AppCenterTest", $"Could not connect to host for reporting results.\n{e}"); } // start running the test suites as soon as the application is loaded AutoStart = true; #if !DEBUG // crash the application (to ensure it's ended) and return to springboard TerminateAfterExecution = true; #endif Distribute.SetEnabledForDebuggableBuild(true); DistributeUpdateTest.DistributeEvent += ConfigureDataForDistribute; // you cannot add more assemblies once calling base base.OnCreate(bundle); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) { // Register tests from shared library. AddTestAssembly(typeof(Config).Assembly); // Try to send results to the host via a socket for CI. try { ResultChannel = TrxResultChannel.CreateTcpTrxResultChannel(ResultChannelHost, Config.ResultChannelPort).Result; } catch (Exception e) { Console.WriteLine($"[AppCenterTest] WARN Could not connect to host for reporting results.\n{e}"); } // start running the test suites as soon as the application is loaded AutoStart = true; #if !DEBUG // crash the application (to ensure it's ended) and return to springboard TerminateAfterExecution = true; #endif return(base.FinishedLaunching(uiApplication, launchOptions)); }