## Wednesday, December 15, 2010

### BOOK CLUB: How We Test Software At Microsoft (8/16)

This is the eighth installment of the TESTHEAD book club covering How We Test Software at Microsoft. This is final part of Section 2, which deals with the philosophy of testing and the testing concepts that Microsoft embraces and teaches its SDE’s and SDET’s. This section covers the area of creating models of working systems and coming to grips with making complex things more simple and making random things less random. Again, the density and detail provided could take several blog posts to cover. Rather than give a run down and bit by bit summary of the entire chapter, this is a high level view and will naturally only be able to skim the surface.

Chapter 8. Model-Based Testing

Alan discusses the ideas behind model-based testing by making a comparison to Boeing and their method of designing a new jet aircraft. Since it is impractical to build scale versions of a jet airliner each time to test out an idea or approach to construction, much of the research and development is done using models, a method to help make potentially complex ideas more easy to understand or visualize. Mathematical equations are often challenging to children, but picture diagrams showing what happens help to simplify the concept and give the student another way to picture the solution and, later, have more confidence when they encounter the same kind of equation again.

We use models all the time in our work-day lives; when we draw a network map, when we draw the layout of a lab to see if we’ll have enough space to move a piece of equipment in, when we lay out the visible pieces of a GUI front end, and most certainly when we develop or test software code.

Model-based testing (MBT) is a method that Microsoft and other companies use to help outline their thought process or designs. Whether it be a flow chart on the back of a napkin or using full scale visualization tool like Microsoft Visio. The challenge is how to get test cases from a model, and this section is Alan’s approach to that very issue.

Modeling Basics

At the simplest level, a model is anything that describes a system. Behavioral models are said to have a starting state, one or more transitions, and an ending state.

A finite state machine (FSM) is the term used to describe a collection of states and associated transitions. FSMs are a natural way to express any functionality that is represented by states and transitions.