Skip to main content

Posts

Showing posts from 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 =...

Sample Cucumber with Java

Most of us should have heard about the term BDD - Behavious Driven Development. In this post, I would like to give some intro about familiar BDD framework called Cucumber and why we need BDD. Why BDD? Once people started moving to Test Driven Development (TDD), it helped a lot interms of reducing the bugs in development stage itself as every feature was developed by creating smaller unit tests, making it FAIL and coding the functionalities to make it PASS. But eventually, the BAs and testers are not able to follow these testing practices and thus gap in communication which lead to lot of mis-understanding the features/requirements. So, experts wanted a framework which should take inputs like normal people speaking English and should run the tests based on those requirement. Also this requirement will support as documentation of features to understand by testers/BAs/devs. Thus BDD was born. BDD keywords: Given, When, Then and And Example: Scenario: Login to Facebook ...

Continuous Integration, Testing and Delivery

Based on the knowledge gathered from QA and DevOps experts, presenting a simple graphic which represents how actually the CONTINUOUS delivery works. Also this will help to differentiate each from other.

Selenium - TestNG - Jenkins Integration

As current agile development process keep on expecting more testing with continuous integration stuff, I am going to give brief summary about how we can integrate the CI process with Jenkins. Pre-Requesties: 1. Your Selenium project 2. Your Selenium and TestNG lib locations 3. Jenkins installed. Ensure IIS in your machine installed and you can access Jenkins Dashboard using  http://localhost:8080/ Before creating a job under Jenkins, try to run your selenium tests from command line. Selenium - CommandLine: Let's say, you have project called SeleniumProject under C:\Eclipse folder. Assume you have all your JAR files (Selenium Jars, TestNG Jars, etc) under C:\Eclipse\JARs  folder. Now you can prepare your command. 1. Go to Project location cd "C:\Eclipse\SeleniumProject" 2. Execute your testng.xml suite by setting the requied class path. java -cp "bin;..\JARs\*" org.testng.TestNG testng.xml -cp means class path bin - bin path to look into cl...