Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Robot Framework Test Automation

You're reading from   Robot Framework Test Automation Create test suites and automated acceptance tests from scratch

Arrow left icon
Product type Paperback
Published in Oct 2013
Publisher Packt
ISBN-13 9781783283033
Length 98 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Sumit Bisht Sumit Bisht
Author Profile Icon Sumit Bisht
Sumit Bisht
Arrow right icon
View More author details
Toc

Behavior-driven development


Despite the obvious benefits of automated acceptance tests, in practice, even amongst experienced XP and TDD teams, it's rarely done, or done well. One of the reasons is that finding a stakeholder with the technical ability, interest, and patience to sit in front of a computer writing pure code for even a DSL like gerkin or RSpec is hard. Consider the following rspec test present in WEBrick (an HTTP server in Ruby commonly used in development):

  should "be a WEBrick" do 
    GET("/test") 
    status.should.equal 200 
    response["SERVER_SOFTWARE"].should =~ /WEBrick/ 
    response["HTTP_VERSION"].should.equal "HTTP/1.1" 
    response["SERVER_PROTOCOL"].should.equal "HTTP/1.1" 
    response["SERVER_PORT"].should.equal "9202" 
    response["SERVER_NAME"].should.equal "127.0.0.1" 
  end

This example observes the behavior that is based on the response from the server, from this it can be concluded that the server is a WEBrick server or not.

However, at time this may...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image