FitNesse Tutorials 194

Posted by Brett Schuchert Fri, 03 Apr 2009 00:35:00 GMT

Here is another tutorial for FitNesse: http://schuchert.wikispaces.com/FitNesse.Tutorials.2.

This tutorial and the first now all fit together and form one ongoing example. If you work though the first three tutorials at: http://schuchert.wikispaces.com/FitNesse.Tutorials, you’ll have practiced:
  • Using Decision Tables
  • Using Query Tables
  • Refactoring within FitNesse
  • Using SetUp and TearDown pages
  • Understanding inheritance of SetUp and TearDown pages
  • Basic test organization under a suite
  • Switching into unit testing from acceptance testing

There’s more to go, but that’s a good start to get you cracking at the fundamentals of FitNesse.

As a bonus, there’s a demonstration of some code in Java that produces query results in a snap. The source code is on github: http://github.com/schuchert/queryresultbuilder/tree/master.

Here is one such example taken from that tutorial:
   public List<Object> query() {
      List<Program> programs = CreateSeasonPassFor.getSeasonPassManager()
            .toDoListContentsFor(programId);

      QueryResultBuilder builder = new QueryResultBuilder(Program.class);
      builder.register("timeSlot", new TimeSlotPropertyHandler());
      QueryResult result = builder.build(programs);
      return result.render();
   }

Hope this is useful!

FitNesse.Slim table table example and migration to a DSL 69

Posted by Brett Schuchert Mon, 23 Feb 2009 12:03:00 GMT

I’m working on some notes related to an upcoming presentation. You can see an example of using the Slim table table here: Table Table Example

It’s a work in process. If you see something that doesn’t quite make sense, please let me know.

Using SliM in FitNess with .Net 74

Posted by Brett Schuchert Sun, 22 Feb 2009 21:10:00 GMT

If you’d like a quick introduction to using SliM with .Net, Mike Stockdale is working on an implementation and here’s a quick writeup of what you need to do to get it working: Using Slim.Net in FitNesse

User Stories for Cross-Component Teams 37

Posted by Dean Wampler Sat, 20 Sep 2008 00:53:00 GMT

I’m working on an Agile Transition for a large organization. They are organized into component teams. They implement features by forming temporary feature teams with representatives from each of the relevant components, usually one developer per component.

Doing User Stories for such cross-component features can be challenging.

Now, it would be nice if the developers just pair-programmed with each other, ignoring their assigned component boundaries, but we’re not quite there yet. Also, there are other issues we are addressing, such as the granularity of feature definitions, etc., etc. Becoming truly agile will take time.

Given where we are, it’s just not feasible to estimate a single story point value for each cross-component user story, because the work for each component varies considerably. A particular story might be the equivalent of 1 point for the UI part, 8 points for the middle-tier part, 2 points for the database part, etc.

So, what we’re doing is treating the user story as an “umbrella”, with individual component stories underneath. We’re estimating and tracking the points for each component story. The total points for the user story is the sum of the component story points, plus any extra we decide is needed for the integration and final acceptance testing work.

This model allows us to track the work more closely, as long as we remember that component points mean nothing from the point of view of delivering customer value!

I prefer this approach to documenting tasks, because it keeps the focus on delivering value to the client of each story. For the component stories, the client will be another component.

Automated Acceptance Tests for Component Stories

Just as for user stories, we are defining automated acceptance tests for each component. We’re using JUnit for them, since we don’t need a customer-friendly specification format, like FitNesse or RSpec.

This is also a (sneaky…) way to get the developers from different components to pair together. Say for example that we have a component story for the midtier and the UI is the client. The UI developer and the midtier developer pair to produce the the acceptance criteria for the story.

For each component story, the pair of programmers produce the following:

  1. JUnit tests that define the acceptance criteria for the component story.
  2. One or more interfaces that will be used by the client of the component. They will also be implemented by concrete classes in the component.
  3. A test double that passes the JUnit tests and allows the client to move forward while the component feature is being implemented.

In a sense, the “contract” of the component story is the interfaces, which specify the static structure, and the JUnit tests, which specify the dynamic behavior of the feature.

This model of pair-programming the component interface should solve the common, inefficient communication problems when component interactions need to be changed. You know the scenario; a client component developer or manager tells a server component developer or manager that a change is needed. A developer (probably a different one…) on the server component team makes up an interface, checks it into version control, and waits for feedback from the client team. Meanwhile, the server component developer starts implementing the changes.

A few days before the big drop to QA for final integration testing, the server component developer realizes that the interface is missing some essential features. At the same time, the client component developer finally gets around to using the new interface and discovers a different set of missing essential features. Hilarity ensues…

We’re just getting started with this approach, but so far it is proving to be an effective way to organize our work and to be more efficient.