Tag: automation

cuclogo

Working with Cucumber Hooks to Initialize and Teardown tests

In our last post we discussed working with multiple data using DataTable and Custom classes of DataTable, in this post we will discuss working with cucumber hooks and how helpful it is to initialize and teardown different test artifacts

Cucumber hooks

If you are from Specflow background, you might have noticed there are different types of hooks available like

But unfortunately in cucumber for Java we only have two hooks

  • @After
  • @Before

Limitation in cucumber for Java

In Specflow, you can call hooks for each and every steps, features, scenario, scenario block or whole test run, but its not possible with cucumber for Java

Here is the complete video of the above discussion

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK

dockercompose

Setting Selenium grid with Docker compose

In our last post on docker compose, we discussed what docker compose is and how to work with docker compose in much greater working detail.

In this post we will go a step further to configure selenium grid with docker compose. We have also discussed about configuring and working with Selenium Grid using Docker in greater detail in our executeautomation, please go ahead and read the article from here

Here is the complete video to configure and work with Docker compose for Selenium grid

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK

ExecuteAutomation Reporting System (EARS) Outsourced

If you have already read earlier articles in ExecuteAutomation, we has taken effort to outsource as much source code as possible on GitHub

Today, ExecuteAutomation is happy to outsource on of the most exciting yet most requested tool developed for automation community which is

  • ExecuteAutomation Reporting System (EARS) along with
  • ExecuteAutomation Web Service System

You can clone the complete source code of ExecuteAutomation Reporting System source from here.

https://github.com/executeautomation/ExecuteAutomationReportingSystem/

Quick Introduction on ExecuteAutomation Reporting System (EARS)

If you don’t know what ExecuteAutomation Reporting system or EARS is all about, it’s an tool developed using

EARS stores automation reports for every test execution done on the framework which consumes it and display it with as much information as possible

Features

Here are some of the key features of EARS compares to other common reports like Extent Report or ReportNG (which is not even in development)

Historical

EARS shows report for every test sessions and stores them historically in MS SQL server database as shown below

Figure 1: ExecuteAutomation Reporting System Home Page

Searchable

EARS has powerful search capabilities like search by

  • Test case ID
  • Name (who executed it)
  • Date search

Supported automation tools

Supports automation testing tools like

  • Selenium
  • Coded UI Testing
  • Robotium

Stores Screenshot and detailed report

EARS also stores screenshot of failed test cases (coming soon)

Figure 2: Detailed Report

Stores pickles report

EARS also stores the most famous living documentation Pickles report

Where can I learn building this tool from ground up?

You can learn building ExecuteAutomation Reporting System and ExecuteAutomation TestHarness System from udemy course below

https://www.udemy.com/creating-automation-reports-with-ears

Here is the complete video of the above discussion

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK

specflow

Parallel execution with Specflow 2.0 + NUnit + Selenium

In the last post we discussed how to work with Specflow 2.0 parallel execution, in this post we will discuss how to run Multiple tests in parallel in multiple browser same time using Specflow + NUnit + Selenium.

Problem with Selenium WebDriver object while running Specflow test in Parallel

Since we will be using selenium webdriver object in many Specflow step definitions and while running tests in parallel, we will encounter NullReferenceException , in order to resolve the problem, we need to use two important techniques

  • Context injection (dependency injection)
  • IOC Container

IOC Container

  • In software engineering, inversion of control (IoC) is a design principle in which custom-written portions of a computer program receive the flow of control from a generic framework.
  • A software architecture with this design inverts control as compared to traditional procedural programming: in traditional programming, the custom code that expresses the purpose of the program calls into reusable libraries to take care of generic tasks, but with inversion of control, it is the framework that calls into the custom, or task-specific, code.

-Source : Wikipedia

So how code looks like for IOC Container?

Here is the complete source code in GitHub https://github.com/executeautomation/SpecflowSeleniumParallel

Here are the complete videos of the above discussion

Video 1

Video 2

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK

dockerSElenium

Code to run Selenium grid test on multiple docker containers

In the last post we discussed how to setup selenium grid containers with Docker, in this post we will discuss how to run test on multiple docker containers in parallel using docker command.

Here is the complete source code of this article

https://github.com/executeautomation/SeleniumParallelSample

Sample snippet

Here is the complete video of the above discussion

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK

C#

Introduction and getting started with C# for automation testing

In this post we will discuss a very brief introduction of C# and getting started with C# using Visual Studio 2015 for automation testing. This post and upcoming post are part of C# for automation testing course.

What is the motivation behind this course

ExecuteAutomation is trying to help people from different background in automation testing world, especially people from Manual testing .There are 100’s of questions I get each months (not day yet) from people asking on the importance of C# for automation testing.

Here is the complete video of the above discussion

Introduction

Getting started

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK

PicklesLogo

Pickles an living documentation for Specflow feature file

In this post we will discuss about Pickles, an opensource tool for generating documentation for Specflow feature files.

What is Pickles

Pickles is an open source living documentation generator that works on feature files written in the Gherkin language, popularized in tools like Cucumber and SpecFlow.

Pickles can be incorporated into your build process to produce living documentation in a format that is more accessible to your clients. Gherkin language files are written in plain text and stored in your source folder

Pickles supported output formats

Pickles can produce output in different formats:

ØStatic HTML: a set of HTML files with minimal JavaScript

ØDynamic HTML: a JavaScript-rich single page app with integrated search

ØWord: Microsoft Word

ØExcel: Microsoft Excel

ØJSON: a custom JSON format

Installing Pickles via Nuget

The command to install Pickles from Nuget of Visual studio IDE is this

pickles

 

 

 

Here is the complete video of the above discussion

Thanks for reading the post and watching the video!!!

Please leave your comments and let me know if there is anything I should update in this post.

Thanks,
Karthik KK