AWSSDK.Tests.Framework.TestRunner.RunTestsWithCategory C# (CSharp) Method

RunTestsWithCategory() public method

public RunTestsWithCategory ( string category ) : void
category string
return void
        public void RunTestsWithCategory(string category)
        {
            RunTests(new CategoryFilter(category));
        }

Same methods

TestRunner::RunTestsWithCategory ( string category, HashSet testNames ) : void

Usage Example

Example #1
0
        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));
                }
            });
        }