private void GenerateTestOutput(XmlNode testResults, string assemblyPath)
        {
            if (!Settings.UseTestOutputXml)
            {
                return;
            }

            string path          = Path.Combine(TestOutputXmlFolder, $"{Path.GetFileNameWithoutExtension(assemblyPath)}.xml");
            var    resultService = NUnitEngineAdapter.GetService <IResultService>();

            // Following null argument should work for nunit3 format. Empty array is OK as well.
            // If you decide to handle other formats in the runsettings, it needs more work.
            var resultWriter = resultService.GetResultWriter("nunit3", null);

            resultWriter.WriteResultFile(testResults, path);
            TestLog.Info($"   Test results written to {path}");
        }
Exemplo n.º 2
0
 private NUnitTestFilterBuilder CreateTestFilterBuilder()
 {
     return(new (NUnitEngineAdapter.GetService <ITestFilterService>(), Settings));
 }