public async Task <IReadOnlyCollection <TestCaseExecutionResult> > RunTestsAsync(ITestSession customSession, IDictionary <string, string> options) { //discover var testCases = _testStorage.GetTestCaseIds().Select(id => _testStorage.GetTestCase(id)); //filter testCases = FilterByTags(testCases, options); //order if (_priorityProvider != null) { testCases = testCases.OrderBy(_priorityProvider.GetPriority); } //execute using (var testSession = new TestSession(_pipelineActionFactory, customSession, _loggerFactory, options, _criticalSectionTokensProvider)) { await testSession.ExecuteAsync(testCases, options.GetWorkersCount()); return(testSession.Results); } }