Your test suite is not flexible - get agile with FIT

If you haven’t heard of FIT yet, you need to know about it. FIT is an open source framework that allows you to add and execute complex tests from a simple web interface.

The requirements of FIT are pretty basic.
- You need Apache installed on the machine
- You need to be able to edit httpd.conf to give the FIT folder execution rights
- If you’re using Perl, you need to install Test::FIT

FIT works with a variety of languages, though I’ve only used it in Perl. The premise is simple:

  1. Expose your test suite to a web page via a simple HTML table.
  2. Use input and output terms that non-technical folks (customers, PMs,etc) can understand.
  3. Write a simple “fixture” that acts as the glue between the web page and the backend code that will execute the test (or just have your fixture execute the test).
  4. Expose all the test results in a simple “green means pass, red means fail” format that anyone can understand.
  5. Let everyone in the company contribute to the testing process by adding and executing tests along with the QA/testing group.

Some may cringe at the idea of allowing anyone in the company to write and execute tests but, trust me, its a good idea. Trust me. FIT is:

  • Agile friendly (used commonly in Scrum and eXtreme programming environments)
  • It will allow your users/customers to continue to clarify their expected behaviors by understanding what inputs and outputs are important to them.
  • It allows anyone in the team/company to execute tests and immediately see results which lowers workload on QA and increases confidence by other stakeholders
  • Its easy to set up, easy to maintain

Here is a quick example of a FIT test, unfortunately I can’t build a live version for you because FIT isn’t installed on my web host’s servers:

MathFixture
Input1 Input2 InputSums
7 4 11
3 2 5
7 7 17

The table above is what a standard FIT page may look like. You have a standard HTML table with a Fixture name listed in the first row. The second row contains column names which will correspond to subroutines within your Fixture. All subsequent rows correspond to test inputs and expected outputs.

The fixture files themselves are simple. As they can be written in may languages, I’m not going to include a completely accurate example here, but this is a bit of what a basic Fixture in Perl may look like:

package MathFixture;
use Test::Fit;attribute(’Input1′);
attribute(’Input2′);sub InputSums {
$sum = $Input1 + $Input2;
return $sum;
}1;

It really is as simple as that. The package name must match the first row of the FIT test table. The inputs must be treated as incoming variables to the script. Subroutines much exist for each output value that you are going to calculate. The subroutines much return a value equal to the output you expect based on the test table.If you haven’t tried fit yet, I strongly recommend you give it a shot. Its a great tool, works pretty well out of the box, and is a great way to extend your testing resources to other people in the company.

During my time in Quality Assurance, one of the most important things I’ve learned is that understanding what the customer expects and testing for that is paramount. With a tool like FIT, your customers (be it external customers, marketing, or product management) can write tests directly into the tables allowing you to quickly build a functional, replicable, archivable regression suite that you can use in the future.


Related Posts:
No related posts


3 Responses to “Your test suite is not flexible - get agile with FIT”

  1. Guest Says:

    One downside of FIT is that updating tests via HTML can be difficult. To add a test, your users shouldn’t need to open an HTML document, add HTML markup, save the file, put it back on the web server, etc.

    To deal with this issue, you may want to investigate Fitnesse (http://fitnesse.org). It builds on top of fit, can be used with Perl tests (via a bit of hacking), and exposes all of the tests in a standalone wiki so users can easily edit the wiki page to add/remove/update their automated tests.

    I’ve used it, its fairly simple to set up, and is an excellent solution if installing apache on your box isn’t an option as the wiki is standalone, running on a java webserver that requires no user installation (you just need to have java installed).

  2. rogotenin Says:

    Hello

    I am Lucy, I have found your website while searching for some info at Google. Your site has helped me in a big way.

    Bye

  3. tolikutop Says:

    Hello

    Cool!.. Nice work…%

    tramadol

Leave a Reply