示例#1
0
        public bool RunFromProject(Project project, bool debug, TestRunnerTool? runnerTool = null)
        {
            var testRunnerGateway = testRunnerGatewayProvider.GetTestRunnerGateway(runnerTool);
            if (testRunnerGateway == null)
                return false;

            return testRunnerGateway.RunFeatures(project, debug);
        }
示例#2
0
 public OptionsPageGeneral()
 {
     EnableAnalysis        = IntegrationOptionsProvider.EnableAnalysisDefaultValue;
     EnableSyntaxColoring  = IntegrationOptionsProvider.EnableSyntaxColoringDefaultValue;
     EnableOutlining       = IntegrationOptionsProvider.EnableOutliningDefaultValue;
     EnableIntelliSense    = IntegrationOptionsProvider.EnableIntelliSenseDefaultValue;
     EnableTableAutoFormat = IntegrationOptionsProvider.EnableTableAutoFormatDefaultValue;
     EnableTracing         = IntegrationOptionsProvider.EnableTracingDefaultValue;
     TracingCategories     = IntegrationOptionsProvider.TracingCategoriesDefaultValue;
     TestRunnerTool        = IntegrationOptionsProvider.TestRunnerToolDefaultValue;
 }
示例#3
0
 public OptionsPageGeneral()
 {
     EnableAnalysis          = IntegrationOptionsProvider.EnableAnalysisDefaultValue;
     EnableSyntaxColoring    = IntegrationOptionsProvider.EnableSyntaxColoringDefaultValue;
     EnableOutlining         = IntegrationOptionsProvider.EnableOutliningDefaultValue;
     EnableIntelliSense      = IntegrationOptionsProvider.EnableIntelliSenseDefaultValue;
     EnableTableAutoFormat   = IntegrationOptionsProvider.EnableTableAutoFormatDefaultValue;
     EnableStepMatchColoring = IntegrationOptionsProvider.EnableStepMatchColoringDefaultValue;
     EnableTracing           = IntegrationOptionsProvider.EnableTracingDefaultValue;
     TracingCategories       = IntegrationOptionsProvider.TracingCategoriesDefaultValue;
     TestRunnerTool          = IntegrationOptionsProvider.TestRunnerToolDefaultValue;
     DisableRegenerateFeatureFilePopupOnConfigChange = IntegrationOptionsProvider.DisableRegenerateFeatureFilePopupOnConfigChangeDefaultValue;
 }
示例#4
0
        public ITestRunnerGateway GetTestRunnerGateway()
        {
            TestRunnerTool testRunnerTool = integrationOptionsProvider.GetOptions().TestRunnerTool;

            try
            {
                return(container.Resolve <ITestRunnerGateway>(testRunnerTool.ToString()));
            }
            catch (Exception ex)
            {
                tracer.Trace("Unable to resolve test runner gateway: " + ex, GetType().Name);
                return(null);
            }
        }
        public ITestRunnerGateway GetTestRunnerGateway(TestRunnerTool? runnerTool = null)
        {
            TestRunnerTool testRunnerTool = runnerTool ?? integrationOptionsProvider.GetOptions().TestRunnerTool;

            try
            {
                return container.Resolve<ITestRunnerGateway>(testRunnerTool.ToString());
            }
            catch (Exception ex)
            {
                tracer.Trace("Unable to resolve test runner gateway: " + ex, GetType().Name);
                return null;
            }
        }
示例#6
0
        public bool RunFromEditor(GherkinLanguageService languageService, bool debug, TestRunnerTool? runnerTool = null)
        {
            if (dte.ActiveDocument == null || dte.ActiveDocument.ProjectItem == null)
                return false;

            IGherkinFileScope fileScope;
            var currentScenario = GetCurrentScenario(languageService, dte.ActiveDocument, out fileScope);
            if (currentScenario == null)
            {
                // run for the entire file
                return RunFromProjectItem(dte.ActiveDocument.ProjectItem, debug, runnerTool);
            }

            var testRunnerGateway = testRunnerGatewayProvider.GetTestRunnerGateway(runnerTool);
            if (testRunnerGateway == null)
                return false;

            return testRunnerGateway.RunScenario(dte.ActiveDocument.ProjectItem, currentScenario, fileScope, debug);
        }
