AWSSDK.Tests.TestDriver.StartTests C# (CSharp) Method

StartTests() private method

private StartTests ( ) : void
return void
        private void StartTests()
        {
            runner = new TestRunner();

            var httpClients = new List<AWSConfigs.HttpClientOption>(){ AWSConfigs.HttpClientOption.UnityWWW };

            if (Type.GetType("UnityEngine.Networking.UnityWebRequest, UnityEngine") != null 
                || Type.GetType("UnityEngine.Experimental.Networking.UnityWebRequest, UnityEngine") != null)
            {
                httpClients.Add(AWSConfigs.HttpClientOption.UnityWebRequest);
            }

            Debug.Log(@"Added the following http clients");
            
            foreach (var hc in httpClients)
            {
                Debug.Log(hc.ToString());
            }

            EnsureBackgroundExecution(() =>
            {
                int count = 0;
                
                foreach (var httpClient in httpClients)
                {
                    retryCount = 0;

                    count++;
                    AWSConfigs.HttpClient = httpClient;

                    if (httpClient == AWSConfigs.HttpClientOption.UnityWWW)
                    {
                        runner.HttpClient = httpClient;
                        runner.RunTestsWithCategory("WWW");
                    }
                    else
                    {
                        runner.HttpClient = httpClient;
                        runner.RunTests();
                    }

                    Thread.Sleep(TimeSpan.FromSeconds(5));
                }
            });
        }