public BinaryExecutionOperation(string binaryPath, IProgressRecorder progressRecorder, ICrossDomainLogger crossDomainLogger) { this.binaryPath = binaryPath; this.progressRecorder = progressRecorder; this.crossDomainLogger = crossDomainLogger; }
public int ExecuteAll(string binaryPath, IProgressRecorder progressRecorder, IOutputLogger logger, ICrossDomainLogger crossDomainLogger) { var executionOperation = new BinaryExecutionOperation(binaryPath, progressRecorder, crossDomainLogger); return(RunOperationRemotely("all", executionOperation, binaryPath, logger)); }
public void Execute( IBinaryTestExecutor binaryTestExecutor, IProgressRecorder progressRecorder, IOutputLogger outputLogger, ICrossDomainLogger crossDomainLogger) { // TODO pass canceler to binaryTestExecutor.Execute binaryTestExecutor.ExecuteAll(BinaryPath, progressRecorder, outputLogger, crossDomainLogger); }
public virtual void before_each() { autoSubstitute = new AutoSubstitute(); progressRecorder = autoSubstitute.Resolve <IProgressRecorder>(); executedExampleMapper = autoSubstitute.Resolve <IExecutedExampleMapper>(); reporter = autoSubstitute.Resolve <ExecutionReporter>(); }
public void Execute( IBinaryTestExecutor binaryTestExecutor, IProgressRecorder progressRecorder, IOutputLogger outputLogger, ICrossDomainLogger crossDomainLogger) { var testCaseFullNames = testCaseGroup.Select(tc => tc.FullyQualifiedName); // TODO pass canceler to binaryTestExecutor.Execute binaryTestExecutor.ExecuteSelected(BinaryPath, testCaseFullNames, progressRecorder, outputLogger, crossDomainLogger); }
public int ExecuteSelected(string binaryPath, IEnumerable <string> testCaseFullNames, IProgressRecorder progressRecorder, IOutputLogger logger, ICrossDomainLogger crossDomainLogger) { string[] exampleFullNames = testCaseFullNames.ToArray(); var executionOperation = new SelectionExecutionOperation(binaryPath, exampleFullNames, progressRecorder, crossDomainLogger); return(RunOperationRemotely("selected", executionOperation, binaryPath, logger)); }
public virtual void before_each() { autoSubstitute = new AutoSubstitute(); proxyableExecutor = Substitute.For <IProxyableTestExecutor>(); remoteRunner = autoSubstitute.SubstituteFor <ICrossDomainRunner <IProxyableTestExecutor, int> >(); progressRecorder = autoSubstitute.Resolve <IProgressRecorder>(); logger = autoSubstitute.Resolve <IOutputLogger>(); crossDomainLogger = autoSubstitute.Resolve <ICrossDomainLogger>(); executor = autoSubstitute.Resolve <BinaryTestExecutor>(); }
public virtual void before_each() { autoSubstitute = new AutoSubstitute(); frameworkHandle = autoSubstitute.Resolve <IFrameworkHandle>(); binaryTestExecutor = autoSubstitute.Resolve <IBinaryTestExecutor>(); progressRecorder = autoSubstitute.Resolve <IProgressRecorder>(); progressRecorderFactory = autoSubstitute.Resolve <IProgressRecorderFactory>(); progressRecorderFactory.Create(frameworkHandle).Returns(progressRecorder); settingsRepository = autoSubstitute.Resolve <ISettingsRepository>(); outputLogger = autoSubstitute.Resolve <IOutputLogger>(); loggerFactory = autoSubstitute.Resolve <ILoggerFactory>(); loggerFactory.CreateOutput(null, null).ReturnsForAnyArgs(outputLogger); actualSources = new List <string>(); progressRecorder.BinaryPath = Arg.Do <string>(path => actualSources.Add(path)); }
int Execute(string binaryPath, string[] exampleFullNames, IProgressRecorder progressRecorder, ICrossDomainLogger logger) { string scenario = (exampleFullNames == RunnableContextFinder.RunAll ? "all" : "selected"); logger.Debug(String.Format("Start executing {0} tests locally in binary '{1}'", scenario, binaryPath)); int count; try { var runnableContextFinder = new RunnableContextFinder(); var runnableContexts = runnableContextFinder.Find(binaryPath, exampleFullNames); var executedExampleMapper = new ExecutedExampleMapper(); var executionReporter = new ExecutionReporter(progressRecorder, executedExampleMapper); var contextExecutor = new ContextExecutor(executionReporter, logger); count = contextExecutor.Execute(runnableContexts); } catch (Exception ex) { // report problem and return, without letting exception cross app domain boundary count = 0; var exInfo = new ExceptionLogInfo(ex); var message = String.Format("Exception thrown while executing tests locally in binary '{0}'", binaryPath); logger.Error(exInfo, message); } logger.Debug(String.Format("Finish executing {0} tests locally in binary '{1}'", count, binaryPath)); return(count); }
public SelectionExecutionOperation(string binaryPath, string[] exampleFullNames, IProgressRecorder progressRecorder, ICrossDomainLogger crossDomainLogger) : base(binaryPath, progressRecorder, crossDomainLogger) { this.exampleFullNames = exampleFullNames; }
public ExecutionReporter(IProgressRecorder progressRecorder, IExecutedExampleMapper executedExampleMapper) { this.progressRecorder = progressRecorder; this.executedExampleMapper = executedExampleMapper; }
public int ExecuteAll(string binaryPath, IProgressRecorder progressRecorder, ICrossDomainLogger logger) { return(Execute(binaryPath, RunnableContextFinder.RunAll, progressRecorder, logger)); }
public int ExecuteSelection(string binaryPath, string[] exampleFullNames, IProgressRecorder progressRecorder, ICrossDomainLogger logger) { return(Execute(binaryPath, exampleFullNames, progressRecorder, logger)); }