Fire up BDD inside Docker with Cucumber and BDDfire

Fire up BDD inside Docker with Cucumber and BDDfire

Automation, BDD, DevOps
The key benefits of Behavior-Driven-Development (BDD) practices are communication enhancement and customer satisfaction. You can read more on that by Dan North and Gojko Adzic. Perhaps the biggest practical challenge that stands in the way of reaping those benefits is the burden of provisioning, installation, maintenance of requisite complex and fussy infrastructure and setting up reliable test infrastructure. Cucumber is one of the most popular BDD framework available in the market to achieve the benefits from BDD practices. The problem is software teams seems to spend lot of the time setting up Cucumber and necessary toolkit around it. The management has to decide the tools and engineers have to research all the available tools to support agile practices like CI, code quality, test reporting, parallel execution, devOps integration. The process of getting BDD…
Read More

Automated Accessibility Tools

Automation
Automated Accessibility Accessibility testing can done either in manual or automated way. Manual accessibility can be formed by using some online tools or using VoiceOver on Mac OSX or NVDA  screen reader. There are various automated accessibility tools available in the market which we will be listing in the post. Using automated accessibility tools has some pros and cons as it can detect few things but can't really detect some important things. Automated tools can detect : DOCTYPE ALT tags Character Encoding Relative Size TabIndex value ARIA track attribute for Video There are various accessibility audit rules automated by Google Accessibility Developer Tool. Automated Tools Can't detect : Color Contract Frame Usage JavaScript Usage  Automated Accessibility Tools There are some awesome libraries available open-source for the automated accessibility testing. Some of…
Read More

Dockerizing Cucumber-BDD and Ruby Friends

Automation, BDD
Docker Docker is becoming incredibly popular in the recent days. Docker containers are lightweight and can be launched as required. Well, this post is about provisioning Cucumber-Capybara BDD framework inside docker in order to execute Cucumber scenario inside the containers. This will install all the supporting tools as mentioned in the BDDfire. Docker-BDD on DockerHub In order to setup, Ruby-Cucumber framework inside docker, I have created a Docker image on DockerHub, called 'docker-bdd'   You can get click on image above to get to Docker-Hub and pull 'docker-bdd'. Pulling Docker-BDD Assuming you have Docker setup in your machine, you can launch docker vm. Please use docker docs in order to get you setup with docker. Now, let's pull the Docker image and let it provision   [crayon-58a9857baa30e323434528/]   This  will pull…
Read More

Visual Regression Tools: BackstopJS

Automation
Visual Regression In recent days, I came across mind blowing topic called 'Visual Regression'. There is still no proper definition of the visual regression but idea is fairly simple. In the Visual Regression world, we take screenshots of the live applications as a reference of base screenshots, and while we develop additional features we compare new screenshots with the reference or base screenshots to make sure existing functionality is not broken. If screenshots differ then visual regression testing tools warn you about the changes. There will be more in depth discussion in the #LDNSE 12 London Selenium Meetup at Huddle. Keep an eye on the meetup 'Visual Regression : PhantomCSS and Selenium". Details here http://www.meetup.com/seleniumlondon/events/220601189/ Visual regression testing sometimes called 'CSS Regression Testing. There are many tools available now to…
Read More

BBC Internet Blog on PhantomJS, Grunt and Friends

Personal
Responsive BBC Internet Blogs I have written a blog post on 'BBC Internet blog' which gone responsive today. The post on ' Test Automation with PhantomJS, Grunt and Friends'. This post explained how PhantomJS and Grunt has been used for Web acceptance testing, performance testing and accessibility testing. You can read this post by clicking on the image below. [caption id="attachment_2083" align="aligncenter" width="707"] Test Automation with PhantomJS, Grunt and Friends[/caption] The following toolkits used in the post. Ruby, Cucumber, Capybara, Poltergeist Yslow, Confess, Phantomas, grunt-phantomas grunt-accessibility  What People saying on Social Media about this post? Here are what people saying about this blog post This is storify for the lateste BBC intenet blog on Test Automation with PhantomJS, Grunt and Friends. Blogs post can be found here http://www.bbc.co.uk/blogs/internet/entries/a456cf81-a154-3082-a726-d13f4f28ee23 https://storify.com/Shashikant86/bbc-internet-blog-test-automation-with-phantomjs-g Please…
Read More

