Skip to main content

Posts

Showing posts from December, 2016

Generate Test Execution Report with Screenshots inbuilt

How to generate HTML report with inbuilt screenshots? Lot of automation testers would come across this path while trying to integrate their automation solution with some test management tool or trying to send the execution report to management team. The main issue we face here is that we need to attach the screenshots also while sending or uploading into another tool. What would you think if we can convert the image into bytes and store it inside the HTML itself? Yes. You are right. We can attach the screenshots and report statements in one single html file and easily we can attach or send it to anybody. Function convertImageToBytes(strScreenshotFilePath)   Dim streamInput, bytesStream, oDOM, tmpElement      Set streamInput = CreateObject("ADODB.Stream")   Set oDOM = CreateObject("Microsoft.XMLDOM")     streamInput.Open   streamInput.Type = 1  ' adTypeBinary   streamInput.LoadFromFile strScreenshotPath   bytesStream = streamInput.Read        Set