Ok, let's clear this all up.

FIT is not about expressing business rules.

FIT is a tool which allows the customer to add test cases in a way they're comfortable with. A programmer still has to write the logic behind those tests (called a Fixture), but it allows a customer to easily add more data, inputs and outputs.

It can have the nice side effect of getting the customer more involved with the project.

FIT is not about getting the customer to write the rules any more than unit testing is about writing the code. It can help clarify the rules and reveal where the code doesn't match customer expectations. That's why it's called an acceptance test, done right the customer accepts the work when the tests pass.


Eric Wilhelm wrote:
Categorization is a nice example.

| URL                                   | Category      |
---------------------------------------------------------
| hooters.com                           | Restaurant    |
| whitehouse.com                        | Porn          |
---------------------------------------------------------

Now I'm really confused. That looks like tabulated data, so what code would it be testing?

The code which takes a URL and decides what category it's in.  Code you defined.

FIT is this...

        my %tests = (
                # URL                      # Category
                "hooters.com"         => "Resturaunt",
                "whitehouse.com"      => "Porn",
        );

        for my $url (keys %tests) {
                my $category = $tests{$arg};

                is categorize_web_site($url), $category;
        }

Except instead of %tests you have the user write up a table (Excel, HTML, CSV, whatever) so they can input new test inputs and expected results without having to touch code. YOU write the code which interprets those inputs (the fixture). You also give them a simple way to run the tests, usually just a submit button on a web page.

That's it.  That's all FIT is.


--
191. Our Humvees cannot be assembled into a giant battle-robot.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/

Reply via email to