예제 #1
0
        // TODO pass canceler to proxyableExecutor

        int RunOperationRemotely(string description,
                                 IExecutionOperation executionOperation, string binaryPath, IOutputLogger logger)
        {
            logger.Info(String.Format("Executing {0} tests in binary '{1}'", description, binaryPath));

            int count = remoteRunner.Run(binaryPath, executionOperation.Run, (ex, path) =>
            {
                // report problem and return for the next assembly, without crashing the test execution process
                var message = String.Format("Exception thrown while executing tests in binary '{0}'", path);
                logger.Error(ex, message);

                return(0);
            });

            logger.Info(String.Format("Executed {0} tests in binary '{1}'", count, binaryPath));

            return(count);
        }
예제 #2
0
        IEnumerable <DiscoveredExample> RunOperationRemotely(
            IDiscoveryOperation discoveryOperation, string binaryPath, IOutputLogger logger)
        {
            logger.Info(String.Format("Discovering tests in binary '{0}'", binaryPath));

            IEnumerable <DiscoveredExample> discoveredExamples = remoteRunner.Run(binaryPath, discoveryOperation.Run,
                                                                                  (ex, path) =>
            {
                // report problem and return for the next assembly, without crashing the test discovery process
                var message = String.Format("Exception thrown while discovering tests in binary '{0}'", binaryPath);
                logger.Error(ex, message);

                return(new DiscoveredExample[0]);
            });

            logger.Info(String.Format("Found {0} tests in binary '{1}'", discoveredExamples.Count(), binaryPath));

            return(discoveredExamples);
        }