public TestRunResults[] RunTests(TestRunInfo[] runInfos, Action <AutoTest.TestRunners.Shared.Targeting.Platform, Version, Action <ProcessStartInfo, bool> > processWrapper, Func <bool> abortWhen) { var options = generateOptions(runInfos); if (options == null) { return new TestRunResults[] { } } ; AutoTestRunnerFeedback feedback = null; if (_handleRunnerFeedback) { feedback = new AutoTestRunnerFeedback(_runCache, _bus, options); } var runner = new TestRunProcess(feedback) .WrapTestProcessWith(processWrapper) .AbortWhen(abortWhen); if (_configuration.RunAssembliesInParallel) { runner.RunParallel(); } if (_configuration.TestRunnerCompatibilityMode) { runner.RunInCompatibilityMode(); } var tests = runner.ProcessTestRuns(options); return(getResults(tests, runInfos).ToArray()); }
static void Main(string[] args) { var runner = new TestRunProcess(new RunnerFeedback()); runner .WrapTestProcessWith(profilerWrapper) .ProcessTestRuns(getRunOptions()); //Console.ReadLine(); }
public TestRunResults[] RunTests(TestRunInfo[] runInfos, Action <AutoTest.TestRunners.Shared.Targeting.Platform, Action <ProcessStartInfo> > processWrapper, Func <bool> abortWhen) { var options = generateOptions(runInfos); if (options == null) { return new TestRunResults[] { } } ; var runner = new TestRunProcess(new AutoTestRunnerFeedback(_runCache, _bus, options)) .WrapTestProcessWith(processWrapper) .AbortWhen(abortWhen); var tests = runner.ProcessTestRuns(options); return(getResults(tests, runInfos).ToArray()); }
protected void ExecuteTestRunner() { var runner = new TestRunProcess(new RunnerFeedback()); runner .WrapTestProcessWith(ProfilerWrapper) .ProcessTestRuns(GetRunOptions()); var reader = new BinaryReader(_stream); reader.BaseStream.Position = 0; while (reader.BaseStream.Position < reader.BaseStream.Length) { var key = reader.ReadByte(); switch (key) { case 1: reader.ReadUInt32(); reader.ReadDouble(); reader.ReadInt32(); reader.ReadUInt64(); var info = new ResultsInfo(); info.RuntimeData = Encoding.Unicode.GetString(reader.ReadBytes(reader.ReadInt32() * 2)); info.MetaData = Encoding.Unicode.GetString(reader.ReadBytes(reader.ReadInt32() * 2)); ResultsInfos.Add(info); break; case 2: reader.ReadUInt32(); reader.ReadDouble(); reader.ReadInt32(); reader.ReadUInt64(); break; case 3: reader.ReadUInt32(); reader.ReadDouble(); reader.ReadInt32(); reader.ReadUInt64(); break; default: Assert.Fail("Validation failed {0} {1}", key, reader.BaseStream.Position); return; } } }