Exemplo n.º 1
0
        public bool RunTests(Project project, string filter, bool debug)
        {
            if (!VsxHelper.Build(project))
            {
                MessageBox.Show("Build failed.",
                                "SpecFlow",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                return(true);
            }

            var consolePath = FindConsolePath(project);

            if (consolePath == null)
            {
                MessageBox.Show("Unable to find SpecRun.exe.",
                                "SpecFlow",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                return(true);
            }

            var args = BuildCommandArgs(new ConsoleOptions
            {
                BaseFolder = VsxHelper.GetProjectFolder(project) + @"\bin\Debug",                                 //TODO
                Target     = VsxHelper.GetProjectAssemblyName(project) + ".dll",
                Filter     = filter
            }, debug);

            ExecuteTests(consolePath, args, debug);
            return(true);
        }