private async Task WriteResult(ResultSummary testResult)
        {
            using (var tcpWriter = new TcpWriter(Options.TcpWriterParameters))
            {
                await tcpWriter.Connect().ConfigureAwait(false);

                tcpWriter.Write(testResult.GetTestXml());
            }
        }
示例#2
0
        void WriteXmlResultFile(ResultSummary result)
        {
            var outputFolderName = Path.GetDirectoryName(Options.ResultFilePath);

            Directory.CreateDirectory(outputFolderName);
            var xml = result.GetTestXml().ToString();

            File.WriteAllText(Options.ResultFilePath, xml);
        }
示例#3
0
        async Task WriteXmlResultFile(ResultSummary result)
        {
            string outputFolderName = Path.GetDirectoryName(Options.ResultFilePath);

            Directory.CreateDirectory(outputFolderName);

            using (var resultFileStream = new StreamWriter(Options.ResultFilePath, false))
            {
                var xml = result.GetTestXml().ToString();
                await resultFileStream.WriteAsync(xml);
            }
        }
示例#4
0
        async Task WriteXmlResultFile(ResultSummary result)
        {
            string outputFolderName    = Path.GetDirectoryName(Options.ResultFilePath);
            string outputXmlReportName = Path.GetFileName(Options.ResultFilePath);

            await CreateFolderRecursive(outputFolderName);

            IFolder outputFolder =
                await FileSystem.Current.GetFolderFromPathAsync(outputFolderName, CancellationToken.None);

            IFile xmlResultFile =
                await outputFolder.CreateFileAsync(outputXmlReportName, CreationCollisionOption.ReplaceExisting);

            using (var resultFileStream = new StreamWriter(await xmlResultFile.OpenAsync(FileAccess.ReadAndWrite)))
            {
                var xml = result.GetTestXml().ToString();
                await resultFileStream.WriteAsync(xml);
            }
        }