public static void Report(XDocument doc, IUnitTestLaunch launch, IEnumerable <Element> elements) { var testCases = Parse(doc); if (testCases == null) { return; } foreach (var element in elements.Flatten(x => x.Children.OfType <Element>()).OfType <JasmineSpecificationElement>()) { var key = element.Id; if (!testCases.ContainsKey(key)) { continue; } var testCase = testCases[key]; var task = element.RemoteTask; if (testCase.Duration != null) { launch.TaskDuration(task, testCase.Duration.Value); } launch.TaskFinished(task, testCase.Error, testCase.TaskResult); } }
public IRuntimeEnvironment GetRuntimeEnvironment(IUnitTestLaunch launch, IProject project, TargetFrameworkId targetFrameworkId, IUnitTestElement element) { var targetPlatform = TargetPlatformCalculator.GetTargetPlatform(launch, project, targetFrameworkId); return(new UnityRuntimeEnvironment(targetPlatform)); }
public override IList <UnitTestTask> GetTaskSequence(ICollection <IUnitTestElement> explicitElements, IUnitTestLaunch launch) { return(RemoteTask.IfNotNull(x => new List <UnitTestTask> { new UnitTestTask(this, x) })); }
public RuntimeEnvironment GetRuntimeEnvironment( IUnitTestElement element, RuntimeEnvironment projectRuntimeEnvironment, TargetPlatform targetPlatform, IUnitTestLaunch launch) { return new RuntimeEnvironment { PlatformType = PlatformType.x86, PlatformVersion = PlatformVersion.v4_0 }; }
public override ITaskRunnerHostController CreateHostController(IUnitTestLaunch launch) { var innerHostController = base.CreateHostController(launch); return(new UnityTaskRunnerHostController(innerHostController, launch.Solution.GetComponent <IShellLocks>(), launch.Solution.GetComponent <IUnityController>())); }
private static void CreateSilverlightSequence(IList <UnitTestTask> sequence, IUnitTestLaunch launch, UnitTestManager manager, IProject silverlightProject) { var silverlightRun = launch.GetOrCreateSilverlightRun(silverlightProject.PlatformID); sequence.AddSilverlightUnitTestTask(silverlightProject, manager); sequence.RemoveAssemblyLoadTasks(); silverlightRun.AddTaskSequence(sequence); }
private static void CreateSilverlightSequence(IList<UnitTestTask> sequence, IUnitTestLaunch launch, UnitTestManager manager, IProject silverlightProject) { var silverlightRun = launch.GetOrCreateSilverlightRun(silverlightProject.PlatformID); sequence.AddSilverlightUnitTestTask(silverlightProject, manager); sequence.RemoveAssemblyLoadTasks(); silverlightRun.AddTaskSequence(sequence); }
public static void RemoveEmptyRuns(this IUnitTestLaunch launch) { var runs = launch.GetRuns(); var emptyRuns = runs.Values.Where(run => !run.GetSequences().Any()).ToArray(); foreach (var run in emptyRuns) { runs.Remove(run.ID); } }
public static RemoteTaskRunnerInfo GetTaskRunnerInfo(IUnitTestLaunch launch) { var runnerType = Assembly.LoadFrom(GetRunnerCodeBase()).GetType(RunnerTypeName); var additionalPaths = launch.Runs.SelectMany(r => r.GetAllTasks()) .Select(t => t.Task.GetType().Assembly).Distinct() .Where(a => !a.FullName.StartsWith("JetBrains")) .Select(a => Path.GetDirectoryName(new Uri(a.CodeBase, UriKind.RelativeOrAbsolute).LocalPath)) .ToArray(); return new RemoteTaskRunnerInfo(RunnerId, runnerType, additionalPaths); }
public void Run( Lifetime lifetime, ITaskRunnerHostController runController, IUnitTestRun run, IUnitTestLaunch launch, Action continuation) { launch.EnsureSilverlightPlatformSupport(ref run, this.provider, runController); this.strategy = new OutOfProcessUnitTestRunStrategy(SilverlightUnitTestProvider.GetTaskRunnerInfo(launch)); this.strategy.Run(lifetime, runController, run, launch, continuation); }
public static RemoteTaskRunnerInfo GetTaskRunnerInfo(IUnitTestLaunch launch) { var runnerType = Assembly.LoadFrom(GetRunnerCodeBase()).GetType(RunnerTypeName); var additionalPaths = launch.Runs.SelectMany(r => r.GetAllTasks()) .Select(t => t.Task.GetType().Assembly).Distinct() .Where(a => !a.FullName.StartsWith("JetBrains")) .Select(a => Path.GetDirectoryName(new Uri(a.CodeBase, UriKind.RelativeOrAbsolute).LocalPath)) .ToArray(); return(new RemoteTaskRunnerInfo(RunnerId, runnerType, additionalPaths)); }
private static void ConvertToSilverlightSequenceIfNecessary(IList<UnitTestTask> sequence, UnitTestRun run, IUnitTestLaunch launch, UnitTestManager manager) { if (!sequence.IsSilverlightSequence()) { var requiredSilverlightPlatform = sequence.GetRequiredSilverlightPlatform(); if (requiredSilverlightPlatform != null) { run.GetSequences().Remove(sequence); CreateSilverlightSequence(sequence, launch, manager, requiredSilverlightPlatform); } } }
public void Run(Lifetime lifetime, ITaskRunnerHostController runController, IUnitTestRun run, IUnitTestLaunch launch, Action continuation) { foreach (var project in run.Elements.OfType<Element>().GroupBy(x => x.ProjectFolder)) { var projectFolder = project.Key; foreach (var set in project.GroupBy(x => x.IsE2E)) { KarmaTestRunner.Run(launch, projectFolder, set, set.Key); } } launch.Finished(); }
private static void ConvertToSilverlightSequenceIfNecessary(IList<UnitTestTask> sequence, UnitTestRun run, IUnitTestLaunch launch, UnitTestManager manager) { if (!sequence.IsSilverlightSequence()) { var silverlightProject = sequence.GetSilverlightProject(); if (silverlightProject != null) { run.GetSequences().Remove(sequence); CreateSilverlightSequence(sequence, launch, manager, silverlightProject); } } }
private void SubscribeToLaunchState(Lifetime launchLifetime, IUnitTestSession session, IUnitTestLaunch unitTestLaunch) { var aborted = false; unitTestLaunch.Status.Change.Advise( launchLifetime, args => { if (args.HasNew) { switch (args.New) { case UnitTestLaunchStatus.Building: case UnitTestLaunchStatus.Starting: case UnitTestLaunchStatus.Running: aborted = false; break; case UnitTestLaunchStatus.Stopping: // This will happen if the build failed. if (session.Launch.Value == null) { break; } // These need to be declared here because session.Launch.Value is null by // the time the Dispatcher executes the action. var relevantTestElements = session.Launch.Value.Elements.Where(e => !e.Children.Any()); var launchTime = session.Launch.Value.StartedOn; _threading.Dispatcher.BeginOrInvoke( "KaVE::TestStopping", () => { ReadLockCookie.GuardedExecute( () => { var results = _resultManager.GetResults(relevantTestElements, session); CreateAndFireTestRunEvent(launchTime, aborted, results); }); }); break; case UnitTestLaunchStatus.Aborting: aborted = true; break; } } }); }
public static void EnsureSilverlightPlatformSupport(this IUnitTestLaunch launch, UnitTestProviders providers, ITaskRunnerHostController hostController) { var runs = launch.GetRuns(); foreach (var run in runs.Values.Select(r => r.Value).ToArray()) { foreach (var sequence in run.GetRootTasks().ToArray()) { ConvertToSilverlightSequenceIfNecessary(sequence, run, launch, providers, hostController); } } launch.RemoveEmptyRuns(); }
public static void EnsureSilverlightPlatformSupport(this IUnitTestLaunch launch, UnitTestManager manager) { var runs = launch.GetRuns(); foreach (var run in runs.Values.ToArray()) { foreach (var sequence in run.GetSequences().ToArray()) { ConvertToSilverlightSequenceIfNecessary(sequence, run, launch, manager); } } launch.RemoveEmptyRuns(); }
public override IList <UnitTestTask> GetTaskSequence(ICollection <IUnitTestElement> explicitElements, IUnitTestLaunch launch) { var project = GetProject(); if (project == null) { return(null); } return(new List <UnitTestTask> { new UnitTestTask(this, new TestTask(ShortName, ProjectFolder, true)) }); }
public static UnitTestRun GetOrCreateSilverlightRun(this IUnitTestLaunch launch, PlatformID silverlightPlatform) { var runs = launch.GetRuns(); var silverlightRun = runs.Values.FirstOrDefault(run => run.GetSilverlightPlatformVersion() == silverlightPlatform.Version); if (silverlightRun == null) { var runtimeEnvironment = new RuntimeEnvironment { PlatformType = PlatformType.x86, PlatformVersion = PlatformVersion.v4_0 }; silverlightRun = new UnitTestRun((UnitTestLaunch)launch, runtimeEnvironment); runs.Add(silverlightRun.ID, silverlightRun); } return(silverlightRun); }
public static void Report(XDocument doc, IUnitTestLaunch launch, IEnumerable<Element> elements) { var testCases = Parse(doc); if (testCases == null) return; foreach (var element in elements.Flatten(x => x.Children.OfType<Element>()).OfType<JasmineSpecificationElement>()) { var key = element.Id; if (!testCases.ContainsKey(key)) continue; var testCase = testCases[key]; var task = element.RemoteTask; if (testCase.Duration != null) { launch.TaskDuration(task, testCase.Duration.Value); } launch.TaskFinished(task, testCase.Error, testCase.TaskResult); } }
private static void ConvertToSilverlightSequenceIfNecessary(RemoteTaskPacket sequence, ref IUnitTestRun run, IUnitTestLaunch launch, IUnitTestProvider provider, ITaskRunnerHostController hostController) { if (!sequence.IsSilverlightSequence()) { var silverlightProject = sequence.GetSilverlightProject(run); if (silverlightProject != null) { var silverlightRun = launch.GetOrCreateSilverlightRun(silverlightProject.PlatformID, provider, hostController); var silverlightElement = new SilverlightUnitTestElement(new UnitTestElementId(provider, run.Elements.First().Id.PersistentProjectId, Guid.NewGuid().ToString()), silverlightRun.Key.RunStrategy); var remoteTask = new SilverlightUnitTestTask(silverlightProject.PlatformID.Version, silverlightProject.GetXapPath(), silverlightProject.GetDllPath()); var silverlightSequence = new RemoteTaskPacket(remoteTask) { TaskPackets = { sequence } }; run.GetRootTasks().Remove(sequence); silverlightRun.Value.AddTaskSequence(silverlightSequence, silverlightElement, run); run = silverlightRun.Value; } } }
public static void Run(IUnitTestLaunch launch, string projectFolder, IEnumerable<Element> elements, bool isE2E) { Action job = () => { var elementList = elements.ToList(); var testFiles = (from e in elementList.Flatten(x => x.Children.OfType<Element>()) let pf = e.GetProjectFile() where pf != null select pf.Location.FullPath) .Distinct(StringComparer.CurrentCultureIgnoreCase); var confFile = KarmaConfig.Build(projectFolder, testFiles, isE2E); if (!StartKarma(projectFolder, confFile)) return; // notify task server var doc = LoadResults(projectFolder, isE2E); JUnitReporter.Report(doc, launch, elementList); }; job.BeginInvoke(null, null); }
private static void ConvertToSilverlightSequenceIfNecessary(RemoteTaskPacket sequence, IUnitTestRun run, IUnitTestLaunch launch, UnitTestProviders providers, ITaskRunnerHostController hostController) { if (!sequence.IsSilverlightSequence()) { var silverlightProject = sequence.GetSilverlightProject(run); if (silverlightProject != null) { var silverlightRun = launch.GetOrCreateSilverlightRun(silverlightProject.PlatformID, providers, hostController); var provider = providers.GetProvider(SilverlightUnitTestProvider.RunnerId); var silverlightElement = new SilverlightUnitTestElement(provider, silverlightRun.Key.RunStrategy); var remoteTask = new SilverlightUnitTestTask(silverlightProject.PlatformID.Version, silverlightProject.GetXapPath(), silverlightProject.GetDllPath()); var silverlightSequence = new RemoteTaskPacket(remoteTask) { TaskPackets = { sequence } }; run.GetRootTasks().Remove(sequence); silverlightRun.Value.AddTaskSequence(silverlightSequence, silverlightElement, run); } } }
protected void Execute(UnitTestSessionTestImpl session, List<IList<UnitTestTask>> sequences, Lifetime lt, TextWriter output, IUnitTestLaunch launch) { var msgListener = Solution.GetComponent<TestRemoteChannelMessageListener>(); msgListener.Output = output; session.Sequences = sequences; msgListener.Run = session; msgListener.Strategy = new OutOfProcessUnitTestRunStrategy(GetRemoteTaskRunnerInfo()); var runController = CreateTaskRunnerHostController(Solution.GetComponent<IUnitTestLaunchManager>(), Solution.GetComponent<IUnitTestResultManager>(), Solution.GetComponent<IUnitTestAgentManager>(), launch, Solution.GetComponent<IUnitTestSessionManager>(), GetServerPortNumber()); msgListener.RunController = runController; var finished = new AutoResetEvent(false); session.OnFinish(() => { var channel = GetRemoteChannel(); if (channel != null) channel.OnFinish(() => finished.Set()); else finished.Set(); }); session.Run(lt, runController, msgListener.Strategy); finished.WaitOne(30000); }
public static void Run(IUnitTestLaunch launch, string projectFolder, IEnumerable <Element> elements, bool isE2E) { Action job = () => { var elementList = elements.ToList(); var testFiles = (from e in elementList.Flatten(x => x.Children.OfType <Element>()) let pf = e.GetProjectFile() where pf != null select pf.Location.FullPath) .Distinct(StringComparer.CurrentCultureIgnoreCase); var confFile = KarmaConfig.Build(projectFolder, testFiles, isE2E); if (!StartKarma(projectFolder, confFile)) { return; } // notify task server var doc = LoadResults(projectFolder, isE2E); JUnitReporter.Report(doc, launch, elementList); }; job.BeginInvoke(null, null); }
public IList<UnitTestTask> GetTaskSequence(ICollection<IUnitTestElement> explicitElements, IUnitTestLaunch launch) { if (this is ContextSpecificationElement) { var contextSpecification = this as ContextSpecificationElement; var context = contextSpecification.Context; return new List<UnitTestTask> { _taskFactory.CreateRunAssemblyTask(context), _taskFactory.CreateContextTask(context), _taskFactory.CreateContextSpecificationTask(context, contextSpecification) }; } if (this is BehaviorSpecificationElement) { var behaviorSpecification = this as BehaviorSpecificationElement; var behavior = behaviorSpecification.Behavior; var context = behavior.Context; return new List<UnitTestTask> { _taskFactory.CreateRunAssemblyTask(context), _taskFactory.CreateContextTask(context), _taskFactory.CreateBehaviorSpecificationTask(context, behaviorSpecification) }; } if (this is ContextElement || this is BehaviorElement) { return EmptyArray<UnitTestTask>.Instance; } throw new ArgumentException(String.Format("Element is not a Machine.Specifications element: '{0}'", this)); }
public ExtendedDebugTaskRunnerHostController(IUnitTestSessionManager sessionManager, util::JetBrains.Util.Lazy.Lazy <IVsDebugger2> debugger2, DTE dte, IThreading threading, IUnitTestLaunch launch, string remotingAddress) : base(sessionManager, debugger2, dte, threading, launch, remotingAddress) { }
public static Dictionary <string, UnitTestRun> GetRuns(this IUnitTestLaunch launch) { return(launch.GetField <Dictionary <string, UnitTestRun> >("myRuns")); }
private IList<XElement> ExecuteWithCapture(UnitTestSessionTestImpl session, List<IList<UnitTestTask>> sequences, Lifetime lt, IUnitTestLaunch launch) { using (var output = new StringWriter()) { Execute(session, sequences, lt, output, launch); var messages = output.ToString(); System.Console.WriteLine(messages); return CaptureMessages(messages); } }
public IList <UnitTestTask> GetTaskSequence(ICollection <IUnitTestElement> explicitElements, IUnitTestLaunch launch) { return(new List <UnitTestTask>()); }
public RuntimeEnvironment GetRuntimeEnvironment(IUnitTestElement element, RuntimeEnvironment projectRuntimeEnvironment, IUnitTestLaunch launch) { return(RuntimeEnvironment.Automatic); }
protected override ITaskRunnerHostController CreateWrappedHostController(ISolution solution, IUnitTestLaunchManager launchManager, IUnitTestAgentManager agentManager, IUnitTestLaunch launch) { return(new ExtendedDebugTaskRunnerHostController(launchManager, agentManager, debugger2, dte, threading, launch, solution.GetComponent <UnitTestServer>().PortNumber)); }
public IList<UnitTestTask> GetTaskSequence(ICollection<IUnitTestElement> explicitElements, IUnitTestLaunch launch) { throw new InvalidOperationException("Test from abstract fixture is not runnable itself"); }
public IList<UnitTestTask> GetTaskSequence(ICollection<IUnitTestElement> explicitElements, IUnitTestLaunch launch) { return GetTaskSequence(explicitElements); }
protected virtual ITaskRunnerHostController CreateWrappedHostController(UnitTestManager manager, UnitTestSessionManager sessionManager, IUnitTestLaunch launch, string remotingAddress) { return(WrappedHostProvider.CreateHostController(manager, sessionManager, launch, remotingAddress)); }
public ITaskRunnerHostController CreateHostController(UnitTestManager manager, UnitTestSessionManager sessionManager, IUnitTestLaunch launch, string remotingAddress) { launch.EnsureSilverlightPlatformSupport(manager); return(CreateWrappedHostController(manager, sessionManager, launch, remotingAddress)); }
protected ITaskRunnerHostController CreateTaskRunnerHostController(IUnitTestLaunchManager launchManager, IUnitTestResultManager resultManager, IUnitTestAgentManager agentManager, IUnitTestLaunch launch, IUnitTestSessionManager sessionManager, int port) { return new ProcessTaskRunnerHostController(port, sessionManager, launchManager, resultManager, agentManager, launch, Logger.GetLogger(typeof(UnitTestTaskRunnerTestBase))); }
public IList <UnitTestTask> GetTaskSequence(ICollection <IUnitTestElement> explicitElements, IUnitTestLaunch launch) { if (this is ContextSpecificationElement) { var contextSpecification = this as ContextSpecificationElement; var context = contextSpecification.Context; return(new List <UnitTestTask> { _taskFactory.CreateRunAssemblyTask(context), _taskFactory.CreateContextTask(context), _taskFactory.CreateContextSpecificationTask(context, contextSpecification) }); } if (this is BehaviorSpecificationElement) { var behaviorSpecification = this as BehaviorSpecificationElement; var behavior = behaviorSpecification.Behavior; var context = behavior.Context; return(new List <UnitTestTask> { _taskFactory.CreateRunAssemblyTask(context), _taskFactory.CreateContextTask(context), _taskFactory.CreateBehaviorSpecificationTask(context, behaviorSpecification) }); } if (this is ContextElement || this is BehaviorElement) { return(EmptyArray <UnitTestTask> .Instance); } throw new ArgumentException(String.Format("Element is not a Machine.Specifications element: '{0}'", this)); }
public IList<UnitTestTask> GetTaskSequence(ICollection<IUnitTestElement> explicitElements, IUnitTestLaunch launch) { return new List<UnitTestTask> { new UnitTestTask(this, new RunMethodTask(MethodRunnerProvider.Id, myClassName, myMethodName, myIsClassStatic, myIsMethodStatic)) }; }
protected abstract void Execute(IProjectFile projectFile, UnitTestSessionTestImpl session, List <IList <UnitTestTask> > sequences, Lifetime lt, IUnitTestLaunch launch);
public ExtendedDebugTaskRunnerHostController(ILogger logger, IUnitTestLaunchManager launchManager, IUnitTestResultManager resultManager, IUnitTestAgentManager agentManager, IVsDebuggerFacade debuggerFacade, DTE dte, IUnitTestLaunch launch, int portNumber) : base(logger, launchManager, resultManager, agentManager, debuggerFacade, dte, launch, portNumber) { }
protected void Execute(UnitTestSessionTestImpl session, List <IList <UnitTestTask> > sequences, Lifetime lt, TextWriter output, IUnitTestLaunch launch) { var msgListener = Solution.GetComponent <TestRemoteChannelMessageListener>(); msgListener.Output = output; session.Sequences = sequences; msgListener.Run = session; msgListener.Strategy = new OutOfProcessUnitTestRunStrategy(GetRemoteTaskRunnerInfo()); var runController = CreateTaskRunnerHostController(Solution.GetComponent <IUnitTestLaunchManager>(), Solution.GetComponent <IUnitTestResultManager>(), Solution.GetComponent <IUnitTestAgentManager>(), launch, Solution.GetComponent <IUnitTestSessionManager>(), GetServerPortNumber()); msgListener.RunController = runController; var finished = new AutoResetEvent(false); session.OnFinish(() => { var channel = GetRemoteChannel(); if (channel != null) { channel.OnFinish(() => finished.Set()); } else { finished.Set(); } }); session.Run(lt, runController, msgListener.Strategy); finished.WaitOne(30000); }
public void Run(Lifetime lifetime, ITaskRunnerHostController runController, IUnitTestRun run, IUnitTestLaunch launch, Action continuation) { foreach (var project in run.Elements.OfType <Element>().GroupBy(x => x.ProjectFolder)) { var projectFolder = project.Key; foreach (var set in project.GroupBy(x => x.IsE2E)) { KarmaTestRunner.Run(launch, projectFolder, set, set.Key); } } launch.Finished(); }
public string GetRunConfigurationFilename(IUnitTestLaunch launch) { return this.wrappedServices.GetRunConfigurationFilename(launch); }
public ExtendedDebugTaskRunnerHostController(IUnitTestLaunchManager launchManager, IUnitTestAgentManager agentManager, util::JetBrains.Util.Lazy.Lazy<IVsDebugger2> debugger2, DTE dte, IThreading threading, IUnitTestLaunch launch, int port) : base(launchManager, agentManager, debugger2, dte, threading, launch, port) { this.port = port; }
protected ITaskRunnerHostController CreateTaskRunnerHostController(IUnitTestLaunchManager launchManager, IUnitTestResultManager resultManager, IUnitTestAgentManager agentManager, IUnitTestLaunch launch, IUnitTestSessionManager sessionManager, int port) { return(new ProcessTaskRunnerHostController(port, sessionManager, launchManager, resultManager, agentManager, launch, Logger.GetLogger(typeof(UnitTestTaskRunnerTestBase)))); }
protected override void Execute(IProjectFile projectFile, UnitTestSessionTestImpl session, List<IList<UnitTestTask>> sequences, Lifetime lt, IUnitTestLaunch launch) { execute(projectFile, session, sequences, lt, launch); }
public RuntimeEnvironment GetRuntimeEnvironment(IUnitTestElement element, RuntimeEnvironment projectRuntimeEnvironment, IUnitTestLaunch launch) { return RuntimeEnvironment.Automatic; }
public ExtendedDebugTaskRunnerHostController(UnitTestManager manager, UnitTestSessionManager sessionManager, util::JetBrains.Util.Lazy.Lazy<IVsDebugger2> debugger2, DTE dte, IThreading threading, IUnitTestLaunch launch, string remotingAddress) : base(manager, sessionManager, debugger2, dte, threading, launch, remotingAddress) { }
public ITaskRunnerHostController CreateHostController(ISolution solution, IUnitTestSessionManager sessionManager, IUnitTestLaunch launch, string remotingAddress) { var providers = solution.GetComponent <UnitTestProviders>(); launch.EnsureSilverlightPlatformSupport(providers); return(CreateWrappedHostController(solution, sessionManager, launch, remotingAddress)); }
public override IList<UnitTestTask> GetTaskSequence(ICollection<IUnitTestElement> explicitElements, IUnitTestLaunch launch) { if (TestClass == null) return new List<UnitTestTask>(); var sequence = TestClass.GetTaskSequence(explicitElements, launch); sequence.Add(new UnitTestTask(this, new TestMethodTask(TestClass.AssemblyLocation, TestClass.TypeName.FullName, ShortName, IsParameterized))); return sequence; }
protected abstract void Execute(IProjectFile projectFile, UnitTestSessionTestImpl session, List<IList<UnitTestTask>> sequences, Lifetime lt, IUnitTestLaunch launch);
public override IList <UnitTestTask> GetTaskSequence(ICollection <IUnitTestElement> explicitElements, IUnitTestLaunch launch) { return(new List <UnitTestTask> { new UnitTestTask(null, new XunitTestAssemblyTask(AssemblyLocation)), new UnitTestTask(this, new XunitTestClassTask(AssemblyLocation, TypeName.FullName, explicitElements.Contains(this))) }); }
public override IList <UnitTestTask> GetTaskSequence(ICollection <IUnitTestElement> explicitElements, IUnitTestLaunch launch) { var sequence = TestClass.GetTaskSequence(explicitElements, launch); sequence.Add(new UnitTestTask(this, new XunitTestMethodTask(TestClass.AssemblyLocation, TestClass.TypeName.FullName, ShortName, explicitElements.Contains(this), IsDynamic))); return(sequence); }
public IList<UnitTestTask> GetTaskSequence(ICollection<IUnitTestElement> explicitElements, IUnitTestLaunch unitTestLaunch)
private void ExecuteWithGold(IProjectFile projectFile, UnitTestSessionTestImpl session, List<IList<UnitTestTask>> sequences, Lifetime lt, IUnitTestLaunch launch) { ExecuteWithGold(projectFile.Location.FullPath, output => { using (var stringWriter = new StringWriter()) { Execute(session, sequences, lt, stringWriter, launch); // ReSharper 8.2 uses CDATA, but ReSharper 9.0 doesn't. Normalise by removing var text = stringWriter.ToString(); text = text.Replace("<![CDATA[", string.Empty).Replace("]]>", string.Empty); output.Write(text); } }); }
public override IList<UnitTestTask> GetTaskSequence(ICollection<IUnitTestElement> explicitElements, IUnitTestLaunch launch) { var sequence = Parent.GetTaskSequence(explicitElements, launch); sequence.Add(new UnitTestTask(this, new TestCaseTask(ShortName, ((BaseElement)Parent).AssemblyLocation))); return sequence; }
public IList<UnitTestTask> GetTaskSequence(ICollection<IUnitTestElement> explicitElements, IUnitTestLaunch launch) { return new List<UnitTestTask> { new UnitTestTask(this, new RunMethodTask(MethodRunnerProvider.Id, ((IProject)myProjectEnvoy.GetValidProjectElement()).GetOutputFilePath().FullPath, myClassName.FullName, myMethodName, myIsClassStatic, myIsMethodStatic)) }; }
public abstract IList <UnitTestTask> GetTaskSequence(ICollection <IUnitTestElement> explicitElements, IUnitTestLaunch launch);
protected override ITaskRunnerHostController CreateWrappedHostController(ISolution solution, IUnitTestSessionManager sessionManager, IUnitTestLaunch launch, string remotingAddress) { return(new ExtendedDebugTaskRunnerHostController(sessionManager, debugger2, dte, threading, launch, remotingAddress)); }