public void Factuare_To_Html() { var fe32 = Factuare_Create_Simple_Invoice_And_validate(); var logoPath = "https://a248.e.akamai.net/assets.github.com/images/modules/header/logov6-hover.png"; var html = fe32.ToHtml(logoPath); Assert.IsNotNull(html); Assert.IsNotEmpty(html); TestLog.AttachHtml("invoice_html", html); }
public void LogSourceIfTestFailed() { try { if ((Config.Settings.reportSettings.htmlOnError) && (Common.GetTestOutcome() != TestOutcome.Passed)) { TestLog.AttachHtml("HTML_" + Common.GetShortTestName(95), driver.PageSource); } } catch (Exception) { TestLog.Warnings.WriteLine("Error caught trying to get page source"); } }
public void AttachedResources() { TestLog.WriteLine("Attached image."); TestLog.AttachImage("Image", Resources.MbUnitLogo); TestLog.WriteLine("Attached plain text."); TestLog.AttachPlainText("Plain Text", "This is some plain text.\nLalalala..."); TestLog.WriteLine("Attached XML."); TestLog.AttachXml("XML", "<life><universe><everything>42</everything></universe></life>"); TestLog.WriteLine("Attached XHTML."); TestLog.AttachXHtml("XHtml", "<p>Some <b>XHTML</b> markup.<br/>With a line break.</p>"); TestLog.WriteLine("Attached HTML."); TestLog.AttachHtml("Html", "<p>Some <b>HTML</b> markup.<br>With a line break.</p>"); TestLog.WriteLine("Attached binary data."); TestLog.Attach(new BinaryAttachment("Binary", "application/octet-stream", new byte[] { 67, 65, 66, 66, 65, 71, 69 })); TestLog.Write("Attached video."); TestLog.AttachVideo("Video", video); }