Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 public TestResult RunTest(TestExecutionRequest request)
 {
     lock (_locker)
     {
         return(_proxy.RunTest(request));
     }
 }
Ejemplo n.º 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)
                };
            }
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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
            };
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 9
0
        public TestResult RunTest(TestExecutionRequest request)
        {
            _runner.Listener = _listener ?? new UserInterfaceTestObserver(_publisher, request);

            return _runner.RunTest(request);
        }
Ejemplo n.º 10
0
        public TestResult RunTest(TestExecutionRequest request)
        {
            _runner.Listener = _listener ?? new UserInterfaceTestObserver(_publisher, request);

            return(_runner.RunTest(request));
        }
Ejemplo n.º 11
0
 public TestResult RunTest(TestExecutionRequest request)
 {
     return _proxy.RunTest(request);
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 13
0
 public TestResult RunTest(TestExecutionRequest request)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 14
0
 public UserInterfaceTestObserver(IEventPublisher publisher, TestExecutionRequest request)
 {
     _publisher = publisher;
     _request   = request;
 }
 public UserInterfaceTestObserver(IEventPublisher publisher, TestExecutionRequest request)
 {
     _publisher = publisher;
     _request = request;
 }
Ejemplo n.º 16
0
 public TestResult RunTest(TestExecutionRequest request)
 {
     throw new NotImplementedException();
 }