Skip to content

Instantly share code, notes, and snippets.

View sai43's full-sized avatar

Sai Ch sai43

View GitHub Profile
@sai43
sai43 / bdd.md
Created April 11, 2016 19:03 — forked from xpepper/bdd.md
What is BDD

BDD stands for Behavior-driven development, and is a process of exploring, discovering, defining and driving out the desired behavior of a sw system, using conversations, concrete examples and automated tests.

Conversations with concrete examples helps explore, discover and illustrate our shared understanding of the problem we need to solve for our stakeholders. Then we refine those examples into automated tests, to describe the desired behavior of our solution, to drive the development of that behavior in the system. To do that you may use tools like Cucumber.

BDD is an agile practice, so it needs to be done just in time, at the last reponsibile moment, and not just in case. The key in BDD are conversations, and these conversations needs to be done near in time with the work you have to do.

You need to have your work broken down into user stories.

In the conversation between the 3 amigos (Dev, Testers, PO) for a user story, you'll have lots of questions raising and you'll explore the requirements

@sai43
sai43 / nokogiriex.rb
Created October 14, 2014 04:53
Nokogiri gem example
require 'nokogiri'
require 'open-uri'
items = Array.new
prices = Array.new
doc = Nokogiri::HTML(open("http://www.thinkgeek.com/caffeine/feature/desc/0/all"))
items = doc.xpath("//div/a/h4").collect {|node| node.text.strip}