public async Task ExecuteTestGroup(TestGroupViewModel testGroup)
 {
     await ExecuteTests(testGroup.VisibleTests);
 }
 public async Task ExecuteTestGroupInParallel(TestGroupViewModel testGroup)
 {
     await ExecuteTests(testGroup.VisibleTests, allowParallelism: true);
 }
        public async Task InitializeTestList()
        {
            if (string.IsNullOrWhiteSpace(ConfigFilePath))
            {
                return;
            }

            foreach (var testGroupViewModel in TestGroups)
            {
                testGroupViewModel.PropertyChanged -= OnGroupViewModelPropertyChanged;
            }

            TestGroups.Clear();
            
            if (_testSessionContext != null)
                await _testSessionContext.DisposeAsync();

            _testSessionContext = await _testSessionContextLoader.Load(ConfigFilePath);

            var testCaseGroup = _testSessionContext.TestCases.GroupBy(x => x.AssemblyName);

            foreach (var group in testCaseGroup)
            {
                var testCases = group.OrderBy(x => x.TestClassName).ThenBy(x => x.Name);
                var groupViewModel = new TestGroupViewModel(group.Key, testCases, this);

                TestGroups.Add(groupViewModel);

                groupViewModel.PropertyChanged += OnGroupViewModelPropertyChanged;
            }

            var testCategories = _testSessionContext.TestCases
                .SelectMany(x => x.Categories)
                .Distinct()
                .Select(x => new TestCategoryViewModel(x));

            TestCategories.ResetTo(testCategories);
            FirePropertyChanged(nameof(HasTestCategories));
        }