public MasterTestRunner(IServiceLocator services, TestPackage package) { if (services == null) { throw new ArgumentNullException("services"); } if (package == null) { throw new ArgumentNullException("package"); } _services = services; TestPackage = package; // Get references to the services we use _projectService = _services.GetService <IProjectService>(); _testRunnerFactory = _services.GetService <ITestRunnerFactory>(); #if !NETSTANDARD1_6 && !NETSTANDARD2_0 _runtimeService = _services.GetService <IRuntimeFrameworkService>(); #endif #if !NETSTANDARD1_6 _extensionService = _services.GetService <ExtensionService>(); #endif // Last chance to catch invalid settings in package, // in case the client runner missed them. ValidatePackageSettings(); }
public MasterTestRunner(IServiceLocator services, TestPackage package) { if (services == null) { throw new ArgumentNullException("services"); } if (package == null) { throw new ArgumentNullException("package"); } _services = services; TestPackage = package; // Get references to the services we use _projectService = _services.GetService <IProjectService>(); _testRunnerFactory = _services.GetService <ITestRunnerFactory>(); _packageAnalyzer = _services.GetService <TestPackageAnalyzer>(); _runtimeService = _services.GetService <IRuntimeFrameworkService>(); _eventDispatcher = _services.GetService <TestEventDispatcher>(); // Last chance to catch invalid settings in package, // in case the client runner missed them. _packageAnalyzer.ValidatePackageSettings(package); }
public MasterTestRunner(IServiceLocator services, TestPackage package) { if (services == null) { throw new ArgumentNullException("services"); } if (package == null) { throw new ArgumentNullException("package"); } _services = services; TestPackage = package; // Get references to the services we use _projectService = _services.GetService <IProjectService>(); #if !NETSTANDARD1_6 && !NETSTANDARD2_0 _runtimeService = _services.GetService <IRuntimeFrameworkService>(); #endif #if !NETSTANDARD1_6 _extensionService = _services.GetService <ExtensionService>(); #endif _engineRunner = _services.GetService <ITestRunnerFactory>().MakeTestRunner(package); InitializePackage(); }
public void StartService() { try { // TestAgency requires on the RuntimeFrameworkService. _runtimeService = ServiceContext.GetService <IRuntimeFrameworkService>(); // Any object returned from ServiceContext is an IService if (_runtimeService != null && ((IService)_runtimeService).Status == ServiceStatus.Started) { try { Start(); Status = ServiceStatus.Started; } catch { Status = ServiceStatus.Error; throw; } } else { Status = ServiceStatus.Error; } } catch { Status = ServiceStatus.Error; throw; } }
public override void StartService() { _projectService = ServiceContext.GetService <IProjectService>(); _testFrameworkService = ServiceContext.GetService <ITestFrameworkService>(); _runtimeService = ServiceContext.GetService <IRuntimeFrameworkService>(); if (_projectService == null || _testFrameworkService == null || _runtimeService == null) { Status = ServiceStatus.Error; } }
public MasterTestRunner(IServiceLocator services, TestPackage package) { _services = services; TestPackage = package; _testRunnerFactory = _services.GetService <ITestRunnerFactory>(); _projectService = _services.GetService <IProjectService>(); _runtimeService = _services.GetService <IRuntimeFrameworkService>(); _extensionService = _services.GetService <ExtensionService>(); _engineRunner = _testRunnerFactory.MakeTestRunner(package); }
public MasterTestRunner(IServiceLocator services, TestPackage package) { _services = services; TestPackage = package; _testRunnerFactory = _services.GetService<ITestRunnerFactory>(); _projectService = _services.GetService<IProjectService>(); _runtimeService = _services.GetService<IRuntimeFrameworkService>(); _extensionService = _services.GetService<ExtensionService>(); _engineRunner = _testRunnerFactory.MakeTestRunner(package); }
public void Initialize() { // Validation doesn't look at the files specified, only settings _package = new TestPackage("any.dll"); _runtimeService = Substitute.For <IRuntimeFrameworkService>(); _runtimeService.IsAvailable("net-2.0").Returns(true); _runtimeService.IsAvailable("net-4.0").Returns(true); _runtimeService.IsAvailable("net-4.5").Returns(true); _runtimeService.IsAvailable(CURRENT_RUNTIME).Returns(true); _runtimeService.IsAvailable("netcore-3.0").Returns(true); // Not actually available yet, but used to test _validator = new TestPackageValidator(_runtimeService); }
public MasterTestRunner(IServiceLocator services, TestPackage package) { if (services == null) { throw new ArgumentNullException("services"); } if (package == null) { throw new ArgumentNullException("package"); } _services = services; TestPackage = package; _projectService = _services.GetService <IProjectService>(); _runtimeService = _services.GetService <IRuntimeFrameworkService>(); _extensionService = _services.GetService <ExtensionService>(); _engineRunner = _services.GetService <ITestRunnerFactory>().MakeTestRunner(package); LoadPackage(); }
public void StartService() { _runtimeService = ServiceContext.GetService <IRuntimeFrameworkService>(); if (_runtimeService == null) { Status = ServiceStatus.Error; } else { try { Start(); Status = ServiceStatus.Started; } catch { Status = ServiceStatus.Error; throw; } } }
public void StartService() { _runtimeService = ServiceContext.GetService <IRuntimeFrameworkService>(); _extensionService = ServiceContext.GetService <ExtensionService>(); if (_runtimeService == null) { Status = ServiceStatus.Error; } else { try { // Add plugable agents first, so they can override the builtins if (_extensionService != null) { foreach (IAgentLauncher launcher in _extensionService.GetExtensions <IAgentLauncher>()) { _launchers.Add(launcher); } } //_launchers.Add(new Net20AgentLauncher()); _launchers.Add(new Net40AgentLauncher()); _launchers.Add(new NetCore21AgentLauncher()); _launchers.Add(new NetCore31AgentLauncher()); _launchers.Add(new Net50AgentLauncher()); _remotingTransport.Start(); _tcpTransport.Start(); Status = ServiceStatus.Started; } catch { Status = ServiceStatus.Error; throw; } } }
public void StartService() { try { // TestAgency requires on the RuntimeFrameworkService. _runtimeService = ServiceContext.GetService<IRuntimeFrameworkService>(); // Any object returned from ServiceContext is an IService if (_runtimeService != null && ((IService)_runtimeService).Status == ServiceStatus.Started) { try { Start(); Status = ServiceStatus.Started; } catch { Status = ServiceStatus.Error; throw; } } else { Status = ServiceStatus.Error; } } catch { Status = ServiceStatus.Error; throw; } }
public MasterTestRunner(IServiceLocator services, TestPackage package) : base(services, package) { _runtimeService = Services.GetService <IRuntimeFrameworkService>(); _extensionService = Services.GetService <ExtensionService>(); }
public TestPackageValidator(IRuntimeFrameworkService runtimeService) { _runtimeService = runtimeService; }
public MasterTestRunner(IServiceLocator services, TestPackage package) : base(services, package) { _runtimeService = Services.GetService<IRuntimeFrameworkService>(); _extensionService = Services.GetService<ExtensionService>(); }