public void TestInit() { this.runContext = new TestableRunContextTestExecutionTests(() => new TestableTestCaseFilterExpression((p) => true)); this.frameworkHandle = new TestableFrameworkHandle(); this.cancellationToken = new TestRunCancellationToken(); this.TestExecutionManager = new TestExecutionManager(); }
internal ReadOnlyCollection <TestResult> RunTests(string source, IEnumerable <TestCase> testCases) { var settings = this.GetSettings(true); var testExecutionManager = new TestExecutionManager(); var frameworkHandle = new InternalFrameworkHandle(); testExecutionManager.ExecuteTests(testCases, null, frameworkHandle, false); return(frameworkHandle.GetFlattenedTestResults().ToList().AsReadOnly()); }
public async Task RunTestsAsync(IEnumerable <ITest> selectedTests, TestExecutionOptions options) { CancelRunningTests(); runTestsCancellationTokenSource = new CancellationTokenSource(); // invalidate commands as IsRunningTests changes System.Windows.Input.CommandManager.InvalidateRequerySuggested(); var executionManager = new TestExecutionManager(); try { await executionManager.RunTestsAsync(selectedTests, options, runTestsCancellationTokenSource.Token); } finally { runTestsCancellationTokenSource = null; // invalidate commands as IsRunningTests changes System.Windows.Input.CommandManager.InvalidateRequerySuggested(); } }
public void ProcessRequest(HttpContext context) { context.Response.Clear(); context.Response.ContentType = "text/plain"; string schema = ""; //StringBuilder response = this.GetResponse(); try { // Create and register new channel this.channel_ = new IiopClientChannel(); ChannelServices.RegisterChannel(this.channel_, false); //Accessing the target object provided by TEM service this.tem_ = (TestExecutionManager)RemotingServices.Connect(typeof(TestExecutionManager), "corbaloc:iiop:localhost:50000/OASIS/TEM"); DataAcquisitionController[] dacs = this.tem_.get_DACs(); if (0 < dacs.Length) { foreach (DataAcquisitionController dac in dacs) { if (dac.name == context.Request.QueryString["DacName"]) { schema = dac.get_schema(context.Request.QueryString["ProbeName"], context.Request.QueryString["EinodeName"]); break; } } } } finally { ChannelServices.UnregisterChannel(this.channel_); } context.Response.Write(schema); context.Response.End(); }
public void ProcessRequest(HttpContext context) { Menu menu = new Menu(); context.Response.Clear(); context.Response.ContentType = "text/plain"; //StringBuilder response = this.GetResponse(); try { // Create and register new channel this.channel_ = new IiopClientChannel(); ChannelServices.RegisterChannel(this.channel_, false); //Accessing the target object provided by TEM service this.tem_ = (TestExecutionManager)RemotingServices.Connect(typeof(TestExecutionManager), context.Request.QueryString["temLocation"]); DataAcquisitionController[] dacs = this.tem_.get_DACs(); if (0 < dacs.Length) { menu.Dacs = new List<DAC>(); foreach (DataAcquisitionController dac in dacs) { DAC dac_element = new DAC(); dac_element.Name = dac.name; dac_element.Probes = new List<Probe>(); this.probes_ = dac.get_probe_instances(); if (0 < this.probes_.Length) { foreach (ProbeInstance probe in this.probes_) { Probe probe_element = new Probe(); probe_element.Name = probe.inst_name; probe_element.Einode_Name = probe.einode_name; probe_element.Uuid = probe.inst_uuid; probe_element.Type_Name = probe.inst_type_name; dac_element.Probes.Add(probe_element); } } menu.Dacs.Add(dac_element); } } } finally { ChannelServices.UnregisterChannel(this.channel_); } StringBuilder response = new StringBuilder(); JavaScriptSerializer ser = new JavaScriptSerializer(); ser.Serialize(menu,response); context.Response.Write(response.ToString()); context.Response.End(); }