示例#7
0
        public bool RunFromEditor(GherkinLanguageService languageService, bool debug, TestRunnerTool? runnerTool = null)
        {
            if (dte.ActiveDocument == null || dte.ActiveDocument.ProjectItem == null)
                return false;

            IGherkinFileScope fileScope;
            int currentLine = GetCurrentLine(dte.ActiveDocument);
            var currentScenario = GetCurrentScenario(languageService, currentLine, out fileScope);
            if (currentScenario == null)
            {
                // run for the entire file
                return RunFromProjectItem(dte.ActiveDocument.ProjectItem, debug, runnerTool);
            }

            //TODO: select the scenario outline example, if it was invoked from that line

            var testRunnerGateway = testRunnerGatewayProvider.GetTestRunnerGateway(runnerTool);
            if (testRunnerGateway == null)
                return false;

            return testRunnerGateway.RunScenario(dte.ActiveDocument.ProjectItem, currentScenario, fileScope, debug);
        }
        public bool RunFromEditor(GherkinLanguageService languageService, bool debug, TestRunnerTool? runnerTool = null)
        {
            if (dte.ActiveDocument == null || dte.ActiveDocument.ProjectItem == null)
                return false;

            IGherkinFileScope fileScope;
            int currentLine = GetCurrentLine(dte.ActiveDocument);
            var currentScenario = GetCurrentScenario(languageService, currentLine, out fileScope);
            if (currentScenario == null)
            {
                // run for the entire file
                return RunFromProjectItem(dte.ActiveDocument.ProjectItem, debug, runnerTool);
            }

            var currentScenatioOutline = currentScenario as IScenarioOutlineBlock;
            var examplesRow = currentScenatioOutline == null ? null : currentScenatioOutline.GetExamplesRowFromPosition(currentLine);

            var testRunnerGateway = testRunnerGatewayProvider.GetTestRunnerGateway(runnerTool);
            if (testRunnerGateway == null)
                return false;

            return testRunnerGateway.RunScenario(dte.ActiveDocument.ProjectItem, currentScenario, examplesRow, fileScope, debug);
        }
 public OptionsPageGeneral()
 {
     EnableAnalysis = IntegrationOptionsProvider.EnableAnalysisDefaultValue;
     EnableSyntaxColoring = IntegrationOptionsProvider.EnableSyntaxColoringDefaultValue;
     EnableOutlining = IntegrationOptionsProvider.EnableOutliningDefaultValue;
     EnableIntelliSense = IntegrationOptionsProvider.EnableIntelliSenseDefaultValue;
     EnableTableAutoFormat = IntegrationOptionsProvider.EnableTableAutoFormatDefaultValue;
     EnableTracing = IntegrationOptionsProvider.EnableTracingDefaultValue;
     TracingCategories = IntegrationOptionsProvider.TracingCategoriesDefaultValue;
     TestRunnerTool = IntegrationOptionsProvider.TestRunnerToolDefaultValue;
 }
 public bool InvokeFromEditor(GherkinEditorContext editorContext, TestRunnerTool? runnerTool)
 {
     return testRunnerEngine.RunFromEditor(editorContext.LanguageService, false, runnerTool);
 }
示例#11
0
 public bool DebugScenarios(TestRunnerTool? runnerTool = null)
 {
     var engine = container.Resolve<ITestRunnerEngine>();
     return engine.RunFromEditor(languageService, true, runnerTool);
 }
 public OptionsPageGeneral()
 {
     EnableAnalysis = IntegrationOptionsProvider.EnableAnalysisDefaultValue;
     EnableSyntaxColoring = IntegrationOptionsProvider.EnableSyntaxColoringDefaultValue;
     EnableOutlining = IntegrationOptionsProvider.EnableOutliningDefaultValue;
     EnableIntelliSense = IntegrationOptionsProvider.EnableIntelliSenseDefaultValue;
     EnableTableAutoFormat = IntegrationOptionsProvider.EnableTableAutoFormatDefaultValue;
     EnableStepMatchColoring = IntegrationOptionsProvider.EnableStepMatchColoringDefaultValue;
     EnableTracing = IntegrationOptionsProvider.EnableTracingDefaultValue;
     TracingCategories = IntegrationOptionsProvider.TracingCategoriesDefaultValue;
     TestRunnerTool = IntegrationOptionsProvider.TestRunnerToolDefaultValue;
     DisableRegenerateFeatureFilePopupOnConfigChange = IntegrationOptionsProvider.DisableRegenerateFeatureFilePopupOnConfigChangeDefaultValue;
 }
示例#13
0
 protected SpecRunGatewayLoader(TestRunnerTool tool) : base(tool)
 {
 }
 protected AutoTestRunnerGatewayLoader(TestRunnerTool tool)
 {
     this.tool = tool;
 }
 protected AutoTestRunnerGatewayLoader(TestRunnerTool tool)
 {
     this.tool = tool;
 }
 protected SpecRunGatewayLoader(TestRunnerTool tool) : base(tool)
 {
 }