My Blog List

Tuesday, April 19, 2016

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
 Given Facebook login page
 When I enter valid username and passowrd
 Then I should see my home page
 And I should see my name

If you see above scenario, this will act as requirement as well as documentation. We are using this feature scenarios and connecting each steps to our own selenium steps written in java or any other language and running it.

To understand the .feature files and options that we can use for different way of execution, control, etc., read this documentation.
https://cucumber.io/docs/reference

You can find the sample project and start learning on your own.
https://github.com/SCSVEL/SampleCucumber-FB

Friday, April 15, 2016

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.