Setting up Headless Travis CI build with Cucumber+Capybara+Poltergeist

Automation, BDD
Travis CI Travis CI is a continuous integration service for the open source projects hosted on GitHub. You can login into  TravisCI with your existing GitHub account. Travis CI build will run after every checkin into the GitHub. Typically TravisCI loos like this Setting up TravisCI +Poltergeist Setting up Travis CI for the Cucumber Poltergeist project is easy task as PhantomJS is pre-installed on the TravisCI. Poltergeist uses PhantomJS as a headless browser to execute UI Cucumber+Capybara scenarios. If you haven't came across Cucumber+Capybara+Poltergeist setup, please read my previous post ' Cucumber + CapyBara + Poltergeist: Rockstar BDD Combo' Now, let's setup the TravisCI for the one of the Poltergeist project on GitHub: Poltergeist-Demo https://github.com/Shashikant86/Poltergeist-Demo I have logged into TravisCI with my GitHub account. You can view this public build here Now,…
Read More

Cucumber Tip – Skip HTTP Auth with capybara and headless Drivers

BDD
HTTP Authentication HTTP authentication is a mechanism of force use to user credential before entering into the website. While developing application, we might need to use HTTP authentication to restrict unauthorised user accessing site. You can read more HTTP auth   While automating the pages with HTTP authentication we need to enter the login credentials to carry on test journey. Here is something we can do to skip HTTP auth Set HTTP Headers Headless capybara drivers provides mechanism to set HTTP headers before visiting page which skips http authorisation. There are Poltergeist and Mechanize  drivers for the capybara which allows us to set HTTP header. You can add those steps in the before hook. Using Poltergeist You can set HTTP header with Poltergeist to skip basic http auth like this. You…
Read More

Cucumber, Capybara and Poltergeist as Developer Tools: Network Traffic Capture

BDD
BDD with Cucumber, Capybara and Poltergeist Cucumber is a awesome BDD tool which can be used with different web acceptance testing frameworks and different drivers. We can use BDD combination of Cucumber + Capybara + Poltergeist to automate acceptance criteria. Read my previous blog here to know more about it. In this tutorial, we will see how we can capture network traffic of webpage and use it to check that all resources loaded correctly. We will use Poltergeist as a Capybara driver network traffic of the webpage. Network Traffic Capture Working as a developer it's quite important to use developer tools to see loaded resources on the webpage. We generally use developer tools embedded in the browser. e.g Firebug for Firefox, Developer tool for Safari and Chrome OR Charles. We can…
Read More

Running Behat Scenarios with PahntomJS

BDD
Behat Behat is a Behavior Driven Development tool for the PHP application. Behat and Mink uses many drivers like Selenium, Sahi, Zombie and goutte to launch scenarios. In this post, we will see how to run Behat scenarios using an awesome tool called 'PhantomJS'. We will use a existing Demo project on GitHub. [crayon-58a9857bae0c2596607435/] PhantomJS PhantomJS is a headless browser with full support of JavaScript. PhantomJS can be used for the various purpose like Headless Website Testing Page Automation Network Monitoring Installation On Mac OSX, you can install it with HomeBrew [crayon-58a9857bae0d0379482176/] You can now check if PhantomJS installed using [crayon-58a9857bae0d8600060143/] Now you are good to go with PahntomJS and Behat Behat, Selenium and PhantomJS In order to use PhantomJS with Behat-Mink and Selenium. We need to launch it on…
Read More

Cucumber + CapyBara + Poltergeist: Rockstar BDD Combo

BDD
BDD Tools It's an awesome idea to use BDD tools to automate your acceptance criteria and the tools like Cucumber can help to accomplish this task. The process of automating acceptance criteria using BDD tools can be defined in three layers BDD Tools: We can use BDD tools like Cucumber, SpecFlow or Behat to write an acceptance criteria in the human readable language a.k.s Domain Specific Language (DSL). Gherkin is a popular DSL which uses Given When Then format to write an acceptance criteria. Web Acceptance Frameworks: Web acceptance frameworks are needed to talk o BDD tools. Cucumber has Capybara, Behat uses Mink as a web acceptance frameworks. Drivers: Web acceptance frameworks uses drivers to launch browsers or to run scenarios headless. An examples of the drivers are Selenium, Webdriver, Sahi,…
Read More