The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
My Apprenticeship - Friday, August 6, 2004

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jake Scruggs

Posts: 336
Nickname: aurorae314
Registered: Feb, 2008

Jake Scruggs is a developer at ThoughtWorks
My Apprenticeship - Friday, August 6, 2004 Posted: Aug 6, 2009 7:11 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jake Scruggs.
Original Post: My Apprenticeship - Friday, August 6, 2004
Feed Title: Jake Scruggs
Feed URL: http://jakescruggs.blogspot.com/feeds/posts/default
Feed Description: Ruby, Rails, Metrics, Testing, and pursuit of clean code.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jake Scruggs
Latest Posts From Jake Scruggs

Advertisement
This summer I'm revisiting my short apprenticeship at Object Mentor. I'll be posting commentary on all my posts from the summer of 2004 exactly 5 years later to the day.

Friday 8-6-04

Last day of the TDD and refactoring class today. We started with an intro to FitNesse, which is acceptance testing. The basic idea is that while unit tests are concerned with the inner workings of the classes and methods, acceptance testing is after more global behavior. An acceptance test tends to simulate the actual operation of the program. What you do is enter some data in a table that the user might enter. Now this table is in a wiki which is being served by FitNesse which may be running locally or on the company server. Then, when you push the button (on the wiki page) that sez 'Test,' FitNesse parses the wiki text and feeds the data from the table into your program. And then it checks the output against the table you created (on the wiki) with the expected output.

Which sounds a lot like a unit test -- just applied to a larger scale. And it mostly is, but with the added benefit that it's easier to write a test in a wiki than to learn java, or C#, or whatever. That means that the customer can write the acceptance tests and you can gets busy making them pass. Which is pretty cool.

The tick of Fitness is that you have to write a bunch of interface code between your natural language wiki tests and your code -- In that way it's kind of like cucumber. But anyone wishing to write Fitness/Cucumber tests has to learn to think a bit like a programmer because you can't write just any sentence and have the magic computer turn it into a test. We programmers often forget how hard our job is until we see non-coders attempt to do what we do every day. Often a team will try to adopt an acceptance testing framework because the tests look so easy to write but that is deceptive -- computers can't really read natural language yet and so writing acceptance tests as a non programmer can be frustrating because the cucumber or selenium or fitnesse or whatever tests look like sentences but a slight deviation from the form produces a cryptic error message. Ultimately I think they are worthwhile but you have to have a serious commitment from the people writing the tests to learn how write the tests.

Read: My Apprenticeship - Friday, August 6, 2004

Topic: Firefox Blues Previous Topic   Next Topic Topic: My Apprenticeship - Wednesday, August 4, 2004

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use