protected override void ProcessRecord() { base.ProcessRecord(); var logger = new CmdletLoggerPS(this, false); try { var generatedFiles = new List <string>(); var solutionRepository = new SolutionRepository(new CrmServiceClient(ConnectionString), logger); var solutionAuditor = new CrmAuditor(solutionRepository, logger); var publishersToInclude = RequiredPublishers.Split(new[] { ";" }, StringSplitOptions.RemoveEmptyEntries).ToList(); var crmInstance = solutionAuditor.AuditCrmInstance(InstanceName, publishersToInclude); logger.Verbose("About to generate HTML report"); var htmlWriter = new HtmlReport(OutputDir); var htmlFiles = htmlWriter.SaveSolutionAudit(crmInstance); generatedFiles.Add(htmlFiles.First(x => x.Contains("Home_"))); logger.Verbose("HTML report completed"); if (GenerateExcelReport) { logger.Verbose("About to generate Excel report"); var excelWriter = new ExcelReport(OutputDir); generatedFiles.AddRange(excelWriter.SaveSolutionAudit(crmInstance)); logger.Verbose("Excel report completed"); } if (GenerateJsonReport) { logger.Verbose("About to generate JSON report"); var jsonWriter = new JsonReport(OutputDir); generatedFiles.AddRange(jsonWriter.SaveSolutionAudit(crmInstance)); logger.Verbose("JSON report completed"); } if (GenerateXmlReport) { logger.Verbose("About to generate XML report"); var xmlWriter = new XmlReport(OutputDir); generatedFiles.AddRange(xmlWriter.SaveSolutionAudit(crmInstance)); logger.Verbose("XML report completed"); } if (!string.IsNullOrWhiteSpace(SendGridKey) && !string.IsNullOrWhiteSpace(ReportsToRecipients)) { SendReportsToRecipients(SendGridKey, ReportsToRecipients, crmInstance.Name.Replace(".dynamics.com", ""), generatedFiles, ReportName); } } catch (Exception exception) { var errorMessage = $"Dynamics365 solution audit failed: {exception.Message}"; logger.Verbose(errorMessage); logger.Error(errorMessage); throw; } }
protected override void Before_all_tests() { base.Before_all_tests(); Func <ResultType, ExceptionInfo, TestCaseResultServerEvent> getResult = (resultType, exceptionInfo) => { return(new TestCaseResultServerEvent(resultType) { ClassName = "class_name", MethodName = "method_name", NamespaceName = "namespace.here", Finished = new DateTime(2009, 2, 2, 2, 2, 2), Started = new DateTime(2009, 2, 2, 2, 2, 1), ExceptionInfo = exceptionInfo, }); }; var testReport = new TestReport("Test.xap") .AddResult(getResult(ResultType.Passed, null)) .AddResult(getResult(ResultType.Failed, new ExceptionInfo(GetException()))) .AddResult(getResult(ResultType.Ignored, null)) .AddResult(getResult(ResultType.SystemGeneratedFailure, new ExceptionInfo(new Exception("fail")))) ; _xmlReport = new XmlReport(testReport.ToTestReportCollection()); }
public void ConvertEmptyClassResult() { var classResult = new ClassResult("XmlReport", new MethodResult[] {}); var actual = XmlReport.ConvertResult(classResult); Assert.AreEqual(@"<class name=""XmlReport"" />", actual.ToString()); }
static void Main(string[] args) { var _logger = new ConsoleLogger(); var repository = new SolutionRepository(new CrmServiceClient(CrmConnectionString), _logger); var solutionAuditor = new CrmAuditor(repository, _logger); var publisherFilter = new List <string> { "Dynamics 365" }; var crmInstance = solutionAuditor.AuditCrmInstance(InstanceName, publisherFilter); var excelReport = new ExcelReport(_downloadsPath); excelReport.SaveSolutionAudit(crmInstance); var xmlReport = new XmlReport(_downloadsPath); xmlReport.SaveSolutionAudit(crmInstance); var htmlReport = new HtmlReport(_downloadsPath); htmlReport.SaveSolutionAudit(crmInstance); var jsonReport = new JsonReport(_downloadsPath); jsonReport.SaveSolutionAudit(crmInstance); }
void GenerateReports(ReportResult reportResult, string reportTypes) { Ensure.ArgumentIsNotNull(reportResult, "reportResult"); if (BuildEnvironment.IsTeamCityBuild) { TeamCityReportGenerator.RenderReport(reportResult, this); } if (String.IsNullOrEmpty(reportTypes)) { return; } Log(Level.Info, "Generating reports"); foreach (string reportType in reportTypes.Split(';')) { string reportFileName = null; Log(Level.Verbose, "Report type: {0}", reportType); switch (reportType.ToLower()) { case "text": reportFileName = TextReport.RenderToText(reportResult, ReportDirectory, ReportFileNameFormat); break; case "xml": reportFileName = XmlReport.RenderToXml(reportResult, ReportDirectory, ReportFileNameFormat); break; case "html": reportFileName = HtmlReport.RenderToHtml(reportResult, ReportDirectory, ReportFileNameFormat); break; case "dox": reportFileName = DoxReport.RenderToDox(reportResult, ReportDirectory, ReportFileNameFormat); break; case "transform": if (Transform == null) { throw new BuildException(String.Format("No transform specified for report type '{0}'", reportType)); } reportFileName = HtmlReport.RenderToHtml(reportResult, ReportDirectory, Transform.FullName, TransformReportFileNameFormat); break; default: Log(Level.Error, "Unknown report type {0}", reportType); break; } if (reportFileName != null) { Log(Level.Info, "Created report at {0}", reportFileName); } } }
protected override Task <int> Execute() { XmlReport.Execute(_coverageLoadedFileOption.Result, _nCoverOutputOption.Value, _thresholdOption.Value); var result = CalcUtils.IsHigherThanThreshold(_coverageLoadedFileOption.Result, _thresholdOption.Value); return(Task.FromResult(result)); }
private void WriteTestReport() { XmlReport xmlReport = new XmlReport(); //Open XML Report xmlReport.OpenReport(dut.SerailNumber, System.Windows.Forms.Application.StartupPath + @"\test results\", "IDD StandBy"); xmlReport.WriteSingleData("Serial_Number", dut.SerailNumber); xmlReport.WriteSingleData("Test_Station", "IDD StandBy"); xmlReport.WriteSingleData("Error_Code", string.Format("{0:X} ", dut.ErrorCode)); string time = System.DateTime.Now.ToString("u", System.Globalization.DateTimeFormatInfo.InvariantInfo); xmlReport.WriteSingleData("Test_Time", time); xmlReport.WriteSingleData("IDD_Sleep1_Value", dut.IDDValue_Sleep.ToString()); xmlReport.WriteSingleData("IDD_Deep_Sleep_Value", dut.IDDValue_DeepSleep.ToString()); //Close XML Report xmlReport.CloseReport(); }
public static void Main() { Database.SetInitializer(new MigrateDatabaseToLatestVersion <ConfluxDbContext, Configuration>()); var db = new ConfluxDbContext(); JSON.SaveFile(db); var carPrices = db.Cars .Select(c => new { c.Model, c.Make, c.Price }) .ToList(); PDFReporter.CreateReport(carPrices, "../../PDF-Reports/car-price.pdf", "Car prices report"); Console.WriteLine("Car prices report created."); var carPricesInRange = db.Cars .Where(c => c.Price > 15000 && c.Price < 25000) .ToList(); PDFReporter.CreateReport(carPricesInRange, "../../PDF-Reports/car-price-between-15000-and-25000.pdf", "Car prices between 15000 and 25000"); Console.WriteLine("Car prices between 15000 and 25000 report created."); XmlReport xlmReport = new XmlReport(); bool success = xlmReport.GenerateXmlReport("../../xmlReport.xml"); Console.WriteLine("XML Report created at: '../ConfluxApplication/xmlReport.xml'"); db.Dispose(); }
public void ConvertEmptyMetricResult() { var metricResult = new MetricResult("Cyclomatic Complexity", new ClassResult[] { }); var actual = XmlReport.ConvertResult(metricResult); Assert.AreEqual(@"<metric name=""Cyclomatic Complexity"" />", actual.ToString()); }
public void ConvertSimpleMethodResult() { var methodResult = new MethodResult("ConvertResult", 12, true); var actual = XmlReport.ConvertResult(methodResult); Assert.AreEqual(@"<method name=""ConvertResult"" pass=""true"" result=""12"" />", actual.ToString()); }
private static void WriteXmlReport(TestReportCollection testReports, string xmlReportOutputPath, XmlReportType xmlReportType) { if (!string.IsNullOrEmpty(xmlReportOutputPath)) { IXmlReport xmlReport = null; switch (xmlReportType) { case XmlReportType.TFS: xmlReport = new Core.Reporting.Providers.TFS.TFS2010.XmlReport(testReports); break; case XmlReportType.StatLight: xmlReport = new XmlReport(testReports); break; default: throw new StatLightException("Unknown XmlReportType chosen Name=[{0}], Value=[{1}]".FormatWith(xmlReportType.ToString(), (int)xmlReportType)); } xmlReport.WriteXmlReport(xmlReportOutputPath); "*********************************" .WrapConsoleMessageWithColor(Settings.Default.ConsoleColorInformatoin, true); "Wrote XML report to:{0}{1}" .FormatWith(Environment.NewLine, new FileInfo(xmlReportOutputPath).FullName) .WrapConsoleMessageWithColor(Settings.Default.ConsoleColorWarning, true); "*********************************" .WrapConsoleMessageWithColor(Settings.Default.ConsoleColorInformatoin, true); } }
protected override Task <int> Execute() { XmlReport.Execute(CoverageLoadedFileOption.GetValue(), NCoverOutputOption.GetValue(), ThresholdOption.GetValue()); var result = CalcUtils.IsHigherThanThreshold(CoverageLoadedFileOption.GetValue(), ThresholdOption.GetValue()); return(Task.FromResult(result)); }
public void CreateReport(string filePath = null, string fileName = null) { var report = new XmlReport(); var inputData = report.FuelSpent(); var pdfGenerator = new XmlGenerator(filePath, fileName); pdfGenerator.Generate(inputData); }
private static void Main() { Report pdfReport = new PdfReport(); pdfReport.Generate(); Report xmlReport = new XmlReport(); xmlReport.Generate(); }
//****************************************// // Test Record // //****************************************// /// <summary> /// Write Test Log; /// Write test log of each DUT in seprated file; /// Single txt file with file name is the serial number; /// </summary> public void TestLog() { foreach (DUT dut in m_DUTArray) { //TestLog testlog = new TestLog(); //testlog.Write(dut, System.Windows.Forms.Application.StartupPath + @"\test results\"); XmlReport xmlReport = new XmlReport(); xmlReport.writeReport(dut, System.Windows.Forms.Application.StartupPath + @"\test results\", "TPT"); } }
// // CONSTRUCTOR // public TabbedDocumentXmlReport() { InitializeComponent(); // Load Schema Report this._xmlReport = new XmlReport(); this._xmlReport.Invalidated += new EventHandler <EventArgs>(this.Report_Invalidated); // Tab Properties this.Text = "Xml Report"; this.TabImage = Resources.BITMAP_XML_REPORT; }
public ITypedReport <TModel> ValidateFeedXml <TModel>(ITypedXmlValidatorDataProvider <string, TModel> provider) { var report = new XmlReport <TModel>(provider); RequiredProperties <TModel>() .ForEach(field => { var attribute = FieldAttribute <ValidationColumnAttribute>(field); var context = new XmlValidationContext(field, attribute, provider, report) as TContext; ExecutePipe(attribute.ValidatePipeline)(context); }); return(report); }
public void GenerateXmlReport() { // create report string outputPath = XmlReport.RenderToXml(this.TestDomains.GetReport()); try { System.Diagnostics.Process.Start(outputPath); } catch (Win32Exception) { MessageBox.Show("An error has occurred while trying to load the default xml viewer. Please ensure the viewer is setup correctly.", "Viewer loading error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void GenerateNoResults() { // arrange var writer = new MemoryFileWriter(); const string filePath = "<memory>"; var report = new XmlReport(writer, filePath); // act report.Generate(new MetricResult[] { }); // assert Assert.AreEqual("<metrics />", writer.Contents); Assert.AreEqual(filePath, writer.FilePath); }
public void ReportToXml(bool display) { if (this.result == null) { AddLog("Result is a null reference. Make sure tests were executed succesfully"); return; } AddLog("Generating XML report"); string output = XmlReport.RenderToXml(this.result, "", GetReportName()); if (display) { System.Diagnostics.Process.Start(output); } }
public IReport ResolveReport(ReportType reportType, string reportName) { var fileWriter = new FileWriter(); IReport report = null; if (reportType == ReportType.Failing) report = new HtmlFailedReport(fileWriter, reportName); else if (reportType == ReportType.TopTen) report = new HtmlTopTenReport(fileWriter, reportName); else if (reportName.EndsWith (".xml")) report = new XmlReport (fileWriter, reportName); else report = new HtmlReport(fileWriter,reportName); return report; }
public void Should_pass_the_schema_validation() { var file = Path.GetTempFileName(); using (TextWriter tw = new StreamWriter(file)) { tw.Write(_xmlReport.GetXmlReport()); } IList <string> errors; if (!XmlReport.ValidateSchema(file, out errors)) { var msg = string.Join(Environment.NewLine, errors.ToArray()); Assert.Fail(msg); } }
private void RenderReport(string reportType) { this.Log.LogMessage("Render report {0}", reportType); string outputFileName = null; switch (reportType.ToLower()) { case "text": outputFileName = TextReport.RenderToText( result, this.ReportOutputDirectory, this.ReportFileNameFormat ); break; case "html": outputFileName = HtmlReport.RenderToHtml( result, this.ReportOutputDirectory, this.ReportFileNameFormat); break; case "xml": outputFileName = XmlReport.RenderToXml( result, this.ReportOutputDirectory, this.ReportFileNameFormat); break; case "dox": outputFileName = DoxReport.RenderToDox( result, this.ReportOutputDirectory, this.ReportFileNameFormat); break; default: this.Log.LogError("Report type {0} not recognized.", reportType); return; } this.Log.LogMessage("Generated {0} report at {1}", reportType, outputFileName); }
public void WriteDocument(IEnumerable <Order> orders, Stream stream) { var xmlReport = new XmlReport { XmlOrders = orders.Select(o => new XmlOrder { OrderId = o.OrderId, CustomerId = o.CustomerId, OrderDate = o.OrderDate, ContactName = o?.Customer.ContactName }) .ToList() }; var serializer = new XmlSerializer(typeof(XmlReport)); serializer.Serialize(stream, xmlReport); }
public void GenerateSampleMetricResult() { var instance = new XmlReport(new MemoryFileWriter(), null); var sampleMetricResult = new MetricResultBuilder().CreateMetricResult(); instance.Generate(sampleMetricResult); AssertAreEqual(@" <metrics> <metric name=""Test Metric""> <class name=""Test Class 1""> <method name=""Test Method1"" pass=""false"" result=""12"" /> <method name=""Test Method2"" pass=""true"" result=""5"" /> </class> <class name=""Test Class 1""> <method name=""Test Method1"" pass=""false"" result=""12"" /> <method name=""Test Method2"" pass=""true"" result=""5"" /> </class> </metric> </metrics>", instance); }
private void GenerateReports() { if (result == null) { throw new InvalidOperationException("Report object is a null reference."); } this.Log(Level.Info, "Generating reports"); foreach (string reportType in this.ReportTypes.Split(';')) { string reportName = null; this.Log(Level.Verbose, "Report type: {0}", reportType); switch (reportType.ToLower()) { case "text": reportName = TextReport.RenderToText(result, this.ReportOutputDirectory, this.ReportFileNameFormat); break; case "xml": reportName = XmlReport.RenderToXml(result, this.ReportOutputDirectory, this.ReportFileNameFormat); break; case "html": reportName = HtmlReport.RenderToHtml(result, this.ReportOutputDirectory, this.ReportFileNameFormat); break; case "dox": reportName = DoxReport.RenderToDox(result, this.ReportOutputDirectory, this.ReportFileNameFormat); break; default: this.Log(Level.Error, "Unknown report type {0}", reportType); break; } if (reportName != null) { this.Log(Level.Info, "Created report at {0}", reportName); } } }
public void Render(MbUnit task, ReportResult result) { string nameFormat = "mbunit-{0}{1}"; string outputPath = ""; if (this.fileNameFormat.Length != 0) { nameFormat = fileNameFormat; } if (this.OutputDirectory.Length != 0) { outputPath = OutputDirectory; } string outputFileName = null; switch (this.Type) { case FormatterType.Text: outputFileName = TextReport.RenderToText(result, outputPath, nameFormat); break; case FormatterType.Html: outputFileName = HtmlReport.RenderToHtml(result, outputPath, nameFormat); break; case FormatterType.Xml: outputFileName = XmlReport.RenderToXml(result, outputPath, nameFormat); break; case FormatterType.Dox: outputFileName = DoxReport.RenderToDox(result, outputPath, nameFormat); break; } task.Log.LogMessage("Generated {0} report at {1}", this.Type, outputFileName); }
private void GenerateReport(MainArguments parsedArgs, ReportResult result) { result.UpdateCounts(); if (parsedArgs.ReportTypes != null && parsedArgs.ReportTypes.Length > 0) { parsedArgs.ReportFolder = ReportBase.GetAppDataPath(parsedArgs.ReportFolder); consoleOut.WriteLine("[info] Creating reports in {0}", Path.GetFullPath(parsedArgs.ReportFolder)); foreach (ReportType rt in parsedArgs.ReportTypes) { string outputPath = null; switch (rt) { case ReportType.Xml: outputPath = XmlReport.RenderToXml(result, parsedArgs.ReportFolder, parsedArgs.Transform, parsedArgs.ReportNameFormat); consoleOut.WriteLine("[info] Created xml report {0}", outputPath); break; case ReportType.Html: outputPath = HtmlReport.RenderToHtml(result, parsedArgs.ReportFolder, parsedArgs.Transform, parsedArgs.ReportNameFormat); consoleOut.WriteLine("[info] Created Html report {0}", outputPath); break; case ReportType.Text: outputPath = TextReport.RenderToText(result, parsedArgs.ReportFolder, parsedArgs.Transform, parsedArgs.ReportNameFormat); consoleOut.WriteLine("[info] Created Text report {0}", outputPath); break; case ReportType.Dox: outputPath = DoxReport.RenderToDox(result, parsedArgs.ReportFolder, parsedArgs.ReportNameFormat); consoleOut.WriteLine("[info] Created Dox report {0}", outputPath); break; } if (parsedArgs.ShowReports && File.Exists(outputPath)) { System.Diagnostics.Process.Start(outputPath); } } } }
static void Main(string[] args) { //// only the first time // FromMySqlNeverAgain(); Database.SetInitializer(new MigrateDatabaseToLatestVersion <SupermarketContext, Configuration>()); /// run separately or it will be slow :) //Zipper.UnzipFiles(); //ExcelReader.ReadExcelData(); //Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new Form1()); var dbCobntext = new SupermarketContext(); XmlReport.GenerateXml("../../../../GeneratedReports/xmlSales.xml"); JsonReport jsonReport = new JsonReport(dbCobntext); jsonReport.GetProductsReport(@"../../../../GeneratedReports/productsReport.json"); jsonReport.GenerateJsonFilesForEachProduct(@"../../../../GeneratedReports/ProductReportsForMongo/"); MongoDbProvider.AddProducts(jsonReport); var ProductsFRomMongo = MongoDbProvider.MongoDBCollectionToList(); ExcelReport excelReport = new ExcelReport(dbCobntext); excelReport.GenerateVendorTotalReport("n", ProductsFRomMongo); var vendorExpenses = ReadXML.ReadFileXML("../../../../Reports/Vendors-Expenses.xml"); MongoDbProvider.AddVendorExpenses(vendorExpenses); Console.WriteLine(); }
public IReport ResolveReport(ReportType reportType, string reportName) { var fileWriter = new FileWriter(); IReport report = null; if (reportType == ReportType.Failing) { report = new HtmlFailedReport(fileWriter, reportName); } else if (reportType == ReportType.TopTen) { report = new HtmlTopTenReport(fileWriter, reportName); } else if (reportName.EndsWith(".xml")) { report = new XmlReport(fileWriter, reportName); } else { report = new HtmlReport(fileWriter, reportName); } return(report); }
//============================== // Write Test Log //============================== public void OutputData() { //TestLog testlog = new TestLog(); //testlog.Write(dut, System.Windows.Forms.Application.StartupPath + @"\test results\"); XmlReport xmlReport = new XmlReport(); //Open XML Report if (!xmlReport.OpenReport(dut.SerailNumber, System.Windows.Forms.Application.StartupPath + @"\test results\", Manufacture.testStation)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Serial_Number", dut.SerailNumber)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Test_Station", Manufacture.testStation)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Error_Code", string.Format("{0:X} ", dut.ErrorCode))) { Log.error(xmlReport.LastError); } string time = System.DateTime.Now.ToString("u", DateTimeFormatInfo.InvariantInfo); if (!xmlReport.WriteSingleData("Test_Time", time)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Button", dut.LeftButtonStatus.ToString())) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("IDD_Value", dut.IDDValue.ToString())) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Firmware_Revision", dut.FwRev.ToString())) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("Raw_Count_Averages", dut.RawCount)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("Raw_Count_Noise", dut.Noise)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("IDAC_Value", dut.IDAC)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("Global_IDAC_Value", dut.Global_IDAC)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("IDAC_Gain_Value", dut.IDACGain)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("Local_IDAC_Value", dut.Local_IDAC)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("Signal_Data", dut.Signal)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("SNR_Data", dut.SNR)) { Log.error(xmlReport.LastError); } //Close XML Report if (!xmlReport.CloseReport()) { Log.error(xmlReport.LastError); } }
public void OutputData() { //TestLog testlog = new TestLog(); //testlog.Write(dut, System.Windows.Forms.Application.StartupPath + @"\test results\"); XmlReport xmlReport = new XmlReport(); //Open XML Report if (!xmlReport.OpenReport(dut.SerailNumber, System.Windows.Forms.Application.StartupPath + @"\test results\", Manufacture.testStation)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Serial_Number", dut.SerailNumber)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Test_Station", Manufacture.testStation)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Error_Code", string.Format("{0:X} ", dut.ErrorCode))) { Log.error(xmlReport.LastError); } string time = System.DateTime.Now.ToString("u", DateTimeFormatInfo.InvariantInfo); if (!xmlReport.WriteSingleData("Test_Time", time)) if (!xmlReport.WriteSingleData("ALS_dark_Value", dut.ALS_dark.ToString())) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("ALS_light_Value", dut.ALS_light.ToString())) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("LED_Value", dut.LED.ToString())) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Res_Value", dut.Resistor.ToString())) { Log.error(xmlReport.LastError); } //Close XML Report if (!xmlReport.CloseReport()) { Log.error(xmlReport.LastError); } }
private void WriteTestReport() { XmlReport xmlReport = new XmlReport(); //Open XML Report xmlReport.OpenReport(dut.SerailNumber, System.Windows.Forms.Application.StartupPath + @"\test results\", "IDD StandBy"); xmlReport.WriteSingleData("Serial_Number", dut.SerailNumber); xmlReport.WriteSingleData("Test_Station", "IDD StandBy"); xmlReport.WriteSingleData("Error_Code", string.Format("{0:X} ", dut.ErrorCode)); string time = System.DateTime.Now.ToString("u", System.Globalization.DateTimeFormatInfo.InvariantInfo); xmlReport.WriteSingleData("Test_Time", time); xmlReport.WriteSingleData("IDD_Sleep1_Value", dut.IDDValue_Sleep.ToString()); xmlReport.WriteSingleData("IDD_Deep_Sleep_Value", dut.IDDValue_DeepSleep.ToString()); //Close XML Report xmlReport.CloseReport(); }
//****************************************// // Test Record // //****************************************// /// <summary> /// Write Test Log; /// Write test log of each DUT in seprated file; /// Single txt file with file name is the serial number; /// </summary> public void TestLog() { foreach (DUT dut in m_DUTArray) { //TestLog testlog = new TestLog(); //testlog.Write(dut, System.Windows.Forms.Application.StartupPath + @"\test results\"); XmlReport xmlReport = new XmlReport(); //xmlReport.writeReport(dut, System.Windows.Forms.Application.StartupPath + @"\test results\", "TPT"); //Open XML Report if (!xmlReport.OpenReport(dut.SerailNumber, System.Windows.Forms.Application.StartupPath + @"\test results\", "TPT")) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Serial_Number", dut.SerailNumber)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Test_Station", "TPT")) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Error_Code", string.Format("{0:X} ", dut.ErrorCode))) { Log.error(xmlReport.LastError); } string time = System.DateTime.Now.ToString("u", DateTimeFormatInfo.InvariantInfo); if (!xmlReport.WriteSingleData("Test_Time", time)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("IDD_Value", dut.IDDValue.ToString())) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSingleData("Firmware_Revision", dut.FwRev.ToString())) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("Raw_Count_Averages", dut.RawCount)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("Raw_Count_Noise", dut.Noise)) { Log.error(xmlReport.LastError); } if (!xmlReport.WriteSerialData("IDAC_Value", dut.IDAC)) { Log.error(xmlReport.LastError); } //if (!xmlReport.WriteSerialData("Signal_Data", dut.Signal)) //{ Log.error(xmlReport.LastError); } //if (!xmlReport.WriteSerialData("SNR_Data", dut.SNR)) //{ Log.error(xmlReport.LastError); } //Close XML Report if (!xmlReport.CloseReport()) { Log.error(xmlReport.LastError); } } }
//****************************************// // Test Record // //****************************************// /// <summary> /// Write Test Log; /// Write test log of each DUT in seprated file; /// Single txt file with file name is the serial number; /// </summary> public void TestLog() { foreach (DUT dut in m_DUTArray) { //TestLog testlog = new TestLog(); //testlog.Write(dut, System.Windows.Forms.Application.StartupPath + @"\test results\"); XmlReport xmlReport = new XmlReport(); xmlReport.writeReport(dut, System.Windows.Forms.Application.StartupPath + @"\test results\", "TPT"); } }