Tag: Java

framework

Automation framework with Selenium Java (Advanced)

The next big course on automation testing for Selenium with Java which got released in Udemy yesterday after months of effort named Automation framework with Selenium Java (Advanced)

This course is one of my favorite course after Automation framework development with Selenium C# (Advanced) which released early this year and chosen as the bestselling course in Udemy as well !

The course features following sections

  • Understand how to design a custom automation framework
  • Understand develop various components for automation framework in industry standard
  • Understand developing generic Page Object Model practice using Generics in Java
  • Understand developing generic Page Navigation concepts of POM using Generics in Java
  • Understand and work with custom Test Runner for TestNG
  • Understand and writing custom controls for Selenium automation by learning internals of Selenium API in-depth

Here is the complete introduction video of the above course

For purchasing the above course, do drop me an email for latest coupon code to avail discount.

Thanks,

Karthik KK

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

cuclogo

Working with multiple data using DataTable in Cucumber for Java

In our last post we discussed getting started with cucumber for Java, in this post we will discuss working with multiple data using DataTable in Cucumber for Java. We have already discussed about working with multiple data in Specflow of C#, which has Table class, but here in Cucumber for Java they have class named DataTable.

Working with multiple data in Cucumber

We might need to supply multiple data instead of hardcoded value passed in steps from feature files, this happens most of the time while working with your project

This can be done using DataTable class available in Cucumber, basically DataTables are of type List<List<String>>

Table in the scenario looks something like this

Here is the complete videos of the above discussion

Working with DataTable using DataTable.raw()

Working with DataTable using custom class

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

cuclogo

An Introduction to Cucumber for Java

In this post we are going to discuss about cucumber for Java implementation, well, from this post, we are starting an all new series of Cucumber with Selenium video series as well as posts as a discussion.

Introduction

BDD – Behavioral Driven Development is based on Test Driven Development (TDD) and it aims to bridge the gap between Business analyst and developers.

BDD not only bridges the gap between business analyst and developers but also between

  • Manual QA with Automation testers (who write BDD)
  • Manual QA with Developers

BDD seems to be like a plan text, but they have their own syntax based on certain tools (which we will discuss next)

BDD Supported tools

There are many tools available to support BDD, some most famous tools are

  • Cucumber
  • Jbehave
  • Nbehave
  • SpecFlow

All the above tools are used in conjunction with many different platforms and languages like JAVA, C#, Ruby, Python, Jruby etc

But all the above tools have one language in common, which is Gherkin

Gherkin

  • Gherkin is the format for Cucumber specification.
  • It is a business readable, Domain specific language which will let anybody to understand the software behavior easily (effortlessly), since they are PLAIN TEXT.
  • Gherkin has some spaces and indentation to define structure.
  • Gherkin has very few syntax which make the parser (the tool which uses Gherkin) to behave based on the structure.
  • The syntax of Gherkin is very simple and are pretty readable as plain text

Gherkin Syntax

Here are few syntax of Gherkin

  1. Feature
  2. Background
  3. Scenario
  4. Given
  5. When
  6. Then
  7. And
  8. But
  9. Scenario outline
  10. Examples
  11. Scenario Templates

It looks something like this

Here is the complete video of the above discussion

Read more

seleniumtitbits

Working with hidden controls using Selenium

In this post we will discuss how to work with hidden controls using Selenium with Javascriptexecutor, which is an interface found in Selenium package itself.

Hidden Controls

Hidden controls in a page is very common and they will be enabled only if certain criteria or conditions are met.

There are many such real world scenario available like

  • Showing an button
  • Showing an label message etc

How will it look in code

In code they will be either hidden by using an HTML attribute called hidden or using CSS display property to none as shown below

Here is the complete video of the above discussion

Here is the complete code from the above video Read more

seleniumtitbits

Selenium Grid Parallel test execution

In the last post we discussed how selenium grid works and how to configure selenium grid in greater detail. In this post we will move further and try to run multiple tests in parallel in different environments like

  • Different Operating systems
  • Different browsers

Distributed architecture

The distributed architecture we will work will look something like this

Parallel execution

Parallel execution of test can be achieved using testing framework TestNG

In TestNG there is an option called Parallel which you can see from here Read more

seleniumtitbits

Selenium Grid understanding and configuring

In this post we will discuss about Understanding and configuring Selenium Grid, I thought of making a simple post for selenium grid, but due to its vast concepts and techniques, I dig a little deeper to cover all the concepts required for one to get into the Selenium Grid concept understand fully rather just partially !!!

Selenium grid

SeleniumGrid allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, SeleniumGrid support distributed test execution.

Distributed Architecture

We will try to understand how the selenium grid architecture looks like and a model is shown below

Selenium Grid basically has a setup of

  • Server (Also known as Hub)
  • Client (Also known as Node)

Read more