It All Starts With User Features: The Logical Functional Model

Even a small application such as Microsoft Notepad has a plethora of features that must be tested. While the occasional feature is simple enough that a single test case is sufficient to test it thoroughly, it is more likely that multiple test cases are required to verify a feature works as expected. Furthermore, the individual actions that together form a test case are likely to be used in other test cases as well. While this common code is sometimes duplicated across test cases, more often it is factored out to helper methods. Organizing these methods into a logical, unified, scalable, easily navigated, and maintainable model is of paramount concern.

We have solved this problem by using the application’s features as the organizing principle of our libraries. We wrap test case execution helper methods into a Logical Functional Model, or LFM, that is a user-centric view of our application. We ask, “What can the user do?” and ”What features does the user see?” As you might expect, answers to these questions tend to line up with the features our specifications define.

Organizing our LFM around product features eliminates navigation problems because methods for interacting with a feature are in an area named for that feature. It is also clear how new features fit into the system, so scaling problems are avoided as well. The test cases themselves become nothing more than a list of the actions the user will take to do something. Our test cases are easy to read and easy to understand.

Comments (9)
  1. Who’s responsible for testing the line at the end of each of your posts that says "Posted on [date] by micahel with 0 Comments"? I was distressed to think that my comment on a previous post had been lost; it hasn’t, but you have to disbelieve the 0 Comments bit to find it.

  2. Steve O says:

    Sounds interesting, can you provide an example?

    I’m working for a new organization with an established product. We have no formal testing and I’m trying to start up the new group.

    I’m overwhelmed (we have several applications) and no testing, no documentation, little to no requirements). Yet, we have a very successful product. Go figure.

  3. Michael: That "0 comments" bit is evidently a bug in the blogging software. Quite annoying I agree! Unfortunately I have no control over it and don’t know when it will be fixed.

  4. Steve: My post "So What Should A Test Case Look Like?" ( is an example of code using an LFM. I can’t post anything from my application’s LFM as we haven’t announced yet, nor unfortunately do I have an LFM for Notepad or any other app I can post.

  5. I think my team – much of Microsoft, in fact – is going about testing all wrong.

    My team has a mandate…

  6. In many of my posts I have alluded to the automation stack my team is building, but I have not provided…

  7. Patrick comments on my When To Automate post:

    I am confused by your third bullet in that unstable/newly…

  8. Something I’ve been experimenting with recently is Test-Driven Design (TDD) for user interfaces (UI)….

  9. First up today was Linda Hayes talking about Cost Effective Test Automation Strategies. She grabbed…

Comments are closed.

Skip to main content