/// <summary> /// Initializes a new instance of the <see cref="TestRunCriteria"/> class. /// </summary> /// /// <param name="sources">Sources which contains tests that should be executed.</param> /// <param name="frequencyOfRunStatsChangeEvent">Frequency of run stats event.</param> /// <param name="keepAlive"> /// Whether the execution process should be kept alive after the run is finished or not. /// </param> /// <param name="testSettings">Settings used for this run.</param> /// <param name="runStatsChangeEventTimeout"> /// Timeout that triggers sending results regardless of cache size. /// </param> /// <param name="testHostLauncher"> /// Test host launcher. If null then default will be used. /// </param> /// <param name="testCaseFilter">Test case filter.</param> /// <param name="filterOptions">Filter options.</param> /// <param name="testSessionInfo">The test session info object.</param> /// <param name="debugEnabledForTestSession"> /// Indicates if debugging should be enabled when we have test session info available. /// </param> public TestRunCriteria( IEnumerable <string> sources, long frequencyOfRunStatsChangeEvent, bool keepAlive, string testSettings, TimeSpan runStatsChangeEventTimeout, ITestHostLauncher testHostLauncher, string testCaseFilter, FilterOptions filterOptions, TestSessionInfo testSessionInfo, bool debugEnabledForTestSession) : base( frequencyOfRunStatsChangeEvent, keepAlive, testSettings, runStatsChangeEventTimeout, testHostLauncher) { var testSources = sources as IList <string> ?? sources.ToList(); ValidateArg.NotNullOrEmpty(testSources, nameof(sources)); this.AdapterSourceMap = new Dictionary <string, IEnumerable <string> >(); this.AdapterSourceMap.Add(Constants.UnspecifiedAdapterPath, testSources); this.TestCaseFilter = testCaseFilter; this.FilterOptions = filterOptions; this.TestSessionInfo = testSessionInfo; this.DebugEnabledForTestSession = debugEnabledForTestSession; }
/// <summary> /// Initializes a new instance of the <see cref="TestRunCriteria"/> class. /// </summary> /// /// <param name="tests">Tests which should be executed.</param> /// <param name="frequencyOfRunStatsChangeEvent">Frequency of run stats event.</param> /// <param name="keepAlive"> /// Whether or not to keep the test executor process alive after run completion. /// </param> /// <param name="testSettings">Settings used for this run.</param> /// <param name="runStatsChangeEventTimeout"> /// Timeout that triggers sending results regardless of cache size. /// </param> /// <param name="testHostLauncher"> /// Test host launcher. If null then default will be used. /// </param> /// <param name="testSessionInfo">The test session info object.</param> /// <param name="debugEnabledForTestSession"> /// Indicates if debugging should be enabled when we have test session info available. /// </param> public TestRunCriteria( IEnumerable <TestCase> tests, long frequencyOfRunStatsChangeEvent, bool keepAlive, string testSettings, TimeSpan runStatsChangeEventTimeout, ITestHostLauncher testHostLauncher, TestSessionInfo testSessionInfo, bool debugEnabledForTestSession) : base( frequencyOfRunStatsChangeEvent, keepAlive, testSettings, runStatsChangeEventTimeout, testHostLauncher) { var testCases = tests as IList <TestCase> ?? tests.ToList(); ValidateArg.NotNullOrEmpty(testCases, nameof(tests)); this.Tests = testCases; this.TestSessionInfo = testSessionInfo; this.DebugEnabledForTestSession = debugEnabledForTestSession; }