public TestRunner( IFrameworkHandle frameworkHandle, IRunContext runContext, IEnumerable <TestCase> tests, string codeCoverageFile, PythonProjectSettings settings, VisualStudioProxy app, ManualResetEvent cancelRequested) { _frameworkHandle = frameworkHandle; _context = runContext; _tests = tests.ToArray(); _codeCoverageFile = codeCoverageFile; _settings = settings; _app = app; _cancelRequested = cancelRequested; _dryRun = ExecutorService.IsDryRun(runContext.RunSettings); _showConsole = ExecutorService.ShouldShowConsole(runContext.RunSettings); _env = new Dictionary <string, string>(); _searchPaths = GetSearchPaths(tests, settings); ExecutorService.GetDebugSettings(_app, _context, _settings, out _debugMode, out _debugSecret, out _debugPort); _socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); _socket.Bind(new IPEndPoint(IPAddress.Loopback, 0)); _socket.Listen(0); _socket.BeginAccept(AcceptConnection, _socket); }