Пример #1
0
        private async Task RunTestAsync(string path, string testName)
        {
            var commandRunner = new ConsoleCommandsRunner();

            string command   = "CMD.exe";
            string arguments = string.Format(@"/C nunit3-console.exe {0} --test={1} -result {2}\{1}.xml;format=nunit2 --labels=All", path, testName, nUnitTestResultsStorePath);

            await commandRunner.RunProcessAsync(command, arguments);
        }
Пример #2
0
        private async Task RunTestAsync(string testName, string path)
        {
            var commandRunner = new ConsoleCommandsRunner();

            string command = "CMD.exe";
            //string arguments = String.Format("/C dotnet test {0} --no-build --filter DisplayName~{1} --logger \"trx;LogFileName={1}\"", path, testName);
            string arguments = String.Format("/C dotnet test {0} --no-build --filter Name={1} --logger \"trx;LogFileName={1}\"", path, testName);

            await commandRunner.RunProcessAsync(command, arguments);
        }
Пример #3
0
        private async Task RunTestAsync(string testName, string dllPath)
        {
            var commandRunner = new ConsoleCommandsRunner();
            var logPath       = Path.Combine(new FileInfo(dllPath).DirectoryName, "TestResults", testName + ".trx");

            string command   = "CMD.exe";
            string arguments = String.Format("/C dotnet vstest {0} --Tests:\"{1}\" --logger:\"trx;LogFileName={2}\"", dllPath, testName, logPath);

            await commandRunner.RunProcessAsync(command, arguments);
        }