예제 #1
0
 public bool Equals(TestExecutionRequest other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other._test, _test) && other.TimeoutInSeconds == TimeoutInSeconds &&
            other.BreakOnExceptions.Equals(BreakOnExceptions) && other.BreakOnWrongs.Equals(BreakOnWrongs);
 }
예제 #2
0
 public TestResult RunTest(TestExecutionRequest request)
 {
     lock (_locker)
     {
         return(_proxy.RunTest(request));
     }
 }
예제 #3
0
        public void RunTest(Test test)
        {
            _latch.WaitOne(30000);

            try
            {
                // This shouldn't happen, but of course it does, so we'll
                // help the system recover from blowups
                if (!_domain.HasStarted())
                {
                    performReload();
                }

                lock (_locker)
                {
                    TestExecutionRequest request = GetExecutionRequest(test);
                    var result = _domain.RunTest(request);
                    if (!result.WasCancelled)
                    {
                        test.LastResult = result;
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                test.LastResult = new TestResult {
                    ExceptionText = ex.Message, Counts = new Counts(0, 0, 1, 0)
                };
            }
        }
예제 #4
0
        internal TestRun(TestExecutionRequest request, IFixtureContainerSource fetchContainer, ITestObserver listener,
            FixtureLibrary library, SystemLifecycle lifecycle)
        {
            _request = request;
            _fetchContainer = fetchContainer;
            _listener = listener;
            _library = library;
            _lifecycle = lifecycle;

            _result = new TestResult();
        }
예제 #5
0
        internal TestRun(TestExecutionRequest request, ITestObserver listener, FixtureLibrary library, ISystem system)
        {
            _request = request;
            _listener = listener;
            _library = library;
            _system = system;

            _result = new TestResult
            {
                RetryAttemptNumber = request.Test.RetryAttemptNumber
            };
        }
예제 #6
0
        public TestExecutionRequest GetExecutionRequest(Test test)
        {
            var    request       = new TestExecutionRequest(test, _stopConditions);
            string workspaceName = test.WorkspaceName;

            if (workspaceName.IsNotEmpty())
            {
                request.StartupActions = Project.WorkspaceFor(workspaceName).StartupActions ?? new string[0];
            }

            return(request);
        }
예제 #7
0
 public bool Equals(TestExecutionRequest other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other._test, _test) && other.TimeoutInSeconds == TimeoutInSeconds &&
            other.BreakOnExceptions.Equals(BreakOnExceptions) && other.BreakOnWrongs.Equals(BreakOnWrongs));
 }
예제 #8
0
        public virtual TestResult RunTest(TestExecutionRequest request)
        {
            try
            {
                _currentRun = new TestRun(request, _source, _listener, _library, _lifecycle);

                // Setting the LastResult on the test here is just a convenience
                // for testing

                TestResult result = _currentRun.Execute();
                return result;
            }
            finally
            {
                _currentRun = null;
            }
        }
예제 #9
0
        public TestResult RunTest(TestExecutionRequest request)
        {
            _runner.Listener = _listener ?? new UserInterfaceTestObserver(_publisher, request);

            return _runner.RunTest(request);
        }
예제 #10
0
        public TestResult RunTest(TestExecutionRequest request)
        {
            _runner.Listener = _listener ?? new UserInterfaceTestObserver(_publisher, request);

            return(_runner.RunTest(request));
        }
예제 #11
0
 public TestResult RunTest(TestExecutionRequest request)
 {
     return _proxy.RunTest(request);
 }
예제 #12
0
        public TestResult RunTest(TestExecutionRequest request)
        {
            if (_proxy == null)
            {
                throw new InvalidOperationException("Cannot execute a test unless a project has been loaded");
            }

            lock (_locker)
            {
                return _proxy.RunTest(request);
            }
        }
 public TestResult RunTest(TestExecutionRequest request)
 {
     throw new NotImplementedException();
 }
예제 #14
0
 public UserInterfaceTestObserver(IEventPublisher publisher, TestExecutionRequest request)
 {
     _publisher = publisher;
     _request   = request;
 }
 public UserInterfaceTestObserver(IEventPublisher publisher, TestExecutionRequest request)
 {
     _publisher = publisher;
     _request = request;
 }
예제 #16
0
 public TestResult RunTest(TestExecutionRequest request)
 {
     throw new NotImplementedException();
 }