Introduction To Fit


Great software requires collaboration and communication. During development, how can customers know that their programmers are producing the right thing? How can programmers know what the customers really want? How can testers know what's right and what's wrong? Getting these groups to communicate effectively and precisely should be a goal for teams creating great software.

Fit is a tool for enhancing communication and collaboration. Fit creates a feedback loop between customers and programmers. Fit allows customers and testers to use tools like Microsoft Office to give examples of how a program should behave--without being programmers themselves. Fit automatically checks those examples against the actual program, thus building a simple and powerful bridge between the business and software engineering worlds.

With Fit, customers can provide more guidance in development process by lending their subject matter expertise and imagination to the effort. The added visibility customers get into what is currently happening in a product allows them to steer projects the moment they begin to drift off-target.

How Fit Works

Fit works by reading tables in HTML files, produced with a tool like Microsoft Word. Each table is interpreted by a "fixture" that programmers write. The fixture checks the examples in the table by running the actual program.

In this example, the team is building a product to calculate employee pay. The team has worked together to create a Fit document that includes some examples of how hourly pay should be calculated.

The tables contain the examples. The first row tells Fit how to read the table. The second row gives headers for the examples, and the remaining rows provide examples. For example, the first example in the first table says, "If someone works for 40 standard hours and zero holiday hours, and is paid $20 per hour, then his or her total pay is $800."

(Although this example uses a simple tabular format to show the results of calculations, there are many different table formats that you can use.)

Fit automatically checks the examples in the tables against the software. In this case, the software is reporting the correct result for the first two cases, so Fit has colored the table cells green. In the last case, the software is reporting the wrong result, so Fit has colored the table cell red. The software says the employee's total pay is $1,040 when it's supposed to be $1,360.

In order to make Fit work with this table, the team's programmers created a "fixture" that tells Fit how to talk to their software. This is what it looks like:

The programmers used a ColumnFixture to map the columns in the table to variables and methods in the fixture. The first three columns, which provide information, correspond to variables in the fixture. The last column, which has the expected result, corresponds to the Pay() method in the fixture. To calculate the answer, the programmers used the WeeklyTimesheet class from their application.

Conclusion

Fit gives customers and programmers a way to communicate precisely about their software. Customers' concrete examples give programmers insight into the product being built. Programmers' work on fixtures and the software allow customers to experiment with different examples and gain insight into how the software really works. By working together, the whole team will learn more about the product and produce a better result.


by JimShore with contributions from DavidWoldrich and (your name here). Last updated for v1.0.

You're following the Fit documentation trail. This is the first article in the series. For a table of contents, see FitDocumentation. The next article is FitWorkflow.

 

Last edited September 24, 2020
Return to WelcomeVisitors