/// <summary> /// Load a TestPackage for possible execution /// </summary> /// <returns>A TestEngineResult.</returns> protected override TestEngineResult LoadPackage() { log.Info("Loading " + TestPackage.Name); Unload(); try { if (_agent == null) { _agent = _agency.GetAgent(TestPackage, 30000); if (_agent == null) { throw new Exception("Unable to acquire remote process agent"); } } if (_remoteRunner == null) { _remoteRunner = _agent.CreateRunner(TestPackage); } return(_remoteRunner.Load()); } catch (Exception) { // TODO: Check if this is really needed // Clean up if the load failed Unload(); throw; } }
private void CreateAgentAndRunnerIfNeeded() { if (_agent == null) { _agent = _agency.GetAgent(TestPackage); if (_agent == null) { throw new NUnitEngineException("Unable to acquire remote process agent"); } } if (_remoteRunner == null) { _remoteRunner = _agent.CreateRunner(TestPackage); } }
private void CreateAgentAndRunner() { if (_agent == null) { // Increase the timeout to give time to attach a debugger bool debug = TestPackage.GetSetting(EnginePackageSettings.DebugAgent, false) || TestPackage.GetSetting(EnginePackageSettings.PauseBeforeRun, false); _agent = _agency.GetAgent(TestPackage, debug ? DEBUG_TIMEOUT : NORMAL_TIMEOUT); if (_agent == null) { throw new NUnitEngineException("Unable to acquire remote process agent"); } } if (_remoteRunner == null) { _remoteRunner = _agent.CreateRunner(TestPackage); } }
private void CreateAgentAndRunner(bool enableDebug, string agentArgs) { if (_agent == null) { _agent = Services.TestAgency.GetAgent( RuntimeFramework, 30000, enableDebug, agentArgs); if (_agent == null) { throw new Exception("Unable to acquire remote process agent"); } } if (_remoteRunner == null) { _remoteRunner = _agent.CreateRunner(TestPackage); } }
/// <summary> /// Load a TestPackage for possible execution /// </summary> /// <returns>A TestEngineResult.</returns> protected override TestEngineResult LoadPackage() { log.Info("Loading " + TestPackage.Name); Unload(); try { if (_agent == null) { // Increase the timeout to give time to attach a debugger bool debug = TestPackage.GetSetting(EnginePackageSettings.DebugAgent, false) || TestPackage.GetSetting(EnginePackageSettings.PauseBeforeRun, false); _agent = _agency.GetAgent(TestPackage, debug ? DEBUG_TIMEOUT : NORMAL_TIMEOUT); if (_agent == null) { throw new Exception("Unable to acquire remote process agent"); } } if (_remoteRunner == null) { _remoteRunner = _agent.CreateRunner(TestPackage); } return(_remoteRunner.Load()); } catch (Exception) { // TODO: Check if this is really needed // Clean up if the load failed Unload(); throw; } }
public ITestEngineRunner CreateRunner(TestPackage package) { return(_remoteAgent.CreateRunner(package)); }