background preloader


Facebook Twitter

Behavior-driven development. In software engineering, behavior-driven development (BDD) is a software development process that emerged from test-driven development (TDD).[1][2][3][vague] Behavior-driven development combines the general techniques and principles of TDD with ideas from domain-driven design and object-oriented analysis and design to provide software development and management teams with shared tools and a shared process to collaborate on software development.[1][4] Although BDD is principally an idea about how software development should be managed by both business interests and technical insight, the practice of BDD does assume the use of specialized software tools to support the development process.[2] Although these tools are often developed specifically for use in BDD projects, they can be seen as specialized forms of the tooling that supports test-driven development.

Behavior-driven development

The tools serve to add automation to the ubiquitous language that is a central theme of BDD. Automate tasks on the web with Ruby and Capybara. Capybara is a tool that Ruby on Rails developers mostly use for testing their web applications.

Automate tasks on the web with Ruby and Capybara

This tool, however, can be also used to automate boring/repeating/long running tasks on the web or scraping information from web sites that were not kind enough to provide API. Use cases I am lazy and I do not like work that involves repeating actions that won’t stimulate my brain. This is why I automate as much as I can. Ruby and Capybara came handy to me in a few situations. How it works? Capybara starts a browser. Selenium/Webdriver Selenium has these nice bindings to control real browsers that are written in Ruby. You need to install “capybara” gem as dependency. . $ gem install capybara require 'capybara' session = session.visit " if session.has_content?

$ ruby check_amberbit.rb All shiny, captain! Selenium (software) Selenium was originally developed by Jason Huggins in 2004, who was later joined by other programmers and testers at ThoughtWorks.

Selenium (software)

It is open-source software, released under the Apache 2.0 license, and can be downloaded and used without charge. The name comes from a joke made by Huggins in an email, mocking a competitor named Mercury, saying that you can cure mercury poisoning by taking Selenium supplements. The others that received the email took the name and ran with it.[2] The latest side project is Selenium Grid, which provides a hub allowing the running of multiple Selenium tests concurrently on any number of local or remote systems, thus minimizing test execution time. Scripts may be automatically recorded and edited manually providing autocompletion support and the ability to move commands around quickly. Scripts are recorded in Selenese, a special test scripting language for Selenium. Getting Started with Ruby, Cucumber, and Capybara on Windows - Agile For All. The Ruby version of Cucumber isn’t just for Rails developers.

Getting Started with Ruby, Cucumber, and Capybara on Windows - Agile For All

If you have a .NET or Java web or service app, Ruby can be a great language for testing. With libraries like Capybara for driving web apps and JSON, RestClient, SOAP, and others for interacting with service apps, you’ll find testing in Ruby requires much less code than in C# or Java. It can be hard to find instructions for setting up Ruby and Cucumber on Windows, though, so I’ve compiled these to help my clients get started, and I thought they might be useful to others. I’ve tested this on a clean Windows 7 VM, and everything works. Your mileage may vary, but let me know if you have any issues. Cucumber (software) A feature definition, with a single scenario:[9] Feature: Division In order to avoid silly mistakes Cashiers must be able to calculate a fraction Scenario: Regular numbers * I have entered 3 into the calculator * I press divide * I have entered 2 into the calculator * I press equal * The result should be 1.5 on the screen The execution of the test implicit in the feature definition above requires the definition, using the Ruby language, of a few "steps":[10] Before do @calc = Calculator.newend After doend Given /I have entered (\d+) into the calculator/ do |n| @calc.push n.to_iend When /I press (\w+)/ do |op| @result = @calc.send op end Then /the result should be (.*) on the screen/ do |result| @result.should == result.to_fend.

Cucumber (software)

Web testing. Web testing is the name given to software testing that focuses on web applications.

Web testing

Complete testing of a web-based system before going live can help address issues before the system is revealed to the public. Issues such as the security of the web application, the basic functionality of the site, its accessibility to handicapped users and fully able users, as well as readiness for expected traffic and number of users and the ability to survive a massive spike in user traffic, both of which are related to load testing. Test script. A test script in software testing is a set of instructions that will be performed on the system under test to test that the system functions as expected.

Test script

There are various means for executing test scripts. These last two types are also done in manual testing. Automated testing is advantageous for a number of reasons: tests may be executed continuously without the need for human intervention, they are easily repeatable, and often faster. Automated tests are useful in situations where the test is to be executed several times, for example as part of regression testing. Automated tests can be disadvantageous when poorly written, leading to incorrect testing or broken tests being carried out.