Esempio n. 1
0
        async Task RunLocal()
        {
            session = TestSession.CreateLocal(this, framework);
            var test = await session.GetRootTestCase(CancellationToken.None);

            Debug("Got test: {0}", test);
            var result = await session.Run(test, CancellationToken.None);

            Debug("Got result: {0}", result);

            Debug("{0} tests, {1} passed, {2} errors, {3} ignored.", countTests, countSuccess, countErrors, countIgnored);

            if (!NoXml)
            {
                var serialized = TestSerializer.WriteTestResult(result);
                var settings   = new XmlWriterSettings();
                settings.Indent = true;
                using (var writer = XmlTextWriter.Create(XmlOutputFileName, settings))
                    serialized.WriteTo(writer);
                Debug("Result writting to {0}.", XmlOutputFileName);
            }
        }